Message processing methods, control equipment and media

By configuring independent queue buffer resources for packets of different priorities at the network interface card (NIC) hardware level, the problems of increased packet loss rate and processing delay caused by sudden surges in traffic during packet processing are solved, achieving efficient packet processing and deterministic control.

CN123123285APending Publication Date: 2026-11-17SUNGROW POWER SUPPLY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611416537.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In the event of a sudden surge in traffic, packets will continuously flood the network card queue and fill the receive buffer, causing packet processing timeouts or loss, which in turn leads to an increase in packet loss rate and processing latency.

Method used

By obtaining the priority information in the packet, the packet is distributed to the network card hardware queue with independent queue buffer resources according to the mapping relationship, thereby realizing the isolation of the receive buffer between packets of different priorities and ensuring that high-priority packets are not affected by low-priority traffic fluctuations.

Benefits of technology

It reduces the overall packet loss rate, shortens the queuing delay of packets at the network card, and ensures the deterministic execution of critical control logic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123123285A_ABST
    Figure CN123123285A_ABST
Patent Text Reader

Abstract

This invention provides a packet processing method, control device, and medium. The method specifically includes: acquiring a packet; the packet including a field indicating priority information; determining a target network interface card (NIC) hardware queue corresponding to the packet based on the mapping relationship between the packet's priority information and NIC hardware queues; and distributing the packet to the target NIC hardware queue; wherein different NIC hardware queues have different queue buffer resources. This invention can reduce the overall packet loss rate and shorten the packet queuing delay at the NIC.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of communication technology, and in particular to a message processing method, control device and medium. Background Technology

[0002] A message is a data unit exchanged and transmitted in a network. It carries critical information such as control commands, status monitoring, and fault alarms, and is widely used in industries such as power and industrial automation. For example, in the power industry, energy storage systems receive frequency regulation messages from the energy management system and respond to changes in the grid frequency based on these messages.

[0003] In related technologies, energy storage systems receive mixed traffic packets through a network interface card (NIC) queue. These mixed traffic packets enter the NIC's receive buffer after passing through the NIC queue and share the buffer. Mixed traffic packets typically include multiple types of packets, such as frequency modulation packets, fault protection packets, log packets, and periodic monitoring packets.

[0004] However, in the event of a sudden surge in traffic, packets will continuously flood the network card queue and fill the network card's receive buffer, causing packet processing to time out or be lost, which in turn leads to an increase in packet loss rate and processing delay. Summary of the Invention

[0005] This disclosure provides a message processing method, control device, and medium that can reduce the overall packet loss rate and shorten the queuing delay of messages at the network interface card.

[0006] Firstly, this disclosure discloses a message processing method, the method comprising: Obtain a message; the message includes a field for indicating priority information; Based on the mapping relationship between the priority information of the message and the network interface card (NIC) hardware queue, the target NIC hardware queue corresponding to the message is determined; The message is distributed to the target network interface card (NIC) hardware queue; wherein different NIC hardware queues have different queue buffer resources.

[0007] Secondly, this disclosure discloses a control device, which includes: a network interface card and a physical processor; The network interface card (NIC) includes: multiple NIC hardware queues; The processor includes: multiple processor cores; At least some of the network interface card hardware queues generate receive interrupts that correspond one-to-one with the processor cores; The receive interrupt is sent to the corresponding target processor core to trigger the target processor to process the packets in the corresponding network card hardware queue.

[0008] Thirdly, this disclosure discloses a non-transitory computer-readable storage medium storing instructions that cause a processor to perform the aforementioned method.

[0009] Fourthly, this disclosure provides a computer program product, characterized in that the computer program product includes a computer program stored in a computer-readable storage medium, and a processor of an electronic device reads from and executes the computer program from the computer-readable storage medium, causing the electronic device to perform the aforementioned method.

[0010] This disclosure maps packets of different priorities to network interface card (NIC) hardware queues with independent queue buffer resources, achieving receive buffer isolation between packets of different priorities at the hardware level. Thus, when there is a sudden surge in traffic for a packet of a certain priority, because the queue buffer resources of different NIC hardware queues are independent, the packet of that priority can only occupy the queue buffer resources of its own NIC hardware queue and cannot occupy the queue buffer resources of the NIC hardware queues corresponding to other priorities. Therefore, even if the queue buffer resources corresponding to that priority packet are exhausted, the impact is limited to packets within its own NIC hardware queue, and will not cause other priority packets to experience processing timeouts or loss due to insufficient buffering. Therefore, the embodiments of this invention can reduce the overall packet loss rate and shorten the queuing delay of packets at the NIC.

[0011] Furthermore, because this disclosure configures independent queue buffer resources for packets of different priorities at the network interface card (NIC) hardware level, a sudden surge in low-priority packet traffic cannot occupy the hardware buffer space corresponding to high-priority packets. Thus, this embodiment of the invention can limit the traffic fluctuations of low-priority packets to their own queue buffer resources, reducing the impact of low-priority traffic fluctuations on high-priority packets. Therefore, it can reduce the packet loss rate of high-priority packets and shorten the queuing delay of high-priority packets at the NIC. Attached Figure Description

[0012] Figure 1 This is a flowchart illustrating the steps of a message processing method according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating the steps of a message processing method according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating the steps of a message processing method according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a control device according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a control device according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the software architecture of a control device according to an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0013] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0014] It should be noted that the various embodiments of the present invention can be combined as long as there is no technical conflict.

[0015] It should be noted that the acquisition process of information, signals or data used in the embodiments of the present invention is carried out in compliance with the relevant data protection laws and policies of the country where the invention is located, and with the authorization of the relevant owner.

[0016] The message processing method of this invention is used to process mixed traffic messages to reduce packet loss rate and processing delay.

[0017] In related packet processing methods, mixed traffic packets enter the network interface card (NIC) receive buffer after passing through the NIC queue and share the NIC's receive buffer. However, in the event of a sudden surge in traffic, packets will continuously flood into the NIC queue and fill the NIC's receive buffer, causing packet processing timeouts or losses, which in turn leads to an increased packet loss rate and increased processing latency.

[0018] To address the technical problems of increased packet loss rate and increased processing delay, this invention provides a packet processing method. The method of this invention will be described below through specific embodiments.

