A method, apparatus, device, and readable storage medium for processing message traffic.

By dynamically identifying performance bottlenecks and redundancies in processing threads, intelligent allocation between processing units is achieved, solving the problem of uneven resource utilization in multi-core environments and improving the load balancing and traffic processing efficiency of network devices.

CN118555244BActive Publication Date: 2025-12-02NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410833116.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2025-12-02
Estimated Expiration
2044-06-25

AI Technical Summary

Technical Problem

Existing network devices suffer from uneven resource utilization in multi-core processor environments. DPDK's affinity configuration leads to resource exclusivity and limited system flexibility, making it difficult to meet the demands of high-throughput, low-latency network applications.

Method used

By dynamically identifying performance bottlenecks and redundancies in processing threads, automatically selecting offloading threads, and flexibly allocating processing tasks based on task relevance, intelligent allocation between processing units is achieved to ensure load balancing.

Benefits of technology

Effectively balance the load, improve overall traffic processing efficiency and system responsiveness, ensure stable and reliable network services, and adapt to complex and ever-changing network traffic environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118555244B_ABST
    Figure CN118555244B_ABST
Patent Text Reader

Abstract

This specification provides a packet traffic processing method, apparatus, device, and readable storage medium. The method includes: in response to an event indicating that a bound processing unit has an underperforming processing thread, detecting the performance load status of the previous hop and / or the next hop; selecting at least one bound processing unit with redundant processing threads as load-sharing threads; and configuring a portion of the processing tasks of the overloaded thread to be handled by the load-sharing thread. Through the technical solution of this specification, performance bottlenecks and redundancies of processing threads in network devices are dynamically identified, enabling intelligent allocation of packet traffic processing tasks among multiple processing units. When an overload is detected in a processing thread, a redundant load-sharing thread is automatically selected, and processing tasks are flexibly allocated based on task relevance, effectively balancing the load, improving overall traffic processing efficiency and system responsiveness, and ensuring stable and reliable network services. This method is particularly suitable for dealing with complex and ever-changing network traffic environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of communication technology, and in particular to a message traffic processing method, apparatus, device, and readable storage medium. Background Technology

[0002] With the rapid development of internet technology, network traffic has experienced explosive growth, posing unprecedented challenges to the performance of network equipment. The widespread adoption of smartphones, tablets, IoT devices, and the popularity of applications such as video streaming and cloud computing have not only driven the rapid growth of network traffic but also set higher standards for network latency, throughput, and reliability. Against this backdrop, technologies such as Network Functions Virtualization (NFV) and Software-Defined Networking (SDN) have emerged, improving the flexibility and efficiency of network management through virtualization and the separation of the control plane and data plane.

[0003] However, existing network technologies face challenges such as insufficient utilization of multi-core processor resources and inadequate processing capabilities of traditional network stacks. Traditional operating systems and network stacks, designed for general purposes, struggle to meet the demands of high-throughput, low-latency network applications. In particular, frequent switching between kernel mode and user mode, along with interrupt-driven packet reception mechanisms, introduce additional processing latency, impacting network performance.

[0004] To address these issues, the Data Plane Development Kit (DPDK) was developed. Initiated by Intel, DPDK is an open-source software library designed to improve the data plane processing performance of network applications through a series of optimization techniques. By enabling network applications to directly access hardware resources and providing performance optimization technologies such as polling mode driving, large page memory support, lock-free data structures, and CPU affinity, DPDK significantly improves the speed and efficiency of packet processing.

[0005] In a multi-core processor environment, the proper allocation and management of CPU resources is crucial for maximizing the performance of DPDK applications. This involves the concept of affinity, which binds DPDK threads or processes to specific CPU cores (or a set of cores) to ensure that these threads or processes run on designated cores, avoiding performance losses caused by cache invalidation and thread migration in a multi-core processor environment.

[0006] While DPDK's affinity technology can significantly improve performance, it also introduces some potential drawbacks and challenges. For example, there's the issue of resource exclusivity; once a specific CPU core is allocated to a DPDK process, that core cannot be used by other processes or system tasks, potentially leading to uneven resource utilization. Furthermore, correctly configuring DPDK affinity requires a deep understanding of the system's hardware architecture, increasing deployment and management complexity. Once a DPDK thread is bound to a specific CPU core, the system's flexibility in handling bursts of traffic or other high-priority tasks may be limited. Additionally, if the DPDK task load is unevenly distributed, some cores may be overloaded while others may be underutilized, resulting in performance bottlenecks. Summary of the Invention

[0007] In view of this, this specification provides a message traffic processing method, apparatus, electronic device, and readable storage medium to improve the problem of uneven performance load of the aforementioned processing units.

[0008] The specific technical solution is as follows:

[0009] This specification provides a packet traffic processing method applied to a network device. The network device includes at least two processing units, each bound to a processing thread. The processing unit bound to a processing thread is configured to prioritize responding to the bound processing thread. The processing thread receives packet traffic sent from the previous hop, processes the packet traffic by calling the bound processing unit according to a configured processing task, and then forwards the processed packet traffic to the next hop. The previous hop is either a processing thread configured with different processing tasks or a packet traffic source device, and the next hop is either a processing thread configured with different processing tasks or a packet traffic destination device. At least one of the previous hop and the next hop is configured with different processing tasks. The method includes: in response to an event that a processing thread with insufficient performance of its bound processing unit is found to be an overloaded thread, detecting the performance load status of the processing units bound to the processing thread in the previous and / or next hop of the overloaded thread; in response to a detection result that a processing thread with redundant performance of its bound processing unit is found to be found, selecting at least one processing thread as a sharing thread among the detected processing threads with redundant performance of its bound processing unit; parsing the processing tasks of the overloaded thread and the processing tasks of the sharing thread, and configuring a portion of the processing tasks of the overloaded thread to be processed by the sharing thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the sharing thread.

[0010] As a technical solution, the step of parsing the processing tasks of the overloaded thread and the processing tasks of the offloading thread, and configuring a portion of the processing tasks of the overloaded thread to be processed by the offloading thread based on the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, includes: after configuring a portion of the processing tasks of the overloaded thread to be processed by the offloading thread, detecting the performance load status of the processing units bound to the overloaded thread and the processing units bound to the offloading thread after the processing tasks are reconfigured and run for a preset time; if the performance load of the processing unit bound to the overloaded thread is greater than a first threshold and the performance load of the processing unit bound to the offloading thread is less than a second threshold, then adding a processing task from the load thread that is reconfigured to be processed by the offloading thread.

[0011] As a technical solution, the network device includes a first processing unit bound to a first processing thread and a second processing unit bound to a second processing thread. The first processing thread receives packet traffic sent by the source device of the previous hop, processes the packet traffic according to a configured processing task, and then transfers the processed packet traffic to the next-hop second processing thread. The configured processing task for the first processing thread includes first-stage, second-stage, and third-stage tasks for the packet traffic. The second processing thread receives packet traffic sent by the first processing thread of the previous hop, processes the packet traffic according to a configured processing task, and then transfers the processed packet traffic to the next-hop destination device. The second processing thread is configured to process... The processing task includes at least a fourth stage task for packet traffic; the processing tasks of the first processing thread and the second processing thread have a sequential processing relationship of the first stage, the second stage, the third stage, and the fourth stage; the method includes: in response to an event of insufficient performance of the first processing unit, confirming that the first processing thread is an overloaded thread, and detecting the performance load status of the second processing unit; in response to a detection result that the performance of the second processing unit has redundancy, confirming that the second processing thread is a load-sharing thread; parsing and obtaining the sequential processing relationship of the first stage, the second stage, the third stage, and the fourth stage of the processing tasks of the first processing thread and the second processing thread, and at least reconfiguring some of the third stage tasks that were configured to the first processing thread to be processed by the second processing thread.

[0012] As a technical solution, the step of parsing and obtaining the sequential processing relationship of the first, second, third, and fourth stages of the processing tasks of the first and second processing threads, and at least reconfiguring some of the third-stage tasks configured to the first processing thread to be processed by the second processing thread, includes: after reconfiguring some of the third-stage tasks configured to the first processing thread to be processed by the second processing thread, detecting the performance load status of the first and second processing units after processing task reconfiguration and running for a preset time; if the performance load of the first processing unit is greater than a first threshold and the performance load of the second processing unit is less than a second threshold, then increasing the proportion of the third-stage tasks reconfigured to be processed by the second processing thread, or reconfiguring all the third-stage tasks to be processed by the second processing thread, or reconfiguring all the third-stage tasks and some of the second-stage tasks to be processed by the second processing thread.

[0013] As a technical solution, the first, second, and third stage tasks are decoding, filtering, and distribution tasks, respectively, and the fourth stage is a cleaning task. The processing tasks configured for the second processing thread also include a fifth and a sixth stage task, which are pre-analysis and deep analysis tasks, respectively.

