A method and apparatus for information exchange using multiple Ethernet switches

By recording switch port traffic data and topology status, and combining machine learning and adaptive loop prevention methods, the problems of data partiality and insufficient loop prevention in existing switch information exchange technologies are solved, achieving accuracy and dynamic security of network topology.

CN119922115BActive Publication Date: 2025-10-31TIANJIN OPTOELECTRONICS GRP XINAN ADVANCED TECH (JIANGSU) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510073319.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-10-31
Estimated Expiration
2045-01-17

AI Technical Summary

Technical Problem

In existing switch information exchange technologies, network monitoring equipment only records transmission traffic data and ignores network topology status, resulting in data bias and a lack of in-depth feature mining. Loop prevention and risk identification rely on static rules, making it difficult to adapt to dynamic network environments.

Method used

By recording switch port traffic data through network monitoring equipment, capturing switch connection relationships, integrating traffic data and topology status, using machine learning algorithms to build a forwarding path prediction model, using adaptive loop prevention methods to identify risk areas, formulating port status adjustment strategies, and configuring switch devices through API interfaces.

Benefits of technology

It achieves accurate and comprehensive monitoring of the network topology status of switches, improves the reliability and predictive accuracy of feature analysis, dynamically adjusts port status, ensures network security and stability, and adapts to dynamic environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119922115B_ABST
    Figure CN119922115B_ABST
Patent Text Reader

Abstract

This invention discloses a method and apparatus for information exchange among multiple Ethernet switches, relating to the field of switch information exchange technology. The method includes recording transmission traffic data of switch ports using a network monitoring device and capturing the connection relationships between switches in the network to obtain transmission traffic data and network topology status; integrating the transmission traffic data and network topology status to form a raw switch dataset; preprocessing the raw switch dataset to obtain a preprocessed feature vector set; constructing a forwarding path prediction model based on a machine learning algorithm, inputting the feature vector set into the forwarding path prediction model, outputting a forwarding path, and forwarding data frames based on the forwarding path; using an adaptive loop prevention method to identify risk areas in the data frame forwarding process and generating identification results; and based on the identification results, formulating a port status adjustment strategy to adjust the port status and obtain an updated port status.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information exchange technology for switches, and in particular to an information exchange method and apparatus for multiple Ethernet switches. Background Technology

[0002] Switch information exchange technology refers to the technology that enables efficient and secure transmission of data frames through switching devices in network communication.

[0003] In the field of information exchange technology for switches, existing network monitoring equipment only records transmission traffic data while ignoring the network topology status, resulting in one-sided data that cannot fully reflect the true state of the network. Furthermore, existing methods often rely on simple statistical features for feature extraction, lacking effective mining of deep features. At the same time, existing technologies often rely on static rules for loop prevention and risk area identification, making it difficult to adapt to dynamically changing network environments. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides a method for information exchange among multiple Ethernet switches to address the problem that existing methods often rely on simple statistical features for feature extraction and lack effective mining of deep features.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0007] In a first aspect, the present invention provides an information exchange method for multiple Ethernet switches, comprising: recording transmission traffic data of switch ports through a network monitoring device, capturing the connection relationship between switches in the network, obtaining transmission traffic data and network topology status, and integrating the transmission traffic data and network topology status to form a raw dataset of switches;

[0008] The original dataset of the switch is preprocessed to obtain a preprocessed feature vector set.

[0009] A forwarding path prediction model is constructed based on machine learning algorithms. The feature vector set is input into the forwarding path prediction model, and the forwarding path is output. Data frames are forwarded based on the forwarding path.

[0010] An adaptive loop prevention method is used to identify risky regions during data frame forwarding and generate identification results.

[0011] Based on the identification results, a port status adjustment strategy is formulated to adjust the port status and obtain the updated port status.

[0012] Configure the switch device using the API interface based on the updated port status.

[0013] As a preferred embodiment of the information exchange method for multiple Ethernet switches described in this invention, the steps of recording the transmission traffic data of the switch ports through a network monitoring device, capturing the connection relationships between switches in the network, obtaining the transmission traffic data and network topology status, and integrating the transmission traffic data and network topology status to form the original switch dataset are as follows:

[0014] Configure the network monitoring device Prometheus to record the transmission traffic data of the switch ports;