[0019] Reference Figure 1 The diagram illustrates a step-by-step flowchart of a message processing method according to an embodiment of the present invention. The method may specifically include the following steps: Step 101: Obtain the message; the message includes a field for indicating priority information; Step 102: Determine the target network interface card (NIC) hardware queue corresponding to the packet based on the mapping relationship between the packet priority information and the NIC hardware queue; Step 103: Distribute the message to the target network interface card (NIC) hardware queue; wherein different NIC hardware queues have different queue buffer resources.

[0020] Figure 1The message processing method shown can be executed by a control device, which is an electronic device capable of sending and receiving messages. The specific hardware form of the control device varies across different industries. For example, in the power storage industry, this control device is specifically an LC (Local Controller).

[0021] The local controller can be an energy storage subarray level controller, whose functions specifically include: receiving messages from the sender, such as receiving GOOSE (Generic ObjectOriented Substation Event) messages sent by an EMS (Energy Manager System), which contain a primary frequency regulation command; executing the message processing method of this embodiment of the invention, specifically, distributing the GOOSE message to the corresponding target network interface card hardware queue. The local controller can also process the messages, such as parsing the primary frequency regulation command in the GOOSE message, and controlling the energy storage converter to adjust the active power output according to the frequency regulation command to respond to changes in grid frequency. Optionally, the energy storage subarray level controller can also perform operations such as equipment status acquisition, command reception and execution, clock synchronization, and log interaction.

[0022] In specific implementations, the messages include: GOOSE messages, IEC104 messages (International Electrotechnical Commission 60870-5-104 protocol message, a power system remote communication message using the International Electrotechnical Commission 60870-5-104 protocol), Modbus messages (Modbus Serial Communication Protocol message), PTP messages (Precision Time Protocol message), HTTP(s) messages (HyperText Transfer Protocol / Secure HyperText Transfer Protocol message), log messages, etc. It is understood that this embodiment of the invention does not limit the specific messages used.

[0023] Referring to Table 1, an example of message information according to an embodiment of the present invention is shown. The message information specifically includes: message type, sender, receiver, and function.

[0024] Table 1

[0025] Step 101 is the message acquisition stage. In the specific implementation, the control device can receive messages from the sender. The received message may carry a field that represents priority information. This field is used to determine the priority information of the message, providing a basis for subsequent queue distribution of messages.

[0026] Step 102 establishes a mapping relationship between priority information and network card hardware queues in advance, and uses this mapping relationship to determine the target network card hardware queue corresponding to the packet.

[0027] Step 103 completes the distribution of the message to the target network card hardware queue.

[0028] Among them, the network interface card (NIC) hardware queue is a hardware resource entity controlled by the NIC hardware logic and used for packet buffering and queuing.

[0029] Unlike software queues maintained by the operating system (which rely on the processor executing operating system code), the packet queuing process of the network card hardware queue is directly completed by the network card hardware logic without processor intervention.

[0030] The network interface card (NIC) hardware queue's NIC cache resources may include: the NIC chip's local storage area, and / or, areas in the host memory that are directly accessible by the hardware.

[0031] The control device can allocate independent queue cache resources for different network card hardware queues within the network card cache resource. In other words, the queue cache resource is a logical resource obtained by dividing the network card cache resource according to the queue dimension.

[0032] In practical implementation, the control device can divide the network card cache resources during the network card driver initialization phase using the network card register interface, thereby configuring independent queue cache resources for different network card hardware queues, so that each network card hardware queue can use its own corresponding queue cache resources.

[0033] In one optional implementation of the present invention, the network interface card (NIC) hardware queue corresponds one-to-one with the processor core; the receive interrupt generated by the NIC hardware queue is sent to the target processor core corresponding to the NIC hardware queue, so that the target processor core can read and process the packet from the corresponding NIC hardware queue.

[0034] A processor core refers to a computing unit with independent instruction execution capabilities. It can be an independent physical core integrated into a physical processor chip, or a virtual core partitioned from a physical core using virtualization technology. In this embodiment of the invention, multiple processor cores run in parallel and are pre-bound to specific network interface card (NIC) hardware queues. This ensures that packet processing tasks for different NIC hardware queues are isolated from processor cores at the hardware level, preventing multiple cores from competing for the resources of the same NIC hardware queue.

[0035] A receive interrupt is a hardware level signal sent by the network interface card (NIC) to the processor core after writing a packet. Specifically, after a packet enters the NIC's hardware queue and is buffered, the NIC, based on a pre-configured mapping, locates the target processor core bound to that hardware queue. Subsequently, the NIC initiates a receive interrupt to the target processor through a designated interface. This receive interrupt triggers the target processor core to execute a pre-defined interrupt service routine to read packets from the corresponding NIC hardware queue.

[0036] This optional implementation binds three levels of resources: "NIC hardware queue - interrupt - processor core". Since packets in the NIC hardware queue are processed by the corresponding processor core, isolation of packet processing corresponding to different priority information can be achieved.

[0037] Furthermore, the processor core corresponding to the high-priority queue where the critical message is located only uses its computing resources to process the messages in the high-priority queue, and will not be preempted by the reception interrupt of the low-priority message, thus maintaining the deterministic execution timing of the critical control logic.

[0038] In this embodiment of the invention, a virtualization device can be deployed on the control device, and the virtualization device corresponds one-to-one with the processor core. For example, in the power storage industry, the virtualization device can be a vPLC (virtual-Programmable Logic Controller).

[0039] This virtualization device runs on a dedicated processor core, which receives packets distributed by the network card hardware queue, parses the scheduling instructions, status acquisition, alarms and other business data carried in the packets, and completes the logical operations and control outputs of energy storage services.

[0040] The aforementioned deployment method, which binds virtualization devices to processor cores one by one, can isolate computational interference from other message processing, achieve time determinism in message processing and business control logic execution, and meet the low latency and high reliability requirements of grid energy storage services.

[0041] Optionally, when the processor core includes a logical processor core derived from the partitioning of physical processors, the hyper-threading function of the physical processor is disabled.

[0042] Hyper-Threading (HT) allows a single physical processor to provide multiple logical processor cores. Disabling Hyper-Threading means that even if multiple logical processor cores are allocated at the hardware level, the system level will only enable and schedule a single logical processor core, while its corresponding sibling logical processor cores will be forced to idle.