[0014] As one technical solution, the network device includes a first processing unit bound to a first processing thread, a second processing unit bound to a second processing thread, and a third processing unit bound to a third processing thread. The first processing thread receives packet traffic sent by the previous-hop packet traffic source device, processes the packet traffic according to a configured processing task, and then transfers the processed packet traffic to the next-hop second processing thread. The configured processing task for the first processing thread includes at least a first-stage task for the packet traffic. The second processing thread receives packet traffic sent by the previous-hop first processing thread, processes the packet traffic according to a configured processing task, and then transfers the processed packet traffic to the next-hop third processing thread. The configured processing task for the second processing thread includes at least a second-stage, third-stage, and fourth-stage task for the packet traffic. The third processing thread receives packet traffic sent by the previous-hop second processing thread, processes the packet traffic according to a configured processing task, and then transfers the processed packet traffic to the next-hop third processing thread. The processing task calls a third processing thread to process the packet traffic, and the processed packet traffic is transferred to the next-hop packet traffic destination device. The processing task configured for the third processing thread includes at least a fifth stage of packet traffic processing. The processing tasks of the first processing thread and the second processing thread have a sequential processing relationship of the first stage, second stage, third stage, fourth stage, and fifth stage. The method includes: in response to an event of insufficient performance of the second processing unit, confirming that the second processing thread is an overloaded thread, and detecting the performance load status of the first processing unit and the third processing unit; in response to the detection result that the performance of the first processing unit and the third processing unit has redundancy, confirming that the first processing thread and / or the third processing thread is a sharing thread; parsing the processing tasks of the overloaded thread and the processing tasks of the sharing thread, and configuring some of the processing tasks of the overloaded thread to be processed by the sharing thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the sharing thread.

[0015] As a technical solution, the step of parsing the processing tasks of the overloaded thread and the processing tasks of the offloading thread, and configuring some processing tasks in the processing tasks of the overloaded thread to be processed by the offloading thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, includes: based on the confirmation result that the first processing thread and the third processing thread are offloading threads, parsing and obtaining the connection relationship of the first, second, third, fourth and fifth stages of the processing tasks of the first processing thread, the second processing thread and the third processing thread, at least reconfiguring some of the second stage tasks configured to the second processing thread to be processed by the first processing thread, and at least reconfiguring some of the fourth stage tasks configured to the second processing thread to be processed by the third processing thread.

[0016] As a technical solution, the step of parsing the processing tasks of the overloaded thread and the processing tasks of the offloading thread, and configuring some processing tasks in the processing tasks of the overloaded thread to be processed by the offloading thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, includes: based on the confirmation result that the first processing unit is an offloading thread, parsing and obtaining the sequential processing connection relationship of the first processing thread and the second processing thread's processing tasks in the first, second, third and fourth stages, and at least reconfiguring some of the second-stage tasks configured to the second processing thread to be processed by the first processing thread.

[0017] As a technical solution, the step of parsing the processing tasks of the overloaded thread and the processing tasks of the offloading thread, and configuring some processing tasks in the processing tasks of the overloaded thread to be processed by the offloading thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, includes: based on the confirmation result that the third processing thread is the offloading thread, parsing and obtaining the connection relationship of the second processing thread and the third processing thread in the order of processing of the second processing thread, the third processing thread, the fourth processing thread, and the fifth processing, and at least reconfiguring some of the fourth-stage tasks that were configured to the second processing thread to be processed by the third processing thread.

[0018] This specification also provides a packet traffic processing device applied to a network device. The network device includes at least two processing units, each bound to a processing thread. The processing unit bound to a processing thread is configured to prioritize responding to the bound processing thread. The processing thread receives packet traffic sent from the previous hop, processes the packet traffic by calling the bound processing unit according to a configured processing task, and then forwards the processed packet traffic to the next hop. The previous hop is either a processing thread configured with different processing tasks or a packet traffic source device, and the next hop is either a processing thread configured with different processing tasks or a packet traffic destination device. At least one of the previous hop and the next hop is a processing thread configured with different processing tasks. The apparatus includes: a first module, configured to, in response to an event indicating that a bound processing thread has insufficient performance, confirm that the processing thread is an overloaded thread and detect the performance load status of the processing units bound to the processing thread in the previous and / or next hop of the overloaded thread; a second module, configured to, in response to a detection result indicating that a bound processing thread has redundant performance, select at least one processing thread as a load-sharing thread among the detected bound processing threads with redundant performance; and a third module, configured to parse the processing tasks of the overloaded thread and the processing tasks of the load-sharing thread, and, based on the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the load-sharing thread, configure a portion of the processing tasks of the overloaded thread to be processed by the load-sharing thread.

[0019] As a technical solution, the step of parsing the processing tasks of the overloaded thread and the processing tasks of the offloading thread, and configuring a portion of the processing tasks of the overloaded thread to be processed by the offloading thread based on the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, includes: after configuring a portion of the processing tasks of the overloaded thread to be processed by the offloading thread, detecting the performance load status of the processing units bound to the overloaded thread and the processing units bound to the offloading thread after the processing tasks are reconfigured and run for a preset time; if the performance load of the processing unit bound to the overloaded thread is greater than a first threshold and the performance load of the processing unit bound to the offloading thread is less than a second threshold, then adding a processing task from the load thread that is reconfigured to be processed by the offloading thread.

[0020] As one technical solution, the network device includes a first processing unit bound to a first processing thread and a second processing unit bound to a second processing thread. The first processing thread receives packet traffic sent by the previous-hop packet traffic source device, processes the packet traffic according to a configured processing task, and then transfers the processed packet traffic to the next-hop second processing thread. The configured processing task for the first processing thread includes first-stage, second-stage, and third-stage tasks for the packet traffic. The second processing thread receives packet traffic sent by the previous-hop first processing thread, processes the packet traffic according to a configured processing task, and then transfers the processed packet traffic to the next-hop packet traffic destination device. The configured processing task for the second processing thread includes at least processing the packet traffic. The fourth stage of traffic processing tasks; the processing tasks of the first processing thread and the second processing thread have a sequential processing relationship of the first stage, the second stage, the third stage, and the fourth stage; the first module is used to respond to the event of insufficient performance of the first processing unit, confirm that the first processing thread is an overloaded thread, and detect the performance load status of the second processing unit; the second module is used to respond to the detection result of redundancy in the performance of the second processing unit, confirm that the second processing thread is a load-sharing thread; the third module is used to parse and obtain the sequential processing relationship of the first processing thread and the second processing thread's processing tasks of the first processing thread and the second processing thread, and at least reconfigure some of the third stage tasks configured to the first processing thread to be processed by the second processing thread.

[0021] As a technical solution, the step of parsing and obtaining the sequential processing relationship of the first, second, third, and fourth stages of the processing tasks of the first and second processing threads, and at least reconfiguring some of the third-stage tasks configured to the first processing thread to be processed by the second processing thread, includes: after reconfiguring some of the third-stage tasks configured to the first processing thread to be processed by the second processing thread, detecting the performance load status of the first and second processing units after processing task reconfiguration and running for a preset time; if the performance load of the first processing unit is greater than a first threshold and the performance load of the second processing unit is less than a second threshold, then increasing the proportion of the third-stage tasks reconfigured to be processed by the second processing thread, or reconfiguring all the third-stage tasks to be processed by the second processing thread, or reconfiguring all the third-stage tasks and some of the second-stage tasks to be processed by the second processing thread.

[0022] As a technical solution, the first, second, and third stage tasks are decoding, filtering, and distribution tasks, respectively, and the fourth stage is a cleaning task. The processing tasks configured for the second processing thread also include a fifth and a sixth stage task, which are pre-analysis and deep analysis tasks, respectively.

[0023] As a technical solution, the network device includes a first processing unit bound to a first processing thread, a second processing unit bound to a second processing thread, and a third processing unit bound to a third processing thread. The first processing thread receives packet traffic sent by the previous-hop packet traffic source device, processes the packet traffic according to a configured processing task, and then transfers the processed packet traffic to the next-hop second processing thread. The configured processing task for the first processing thread includes at least a first-stage task for the packet traffic. The second processing thread receives packet traffic sent by the previous-hop first processing thread, processes the packet traffic according to a configured processing task, and then transfers the processed packet traffic to the next-hop third processing thread. The configured processing task for the second processing thread includes at least a second-stage, third-stage, and fourth-stage task for the packet traffic. The third processing thread receives packet traffic sent by the previous-hop second processing thread, processes the packet traffic according to a configured processing task, and then transfers the processed packet traffic to the next-hop third processing thread. The process handles packet traffic and forwards the processed packet traffic to the next-hop destination device. The processing task configured for the third processing thread includes at least a fifth stage of packet traffic processing. The processing tasks of the first and second processing threads have a sequential processing relationship of first, second, third, fourth, and fifth stages. The first module is used to confirm that the second processing thread is an overloaded thread in response to an event of insufficient performance of the second processing unit, and to detect the performance load status of the first and third processing units. The second module is used to confirm that the first processing thread and / or the third processing thread is a load-sharing thread in response to a detection result that the performance of the first and third processing units has redundancy. The third module is used to parse the processing tasks of the overloaded thread and the processing tasks of the load-sharing thread, and configure some of the processing tasks of the overloaded thread to be processed by the load-sharing thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the load-sharing thread.