[0015] The LLDP protocol is used to capture the connection relationships between switches in the network, parse the links, and collect switch protocol data packets.

[0016] By querying the switch protocol data packets using the SNMP v2c network management protocol, the switch interface status, MAC address, and ARP information in the switch protocol data packets can be obtained, and the network topology status can be obtained.

[0017] The transmission traffic data is aligned with the timestamps in the network topology status and stored in a centralized database to form the switch's raw dataset.

[0018] As a preferred embodiment of the information exchange method for multiple Ethernet switches according to the present invention, the step of preprocessing the original dataset of the switch to obtain a preprocessed feature vector set includes:

[0019] A low-pass filter is used to remove noise from the transmission traffic data and network topology status in the original dataset of the switch, resulting in a preliminary dataset after noise removal.

[0020] The initial dataset after noise removal is standardized to obtain the standardized dataset S;

[0021] Based on the standardized dataset S, principal component features ω are extracted using an autoencoder and sparse PCA methods, expressed as follows:

[0022] ω=(SS θ W k +α·AEder(S)+β·SPCA(S);

[0023] Among them, S θ W is the mean vector of the standardized dataset S. k It is a projection matrix composed of the eigenvectors corresponding to the first k largest eigenvalues, where α and β are weight parameters, AEder(S) is the component feature extracted by the autoencoder, and SPCA(S) is the component feature extracted by sparse PCA.

[0024] The maximum variance direction feature in the principal component feature ω is set as... The second largest variance directional feature is set as

[0025] Based on maximum variance direction feature and second largest variance directional features The feature vector set is constructed using the following expression:

[0026]

[0027] Where H is the feature vector set, and These are principal component features extracted by sparse PCA, where α is the weighting parameter.

[0028] As a preferred embodiment of the information exchange method for multiple Ethernet switches described in this invention, the steps of constructing a forwarding path prediction model based on a machine learning algorithm, inputting a feature vector set into the forwarding path prediction model, outputting a forwarding path, and forwarding data frames based on the forwarding path are as follows:

[0029] A forwarding path prediction model is constructed based on the feature vector set H and the support vector machine (SVM) algorithm.

[0030] The feature vector set H is divided into a training set and a validation set. The data of the i-th sample in the training set is set as H. i The class of the i-th sample in the training set is set as y. i ;

[0031] Combine the feature vector set H and the data H of the i-th sample in the training set. i In the input forwarding path prediction model, a decision function is used to calculate the prediction result of the forwarding path, and the expression is:

[0032]

[0033]

[0034] Where Y is the predicted forwarding path, b represents the bias term in the decision function, and α i Let K(H,H) be the Lagrange multiplier for the i-th sample. i ) is the kernel function, γ is the parameter of the kernel function, exp represents the exponential function, and n represents the number of training samples in the training set;

[0035] Data frames are forwarded based on the predicted forwarding path Y.

[0036] As a preferred embodiment of the information exchange method for multiple Ethernet switches described in this invention, the steps for identifying risk areas during data frame forwarding using an adaptive loop prevention method and generating identification results are as follows:

[0037] Integrate all predicted forwarding paths to obtain the candidate path set P, the th... Candidate paths This represents the candidate path from the previous starting point to the current starting point. Index variables representing candidate paths;

[0038] For the Candidate paths Collect transmission traffic data of links along its path. Link volatility and the length of the link

[0039] Define the loop risk assessment index, with the following expression:

[0040]

[0041] in, For the first Risk scores for each candidate path, where w1, w2, and w3 are weighting coefficients. Candidate paths Uplink length, Candidate paths Uplink transmission traffic data, Candidate paths Uplink volatility;

[0042] Set a risk threshold M to filter all risk scores. Candidate paths exceeding the risk threshold M are considered as risk regions, expressed as:

[0043]

[0044] Where Z represents the risk area. For the first The risk score for each candidate path, where M is the risk threshold. Indicates the first 10 candidate paths.

[0045] As a preferred embodiment of the information exchange method for multiple Ethernet switches according to the present invention, the specific steps of adjusting the port status based on the identification result to obtain the adjusted port status are as follows:

[0046] Based on all risk scores For candidate paths exceeding the risk threshold M, find the port connected to the risk region Z;

[0047] Detect port status ∩, where port status refers to whether it is open, closed, or blocked;

[0048] When the port status ∩ is open, it means that the port is currently allowing traffic data to pass through;

