Network traffic processing methods, devices, equipment, storage media and program products

By monitoring the health status of the security encryption chip for media access and bypassing the encryption chip in case of failure, the link interruption problem caused by encryption chip failure in traditional separation schemes is solved, thus achieving network traffic reliability and business continuity and reducing the risk of data leakage.

CN123075006APending Publication Date: 2026-11-10INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611021942.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-09
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

In traditional separation schemes, if the encryption chip fails, it will cause the link to be interrupted, which will seriously affect the reliability of the network and the continuity of services.

Method used

By monitoring the health status of the media access security encryption chip, network traffic is directly forwarded to the next-level device in case of failure, avoiding link interruption. Faults are detected by probing frames and reading status registers, and differentiated handling measures are taken in case of failure.

Benefits of technology

In the event of a faulty encryption chip, this ensures the continuous forwarding of network traffic, guarantees network reliability and business continuity, and reduces the risk of data leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123075006A_ABST
    Figure CN123075006A_ABST
Patent Text Reader

Abstract

This application provides a network traffic processing method, apparatus, device, storage medium, and program product, relating to the field of information security. The method includes: monitoring whether a media access security encryption chip is faulty; if the media access security encryption chip is not faulty, forwarding network traffic through the switching device to the media access security encryption chip, so that the media access security encryption chip encrypts or decrypts the network traffic, and then forwards the processed network traffic to the next-level device; if the media access security encryption chip is faulty, forwarding the network traffic to the next-level device. This method ensures that network traffic can continue to be forwarded even in the event of a faulty encryption chip, thereby guaranteeing network reliability and service continuity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information security, and in particular to a network traffic processing method, apparatus, device, storage medium, and program product. Background Technology

[0002] MACsec (Media Access Control Security) is a link-layer security protocol based on the IEEE 802.1AE standard. It provides point-to-point data encryption, integrity verification, and replay protection between adjacent nodes on an Ethernet network. With the increasing demands for link-layer security in enterprise, data center, and carrier networks, MACsec has been widely adopted in scenarios with high data transmission security requirements, such as finance, government, and cloud computing, becoming an important means of ensuring network infrastructure security.

[0003] Currently, there are two main ways to implement MACsec functionality in switching equipment: one is an integrated solution, which integrates the MACsec encryption / decryption engine directly into the main switching chip (ASIC); the other is a traditional separate solution, which uses a separate MACsec encryption chip and connects it in series between the switching chip and the physical layer (PHY) or optical module in a pass-through manner.

[0004] While integrated solutions offer a compact structure, they increase the size of the switching chip, power consumption, and cost. Furthermore, users cannot flexibly configure MACsec functionality according to actual port requirements. In contrast, traditional decoupling solutions achieve functional decoupling. However, in traditional decoupling solutions, a failure of the encryption chip directly leads to the interruption of the corresponding link, severely impacting network reliability and service continuity. Summary of the Invention

[0005] This application provides a network traffic processing method, apparatus, device, storage medium, and program product to solve the technical problem that in traditional separation schemes, once the encryption chip fails, it will directly lead to the interruption of the corresponding link, which seriously affects the reliability of the network and the continuity of services.

[0006] In a first aspect, this application provides a network traffic processing method, the method being applied to a switching chip in a switching device, the switching device further comprising a media access security encryption chip physically separated from the switching chip, the switching chip being communicatively connected to the media access security encryption chip, the method comprising:

[0007] Monitor the media access security encryption chip for malfunctions;

[0008] If the Media Access Security Encryption Chip is not faulty, the network traffic through the switching device will be forwarded to the Media Access Security Encryption Chip so that the Media Access Security Encryption Chip can encrypt or decrypt the network traffic, and the Media Access Security Encryption Chip will forward the processed network traffic to the next level device.

[0009] If the media access security encryption chip malfunctions, the network traffic will be forwarded to the next-level device.

[0010] Secondly, this application provides a network traffic processing apparatus, the apparatus being applied to a switching chip of a switching device, the switching device further comprising a media access security encryption chip physically separated from the switching chip, the switching chip being communicatively connected to the media access security encryption chip, the apparatus comprising:

[0011] The monitoring module is used to monitor whether the media access security encryption chip is faulty;

[0012] Forwarding module, used for:

[0013] If the Media Access Security Encryption Chip is not faulty, the network traffic through the switching device will be forwarded to the Media Access Security Encryption Chip so that the Media Access Security Encryption Chip can encrypt or decrypt the network traffic, and the Media Access Security Encryption Chip will forward the processed network traffic to the next level device.

[0014] If the media access security encryption chip malfunctions, the network traffic will be forwarded to the next-level device.

[0015] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;

[0016] The memory stores computer-executed instructions;

[0017] The processor executes computer execution instructions stored in the memory to implement the method as described in the first aspect.

[0018] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect.

[0019] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect.

[0020] The network traffic processing method, apparatus, equipment, storage medium, and program products provided in this application have the following technical effects:

[0021] This method monitors whether the Media Access Security (MAC) encryption chip is faulty. When a fault is detected, network traffic is directly forwarded to the next-level device, avoiding link interruption caused by encryption chip failure. This ensures that network traffic can continue to be forwarded even in the event of encryption chip failure, thereby guaranteeing network reliability and service continuity. Attached Figure Description

[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0023] Figure 1 This is a schematic diagram of a traffic processing system architecture applied to an Ethernet switch, provided in an embodiment of this application.

[0024] Figure 2 This is a schematic diagram of the network traffic processing method provided in the embodiments of this application;

[0025] Figure 3 This is a schematic flowchart of a method for forwarding network traffic provided in an embodiment of this application;

[0026] Figure 4 A schematic diagram of a network traffic processing device provided in an embodiment of this application;

[0027] Figure 5 This is a schematic diagram of the electronic device structure provided in an embodiment of this application.

[0028] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0029] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0030] It should be noted that the network traffic processing method, apparatus, device, storage medium and program product provided in this application can be used in the field of information security, or in any field other than information security. The application field of the network traffic processing method, apparatus, device, storage medium and program product in this application is not limited.

[0031] In addressing the technical problem in existing technologies where a failure of the encryption chip in a traditional separation scheme directly leads to the interruption of the corresponding link, severely impacting network reliability and service continuity, the technical concept of this application is as follows:

[0032] By monitoring whether the media access security encryption chip, which is physically separated from the switching chip, is faulty, network traffic is forwarded to the encryption chip for processing before being sent to the next-level device when there is no fault. When there is a fault, network traffic is directly forwarded to the next-level device, thereby achieving automatic traffic detour and maintaining link connectivity when the encryption chip fails.

[0033] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0034] This embodiment provides a network traffic processing method. The method is applied to the switching chip of a switching device. The switching device also includes a media access security encryption chip that is physically separated from the switching chip. The switching chip and the media access security encryption chip are communicatively connected.

[0035] Switching devices can be any network node with Ethernet switching capabilities, including but not limited to: data center switches, campus network switches, metropolitan area aggregation switches or base station backhaul switches in carrier networks, industrial Ethernet switches in industrial automation networks, vehicle Ethernet switches in vehicle networks, and other network devices that use switching chip architecture to achieve data forwarding.

[0036] This embodiment uses an Ethernet switch as an example. Figure 1 This is a schematic diagram of a traffic processing system architecture applied to an Ethernet switch, as provided in an embodiment of this application. Figure 1As shown, the Ethernet switch integrates two symmetrical switching chips, namely switching chip 1 and switching chip 2; and two independent MACsec encryption chips, namely MACsec encryption chip 1 and MACsec encryption chip 2. This traffic processing system also connects to external Ethernet port groups and PHY / optical modules. In this embodiment, the switching chips and MACsec encryption chips are physically separate, and they are connected through multiple high-speed channels to achieve high-speed data transmission. These high-speed channels can be implemented, for example, based on SerDes (Serializer / Deserializer) channels. SerDes is a high-speed transceiver technology that converts parallel data into serial transmission and then restores it to parallel transmission at the receiving end.

[0037] Under normal operation of the traffic processing system, taking switching chip 1 as an example, external data traffic enters switching chip 1 through the Ethernet port group. The traffic classification and forwarding module inside switching chip 1 parses the received data packets and identifies which data streams require MACsec encryption. After classification, the data streams that need encryption are forwarded to the dynamic traffic allocation module. The dynamic traffic allocation module allocates the data streams to the corresponding high-speed interfaces (Tx / Rx) according to the traffic mapping table. The data streams are then transmitted through the high-speed channel to the corresponding MACsec encryption chip, such as MACsec encryption chip 1. The encryption engine inside encryption chip 1 performs MACsec encapsulation operations on the data. After encryption, the data streams return through the high-speed channel to the corresponding high-speed interface of the switching chip. After receiving the returned data, the switching chip schedules it to the correct exit and finally sends it to the destination through the PHY / optical module.

