Network card fault monitoring method and device, computer equipment and storage medium
Through the sampling and covariance matrix decomposition of network card voltage data, combined with the second-order difference algorithm, the prediction of network card failure is realized, which solves the problem of difficulty in monitoring the operation of the network card in the existing technology and ensures the stable operation of the server.
Patent Information
- Application Number
- CN202410693892.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-08-27
AI Technical Summary
The existing technology is difficult to effectively monitor the operation, internal usage and working stability of the server network card. It can only obtain basic information such as temperature and network connection status through the basic input and output system, and cannot predict failures in real time.
By continuously sampling the voltage data of the network card, the observed voltage matrix is constructed and the covariance matrix eigenvalue decomposition is performed. The second-order difference algorithm is used to calculate the edge detection results, predict the voltage status of the network card, and realize the monitoring and prediction of network card faults.
It achieves accurate monitoring of the voltage status of the network card, avoids the impact of noise, reduces false alarms and missed alarms, and ensures the stability of server operation.
Smart Images

Figure CN118550796A
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a network card fault monitoring method, device, computer equipment and storage medium. Background Art
[0002] At present, the competition in the server market is becoming increasingly fierce. In order to meet the diverse needs of customers, various manufacturers have successively launched server products with wider adaptability and stronger adaptability. With the rapid improvement of server performance, the configuration of server plug-in cards has become more and more abundant, including various types of network cards, adapter cards, disk array cards, etc. In the TCP / IP model, the network card works at the physical layer and data link layer to receive and send computer data. This requires the server network card to have the advantages of fast data transmission speed, low CPU occupancy, and high security performance.
[0003] like Figure 1 As shown in the figure, the current network card monitoring is mainly based on the information synchronized from the basic input and output system to the baseboard management controller. The basic input and output system mainly synchronizes part of the network card information to the basic management controller, and the baseboard management controller stores the information provided by the basic input and output system, and some information is actively obtained by the basic management controller. As for the fault information, it is only obtained from some log information thrown by the basic input and output system. Through the above method, users can get basic information such as the temperature of the current network card and whether the network can be connected normally, but they cannot know the operation status, internal usage and working stability of the network card.
[0004] Therefore, there is an urgent need to propose a network card fault monitoring method, device, computer equipment and storage medium that can monitor the fault status of the network card and ensure the stability of server operation. Summary of the invention
[0005] Based on this, it is necessary to provide a network card fault monitoring method, device, computer equipment and storage medium that can monitor the network card fault status and ensure the stability of server operation in response to the above technical problems.
[0006] In a first aspect, a network card fault monitoring method is provided, the network card fault monitoring method comprising predicting and monitoring a voltage state of the network card, the voltage prediction and monitoring method comprising:
[0007] Continuously sample the voltage data of the network card to obtain n 2 voltage sampling values, and the n 2 The voltage sampling values are converted into an observation voltage matrix with n rows and columns, wherein n is a positive integer and n is greater than 1, and the observation voltage matrix is formed by adding a real voltage matrix and a noise matrix;
[0008] Constructing a covariance matrix of the observed voltage matrix, and performing eigenvalue decomposition on the covariance matrix;
[0009] Constructing a reduction matrix according to the eigenvalues obtained by the decomposition, and calculating the real voltage data according to the reduction matrix;
[0010] Calculating the real voltage data according to a second-order difference algorithm to obtain an edge detection result, wherein the edge detection result is represented as a grayscale image;
[0011] In response to a white spot appearing in the edge detection result, it is predicted that the voltage state of the network card is abnormal.
[0012] In one embodiment, the observed voltage matrix X=A+W, wherein A represents the real voltage matrix, and W represents the noise matrix;
[0013] The covariance matrix of the observed voltage matrix is Where R = E{A H A}, Among them, E and I are unit matrices, represents the variance of the noise matrix;
[0014] The step of performing eigenvalue decomposition on the covariance matrix comprises:
[0015] Let rank(A) = r, and according to the rank(A) = r, Transform and obtain R x =UΠU H , wherein r represents the number of non-zero eigenvalues of the covariance matrix, U is the unit matrix, and Π represents the diagonal matrix containing the eigenvalues of the covariance matrix;
[0016] The step of constructing a reduction matrix according to the eigenvalues obtained by decomposition, and calculating the real voltage data according to the reduction matrix, includes:
[0017] According to the diagonal matrix, sorting the eigenvalues of the covariance matrix in descending order;
[0018] According to the sorting result, the first r eigenvalues of the covariance matrix are taken as the main eigenvalues of the restored matrix, and the secondary eigenvalues of the restored matrix are all set to 0;
[0019] According to R=UΠ s U H Calculate the real voltage data, where Π s represents the reduction matrix.
[0020] In one embodiment, calculating the real voltage data according to a second-order difference algorithm to obtain an edge detection result includes:
[0021] Construct a first-order difference formula for the real voltage data:
[0022] According to the first-order difference formula, the second-order difference formula is constructed: Get the one-dimensional convolution kernel [1, -2, 1];
[0023] According to the one-dimensional convolution kernel [1, -2, 1], convolution calculation and normalization are performed on the real voltage data to obtain the edge detection result.
[0024] In one embodiment, the network card includes 8 voltage monitoring points, and the voltage data of the network card is continuously sampled to obtain n 2 Voltage sampling values, including:
[0025] Receiving a voltage monitoring command, wherein the voltage monitoring command includes 8 voltage reading instructions, and the 8 voltage reading instructions correspond one-to-one to the 8 voltage monitoring points;
[0026] According to the voltage monitoring command, the hexadecimal number corresponding to each voltage monitoring point is read;
[0027] Shift the hexadecimal number corresponding to each voltage monitoring point to the right by 4 bits and convert it into a decimal number;
[0028] The voltage division coefficient of each voltage monitoring point is obtained, and the voltage sampling value of each voltage monitoring point is calculated according to the voltage sampling value of each voltage monitoring point = ((corresponding decimal number / 4096)*2.56) / corresponding voltage division coefficient.
[0029] In one embodiment, the network card includes three current monitoring points, and the network card fault monitoring method further includes monitoring the current state of the network card. The current monitoring method includes:
[0030] Receiving a current monitoring command, wherein the current monitoring command includes three current reading instructions, and the three current reading instructions correspond one-to-one to the three current monitoring points;
[0031] According to the current monitoring command, the hexadecimal number corresponding to each current monitoring point is read, and the hexadecimal number corresponding to each current monitoring point is converted into a positive hexadecimal number by taking the complement code;
[0032] Shift the hexadecimal positive number corresponding to each current monitoring point to the right by 3 bits and convert it into decimal;
[0033] Obtain the resistance value of each current monitoring point, and calculate the current value of each current monitoring point according to the current value of each current monitoring point = ((corresponding decimal number * 40) / 1000) / corresponding resistance value;
[0034] The current value of each current monitoring point is compared with a preset current threshold to determine the current state of the network card.
[0035] In one embodiment, the network card fault monitoring method further includes monitoring the power consumption state of the network card, and the power consumption monitoring method includes:
[0036] Obtaining a shunt coefficient for each current monitoring point, and multiplying the current value of each current monitoring point by the corresponding shunt coefficient to calculate the power consumption value of the corresponding current monitoring point;
[0037] Add the power consumption values of the three current monitoring points to calculate the total power consumption value of the network card;
[0038] The total power consumption value of the network card is compared with a preset power consumption threshold to determine the power consumption state of the network card.
[0039] In one embodiment, the method further comprises:
[0040] Store the network card fault monitoring information in the log file in the form of a string;
[0041] Setting a status monitoring sensor, wherein the status monitoring sensor includes at least 5 network card fault character strings and event descriptions and byte positions corresponding to the at least 5 network card fault character strings;
[0042] Acquire the network card fault monitoring information, wherein the network card fault monitoring information includes a network card fault character string;
[0043] Based on the status monitoring sensor, the corresponding byte position is found according to the network card fault character string to determine the cause of the network card fault.
[0044] In a second aspect, a network card fault monitoring device is provided, the network card fault monitoring device comprising a voltage prediction monitoring module, the voltage prediction monitoring module comprising the following submodules:
[0045] The sampling conversion submodule is used to continuously sample the voltage data of the network card to obtain n 2 voltage sampling values, and the n 2The voltage sampling values are converted into an observation voltage matrix with n rows and columns, wherein n is a positive integer and n is greater than 1, and the observation voltage matrix is formed by adding a real voltage matrix and a noise matrix;
[0046] Constructing a decomposition submodule, the decomposition submodule is used to construct a covariance matrix of the observed voltage matrix and perform eigenvalue decomposition on the covariance matrix;
[0047] A calculation submodule is constructed, wherein the calculation submodule is used to construct a reduction matrix according to the eigenvalues obtained by decomposition, and calculate the real voltage data according to the reduction matrix;
[0048] A calculation acquisition submodule, the calculation acquisition submodule is used to calculate the real voltage data according to a second-order difference algorithm to obtain an edge detection result, wherein the edge detection result is represented as a grayscale image;
[0049] A judgment submodule is used for predicting that the voltage state of the network card is abnormal in response to the appearance of a white spot in the edge detection result.
[0050] In a third aspect, a computer device is provided, comprising one or more processors; and a memory associated with the one or more processors, the memory being used to store program instructions, which, when read and executed by the one or more processors, execute the steps of the method described in any one of the first aspects above.
[0051] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in any one of the first aspects are performed.
[0052] In a fifth aspect, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the method described in any one of the above-mentioned first aspects are implemented.
[0053] The above-mentioned network card fault monitoring method, device, computer equipment and storage medium obtain the network card's n by continuous sampling. 2 voltage sampling values, and the n 2The voltage sampling values are converted into an observed voltage matrix with n rows and columns; the covariance matrix of the observed voltage matrix is constructed, and the eigenvalue decomposition of the covariance matrix is performed; a reduction matrix is constructed according to the eigenvalues obtained by the decomposition, and the real voltage data is calculated according to the reduction matrix to avoid the influence of noise on the signal. The real voltage data is calculated according to the second-order difference algorithm to obtain an edge detection result, wherein the edge detection result is represented as a grayscale image; in response to the appearance of white spots in the edge detection result, it is predicted that the voltage state of the network card is abnormal, the voltage state of the network card is monitored, and the stability of the server operation is ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a schematic block diagram of a network card fault monitoring method in the background technology;
[0055] Figure 2 A schematic block diagram of a network card fault monitoring method in this application;
[0056] Figure 3 A schematic diagram of a flow chart of a network card fault monitoring method in one embodiment;
[0057] Figure 4 is a schematic diagram of an edge detection result in one embodiment;
[0058] Figure 5 is a structural block diagram of a network card fault monitoring device in an embodiment;
[0059] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0060] like Figure 2 As shown, in this application, voltage monitoring, current monitoring, and power consumption monitoring of the network card are added. The baseboard management controller directly obtains voltage data, current data, and power consumption data from the network card through smbus (System Management Bus). And the baseboard management controller transmits the obtained voltage data, current data, and power consumption data to the computer in the same network segment through redfish, ipmi, and resful protocols.
[0061] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0062] Embodiment 1
[0063] In one embodiment, Figure 3 , Figure 4 As shown, a network card fault monitoring method is provided, the network card fault monitoring method includes predicting and monitoring the voltage state of the network card, and the voltage prediction and monitoring method includes:
[0064] Continuously sample the voltage data of the network card to obtain n 2 voltage sampling values, and the n 2 The voltage sampling values are converted into an observation voltage matrix with n rows and columns, wherein n is a positive integer and n is greater than 1, and the observation voltage matrix is formed by adding a real voltage matrix and a noise matrix;
[0065] Constructing a covariance matrix of the observed voltage matrix, and performing eigenvalue decomposition on the covariance matrix;
[0066] Constructing a reduction matrix according to the eigenvalues obtained by the decomposition, and calculating the real voltage data according to the reduction matrix;
[0067] Calculating the real voltage data according to a second-order difference algorithm to obtain an edge detection result, wherein the edge detection result is represented as a grayscale image;
[0068] In response to a white spot appearing in the edge detection result, it is predicted that the voltage state of the network card is abnormal.
[0069] Specifically, the network card's n is obtained through continuous sampling 2 voltage sampling values, and the n 2 The voltage sampling values are converted into an observed voltage matrix with n rows and columns; the covariance matrix of the observed voltage matrix is constructed, and the eigenvalue decomposition of the covariance matrix is performed; a reduction matrix is constructed according to the eigenvalues obtained by the decomposition, and the real voltage data is calculated according to the reduction matrix to avoid the influence of noise on the signal. The real voltage data is calculated according to the second-order difference algorithm to obtain an edge detection result, wherein the edge detection result is represented as a grayscale image; in response to the appearance of white spots in the edge detection result, it is predicted that the voltage state of the network card is abnormal, the voltage state of the network card is monitored, and the stability of the server operation is ensured.
[0070] In one embodiment, the observed voltage matrix X=A+W, wherein A represents the real voltage matrix, and W represents the noise matrix;
[0071] The covariance matrix of the observed voltage matrix is Where R = E{A H A}, Among them, E and I are unit matrices, represents the variance of the noise matrix;
[0072] The step of performing eigenvalue decomposition on the covariance matrix comprises:
[0073] Let rank(A) = r, and according to the rank(A) = r, Transform and obtain R x =UΠU H , wherein r represents the number of non-zero eigenvalues of the covariance matrix, U is the unit matrix, and Π represents the diagonal matrix containing the eigenvalues of the covariance matrix;
[0074] The step of constructing a reduction matrix according to the eigenvalues obtained by decomposition, and calculating the real voltage data according to the reduction matrix, includes:
[0075] According to the diagonal matrix, sorting the eigenvalues of the covariance matrix in descending order;
[0076] According to the sorting result, the first r eigenvalues of the covariance matrix are taken as the main eigenvalues of the restored matrix, and the secondary eigenvalues of the restored matrix are all set to 0;
[0077] According to R=UΠ s U H Calculate the real voltage data, where Π s represents the reduction matrix.
[0078] Specifically, a restoration matrix is constructed according to the above formula, and the real voltage data is calculated according to the restoration matrix, so as to improve the accuracy of the voltage data, avoid the influence of noise on the signal, and reduce the probability of false alarm and missed alarm.
[0079] Specifically, the column space of the observation voltage matrix Span(X)=Span{x1, x2, L, x n}, R x =E{X H X}=E{(A+W) H (A+W)}, assuming that the noise subspace and the true voltage subspace are statistically uncorrelated, R x =E{A H A}+E{W H W}, Formula 4:
[0080] Specifically, the first r large eigenvalues can be regarded as the main eigenvalues, and the remaining eigenvalues can be regarded as secondary eigenvalues to separate the real voltage subspace and the noise subspace: Where S = [u1, u2, L, u r ],G=[u r+1 ,u r+2 ,L,u n] The m×r unitary matrix S and the m×(nr) unitary matrix G are matrices consisting of eigenvectors corresponding to the r main eigenvalues and (nr) secondary eigenvalues, respectively.
[0081] Specifically, n is set to 10 and r is set to 3.
[0082] In one embodiment, calculating the real voltage data according to a second-order difference algorithm to obtain an edge detection result includes:
[0083] Construct a first-order difference formula for the real voltage data:
[0084] According to the first-order difference formula, the second-order difference formula is constructed: Get the one-dimensional convolution kernel [1, -2, 1];
[0085] According to the one-dimensional convolution kernel [1, -2, 1], convolution calculation and normalization are performed on the real voltage data to obtain the edge detection result.
[0086] Specifically, through edge detection, the starting point of a significant voltage rise or fall can be obtained, which has a positive effect on the prediction of voltage anomalies. This method can make a preliminary prediction of voltage anomalies and provide feedback to operation and maintenance personnel through log files, so that they can pay attention to the voltage in advance and make predictions for faults.
[0087] In one embodiment, the network card includes 8 voltage monitoring points, and the voltage data of the network card is continuously sampled to obtain n 2 Voltage sampling values, including:
[0088] Receiving a voltage monitoring command, wherein the voltage monitoring command includes 8 voltage reading instructions, and the 8 voltage reading instructions correspond one-to-one to the 8 voltage monitoring points;
[0089] According to the voltage monitoring command, the hexadecimal number corresponding to each voltage monitoring point is read;
[0090] Shift the hexadecimal number corresponding to each voltage monitoring point to the right by 4 bits and convert it into a decimal number;
[0091] The voltage division coefficient of each voltage monitoring point is obtained, and the voltage sampling value of each voltage monitoring point is calculated according to the voltage sampling value of each voltage monitoring point = ((corresponding decimal number / 4096)*2.56) / corresponding voltage division coefficient.
[0092] Specifically, according to the hexadecimal number corresponding to each voltage monitoring point read, a voltage sampling value corresponding to the hexadecimal number is calculated, so as to subsequently monitor the voltage status of the network card.
[0093] Specifically, the voltage of the network card is monitored through an external analog-to-digital converter. The chip used for voltage monitoring is ADC128D818CIMT, and the monitoring method adopted is smbus communication, and the communication address is 0x1f. The specific communication protocols and functions used are as follows:
[0094]
[0095]
[0096] In one embodiment, the network card includes three current monitoring points, and the network card fault monitoring method further includes monitoring the current state of the network card. The current monitoring method includes:
[0097] Receiving a current monitoring command, wherein the current monitoring command includes three current reading instructions, and the three current reading instructions correspond one-to-one to the three current monitoring points;
[0098] According to the current monitoring command, the hexadecimal number corresponding to each current monitoring point is read, and the hexadecimal number corresponding to each current monitoring point is converted into a positive hexadecimal number by taking the complement code;
[0099] Shift the hexadecimal positive number corresponding to each current monitoring point to the right by 3 bits and convert it into decimal;
[0100] Obtain the resistance value of each current monitoring point, and calculate the current value of each current monitoring point according to the current value of each current monitoring point = ((corresponding decimal number * 40) / 1000) / corresponding resistance value;
[0101] The current value of each current monitoring point is compared with a preset current threshold to determine the current state of the network card.
[0102] Specifically, according to the hexadecimal number corresponding to each current monitoring point read, the current value corresponding to the hexadecimal number is calculated, so as to subsequently monitor the current state of the network card.
[0103] In one embodiment, the network card fault monitoring method further includes monitoring the power consumption state of the network card, and the power consumption monitoring method includes:
[0104] Obtaining a shunt coefficient for each current monitoring point, and multiplying the current value of each current monitoring point by the corresponding shunt coefficient to calculate the power consumption value of the corresponding current monitoring point;
[0105] Add the power consumption values of the three current monitoring points to calculate the total power consumption value of the network card;
[0106] The total power consumption value of the network card is compared with a preset power consumption threshold to determine the power consumption state of the network card.
[0107] Specifically, the total power consumption value of the network card is calculated according to the current value and the shunt coefficient monitored at each current monitoring point, so as to subsequently monitor the power consumption state of the network card.
[0108] Specifically, a sensor named NIC_Power is set to store the total power consumption value of the network card. The total power consumption value of the network card can be read through the ipmi command.
[0109] Specifically, the current of the network card is collected through the INA3221 chip, and the monitoring method adopted is smbus communication, and the communication address is 0x41. The specific communication protocols and functions used are as follows:
[0110]
[0111] In one embodiment, the method further comprises:
[0112] Store the network card fault monitoring information in the log file in the form of a string;
[0113] Setting a status monitoring sensor, wherein the status monitoring sensor includes at least 5 network card fault character strings and event descriptions and byte positions corresponding to the at least 5 network card fault character strings;
[0114] Acquire the network card fault monitoring information, wherein the network card fault monitoring information includes a network card fault character string;
[0115] Based on the status monitoring sensor, the corresponding byte position is found according to the network card fault character string to determine the cause of the network card fault.
[0116] Specifically, the voltage state, current state, power consumption state and cpld state of the network card are obtained through the above monitoring method; these state information are sorted and stored in the shared memory and the state monitoring sensor of the baseboard management controller to monitor the fault of the network card.
[0117] Specifically, the byte position indicates the bit number in the corresponding byte. First, classify the network card fault type, and then set a status monitoring sensor, and name the status monitoring sensor NIC_Status, where the status monitoring sensor is defined as follows:
[0118]
[0119]
[0120] Specifically, the method further includes periodically acquiring network card status information through a designed interface:
[0121] 1) Periodically use the ipmi command to obtain the voltage status, current status information, power consumption status information and various abnormal information of the network card;
[0122] 2) Add more monitoring items to the original redfish monitoring interface, such as current and power consumption, to make network card fault monitoring more comprehensive;
[0123] 3) Once the network card information is found to be abnormal, the maintenance log on the baseboard management controller is collected using the RESTful or Redfish interface to determine the detailed cause of the abnormality and make corresponding fault processing.
[0124] Specifically, a status monitoring sensor containing the correspondence between the network card fault string and the byte position is set. Once the network card status is found to be abnormal, the specific details of the fault can be obtained based on the network card fault monitoring information in the log file, that is, the network card fault string, to facilitate subsequent operations by maintenance personnel.
[0125] In one embodiment, the network card fault monitoring method further includes monitoring a complex programmable logic device of the network card, and the complex programmable logic device monitoring method includes:
[0126] Receive a complex programmable logic device monitoring command, wherein the complex programmable logic device monitoring command includes at least four byte read instructions, wherein the four byte read instructions include a version byte read instruction, a power state read instruction, a reset state read instruction, and an interrupt state read instruction;
[0127] In response to the complex programmable logic device monitoring command being the version byte read instruction, acquiring the second byte of the complex programmable logic device, and determining the version information of the complex programmable logic device according to the correspondence between the second byte of the complex programmable logic device and the version information;
[0128] In response to the complex programmable logic device monitoring command being the power state reading instruction, acquiring three bytes of the complex programmable logic device, and determining the power state of the complex programmable logic device according to the correspondence between the three bytes of the complex programmable logic device and the power state;
[0129] In response to the complex programmable logic device monitoring command being the reset state reading instruction, acquiring the second byte of the complex programmable logic device, and determining the reset state of the complex programmable logic device according to the corresponding relationship between the second byte of the complex programmable logic device and the reset state;
[0130] In response to the CPLD monitoring command being the interrupt status read instruction, a second byte of the CPLD is acquired, and the interrupt status of the CPLD is determined according to the corresponding relationship between the second byte of the CPLD and the interrupt status.
[0131] Specifically, through the above method, the basic management controller can read the partial operating status of the network card from the cpld through the smbus, and can facilitate the maintenance operation of the maintenance personnel according to the byte information corresponding to the fault.
[0132] Specifically, the cpld of the network card uses the LCMXO2-2000HC-4MG132C model of the Lattice Machxo2 series. The cpld is mainly used for the main control logic of the FPGA board, including reset / interrupt / power-on timing management, etc. The basic management controller can read some operating status of the network card from the cpld through smbus, and the i2c communication address is 0x10. The following table shows the monitoring items that need to be paid attention to in the current status monitoring.
[0133]
[0134]
[0135]
[0136] It should be understood that although Figure 3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0137] Embodiment 2
[0138] In one embodiment, Figure 5As shown, a network card fault monitoring device is provided, the network card fault monitoring device includes a voltage prediction monitoring module, and the voltage prediction monitoring module includes the following submodules:
[0139] The sampling conversion submodule is used to continuously sample the voltage data of the network card to obtain n 2 voltage sampling values, and the n 2 The voltage sampling values are converted into an observation voltage matrix with n rows and columns, wherein n is a positive integer and n is greater than 1, and the observation voltage matrix is formed by adding a real voltage matrix and a noise matrix;
[0140] Constructing a decomposition submodule, the decomposition submodule is used to construct a covariance matrix of the observed voltage matrix and perform eigenvalue decomposition on the covariance matrix;
[0141] A calculation submodule is constructed, wherein the calculation submodule is used to construct a reduction matrix according to the eigenvalues obtained by decomposition, and calculate the real voltage data according to the reduction matrix;
[0142] A calculation acquisition submodule, the calculation acquisition submodule is used to calculate the real voltage data according to a second-order difference algorithm to obtain an edge detection result, wherein the edge detection result is represented as a grayscale image;
[0143] A judgment submodule is used for predicting that the voltage state of the network card is abnormal in response to the appearance of a white spot in the edge detection result.
[0144] In one embodiment, the sampling conversion submodule is specifically used for:
[0145] The observed voltage matrix X=A+W, wherein A represents the real voltage matrix, and W represents the noise matrix;
[0146] The construction decomposition submodule is specifically used for:
[0147] The covariance matrix of the observed voltage matrix is Where R = E{A H A}, Among them, E and I are unit matrices, represents the variance of the noise matrix;
[0148] Let rank(A) = r, and according to the rank(A) = r, Transform and obtain R x =UΠU H , wherein r represents the number of non-zero eigenvalues of the covariance matrix, U is the unit matrix, and Π represents the diagonal matrix containing the eigenvalues of the covariance matrix;
[0149] The construction calculation submodule is specifically used for:
[0150] According to the diagonal matrix, sorting the eigenvalues of the covariance matrix in descending order;
[0151] According to the sorting result, the first r eigenvalues of the covariance matrix are taken as the main eigenvalues of the restored matrix, and the secondary eigenvalues of the restored matrix are all set to 0;
[0152] According to R=UΠ s U H Calculate the real voltage data, where Π s represents the reduction matrix.
[0153] In one embodiment, the calculation acquisition submodule is specifically used for:
[0154] Construct a first-order difference formula for the real voltage data:
[0155] According to the first-order difference formula, the second-order difference formula is constructed: Get the one-dimensional convolution kernel [1, -2, 1];
[0156] According to the one-dimensional convolution kernel [1, -2, 1], convolution calculation and normalization are performed on the real voltage data to obtain the edge detection result.
[0157] In one embodiment, the network card includes 8 voltage monitoring points, and the sampling conversion submodule is specifically used for:
[0158] Receiving a voltage monitoring command, wherein the voltage monitoring command includes 8 voltage reading instructions, and the 8 voltage reading instructions correspond one-to-one to the 8 voltage monitoring points;
[0159] According to the voltage monitoring command, the hexadecimal number corresponding to each voltage monitoring point is read;
[0160] Shift the hexadecimal number corresponding to each voltage monitoring point to the right by 4 bits and convert it into a decimal number;
[0161] The voltage division coefficient of each voltage monitoring point is obtained, and the voltage sampling value of each voltage monitoring point is calculated according to the voltage sampling value of each voltage monitoring point = ((corresponding decimal number / 4096)*2.56) / corresponding voltage division coefficient.
[0162] In one embodiment, the network card includes three current monitoring points, and the network card fault monitoring device further includes a current monitoring module, and the current monitoring module includes the following submodules:
[0163] A receiving submodule, the receiving submodule is used to receive a current monitoring command, wherein the current monitoring command includes three current reading instructions, and the three current reading instructions correspond to the three current monitoring points one by one;
[0164] A reading conversion submodule, the reading conversion submodule is used to read the hexadecimal number corresponding to each current monitoring point according to the current monitoring command, and convert the hexadecimal number corresponding to each current monitoring point into a positive hexadecimal number by taking the complement code;
[0165] A conversion submodule, the conversion submodule is used to shift the hexadecimal positive number corresponding to each current monitoring point to the right by 3 bits and convert it into a decimal system;
[0166] An acquisition calculation submodule, the acquisition calculation submodule is used to obtain the resistance value of each current monitoring point, and calculate the current value of each current monitoring point according to the current value of each current monitoring point = ((corresponding decimal number * 40) / 1000) / corresponding resistance value;
[0167] A comparison submodule is used to compare the current value of each current monitoring point with a preset current threshold value to determine the current state of the network card.
[0168] In one embodiment, the network card fault monitoring device further includes a power consumption monitoring module, and the power consumption monitoring module includes the following submodules:
[0169] An acquisition calculation submodule, the acquisition calculation submodule is used to obtain the shunt coefficient of each current monitoring point, and multiply the current value of each current monitoring point by the corresponding shunt coefficient to calculate the power consumption value of the corresponding current monitoring point;
[0170] A calculation submodule, the calculation submodule is used to add the power consumption values of the three current monitoring points to calculate the total power consumption value of the network card;
[0171] A comparison submodule is used to compare the total power consumption value of the network card with a preset power consumption threshold to determine the power consumption state of the network card.
[0172] In one embodiment, the apparatus further comprises:
[0173] A storage module, the storage module is used to store the network card fault monitoring information in a log file in the form of a character string;
[0174] A setting module, the setting module is used to set a status monitoring sensor, wherein the status monitoring sensor contains at least 5 types of network card fault character strings and event descriptions and byte positions corresponding to the at least 5 types of network card fault character strings;
[0175] An acquisition module, the acquisition module is used to acquire the network card fault monitoring information, wherein the network card fault monitoring information includes a network card fault character string;
[0176] A search module is used to search for a corresponding byte position according to the network card fault character string based on the status monitoring sensor to determine the cause of the network card failure.
[0177] For the specific definition of the network card fault monitoring device, please refer to the definition of the network card fault monitoring method above, which will not be repeated here. Each module in the above-mentioned network card fault monitoring device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0178] Embodiment 3
[0179] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0180] Continuously sample the voltage data of the network card to obtain n 2 voltage sampling values, and the n 2 The voltage sampling values are converted into an observation voltage matrix with n rows and columns, wherein n is a positive integer and n is greater than 1, and the observation voltage matrix is formed by adding a real voltage matrix and a noise matrix;
[0181] Constructing a covariance matrix of the observed voltage matrix, and performing eigenvalue decomposition on the covariance matrix;
[0182] Constructing a reduction matrix according to the eigenvalues obtained by the decomposition, and calculating the real voltage data according to the reduction matrix;
[0183] Calculating the real voltage data according to a second-order difference algorithm to obtain an edge detection result, wherein the edge detection result is represented as a grayscale image;
[0184] In response to a white spot appearing in the edge detection result, it is predicted that the voltage state of the network card is abnormal.
[0185] When the program instructions are read and executed by the one or more processors, the program instructions may also perform operations corresponding to the steps in the above method embodiments, and the above description may be referred to, which will not be repeated here. Figure 6, which exemplarily shows the architecture of a computer device, which may specifically include a processor 610, a video display adapter 611, a disk drive 612, an input / output interface 613, a network interface 614, and a memory 620. The processor 610, the video display adapter 611, the disk drive 612, the input / output interface 613, the network interface 614, and the memory 620 may be communicatively connected via a communication bus 630.
[0186] Among them, the processor 610 can be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solution provided in this application.
[0187] The memory 620 can be implemented in the form of a read-only memory (ROM), a random access memory (RAM), a static storage device, a dynamic storage device, etc. The memory 620 can store an operating system 621 for controlling the operation of the computer device 600, and a basic input and output system (BIOS) 622 for controlling the low-level operation of the computer device 600. In addition, a web browser 623, a data storage manager 624, and an icon font processing system 625, etc. can also be stored. The above-mentioned icon font processing system 625 can be an application program that specifically implements the operations of the aforementioned steps in the embodiment of the present application. In short, when the technical solution provided by the present application is implemented by software or firmware, the relevant program code is stored in the memory 620 and is called and executed by the processor 610.
[0188] The input / output interface 613 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0189] The network interface 614 is used to connect to a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0190] The bus 630 comprises a pathway for transmitting information between the various components of the device (eg, the processor 610, the video display adapter 611, the disk drive 612, the input / output interface 613, the network interface 614, and the memory 620).
[0191] In addition, the computer device 600 can also obtain information on specific collection conditions from the virtual resource object collection condition information database 641 for use in condition judgment, etc.
[0192] It should be noted that, although the above-mentioned computer device 600 only shows a processor 610, a video display adapter 611, a disk drive 612, an input / output interface 613, a network interface 614, a memory 620, a bus 630, etc., in the specific implementation process, the computer device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above-mentioned device may also only include components necessary for implementing the solution of the present application, and does not necessarily include all the components shown in the figure.
[0193] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for enabling a computer device (which can be a personal computer, a cloud server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0194] Embodiment 4
[0195] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0196] Continuously sample the voltage data of the network card to obtain n 2 voltage sampling values, and the n 2 The voltage sampling values are converted into an observation voltage matrix with n rows and columns, wherein n is a positive integer and n is greater than 1, and the observation voltage matrix is formed by adding a real voltage matrix and a noise matrix;
[0197] Constructing a covariance matrix of the observed voltage matrix, and performing eigenvalue decomposition on the covariance matrix;
[0198] Constructing a reduction matrix according to the eigenvalues obtained by the decomposition, and calculating the real voltage data according to the reduction matrix;
[0199] Calculating the real voltage data according to a second-order difference algorithm to obtain an edge detection result, wherein the edge detection result is represented as a grayscale image;
[0200] In response to a white spot appearing in the edge detection result, it is predicted that the voltage state of the network card is abnormal.
[0201] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0202] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0203] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
[0204] Embodiment 5
[0205] In one embodiment, a computer program product is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0206] Continuously sample the voltage data of the network card to obtain n 2 voltage sampling values, and the n 2 The voltage sampling values are converted into an observation voltage matrix with n rows and columns, wherein n is a positive integer and n is greater than 1, and the observation voltage matrix is formed by adding a real voltage matrix and a noise matrix;
[0207] Constructing a covariance matrix of the observed voltage matrix, and performing eigenvalue decomposition on the covariance matrix;
[0208] Constructing a reduction matrix according to the eigenvalues obtained by the decomposition, and calculating the real voltage data according to the reduction matrix;
[0209] Calculating the real voltage data according to a second-order difference algorithm to obtain an edge detection result, wherein the edge detection result is represented as a grayscale image;
[0210] In response to a white spot appearing in the edge detection result, it is predicted that the voltage state of the network card is abnormal.
[0211] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program. The computer program can be stored in a computer program product. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods.
[0212] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0213] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A network card fault monitoring method, characterized in that: The network card fault monitoring method includes predicting and monitoring the voltage state of the network card, and the voltage prediction and monitoring method includes: Continuously sample the voltage data of the network card to obtain n 2 voltage sampling values, and the n 2 The voltage sampling values are converted into an observation voltage matrix with n rows and columns, wherein n is a positive integer and n is greater than 1, and the observation voltage matrix is formed by adding a real voltage matrix and a noise matrix; Constructing a covariance matrix of the observed voltage matrix, and performing eigenvalue decomposition on the covariance matrix; Constructing a reduction matrix according to the eigenvalues obtained by the decomposition, and calculating the real voltage data according to the reduction matrix; Calculating the real voltage data according to a second-order difference algorithm to obtain an edge detection result, wherein the edge detection result is represented as a grayscale image; In response to a white spot appearing in the edge detection result, it is predicted that the voltage state of the network card is abnormal.
2. The method according to claim 1, characterized in that: The observed voltage matrix X=A+W, wherein A represents the real voltage matrix, and W represents the noise matrix; The covariance matrix of the observed voltage matrix is Where R = E{A H A}, Among them, E and I are unit matrices, represents the variance of the noise matrix; The step of performing eigenvalue decomposition on the covariance matrix comprises: Let rank(A) = r, and according to the rank(A) = r, Transform and obtain R x =UΠU H , wherein r represents the number of non-zero eigenvalues of the covariance matrix, U is the unit matrix, and Π represents the diagonal matrix containing the eigenvalues of the covariance matrix; The step of constructing a reduction matrix according to the eigenvalues obtained by decomposition, and calculating the real voltage data according to the reduction matrix, includes: According to the diagonal matrix, sorting the eigenvalues of the covariance matrix in descending order; According to the sorting result, the first r eigenvalues of the covariance matrix are taken as the main eigenvalues of the restored matrix, and the secondary eigenvalues of the restored matrix are all set to 0; According to R=UΠ s U H Calculate the real voltage data, where Π s represents the reduction matrix.
3. The method according to claim 1 or 2, characterized in that: The calculating the real voltage data according to the second-order difference algorithm to obtain the edge detection result includes: Construct a first-order difference formula for the real voltage data: According to the first-order difference formula, the second-order difference formula is constructed: Get the one-dimensional convolution kernel [1,-2,1]; According to the one-dimensional convolution kernel [1, -2, 1], convolution calculation and normalization are performed on the real voltage data to obtain the edge detection result.
4. The method according to claim 1, characterized in that: The network card includes 8 voltage monitoring points. The voltage data of the network card is continuously sampled to obtain n 2 Voltage sampling values, including: Receiving a voltage monitoring command, wherein the voltage monitoring command includes 8 voltage reading instructions, and the 8 voltage reading instructions correspond one-to-one to the 8 voltage monitoring points; According to the voltage monitoring command, the hexadecimal number corresponding to each voltage monitoring point is read; Shift the hexadecimal number corresponding to each voltage monitoring point to the right by 4 bits and convert it into a decimal number; The voltage division coefficient of each voltage monitoring point is obtained, and the voltage sampling value of each voltage monitoring point is calculated according to the voltage sampling value of each voltage monitoring point = ((corresponding decimal number / 4096)*2.56) / corresponding voltage division coefficient.
5. The method according to claim 1, characterized in that: The network card includes three current monitoring points. The network card fault monitoring method further includes monitoring the current state of the network card. The current monitoring method includes: Receiving a current monitoring command, wherein the current monitoring command includes three current reading instructions, and the three current reading instructions correspond one-to-one to the three current monitoring points; According to the current monitoring command, the hexadecimal number corresponding to each current monitoring point is read, and the hexadecimal number corresponding to each current monitoring point is converted into a positive hexadecimal number by taking the complement code; Shift the hexadecimal positive number corresponding to each current monitoring point to the right by 3 bits and convert it into decimal; Obtain the resistance value of each current monitoring point, and calculate the current value of each current monitoring point according to the current value of each current monitoring point = ((corresponding decimal number * 40) / 1000) / corresponding resistance value; The current value of each current monitoring point is compared with a preset current threshold to determine the current state of the network card.
6. The method according to claim 5, characterized in that: The network card fault monitoring method further includes monitoring the power consumption state of the network card, and the power consumption monitoring method includes: Obtaining a shunt coefficient for each current monitoring point, and multiplying the current value of each current monitoring point by the corresponding shunt coefficient to calculate the power consumption value of the corresponding current monitoring point; Add the power consumption values of the three current monitoring points to calculate the total power consumption value of the network card; The total power consumption value of the network card is compared with a preset power consumption threshold to determine the power consumption state of the network card.
7. The method according to claim 1, characterized in that: The method further comprises: Store the network card fault monitoring information in the log file in the form of a string; Setting a status monitoring sensor, wherein the status monitoring sensor includes at least 5 network card fault character strings and event descriptions and byte positions corresponding to the at least 5 network card fault character strings; Acquire the network card fault monitoring information, wherein the network card fault monitoring information includes a network card fault character string; Based on the status monitoring sensor, the corresponding byte position is found according to the network card fault character string to determine the cause of the network card fault.
8. A network card fault monitoring device, characterized in that: The network card fault monitoring device includes a voltage prediction monitoring module, and the voltage prediction monitoring module includes the following submodules: The sampling conversion submodule is used to continuously sample the voltage data of the network card to obtain n 2 voltage sampling values, and the n 2 The voltage sampling values are converted into an observation voltage matrix with n rows and columns, wherein n is a positive integer and n is greater than 1, and the observation voltage matrix is formed by adding a real voltage matrix and a noise matrix; Constructing a decomposition submodule, the decomposition submodule is used to construct a covariance matrix of the observed voltage matrix and perform eigenvalue decomposition on the covariance matrix; A calculation submodule is constructed, wherein the calculation submodule is used to construct a reduction matrix according to the eigenvalues obtained by decomposition, and calculate the real voltage data according to the reduction matrix; A calculation acquisition submodule, the calculation acquisition submodule is used to calculate the real voltage data according to a second-order difference algorithm to obtain an edge detection result, wherein the edge detection result is represented as a grayscale image; A judgment submodule is used for predicting that the voltage state of the network card is abnormal in response to the appearance of a white spot in the edge detection result.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