[0049] When the port status ∩ is closed, it means that the port has been disabled and no data traffic is allowed to pass through.

[0050] When the port status ∩ is blocked, it means that the port receives but does not send data packets;

[0051] Develop port status adjustment strategies based on risk areas and port status;

[0052] When a port is in a risky area and its status is open, change the port status from open to closed.

[0053] No adjustment is needed when the port is in a risky area and the port status is closed;

[0054] When a port is in a risky area and its status is blocked, its priority is reduced, and the Spanning Tree Protocol (STP) is modified to make it a secondary choice when the network selects a path.

[0055] In a preferred embodiment of the information exchange method for multiple Ethernet switches described in this invention, the following steps are taken: updating the port status using an iterative optimization method based on the adjusted port status, and configuring the switch device using an API interface based on the updated port status:

[0056] Based on the adjusted port status, when a port is still in a risk area, the risk score of each path is recalculated using the loop risk assessment index expression and marked as a new risk area;

[0057] Enable Access Control List (ACL) to restrict the types of traffic through this port and block unnecessary communication; enable Port Security to limit the maximum number of MAC addresses allowed on the port and prevent unauthorized devices from accessing it.

[0058] If the port is not in a risky area, no update is required;

[0059] Based on the updated port status, select the SNMP interface protocol to configure network management for the switch device;

[0060] Synchronize network management configurations to all connected switch devices and complete information exchange between all switch devices.

[0061] In a second aspect, the present invention provides an information exchange device for multiple Ethernet switches, comprising: a data acquisition module, a data processing module, a path prediction module, a risk identification module, a port status module, and a configuration module;

[0062] The data processing module is used to record the transmission traffic data of the switch ports through the network monitoring equipment, capture the connection relationship between switches in the network, obtain the transmission traffic data and network topology status, and integrate the transmission traffic data and network topology status to form the original dataset of the switch.

[0063] The data processing module is used to preprocess the original dataset of the switch to obtain a preprocessed feature vector set;

[0064] The path prediction module is used to construct a forwarding path prediction model based on machine learning algorithms, input the feature vector set into the forwarding path prediction model, output the forwarding path, and forward the data frame based on the forwarding path.

[0065] The risk identification module is used to identify risk areas in the data frame forwarding process using an adaptive loop prevention method and generate identification results;

[0066] The port status module is used to formulate a port status adjustment strategy based on the identification results to adjust the port status and obtain the adjusted port status.

[0067] The configuration module is used to update the port status using an iterative optimization method, and to configure the switch device using an API interface based on the updated port status.

[0068] Thirdly, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein the computer program, when executed by the processor, implements any step of the information exchange method of the multi-Ethernet switch as described in the first aspect of the present invention.

[0069] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the information exchange method of the multi-Ethernet switch as described in the first aspect of the present invention.

[0070] The beneficial effects of this invention are as follows: By configuring the network monitoring device Prometheus, comprehensive recording of the transmission traffic data of switch ports is achieved. Simultaneously, the LLDP protocol is used to capture the connection relationships between switches, and the SNMP v2c protocol is used to obtain detailed switch interface status, MAC address, and ARP information, ensuring the accuracy of the network topology status. By performing low-pass filtering on the original switch dataset, noise interference is removed, resulting in a cleaner preliminary dataset. Further standardization processing makes the various features in the dataset comparable, improving the reliability of subsequent analysis. A forwarding path prediction model is constructed using the support vector machine algorithm, dividing the feature vector set into training and validation sets to ensure the generalization ability and stability of the forwarding path prediction model. The prediction results of the forwarding path are calculated using a decision function, which not only considers the sample category labels but also introduces a kernel function to adapt to nonlinear relationships, improving the accuracy of the prediction. Attached Figure Description

[0071] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0072] Figure 1 This is a flowchart of the information exchange method of multiple Ethernet switches in Example 1.

[0073] Figure 2 This is a diagram of the information exchange device of the multiple Ethernet switches in Example 1. Detailed Implementation

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

[0075] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0076] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0077] Example 1, referring to Figure 1 and Figure 2 This is the first embodiment of the present invention, which provides a method for information exchange among multiple Ethernet switches, including the following steps:

[0078] S1. Record the transmission traffic data of the switch ports through network monitoring equipment, capture the connection relationship between switches in the network, obtain the transmission traffic data and network topology status, integrate the transmission traffic data and network topology status to form the original dataset of the switch.

[0079] Furthermore, configure the network monitoring device Prometheus to record the transmission traffic data of the switch ports;

[0080] The LLDP protocol is used to capture the connection relationships between switches in the network, parse the links, and collect switch protocol data packets.

[0081] By querying the switch protocol data packets using the SNMP v2c network management protocol, the switch interface status, MAC address, and ARP information in the switch protocol data packets can be obtained, and the network topology status can be obtained.

[0082] Align the transmission traffic data with the timestamps in the network topology status and store them in a centralized database to form the switch's raw dataset;

[0083] It should be noted that this step ensures the integrity and consistency of the data, enabling subsequent analysis to be based on accurate time series. By using Prometheus, LLDP, and SNMP v2c protocols, not only is comprehensive data acquisition achieved, but the diversity and reliability of data sources are also guaranteed. The resulting raw dataset of the switch provides a solid foundation for subsequent processing and analysis.

[0084] S2. Preprocess the original dataset of the switch to obtain the preprocessed feature vector set;

[0085] Furthermore, a low-pass filter is used to remove noise from the transmission traffic data and network topology status in the original dataset of the switch, resulting in a preliminary dataset after noise removal.

[0086] The initial dataset after noise removal is standardized to obtain the standardized dataset S;

[0087] Based on the standardized dataset S, principal component features ω are extracted using an autoencoder and sparse PCA methods, expressed as follows:

[0088] ω=(SS θ W k +α·AEder(S)+β·SPCA(S);

[0089] Among them, S θ W is the mean vector of the standardized dataset S. k It is a projection matrix composed of the eigenvectors corresponding to the first k largest eigenvalues, where α and β are weight parameters, AEder(S) is the component feature extracted by the autoencoder, and SPCA(S) is the component feature extracted by sparse PCA.

[0090] The maximum variance direction feature in the principal component feature ω is set as... The second largest variance directional feature is set as

[0091] Based on maximum variance direction feature and second largest variance directional features The feature vector set is constructed using the following expression:

[0092]

[0093] Where H is the feature vector set, and These are principal component features extracted by sparse PCA, where α is the weighting parameter.

[0094] It should be noted that the preprocessing step effectively reduces noise interference and improves the quality of the feature vector set. The standardization process ensures the comparability of different features, while the application of autoencoders and sparse PCA methods extracts key features from complex data, simplifies the subsequent modeling process, and retains important information.

[0095] S3. Construct a forwarding path prediction model based on machine learning algorithms, input the feature vector set into the forwarding path prediction model, output the forwarding path, and forward the data frame based on the forwarding path.

[0096] Furthermore, a forwarding path prediction model is constructed based on the feature vector set H and the support vector machine (SVM) algorithm;

[0097] The feature vector set H is divided into a training set and a validation set. The data of the i-th sample in the training set is set as H. i The class of the i-th sample in the training set is set as y. i ;

[0098] Combine the feature vector set H and the data H of the i-th sample in the training set. i In the input forwarding path prediction model, a decision function is used to calculate the prediction result of the forwarding path, and the expression is:

[0099]

[0100]

[0101] Where Y is the predicted forwarding path, b represents the bias term in the decision function, and α i Let K(H,H) be the Lagrange multiplier for the i-th sample. i ) is the kernel function, γ is the parameter of the kernel function, exp represents the exponential function, and n represents the number of training samples in the training set;

[0102] Based on the predicted forwarding path Y, the data frames are forwarded.

[0103] It should be noted that the forwarding path prediction model built using the SVM algorithm can find the optimal hyperplane in high-dimensional space, thereby achieving accurate path prediction. By dividing the training set and the validation set, the generalization ability and stability of the forwarding path prediction model are ensured, the prediction accuracy is improved, and the forwarding efficiency of data frames is optimized.

[0104] S4. Use an adaptive loop prevention method to identify risk areas in the data frame forwarding process and generate identification results;

[0105] Furthermore, by integrating all predicted forwarding paths, a candidate path set P is obtained. Candidate paths This represents the candidate path from the previous starting point to the current starting point. Index variables representing candidate paths;

[0106] For the Candidate paths Collect transmission traffic data of links along its path. Link volatility and the length of the link