[0038] Figure 2 This is a schematic diagram of the network traffic processing method provided in the embodiments of this application. Figure 2 The method shown is based on Figure 1 The traffic processing system shown is implemented below. In conjunction with... Figure 2 The network traffic processing method provided in this embodiment will be described in detail.

[0039] S201. Establish a monitoring session and set the initial state;

[0040] Taking switch chip 1 as an example, during the system power-on or initialization phase, switch chip 1 establishes a physical connection with MACsec encryption chip 1 through its built-in high-speed interface. After a successful link-layer handshake, switch chip 1 sends initialization configuration commands to MACsec encryption chip 1, including but not limited to:

[0041] Set the working mode of the high-speed channel, such as full-duplex mode;

[0042] Configure high-speed channel bandwidth, for example, each channel supports 25Gbps, and multiple high-speed channels can be aggregated according to actual needs;

[0043] A synchronous clock signal is used to ensure that the data transmission and reception timings of both parties are consistent.

[0044] The fault bypass and recovery module inside switching chip 1 actively establishes a control channel with MACsec encryption chip 1. This control channel transmits management messages, such as probe frames. Establishing the control channel includes:

[0045] The switching chip 1 is allocated a dedicated internal queue and buffer, which are used to store probe frames to be sent and response frames to be received from the encryption chip, respectively.

[0046] Define a unique identifier for the monitoring session and bind this unique identifier to the physical port of MACsec encryption chip 1;

[0047] Initialize the monitoring timer, set the default probe period (e.g., send a probe frame every 10 milliseconds), and set the timeout threshold (e.g., consider a failure to receive a response frame for 3 consecutive times).

[0048] The dynamic traffic allocation module inside switch chip 1 generates an initial traffic mapping table based on the administrator's predefined policies. The traffic mapping table specifically includes the following:

[0049] Flow Feature Field: Used to match the five-tuple of network traffic, such as source MAC (MAC is the Media Access Control address, the same below), destination MAC, VLAN (Virtual Local Area Network) ID, and ingress port number. If the header information of the network traffic matches a certain flow feature entry, it indicates that the traffic belongs to the category that needs to be encrypted, and switch chip 1 will forward it to the corresponding MACsec encryption chip 1 for encryption and decryption processing; if the header information of the network traffic does not match any flow feature entry, it indicates that the network traffic belongs to the category that does not need to be encrypted.

[0050] Encryption context pointer: points to the corresponding MACsec secure channel and security association (SA) parameters;

[0051] Target encryption chip ID: Specifies which MACsec encryption chip the stream should be sent to; in this example, it is MACsec encryption chip 1.

[0052] Bypass flag: Initially set to 0, indicating that it is in normal encryption mode;

[0053] If MACsec encryption chip 1 is not faulty, the forwarding logic of switching chip 1 is as follows:

[0054] For network traffic that matches the flow feature entry in the traffic mapping table, the switching chip 1 adds an internal routing label to indicate that the target is the MACsec encryption chip 1, and then sends the network traffic to the MACsec encryption chip 1 through a high-speed channel.

[0055] For network traffic that does not match a flow feature entry in the traffic mapping table, switching chip 1 forwards it directly to the PHY / optical module port.

[0056] S202. Monitor whether the media access security encryption chip is faulty;

[0057] Optionally, multiple probe frames are sent to the Media Access Security Encryption Chip, and the response information corresponding to the probe frames is monitored.

[0058] If no response is received, it indicates that the media access security encryption chip is faulty.

[0059] In actual implementation, during system operation, switching chip 1 continuously monitors the health status of the MACsec encryption chip 1 connected to it. Specifically, switching chip 1 sends multiple probe frames to the internal control channel of MACsec encryption chip 1 through its high-speed interface Tx / Rx at preset time intervals (e.g., every 10 milliseconds). It should be noted that these probe frames are a special type of extremely low-priority internal data packet and do not contain actual user service data.