[0024] As a technical solution, the step of parsing the processing tasks of the overloaded thread and the processing tasks of the offloading thread, and configuring some processing tasks in the processing tasks of the overloaded thread to be processed by the offloading thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, includes: based on the confirmation result that the first processing thread and the third processing thread are offloading threads, parsing and obtaining the connection relationship of the first, second, third, fourth and fifth stages of the processing tasks of the first processing thread, the second processing thread and the third processing thread, at least reconfiguring some of the second stage tasks configured to the second processing thread to be processed by the first processing thread, and at least reconfiguring some of the fourth stage tasks configured to the second processing thread to be processed by the third processing thread.

[0025] As a technical solution, the step of parsing the processing tasks of the overloaded thread and the processing tasks of the offloading thread, and configuring some processing tasks in the processing tasks of the overloaded thread to be processed by the offloading thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, includes: based on the confirmation result that the first processing unit is an offloading thread, parsing and obtaining the sequential processing connection relationship of the first processing thread and the second processing thread's processing tasks in the first, second, third and fourth stages, and at least reconfiguring some of the second-stage tasks configured to the second processing thread to be processed by the first processing thread.

[0026] As a technical solution, the step of parsing the processing tasks of the overloaded thread and the processing tasks of the offloading thread, and configuring some processing tasks in the processing tasks of the overloaded thread to be processed by the offloading thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, includes: based on the confirmation result that the third processing thread is the offloading thread, parsing and obtaining the connection relationship of the second processing thread and the third processing thread in the order of processing of the second processing thread, the third processing thread, the fourth processing thread, and the fifth processing, and at least reconfiguring some of the fourth-stage tasks that were configured to the second processing thread to be processed by the third processing thread.

[0027] This specification also provides an electronic device, including a processor and a readable storage medium storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the aforementioned message traffic processing method.

[0028] This specification also provides a readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the aforementioned message traffic processing method.

[0029] The technical solutions provided in this specification offer at least the following beneficial effects:

[0030] It dynamically identifies performance bottlenecks and redundancies in processing threads within network devices, enabling intelligent allocation of packet traffic processing tasks among multiple processing units. When an overload is detected in a processing thread, it automatically selects a redundant thread to share the load and flexibly allocates processing tasks based on task relevance, effectively balancing the load, improving overall traffic processing efficiency and system responsiveness, and ensuring stable and reliable network services. It is particularly suitable for dealing with complex and ever-changing network traffic environments. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the drawings used in the description of the embodiments of this specification or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings of the embodiments of this specification.

[0032] Figure 1 This is a flowchart of a message traffic processing method in one embodiment of this specification;

[0033] Figure 2 This is a schematic diagram of the processing unit and processing task relationship in one embodiment of this specification;

[0034] Figure 3 This is a schematic diagram of the phased processing of message traffic in one embodiment of this specification;

[0035] Figure 4 This is a schematic diagram illustrating the performance deficiencies of the analysis stage in one embodiment of this specification;

[0036] Figure 5 yes Figure 4 A schematic diagram illustrating the reconfiguration of processing tasks when the analysis stage in the implementation method is insufficient;

[0037] Figure 6 yes Figure 4 A schematic diagram illustrating the reconfiguration of processing tasks when the analysis stage in the implementation method is insufficient;

[0038] Figure 7 yes Figure 4 A schematic diagram illustrating the reconfiguration of processing tasks when the analysis stage in the implementation method is insufficient;

[0039] Figure 8 yes Figure 4 A schematic diagram illustrating the reconfiguration of processing tasks when the analysis stage in the implementation method is insufficient;

[0040] Figure 9 This is a schematic diagram illustrating the performance deficiencies of the package receiving stage in one embodiment of this specification;

[0041] Figure 10 yes Figure 9 A schematic diagram illustrating the reconfiguration of processing tasks when the performance of the packet receiving stage is insufficient in the implementation method;

[0042] Figure 11 This is a structural diagram of a message traffic processing device according to one embodiment of this specification;

[0043] Figure 12 This is a hardware structure diagram of an electronic device according to one embodiment of this specification.

[0044] Reference numerals: Module 1 21, Module 22, Module 3 23. Detailed Implementation

[0045] The terminology used in the embodiments described herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this specification. The singular forms “a,” “described,” and “the” as used in this specification and claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to any and all possible combinations comprising one or more of the associated listed items.

[0046] It should be understood that although the terms first, second, third, etc., may be used to describe various information in embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" may also be interpreted as "when," "when," or "in response to a determination."

[0047] With the rapid development of internet technology, global network traffic is growing at an unprecedented rate, primarily due to the widespread adoption of smartphones, tablets, and IoT devices, as well as the rapid rise of emerging applications such as video streaming and cloud computing services. These changes have not only caused a dramatic expansion in the scale of network traffic but also placed higher demands on the complexity of network applications and services. To support this series of complex and ever-changing services, network devices must possess more powerful data processing capabilities, especially in data plane processing, requiring the ability to efficiently handle massive amounts of data packets.

[0048] Network Functions Virtualization (NFV) and Software-Defined Networking (SDN) technologies have emerged to address this need. NFV allows traditional network functions, such as firewalls, routers, and load balancers, to be implemented in virtualized form on standard servers, greatly improving the flexibility and scalability of network architecture. However, this requires virtualized network devices to be able to process data packets quickly and efficiently. On the other hand, SDN, by separating the control plane and data plane, endows the network with unprecedented programmability and management convenience, but also places higher demands on the data plane's processing capabilities.

[0049] Meanwhile, the widespread adoption of multi-core processor technology has provided the hardware foundation for improved processing power. However, traditional operating systems and network stack designs have failed to fully utilize these hardware resources. In particular, the network stack design within the operating system kernel, due to its general-purpose nature, struggles to meet the stringent demands of modern network applications for high throughput and low latency. Frequent kernel-to-user mode switching and interrupt-driven packet processing mechanisms further exacerbate processing latency.

[0050] In one technical solution, the Data Plane Development Kit (DPDK) aims to significantly improve the data plane processing performance of network applications by directly accessing hardware resources and employing a series of optimization techniques, such as polling-driven mode, large page memory, lock-free data structures, and CPU affinity. DPDK enables developers to fully exploit the potential of multi-core processors, dramatically increasing packet processing speed and system throughput, making it an ideal solution for meeting the demands of modern networks.

[0051] While DPDK can effectively improve performance through CPU affinity configuration, this approach also has certain limitations. It can lead to resource exclusivity, meaning that once a specific CPU core is bound to a DPDK process, it cannot be shared by other tasks, resulting in uneven resource allocation. Furthermore, configuring affinity requires a deep understanding of the system hardware architecture, increasing deployment and maintenance complexity. In multi-core systems, fixed affinity settings can also cause hotspot issues, where some CPU cores are overloaded while others are underutilized, leading to performance bottlenecks. Additionally, the operating system scheduler may not fully understand or adapt to the user's affinity configuration, affecting scheduling efficiency.

[0052] In summary, while the affinity configuration of DPDK in this technical solution improves network data processing performance to some extent, it still has significant shortcomings in terms of flexibility, resource management, and adapting to dynamic changes in network traffic. This specification aims to provide a new technical solution that can fully utilize the performance advantages of DPDK while dynamically adjusting the processing flow to adapt to real-time changes in network traffic, ensuring the efficiency and stability of overall network analysis and processing.

[0053] The specific technical solution is described below.

[0054] In one embodiment, this specification provides a packet traffic processing method applied to a network device; the network device includes at least two processing units, each of which is bound to a processing thread. The processing unit bound to the processing thread is configured to prioritize responding to the bound processing thread. The processing thread receives packet traffic sent by the previous hop, calls the bound processing unit to process the packet traffic according to a configured processing task, and transfers the processed packet traffic to the next hop. The previous hop is a processing thread configured with different processing tasks or a packet traffic source device, and the next hop is a processing thread configured with different processing tasks or a packet traffic destination device. At least one of the previous hop and the next hop is a... The method includes configuring processing threads with different processing tasks; the method includes: in response to an event that there is a processing thread with insufficient performance of its bound processing unit, confirming that the processing thread is an overloaded thread, and detecting the performance load status of the processing units bound to the processing thread included in the previous hop and / or next hop of the overloaded thread; in response to the detection result that there is a processing thread with redundant performance of its bound processing unit, selecting at least one processing thread as a sharing thread among the detected processing threads with redundant performance of its bound processing unit; parsing the processing tasks of the overloaded thread and the processing tasks of the sharing thread, and configuring some of the processing tasks in the processing tasks of the overloaded thread to be processed by the sharing thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the sharing thread.

[0055] Those skilled in the art will understand through simple substitutions and extensions that, in the embodiments of this specification, a processing thread may actually be composed of or replaced by one or more threads configured with the same processing task that process packet traffic in parallel, without affecting the implementation of the scheme, while the number of bound processing units also increases accordingly.

[0056] In the embodiments of this specification, the connection relationship of the processing tasks of the processing threads can be chain-like or tree-like. For example, in a chain-like connection relationship, the packet traffic processed by the first processing thread is forwarded to the second processing thread for further processing, and so on to the third and fourth processing threads. As another example, in a tree-like connection relationship, the packet traffic processed by one processing thread can be forwarded to one or more of any number of processing threads in the next stage for further processing. The packet traffic to be processed received by one processing thread can also come from packet traffic processed by multiple processing threads.

[0057] Specifically, such as Figure 1 This includes the following steps:

[0058] Step S11: In response to an event that there is a processing thread with insufficient performance of the bound processing unit, confirm that the processing thread is an overloaded thread, and detect the performance load status of the processing unit bound to the processing thread included in the previous hop and / or next hop of the overloaded thread.

[0059] In this step, the network device, which is the execution subject of this embodiment, first responds to a processing thread event caused by insufficient processing unit performance. The system monitors the performance indicators of each processing thread in real time. Once it detects that the performance of a processing thread is lower than a preset threshold, the system will automatically mark it as an overloaded thread. Next, the system will detect the performance load status of the previous hop and the next hop of the overloaded thread. The previous hop may refer to the source device or processing thread that sent the packet traffic to the overloaded thread, while the next hop may be the destination that receives the packet processed by the overloaded thread or the next processing thread.

[0060] For example, when a processing unit in a network traffic analysis process is unable to effectively process the packet traffic allocated to it due to performance limitations, the processing thread bound to that unit is marked as an "overloaded thread." For instance, suppose that processing unit Core 2 in the analysis phase (responsible for cleaning, pre-analysis, and deep analysis) reaches its processing limit due to encountering a large number of highly complex data packets and begins to experience packet loss. At this point, the system detects this situation and confirms that the processing thread is in an overloaded state.

[0061] Subsequently, the system initiates a performance evaluation of the upstream and downstream processing stages of the overloaded thread, including the packet reception stage (such as decoding, filtering, and distribution) of the previous hop and the storage stage of the next hop. By examining the load status of the processing units (such as Core 1 and Core 3) to which the processing threads are bound in these stages, the system can gain a comprehensive understanding of the resource utilization of the entire processing chain. This process ensures that before making adjustment decisions, it can accurately identify which processing units still have performance margins available.

[0062] Step S12: In response to the detection result that there are redundant processing threads in the bound processing units, at least one processing thread is selected as a sharing thread from the detected redundant processing threads in the bound processing units.

[0063] After identifying the overloaded thread, the system will perform a redundancy check. The system will evaluate the performance load status of the processing units bound to all processing threads, identifying those with performance redundancy. The processing units bound to these threads are currently underutilized and therefore have the potential to offload the overloaded thread's workload. The system will select at least one of these redundant processing threads as a load-sharing thread to assist in handling the overloaded thread's tasks.

[0064] After identifying processing units with performance redundancy, the next step for the system is to select at least one processing thread with performance margin as a "distribution thread." For example, if the CPU utilization of a Core 3 is detected to be low, it indicates that the processing thread bound to it is not fully loaded when executing storage tasks. In this case, the system selects that processing thread as a distribution thread, preparing to take over some of the tasks originally handled by the overloaded thread.

[0065] Step S13: Analyze the processing tasks of the overloaded thread and the processing tasks of the shared thread. Based on the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the shared thread, configure some processing tasks in the processing tasks of the overloaded thread to be processed by the shared thread.

[0066] In this step, the system performs an in-depth analysis of the processing tasks of the overloaded thread and the offloading thread. The system analyzes the relationship between their tasks to determine which tasks can be safely transferred to the offloading thread. This may include processing tasks at different stages such as packet decoding, filtering, cleaning, and pre-analysis. Based on the nature of the tasks and processing requirements, the system intelligently configures some tasks from the overloaded thread to be handled by the offloading thread to achieve load balancing.

[0067] The system needs to meticulously analyze the processing tasks of overloaded and offloaded threads, considering their interconnectivity and complementarity in the processing flow. Assume the overload occurs in the deep analysis phase of the analysis stage, while the offloaded threads currently only perform simple storage tasks. Through intelligent algorithm analysis, the system decides to move some pre-analysis tasks before deep analysis from Core 2 to Core 3, thereby reducing the burden on Core 2.

[0068] To achieve this, the system redirects the execution code snippets or data streams of the pre-analysis tasks to Core 3 based on the logical relationships between tasks. For example, rules can be set to automatically transfer the packet preprocessing tasks to Core 3 when Core 2 detects that multiple packets are being dropped due to blockage in the analysis process, until the packet loss rate of Core 2 drops to an acceptable level or is completely eliminated. This dynamic adjustment not only alleviates overload in a timely manner but also ensures the continuity and efficiency of the entire processing flow.

[0069] In one implementation, the network device is configured with multiple processing units, each dedicated to serving one or more specific processing threads. These processing threads are each responsible for different stages of network packet processing, such as receiving (packet acquisition), analysis (decoding, filtering, deep analysis), and storage. The system employs a priority response mechanism to ensure that processing units can quickly respond to their assigned processing threads, thereby fully utilizing the parallel processing capabilities of multi-core CPUs to improve packet processing speed and system throughput.

[0070] In actual operation, the system monitors the performance status of each processing unit in real time. Once a processing unit is found to be underperforming due to excessive processing tasks (for example, an analysis unit reaching its processing limit due to complex traffic analysis), the system immediately identifies the processing thread bound to that processing unit as an "overloaded thread." Subsequently, the system expands the monitoring scope to the previous hop (such as the packet receiving stage) and / or the next hop (such as the storage stage) of the overloaded thread, checking the load of other processing units in these stages, in preparation for subsequent resource reallocation.

[0071] After completing the above checks, if the system identifies performance redundancy (low CPU utilization) in other processing units (e.g., units performing simpler tasks), the system will select at least one processing thread from these units as a "distribution thread" to assist in handling the overloaded task. This selection is based on a comprehensive consideration of the current task load and processing capacity of each processing unit, aiming to ensure optimal resource utilization.

[0072] Finally, the system analyzes the details of the overloaded thread's processing tasks and compares them with those of the distributed threads to identify natural connections in their workflows. Based on this, the system intelligently splits some of the overloaded thread's processing tasks and reassigns them to the distributed threads. For example, if the decoding task in the analysis phase is overloaded, the system may move some decoding tasks forward to an idle processing unit in the packet receiving phase or backward to a processing unit in the storage phase, provided that these processing units are capable of handling the additional tasks without affecting the overall workflow's continuity. In this way, the system effectively balances the load among processing units, improves overall processing efficiency, and reduces packet loss and latency caused by uneven processing capabilities.

[0073] Through the aforementioned dynamic adjustment mechanism, this packet traffic processing method achieves efficient utilization and flexible scheduling of network device processing resources. Especially when facing sudden increases in network traffic or complex changes in traffic composition, it can respond quickly, automatically adjust task allocation, maintain high efficiency in network analysis and processing, thereby improving user experience and reducing operational costs. This method not only overcomes the limitations of traditional static configuration but also demonstrates strong adaptability and scalability in complex network environments.

[0074] In one implementation, the step of parsing the processing tasks of the overloaded thread and the processing tasks of the offloading thread, and configuring a portion of the processing tasks of the overloaded thread to be processed by the offloading thread based on the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, includes: after configuring a portion of the processing tasks of the overloaded thread to be processed by the offloading thread, detecting the performance load status of the processing unit bound to the overloaded thread and the processing unit bound to the offloading thread after the processing tasks are reconfigured and run for a preset time; if the performance load of the processing unit bound to the overloaded thread is greater than a first threshold and the performance load of the processing unit bound to the offloading thread is less than a second threshold, then adding a processing task from the load thread that is reconfigured to be processed by the offloading thread.

[0075] Specifically, after transferring some of the processing tasks from the overloaded thread to the offloading thread, the system will enter a pre-defined monitoring period. During this period, the system will closely monitor two key metrics: the performance load status of the processing unit bound to the overloaded thread, and the performance load status of the processing unit bound to the offloading thread.

[0076] After the preset duration (which those skilled in the art should understand can be arbitrarily set according to actual needs) ends, the system will evaluate the performance load of the two processing units. This involves two key thresholds: the first threshold is used to assess whether the processing unit bound to the overloaded thread is still under a high load; the second threshold is used to assess whether the processing unit bound to the offloaded thread has any remaining processing capacity.

[0077] If the evaluation results show that the performance load of the processing unit bound to the overloaded thread is still higher than the first threshold, this indicates that the overload problem has not been fully resolved through preliminary task transfer alone. Meanwhile, if the performance load of the processing unit bound to the offloaded thread is lower than the second threshold, this means that the offloaded thread still has the capacity to handle more tasks.

[0078] Based on the above evaluation results, the system will decide to increase the amount of processing tasks transferred from overloaded threads to offloaded threads. The purpose of this is to further reduce the burden on overloaded threads and make fuller use of the processing capacity of offloaded threads.

[0079] This progressive implementation method allows for more precise and dynamic adjustment of the workload among processing units and threads within network devices, ensuring the entire network system remains efficient and stable in the face of constantly changing traffic patterns. This approach not only improves the network devices' adaptability to traffic peaks but also optimizes resource allocation and utilization, reducing performance bottlenecks caused by uneven processing capabilities.