[0043] The hyper-threading function of the physical processor is disabled, which eliminates contention for physical execution resources among sibling logical processor cores. Although the physical processor is divided into multiple logical processor cores, these cores share the same set of execution units and cache. With hyper-threading disabled, the enabled logical core exclusively uses the resources of its physical core, and its bound computing resources are no longer interfered with by other tasks running on sibling logical processor cores. This avoids latency jitter caused by resource contention and maintains the deterministic execution timing of critical control logic.

[0044] Optionally, the receive interrupt generated by the network card hardware queue is configured as a threaded interrupt with a first priority; the first priority matches the second priority corresponding to the network card hardware queue.

[0045] This implementation employs a threaded interrupt mechanism, transforming the interrupt handling logic into an execution unit uniformly managed by the operating system scheduler. Under this mechanism, interrupt handling is no longer a hard interrupt that unconditionally preempts all tasks, but rather participates in system scheduling as an execution unit with independent scheduling attributes.

[0046] First-priority threaded interrupts refer to interrupt handling threads that are configured with a specific scheduling priority, i.e., first priority. Under real-time scheduling policies, this first priority determines the execution order of interrupt handling threads within the operating system's interrupt queue. Generally speaking, the higher the first priority, the greater the urgency for the scheduler to schedule the interrupt handling thread for execution.

[0047] The second priority is an attribute inherent to the network interface card (NIC) hardware queue, representing the priority of packets carried by that queue. For example, a higher priority queue corresponds to a higher second priority. The first priority is the scheduling level corresponding to the interrupt handling thread that processes interrupts from that NIC hardware queue. Matching these two attributes means that the second priority attribute of the NIC hardware queue determines the first priority value of the corresponding interrupt handling thread, achieving a lossless mapping of hardware-level queue priority hierarchy to operating system-level thread priority hierarchy.

[0048] The receive interrupts generated by the network card hardware queue are configured as threaded interrupts with first priority. This enables the conversion of interrupts generated by high-priority hardware queues into high-priority interrupt handling threads, giving them the ability to preempt low-priority tasks or other queue interrupt handling threads. This eliminates the hidden danger of low-priority interrupts blocking high-priority interrupt handling in the traditional kernel, and ensures that the interrupt handling of critical packets continues the predetermined priority order at the operating system level.

[0049] For example, a physical processor core is divided into logical processor core 0 and logical processor core 1 based on synchronous multithreading technology. Assuming that the network interface card (NIC) hardware queue bound to logical processor core 0 carries critical packets, while the NIC hardware queue bound to logical processor core 1 carries ordinary packets, then the former has a higher second priority than the latter. Under this configuration where the second priority matches the first priority, the interrupt handling thread corresponding to logical processor core 0 is assigned a higher scheduling priority than the interrupt handling thread corresponding to logical processor core 1. This ensures that interrupt handling for critical packets always takes precedence over ordinary packets at the operating system scheduling level, and the interrupt threads handled by the two logical processor cores do not preempt each other's computing resources.

[0050] In summary, the packet processing method of this invention maps packets of different priorities to network interface card (NIC) hardware queues with independent queue buffer resources, achieving receive buffer isolation between packets of different priorities at the hardware level. Thus, when there is a sudden surge in traffic for a packet of a certain priority, because the queue buffer resources of different NIC hardware queues are independent, the packet of that priority can only occupy the queue buffer resources of its own NIC hardware queue and cannot occupy the queue buffer resources of the NIC hardware queues corresponding to other priorities. Therefore, even if the queue buffer resources corresponding to that priority packet are exhausted, the impact is limited to packets within its own NIC hardware queue, and will not cause other priority packets to experience processing timeouts or loss due to insufficient buffering. Therefore, this invention can reduce the overall packet loss rate and shorten the queuing delay of packets on the NIC.

[0051] Furthermore, because this embodiment of the invention configures independent queue buffer resources for packets of different priorities at the network interface card (NIC) hardware level, a sudden surge in low-priority packet traffic cannot occupy the hardware buffer space corresponding to high-priority packets. Thus, this embodiment of the invention can limit the traffic fluctuations of low-priority packets to their own queue buffer resources, reducing the impact of low-priority traffic fluctuations on high-priority packets. Therefore, it can reduce the packet loss rate of high-priority packets and shorten the queuing delay of high-priority packets at the NIC.

[0052] Reference Figure 2 The diagram illustrates a step-by-step flowchart of a message processing method according to an embodiment of the present invention. The method may specifically include the following steps: Step 201: Receive a message from the physical port; the message includes a field for indicating priority information; Step 202: Determine the target network interface card (NIC) hardware queue corresponding to the packet based on the mapping relationship between the packet priority information and the NIC hardware queue; Step 203: Distribute the message to the target network interface card (NIC) hardware queue; wherein different NIC hardware queues have different queue buffer resources.

[0053] The embodiments of the present invention are applied to message receiving scenarios, and can perform priority-oriented distribution processing on messages flowing in through physical ports.

[0054] In step 201, the physical port is a hardware transceiver unit on the network interface card (NIC) hardware that has a physical connector, serving as the physical channel for packets to enter and exit the NIC hardware. In this embodiment of the invention, the physical port, as a packet receiving entry point, is responsible for converting optical or electrical signals on the physical link into internal electrical signals recognizable by the NIC hardware.

[0055] In step 202, based on the pre-established mapping relationship between priority information and network card hardware queues, the target network card hardware queue corresponding to the packet is determined, so that the packet is distributed to the corresponding target network card hardware queue for caching.

[0056] In some implementations, the process of determining the target network interface card hardware queue corresponding to the packet specifically includes: Step A1: Determine the priority information of the message based on the first field contained in the message; the first field includes at least one of the following fields: protocol type field, port field, and priority code point field; Step A2: Based on the priority information of the packet, search in the mapping relationship between the priority information of the packet and the network card hardware queue to obtain the target network card hardware queue corresponding to the packet.

[0057] In this implementation, the process of determining the target network card hardware queue specifically includes two operations: field parsing and lookup.