[0107] Define the loop risk assessment index, with the following expression:

[0108]

[0109] in, For the first Risk scores for each candidate path, where w1, w2, and w3 are weighting coefficients. Candidate paths Uplink length, Candidate paths Uplink transmission traffic data, Candidate paths Uplink volatility;

[0110] Set a risk threshold M to filter all risk scores. Candidate paths exceeding the risk threshold M are considered as risk regions, expressed as:

[0111]

[0112] Where Z represents the risk area. For the first The risk score for each candidate path, where M is the risk threshold. Indicates the first Candidate paths;

[0113] It should be noted that the loop risk assessment index comprehensively considers link length, transmission traffic, and volatility, ensuring the comprehensiveness and accuracy of the risk assessment. By setting risk thresholds, high-risk paths can be effectively identified, providing a scientific basis for subsequent risk management and port status adjustments.

[0114] S5. Based on the identification results, formulate a port status adjustment strategy to adjust the port status and obtain the updated port status;

[0115] Furthermore, based on all risk scores For candidate paths exceeding the risk threshold M, find the port connected to the risk region Z;

[0116] Check port status ∩, where port status refers to whether it is open, closed, or blocked;

[0117] When the port status ∩ is open, it means that the port is currently allowing traffic data to pass through;

[0118] When the port status ∩ is closed, it means that the port has been disabled and no data traffic is allowed to pass through.

[0119] When the port status ∩ is blocked, it means that the port receives but does not send data packets;

[0120] Develop port status adjustment strategies based on risk areas and port status;

[0121] When a port is in a risky area and its status is open, change the port status from open to closed.

[0122] No adjustment is needed when the port is in a risky area and the port status is closed;

[0123] When a port is in a risky area and its status is blocked, its priority is reduced, and the Spanning Tree Protocol (STP) is modified to make it a secondary choice when the network selects a path.

[0124] It should be noted that the port status adjustment strategy aims to minimize the impact of risky areas and ensure network security and stable operation. By dynamically adjusting port status, potential threats can be addressed in a timely manner, and network performance and data transmission security can be guaranteed. Specific measures include closing high-risk ports, keeping closed ports unchanged, and adjusting the priority of blocked ports to prevent loop formation.

[0125] S6. Configure the switch device using the API interface based on the updated port status;

[0126] Furthermore, based on the adjusted port status, when a port is still in a risk area, the risk score of each path is recalculated using the loop risk assessment index expression and marked as a new risk area;

[0127] Enable Access Control List (ACL) to restrict the types of traffic through this port and block unnecessary communication; enable Port Security to limit the maximum number of MAC addresses allowed on the port and prevent unauthorized devices from accessing it.

[0128] If the port is not in a risky area, no update is required;

[0129] Based on the updated port status, select the SNMP interface protocol to configure network management for the switch device;

[0130] Synchronize network management configurations to all connected switch devices and complete information exchange between all switch devices;

[0131] It should be noted that configuration via API interface enables automated and intelligent network management, ensuring configuration consistency and real-time performance. Enabling ACL and Port Security enhances network security, preventing unauthorized access and abnormal traffic. Continuous risk assessment and configuration update mechanisms enable the system to flexibly respond to constantly changing network environments, ensuring the efficient operation and security of the overall network.

[0132] This embodiment also provides an information exchange device for multiple Ethernet switches, including: a data acquisition module, a data processing module, a path prediction module, a risk identification module, a port status module, and a configuration module;

[0133] The data processing module is used to record the transmission traffic data of the switch ports through network monitoring equipment, capture the connection relationship between switches in the network, obtain the transmission traffic data and network topology status, and integrate the transmission traffic data and network topology status to form the original dataset of the switch.

[0134] The data processing module is used to preprocess the original dataset of the switch to obtain a preprocessed feature vector set;

[0135] The path prediction module is used to build a forwarding path prediction model based on machine learning algorithms. It inputs the feature vector set into the forwarding path prediction model, outputs the forwarding path, and forwards the data frame based on the forwarding path.

[0136] The risk identification module is used to identify risk areas in the data frame forwarding process using an adaptive loop prevention method and generate identification results.

[0137] The port status module is used to adjust the port status based on the identification results by formulating a port status adjustment strategy, and obtain the adjusted port status.

[0138] The configuration module is used to update the port status using an iterative optimization method, and to configure the switch device using the API interface based on the updated port status.