[0080] In one embodiment, the network device includes a first processing unit bound to a first processing thread and a second processing unit bound to a second processing thread. The first processing thread receives packet traffic sent by the previous-hop packet traffic source device, processes the packet traffic according to a configured processing task, and then transfers the processed packet traffic to the next-hop second processing thread. The configured processing task for the first processing thread includes first-stage, second-stage, and third-stage tasks for the packet traffic. The second processing thread receives packet traffic sent by the previous-hop first processing thread, processes the packet traffic according to a configured processing task, and then transfers the processed packet traffic to the next-hop packet traffic destination device. The configured processing task for the second processing thread includes first-stage, second-stage, and third-stage tasks for the packet traffic. The processing task includes at least a fourth stage task for packet traffic; the processing tasks of the first processing thread and the second processing thread have a sequential processing relationship of the first stage, the second stage, the third stage, and the fourth stage; the method includes: in response to an event of insufficient performance of the first processing unit, confirming that the first processing thread is an overloaded thread, and detecting the performance load status of the second processing unit; in response to a detection result that the performance of the second processing unit has redundancy, confirming that the second processing thread is a load-sharing thread; parsing and obtaining the sequential processing relationship of the first stage, the second stage, the third stage, and the fourth stage of the processing tasks of the first processing thread and the second processing thread, and at least reconfiguring some of the third stage tasks that were configured to the first processing thread to be processed by the second processing thread.

[0081] In one implementation, the step of parsing and obtaining the sequential processing relationship of the first, second, third, and fourth stages of the processing tasks of the first and second processing threads, and at least reconfiguring some of the third-stage tasks configured to the first processing thread to be processed by the second processing thread, includes: after reconfiguring some of the third-stage tasks configured to the first processing thread to be processed by the second processing thread, detecting the performance load status of the first and second processing units after processing task reconfiguration and running for a preset time; if the performance load of the first processing unit is greater than a first threshold and the performance load of the second processing unit is less than a second threshold, then increasing the proportion of the third-stage tasks reconfigured to be processed by the second processing thread, or reconfiguring all the third-stage tasks to be processed by the second processing thread, or reconfiguring all the third-stage tasks and some of the second-stage tasks to be processed by the second processing thread.

[0082] In one implementation, the first, second, and third stage tasks are decoding, filtering, and distribution tasks, respectively, the fourth stage is a cleaning task, and the processing tasks configured for the second processing thread also include a fifth and a sixth stage task, wherein the fifth and sixth stages are pre-analysis and deep analysis tasks, respectively.

[0083] like Figure 2 Each stage of DPDK requires CPU binding; that is, packet reception, analysis, and storage require different CPUs. For example, the packet reception stage corresponds to DPDK Thread 1 and DPDK Thread 2, which are bound to CPU Core 1 and CPU Core 2 respectively, while the analysis stage corresponds to DPDK Thread 3 and DPDK Thread 4, which are bound to CPU Core 3 and CPU Core 4 respectively. Each stage performs a fixed task. In this implementation, the packet reception stage of network flow analysis includes processes such as decoding, filtering, and distribution; the analysis stage generally includes processes such as cleaning, pre-analysis, and deep analysis. The system's processing bottleneck will change with different network traffic patterns. For example, for traffic with longer packet lengths, the system's processing bottleneck is in the packet reception stage (slow decoding), while for traffic with higher packet speeds, the processing bottleneck is in the analysis stage.

[0084] The packet receiving stage is subdivided into decoding, filtering, and distribution processes; the analysis stage is subdivided into cleaning, pre-analysis, and deep analysis processes. At the packet receiving and distribution stages, statistics on packet loss and processor utilization are analyzed.

[0085] like Figure 3 When both the packet receiving and analysis stages are functioning normally: the analysis stage does not lose packets and proceeds according to the normal workflow.

[0086] like Figure 4 When the packet receiving stage performs normally, but the analysis stage performs poorly: the analysis stage loses packets and the CPU utilization of the analysis stage is too high.

[0087] The packet receiving stage forwards packets to the analysis stage, but the processing thread in the analysis stage discards them, resulting in packet loss. This indicates that the analysis stage is experiencing consumption blockage, and the CPU utilization of each thread in the packet receiving stage is less than 90% (this threshold can be set arbitrarily according to the actual situation, such as 70% or 95%).

[0088] like Figure 5 , Figure 6 , Figure 7 , Figure 8 If the packet loss rate is less than 5% (this threshold can be set arbitrarily according to the actual situation, such as 1% or 10%), then some cleaning tasks are reconfigured to the processing threads of the packet receiving stage, namely DPDK Thread 1 and DPDK Thread 2. For example, cleaning tasks are performed on 50% of the packets in the packet receiving stage, and the packet loss rate is calculated. If packet loss still occurs at this time, cleaning tasks are performed on all packets in the packet receiving stage, and even some pre-analysis tasks are further reassigned until the packet loss in the analysis stage is less than 0.1% (this threshold can be set arbitrarily according to the actual situation, such as 1% or 0.05%) or there is no packet loss.

[0089] like Figure 9 , Figure 10 If the analysis phase repeatedly retrieves zero packets, and the packet receiving phase has excessively high CPU utilization, it indicates that the packet receiving phase's performance is lower than that of the analysis phase. If the CPU utilization of each thread in the analysis phase is less than 90% (this threshold can be set arbitrarily according to actual conditions, such as 70% or 95%), the packet distribution process in the receiving phase is postponed to the analysis phase or postponed according to a certain proportion until the performance is satisfactory. After the performance is satisfactory, if packet loss occurs in the analysis phase for a period of time, the approach for handling insufficient analysis phase performance is reverted to real-time dynamic adaptive processing, forming a closed loop.

[0090] Within the DPDK network processing framework, each processing stage needs to be bound to an independent CPU core to optimize performance. Specific configurations include: the packet reception stage is bound to DPDK Thread 1 with CPU Core 1, and DPDK Thread 2 with CPU Core 2; the analysis stage is handled by DPDK Thread 3 with CPU Core 3, and DPDK Thread 4 with CPU Core 4. These bindings ensure that critical operations such as packet reception, analysis, and storage are executed efficiently on dedicated resources. The packet reception process is subdivided into steps such as decoding, filtering, and distribution, while the analysis process includes subdivided processes such as cleaning, pre-analysis, and deep analysis. Different characteristics of network traffic, such as packet length and packet rate, directly affect the location of processing bottlenecks. For example, decoding becomes a limiting factor in long packet scenarios, while the analysis stage becomes the bottleneck at high packet rates.

[0091] To improve system flexibility and efficiency, the packet reception and analysis stages have been further refined. Simultaneously, packet loss and CPU utilization in the analysis stage are monitored during the packet reception and distribution phases. Under normal operating conditions, if both packet reception and analysis stages perform well with no packet loss, the regular process continues. However, if packet loss and high CPU utilization occur in the analysis stage due to insufficient performance, it indicates that the processing capacity of that stage has reached its limit. At this point, if the CPU utilization of the threads in the packet reception stage is low, it indicates that processing capacity is not being fully utilized, and the system will adopt a dynamic adjustment strategy.

[0092] To address performance bottlenecks in the analysis phase, the first step is to assess the packet loss rate. If the packet loss rate is below a preset threshold (e.g., 5%), the system will add cleaning tasks to the packets receiving threads (such as DPDK Thread 1 and DPDK Thread 2) to preprocess some packets. If packet loss persists, the proportion of cleaning tasks will be further increased, and pre-analysis tasks may be added, until the packet loss rate in the analysis phase drops to an extremely low level (e.g., 0.1%) or disappears.

[0093] Conversely, if the packet analysis stage waits for packets while the packet reception stage has high CPU utilization, it indicates that the packet reception stage has become the bottleneck. If the CPU utilization of the analysis stage threads falls below a preset threshold (e.g., 90%), the system will adjust the packet reception process, moving some distribution tasks to the analysis stage, or adjusting proportionally, until the performance of the two stages is matched. This dynamic adjustment mechanism ensures that even after the analysis stage's performance recovers, if packet loss occurs again, the system can immediately revert to the underperforming processing logic, forming a self-adjusting closed loop to adapt to real-time changes in network traffic, effectively reducing packet loss and improving overall processing efficiency.

[0094] In one embodiment, the network device includes a first processing unit bound to a first processing thread, a second processing unit bound to a second processing thread, and a third processing unit bound to a third processing thread. The first processing thread receives packet traffic sent by the previous-hop packet traffic source device, processes the packet traffic according to a configured processing task, and transfers the processed packet traffic to the next-hop second processing thread. The configured processing task for the first processing thread includes at least a first-stage task for the packet traffic. The second processing thread receives packet traffic sent by the previous-hop first processing thread, processes the packet traffic according to a configured processing task, and transfers the processed packet traffic to the next-hop third processing thread. The configured processing task for the second processing thread includes at least a second-stage, third-stage, and fourth-stage task for the packet traffic. The third processing thread receives packet traffic sent by the previous-hop second processing thread, processes the packet traffic according to a configured processing task, and transfers the processed packet traffic to the next-hop third processing thread. The processing task calls a third processing thread to process the packet traffic, and the processed packet traffic is transferred to the next-hop packet traffic destination device. The processing task configured for the third processing thread includes at least a fifth stage of packet traffic processing. The processing tasks of the first processing thread and the second processing thread have a sequential processing relationship of the first stage, second stage, third stage, fourth stage, and fifth stage. The method includes: in response to an event of insufficient performance of the second processing unit, confirming that the second processing thread is an overloaded thread, and detecting the performance load status of the first processing unit and the third processing unit; in response to the detection result that the performance of the first processing unit and the third processing unit has redundancy, confirming that the first processing thread and / or the third processing thread is a sharing thread; parsing the processing tasks of the overloaded thread and the processing tasks of the sharing thread, and configuring some of the processing tasks of the overloaded thread to be processed by the sharing thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the sharing thread.