[0058] The field parsing operation determines the priority information of the message based on the first field within the message. This priority information characterizes the message's priority level, which is represented by a priority value (e.g., priority value 0 to priority value 7). The correspondence between priority values ​​and priority levels can be determined by those skilled in the art based on actual application requirements. For example, a larger priority value generally indicates a higher priority, or a smaller priority value generally indicates a higher priority; both are acceptable.

[0059] The lookup operation is used to perform a match in the pre-established mapping relationship between priority information and network card hardware queues based on the priority information, so as to obtain the target network card hardware queue corresponding to the packet, thereby directing packets with different priority values ​​to the target network card hardware queue with independent buffer resources.

[0060] This implementation supports determining the corresponding priority value based on a single field or a combination of fields across levels in the packet, and pre-binding the corresponding hardware queue according to the priority value. It achieves receive buffer isolation for packets of different priorities without requiring the network interface card (NIC) to have an advanced matching engine. This implementation is compatible with conventional NIC hardware, and the correspondence between field characteristics and priority values, as well as the mapping relationship between priority values ​​and NIC hardware queues, can be established through software configuration.

[0061] In this embodiment, the mapping relationship between packet priority information and network card hardware queue specifically includes: the mapping relationship between packet priority value and network card hardware queue.

[0062] The process of establishing the mapping relationship between the priority value of the packet and the network card hardware queue specifically includes: matching the resource requirement level corresponding to the priority value with the resource level of the network card hardware queue, and establishing the mapping relationship between the successfully matched priority value and the network card hardware queue.

[0063] The resource requirement level represents the hardware resource and real-time requirements proposed by the message for message processing stages such as message reception and queuing. "Hardware resource requirements" include indicators such as the required queue buffer space size, while "real-time requirements" include specific indicators such as business-defined latency thresholds and packet loss rate thresholds.

[0064] The correspondence between priority values ​​and resource requirement levels can be flexibly defined by business requirements. For example, it can be stipulated that a higher priority value corresponds to a higher level of resource requirement, or a lower priority value corresponds to a higher level of resource requirement.

[0065] The resource level of a network interface card (NIC) hardware queue characterizes the hardware service capabilities that the NIC hardware queue can provide for packet processing. Specific attributes of these hardware service capabilities include: queue buffer attributes, interrupt-bound CPU core attributes, etc. Generally speaking, the larger the queue buffer and the stronger the real-time performance of the CPU cores bound to the interrupts, the higher the resource level of the NIC hardware queue.

[0066] The priority values ​​that are successfully matched with the network interface card (NIC) hardware queues specifically include: priority values ​​with higher resource requirement levels matching NIC hardware queues with higher resource requirement levels, or priority values ​​with lower resource requirement levels matching NIC hardware queues with lower resource requirement levels.

[0067] The first field is the field contained in the message. Based on the first field, the correspondence between the field characteristics and the priority value can be searched to obtain the priority value of the message.

[0068] The first field specifically includes at least one of the following: Ethernet type field, protocol type field, port field, and priority code point field.

[0069] It should be noted that the messages mentioned in the embodiments of this invention typically exist in the form of Ethernet frames at the link layer, that is, Ethernet frames are the specific encapsulation format of messages in a Layer 2 network. The parsing process of the first field is the process of extracting feature information from the corresponding header of the received Ethernet frame.

[0070] The Ethernet Type field, located in the Ethernet frame header, identifies the type of upper-layer protocol carried by the Ethernet frame. For example, the EtherType of a GOOSE message is 0x88B8, and the EtherType of a PTP time synchronization message is 0x88F7.

[0071] The Protocol Type field, located in the IP (Internet Protocol) header, identifies the protocol type used by the transport layer. Examples of Protocol Type fields include TCP (Transmission Control Protocol) or UDP (User Datagram Protocol).

[0072] The port field is located in the transport layer header and includes the source port or destination port, used to identify the specific application layer service. For example, IEC104 messages typically use TCP port 2404, Modbus messages typically use TCP port 502, and ordinary Web (World Wide Web) services typically correspond to ports 80 / 443 / 22.

[0073] The PCP (Priority Code Point) field is located in the VLAN (Virtual Local Area Network) tag header and is used to explicitly mark the priority of a frame. Its value ranges from 0 to 7.

[0074] In one example, the network card supports at least 8 RX (network card hardware queues for receiving packets, referred to as the receive queue) and TX (network card hardware queues for sending packets, referred to as the send queue).

[0075] Assuming the 8 RXs are Queue0-Queue7, the resource requirement level corresponding to the priority value is matched with the resource level of the network card hardware queue, resulting in the following mapping relationship between the packet priority value and the network card hardware queue: priority value 7 corresponds to queue 0, priority value 6 corresponds to queue 1, priority value 5 corresponds to queue 2, priority value 4 corresponds to queue 3, and priority values ​​0-2 correspond to queues 4-7.

[0076] Referring to Table 2, an example of determining the target network interface card hardware queue corresponding to the packet is shown in an embodiment of the present invention.

[0077] Table 2 specifically includes the correspondence between message type, first field, priority value, and receive queue. Based on the correspondence between field characteristics and priority values, priority value 7 corresponds to the highest priority GOOSE message. According to the mapping between priority values ​​and network card hardware queues, priority value 7 is bound to Queue0. Similarly, priority value 6 corresponds to PTP time synchronization messages and is bound to Queue1; ordinary messages and log messages are assigned relatively lower priority values ​​and bound to Queues 4-7 respectively.

[0078] Using Table 2, the first field contained in the message can be converted into a specific priority value. Then, based on the above mapping relationship, the receiving queue corresponding to the message can be determined.

[0079] Table 2

[0080] In other implementations, the process of determining the target network interface card hardware queue corresponding to the packet specifically includes: Step B1: Use the network card's hardware matching engine to extract the second field from the packet; Step B2: Based on the second field, search in the mapping relationship between the packet priority information and the network card hardware queue to obtain the target network card hardware queue corresponding to the packet.

[0081] In this embodiment, the process of determining the target network interface card (NIC) hardware queue corresponding to the packet is executed by the hardware matching engine on the NIC hardware side. The hardware matching engine is used to extract the second field from the packet and determine the corresponding target NIC hardware queue for the packet according to the predefined matching rules.

[0082] The matching rule is a specific implementation of the mapping relationship between the priority information of the packet and the network card hardware queue, which is reflected in the mapping relationship of "field / field combination (referred to as field feature) → network card hardware queue".