[0060] After sending a probe frame, switching chip 1 starts an internal timer to listen for the response frame returned by MACsec encryption chip 1. Under normal circumstances, upon receiving a probe frame, MACsec encryption chip 1 immediately generates a response frame through its internal control logic and sends it back to switching chip 1 via a high-speed channel. If switching chip 1 does not receive a response from MACsec encryption chip 1 within the preset maximum waiting time (e.g., a timeout of 3 milliseconds), switching chip 1 immediately sends multiple sets of probe frames, for example, three sets consecutively. If multiple consecutive probe frames (e.g., three sets consecutively) fail to receive the corresponding response frame, switching chip 1 confirms that MACsec encryption chip 1 has experienced an unrecoverable communication failure or hardware malfunction.

[0061] If the media access security encryption chip is not faulty, S203 will be executed;

[0062] S203. The network traffic through the switching device is forwarded to the Media Access Security Encryption Chip, so that the Media Access Security Encryption Chip can encrypt or decrypt the network traffic, and the Media Access Security Encryption Chip forwards the processed network traffic to the next level device.

[0063] If the media access security encryption chip malfunctions, execute S204;

[0064] S204. Forward network traffic to the next level device.

[0065] Once a malfunction is confirmed in MACsec encryption chip 1, the fault bypass and recovery module inside switch chip 1 is triggered. This module dynamically updates the forwarding rules within switch chip 1, specifically redirecting all network traffic output ports originally pointing to MACsec encryption chip 1 to physical ports directly connected to the PHY / optical module. When new network traffic (whether upstream or downstream) enters switch chip 1:

[0066] Uplink direction: If the network traffic originally required encryption, since the MACsec encryption chip 1 has failed, the switching chip 1 will no longer add a MACsec encapsulation header to it, but will directly forward the original plaintext data packet to the PHY / optical module through the high-speed interface, and then send it to the physical network.

[0067] Downlink direction: If the network traffic originally required decryption, due to the failure of MACsec encryption chip 1, switching chip 1 will directly forward the received data packets to the PHY / optical module in the same transparent manner.

[0068] In this way, although network transmission loses encryption protection, the connectivity of the physical link can be maintained, and the transmission of network traffic will not be interrupted due to a single point of failure of the encryption chip.

[0069] Furthermore, after the fault bypass and recovery module is triggered, the switching chip 1 can send probe frames to the MACsec encryption chip 1 at a lower frequency. Once the MACsec encryption chip 1 is detected to have returned to normal, the switching chip 1 updates the forwarding rules again and redirects the network traffic back to the encryption chip 1 for encryption and decryption processing.

[0070] Figure 2 The method shown has the following technical effects:

[0071] 1. This method monitors whether the media access security encryption chip is faulty. When a fault is detected in the media access security encryption chip, network traffic is directly forwarded to the next level device, avoiding link interruption caused by encryption chip failure. This ensures that network traffic can continue to be forwarded even in the event of encryption chip failure, thereby guaranteeing network reliability and service continuity.

[0072] 2. Since the switching chip can send probe frames in batches at extremely short cycles, if the encryption chip does not respond, the switching chip can quickly determine the fault within several probe cycles (for example, three consecutive no responses, with a total time of about 30ms); using multiple probe frames to determine whether the encryption chip is faulty can prevent false judgments.

[0073] Since detecting MACsec encryption chip malfunctions by sending probe frames still consumes bandwidth and processing resources, and may not detect problems in a timely manner even when the MACsec encryption chip has internal logic abnormalities but the communication link is normal, this embodiment provides another method for monitoring whether a media access security encryption chip is malfunctioning. This method includes:

[0074] Read the total value of the status register inside the media access security encryption chip. The total value indicates the total number of abnormal events detected by the status register. The total value is positively correlated with the total number of events.

[0075] If the total value exceeds the preset threshold, it is determined that the media access security encryption chip is faulty.

[0076] In one possible implementation, the encryption chip may have a dedicated status register, including a global anomaly counter. During encryption / decryption, key negotiation, and integrity verification, the MACsec encryption chip monitors various internal anomaly events in real time, including but not limited to:

[0077] Decryption failed, for example, due to an integrity check error;

[0078] Key negotiation timed out;

[0079] Network traffic data packet format error;

[0080] Loss of clock synchronization;

[0081] Whenever any of the above-mentioned abnormal events occurs, the hardware logic inside the MACsec encryption chip automatically increments the total value of the corresponding global abnormal counter by 1. It should be noted that this global abnormal counter is a read-only register that stores the total number of all abnormal events that have occurred since the switching chip was powered on or reset.