[0095] In one implementation, the step of parsing the processing tasks of the overloaded thread and the processing tasks of the offloading thread, and configuring a portion of the processing tasks of the overloaded thread to be processed by the offloading thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, includes: based on the confirmation result that the first processing thread and the third processing thread are offloading threads, parsing and obtaining the sequential processing connection relationship of the first, second, third, fourth, and fifth stages of the processing tasks of the first, second, and third processing threads, at least reconfiguring a portion of the second-stage tasks configured to the second processing thread to be processed by the first processing thread, and at least reconfiguring a portion of the fourth-stage tasks configured to the second processing thread to be processed by the third processing thread.

[0096] The system first identifies the second processing unit as an overloaded thread due to processing capacity saturation. Subsequently, the system initiates a performance evaluation of the first and third processing units to explore whether there is any excess processing capacity. When performance redundancy is confirmed in the first or third processing unit, these units are designated as offloading threads to prepare for relieving the pressure on the second processing unit.

[0097] The system analyzes the stage sequence and logical relationships of tasks among the first, second, and third processing threads to ensure that task reassignment does not disrupt the original processing flow. Based on this analysis, the system implements refined adjustments: some second-stage tasks from the second processing thread are reconfigured for execution in the first processing thread, while some fourth-stage tasks from the second processing thread are transferred to the third processing thread. This task reconfiguration strategy fully utilizes the processing capabilities of the first and third processing units while maintaining the continuity and efficiency of the message processing flow.

[0098] In one implementation, the step of parsing the processing tasks of the overloaded thread and the processing tasks of the offloading thread, and configuring a portion of the processing tasks of the overloaded thread to be processed by the offloading thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, includes: based on the confirmation result that the first processing unit is an offloading thread, parsing and obtaining the sequential processing connection relationship of the first processing thread and the second processing thread's processing tasks in the first, second, third, and fourth stages, and at least reconfiguring a portion of the second-stage tasks configured to the second processing thread to be processed by the first processing thread.

[0099] In one implementation, the step of parsing the processing tasks of the overloaded thread and the processing tasks of the offloading thread, and configuring some processing tasks in the processing tasks of the overloaded thread to be processed by the offloading thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, includes: based on the confirmation result that the third processing thread is the offloading thread, parsing and obtaining the connection relationship of the second processing thread and the third processing thread in the order of processing of the second processing thread, the third processing thread, the fourth processing thread, and the fifth processing, and at least reconfiguring some of the fourth-stage tasks that were configured to the second processing thread to be processed by the third processing thread.

[0100] In one implementation, such as Figure 11 This specification also provides a packet traffic processing device applied to network devices. The network device includes at least two processing units, each bound to a processing thread. The processing unit bound to a processing thread is configured to prioritize responding to the bound processing thread. The processing thread receives packet traffic sent from the previous hop, processes the packet traffic by calling the bound processing unit according to a configured processing task, and forwards the processed packet traffic to the next hop. The previous hop is either a processing thread configured with different processing tasks or a packet traffic source device, and the next hop is either a processing thread configured with different processing tasks or a packet traffic destination device. At least one of the previous hop and the next hop is a processing thread configured with different processing tasks. The apparatus includes: a first module, configured to, in response to an event indicating that a bound processing thread has insufficient performance, confirm that the processing thread is an overloaded thread and detect the performance load status of the processing units bound to the processing thread in the previous and / or next hop of the overloaded thread; a second module, configured to, in response to a detection result indicating that a bound processing thread has redundant performance, select at least one processing thread as a load-sharing thread among the detected bound processing threads with redundant performance; and a third module, configured to parse the processing tasks of the overloaded thread and the processing tasks of the load-sharing thread, and, based on the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the load-sharing thread, configure a portion of the processing tasks of the overloaded thread to be processed by the load-sharing thread.

[0101] In one implementation, the step of parsing the processing tasks of the overloaded thread and the processing tasks of the offloading thread, and configuring a portion of the processing tasks of the overloaded thread to be processed by the offloading thread based on the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, includes: after configuring a portion of the processing tasks of the overloaded thread to be processed by the offloading thread, detecting the performance load status of the processing unit bound to the overloaded thread and the processing unit bound to the offloading thread after the processing tasks are reconfigured and run for a preset time; if the performance load of the processing unit bound to the overloaded thread is greater than a first threshold and the performance load of the processing unit bound to the offloading thread is less than a second threshold, then adding a processing task from the load thread that is reconfigured to be processed by the offloading thread.

[0102] In one embodiment, the network device includes a first processing unit bound to a first processing thread and a second processing unit bound to a second processing thread. The first processing thread receives packet traffic sent by the previous-hop packet traffic source device, processes the packet traffic according to a configured processing task, and then transfers the processed packet traffic to the next-hop second processing thread. The configured processing task for the first processing thread includes first-stage, second-stage, and third-stage tasks for the packet traffic. The second processing thread receives packet traffic sent by the previous-hop first processing thread, processes the packet traffic according to a configured processing task, and then transfers the processed packet traffic to the next-hop packet traffic destination device. The configured processing task for the second processing thread includes at least processing the packet traffic. The fourth stage of traffic processing tasks; the processing tasks of the first processing thread and the second processing thread have a sequential processing relationship of the first stage, the second stage, the third stage, and the fourth stage; the first module is used to respond to the event of insufficient performance of the first processing unit, confirm that the first processing thread is an overloaded thread, and detect the performance load status of the second processing unit; the second module is used to respond to the detection result of redundancy in the performance of the second processing unit, confirm that the second processing thread is a load-sharing thread; the third module is used to parse and obtain the sequential processing relationship of the first processing thread and the second processing thread's processing tasks of the first processing thread and the second processing thread, and at least reconfigure some of the third stage tasks configured to the first processing thread to be processed by the second processing thread.

[0103] In one implementation, the step of parsing and obtaining the sequential processing relationship of the first, second, third, and fourth stages of the processing tasks of the first and second processing threads, and at least reconfiguring some of the third-stage tasks configured to the first processing thread to be processed by the second processing thread, includes: after reconfiguring some of the third-stage tasks configured to the first processing thread to be processed by the second processing thread, detecting the performance load status of the first and second processing units after processing task reconfiguration and running for a preset time; if the performance load of the first processing unit is greater than a first threshold and the performance load of the second processing unit is less than a second threshold, then increasing the proportion of the third-stage tasks reconfigured to be processed by the second processing thread, or reconfiguring all the third-stage tasks to be processed by the second processing thread, or reconfiguring all the third-stage tasks and some of the second-stage tasks to be processed by the second processing thread.

[0104] In one implementation, the first, second, and third stage tasks are decoding, filtering, and distribution tasks, respectively, the fourth stage is a cleaning task, and the processing tasks configured for the second processing thread also include a fifth and a sixth stage task, wherein the fifth and sixth stages are pre-analysis and deep analysis tasks, respectively.

[0105] In one embodiment, the network device includes a first processing unit bound to a first processing thread, a second processing unit bound to a second processing thread, and a third processing unit bound to a third processing thread. The first processing thread receives packet traffic sent by the previous-hop packet traffic source device, processes the packet traffic according to a configured processing task, and then transfers the processed packet traffic to the next-hop second processing thread. The configured processing task for the first processing thread includes at least a first-stage task for the packet traffic. The second processing thread receives packet traffic sent by the previous-hop first processing thread, processes the packet traffic according to a configured processing task, and then transfers the processed packet traffic to the next-hop third processing thread. The configured processing task for the second processing thread includes at least a second-stage, third-stage, and fourth-stage task for the packet traffic. The third processing thread receives packet traffic sent by the previous-hop second processing thread, processes the packet traffic according to a configured processing task, and then transfers the processed packet traffic to the next-hop third processing thread. The process handles packet traffic and forwards the processed packet traffic to the next-hop destination device. The processing task configured for the third processing thread includes at least a fifth stage of packet traffic processing. The processing tasks of the first and second processing threads have a sequential processing relationship of first, second, third, fourth, and fifth stages. The first module is used to confirm that the second processing thread is an overloaded thread in response to an event of insufficient performance of the second processing unit, and to detect the performance load status of the first and third processing units. The second module is used to confirm that the first processing thread and / or the third processing thread is a load-sharing thread in response to a detection result that the performance of the first and third processing units has redundancy. The third module is used to parse the processing tasks of the overloaded thread and the processing tasks of the load-sharing thread, and configure some of the processing tasks of the overloaded thread to be processed by the load-sharing thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the load-sharing thread.

[0106] In one implementation, the step of parsing the processing tasks of the overloaded thread and the processing tasks of the offloading thread, and configuring a portion of the processing tasks of the overloaded thread to be processed by the offloading thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, includes: based on the confirmation result that the first processing thread and the third processing thread are offloading threads, parsing and obtaining the sequential processing connection relationship of the first, second, third, fourth, and fifth stages of the processing tasks of the first, second, and third processing threads, at least reconfiguring a portion of the second-stage tasks configured to the second processing thread to be processed by the first processing thread, and at least reconfiguring a portion of the fourth-stage tasks configured to the second processing thread to be processed by the third processing thread.