[0083] In this embodiment, the mapping relationship between packet priority information and network card hardware queue specifically includes the mapping relationship between packet field characteristics and network card hardware queue.

[0084] The process of establishing the mapping relationship between message field characteristics and network interface card (NIC) hardware queues specifically includes: First, based on the resource requirement level of the message, determine the field features of the message used to identify the resource requirement level; if a single field can distinguish messages of different resource requirement levels, the field features may include: a single field; or, if a single field cannot distinguish messages of different resource requirement levels, the field features may include: a combination of fields. Secondly, the resource requirement level of the packet identified by the field feature is matched with the resource level of the network interface card hardware queue to determine the mapping relationship between the field feature and the network interface card hardware queue. Next, based on the mapping relationship between field characteristics and network card hardware queues, matching rules are generated. The driver then writes these matching rules into the mapping table inside the network card hardware matching engine, thus completing the establishment of the mapping relationship.

[0085] Unlike the priority-value-based mapping in the previous implementation, the matching rules in this implementation are pre-written into the hardware matching engine's mapping table by the driver, eliminating the intermediate step of converting fields into abstract priority values. Each matching rule explicitly defines the deterministic correspondence between a single field (e.g., EtherType=0x88B8) or a combination of fields (e.g., IP address + TCP port number) and a specific receive queue. After a packet enters the network interface card (NIC), the hardware matching engine extracts its second field and matches it with the field features in the mapping table. If a match is successful, the receive queue corresponding to that field feature is determined as the target NIC hardware queue for that packet.

[0086] FD (Flow Director) is a typical example of a hardware matching engine. Based on a matching mechanism, it supports defining matching rules based on one or more second fields, thereby distributing packets to specified network interface card (NIC) hardware queues.

[0087] In step B1, a hardware matching engine can be used to extract a second field for matching from the message. This second field includes at least one of the following: Ethernet type field, protocol type field, network layer address field, and port field. The extraction process covers layers L2 to L4, corresponding to the data link layer (L2), network layer (L3), and transport layer (L4) in the OSI model, respectively.

[0088] L2 (Data Link Layer): Corresponds to the Ethernet frame header. The hardware matching engine extracts the Ethernet Type (EtherType) field to identify the upper-layer protocol carried by the frame (such as 0x88B8 in GOOSE messages).

[0089] L3 (Network Layer): Corresponds to the IP header. The hardware matching engine extracts the Protocol type field and the network layer address (IP address) field to identify the transport layer protocol type and the source / destination IP address of the message.

[0090] L4 (Transport Layer): Corresponds to the transport layer header. The hardware matching engine extracts the port field to identify the specific application layer service (e.g., TCP port 2404 corresponds to IEC104 message).

[0091] The hardware matching engine can flexibly extract a single field (only EtherType=0x88B8) or a combination of fields across levels (such as IP address + TCP port number) as the matching basis according to actual application needs, so as to achieve accurate flow classification.

[0092] In step B2, the hardware matching engine searches the mapping table based on the second field (or its combination) extracted in step B1. This mapping table is pre-written by the driver and stores the mapping relationship of "field feature / combination (field feature) → network card hardware queue". If the field feature matches a matching rule in the mapping table, it is directly sent to the target receiving queue (such as Queue0) specified by that matching rule.

[0093] Through this matching method, embodiments of the present invention can achieve deterministic queue distribution based on field matching at the hardware level, enabling important messages such as GOOSE and PTP to exclusively occupy high-priority queues, and the configuration rules are flexible and varied.

[0094] In an optional implementation of the present invention, the mapping relationship includes a first network interface card (NIC) hardware queue, and the process of determining the target NIC hardware queue corresponding to the packet may further include: if there is no target NIC hardware queue in the mapping relationship that matches the second field, then a hash calculation is performed based on the five-tuple information of the packet, and the target NIC hardware queue corresponding to the packet is determined from the second NIC hardware queue based on the hash calculation result; the first NIC hardware queue is different from the second NIC hardware queue.

[0095] In the case where a packet does not match a rule, this embodiment of the invention employs an RSS (Receive Side Scaling) strategy to distribute the unmatched packet evenly to the corresponding target network interface card hardware queue.

[0096] It should be noted that the first network interface card (NIC) hardware queue included in the mapping relationship is different from the second NIC hardware queue corresponding to the RSS policy. This allows for differentiated caching of different types of packets. For example, the first NIC hardware queue can be queues 0-3, and the second NIC hardware queue can be queues 4-7.

[0097] For ordinary packets without configured mappings, this implementation utilizes the RSS capability of the network interface card (NIC) hardware. Based on the hash calculation result of the 5-tuple information, it matches the corresponding second NIC hardware queue in the indirect addressing table and directs the ordinary packet to that second NIC hardware queue. Thus, the first NIC hardware queue is dedicated to critical packets, and the second NIC hardware queue is dedicated to ordinary packets, achieving physical isolation between critical and ordinary packets and preventing ordinary packets from consuming the high-priority queue resources of critical packets. Therefore, this implementation balances the deterministic distribution of critical packets with the concurrent processing capability of ordinary packets.

[0098] Among them, key packets refer to packets whose field features match the rules in the mapping relationship. For example, GOOSE packets with EtherType 0x88B8 or PTP time synchronization packets with EtherType 0x88F7. The forwarding path of such packets is directly bound to the first network card hardware queue (such as Queue0-3) by the hardware matching engine, and they exclusively occupy high-priority buffer resources during the reception phase, unaffected by other packets.

[0099] Ordinary packets refer to packets whose packet characteristics do not match the rules in the mapping relationship, such as Web / SSH packets with TCP ports 80 / 443 / 22 or ordinary UDP log packets. These packets are hashed by the network interface card (NIC) hardware based on the 5-tuple information and distributed to the second NIC hardware queue (e.g., Queue4-7) by querying the indirect addressing table. The cache resources used by these packets are physically isolated from critical packets and cannot occupy the dedicated resources of the first NIC hardware queue.