[0082] The switching chip obtains the current total value of the MACsec encryption chip's global anomaly counter by sending a read command to the MACsec encryption chip according to a preset sampling period, such as every 100 milliseconds. The switching chip has a preset fault determination threshold (preset threshold), which can be, for example, 5000. If the current total value of the global anomaly counter is less than or equal to the preset threshold, the MACsec encryption chip is considered to be in a normal state; if the current total value of the global anomaly counter is greater than the preset threshold, the MACsec encryption chip is considered to be in a fault state.

[0083] The above scheme determines whether the MACsec encryption chip is faulty by reading the total value of the status register inside the MACsec encryption chip. It is based on the cumulative number of real abnormal events in the global abnormal counter. Compared with the method of probing frames, it does not consume bandwidth and processing resources. Moreover, it can still detect whether the MACsec encryption chip is faulty even when the internal logic of the MACsec encryption chip is abnormal but the communication link is normal.

[0084] In the aforementioned embodiments, the health status of the encryption chip is determined by reading a single global anomaly counter and comparing it with a preset threshold. This method has relatively low processing overhead and is suitable for large-scale port scenarios. However, different types of anomalies have vastly different impacts on the encryption chip's functionality and network security. For example, a key negotiation timeout might only be a momentary disturbance, while an integrity check failure could indicate a hardware defect in the encryption chip's encryption engine. Treating all anomalies the same could easily lead to overreaction to minor anomalies or underreporting of serious anomalies. Therefore, this embodiment provides another method for reading the total value of the status register, which includes:

[0085] Read the exception count values ​​of multiple status registers. The exception count value is positively correlated with the number of occurrences of the corresponding type of exception event.

[0086] The weighted sum of the outlier counts is calculated based on the weights corresponding to each outlier count, and this sum is used as the total value.

[0087] Specifically, during the design of MACsec encryption chips, possible internal abnormal events can be categorized into several types, and an independent status register is assigned to each type of abnormal event as an abnormality counter. The possible categories are as follows:

[0088]

[0089] Whenever a certain type of abnormal event occurs, the corresponding counter automatically increments by 1. These counters are all read-only registers, accumulating from the moment the encryption chip powers on. The switching chip reads the abnormal count values ​​of these counters through the management channel.

[0090] The switching chip has pre-defined weighting coefficients for each anomaly type to reflect the severity of the anomaly's impact on system security. These weighting coefficients can be set based on factors including reliability data provided by the chip manufacturer, historical operational experience, and business security level requirements. For example, the weighting coefficients are configured as follows:

[0091]

[0092] The switching chip reads the current abnormal count values ​​of the above five abnormal counters sequentially according to a preset sampling period, such as 50ms, and records them as C1_val, C2_val, C3_val, C4_val, and C5_val;

[0093] The total weighted_total is:

[0094] weighted_total=W1×C1_val+W2×C2_val+W3×C3_val+W4×C4_val+W5×C5_val;

[0095] Where W1-W5 are the weight coefficients for the corresponding anomaly types.

[0096] When the total value exceeds a preset threshold, the MACsec encryption chip is deemed to be faulty.

[0097] The above scheme, by assigning different weights to different types of abnormal events, can accurately reflect the actual risk status of the encryption chip. Furthermore, the weighting coefficients can be customized by network administrators according to security policies. For example, in high-security scenarios such as financial and government affairs, the weight of critical types of abnormal events can be increased; in low-security scenarios such as ordinary office networks, the weights can be appropriately reduced to avoid unnecessarily determining that the encryption chip is faulty.

[0098] In the aforementioned embodiments, when the MACsec encryption chip fails, the switching chip unconditionally forwards all network traffic that would otherwise require encryption to the next-level device in plaintext. While this method ensures the connectivity of the communication link, for certain services with extremely high security requirements, direct plaintext transmission may pose a serious risk of information leakage. Therefore, a more refined traffic processing strategy is needed to take differentiated measures based on the importance of the traffic when a failure occurs. Therefore, this embodiment provides another method for forwarding network traffic. Figure 3 This is a schematic flowchart of a method for forwarding network traffic provided in an embodiment of this application, as shown below. Figure 3 As shown, if the media access security encryption chip malfunctions, network traffic will be forwarded to the next level device, including:

[0099] S301. Obtain the attribute information of network traffic, including at least one of the following: source media access control address, destination media access control address, virtual LAN identifier, and port number;

