Network card management method and system, computer device, storage medium and program product
By analyzing network interface card (NIC) status through real-time monitoring and machine learning models, and combining software-defined network dynamic scheduling and hardware collaborative control, the problems of NIC anomaly detection, false switching, and latency were solved, achieving millisecond-level fault switching and improving NIC availability and service continuity.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-29
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies that detect network interface card (NIC) anomalies using fixed thresholds are prone to causing erroneous handovers or handover delays, affecting real-time services, and the rules for handling NIC failures have poor scalability.
By monitoring network interface card (NIC) status in real time, analyzing multi-dimensional indicators using machine learning models, generating early warning information, and based on software-defined network dynamic scheduling and hardware collaborative control, intelligent configuration and fault early warning of NICs are achieved, reducing fault switching latency to the millisecond level.
It improves the availability of network cards, meets the low latency requirements of real-time services, avoids network card communication interruptions, and reduces operation and maintenance costs.
Smart Images

Figure CN120710873B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of network card management, and in particular to a network card management method, system, computer device, storage medium and program product. BACKGROUND
[0002] The network card is a key device of cloud service, and the network card function needs to consider performance, scalability and reliability. In order to ensure the high availability of cloud service, the network traffic fault switching mechanism is designed for the network card at present, which ensures the continuous and stable operation of cloud service in complex network environment through hardware redundancy, protocol mechanism and automatic scheduling. With the development of cloud native technology, it is necessary to further integrate the network card and the network traffic fault switching mechanism with intelligence to improve the overall reliability of cloud service.
[0003] At present, the network traffic fault switching mechanism detects whether the network card is abnormal through a fixed threshold, and triggers an abnormal processing rule for hardware redundancy switching if the network card is abnormal. However, the fixed threshold cannot adapt to the dynamic change of network load, which is easy to cause mis-switching or switching delay, affecting real-time business. In addition, the rules for processing network card faults need to be manually updated to adapt to new fault scenarios, which has poor scalability. SUMMARY
[0004] Therefore, the present application provides a network card management method, system, computer device, storage medium and program product to solve the problem that the fixed threshold is used to detect whether the network card is abnormal, which is easy to cause mis-switching or switching delay, affecting real-time business, and the rules for processing network card faults have poor scalability.
[0005] In a first aspect, the present application provides a network card management method, which comprises:
[0006] obtaining state data of the network card;
[0007] determining predicted state data according to the state data;
[0008] determining a first comparison result of the predicted state data and a state data baseline, and a second comparison result of the state data and the state data baseline, wherein the state data baseline is generated according to historical state data of the network card;
[0009] using the first comparison result as a judgment reference, combining the first comparison result and the second comparison result to generate early warning information of the network card;
[0010] obtaining a network card configuration strategy according to the early warning information and the state data, and configuring the network card according to the network card configuration strategy.
[0011] In a second aspect, the present application provides a network card management system, which comprises a monitoring module, a strategy determination module and a network card configuration module.
[0012] The monitoring module is connected with the policy determination module, and is configured to acquire state data of the network card, determine predicted state data according to the state data, determine a first comparison result of the predicted state data and a state data baseline, determine a second comparison result of the state data and the state data baseline, take the first comparison result as a judgment criterion, combine the first comparison result and the second comparison result, generate early warning information of the network card, and transmit the early warning information to the policy determination module, wherein the state data baseline is generated according to historical state data of the network card.
[0013] The policy determination module is connected with the network card configuration module, and is configured to obtain a network card configuration policy according to the early warning information and the state data, and transmit the network card configuration policy to the network card configuration module.
[0014] The network card configuration module is configured to configure the network card according to the network card configuration policy.
[0015] In a third aspect, the present application provides a network card management device, which comprises:
[0016] The data acquisition module is configured to acquire state data of the network card.
[0017] The data prediction module is configured to determine predicted state data according to the state data.
[0018] The data comparison module is configured to determine a first comparison result of the predicted state data and a state data baseline, and determine a second comparison result of the state data and the state data baseline, wherein the state data baseline is generated according to historical state data of the network card.
[0019] The early warning module is configured to take the first comparison result as a judgment criterion, combine the first comparison result and the second comparison result, and generate early warning information of the network card.
[0020] The network card configuration module is configured to obtain a network card configuration policy according to the early warning information and the state data, and configure the network card according to the network card configuration policy.
[0021] In a fourth aspect, the present application provides a computer device, which comprises a memory and a processor, the memory and the processor are communicatively connected with each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the network card management method of the first aspect or any of the corresponding implementation manners thereof.
[0022] In a fifth aspect, the present application provides a computer readable storage medium, which stores computer instructions, and the computer instructions are used to make a computer execute the network card management method of the first aspect or any of the corresponding implementation manners thereof.
[0023] In a sixth aspect, the present application provides a computer program product comprising computer instructions for causing a computer to execute the network card management method of the first aspect or any of the corresponding embodiments thereof.
[0024] According to the present application, the predicted state data is determined according to the state data of the network card; the state data and the predicted state data are compared with the state data baseline respectively to obtain a first comparison result and a second comparison result; the first comparison result is taken as a judgment criterion, the first comparison result and the second comparison result are combined to generate the early warning information of the network card; the network card configuration strategy is obtained according to the early warning information and the state data, and the network card is configured by executing the network card configuration strategy. The problem that the network card is detected by a fixed threshold value, which is easy to cause mis-switching or switching delay, affects real-time business, and the rule for processing network card faults has poor expansibility can be solved. The method can shorten the delay of determining the network card fault and configuring the network card as a whole to milliseconds through the synergistic effect of hardware-level rapid response, software-defined network dynamic scheduling, and intelligent decision-making, avoid network card communication interruption, improve network card availability, and meet the requirement of real-time business for low delay. BRIEF DESCRIPTION OF DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the specific embodiments or the related art, the drawings needed to be used in the specific embodiments or the related art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0026] Figure 1 is a flowchart of a network card management method according to an embodiment of the present application;
[0027] Figure 2 is a flowchart of a multi-node network card fault-tolerant detection optimization method according to an embodiment of the present application;
[0028] Figure 3 is a structural schematic diagram of a network card management system according to an embodiment of the present application;
[0029] Figure 4 is an architecture diagram of a network card management system according to an embodiment of the present application;
[0030] Figure 5 is a timing diagram of the work flow of each module of a network card management system according to an embodiment of the present application;
[0031] Figure 6 is a structural block diagram of a network card management device according to an embodiment of the present application;
[0032] Figure 7 is a hardware structure schematic diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0034] The network card is the "infrastructure" of the cloud service network layer, and its function design needs to consider performance, scalability and reliability. Network traffic fault switching is the core guarantee of high availability of cloud services, which ensures the continuous and stable operation of services in complex network environments through hardware redundancy, protocol mechanisms and automated scheduling. With the development of cloud native technology, the network card and fault switching mechanism will further integrate intelligence, such as artificial intelligence-driven traffic prediction and switching strategy, to improve the overall reliability of cloud services.
[0035] Currently, the method for managing the network card and determining whether to perform network traffic fault switching detects the network card exception by using fixed thresholds of preset bandwidth utilization, packet loss rate and the like, and triggers hardware redundancy switching, such as direct switching of primary and backup network cards, when it is detected that the network card parameters exceed the corresponding thresholds. However, the above-mentioned method using fixed thresholds cannot adapt to dynamic changes of network load, which is easy to cause mis-switching or switching delay; lacks global optimization, only relies on a single fault detection dimension, and does not make a comprehensive decision in combination with traffic distribution, service priority and the like; performs switching only after the fault occurs, which is difficult to realize fault early warning and preventive optimization. In addition, when the network card is subjected to hardware redundancy switching at present, hardware switching is performed based on preset rules by using a complex programmable logic device, and static SDN (Software-Defined Networking, software-defined network) flow table is used to transfer traffic, such as switching to network card B when network card A fails. However, the above-mentioned hardware redundancy switching method has high rule maintenance cost, needs manual rule updating to adapt to new fault scenarios, and has poor scalability; hardware and software are not coordinated enough, and configuration switching and traffic scheduling are separated, which may cause traffic interruption or routing black hole during switching. In addition, the existing network card binding technology has high switching delay when the link fails, which affects real-time services.
[0036] Based on the above, the embodiment of the application provides a network card management method, real-time monitoring of a network card working state, collection of multi-dimensional indexes such as bandwidth utilization and packet loss rate, analysis of indexes based on a machine learning model, judgment of whether the network card is abnormal, sending of a bandwidth switching instruction to a BIOS (basic Input / Output System) by a CPLD (Complex Programmable Logic Device) when an abnormality is detected, transfer of traffic from an abnormal network card to a normal network card by using a software-defined network controller, and feedback of a switching result to a monitoring node, so as to realize a complete closed-loop system. The above method provides a complete closed-loop system to realize intelligent network card fault-tolerant optimization, breaks through the limitation of traditional network card management, realizes rapid configuration at a hardware level and millisecond-level traffic switching delay, and can be widely applied to multi-node server scenarios such as data centers, cloud computing and edge computing, and is especially suitable for fields such as finance, medical treatment and industrial control that have extremely high requirements on network reliability. Through automatic network card fault-tolerant detection and traffic optimization, the system availability is significantly improved, and the operation and maintenance cost is reduced. The method can shorten the switching delay to milliseconds when a link fault occurs through the synergistic effect of rapid response at a hardware level, dynamic scheduling of a software-defined network and intelligent decision-making, and meets the requirement of real-time services on low delay.
[0037] According to the embodiment of the application, a network card management method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a group of computer executable instructions, for example, a computer, a server, etc., and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0038] In the embodiment, a network card management method is provided, Figure 1 is a flowchart of the network card management method according to the embodiment of the application, as Figure 1 shown, the flow includes the following steps:
[0039] Step S101, state data of a network card is acquired.
[0040] Specifically, the state data of the network card is acquired in real time, and the state data is, for example, key indexes of the network card such as bandwidth utilization, packet loss rate, number of error packets, queue length, RTT (Round-Trip Time, traffic round-trip time), etc.
[0041] Step S102, predicted state data is determined according to the state data.
[0042] Specifically, the state data in a subsequent period of time is predicted as predicted state data according to the state data, for example, the state data is input into a prediction model, and the predicted state data is output. The prediction model is, for example, a three-layer LSTM (Long Short-Term Memory) neural network model that is pre-constructed and trained. The input layer of the model has 64 neurons and is used to receive load window data with a time length of 120 seconds. The hidden layer contains 128 LSTM units, and the dropout rate is set to 0.2 to prevent overfitting. The number of neurons in the output layer is the same as the number of types of predicted state data.
[0043] In step S103, a first comparison result of the predicted state data and the state data baseline is determined, and a second comparison result of the state data and the state data baseline is determined, wherein the state data baseline is generated according to historical state data of the network card.
[0044] Specifically, the embodiment establishes a state data baseline for the network card through historical state data of the network card. For example, the state data baseline is a bandwidth utilization baseline. The bandwidth utilization baseline is established for the network card through the bandwidth utilization of the network card in the past 30 days. The business peak time period is, for example, 9:00-18:00, and the bandwidth utilization baseline is 20%-60% of the maximum bandwidth utilization. The business idle time period is, for example, 22:00-6:00 the next day, and the bandwidth utilization baseline is 5%-20% of the maximum bandwidth utilization.
[0045] The predicted state data is compared with the state data baseline to obtain the first comparison result. For example, the state data baseline is a bandwidth utilization baseline, and the bandwidth utilization in the business peak time in the predicted state data is 65% of the maximum bandwidth utilization, which exceeds the bandwidth utilization baseline. Similarly, the state data is compared with the state data baseline to obtain the second comparison result. In addition, the state data baseline can also include the maximum growth rate of the state data. For example, the maximum growth rate is 10% / minute. If the bandwidth of the network card increases from 30% of the maximum bandwidth to 65% in 30 seconds, and the growth rate exceeds 10% / minute, it is considered that the bandwidth grows too fast.
[0046] In step S104, the first comparison result is used as a judgment basis, the first comparison result and the second comparison result are combined, and the warning information of the network card is generated.
[0047] Specifically, the first comparison result is taken as a judgment basis, and whether the predicted state data exceeds the state data baseline is first judged according to the first comparison result; whether the state data exceeds the state data baseline is then judged according to the second comparison result; the first comparison result and the second comparison result are combined, if it is determined that the predicted state data and the state data both exceed the state data baseline, a red early warning is generated as the early warning information of the network card, the red early warning represents a network card fault; if the predicted state data exceeds the state data baseline, the state data does not exceed the state data baseline but is very close to the boundary value, an orange early warning is generated as the early warning information of the network card, the orange early warning represents that the network card has a potential fault and the fault probability is relatively large; if the predicted state data exceeds the state data baseline, the state data does not exceed the state data baseline and is far away from the boundary value, a yellow early warning is generated as the early warning information, the yellow early warning represents that the network card has a potential fault and the fault probability is relatively small.
[0048] The above process is shown in Figure 2 , real-time monitoring of the network card state, judging whether an abnormality is detected, if no abnormality is detected, re-detecting the network card state, if an abnormality is detected, triggering a multi-level early warning mechanism.
[0049] In step S105, the network card configuration strategy is obtained according to the early warning information and the state data, and the network card is configured according to the network card configuration strategy.
[0050] Specifically, the network card configuration strategy is obtained according to the early warning information and the state data, for example: if the early warning information is a yellow early warning, and the current load of the network card can be alleviated by adjusting the bandwidth, the network card configuration strategy can be to dynamically allocate the bandwidth of the network card to 60% of the maximum bandwidth, and the bandwidth allocation ratio is determined according to the state data; if the early warning information is an orange early warning, and it is determined according to the state data that there is an idle network card with low load and high business matching degree, the network card configuration strategy can be to offload 30% of the bandwidth of the network card to the idle network card, and the traffic allocation ratio is determined according to the state data; if the early warning information is a red early warning, the network card configuration strategy can be to transfer all the traffic of the network card to the standby network card through software-defined networking.
[0051] The network card is configured by executing the above network card configuration strategy. In addition, if it is necessary to perform traffic transfer operation on the network card during the configuration of the network card, real-time traffic path calculation can be realized based on the software-defined networking architecture; a weighted load balancing algorithm is designed to dynamically allocate traffic weights according to the health status of the network card; a cross-node traffic mirroring and hot backup mechanism is realized to ensure no packet loss during the switching process. The above process is shown in Figure 2 , reinforcement learning is performed to calculate the switching strategy, and the controller sends a switching instruction to the basic input / output system to configure the network card.
[0052] The method provided by the embodiment comprises: determining predicted state data according to state data of a network card; comparing the state data and the predicted state data with state data baseline respectively to obtain a first comparison result and a second comparison result; taking the first comparison result as a judgment criterion, combining the first comparison result and the second comparison result to generate early warning information of the network card; obtaining a network card configuration strategy according to the early warning information and the state data, and executing the network card configuration strategy to configure the network card. The method can shorten the delay of determining network card failure and configuring the network card to milliseconds through the synergistic effect of hardware-level fast response, software-defined network dynamic scheduling and intelligent decision-making, avoid network card communication interruption, improve network card availability, and meet the requirement of real-time services for low delay. The method solves the problems of fixed threshold detection of network card abnormality, easy triggering of false switching or switching delay, influence on real-time services, and poor scalability of rules for processing network card failure.
[0053] As an optional embodiment, before determining the first comparison result of the predicted state data and the state data baseline, the method further comprises:
[0054] obtaining historical state data of the network card;
[0055] determining a data range of the state data in a preset time period in the historical state data;
[0056] obtaining a change rate threshold of the state data;
[0057] obtaining the state data baseline according to the data range and the change rate threshold.
[0058] Specifically, the historical state data of the network card is obtained, for example, key indicators of the network card in the past 30 days, such as bandwidth utilization rate, packet loss rate, number of error packets, queue length, traffic round-trip delay, etc.
[0059] The preset time period is, for example, a business peak time period and a business idle time period. The business peak time period is, for example, from 9:00 to 18:00, and the business idle time period is, for example, from 22:00 to 6:00 the next day. The distribution of the historical state data in the preset time period is determined, and the data range of the state data in the preset time period is determined according to the distribution. For example, the state data is bandwidth utilization rate, the data range of the bandwidth utilization rate in the business peak time period is 20% to 60% of the maximum bandwidth utilization rate, and the data range of the bandwidth utilization rate in the business idle time period is 5% to 20% of the maximum bandwidth utilization rate. In addition, the above data range can be generated based on historical data and a machine learning model.
[0060] In addition, the state data baseline can also include a change rate threshold of the state data, for example, the maximum growth rate of the bandwidth is 10% / minute, and if the bandwidth of the network card increases from 30% of the maximum bandwidth to 65% within 30 seconds, the growth rate exceeds 10% / minute, it is considered that the bandwidth increases too fast. The change rate threshold can be obtained according to historical state data, for example, the maximum change rate of the state data in the historical state data is 10% / minute, and the change rate threshold is set to 10% / minute. The change rate threshold can also be directly set according to actual needs.
[0061] In combination with the above data range and change rate threshold, the state data baseline is obtained.
[0062] In this embodiment, the data range of the state data in the preset time period is determined in the historical state data of the network card, and the change rate threshold of the state data is obtained. According to the data range and the change rate threshold, the state data baseline is obtained. Whether the state data deviates from the normal range is determined by the state data baseline, whether the network card is abnormal is determined, and the judgment efficiency is improved.
[0063] As an optional embodiment, the first comparison result is taken as a judgment reference, the first comparison result and the second comparison result are combined, and the warning information of the network card is generated, including:
[0064] In a case where it is determined according to the first comparison result that the predicted state data is not within the data range, it is determined whether the predicted state data exceeds a first preset threshold;
[0065] In a case where the predicted state data exceeds the first preset threshold, it is determined that the network card has a potential fault;
[0066] In a case where it is determined that the network card has a potential fault, it is determined according to the second comparison result whether the state data is within the data range;
[0067] If the state data is not within the data range, the first warning information is generated.
[0068] Specifically, because the predicted state data can fluctuate, the predicted state data can temporarily exceed the data range during the fluctuation, but soon returns to the data range, and in this case, the network card has no fault. The first preset threshold is set in this embodiment to filter this case to avoid false alarms, for example, 70% of the maximum value of the state data or other larger proportions, in addition, the first preset threshold can be a threshold corresponding to a risk level, when the predicted state data exceeds the first preset threshold, it is determined that the predicted state data deviates from the baseline by more than a preset proportion, the network card has a high risk corresponding to a predicted fault probability ≥ 70%, and the fault probability ≥ 70% means that the probability of bandwidth overload fault within the next 5 minutes is greater than 70%.
[0069] With the first comparison result as the judgment basis, whether the predicted state data exceeds the data range in the state data baseline is first judged according to the first comparison result, for example, the predicted state data such as the predicted bandwidth utilization rate, the packet loss rate, etc. is compared with the boundary value of the data range to judge whether the predicted state data is within the data range. Whether the predicted state data exceeds the first preset threshold is judged, and if the predicted state data exceeds the first preset threshold, it can be determined that the predicted state data exceeds the data range not because of fluctuation. In the case that the predicted state data exceeds the first preset threshold, it is determined that the network card has a potential fault.
[0070] If the network card has a potential fault, the emergency degree of the fault is comprehensively judged in combination with the real-time abnormality detection result of the state parameter, that is, the second comparison result, a corresponding early warning mechanism (such as yellow warning, orange warning, red fault) is triggered, and early warning information is generated. In the case that it is determined that the network card has a potential fault, whether the state data is within the data range is further judged according to the second comparison result, if it is determined that the predicted state data and the state data are both not within the data range, a red warning is generated as the first early warning information of the network card. In addition, the red warning represents that the network card is seriously abnormal, the state data of the network card deviates seriously from the normal range, and has caused substantial impact on the business, and immediate triggering of hardware switching and traffic transfer is required. For example, if the bandwidth utilization rate of the network card is long-term over 90%, and the packet loss rate ≥5% frequently appears packet loss problem, the red warning is triggered.
[0071] In addition, the process of identifying the network card abnormality and generating the early warning information can adopt a multi-dimensional abnormality detection algorithm, for example, an algorithm combined with an isolation forest algorithm and a time series analysis algorithm. The isolation forest is an unsupervised learning algorithm specially used for abnormality detection, and the time series algorithm focuses on the continuity feature in the time dimension, and identifies the "dynamic abnormality" by analyzing the numerical change law (such as trend, periodicity, mutation) of the network card index (such as bandwidth utilization rate, packet loss rate, etc.) at different time points, that is, the situation that the single time point index may not exceed the normal range, but the overall change trend deviates from the historical regular mode. The time series algorithm supplements the coverage of the isolation forest on the "instantly normal but trend abnormal" scene, and is especially suitable for identifying gradual faults (such as performance slow decline caused by network card hardware aging), and provides a time dimension judgment basis for multi-dimensional abnormality detection, and reduces the risk of missed detection.
[0072] In the embodiment, a multi-level early warning mechanism is adopted, the first comparison result is taken as the judgment basis, the first comparison result and the second comparison result are combined, the early warning information of the network card is generated, the potential risk of the network card is identified in advance, the network card abnormality and the network card fault are distinguished, and the misoperation is reduced.
[0073] As an optional embodiment, after judging whether the state data is within the data range according to the second comparison result, the method further includes:
[0074] determining a rate of change of the state data;
[0075] generating second early warning information if the state data is within the data range and the rate of change is less than the rate of change threshold;
[0076] generating third early warning information if the state data is within the data range and a difference between the state data and a boundary value of the data range is less than a second preset threshold;
[0077] generating third early warning information if the state data is within the data range and the rate of change is greater than or equal to the rate of change threshold.
[0078] Specifically, the state data baseline can further include a rate of change threshold of the state data, for example, the maximum growth rate of the bandwidth is 10% / minute, and if the network card bandwidth increases from 30% of the maximum bandwidth to 65% within 30 seconds, the growth rate exceeds 10% / minute, it is considered that the bandwidth grows too fast. The rate of change of the state data is determined, and the rate of change is compared with the rate of change threshold.
[0079] If the state data is within the data range and the rate of change is less than the rate of change threshold, it indicates that the state data deviates from the normal range slightly, and does not cause obvious influence on the business, which can be a transient fluctuation or a potential risk that can be repaired by software adjustment, such as a short-time fluctuation of the network card bandwidth utilization (e.g., from 30% to 50%, but restored to normal within 10 seconds), which does not exceed the hardware bearing threshold. At this time, a yellow early warning is triggered, and second early warning information is generated, indicating that the network card has a slight abnormality, and the probability of failure is small.
[0080] The second preset threshold is, for example, the boundary value of the data range is 20% of the maximum state data and 60% of the maximum state data, and the second preset threshold is 5%, 6% or other proportion of the maximum state data.
[0081] If the state data is within the data range, but the difference between the state data and the boundary value of the data range is less than the second preset threshold, it indicates that the state data deviates more seriously, which can potentially affect the business, and active intervention such as traffic shunting and bandwidth reconfiguration needs to be started. At this time, an orange early warning is triggered, and third early warning information is generated, indicating that the network card has a moderate abnormality, and the probability of failure is large. For example, the state data bandwidth utilization continuously increases from 20% to 56% and does not decrease within 5 sampling periods, and the difference from the boundary value 60% of the bandwidth utilization data range is 4%, which is close to the hardware bottleneck, triggering the orange early warning.
[0082] If the state data is within the data range and the rate of change is greater than or equal to the rate of change threshold, it indicates that the state data presents a continuous deterioration trend, and active intervention such as traffic shunting and bandwidth reconfiguration needs to be started. At this time, an orange early warning is also triggered, and third early warning information is generated.
[0083] As an optional embodiment, the network card configuration strategy is obtained according to the early warning information and the state data, including:
[0084] The state vector is constructed according to the early warning information and the state data;
[0085] The state vector is input into the strategy generation model to obtain probabilities of a preset number of candidate strategies;
[0086] The candidate strategy with the maximum probability is taken as an intermediate strategy;
[0087] The intermediate strategy is adjusted according to the early warning information and the state data to obtain the network card configuration strategy.
[0088] Specifically, the state vector is constructed according to the early warning information and the state data, for example: in combination with the early warning information and the state data, “the packet loss rate of network card A increases by 3% and is in orange early warning” is obtained, and the state vector is generated according to this result. The state vector includes, for example, early warning information, network card abnormal type, severity, network card state data, network card health degree, business demand, business priority and the like.
[0089] The strategy generation model has a corresponding fault knowledge base, and the fault knowledge base includes artificially preset candidate strategies, for example: different businesses are allocated different network card bandwidth and traffic, burst control, limit instantaneous large flow impact, business priority definition and the like. In addition, the strategy generation model can evaluate the effect of the strategy through the feedback layer and automatically update and optimize the candidate strategies in the fault knowledge base without manual intervention. For example, if the switching causes the business delay to increase, the system can automatically adjust the next strategy and update the fault knowledge base. The preset number represents multiple, and no specific number is limited here.
[0090] The strategy generation model can be created based on Q deep learning, taking execution of different candidate strategies as an action, inputting the state vector into the strategy generation model, and the strategy generation model calculating the probability distribution of different actions to obtain the probabilities of a preset number of candidate strategies.
[0091] The candidate strategy with the maximum probability is taken as an intermediate strategy, for example: if the alarm information is yellow early warning and the current load of network card A can be relieved by bandwidth adjustment, the intermediate strategy can be to dynamically configure the bandwidth of network card A; if the alarm information is orange early warning and there is network card B with low load and high business matching degree, the intermediate strategy can be to offload part of the traffic of network card A to network card B; if the alarm information is red early warning, the intermediate strategy can be to activate a standby network card and transfer most or all of the traffic of network card A to the standby network card through software-defined network.
[0092] According to the early warning information and the state data, the intermediate strategy is adjusted to obtain the network card configuration strategy. For example, the intermediate strategy is to dynamically configure the bandwidth of the network card A. According to the early warning information and the state data, it is determined that the adjustment ratio is 60% of the maximum bandwidth. The intermediate strategy is adjusted to obtain the network card configuration strategy, that is, the bandwidth of the network card A is adjusted to 60% of the maximum bandwidth. The intermediate strategy is to divert part of the traffic of the network card A to the network card B. According to the early warning information and the state data, it is determined that the adjustment ratio is 30%. The network card configuration strategy is to divert 30% of the traffic of the network card A to the network card B. The intermediate strategy is to activate the standby network card. Most or all of the traffic of the network card A is transferred to the standby network card through the software-defined network. The network card configuration strategy is to immediately activate the standby network card, and all the traffic of the network card A is transferred to the standby network card through the software-defined network.
[0093] In the embodiment, the state vector containing the early warning information and the state data is input into the strategy generation model in real time to generate the network card configuration strategy, thereby improving the decision efficiency and accuracy of processing the abnormal operation of the network card in a complex scenario.
[0094] As an optional embodiment, according to the early warning information and the state data, the intermediate strategy is adjusted to obtain the network card configuration strategy, comprising:
[0095] In the case that the early warning information is the first early warning information, the standby network card information, the first to-be-migrated traffic ratio and the network card configuration parameter are determined according to the state data, and the standby network card information, the first to-be-migrated traffic ratio and the network card configuration parameter are written into the intermediate strategy to obtain the network card configuration strategy.
[0096] In the case that the early warning information is the second early warning information, the network card configuration parameter is determined according to the state data, and the network card configuration parameter is written into the intermediate strategy to obtain the network card configuration strategy.
[0097] In the case that the early warning information is the third early warning information, the idle network card information, the second to-be-migrated traffic ratio and the network card configuration parameter are determined according to the state data, and the idle network card information, the second to-be-migrated traffic ratio and the network card configuration parameter are written into the intermediate strategy to obtain the network card configuration strategy.
[0098] Specifically, in the case of the early warning information being the first early warning information, it is determined that the network card A triggers a red early warning, and the network card A needs to be configured and the traffic of the network card A needs to be transferred. The standby network card information is determined according to the state data, for example, the standby network card is the network card C, the address information of the network card C, the information transmission rate threshold, the maximum bandwidth and the like. In addition, the first to-be-migrated traffic of the network card A and the network card configuration parameter are determined according to the state data, for example, the total traffic of the network card A, the bandwidth allocation of the network card A, the port state and the like. The standby network card information, the first to-be-migrated traffic ratio and the network card configuration parameter are written into the intermediate strategy to obtain the network card configuration strategy, for example, the network card A is configured, the bandwidth of the network card A is adjusted to 60% of the maximum bandwidth, and the total traffic of the network card A is transferred to the standby network card through the software-defined network.
[0099] In the case of the early warning information being the second early warning information, it is determined that the network card A triggers a yellow early warning, and only the network card A needs to be configured. The network card configuration parameter is determined according to the state data, for example, the bandwidth allocation of the network card A, the port state and the like. The network card configuration parameter is written into the intermediate strategy to obtain the network card configuration strategy, for example, the network card A is configured, and the bandwidth of the network card A is adjusted to 60% of the maximum bandwidth.
[0100] In the case of the early warning information being the third early warning information, it is determined that the network card A triggers an orange early warning, and the network card A needs to be configured and the traffic of the network card A needs to be transferred. The idle network card information is determined according to the state data, for example, the network card B with low load and high service matching degree of the network card A, and the idle network card information is the address information of the network card B, the information transmission rate threshold, the maximum bandwidth and the like. In addition, the second to-be-migrated traffic ratio and the network card configuration parameter are determined according to the state data, for example, 30% of the traffic of the network card A, 40% of the traffic of the network card A or other traffic, so as to reduce the load of the network card A. The network card configuration parameter, for example, the bandwidth allocation of the network card A, the port state and the like. The idle network card information, the second to-be-migrated traffic ratio and the network card configuration parameter are written into the intermediate strategy to obtain the network card configuration strategy, for example, the bandwidth of the network card A is adjusted to 60% of the maximum bandwidth, and 30% of the traffic of the network card A is shunted to the network card B through the software-defined network.
[0101] In the above manner, in the case of the early warning information being the second early warning information, that is, the network card is slightly abnormal, the software adjustment (such as traffic shunting) is preferred instead of the hardware switching, so as to reduce the redundancy consumption. In the case of the early warning information being the first early warning information, that is, the network card is seriously faulty, the hardware switching is performed and the subsequent traffic path is optimized in combination with the RLAgent (Reinforcement Learning Agent, a core component in a reinforcement learning system), so as to avoid the limitation of the network card switching. The traffic shunting is to control the network traffic of the network card through the software, for example, setting the traffic firewall of the network card.
[0102] In addition, the adjustment of the intermediate strategy can optimize the bandwidth switching threshold in a reinforcement learning framework, and establish a fault prediction model to predict potential risks in advance based on historical fault data. The reinforcement learning framework, for example, PPO (Proximal Policy Optimization, a reinforcement learning algorithm based on policy gradient), is mainly used for dynamic policy generation, hardware and software optimization, and realization of elastic resource management and hierarchical fault tolerance.
[0103] The above process is shown in FIG. 1, wherein the controller sends a switching instruction to the basic input / output system; if the basic input / output system is not configured successfully, a rollback operation is performed; if the basic input / output system is configured successfully, the software-defined network controller is used to update the traffic rules to transfer the traffic to the standby network card. Figure 2 As an optional embodiment, the network card is configured according to the network card configuration strategy, comprising:
[0104] In the case that the network card configuration strategy contains standby network card information and a first proportion of traffic to be migrated, the standby network card is determined according to the standby network card information;
[0105] The standby network card is activated, the first traffic forwarding rule is updated according to the first proportion of traffic to be migrated, and the traffic of the network card is transferred to the standby network card according to the first traffic forwarding rule;
[0106] In the case that the network card configuration strategy contains network card configuration parameters, the network card is configured according to the network card configuration parameters;
[0107] In the case that the network card configuration strategy contains idle network card information and a second proportion of traffic to be migrated, the idle network card is determined according to the idle network card information;
[0108] The second traffic forwarding rule is updated according to the second proportion of traffic to be migrated, and the traffic of the network card is transferred to the idle network card according to the second traffic forwarding rule.
[0109]
[0110] Specifically, the network interface card (NIC) configuration strategy is as follows: Configure NIC A and adjust its bandwidth to 60% of its maximum bandwidth; transfer all traffic from NIC A to the backup NIC C via software-defined networking. In this case, the NIC configuration strategy includes backup NIC information and the proportion of the first traffic to be migrated. Backup NIC information includes, for example, NIC C as the backup NIC, NIC C's address information, information transmission rate threshold, and maximum bandwidth. Based on this information, NIC C is determined as the backup NIC. The first traffic to be migrated is, for example, all traffic from NIC A. NIC C is activated as the backup NIC, and the first traffic forwarding rule is updated according to the proportion of the first traffic to be migrated. For example, all traffic from NIC A is treated as the traffic to be transferred, and the software-defined network controller calculates the software-defined network flow table rules based on the traffic to be transferred. Real-time traffic path calculation is implemented based on the software-defined network architecture, and the software-defined network flow table rules are used as the first traffic forwarding rules. During the calculation process, the software-defined network controller (SDB) needs to adjust traffic paths in conjunction with real-time policies to avoid the lag of static flow tables. Traffic scheduling is achieved through SDB to realize dynamic resource sharing among multiple network interface cards (NICs). For example, under normal conditions, to ensure NIC load balancing, multiple NICs can process traffic in parallel; in case of failure, bandwidth is allocated on demand to improve resource utilization. A weighted load balancing algorithm is designed to dynamically allocate traffic weights based on NIC health status. Cross-node traffic mirroring and hot backup mechanisms are implemented to ensure no packet loss during failover. After activating the backup NIC, the SDB needs to immediately and synchronously update the primary traffic forwarding rules to ensure that traffic transfer and hardware configuration take effect simultaneously, avoiding interruptions caused by "configuration and traffic asynchrony".
[0111] The software-defined network controller transfers traffic from the network interface card (NIC) to the backup NIC according to the first traffic forwarding rule.
[0112] For example, a network interface card (NIC) configuration policy might be configured to adjust the bandwidth of NIC A to 60% of its maximum bandwidth. In this case, the NIC configuration policy includes NIC configuration parameters, such as NIC bandwidth, specifically adjusting the bandwidth of NIC A to 60% of its maximum bandwidth. A complex programmable logic device (CPL) is then configured on the server motherboard as a controller. This controller is used to configure NIC A according to the NIC configuration parameters, thereby adjusting the bandwidth of NIC A to 60% of its maximum bandwidth.
[0113] The network card configuration strategy is, for example: adjusting the bandwidth of the network card A to 60% of the maximum bandwidth; and shunting 30% of the traffic of the network card A to the network card B through the software-defined network. At this time, the network card configuration strategy includes idle network card information and a second to-be-migrated traffic ratio. The idle network card information is, for example: the idle network card is the network card B, address information of the network card B, an information transmission rate threshold, a maximum bandwidth, and the like. According to the idle network card information, it is determined that the idle network card is the network card B. The second to-be-migrated traffic is, for example: 30% of the traffic of the network card A. According to the second to-be-migrated traffic ratio, the first traffic forwarding rule is updated, for example: taking 30% of the traffic of the network card A as to-be-transferred traffic, calculating a software-defined network flow table rule according to the to-be-transferred traffic by using the software-defined network controller, and realizing real-time calculation of a traffic path based on a software-defined network architecture, taking the software-defined network flow table rule as a second traffic forwarding rule.
[0114] The software-defined network controller transfers the traffic of the network card to the idle network card according to the first traffic forwarding rule.
[0115] In this embodiment, when the network card anomaly is detected, the current network card configuration of the network card is first adjusted by using the network card configuration parameter, instead of directly switching the network card, so as to reduce the consumption of redundant resources.
[0116] As an optional embodiment, after the network card is configured according to the network card configuration strategy, the method further includes:
[0117] In the case where it is determined that the network card is faulty according to the early warning information, the fault feature information of the network card is acquired;
[0118] According to the fault feature information and the fault knowledge base, a repair strategy of the network card is determined;
[0119] The network card is repaired according to the repair strategy.
[0120] Specifically, whether the network card is faulty is determined according to the early warning information. For example: the early warning information is first early warning information, and it is determined that the network card is faulty. If it is determined that the network card is faulty, the fault feature information of the network card is acquired, for example: the wide utilization rate of the network card is long-term over 90%, the packet loss rate of the network card is ≥5% frequent packet loss, and the like.
[0121] The fault knowledge base stores historical fault feature information of each network card, a historical repair strategy adopted for the historical fault, and a repair result. The historical repair strategy is, for example: updating or reinstalling a network card driver, restarting a network card interface, reloading a network card driver, repairing a network card configuration, resetting a network stack of the network card, and the like software means.
[0122] Therefore, the historical repair strategy corresponding to the current fault feature information of the network card is searched in the fault knowledge base, and a strategy with a repair success result is selected as the repair strategy of the network card from the historical repair strategy. The online diagnosis and automatic repair attempt of the fault network card are performed by using the network card configuration manager, and the network card is repaired by executing the repair strategy.
[0123] In the embodiment, the repair strategy of the network card is acquired in the fault knowledge base according to the fault feature information, and the network card is repaired according to the repair strategy. Through the automatic network card fault tolerance detection and traffic optimization, the system availability is significantly improved, and the operation and maintenance cost is reduced.
[0124] As an optional embodiment, after the network card is repaired according to the repair strategy, the method further comprises:
[0125] determining the repair result of the network card;
[0126] writing the early warning information, the fault feature information, the repair strategy and the repair result into the fault knowledge base.
[0127] Specifically, after the network card is repaired according to the repair strategy, the network card is detected, whether the network card is successfully repaired is judged, the repair result of the network card is determined, for example, repair success, repair failure, solve the current fault but there are other abnormalities, etc. The early warning information is, for example, the first early warning information, the second early warning information and the third early warning information. The fault feature information is, for example, the long-term utilization rate of the network card is more than 90%, the network card packet loss rate is greater than or equal to 5% and the packet loss is frequent. The repair strategy is, for example, updating or reinstalling the network card driver, restarting the network card interface, reloading the network card driver, repairing the network card configuration, resetting the network card network stack and other software means.
[0128] The above-mentioned early warning information, fault feature information, repair strategy and repair result are written into the fault knowledge base, and the corresponding relationship between the above-mentioned information is created in the fault knowledge base. The above-mentioned process is as shown in Figure 2 The fault network card is diagnosed and repaired, and the fault knowledge base is updated.
[0129] According to the embodiment of the application, a network card management system is provided, as shown in Figure 3 The system comprises a monitoring module, a strategy determination module and a network card configuration module.
[0130] The monitoring module is connected with the strategy determination module, and is used to acquire the state data of the network card, determine the predicted state data according to the state data, determine the first comparison result of the predicted state data and the state data baseline, determine the second comparison result of the state data and the state data baseline, take the first comparison result as the judgment basis, combine the first comparison result and the second comparison result, generate the early warning information of the network card, and transmit the early warning information to the strategy determination module, wherein the state data baseline is generated according to the historical state data of the network card;
[0131] The strategy determination module is connected with the network card configuration module, and is used to obtain the network card configuration strategy according to the early warning information and the state data, and transmit the network card configuration strategy to the network card configuration module;
[0132] The network card configuration module is configured according to the network card configuration strategy.
[0133] Specifically, the monitoring module is connected with the policy determination module. The monitoring module obtains state data of the network card in real time, for example, key indicators of the network card, such as bandwidth utilization, packet loss rate, number of error packets, queue length, traffic round-trip delay, etc. The state data in the subsequent period of time is predicted as predicted state data according to the state data, for example, the state data is input into a prediction model, and the predicted state data is output. The predicted state data is compared with the state data baseline to obtain a first comparison result, for example, the state data baseline is the bandwidth utilization baseline, and the bandwidth utilization of the business peak time in the predicted state data is 65% of the maximum bandwidth utilization, which exceeds the bandwidth utilization baseline. Similarly, the state data is compared with the state data baseline to obtain a second comparison result. The first comparison result is used as a judgment criterion, and whether the predicted state data exceeds the state data baseline is first judged according to the first comparison result; then whether the state data exceeds the state data baseline is judged according to the second comparison result; the first comparison result and the second comparison result are combined, and if it is determined that the predicted state data and the state data both exceed the state data baseline, a red warning is generated as the warning information of the network card, and the red warning represents a network card failure. The above warning information is transmitted to the policy determination module.
[0134] The policy determination module is connected with the network card configuration module. The policy determination module obtains the network card configuration strategy according to the warning information and the state data, for example, if the warning information is a red warning, the network card configuration strategy can be to transfer all the traffic of the network card to the standby network card through the software defined network. The network card configuration strategy is transmitted to the network card configuration module.
[0135] The network card configuration module executes the above network card configuration strategy to configure the network card. In addition, during the process of configuring the network card, if it is necessary to perform traffic transfer operation on the network card, real-time traffic path calculation can be realized based on the software defined network architecture; a weighted load balancing algorithm is designed to dynamically allocate traffic weight according to the health status of the network card; cross-node traffic mirroring and hot backup mechanism is realized to ensure no packet loss in the switching process.
[0136] The above content is as follows Figure 4As shown, the monitoring module serves as the monitoring layer of the system, in which the network card state collector collects state data of the physical network card 1 and the physical network card 2 in real time, and performs multi-dimensional index monitoring on the network cards; after the data preprocessing module pre-processes the state data, the abnormality detection engine performs abnormality judgment on the network cards according to the pre-processed state data and in combination with the performance baseline library, and generates fault information. The strategy determination module serves as the decision layer of the system, and the reinforcement learning controller generates the network card configuration strategy by using the strategy generator according to the fault information and the data in the knowledge base, the strategy generator formulates the optimal switching scheme according to the fault information, and the knowledge base provides historical fault handling experience support. The network card configuration module is the execution layer of the system, adopts a complex programmable logic device as a controller, adopts an electrically erasable programmable memory containing a basic input and output system as a basic input and output system communication module, the controller and the basic input and output system communication module realize hardware-level configuration, the network card configuration manager is responsible for executing the bandwidth switching operation, and the software-defined network traffic scheduler realizes dynamic transfer of traffic. In addition, the system can further include a feedback layer for evaluating the switching effect and optimizing the decision model, continuously updating the knowledge base to improve the intelligent level of the system, and forming a closed-loop optimization mechanism.
[0137] The network card management system provided in the embodiment can shorten the overall delay of determining the network card fault and configuring the network card to the millisecond level through the synergistic effect of the hardware-level rapid response, the software-defined network dynamic scheduling and the intelligent decision, avoid the interruption of network card communication, improve the availability of the network card, and meet the requirement of real-time services on low delay. The problem that the fixed threshold value is used to detect whether the network card is abnormal, which easily causes mis-switching or switching delay, affects real-time services, and has poor rule expandability in handling network card faults is solved.
[0138] As an optional embodiment, the network card configuration module comprises a controller, a network card configuration manager and a traffic scheduler.
[0139] The controller is connected with the network card configuration manager, and is configured to acquire a network card configuration parameter in the network card configuration strategy, generate a configuration instruction according to the network card configuration parameter, and transmit the configuration instruction to the network card configuration manager.
[0140] The network card configuration manager is configured to configure the network card according to the configuration instruction.
[0141] The controller is connected with the flow scheduler, and is configured to generate a first flow transfer instruction according to the standby network card information and the first proportion of the flow to be migrated, and transmit the first flow transfer instruction to the flow scheduler, when the standby network card information and the first proportion of the flow to be migrated are obtained from the network card configuration strategy.
[0142] The controller is further configured to generate a second flow transfer instruction according to the idle network card information and the second proportion of the flow to be migrated, and transmit the second flow transfer instruction to the flow scheduler, when the idle network card information and the second proportion of the flow to be migrated are obtained from the network card configuration strategy.
[0143] The flow scheduler is configured to determine a first flow forwarding rule and a standby network card according to the first flow transfer instruction, and transfer the flow of the network card to the standby network card according to the first flow forwarding rule, or determine a second flow forwarding rule and an idle network card according to the second flow transfer instruction, and transfer the flow of the network card to the idle network card according to the second flow forwarding rule.
[0144] Specifically, the relationship between the control instruction, the flow transfer instruction and the network card configuration strategy: the network card configuration strategy determines the specific content and execution order of the control instruction set. The network card configuration strategy will be converted into the control instruction sent by the controller to the basic input / output system. If the switching strategy determines to switch the flow from network card A to network card B at a certain moment and adjust the bandwidth of network card B, then the controller will send the I2C configuration instruction and the flow transfer instruction containing the corresponding parameters to the BIOS according to the strategy, so that the switching strategy can be implemented at the hardware level and the flow scheduling level.
[0145] The controller is connected with the network card configuration manager. The controller obtains the network card configuration parameters in the network card configuration strategy, for example, the bandwidth of the network card, and adjusts the bandwidth of network card A to 60% of the maximum bandwidth. The configuration instruction is generated according to the network card configuration parameters, for example, the I2C (Inter-Integrated Circuit, Inter-Integrated Circuit) configuration instruction, which is used to directly reconfigure the hardware parameters of the network card, such as bandwidth allocation, port state, etc. The key information in the I2C configuration instruction includes the identification of the target network card, which clearly indicates which network card is to be configured; specific configuration parameters, such as the adjusted bandwidth value, the activation or shutdown state of the port, etc. The above information is used to ensure that the basic input / output system can accurately perform configuration operations on the specified network card at the hardware level.
[0146] The controller transmits the configuration instruction to the network card configuration manager. The network card configuration manager executes the configuration instruction to configure the network card.
[0147] The controller is connected with the flow scheduler. The controller obtains standby network card information and a first proportion of traffic to be migrated from the network card configuration strategy. The standby network card information is, for example, that the standby network card is network card C, address information of the network card C, an information transmission rate threshold, maximum bandwidth, etc. The standby network card is determined to be the network card C according to the standby network card information. The first proportion of traffic to be migrated is, for example, all traffic of the network card A.
[0148] A first traffic transfer instruction is generated according to the standby network card information and the first proportion of traffic to be migrated. The first traffic transfer instruction is responsible for transferring traffic from an abnormal network card to a normal network card. Key information in the first traffic transfer instruction includes an identifier of the abnormal network card, an identifier of the normal network card, and a priority and a manner of traffic transfer, etc. The key information ensures that the traffic can be transferred in an orderly manner according to the established strategy, and the impact on the business is minimized.
[0149] The controller transmits the first traffic transfer instruction to the flow scheduler. The flow scheduler executes the first traffic transfer instruction to determine a first traffic forwarding rule and a standby network card. The flow scheduler transfers the traffic of the network card to the standby network card according to the first traffic forwarding rule.
[0150] The controller obtains idle network card information and a second proportion of traffic to be migrated from the network card configuration strategy. The idle network card information is, for example, that the idle network card is network card B, address information of the network card B, an information transmission rate threshold, maximum bandwidth, etc. The idle network card is determined to be the network card B according to the idle network card information. The second proportion of traffic to be migrated is, for example, 30% of the traffic of the network card A. A second traffic transfer instruction is generated according to the idle network card information and the second proportion of traffic to be migrated. The second traffic transfer instruction is transmitted to the flow scheduler. The flow scheduler determines a second traffic forwarding rule and an idle network card according to the second traffic transfer instruction. The flow scheduler transfers the traffic of the network card to the idle network card according to the second traffic forwarding rule.
[0151] The above content uses a complex programmable logic device as a controller, designs a firmware program of the special complex programmable logic device, and communicates with a basic input / output system through an I2C / SMBus (System Management Bus) bus. A standardized control protocol is defined to realize dynamic adjustment of network card configuration parameters at the basic input / output system level. A hardware abstraction layer is developed to shield differences of different basic input / output systems of mainboards, including: establishing a unified communication rule between the complex programmable logic device and the basic input / output system to ensure that the two can efficiently and accurately transfer network card configuration instructions (such as bandwidth allocation, port activation, fault isolation, etc.), and realize dynamic adjustment at the hardware level. The hardware details of the bottom layer BIOS are isolated through the abstraction layer, so that the upper layer modules (such as the CPLD firmware and the reinforcement learning agent) can call the network card configuration functions of different mainboard BIOSs through a unified interface without needing to pay attention to the differences of specific BIOS models.
[0152] The above process is shown in FIG. 4. The monitoring module sends the abnormality detection result to the reinforcement learning agent. The reinforcement learning agent generates a switching strategy and sends the switching strategy to the controller. The controller sends a configuration instruction to the basic input-output system. The basic input-output system performs the network card bandwidth reconfiguration and returns the configuration result to the controller. The controller feeds back the execution status to the reinforcement learning agent and sends a traffic transfer instruction to the software-defined network controller. The software-defined network controller updates the flow table rule, confirms the completion of traffic transfer, and feeds back to the monitoring module. Figure 5
[0153] In this embodiment, the network card control is realized by constructing a monitoring, decision-making, execution, and feedback closed-loop system. The multi-dimensional real-time monitoring and reinforcement learning algorithm are used to accurately identify the network card abnormality. The complex programmable logic device and the basic input-output system are combined for deep collaboration to quickly complete the hardware configuration switching. The software-defined network controller is used to realize the dynamic scheduling of the whole network traffic. The execution effect is used to automatically update the fault knowledge base and optimize the decision-making model.
[0154] As an optional embodiment, the network card configuration module further comprises a configuration checking unit and a performance verification unit.
[0155] The configuration checking unit is configured to determine the historical configuration parameters of the network card before the network card configuration manager configures the network card according to the configuration instruction, check whether the network card is successfully configured after the network card configuration manager configures the network card, and perform a rollback operation on the network card according to the historical configuration parameters if the configuration fails.
[0156] The performance verification unit is configured to check the network state of the standby network card after the traffic scheduler transfers the traffic of the network card to the standby network card according to the first traffic forwarding rule.
[0157] The performance verification unit is further configured to check the network state of the idle network card after the traffic scheduler transfers the traffic of the network card to the idle network card according to the second traffic forwarding rule.
[0158] Specifically, the configuration checking unit determines and saves the historical configuration parameters of the network card before the network card configuration manager configures the network card. After the network card configuration manager configures the network card, the network card configuration manager configures the network card by using the BIOS, the configuration checking unit checks whether the BIOS configuration is successful, and performs a rollback operation on the network card according to the historical configuration parameters if the configuration fails. If the configuration is successful, the software-defined network controller is used to update the traffic rule.
[0159] The performance verification unit checks the network state of the standby network card and verifies the service continuity and performance indicators of the standby network card after the traffic scheduler transfers the traffic of the network card to the standby network card according to the first traffic forwarding rule. The performance verification unit is also used to check the network state of the idle network card and verify the service continuity and performance indicators of the idle network card after the traffic scheduler transfers the traffic of the network card to the idle network card according to the second traffic forwarding rule.
[0160] Based on the above, the workflow of the network card management system can be divided into six stages, which are: the monitoring stage, continuously collecting network card state data, and detecting abnormalities compared with historical baseline; the evaluation stage, analyzing the severity of the abnormality, and determining whether to perform switching operation; the decision stage, the reinforcement learning model calculates the optimal switching strategy, and retrieves similar scene processing experience from the knowledge base; the execution stage, the CPLD sends configuration instructions to the BIOS, and the SDN controller updates the network flow table, and cooperates to complete the traffic transfer; the verification stage, checking the network state after switching, verifying the service continuity and performance indicators; the optimization stage, analyzing the problems in the switching process, updating the model parameters and the knowledge base, and improving the future response ability of the system.
[0161] In this embodiment, through the cooperative control of the complex programmable logic device and the basic input and output system, the multi-dimensional abnormality detection model, the traffic smooth transfer mechanism, the self-adaptive learning optimization and other processing modules are adopted, the limitations of traditional network card management are broken through, and the hardware level rapid configuration and the millisecond level traffic switching delay are realized.
[0162] As an optional embodiment, the performance verification unit checks the network state of the idle network card and the standby network card through the network card test mode, which can include steps A1 to A4.
[0163] Step A1, determine the target image container, and determine the network card test model according to the target image container, wherein the target image container represents an independent test environment.
[0164] Specifically, the specific parameters of the network card test are obtained, the test scene and the test target are determined, one or more appropriate image containers can be selected from the virtual platform, and these image containers are used as the target image container for testing the current network card. Any target image container needs a test environment and a test tool. The target image container is loaded and started, an independent test environment is created in the virtual platform, and each image container can be managed through a virtual machine.
[0165] After determining the target image container, the target image container tests the network card independently. The test environment corresponding to each target image container is determined. According to the characteristics and test requirements of the target image container, the network card test model corresponding to each target image container is determined.
[0166] Step A2, according to the network card test model, the network card is tested by virtualization, and test data is obtained.
[0167] Specifically, the network card test model includes various test parameters for testing the network card, such as specific network traffic patterns, load conditions or other test parameters. According to the test parameters corresponding to the network card test model, the network card is tested by virtualization. During the virtualization test, the network card test system simulates various network scenarios and load conditions to observe the performance of the network card under different conditions and collect relevant performance indicators and stability data. During the virtualization test, the test process is monitored, and test data is recorded, including performance indicators, error logs, etc. During the comprehensive virtualization test of the network card, the test content of the virtualization test can include throughput test, delay test, packet loss rate test, protocol compatibility test, etc. The transmission, reception and processing of network traffic corresponding to these test contents are actually performed on the hardware layer. The throughput test is used to measure the amount of data that the network card can process per unit time, i.e. the data transmission speed. The delay test is used to evaluate the time required for a data packet to be sent and received, reflecting the processing speed of the network card and network delay. The packet loss rate test is used to test the proportion of data packets lost by the network card under certain conditions, reflecting the stability and reliability of the network. The protocol compatibility test is used to verify whether the network card supports and correctly processes various network protocols, ensuring its compatibility with different systems and devices. The test parameters corresponding to the test content can be used as test data.
[0168] Step A3, processing the test data to obtain the processing result.
[0169] Specifically, the test data interacts with the hardware layer through virtualization technology, and the hardware layer captures each test data and processes it according to the test requirements of the test data, such as forwarding, analysis, storage, etc., and generates a processing result.
[0170] Step A4, according to the processing result, combining the preset performance indicators and evaluation standards, the performance of the network card is comprehensively evaluated.
[0171] In this embodiment, by defining the mirror container to determine the corresponding network card test model, the automation of the test process can be realized, and the test efficiency and accuracy can be improved. For the unique functions and performance requirements of intelligent network cards, customized test models and mirror containers can be used to test the network cards more deeply and comprehensively.
[0172] In the embodiment, a network card management apparatus is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and will not be described again. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
[0173] The embodiment provides a network card management apparatus, as shown in Figure 6 , comprising:
[0174] a data acquisition module 601, configured to acquire state data of the network card;
[0175] a data prediction module 602, configured to determine predicted state data according to the state data;
[0176] a data comparison module 603, configured to determine a first comparison result of the predicted state data and a state data baseline, and determine a second comparison result of the state data and the state data baseline, wherein the state data baseline is generated according to historical state data of the network card;
[0177] a warning module 604, configured to take the first comparison result as a judgment reference, combine the first comparison result and the second comparison result, and generate warning information of the network card;
[0178] a network card configuration module 605, configured to obtain a network card configuration strategy according to the warning information and the state data, and configure the network card according to the network card configuration strategy.
[0179] Further function descriptions of the above-mentioned modules are the same as those of the corresponding embodiments, and will not be described again.
[0180] The network card management apparatus in the embodiment is presented in the form of functional units, and the units herein refer to ASIC (Application Specific Integrated Circuit, Application Specific Integrated Circuit) circuits, processors and memories that execute one or more software or fixed programs, and / or other devices that can provide the above-mentioned functions.
[0181] The embodiment of the present application also provides a computer device with the network card management apparatus shown in Figure 6 .
[0182] Please refer to Figure 7 , Figure 7 which is a structural schematic diagram of a computer device provided by an optional embodiment of the present application, as shown in Figure 7As shown, the computer device includes one or more processors 701, memory 702, and interfaces 705 for the various components. The various components communicate over one or more busses 704 that are associated with a bus interface 706. Memory 702 stores instructions and data used by the processor(s) 701. The memory 702 can include non-removable memory devices, such as one or more semiconductor memory devices, typically RAM, such as DRAM, as well as removable memory devices, such as one or more flash memory devices. The processor(s) 701 can include one or more physical processors and logically reconfigures the processor(s) to implement various embodiments. For example, the processor(s) 701 can include one or more processors from the Intel Core® family of processors, the Intel Xeon® family of processors, the Intel Itanium® family of processors, the Intel Atom® family of processors, or any other family of processors available from Intel Corporation, or the AMD Ryzen® family of processors, the AMD EPYC® family of processors, the AMD Athlon® family of processors, the AMD Phenom® family of processors, or any other family of processors available from Advanced Micro Devices, Inc., or any other processor. The various embodiments can also be implemented using one or more integrated circuits, discrete circuits, and / or other hardware components. The various embodiments can also be implemented using one or more software modules running on one or more hardware components. Figure 7 The processor 701 is used as an example in the following description.
[0183] The processor 701 can be a central processing unit, a network processor, or a combination thereof. The processor 701 can further include an integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device can be a complex programmable logic device, a field programmable logic device, a programmable logic array, a general array logic, or a combination thereof.
[0184] The memory 702 stores instructions executable by the at least one processor 701 for causing the at least one processor 701 to perform the methods implemented by the embodiments described above.
[0185] The memory 702 can include a program storage area and a data storage area. The program storage area can store an operating system, application programs, and the like for execution by the at least one processor 701. The data storage area can store application data and the like that can be created, processed, and / or stored by the computer device. The memory 702 can include a volatile storage such as random access memory (RAM), and a non-volatile storage such as flash memory, a hard disk drive, or solid state drive. The memory 702 can also include a combination of volatile and non-volatile storage. In some embodiments, the memory 702 can include memory that is remotely located to the at least one processor 701, such as memory that can be accessed over a network. Examples of the network include, but are not limited to, the Internet, an intranet, an extranet, a local area network, a wide area network, a mobile communication network, or a combination thereof.
[0186] The memory 702 can include a volatile memory, such as random access memory (RAM), and a non-volatile memory, such as flash memory, a hard disk drive, or solid state drive. The memory 702 can also include a combination of volatile and non-volatile memory.
[0187] The computer device also includes a communication interface 703 for communicating with other devices or communication networks.
[0188] The embodiments of the present application further provide a computer readable storage medium, and the method according to the embodiments of the present application can be implemented in hardware, firmware, or recorded in a storage medium, or be implemented as computer code originally stored in a remote storage medium or a non-transitory machine readable storage medium and downloaded through a network and stored in a local storage medium, so that the method described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor, or programmable or special hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid state disk, etc. Further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that the computer, the processor, the microprocessor controller, or the programmable hardware includes a memory that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiments is implemented.
[0189] Part of the present application can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, the method and / or technical solutions according to the present application can be called or provided. Those skilled in the art should understand that the form of computer program instructions in a computer readable medium includes but is not limited to source files, executable files, installation package files, etc. Correspondingly, the way of executing computer program instructions by computer includes but is not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.
[0190] Although the embodiments of the present application are described in conjunction with the accompanying drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the present application.
Claims
1. A network interface card (NIC) management method, characterized in that, The method includes: Obtain the network card status data; Based on the state data, the predicted state data is determined; Obtain the historical status data of the network card; determine the data range of the status data within a preset time period from the historical status data; A first comparison result between the predicted state data and the state data baseline is determined, and a second comparison result between the state data and the state data baseline is determined, wherein the state data baseline is generated based on the historical state data of the network interface card; Using the first comparison result as the judgment criterion, the first comparison result and the second comparison result are combined to generate the warning information of the network card; The step of using the first comparison result as a judgment criterion and combining the first comparison result and the second comparison result to generate the warning information for the network card includes: if it is determined from the first comparison result that the predicted status data is not within the data range, determining whether the predicted status data exceeds a first preset threshold; if the predicted status data exceeds the first preset threshold, determining that the network card has a potential fault; if it is determined that the network card has a potential fault, determining whether the status data is within the data range based on the second comparison result; if the status data is not within the data range, generating the first warning information. Based on the warning information and the status data, a network interface card (NIC) configuration policy is obtained, and the NIC is configured according to the NIC configuration policy. The step of obtaining a network interface card (NIC) configuration strategy based on the warning information and the status data includes: constructing a state vector based on the warning information and the status data; inputting the state vector into a strategy generation model to obtain the probabilities of a preset number of candidate strategies; selecting the candidate strategy with the highest probability as an intermediate strategy; and adjusting the intermediate strategy based on the warning information and the status data to obtain the NIC configuration strategy. The step of adjusting the intermediate strategy based on the warning information and the status data to obtain the network interface card (NIC) configuration strategy includes: when the warning information is the first warning information, determining the backup NIC information, the first proportion of traffic to be migrated, and the NIC configuration parameters based on the status data, and writing the backup NIC information, the first proportion of traffic to be migrated, and the NIC configuration parameters into the intermediate strategy to obtain the NIC configuration strategy.
2. The method according to claim 1, characterized in that, Before determining the first comparison result between the predicted state data and the state data baseline, the method further includes: Obtain the threshold of the rate of change of the state data; The state data baseline is obtained based on the data range and the rate of change threshold.
3. The method according to claim 2, characterized in that, After determining whether the state data is within the data range based on the second comparison result, the method further includes: Determine the rate of change of the state data; If the status data is within the data range and the rate of change is less than the rate of change threshold, a second warning message is generated. If the status data is within the data range, and the difference between the status data and the boundary value of the data range is less than a second preset threshold, a third warning message is generated; If the status data is within the data range and the rate of change is greater than or equal to the rate of change threshold, the third warning information is generated.
4. The method according to claim 3, characterized in that, The step of adjusting the intermediate strategy based on the early warning information and the status data to obtain the network interface card configuration strategy includes: When the warning information is the second warning information, the network card configuration parameters are determined according to the status data, and the network card configuration parameters are written into the intermediate policy to obtain the network card configuration policy; When the warning information is the third warning information, the idle network card information, the second proportion of traffic to be migrated and the network card configuration parameters are determined according to the status data. The idle network card information, the second proportion of traffic to be migrated and the network card configuration parameters are written into the intermediate policy to obtain the network card configuration policy.
5. The method according to claim 4, characterized in that, The step of configuring the network interface card (NIC) according to the NIC configuration policy includes: If the network interface card (NIC) configuration policy includes the backup NIC information and the first proportion of traffic to be migrated, the backup NIC is determined based on the backup NIC information. Activate the backup network interface card (NIC), update the first traffic forwarding rule according to the first proportion of traffic to be migrated, and transfer the traffic of the NIC to the backup NIC according to the first traffic forwarding rule; If the network interface card (NIC) configuration policy includes the NIC configuration parameters, configure the NIC according to the NIC configuration parameters. If the network interface card (NIC) configuration policy includes the idle NIC information and the second proportion of traffic to be migrated, the idle NIC is determined based on the idle NIC information. The second traffic forwarding rule is updated according to the second proportion of traffic to be migrated, and the traffic of the network card is transferred to the idle network card according to the second traffic forwarding rule.
6. The method according to claim 1, characterized in that, After configuring the network interface card (NIC) according to the NIC configuration policy, the method further includes: If the network card is determined to be faulty based on the warning information, the fault characteristic information of the network card is obtained; Based on the fault characteristic information and the fault knowledge base, determine the repair strategy for the network card; Repair the network card according to the repair strategy.
7. The method according to claim 6, characterized in that, After repairing the network interface card according to the repair strategy, the method further includes: Determine the repair result of the network card; The warning information, the fault characteristic information, the repair strategy, and the repair results are written into the fault knowledge base.
8. A network interface card (NIC) management system, characterized in that, The system includes: a monitoring module, a policy determination module, and a network interface card (NIC) configuration module; The monitoring module is connected to the strategy determination module and is used to acquire the status data of the network card, determine the predicted status data based on the status data, acquire the historical status data of the network card, determine the data range of the status data within a preset time period in the historical status data, determine the first comparison result between the predicted status data and the status data baseline, determine the second comparison result between the status data and the status data baseline, use the first comparison result as a judgment criterion, combine the first comparison result and the second comparison result to generate the warning information of the network card, and transmit the warning information to the strategy determination module. The status data baseline is generated based on the historical status data of the network card. The monitoring module uses the first comparison result as a judgment criterion, combines the first comparison result and the second comparison result, and generates early warning information for the network card, including: if it is determined from the first comparison result that the predicted status data is not within the data range, determining whether the predicted status data exceeds a first preset threshold; if the predicted status data exceeds the first preset threshold, determining that the network card has a potential fault; if it is determined that the network card has a potential fault, determining whether the status data is within the data range based on the second comparison result; if the status data is not within the data range, generating first early warning information. The strategy determination module is connected to the network interface card (NIC) configuration module and is used to obtain a NIC configuration strategy based on the warning information and the status data, and transmit the NIC configuration strategy to the NIC configuration module. The strategy determination module obtains the NIC configuration strategy based on the warning information and the status data, including: constructing a state vector based on the warning information and the status data; inputting the state vector into a strategy generation model to obtain the probabilities of a preset number of candidate strategies; selecting the candidate strategy with the highest probability as the intermediate strategy; and adjusting the intermediate strategy based on the warning information and the status data to obtain the NIC configuration strategy. The strategy determination module adjusts the intermediate strategy according to the warning information and the status data to obtain the network card configuration strategy, including: when the warning information is the first warning information, determining the backup network card information, the first proportion of traffic to be migrated and the network card configuration parameters according to the status data, and writing the backup network card information, the first proportion of traffic to be migrated and the network card configuration parameters into the intermediate strategy to obtain the network card configuration strategy; The network interface card (NIC) configuration module is used to configure the NIC according to the NIC configuration policy.
9. The system according to claim 8, characterized in that, The network interface card (NIC) configuration module includes: a controller, a NIC configuration manager, and a traffic scheduler; The controller is connected to the network interface card (NIC) configuration manager and is used to obtain NIC configuration parameters from the NIC configuration policy, generate configuration instructions based on the NIC configuration parameters, and transmit the configuration instructions to the NIC configuration manager. The network interface card (NIC) configuration manager is used to configure the NIC according to the configuration instructions; The controller is connected to the traffic scheduler and is used to generate a first traffic transfer instruction based on the backup network card information and the first proportion of traffic to be migrated when the backup network card information and the first proportion of traffic to be migrated are obtained from the network card configuration policy, and to transmit the first traffic transfer instruction to the traffic scheduler. The controller is further configured to, upon obtaining idle network interface card information and a second proportion of traffic to be migrated from the network interface card configuration policy, generate a second traffic transfer instruction based on the idle network interface card information and the second proportion of traffic to be migrated, and transmit the second traffic transfer instruction to the traffic scheduler. The traffic scheduler is configured to determine a first traffic forwarding rule and a backup network interface card (NIC) according to the first traffic transfer instruction, and transfer the traffic of the NIC to the backup NIC according to the first traffic forwarding rule; or, determine a second traffic forwarding rule and an idle NIC according to the second traffic transfer instruction, and transfer the traffic of the NIC to the idle NIC according to the second traffic forwarding rule.
10. The system according to claim 9, characterized in that, The network interface card configuration module further includes: a configuration checking unit and a performance verification unit; The configuration checking unit is used to determine the historical configuration parameters of the network card before the network card configuration manager configures the network card according to the configuration instructions, and to check whether the network card is configured successfully after the network card configuration manager configures the network card. If the configuration fails, a rollback operation is performed on the network card according to the historical configuration parameters. The performance verification unit is used to check the network status of the backup network card after the traffic scheduler transfers the traffic of the network card to the backup network card according to the first traffic forwarding rule. The performance verification unit is further configured to check the network status of the idle network card after the traffic scheduler transfers the traffic of the network card to the idle network card according to the second traffic forwarding rule.
11. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the network interface card management method according to any one of claims 1 to 7 by executing the computer instructions.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the network interface card management method according to any one of claims 1 to 7.
13. A computer program product, characterized in that, Includes computer instructions, which are used to cause a computer to perform the network interface card management method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Performance monitoring method and system for data storage equipment
CN120029850A