[0107] In one implementation, the step of parsing the processing tasks of the overloaded thread and the processing tasks of the offloading thread, and configuring a portion of the processing tasks of the overloaded thread to be processed by the offloading thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, includes: based on the confirmation result that the first processing unit is an offloading thread, parsing and obtaining the sequential processing connection relationship of the first processing thread and the second processing thread's processing tasks in the first, second, third, and fourth stages, and at least reconfiguring a portion of the second-stage tasks configured to the second processing thread to be processed by the first processing thread.

[0108] In one implementation, the step of parsing the processing tasks of the overloaded thread and the processing tasks of the offloading thread, and configuring some processing tasks in the processing tasks of the overloaded thread to be processed by the offloading thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, includes: based on the confirmation result that the third processing thread is the offloading thread, parsing and obtaining the connection relationship of the second processing thread and the third processing thread in the order of processing of the second processing thread, the third processing thread, the fourth processing thread, and the fifth processing, and at least reconfiguring some of the fourth-stage tasks that were configured to the second processing thread to be processed by the third processing thread.

[0109] The implementation methods of the apparatus are the same as or similar to the corresponding implementation methods, and will not be described again here.

[0110] In one embodiment, this specification provides an electronic device including a processor and a readable storage medium storing machine-executable instructions executable by the processor. The processor executes the machine-executable instructions to implement the aforementioned packet traffic processing method. From a hardware perspective, a hardware architecture diagram can be found... Figure 12 As shown.

[0111] In one embodiment, this specification provides a readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the aforementioned message traffic processing method.

[0112] Here, a readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, a readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.

[0113] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.

[0114] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.

[0115] Those skilled in the art will understand that embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification can take the form of a completely hardware implementation, a completely software implementation, or an implementation combining software and hardware aspects. Furthermore, embodiments of this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0116] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments thereof. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0117] Furthermore, these computer program instructions can also be stored in a computer-readable storage medium capable of directing a computer or other programmable data processing device to perform tasks in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in the process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0118] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0119] Those skilled in the art will understand that embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification can take the form of a completely hardware implementation, a completely software implementation, or an implementation combining software and hardware aspects. Furthermore, this specification can take the form of a computer program product implemented on one or more computer-usable storage media (which may include, but are not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0120] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.

Claims

1. A message traffic processing method, characterized in that, Applied to network devices; The network device includes at least two processing units, each of which is bound to a processing thread. The processing unit bound to the processing thread is configured to respond to the bound processing thread first. The processing thread receives the packet traffic sent by the previous hop, calls the bound processing unit to process the packet traffic according to the configured processing task, and transfers the packet traffic that has been processed according to the configured processing task to the next hop. The previous hop is a processing thread or packet traffic source device configured with different processing tasks, and the next hop is a processing thread or packet traffic destination device configured with different processing tasks. At least one of the previous hop and the next hop is a processing thread configured with different processing tasks. The method includes: In response to an event that a processing thread with insufficient performance of a bound processing unit is present, the processing thread is identified as an overloaded thread, and the performance load status of the processing units bound to the processing thread included in the previous and / or next hop of the overloaded thread is detected. In response to the detection result of redundant processing threads in the bound processing unit, at least one processing thread is selected as the sharing thread from the detected redundant processing threads in the bound processing unit. The processing tasks of the overloaded thread and the processing tasks of the offloading thread are analyzed. Based on the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, some processing tasks in the processing tasks of the overloaded thread are configured to be processed by the offloading thread.

2. The method according to claim 1, characterized in that, The process involves analyzing the processing tasks of the overloaded thread and the processing tasks of the offloading thread. Based on the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, some processing tasks in the processing tasks of the overloaded thread are configured to be processed by the offloading thread, including: After configuring some processing tasks in the overloaded thread to be handled by the offloading thread, the performance load status of the processing units bound to the overloaded thread and the processing units bound to the offloading thread is detected after the processing tasks are reconfigured and run for a preset time. If the performance load of the processing unit bound to the overloaded thread is greater than the first threshold and the performance load of the processing unit bound to the offloading thread is less than the second threshold, then a processing task is added from the overloaded thread that is reconfigured to be handled by the offloading thread.

3. The method according to claim 1, characterized in that, The network device includes a first processing unit bound to a first processing thread and a second processing unit bound to a second processing thread; The first processing thread receives the packet traffic sent by the packet traffic source device of the previous hop, calls the first processing thread to process the packet traffic according to the configured processing task, and transfers the processed packet traffic to the next hop second processing thread. The processing tasks configured for the first processing thread include the first stage, second stage, and third stage tasks for the packet traffic. The second processing thread receives the packet traffic sent by the first processing thread of the previous hop, calls the second processing thread to process the packet traffic according to the configured processing task, and transfers the processed packet traffic to the next hop packet traffic destination device. The processing task configured for the second processing thread includes at least the fourth stage task for the packet traffic. The processing tasks of the first processing thread and the second processing thread have a sequential processing relationship of first stage, second stage, third stage and fourth stage; The method includes: In response to an event of insufficient performance of the first processing unit, the first processing thread is confirmed to be an overloaded thread, and the performance load status of the second processing unit is detected. In response to the redundant detection results of the second processing unit's performance, the second processing thread is confirmed to be a sharing thread; The sequential processing relationship of the first, second, third, and fourth stages of the processing tasks of the first and second processing threads is obtained by parsing, and at least some of the third-stage tasks that were configured to be processed by the first processing thread are reconfigured to be processed by the second processing thread.

4. The method according to claim 3, characterized in that, The process of parsing and obtaining the sequential processing relationship of the first, second, third, and fourth stages of the processing tasks of the first and second processing threads, at least partially reconfiguring the third-stage tasks originally assigned to the first processing thread to be processed by the second processing thread, includes: After the reconfiguration of some of the third-stage tasks that were configured to be assigned to the first processing thread to the second processing thread, the performance load status of the first processing unit and the second processing unit after processing the task reconfiguration and running for a preset time is detected. If the performance load of the first processing unit is greater than the first threshold and the performance load of the second processing unit is less than the second threshold, then the proportion of the third-stage tasks reconfigured to be processed by the second processing thread is increased, or all the third-stage tasks are reconfigured to be processed by the second processing thread, or all the third-stage tasks and some of the second-stage tasks are reconfigured to be processed by the second processing thread.

5. The method according to claim 3, characterized in that, The first, second, and third stage tasks are decoding, filtering, and distribution tasks, respectively. The fourth stage is a cleaning task. The processing tasks configured for the second processing thread also include a fifth and a sixth stage task, which are pre-analysis and deep analysis tasks, respectively.

6. The method according to claim 1, characterized in that, The network device includes a first processing unit bound to a first processing thread, a second processing unit bound to a second processing thread, and a third processing unit bound to a third processing thread. The first processing thread receives the packet traffic sent by the packet traffic source device of the previous hop, calls the first processing thread to process the packet traffic according to the configured processing task, and transfers the processed packet traffic to the next hop second processing thread. The processing task configured for the first processing thread includes at least the first stage task of the packet traffic. The second processing thread receives the packet traffic sent by the first processing thread of the previous hop, calls the second processing thread to process the packet traffic according to the configured processing task, and transfers the processed packet traffic to the third processing thread of the next hop. The processing task configured for the second processing thread includes at least the second stage, third stage and fourth stage tasks of the packet traffic. The third processing thread receives the packet traffic sent by the previous hop second processing thread, calls the third processing thread to process the packet traffic according to the configured processing task, and transfers the processed packet traffic to the next hop packet traffic destination device. The processing task configured for the third processing thread includes at least the fifth stage of the packet traffic. The processing tasks of the first processing thread and the second processing thread have a sequential processing relationship of first stage, second stage, third stage, fourth stage and fifth stage; The method includes: In response to an event of insufficient performance of the second processing unit, the second processing thread is confirmed to be an overloaded thread, and the performance load status of the first and third processing units is detected. In response to the detection results indicating that the performance of the first processing unit and the third processing unit is redundant, the first processing thread and / or the third processing thread are confirmed as sharing threads. The processing tasks of the overloaded thread and the processing tasks of the offloading thread are analyzed. Based on the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, some processing tasks in the processing tasks of the overloaded thread are configured to be processed by the offloading thread.

7. The method according to claim 6, characterized in that, The process involves analyzing the processing tasks of the overloaded thread and the processing tasks of the offloading thread. Based on the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, some processing tasks in the processing tasks of the overloaded thread are configured to be processed by the offloading thread, including: Based on the confirmation results that the first processing thread and the third processing thread are shared threads, the sequential processing relationship of the first, second, third, fourth and fifth stages of the processing tasks of the first processing thread, the second processing thread and the third processing thread is parsed and obtained. At least part of the second stage tasks that were configured to the second processing thread are reconfigured to be processed by the first processing thread, and at least part of the fourth stage tasks that were configured to the second processing thread are reconfigured to be processed by the third processing thread.