[0100] After receiving network traffic to be forwarded, the switching chip extracts the header fields of the network traffic to obtain its attribute information, which includes, but is not limited to: source MAC address; destination MAC address; VLAN ID; and port number.

[0101] S302. Determine the sensitivity score of network traffic based on attribute information;

[0102] The switching chip has a pre-installed sensitivity configuration table, which records the sensitivity score corresponding to different attribute values. For example:

[0103] The sensitivity score corresponding to the destination MAC address "00-1A-2B-3C-4D-5E" (assuming it is the core server's MAC address) is 90.

[0104] The sensitivity score corresponding to VLAN ID 100 (assuming it is a production service VLAN) is 80 points;

[0105] A sensitivity score of 10 points is given for a source MAC address that is a broadcast address or an unknown address.

[0106] The sensitivity score corresponding to port number 1 (assuming it is the management port) is 70.

[0107] Administrators can dynamically adjust the values ​​in the sensitivity configuration table through the management interface according to the actual business scenario.

[0108] The switching chip can directly calculate the sum of the sensitivity scores corresponding to each attribute information as the sensitivity score of the network traffic. Optionally, after obtaining the sensitivity scores corresponding to multiple attribute information, a weighted sum of the sensitivity scores can be calculated as the sensitivity score based on the weights corresponding to each sensitivity score. Specifically:

[0109]

[0110] The weighting coefficients can be pre-configured by the administrator based on the importance of the business. For example, the destination MAC address has a weight of 0.5, the VLAN ID has a weight of 0.3, and the port number has a weight of 0.2, and the sum of all weights is 1. For instance, if the destination MAC address of the network traffic to be forwarded corresponds to a sensitivity score of 90 and a weight of 0.5, it contributes 45 points; the VLAN ID corresponds to a sensitivity score of 80 and a weight of 0.3, contributing 24 points; and the port number corresponds to a sensitivity score of 70 and a weight of 0.2, contributing 14 points, then the sensitivity score of the network traffic to be forwarded is 45 + 24 + 14 = 83 points.

[0111] S303. Determine whether the sensitivity score is lower than the preset threshold;

[0112] The switching chip compares the calculated sensitivity score with a system-preset security threshold (e.g., a threshold of 60 points). Similarly, this threshold can be configured by the administrator according to the network's security level requirements.

[0113] If the sensitivity score is lower than the preset threshold, execute S304 and forward the network traffic to the next level device in plaintext.

[0114] If the sensitivity score is lower than the preset threshold, it indicates that the network traffic belongs to low-sensitivity services. The switching chip will forward the network traffic directly to the PHY / optical module in plaintext and send it to the next level device. This can ensure the continuity of low-priority services and prevent them from being affected by encryption chip failure.

[0115] If the sensitivity score is not lower than the preset threshold, then execute S305 and cache network traffic.

[0116] If the sensitivity score is not lower than a preset threshold, it indicates that the data flow is a high-sensitivity service. Due to a faulty encryption chip, encryption protection cannot be provided, and direct plaintext forwarding poses a security risk. Therefore, the switching chip caches this network traffic in an internal dedicated buffer queue and suspends forwarding. Simultaneously, the switching chip can send an alarm message to the upper-layer control plane, notifying the network administrator of the encryption chip failure and indicating that the high-sensitivity service has been suspended. A decision on whether to continue forwarding or discard these cached data packets will be made after the encryption chip recovers or after manual intervention by the administrator.

[0117] Furthermore, the switching chip can also set a timeout discard mechanism for cached network traffic. If the cache time exceeds the preset duration (e.g., 30 seconds), the data packets of that network traffic will be automatically discarded to prevent cache overflow.

[0118] Figure 3The proposed solution, by introducing a sensitivity scoring mechanism, can differentiate the importance of different services, cache and protect highly sensitive traffic, and prevent it from being exposed in an unencrypted environment, thereby significantly reducing the risk of data leakage.

[0119] By integrating information from multiple dimensions such as source MAC address, destination MAC address, VLAN identifier, and port number, and assigning different weights to each dimension, the actual security level of data flow can be more comprehensively and accurately characterized. The sensitivity score corresponding to each attribute value and the weight of each attribute can be pre-configured by the administrator, making the sensitivity scoring system adaptable to the requirements of different industries and different security levels, and possessing good versatility and scalability.

[0120] Figure 4 This is a schematic diagram of a network traffic processing device provided in an embodiment of this application, as shown below. Figure 4 As shown, the device 40 includes:

[0121] Monitoring module 401 is used to monitor whether the media access security encryption chip is faulty;

[0122] Forwarding module 402 is used for:

[0123] If the Media Access Security Encryption Chip is not faulty, network traffic through the switching device will be forwarded to the Media Access Security Encryption Chip so that the Media Access Security Encryption Chip can encrypt or decrypt the network traffic. The Media Access Security Encryption Chip will then forward the processed network traffic to the next level device.

[0124] If the media access security encryption chip malfunctions, network traffic will be forwarded to the next level device.

[0125] Figure 5 This is a schematic diagram of the electronic device structure provided in the embodiments of this application, such as... Figure 5 As shown, the device 50 includes at least one processor 501 and a memory 502. Optionally, the device 50 also includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus 504.

[0126] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.

[0127] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0128] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0129] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0130] 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 this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.