[0139] This embodiment also provides a computer device applicable to the information exchange method of multiple Ethernet switches, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the information exchange method of multiple Ethernet switches as proposed in the above embodiment.

[0140] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0141] This embodiment also provides a storage medium storing a computer program, which, when executed by a processor, implements the information exchange method for multiple Ethernet switches as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0142] In summary, this invention, by configuring the network monitoring device Prometheus, achieves comprehensive recording of traffic data transmitted through switch ports. Simultaneously, it employs the LLDP protocol to capture the connection relationships between switches and utilizes the SNMP v2c protocol to obtain detailed switch interface status, MAC addresses, and ARP information, ensuring the accuracy of network topology status. By applying a low-pass filter to the original switch dataset, noise interference is removed, resulting in a cleaner preliminary dataset. Further standardization ensures the comparability of various features in the dataset, improving the reliability of subsequent analysis. A forwarding path prediction model is constructed using the support vector machine algorithm, dividing the feature vector set into training and validation sets to ensure the generalization ability and stability of the forwarding path prediction model. The prediction results of the forwarding path are calculated using a decision function, which not only considers the sample category labels but also introduces a kernel function to adapt to nonlinear relationships, improving the accuracy of prediction.

[0143] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for information exchange among multiple Ethernet switches, characterized in that: include: By recording the transmission traffic data of the switch ports through network monitoring equipment and capturing the connection relationship between switches in the network, the transmission traffic data and network topology status are obtained. The transmission traffic data and network topology status are integrated to form the original dataset of the switches. The original dataset of the switch is preprocessed to obtain a preprocessed feature vector set. The specific steps are as follows: A low-pass filter is used to remove noise from the transmission traffic data and network topology status in the original dataset of the switch, resulting in a preliminary dataset after noise removal. The initial dataset after noise removal is standardized to obtain the standardized dataset. ; Based on the standardized dataset Principal component features were extracted using an autoencoder and sparse PCA methods. The expression is: ; in, It is a standardized dataset The mean vector, It is from the front The projection matrix consisting of the eigenvectors corresponding to the largest eigenvalues. and These are weight parameters. It is a component feature extracted through an autoencoder. It is a component feature extracted through sparse PCA; Principal component features The maximum variance direction feature in the data is set as follows: The second largest variance directional feature is set as ; Based on maximum variance direction feature and second largest variance directional features The feature vector set is constructed using the following expression: ; in, For the feature vector set, and It is a principal component feature extracted by sparse PCA. These are weight parameters; A forwarding path prediction model is constructed based on machine learning algorithms. The feature vector set is input into the forwarding path prediction model, and the forwarding path is output. Data frames are forwarded based on the forwarding path. An adaptive loop prevention method is used to identify risky regions during data frame forwarding and generate identification results. Based on the identification results, a port status adjustment strategy is formulated to adjust the port status and obtain the updated port status. Configure the switch device using the API interface based on the updated port status.

2. The information exchange method of multiple Ethernet switches as described in claim 1, characterized in that: The process involves recording the transmission traffic data of the switch ports using network monitoring equipment, capturing the connection relationships between switches in the network, obtaining transmission traffic data and network topology status, and integrating the transmission traffic data and network topology status to form the original switch dataset. The specific steps are as follows: Configure the network monitoring device Prometheus to record the transmission traffic data of the switch ports; The LLDP protocol is used to capture the connection relationships between switches in the network, parse the links, and collect switch protocol data packets. By querying the switch protocol data packets using the SNMP v2c network management protocol, the switch interface status, MAC address, and ARP information in the switch protocol data packets can be obtained, and the network topology status can be obtained. The transmitted traffic data is aligned with the timestamps in the network topology status and stored in a centralized database to form the switch's raw dataset.

3. The information exchange method of multiple Ethernet switches as described in claim 1, characterized in that: The method for constructing a forwarding path prediction model based on machine learning algorithms involves inputting a feature vector set into the model, outputting a forwarding path, and forwarding data frames based on that path. The specific steps are as follows: Based on feature vector set A forwarding path prediction model was constructed using the Support Vector Machine (SVM) algorithm; feature vector set Divided into training set and validation set, the training set is the first... The data for each sample is set as follows: Training Set No. The category of each sample is set as follows ; feature vector set and training set Data from one sample In the input forwarding path prediction model, a decision function is used to calculate the prediction result of the forwarding path, and the expression is: ; ; in, For the predicted forwarding path, This represents the bias term in the decision function. For the first Lagrange multipliers for a sample, For kernel function, These are the parameters of the kernel function. Represents an exponential function. Indicates the number of training samples in the training set; Predicted forwarding paths It forwards data frames.