8. The method according to claim 6, characterized in that, The process involves analyzing the processing tasks of the overloaded thread and the processing tasks of the offloading thread. Based on the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, some processing tasks in the processing tasks of the overloaded thread are configured to be processed by the offloading thread, including: Based on the confirmation result that the first processing thread is the sharing thread, the sequential processing relationship of the first, second, third and fourth stages of the tasks processed by the first and second processing threads is obtained by parsing, and at least some of the second-stage tasks that were configured to the second processing thread are reconfigured to be processed by the first processing thread.

9. The method according to claim 6, characterized in that, The process involves analyzing the processing tasks of the overloaded thread and the processing tasks of the offloading thread. Based on the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, some processing tasks in the processing tasks of the overloaded thread are configured to be processed by the offloading thread, including: Based on the confirmation result that the third processing thread is the sharing thread, the sequential processing relationship of the second, third, fourth and fifth stages of the processing tasks of the second and third processing threads is parsed and obtained. At least some of the fourth stage tasks that were configured to the second processing thread are reconfigured to be processed by the third processing thread.

10. A message traffic processing device, characterized in that, Applied to network devices; The network device includes at least two processing units, each of which is bound to a processing thread. The processing unit bound to the processing thread is configured to respond to the bound processing thread first. The processing thread receives the packet traffic sent by the previous hop, calls the bound processing unit to process the packet traffic according to the configured processing task, and transfers the packet traffic that has been processed according to the configured processing task to the next hop. The previous hop is a processing thread or packet traffic source device configured with different processing tasks, and the next hop is a processing thread or packet traffic destination device configured with different processing tasks. At least one of the previous hop and the next hop is a processing thread configured with different processing tasks. The device includes: The first module is used to respond to an event that there is a processing thread with insufficient performance of the bound processing unit, confirm that the processing thread is an overloaded thread, and detect the performance load status of the processing unit bound to the processing thread in the previous hop and / or next hop of the overloaded thread. The second module is used to select at least one processing thread as a sharing thread in response to the detection result of the existence of redundant processing threads in the bound processing units. The third module is used to parse the processing tasks of the overloaded thread and the processing tasks of the offloading thread, and configure some of the processing tasks of the overloaded thread to be processed by the offloading thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread.

11. The apparatus according to claim 10, characterized in that, The process involves analyzing the processing tasks of the overloaded thread and the processing tasks of the offloading thread. Based on the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, some processing tasks in the processing tasks of the overloaded thread are configured to be processed by the offloading thread, including: After configuring some processing tasks in the overloaded thread to be handled by the offloading thread, the performance load status of the processing units bound to the overloaded thread and the processing units bound to the offloading thread is detected after the processing tasks are reconfigured and run for a preset time. If the performance load of the processing unit bound to the overloaded thread is greater than the first threshold and the performance load of the processing unit bound to the offloading thread is less than the second threshold, then a processing task is added from the overloaded thread that is reconfigured to be handled by the offloading thread.

12. The apparatus according to claim 10, characterized in that, The network device includes a first processing unit bound to a first processing thread and a second processing unit bound to a second processing thread; The first processing thread receives the packet traffic sent by the packet traffic source device of the previous hop, calls the first processing thread to process the packet traffic according to the configured processing task, and transfers the processed packet traffic to the next hop second processing thread. The processing tasks configured for the first processing thread include the first stage, second stage, and third stage tasks for the packet traffic. The second processing thread receives the packet traffic sent by the first processing thread of the previous hop, calls the second processing thread to process the packet traffic according to the configured processing task, and transfers the processed packet traffic to the next hop packet traffic destination device. The processing task configured for the second processing thread includes at least the fourth stage task for the packet traffic. The processing tasks of the first processing thread and the second processing thread have a sequential processing relationship of first stage, second stage, third stage and fourth stage; The first module is used to respond to an event of insufficient performance of the first processing unit, confirm that the first processing thread is an overloaded thread, and detect the performance load status of the second processing unit. The second module is used to confirm that the second processing thread is a load-sharing thread in response to the detection result that the performance of the second processing unit is redundant; The third module is used to parse and obtain the sequential processing relationship of the first, second, third and fourth stages of the processing tasks of the first processing thread and the second processing thread, and at least reconfigure some of the third stage tasks that were configured to the first processing thread to be processed by the second processing thread.

13. The apparatus according to claim 12, characterized in that, The process of parsing and obtaining the sequential processing relationship of the first, second, third, and fourth stages of the processing tasks of the first and second processing threads, at least partially reconfiguring the third-stage tasks originally assigned to the first processing thread to be processed by the second processing thread, includes: After the reconfiguration of some of the third-stage tasks that were configured to be assigned to the first processing thread to the second processing thread, the performance load status of the first processing unit and the second processing unit after processing the task reconfiguration and running for a preset time is detected. If the performance load of the first processing unit is greater than the first threshold and the performance load of the second processing unit is less than the second threshold, then the proportion of the third-stage tasks reconfigured to be processed by the second processing thread is increased, or all the third-stage tasks are reconfigured to be processed by the second processing thread, or all the third-stage tasks and some of the second-stage tasks are reconfigured to be processed by the second processing thread.

14. The apparatus according to claim 12, characterized in that, The first, second, and third stage tasks are decoding, filtering, and distribution tasks, respectively. The fourth stage is a cleaning task. The processing tasks configured for the second processing thread also include a fifth and a sixth stage task, which are pre-analysis and deep analysis tasks, respectively.

15. The apparatus according to claim 10, characterized in that, The network device includes a first processing unit bound to a first processing thread, a second processing unit bound to a second processing thread, and a third processing unit bound to a third processing thread. The first processing thread receives the packet traffic sent by the packet traffic source device of the previous hop, calls the first processing thread to process the packet traffic according to the configured processing task, and transfers the processed packet traffic to the next hop second processing thread. The processing task configured for the first processing thread includes at least the first stage task of the packet traffic. The second processing thread receives the packet traffic sent by the first processing thread of the previous hop, calls the second processing thread to process the packet traffic according to the configured processing task, and transfers the processed packet traffic to the third processing thread of the next hop. The processing task configured for the second processing thread includes at least the second stage, third stage and fourth stage tasks of the packet traffic. The third processing thread receives the packet traffic sent by the previous hop second processing thread, calls the third processing thread to process the packet traffic according to the configured processing task, and transfers the processed packet traffic to the next hop packet traffic destination device. The processing task configured for the third processing thread includes at least the fifth stage of the packet traffic. The processing tasks of the first processing thread and the second processing thread have a sequential processing relationship of first stage, second stage, third stage, fourth stage and fifth stage; The first module is used to respond to an event of insufficient performance of the second processing unit, confirm that the second processing thread is an overloaded thread, and detect the performance load status of the first processing unit and the third processing unit. The second module is used to confirm that the first processing thread and / or the third processing thread are load-sharing threads in response to the detection result that the performance of the first processing unit and the third processing unit is redundant. The third module is used to parse the processing tasks of the overloaded thread and the processing tasks of the offloading thread, and configure some of the processing tasks of the overloaded thread to be processed by the offloading thread according to the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread.

16. The apparatus according to claim 15, characterized in that, The process involves analyzing the processing tasks of the overloaded thread and the processing tasks of the offloading thread. Based on the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, some processing tasks in the processing tasks of the overloaded thread are configured to be processed by the offloading thread, including: Based on the confirmation results that the first processing thread and the third processing thread are shared threads, the sequential processing relationship of the first, second, third, fourth and fifth stages of the processing tasks of the first processing thread, the second processing thread and the third processing thread is parsed and obtained. At least some of the second stage tasks that were configured to the second processing thread are reconfigured to be processed by the first processing thread, and at least some of the fourth stage tasks that were configured to the second processing thread are reconfigured to be processed by the third processing thread.

17. The apparatus according to claim 15, characterized in that, The process involves analyzing the processing tasks of the overloaded thread and the processing tasks of the offloading thread. Based on the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, some processing tasks in the processing tasks of the overloaded thread are configured to be processed by the offloading thread, including: Based on the confirmation result that the first processing thread is the sharing thread, the sequential processing relationship of the first, second, third and fourth stages of the tasks processed by the first and second processing threads is obtained by parsing, and at least some of the second-stage tasks that were configured to the second processing thread are reconfigured to be processed by the first processing thread.

18. The apparatus according to claim 15, characterized in that, The process involves analyzing the processing tasks of the overloaded thread and the processing tasks of the offloading thread. Based on the connection relationship between the processing tasks of the overloaded thread and the processing tasks of the offloading thread, some processing tasks in the processing tasks of the overloaded thread are configured to be processed by the offloading thread, including: Based on the confirmation result that the third processing thread is the sharing thread, the sequential processing relationship of the second, third, fourth and fifth stages of the processing tasks of the second and third processing threads is parsed and obtained. At least some of the fourth stage tasks that were configured to the second processing thread are reconfigured to be processed by the third processing thread.

19. An electronic device, characterized in that, include: A processor and a readable storage medium storing machine-executable instructions that can be executed by the processor to implement the method of any one of claims 1-9.

20. A readable storage medium, characterized in that, The readable storage medium stores machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the method of any one of claims 1-9.

Citation Information

Patent Citations

  • ARP aging thread management method and device and electronic equipment

    CN112835720A

  • Message shunting method and device and electronic equipment

    CN113992589A