[0100] In the specific implementation, the five-tuple information of the message can be extracted first. This five-tuple information specifically includes: the source IP address and destination IP address at the IP layer, the source port number and destination port number at the transport layer, and the protocol type field. Then, the above five-tuple information is processed according to a hash algorithm to obtain a fixed-length hash key value, which is used as the hash calculation result. Next, based on the low-order bits of this hash key value, a match is made in the indirection table to find the corresponding receive queue index value, thereby distributing the message to the receive queue (such as Queue4-7) corresponding to the receive queue index value.

[0101] The process of determining the target network interface card (NIC) hardware queue corresponding to the packet has been described above using two implementation methods. It is understood that those skilled in the art can use either of the two implementation methods according to actual application requirements.

[0102] It should be noted that the embodiments of the present invention can also process the received messages. For example, the vPLC deployed in the control device executes the corresponding local energy storage control logic according to the control instructions carried in the received message, and feeds back the device status and sampling data.

[0103] In summary, the two implementation methods of this invention for determining the target network interface card (NIC) hardware queue corresponding to the packet, based on the mapping relationship between priority information and NIC hardware queues, can perform differentiated processing on different types of packets, enabling high-priority packets to be physically isolated from low-priority packets during the reception phase. Distributing packets to the corresponding target NIC hardware queue according to their priority information helps avoid aliasing and resource contention during the underlying forwarding process.

[0104] Reference Figure 3 The diagram illustrates a step-by-step flowchart of a message processing method according to an embodiment of the present invention. The method may specifically include the following steps: Step 301: Add a priority field to the message to be sent to obtain a message carrying the priority field.

[0105] Step 302: Determine the target network interface card (NIC) hardware queue corresponding to the packet based on the mapping relationship between the packet priority information and the NIC hardware queue; Step 303: Distribute the message to the target network interface card (NIC) hardware queue; wherein different NIC hardware queues have different queue buffer resources.

[0106] The embodiments of the present invention are applied to message sending scenarios, and can complete the addition of the priority field of the message and the distribution to the corresponding network card hardware queue on the message sending side, so as to realize priority-based hardware cache isolation in the sending direction.

[0107] In step 301, the priority value of the message to be sent can be determined according to the correspondence between the field characteristics of the message and the service priority value, and the PCP field corresponding to the priority value can be added to the message to be sent.

[0108] For example, a vPLC instance determines the priority value based on the field characteristics of the message and encapsulates the priority value into the PCP field of a VLAN Tag that conforms to the IEEE 802.1Q standard, so that the message carries a priority identifier that can be recognized by the hardware.

[0109] In step 302, the target network card hardware queue to which the message to be sent is obtained by searching the mapping relationship based on the priority field carried in the message.

[0110] In step 303, the packet carrying the priority field is sent to the target network card hardware queue that has been configured with independent queue buffer resources. By relying on the queue buffer resources that are isolated between the network card hardware queues, buffer resource contention between packets with different priorities is avoided.

[0111] In the sending direction of the message, the network card hardware can allocate a dedicated TX (Transmit) queue for high-priority traffic according to the mapping strategy consistent with the receiving direction. This allows high-priority messages to obtain the right to arbitrate transmission at the MAC (Media Access Control) layer, taking precedence over low-priority messages, thus maintaining the deterministic timing of critical message transmissions.

[0112] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the present invention.

[0113] Based on the description of the above method embodiments, the present invention also provides corresponding control device embodiments to implement the content described in the above method embodiments.

[0114] Reference Figure 4 The diagram illustrates the structure of a control device according to an embodiment of the present invention, the control device including: a network card 401 and a physical processor 402; The network interface card 401 includes: multiple network interface card hardware queues 411; The processor 402 includes: a plurality of processor cores 421; At least some of the receive interrupts generated by the network card hardware queue 421 correspond one-to-one with the processor core; The receive interrupt is sent to the corresponding target processor core to trigger the target processor to process the packets in the corresponding network card hardware queue.

[0115] For example, the receive interrupts generated by the first network interface card (NIC) hardware queue correspond one-to-one with the processor core 421 to achieve dedicated computing resource isolation and low-latency processing of high-priority packets. Meanwhile, the receive interrupts generated by multiple second NIC hardware queues correspond to one processor core 421 to achieve load aggregation of low-priority packets and intensive utilization of computing resources.

[0116] Through the aforementioned differentiated queue and processor core strategies, the control device can flexibly adapt to the processing needs of different business types, maximizing overall throughput performance while improving the timeliness of critical business operations.

[0117] Reference Figure 5 The diagram illustrates the structure of a control device according to an embodiment of the present invention, the control device including: a network card and a physical processor.

[0118] This network interface card (NIC) contains multiple physical ports (such as PF0 and PF1). High-priority packets are transmitted through physical port PF0, and low-priority packets are transmitted through physical port PF1 to achieve resource isolation at the physical link layer.

[0119] After virtualization configuration, several VF (Virtual Function) ports are created on the PF (Physical Function) corresponding to physical port PF0. For example, VF1 and VF2 are mounted under PF0. If no virtualization configuration is performed for physical port PF1, the hardware transceiver queue, i.e., the PF queue, can be used.

[0120] Regarding queue resource configuration, based on the mapping relationship between priority information and network card hardware queues, dedicated receive queues (RX) and send queues (TX) are configured for high-priority packets (such as packets corresponding to GOOSE applications and PTP applications) to achieve low latency and high determinism for high-priority packets. Furthermore, based on the above mapping relationship, a set of receive and send queues can be configured for low-priority packets (such as packets corresponding to Web applications and logging applications) to achieve efficient resource utilization.

[0121] At the upper application and processing layer, different types of packet traffic are processed by corresponding vPLC instances (such as vPLC1, vPLC2, vPLCN-1, and vPLCN). Each vPLC instance is bound to an independent logical CPU (vCPU) and associated with a corresponding IRQ (Interrupt Request). For example, vPLC1 is bound to vcpu1+IRQ1, and vPLCN is bound to vcpuN+IRQN. The vPLC instances establish a mapping relationship with the underlying virtual network interface or PF Queue through virtualization channels, thereby tightly integrating the interrupt handling of the physical network card with the business logic execution unit to complete the reception, processing, and forwarding of packets from the physical port.

[0122] Figure 6This is a schematic diagram of the software architecture of a control device according to an embodiment of the present invention. The software architecture specifically includes: a hardware layer 601, an operating system layer 602, and an application container layer 603.