[0131] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0132] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.

[0133] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.

[0134] When integrated units / modules are implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor can be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.

[0135] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0136] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.

[0137] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0138] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A network traffic processing method, characterized in that, The method is applied to a switching chip in a switching device, the switching device further comprising a media access security encryption chip physically separated from the switching chip, the switching chip being communicatively connected to the media access security encryption chip, the method comprising: Monitor the media access security encryption chip for malfunctions; If the Media Access Security Encryption Chip is not faulty, the network traffic through the switching device will be forwarded to the Media Access Security Encryption Chip so that the Media Access Security Encryption Chip can encrypt or decrypt the network traffic, and the Media Access Security Encryption Chip will forward the processed network traffic to the next level device. If the media access security encryption chip malfunctions, the network traffic will be forwarded to the next-level device.

2. The method according to claim 1, characterized in that, The monitoring of whether the media access security encryption chip is faulty includes: Multiple probe frames are sent to the media access security encryption chip, and the media access security encryption chip is monitored to see whether it sends the response information corresponding to the probe frames. If the response information is not received, it is determined that the media access security encryption chip is faulty.

3. The method according to claim 1, characterized in that, The monitoring of whether the media access security encryption chip is faulty includes: The total value of the status register inside the media access security encryption chip is read. The total value is used to indicate the total number of abnormal events detected by the status register. The total value is positively correlated with the total number of events. If the total value is greater than a preset threshold, it is determined that the media access security encryption chip is faulty.

4. The method according to claim 3, characterized in that, The total value read from the status register inside the media access security encryption chip includes: Read the exception count value of each of the multiple status registers, wherein the exception count value is positively correlated with the number of occurrences of the corresponding type of exception event; The weighted sum of the abnormal counts is calculated based on the weights corresponding to each of the abnormal counts, and this sum is used as the total value.

5. The method according to claim 1, characterized in that, If the media access security encryption chip malfunctions, forwarding the network traffic to the next-level device includes: Obtain the attribute information of the network traffic, the attribute information including at least one of the following: source media access control address, destination media access control address, virtual LAN identifier, and port number; Based on the attribute information, a sensitivity score for the network traffic is determined; If the sensitivity score is lower than a preset threshold, the network traffic will be forwarded to the next-level device in plaintext. If the sensitivity score is not lower than the preset threshold, then the network traffic is cached.

6. The method according to claim 5, characterized in that, The step of determining the sensitivity score of the network traffic based on the attribute information includes: Obtain the sensitivity score corresponding to each of the multiple attribute information; The sensitivity score is calculated as a weighted sum of the sensitivity scores based on the weights corresponding to each sensitivity score.

7. A network traffic processing device, characterized in that, The device is applied to a switching chip in a switching device, the switching device further comprising a media access security encryption chip physically separated from the switching chip, the switching chip being communicatively connected to the media access security encryption chip, the device comprising: The monitoring module is used to monitor whether the media access security encryption chip is faulty; Forwarding module, used for: If the Media Access Security Encryption Chip is not faulty, the network traffic through the switching device will be forwarded to the Media Access Security Encryption Chip so that the Media Access Security Encryption Chip can encrypt or decrypt the network traffic, and the Media Access Security Encryption Chip will forward the processed network traffic to the next level device. If the media access security encryption chip malfunctions, the network traffic will be forwarded to the next-level device.

8. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.