4. The information exchange method of multiple Ethernet switches as described in claim 3, characterized in that: The steps for identifying risk areas during data frame forwarding using the adaptive loop prevention method and generating identification results are as follows: Integrate all predicted forwarding paths to obtain a candidate path set. , No. Candidate paths This represents the candidate path from the previous starting point to the current starting point. Index variables representing candidate paths; For the Candidate paths Collect transmission traffic data of links along its path. Link volatility and the length of the link ; Define the loop risk assessment index, with the following expression: ; in, For the first Risk score of candidate paths , , These are the weighting coefficients. Candidate paths Uplink length, Candidate paths Uplink transmission traffic data, Candidate paths Uplink volatility; Set risk threshold Filter all risk scores Greater than the risk threshold The candidate paths are used to form a risk area, expressed as: ; in, This is a high-risk area. For the first Risk score of candidate paths As a risk threshold, Indicates the first 10 candidate paths.

5. The information exchange method of multiple Ethernet switches as described in claim 4, characterized in that: Based on the identification results, a port status adjustment strategy is formulated to adjust the port status, resulting in the adjusted port status. The specific steps are as follows: Based on all risk scores Greater than the risk threshold Candidate paths were identified to connect with risk areas. Connected ports; Detect port status The port status refers to whether it is open, closed, or blocked; When port status When enabled, it means that the port is currently allowing traffic data to pass through; When port status When the port is closed, it means that the port has been disabled and no data traffic is allowed to pass through. When port status When the port is blocked, it means that the port receives but does not send data packets. Develop port status adjustment strategies based on risk areas and port status; When a port is in a risky area and its status is open, change the port status from open to closed. No adjustment is needed when the port is in a risky area and the port status is closed; When a port is in a risky area and its status is blocked, its priority is reduced, and the Spanning Tree Protocol (STP) is modified to make it a secondary choice when the network selects a path.

6. The information exchange method of multiple Ethernet switches as described in claim 5, characterized in that: The process involves updating the port status using an iterative optimization method, and then configuring the switch device via the API interface based on the updated port status. The specific steps are as follows: Based on the adjusted port status, when a port is still in a risk area, the risk score of each path is recalculated using the loop risk assessment index expression and marked as a new risk area; Enable Access Control List (ACL) to restrict the types of traffic through this port and block unnecessary communication; enable Port Security to limit the maximum number of MAC addresses allowed on the port and prevent unauthorized devices from accessing it. If the port is not in a risky area, no update is required; Based on the updated port status, select the SNMP interface protocol to configure network management for the switch device; Synchronize network management configurations to all connected switch devices and complete information exchange between all switch devices.

7. An information exchange device for multiple Ethernet switches, based on the information exchange method for multiple Ethernet switches according to any one of claims 1 to 6, characterized in that: include: The system includes a data acquisition module, a data processing module, a path prediction module, a risk identification module, a port status module, and a configuration module. The data processing module is used to record the transmission traffic data of the switch ports through the network monitoring equipment, capture the connection relationship between switches in the network, obtain the transmission traffic data and network topology status, and integrate the transmission traffic data and network topology status to form the original dataset of the switch. The data processing module is used to preprocess the original dataset of the switch to obtain a preprocessed feature vector set; The path prediction module is used to construct a forwarding path prediction model based on machine learning algorithms, input the feature vector set into the forwarding path prediction model, output the forwarding path, and forward the data frame based on the forwarding path. The risk identification module is used to identify risk areas in the data frame forwarding process using an adaptive loop prevention method and generate identification results; The port status module is used to formulate a port status adjustment strategy based on the identification results to adjust the port status and obtain the adjusted port status. The configuration module is used to update the port status using an iterative optimization method, and to configure the switch device using an API interface based on the updated port status.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the information exchange method of the multi-Ethernet switch according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the information exchange method of the multi-Ethernet switch according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • High-speed data transmission hub system and data transmission method

    CN118869572A