[0123] The hardware layer 601 includes a physical processor 611 and a multi-queue network interface card 612. This embodiment of the invention does not limit the specific architecture of the physical processor; for example, the physical processor can be an x86 (Intel x86) architecture.

[0124] The operating system layer 602 is a real-time operating system running on top of the hardware layer 601. For example, the real-time operating system can be Linux OS (Linux Operating System), specifically employing a preemptive real-time patch kernel. This preemptive real-time patch kernel eliminates the blocking delay of low-priority tasks on high-priority tasks in traditional kernels by threading interrupt handling and implementing full-path preemptibility of kernel code. It provides low-level scheduling support for threaded interrupt mechanisms and maintains the deterministic execution sequence of critical message processing tasks.

[0125] The container engine layer 603 is deployed above the operating system layer 602 and includes a container engine. This container engine is used to implement container deployment, resource configuration, and lifecycle management. Examples of this engine may include a daemon-free container engine. This embodiment of the invention can utilize this container engine to generate several isolated container instances, providing resource isolation and binding capabilities for upper-layer services.

[0126] The application layer 604 is deployed on top of the container engine layer 603. Each container instance runs a vPLC instance, such as vPLC1, vPLC2, up to vPLCN, where N represents the number of vPLC instances. Each vPLC instance runs a corresponding application independently, such as application 1, application 2, up to application N. Each vPLC instance uses the resource configuration capabilities provided by the underlying container engine to establish a binding mapping relationship with the underlying hardware resources, thereby achieving exclusive access to resources at the business processing layer.

[0127] Figure 6 The architecture shown achieves parallel processing and resource isolation for multiple business applications by leveraging the multi-queue features of the underlying hardware and the real-time kernel capabilities of the operating system, combined with the isolation mechanism of the upper-layer container.

[0128] To enable those skilled in the art to better understand the embodiments of the present invention, specific examples of the message processing methods of the embodiments of the present invention are provided herein.

[0129] In this example, the network interface card (NIC) supports eight NIC hardware queues at the hardware level, and eight vPLC instances are deployed in the operating system. A mapping relationship between the vPLC instances and the processor cores and NIC hardware queues is pre-established.

[0130] Specifically, vPLC0 is bound to CPU0 and Queue0 to process GOOSE messages with a priority value of 7; vPLC1 is bound to CPU1 and Queue1 to process communication messages (such as PTP) with a priority value of 6; vPLC2 is bound to CPU2 and Queue2 to process IEC104 messages with a priority value of 5; vPLC3 is bound to CPU3 and Queue3 to process Modbus messages with a priority value of 4; and the remaining vPLCs 4 to 7 are bound to CPU4 to CPU7 and Queue4 to Queue7 respectively to process messages with priority values ​​of 0 to 3.

[0131] In terms of packet distribution strategy, the network interface card (NIC) uses flow-directing engine technology to direct GOOSE packets to Queue0 and Modbus packets to Queue2 according to preset matching rules. For ordinary packets that do not match the rules, the RSS mechanism is used to perform hash calculation based on the five-tuple information, and the packets are distributed to Queue4 to Queue7 according to the hash calculation result.

[0132] Since the receive interrupts generated by each network card hardware queue are configured as threaded interrupts, and the first priority of the receive interrupt matches the second priority of the network card hardware queue to which it belongs, the interrupt handling thread corresponding to the high-priority message can preempt the low-priority task, thereby achieving the deterministic execution timing of the critical message.

[0133] This invention discloses an electronic device, including a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to perform the aforementioned method.

[0134] This invention discloses a non-transitory computer-readable storage medium storing instructions that cause a processor to execute the aforementioned method.

[0135] Non-transitory memory: This refers to components or devices in computer hardware used for non-temporary storage of data and instructions. It emphasizes the "non-transitory" nature of the storage, meaning the data will not be lost due to momentary factors such as the disappearance of electrical signals. Examples include ROM (Read-Only Memory) and the storage chips in solid-state drives (SSDs), which can store data long-term.

[0136] Non-transitory computer-readable recording media: Physical carriers that can permanently store computer data and are readable. Data storage is stable and not temporary. Examples include hard drives, USB flash drives, and optical discs. They can store various types of data such as programs, documents, and videos. Even if the device is powered off or restarted, the data is still retained and can be accessed by the computer later.

[0137] Non-transitory computer-readable storage media: Part of the computer storage system, these are media capable of permanently storing computer-readable data, including hard drives, solid-state drives, and flash memory. Unlike transient storage, they can permanently or long-term retain data. Computers can read the stored instructions and data through corresponding interfaces and protocols for use in program execution, data processing, and other scenarios. For example, they store operation processing terminals, application code, and user files, providing stable data support for computer processing.

[0138] In this embodiment of the invention, the device for message processing can be an electronic device. Figure 6 A schematic diagram of an electronic device 1100 according to an embodiment of the present invention is shown. The electronic device 1100 specifically includes: one or more processors 1102, a control module (chipset) 1104 coupled to at least one of the processors 1102, a memory 1106 coupled to the control module 1104, a non-volatile memory / storage device 1108 coupled to the control module 1104, one or more input / output devices 1110 coupled to the control module 1104, and a network interface 1112 coupled to the control module 1104.

[0139] Processor 1102 may include one or more single-core or multi-core processors, and processor 1102 may include any combination of general-purpose processors or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, electronic device 1100 can serve as a terminal device, server (cluster), or other device as described in the embodiments of the present invention.

[0140] In some embodiments, electronic device 1100 may include one or more computer-readable media (e.g., memory 1106 or non-volatile memory / storage device 1108) having instructions 1114 and one or more processors 1102 that are combined with the one or more computer-readable media and configured to execute instructions 1114 to implement modules and thus perform the actions described in this disclosure.

[0141] In one embodiment, the control module 1104 may include any suitable interface controller to provide any suitable interface to at least one of the processors 1102 and / or any suitable device or component communicating with the control module 1104.

[0142] The control module 1104 may include a memory controller module to provide an interface to the memory 1106. The memory controller module may be a hardware module, a software module, and / or a firmware module.

[0143] Memory 1106 may be used, for example, to load and store data and / or instructions 1114 for electronic device 1100. In one embodiment, memory 1106 may include any suitable volatile memory, such as suitable DRAM (Dynamic Random Access Memory). In some embodiments, memory 1106 may include double data rate type quad synchronous dynamic random access memory.

[0144] In one embodiment, the control module 1104 may include one or more input / output controllers to provide an interface to the non-volatile memory / storage device 1108 and (one or more) input / output devices 1110.

[0145] For example, non-volatile memory / storage device 1108 may be used to store data and / or instructions 1114. Non-volatile memory / storage device 1108 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable (one or more) non-volatile storage devices (e.g., one or more hard disk drives, one or more optical disk drives, and / or one or more digital universal optical disk drives).

[0146] The non-volatile memory / storage device 1108 may include storage resources that are physically part of a device on which the electronic device 1100 is mounted, or that can be accessed by the device without being part of the device. For example, the non-volatile memory / storage device 1108 may be accessed via a network via one or more input / output devices 1110.

[0147] One or more input / output devices 1110 may provide an interface for electronic device 1100 to communicate with any other suitable device. Input / output devices 1110 may include communication components, audio components, sensor components, etc. Network interface 1112 may provide an interface for electronic device 1100 to communicate via one or more networks. Electronic device 1100 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, such as accessing wireless networks based on communication standards, such as WiFi (Wireless Fidelity), 2G (2-Generation wireless telephone technology), 3G (3-Generation wireless telephone technology), 4G (4-Generation wireless telephone technology), 5G (5-Generation wireless telephone technology), etc., or combinations thereof.

[0148] In one embodiment, at least one of the processors 1102 may be logically packaged with one or more controllers (e.g., memory controller modules) of the control module 1104. In one embodiment, at least one of the processors 1102 may be logically packaged with one or more controllers of the control module 1104 to form a processing-level package. In one embodiment, at least one of the processors 1102 may be logically integrated with one or more controllers of the control module 1104 on the same die. In one embodiment, at least one of the processors 1102 may be logically integrated with one or more controllers of the control module 1104 on the same die to form an on-chip processing layer.

[0149] In various embodiments, electronic device 1100 may be, but is not limited to, a server, desktop computing device, or mobile computing device (e.g., laptop computing device, handheld computing device, touchscreen device, netbook, etc.). In various embodiments, electronic device 1100 may have more or fewer components and / or different architectures. For example, in some embodiments, electronic device 1100 includes one or more cameras, a keyboard, a liquid crystal display screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.

[0150] This invention provides a machine-readable medium storing instructions that, when executed by one or more processors, cause an electronic device to perform one or more of the methods described in the above embodiments.

[0151] Optionally, the machine-readable medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.

[0152] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0153] It will be readily apparent to those skilled in the art that any combination of the above embodiments is feasible, and therefore any combination of the above embodiments constitutes an implementation of the present invention. However, due to space limitations, each embodiment will not be described in detail here. Although preferred embodiments of the present invention have been described, those skilled in the art, once they understand the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the present invention.

[0154] The above provides a detailed description of the message processing method, control device, and medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A message processing method, characterized in that, The method includes: Obtain a message; the message includes a field for indicating priority information; Based on the mapping relationship between the priority information of the message and the network interface card (NIC) hardware queue, the target NIC hardware queue corresponding to the message is determined; The message is distributed to the target network interface card (NIC) hardware queue; wherein different NIC hardware queues have different queue buffer resources.

2. The method according to claim 1, characterized in that, The acquisition of the message includes: receiving the message from the physical port; Determining the target network interface card (NIC) hardware queue corresponding to the packet includes: The priority information of the message is determined based on the first field contained in the message; the first field includes at least one of the following fields: Ethernet type field, protocol type field, port field, and priority code point field; Based on the priority information of the packet, a search is performed in the mapping relationship between the packet priority information and the network card hardware queue to obtain the target network card hardware queue corresponding to the packet.

3. The method according to claim 1, characterized in that, The acquisition of the message includes: receiving the message from the physical port; Determining the target network interface card (NIC) hardware queue corresponding to the packet includes: The second field is extracted from the packet using the network card's hardware matching engine; Based on the second field, a search is performed in the mapping relationship between the packet priority information and the network card hardware queue to obtain the target network card hardware queue corresponding to the packet.

4. The method according to claim 3, characterized in that, The second field includes at least one of the following fields: Ethernet type field, protocol type field, network layer address field, and port field.

5. The method according to claim 3, characterized in that, The mapping relationship includes the first network interface card (NIC) hardware queue, and determining the target NIC hardware queue corresponding to the packet includes: If there is no target network interface hardware queue that matches the second field in the mapping relationship, then a hash calculation is performed based on the five-tuple information of the packet, and the target network interface hardware queue corresponding to the packet is determined from the second network interface hardware queue based on the hash calculation result; the first network interface hardware queue is different from the second network interface hardware queue.

6. The method according to any one of claims 1 to 5, characterized in that, The network interface card (NIC) hardware queue corresponds one-to-one with the processor core; the receive interrupt generated by the NIC hardware queue is sent to the target processor core corresponding to the NIC hardware queue, so that the target processor core can read and process the packet from the corresponding NIC hardware queue.

7. The method according to claim 6, characterized in that, The processor core includes: a logical processor core obtained based on the partitioning of the physical processor, wherein the hyper-threading function of the physical processor is disabled.

8. The method according to claim 6, characterized in that, The receive interrupt generated by the network interface card (NIC) hardware queue is configured as a threaded interrupt with a first priority; the first priority matches the second priority corresponding to the NIC hardware queue.

9. A control device, characterized in that, The control device includes: a network interface card and a physical processor; The network interface card (NIC) includes: multiple NIC hardware queues; The processor includes: multiple processor cores; At least some of the network interface card hardware queues generate receive interrupts that correspond one-to-one with the processor cores; The receive interrupt is sent to the corresponding target processor core to trigger the target processor to process the packets in the corresponding network card hardware queue.

10. A non-transitory computer-readable storage medium storing instructions that cause a processor to perform the method according to any one of claims 1-8.

11. A computer program product, characterized in that, The computer program product includes a computer program stored in a computer-readable storage medium, wherein a processor of an electronic device reads from and executes the computer program, causing the electronic device to perform the method of any one of claims 1 to 8.