An abnormality detection method and system for electronic distribution frame
By building an anomaly detection model and using sensor data to detect anomalies in electronic distribution frames, the problem of the machine vision system's dependence on image quality is solved, and more accurate and flexible anomaly detection is achieved to adapt to different environments.
Patent Information
- Application Number
- CN202410326109.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-21
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-03-21
AI Technical Summary
Existing machine vision systems rely on the quality of images captured by cameras in abnormal detection of electronic patch panels. When the ambient light is insufficient, the camera position is poor, or there are obstructions, the image quality may decrease, affecting the accuracy of abnormality detection, and affecting the accuracy of abnormality detection. Sensitive to wiring changes, leading to false alarms.
By acquiring temperature sensor data, humidity sensor data, smoke sensor data, power data and network equipment data, an electronic distribution frame anomaly detection model is constructed, using encoders, memory units, decoders and discriminators to perform anomaly detection and calculate anomaly scores. Output alarm information.
There is no need to rely on the image quality captured by the camera, and it can detect traditional power failures and hidden problems such as excessive temperature and abnormal humidity, improving the accuracy and universality of abnormality detection, and dynamically adjusting the preset score to respond to different situations.
Smart Images

Figure CN117978620B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to an abnormality detection method and system for an electronic distribution frame. Background Art
[0002] The electronic patch panel is a key hub of network equipment. It connects network devices such as servers, routers, switches, and storage devices to provide necessary support for data transmission. However, as the scale and complexity of the network increase, the management and monitoring of the electronic patch panel becomes increasingly difficult. Operators and data center managers are faced with a series of challenges such as how to ensure high availability of equipment, reduce energy consumption, improve security, and identify and resolve faults in a timely manner. Timely abnormal detection of electronic patch panels is of utmost importance.
[0003] With the rapid development of technologies such as pattern recognition, machine vision, and deep learning, as well as the urgent need for anomaly detection in electronic distribution frames, more and more modern technologies are being applied to anomaly detection in electronic distribution frames.
[0004] In the prior art, there is a method of obtaining a real-time image of an electronic distribution frame through a camera, and using machine vision technology to monitor whether there is an abnormality in the electronic distribution frame in the real-time image, without the need for human intervention, saving time and effort, and improving the efficiency of abnormality detection in the electronic distribution frame. However, the monitoring method of machine vision depends on the quality of the image captured by the camera. If the ambient light is insufficient, the camera is not in a good position, or there are obstructions, the image quality may be reduced, affecting the accuracy of abnormality detection. At the same time, the machine vision system may be very sensitive to changes in the wiring of the electronic distribution frame, including the movement or adjustment of the cable, which may be mistaken for an abnormality, resulting in a false alarm, reducing the accuracy of abnormality detection in the electronic distribution frame. Summary of the invention
[0005] In order to solve the technical problem that the machine vision monitoring method in the prior art relies on the image quality captured by the camera, if the ambient light is insufficient, the camera is not well positioned or there are obstructions, the image quality may be degraded, affecting the accuracy of abnormality detection, and the machine vision system may be very sensitive to changes in the wiring of the electronic distribution frame, including the movement or adjustment of the cable, which may be mistaken for anomalies, resulting in false alarms, reducing the accuracy of abnormality detection in the electronic distribution frame, the present invention provides an electronic distribution frame abnormality detection method and system.
[0006] The technical solution provided by the embodiment of the present invention is as follows:
[0007] First aspect
[0008] An embodiment of the present invention provides a method for detecting abnormalities in an electronic distribution frame, wherein a plurality of electronic distribution frames are used as edge terminals, a cloud server is used as a cloud terminal, and the plurality of electronic distribution frames are all communicatively connected with the cloud server, including:
[0009] S1: Acquire original status data of each electronic distribution frame, wherein the original status data includes temperature sensor data, humidity sensor data, smoke sensor data, power data and network equipment data;
[0010] S2: Connect the encoder, memory unit, decoder and discriminator in series to build an electronic distribution frame anomaly detection model;
[0011] S3: calculating the anomaly score of each electronic distribution frame according to the original state data of each electronic distribution frame and based on the electronic distribution frame anomaly detection model;
[0012] S4: When the abnormal score of the electronic distribution frame is greater than the preset score, an alarm message is output.
[0013] Second aspect
[0014] An embodiment of the present invention provides an electronic distribution frame abnormality detection system, comprising:
[0015] processor;
[0016] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the electronic distribution frame abnormality detection method as described in the first aspect is implemented.
[0017] The third aspect
[0018] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method for detecting abnormalities in an electronic distribution frame as described in the first aspect is implemented.
[0019] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0020] In the present invention, there is no need to rely on the image quality captured by the camera, and it is not affected by insufficient ambient light, poor camera position or obstructions, image quality, and wiring changes. Instead, by acquiring temperature sensor data, humidity sensor data, smoke sensor data, power data, and network device data, the electronic distribution frame is detected for abnormalities based on the electronic distribution frame abnormality detection model. Not only can traditional power failures be detected, but also hidden problems such as excessive temperature and abnormal humidity can be found, thereby improving the accuracy of electronic distribution frame abnormality detection. At the same time, the preset score of abnormality detection can be dynamically adjusted according to actual conditions, so that the system can respond to abnormalities in different situations more flexibly and intelligently, thereby improving the universality of electronic distribution frame abnormality detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A schematic flow chart of an electronic distribution frame abnormality detection method provided by an embodiment of the present invention;
[0023] Figure 2 A schematic diagram of the structure of an electronic distribution frame anomaly detection model provided by an embodiment of the present invention;
[0024] Figure 3 A schematic structural diagram of an electronic distribution frame abnormality detection system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0026] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0027] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.
[0028] In the embodiments of the present invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are consistent.
[0029] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0030] Reference Manual Attached Figure 1 , showing a flow chart of an electronic distribution frame abnormality detection method provided by an embodiment of the present invention.
[0031] The embodiment of the present invention provides an electronic distribution frame abnormality detection method, which can be implemented by an electronic distribution frame abnormality detection device, and the electronic distribution frame abnormality detection device can be a terminal or a server. The processing flow of the electronic distribution frame abnormality detection method can include the following steps:
[0032] S1: Obtain the original status data of each electronic distribution frame.
[0033] Among them, the electronic distribution frame is the key hub of network equipment. It connects network equipment such as servers, routers, switches, storage devices, etc., providing necessary support for data transmission.
[0034] Among them, the original status data includes temperature sensor data, humidity sensor data, smoke sensor data, power data and network equipment data.
[0035] Furthermore, the electric power data may be current data, voltage data, power data, and the like.
[0036] Furthermore, the network equipment data may be the network transmission data volume, transmission efficiency, etc. of the server, router, and switch.
[0037] S2: Connect the encoder, memory unit, decoder and discriminator in series to build an electronic distribution frame anomaly detection model.
[0038] Reference Manual Attached Figure 2 , showing a structural schematic diagram of an electronic distribution frame anomaly detection model provided by an embodiment of the present invention.
[0039] Among them, the encoder is the component responsible for converting the input data into a latent representation. In anomaly detection, the encoder is responsible for extracting meaningful features from the original electronic distribution frame status data, usually through a neural network. These features represent the important information of the input data and can be passed to the memory unit after encoding. The role of the encoder is to extract features useful for anomaly detection from the raw data. Convert high-dimensional input data into a lower-dimensional latent representation to reduce the complexity of the model. Learn how to best represent the input data so that subsequent memory units and decoders can effectively use these representations for anomaly detection and reconstruction.
[0040] Among them, the memory unit is a structure used to store and update the potential representation from the encoder. In anomaly detection, the memory unit plays an important role. It can be understood as an internal state holder that saves the historical information and state of the electronic distribution frame. This memory allows the model to take into account past information when processing current inputs, improving the model's ability to capture time series data or dynamic changes. The role of the memory unit is to save past state information and help understand the context of the current state. With the arrival of new input data, the memory unit can dynamically update its own state as needed. It can assist the encoder and decoder in anomaly detection or reconstruction and provide more background information.
[0041] The decoder is a component that converts the latent representation extracted by the encoder back to the original data space. In anomaly detection, the decoder is responsible for mapping the encoded features back to the original EDF state data, trying to restore the original data information. The role of the decoder is to restore data as close to the original input as possible from the latent representation. By comparing the difference between the reconstructed data and the original data, it is judged whether there is an anomaly, because the more abnormal the data is, the easier it is to reduce the dimension during the reconstruction process. Learn how to map the latent representation back to the original data space.
[0042] The discriminator is a component used to distinguish between real data and reconstructed data. In this anomaly detection model, the discriminator can help determine whether the state of the electronic distribution frame is abnormal, further improving the robustness and accuracy of the model. The role of the discriminator is to calculate the anomaly score of each electronic distribution frame based on the data.
[0043] In the present invention, the entire model combines the functions of feature extraction, historical information storage, data reconstruction and adversarial learning, making anomaly detection more comprehensive and integrated. Different components cooperate with each other to form a complete anomaly detection system. The electronic distribution frame anomaly detection model constructed by connecting the encoder, memory unit, decoder and discriminator in series fully utilizes the advantages of each component, improves the accuracy, robustness and practicality of anomaly detection, and helps to improve the reliability and security of network equipment.
[0044] S3: Calculate the anomaly score of each electronic distribution frame according to the original state data of each electronic distribution frame and based on the electronic distribution frame anomaly detection model.
[0045] Specifically, the process of calculating the anomaly score of each electronic distribution frame according to the electronic distribution frame anomaly detection model is as follows: First, the original state data of each electronic distribution frame is converted into a high-dimensional vector through the encoder to capture important features. Then, these high-dimensional vectors are stored and updated using memory units to retain historical information and context. Subsequently, the decoder maps the hidden vector back to the original data space to generate a reconstructed vector, attempting to restore the original data information. Then, the state anomaly value, associated difference value, and data difference value of the reconstructed vector are calculated by the discriminator, and these differences are combined to obtain the anomaly score of each electronic distribution frame.
[0046] In the present invention, calculating the anomaly score of each distribution frame based on the electronic distribution frame anomaly detection model can improve the accuracy and timeliness of anomaly detection, realize multi-dimensional data analysis and real-time monitoring, and intelligently adjust system parameters and reduce manual intervention, thereby effectively improving the reliability, security and stability of network equipment.
[0047] In a possible implementation, S3 specifically includes:
[0048] S301: Mapping the original state data of each electronic distribution frame to a high-dimensional vector through an encoder.
[0049] In the present invention, the encoder can extract meaningful features from the raw state data, which are very important for anomaly detection of electronic distribution frames. By converting the raw data into high-dimensional vectors, the important attributes and patterns of the data can be captured, which improves the characterization ability and accuracy of the anomaly detection model.
[0050] Optionally, S301 specifically includes: mapping the original state data of each electronic distribution frame to a high-dimensional vector according to the following formula:
[0051] z=f e (x) = Sigmoid(W e x+b e )
[0052] Among them, z represents a high-dimensional vector, f e () represents the encoding function, x represents the original state data, Sigmoid() represents the Sigmoid activation function, W e represents the encoding weight coefficient, b e Represents the encoding bias term.
[0053] Among them, the Sigmoid activation function plays the role of nonlinear transformation here. The original state data may have complex nonlinear relationships. Using activation functions such as Sigmoid can make the mapping process more flexible and help the model fit the data better.
[0054] Among them, the coding weight coefficient W e and the encoding bias term b e It can be trained and adjusted, making the generation process of high-dimensional vectors flexible and controllable. The model can learn the best weights and biases to make the generated high-dimensional vectors more consistent with the distribution of actual data.
[0055] In the present invention, the process of mapping the original state data to a high-dimensional vector makes the data more representative and learnable through feature extraction, nonlinear transformation, dimensionality reduction processing, etc., which is conducive to more accurate and efficient anomaly detection and analysis of subsequent models.
[0056] S302: Output a hidden vector according to the high-dimensional vector through a memory unit.
[0057] In the present invention, the memory unit helps to save the historical information and status of the electronic distribution frame. Through the memory unit, the model can take into account past information when processing current input, improving the model's ability to capture time series data or dynamic changes. This helps to improve the accuracy of anomaly detection, especially for those anomalies that need to consider context and historical trends.
[0058] Optionally, the memory unit is specifically a long short-term memory neural network.
[0059] Among them, Long Short-Term Memory (LSTM) is a special type of Recurrent Neural Network (RNN) designed to solve the long-term dependency problem encountered in traditional RNN.
[0060] Optionally, S302 specifically includes: outputting a hidden vector through a memory unit according to the following formula:
[0061] I T =Sigmoid(W ZI Z T+W HI h T-1 +b I )
[0062] F T =Sigmoid(W ZF Z T +W HF h T-1 +b F )
[0063] O T =Sigmoid(W ZO Z T +W HO h T-1 +b O )
[0064] C' T =tanh(W ZC Z T +W HC h T-1 +b C )
[0065] C T =F T ·C T-1 +I T ·C' T
[0066] h T =O T tanh(C T )
[0067] Among them, I T represents the activation output vector of the input gate at time T, Sigmoid() represents the Sigmoid activation function, and Z T Represents a high-dimensional vector sequence, W ZI Represents the weight matrix between the high-dimensional vector sequence and the input gate, W HI represents the weight matrix between the hidden state and the input gate, b I represents the bias term of the input gate, F T represents the activation output vector of the forget gate at time T, W ZF Represents the weight matrix between the high-dimensional vector sequence and the forget gate, W HF represents the weight matrix between the hidden state and the forget gate, b F represents the bias term of the forget gate, O T represents the activation output vector of the output gate at time T, b O represents the bias term of the output gate, W ZO Represents the weight matrix between the high-dimensional vector sequence and the output gate, W HOrepresents the weight matrix between the hidden state and the output gate, C T represents the activation output vector of the cell storage unit at time T, C t ' represents the candidate output vector of the cell storage unit at time T, C T-1 represents the activation output vector of the cell storage unit at time T-1, Tanh() represents the Tanh activation function, W ZC Represents the weight matrix between the high-dimensional vector sequence and the cell storage unit, W HC represents the weight matrix between the hidden state and the cell storage unit, b C represents the bias term of the cell storage unit, h T represents the hidden vector at time T, h T-1 Represents the hidden vector at time T-1.
[0068] It should be noted that the memory unit of LSTM helps the network capture long-term dependencies. Through the transmission of cell states, the network can effectively store and update long-term memories without being restricted by time distance. This can better remember previous information when processing long sequence data, avoiding information loss and gradient disappearance problems. The introduction of forget gates, input gates, and output gates allows LSTM to selectively forget or update memories adaptively based on the current input and information that needs to be remembered. This mechanism enables the network to process different types of sequence data more flexibly and can handle short-term and long-term dependencies.
[0069] In the present invention, the memory unit of LSTM, through the design of gating mechanism and cell state, enables the network to better process and learn long-term dependencies in long sequence data, has stronger memory and generalization capabilities, and effectively alleviates the gradient vanishing problem, thereby achieving better results in sequence modeling tasks.
[0070] S303: Output a reconstructed vector according to the hidden vector through a decoder.
[0071] In the present invention, the decoder maps the hidden vector back to the original data space and outputs the reconstructed vector. This reconstruction process attempts to restore the information of the original data and determines whether there is an anomaly by comparing the difference between the reconstructed data and the original data. Because the abnormal data may be reduced in dimension during the reconstruction process, it is easier to detect.
[0072] Optionally, S303 specifically includes: outputting a reconstruction vector through a decoder according to the following formula:
[0073] X=f d (h)=Sigmoid(W d x+b d )
[0074] Where X represents the reconstruction vector, f d () represents the decoding function, h represents the hidden vector, Sigmoid() represents the Sigmoid activation function, W d represents the decoding weight coefficient, b e Represents the decoding bias term.
[0075] It should be noted that the design of the decoder can be adjusted and optimized according to the characteristics of the specific task and data. By adjusting the decoding weight coefficient and bias term, the model can be better adapted to data of different types and characteristics, and the accuracy and robustness of anomaly detection can be improved.
[0076] In the anomaly detection task, the decoder's output reconstruction vector can be compared with the original input data to determine whether the data is abnormal by calculating the reconstruction error. Usually, the error of abnormal data after decoding and reconstruction will be larger because abnormal data may contain different patterns and features from normal data. Therefore, the reconstruction vector can be used as an indicator to evaluate the degree of data abnormality.
[0077] S304: Calculate the abnormality score of each electronic distribution frame through the discriminator according to the reconstructed vector and combining the association difference and the data difference.
[0078] In the present invention, the role of the discriminator is to evaluate the reconstructed vector, combine the association difference and the data difference, and calculate the anomaly score of the electronic distribution frame. This comprehensive evaluation takes into account the state anomaly value of the reconstructed data, the association difference between the original state, and the data difference between the reconstructed data and the original data. Through multiple considerations, the abnormal situation of the electronic distribution frame can be more comprehensively evaluated, and the accuracy and robustness of the detection are improved.
[0079] Optionally, the discriminator is specifically a convolutional neural network.
[0080] In traditional generative adversarial networks, the discriminator is often a fully connected neural network, and the output layer of the discriminator consists of only one neural network. When a large amount of data is stacked, it often leads to the loss of data information. Therefore, in the present invention, a convolutional neural network can be used to replace the traditional fully connected network to effectively extract data information, and greatly reduce the parameters in the training process and the possible overfitting problem.
[0081] Optionally, S304 specifically includes:
[0082] S3041: According to the reconstruction vector and based on the activation function, the state abnormal value of each electronic distribution frame is calculated:
[0083] s1=Sigmoid(W s X+b s )
[0084] Among them, s1 represents the state abnormal value, Sigmoid() represents the Sigmoid activation function, and W s represents the abnormal calculation weight coefficient, X represents the reconstruction vector, b s Indicates the state abnormality bias item.
[0085] Specifically, a convolutional neural network can be used to determine state outliers.
[0086] Among them, the state abnormality value reflects whether the internal state of each electronic patch panel is abnormal. In the electronic patch panel, there may be state data such as temperature, humidity, smoke, etc. measured by various sensors. If these state data of a patch panel exceed the normal range, such as abnormal temperature increase, abnormal humidity change, smoke sensor detection abnormality, etc., it will cause the state abnormality value to increase. In this case, the patch panel with a high state abnormality value is likely to have an internal fault or abnormal situation.
[0087] S3042: Calculate the correlation difference value according to the difference between the original state correlation parameters of each electronic distribution frame and the reconstructed vector correlation parameters:
[0088] s2=|c0-c1
[0089] Among them, s2 represents the association difference value, c0 represents the original state association parameter, and c1 represents the reconstructed vector association parameter.
[0090] The calculation method of the original state correlation parameter is:
[0091]
[0092] Among them, c0(i) represents the original state correlation parameter of the i-th electronic distribution frame, cor0(ij) represents the correlation between the original state data of the i-th electronic distribution frame and the j-th electronic distribution frame, and n represents the total number of electronic distribution frames.
[0093] The calculation method of the reconstruction vector correlation parameter is:
[0094]
[0095] Wherein, c1(i) represents the correlation parameter of the reconstruction vector of the i-th electronic distribution frame, and cor1(ij) represents the correlation between the reconstruction vectors of the i-th electronic distribution frame and the j-th electronic distribution frame.
[0096] Among them, the correlation difference value considers whether the correlation between electronic patch panels is abnormal. In a network equipment system, there may be certain correlations between the patch panels, such as data transmission, power sharing, etc. If the correlation between some patch panels is abnormal, such as an abnormal increase or sudden interruption in data transmission volume, or problems with the power supply of some patch panels, the correlation difference value will increase. In this case, the patch panels with high correlation difference values may be abnormally related to other patch panels.
[0097] Optionally, the correlation degree may be specifically a Pearson Correlation Coefficient, a Spearman's Rank Correlation Coefficient, or a cosine similarity.
[0098] Since there is a certain time lag between the data of different electronic distribution frames, curve alignment is required before calculating the correlation. The curve alignment algorithm assumes that a pair of time series data sequences have a consistent time lag and searches for the best time lag through a heuristic method to maximize the correlation of the data sequences.
[0099] The present invention provides a curve alignment method based on feature clustering. Each type of data (i.e., each feature) is clustered and analyzed to determine strongly correlated features, and then a heuristic search (specifically, a simulated annealing method) is performed based on the strongly correlated features to determine the time lag of data between two electronic distribution frames, and the data is aligned based on the time lag.
[0100] Specifically, feature clustering can reduce computational complexity, especially in the case of large amounts of data. Clustering data by feature can reduce the search space and speed up the search process for time delays. Clustering can help identify data patterns and regularities between different patch panels, thereby improving the accuracy and stability of data registration.
[0101] In a possible implementation, the curve alignment method based on feature clustering is specifically as follows:
[0102] Perform cluster analysis on the data of each feature;
[0103] It should be noted that cluster analysis can more accurately identify the correlation between features, avoid the interference of irrelevant or noise features, and improve the accuracy of feature selection.
[0104] Determine the silhouette coefficient and Rand index after clustering the data for each feature;
[0105] According to the silhouette coefficient and Rand index after clustering the data of each feature, the strongly correlated features are determined;
[0106] Specifically, the silhouette coefficient and the Rand index can be weighted summed to evaluate the clustering effect of the features:
[0107] B=βP+(1-β)La
[0108] Among them, B represents the clustering effect parameter, P represents the silhouette coefficient, La represents the Rand index, and β represents the weight coefficient of the silhouette coefficient.
[0109] Among them, those skilled in the art can set the size of the weight coefficient of the silhouette coefficient according to actual conditions, and the present invention does not limit this.
[0110] It should be noted that the combination of silhouette coefficient and Rand index can more comprehensively evaluate the quality of clustering. The silhouette coefficient measures the compactness of data within a cluster and the separation of data between clusters, and the Rand index measures the consistency between the clustering results and the true categories. The combination of the two can better evaluate the clustering effect.
[0111] Features whose clustering effect parameters are greater than a preset value may be determined as strongly correlated features.
[0112] Among them, those skilled in the art can set the size of the preset value according to actual conditions, and the present invention does not limit it.
[0113] According to the strong correlation characteristics, the time delay is searched based on the simulated annealing algorithm to determine the optimal time delay of the data between the two electronic distribution frames;
[0114] It should be noted that the simulated annealing algorithm can help find the global optimal solution for searching the optimal time delay between two electronic distribution frames. This search method can avoid the trap of local optimality and improve the accuracy of finding the optimal time delay.
[0115] The data between two electronic distribution frames are registered according to the optimal time delay.
[0116] It should be noted that aligning the data according to the optimal time lag can eliminate the time lag effect between different electronic distribution frames, so that the data remains consistent in time, which is beneficial to the accuracy and stability of subsequent anomaly detection.
[0117] In the present invention, the curve alignment method based on feature clustering can bring many benefits by identifying strongly correlated features, reducing computational complexity, improving alignment accuracy, enhancing model robustness, and adapting to variable data features, making the electronic distribution frame anomaly detection model more effective and reliable.
[0118] S3043: Calculate the data difference value according to the difference between the original state of each electronic distribution frame and the reconstructed vector:
[0119] s3=||Xx||2
[0120] Among them, s3 represents the data difference value, X represents the reconstructed vector, x represents the original state data, and || ||2 represents the two-norm calculation.
[0121] Among them, the data difference value reflects the difference between the original data and the reconstructed data. In anomaly detection, the original data is encoded into a latent space vector through the autoencoder model, and then decoded into reconstructed data. If the difference between the original data and the reconstructed data of a patch panel is large, it means that the state of the patch panel is not very similar to other patch panels under normal conditions, and there may be an abnormal situation. For example, if the difference between the reconstructed data and the original data of a patch panel is abnormally large, it may mean that the state of the patch panel cannot be reconstructed normally, and there may be an abnormal state.
[0122] S3044: Calculate the anomaly score of the electronic distribution frame according to the state anomaly value, the associated difference value and the data difference value:
[0123] s=λ1s1+λ2s2+λ3s3
[0124] Among them, s represents the anomaly score, λ1 represents the weight coefficient of the state anomaly value, λ2 represents the weight coefficient of the associated difference value, and λ3 represents the weight coefficient of the data difference value.
[0125] Among them, those skilled in the art can set the weight coefficient λ1 of the state anomaly value, the weight coefficient λ2 of the association difference value, and the weight coefficient λ3 of the data difference value according to actual conditions, and the present invention does not limit this.
[0126] In the present invention, a combined calculation method of state abnormal value, correlation difference value and data difference value is adopted to comprehensively consider abnormal situations in different aspects. By comprehensively considering multiple indicators, the characteristics of abnormalities can be better captured. Not only focusing on whether the state is abnormal, but also considering the correlation between the patch panels and the difference between the original data and the reconstructed data, which helps to improve the accuracy of abnormality detection.
[0127] It should be noted that the training of the electronic distribution frame anomaly detection model can be carried out in two ways: overall training and separate training.
[0128] In a possible implementation, the training method of the electronic distribution frame anomaly detection model is specifically as follows:
[0129] With the goal of minimizing the overall loss function, the electronic distribution frame anomaly detection model is trained as a whole.
[0130] Specifically, the overall loss function is:
[0131]
[0132] Among them, L(θ Z ) represents the overall loss function, θ Z represents the parameters of the electronic distribution frame anomaly detection model, x i represents the original state data of the i-th sample, z i represents the high-dimensional vector of the i-th sample, ||||2 represents the calculation of the second norm, X i Represents the reconstruction vector of the i-th sample, y i represents the true label value of the i-th sample, represents the discrimination result of the discriminator for the i-th sample, log represents the logarithmic function with base 10, m represents the total number of samples, μ1 represents the weight coefficient of the encoding loss term, μ2 represents the weight coefficient of the reconstruction loss term, and μ3 represents the weight coefficient of the discrimination loss term.
[0133] Among them, the encoding loss term is designed to help the model learn effective data representation and extract meaningful features from the original data. In the autoencoder, the encoder part is responsible for mapping the input data to the latent space, and this mapping process is the encoding process. The encoding loss term measures the difference between the original data and its encoded representation, prompting the model to learn useful features for the input data.
[0134] The reconstruction loss term is used to measure the model's ability to reconstruct the original data, that is, the process of mapping the encoded representation back to the original data space through the decoder. In an autoencoder, the decoder is responsible for remapping the encoded features into reconstructed data that is as close as possible to the original input data.
[0135] Among them, the discriminant loss term is a commonly used loss term in adversarial learning. It helps the model distinguish between real data and reconstructed data, thereby improving the model's generation and discrimination capabilities. The discriminant loss term usually uses the cross entropy loss function to measure the difference between the discriminator's judgment of the model-generated data and the true label. The discriminant loss term encourages the model to generate more realistic reconstructed data, while making it more difficult for the discriminator to distinguish between real data and reconstructed data.
[0136] Among them, those skilled in the art can set the weight coefficient μ1 of the coding loss term, the weight coefficient μ2 of the reconstruction loss term, and the weight coefficient μ3 of the discrimination loss term according to actual conditions, and the present invention does not limit this.
[0137] It should be noted that the overall loss function provides a unified training framework, so that the encoder, memory unit, decoder and discriminator can be trained under the same loss function to form a complete model. Such a unified framework simplifies the training process of the model and improves the training efficiency and stability.
[0138] In the present invention, the overall loss function combines the encoding loss term, the reconstruction loss term and the discrimination loss term. The encoding loss term enables the model to learn effective representations and extract meaningful features from the original state data; the reconstruction loss term enables the model to learn how to remap these features back to the original data space; the discrimination loss term helps the model learn how to generate more realistic reconstructed data and better distinguish between real data and reconstructed data. Comprehensive consideration of these loss terms can improve the overall performance and generalization ability of the model.
[0139] Specifically, during the training process, a gradient descent algorithm, a particle swarm optimization algorithm, a genetic algorithm, etc. may be used to determine the optimal parameters of the electronic distribution frame anomaly detection model.
[0140] In a possible implementation, the training method of the electronic distribution frame anomaly detection model is specifically as follows:
[0141] Generative adversarial networks are introduced, and the encoder, storage unit and decoder are combined into a generator. The generator is trained separately with the goal of minimizing the generator training loss function.
[0142] The generator training loss function is specifically:
[0143]
[0144] Among them, L(θ G ) represents the generator training loss function, θ G represents the generator parameters, z i represents the i-th real sample that obeys the prior distribution, represents the i-th pseudo sample generated by the generator, log represents the logarithmic function with base 10, and m represents the total number of samples.
[0145] It should be noted that by forming a generator with an encoder, a storage unit, and a decoder, and training the generator separately with the goal of minimizing the generator training loss function, the generator can learn to better generate high-quality reconstructed data from the latent space. The generator training loss function uses cross entropy loss, so that the generator is continuously optimized during the training process, and the generated reconstructed data can better simulate the distribution and characteristics of the original data, improving the quality and fidelity of the reconstructed data.
[0146] The discriminator is trained separately with the goal of minimizing the discriminator training loss function.
[0147] The discriminator training loss function is specifically:
[0148]
[0149] Among them, L(θ D ) represents the discriminator training loss function, θ D represents the discriminator parameters, y i represents the true label value of the i-th sample, represents the discrimination result of the discriminator for the i-th sample, log represents the logarithmic function with base 10, and m represents the total number of samples.
[0150] It should be noted that the discriminator is trained separately with the goal of minimizing the discriminator training loss function, which enables the discriminator to better distinguish between real data and pseudo samples generated by the generator. The discriminator training loss function also uses cross entropy loss, which enables the discriminator to more accurately distinguish the difference between real data and reconstructed data during training. The discriminator trained in this way can more keenly detect abnormal data points, improving the model's ability to detect abnormal data.
[0151] Specifically, during the training process, a gradient descent algorithm, a particle swarm optimization algorithm, a genetic algorithm, etc. may be used to determine the optimal parameters of the electronic distribution frame anomaly detection model.
[0152] In the present invention, the training method of the generative adversarial network can improve the performance and stability of the overall model. The adversarial training between the generator and the discriminator makes the two constantly compete and optimize, the generator strives to generate more realistic data to confuse the discriminator, and the discriminator strives to improve its discrimination ability. This process of competition and game prompts the model to continuously learn and optimize, thereby improving the overall anomaly detection ability and accuracy. The training process of the generative adversarial network enables the generator to better fit the distribution of data, including the distribution of normal data and abnormal data. The data distribution learned by the generator is closer to the real data, while the discriminator improves its own accuracy by distinguishing between real data and generated data. In this way, the model can more comprehensively cover various situations of the data during anomaly detection, and improves the generalization ability and adaptability of the model to abnormal data.
[0153] S4: When the abnormal score of the electronic distribution frame is greater than the preset score, an alarm message is output.
[0154] Among them, those skilled in the art can set the size of the preset score according to actual conditions, and the present invention does not limit this.
[0155] The alarm information may specifically be an email alarm, a pop-up window alarm, a sound alarm, etc.
[0156] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0157] In the present invention, there is no need to rely on the image quality captured by the camera, and it is not affected by insufficient ambient light, poor camera position or obstructions, image quality, and wiring changes. Instead, by acquiring temperature sensor data, humidity sensor data, smoke sensor data, power data, and network equipment data, the electronic patch panel is detected for abnormalities based on the electronic patch panel abnormality detection model. Not only can traditional power failures be detected, but also hidden problems such as excessive temperature and abnormal humidity can be found, thereby improving the accuracy of electronic patch panel abnormality detection. At the same time, the preset score of abnormality detection can be dynamically adjusted according to actual conditions, so that the system can respond to abnormalities in different situations more flexibly and intelligently, thereby improving the universality of electronic patch panel abnormality detection.
[0158] Reference Manual Attached Figure 3 , showing a structural schematic diagram of an electronic distribution frame abnormality detection system provided by the present invention.
[0159] The present invention further provides an electronic distribution frame abnormality detection system 20, which is applied to the above-mentioned electronic distribution frame abnormality detection method, comprising:
[0160] Processor 201;
[0161] The memory 202 stores computer-readable instructions, and when the computer-readable instructions are executed by the processor 201, the electronic distribution frame abnormality detection method described in the method embodiment is implemented.
[0162] The electronic distribution frame anomaly detection system 20 provided by the present invention can execute the above-mentioned electronic distribution frame anomaly detection method and achieve the same or similar technical effects. To avoid repetition, the present invention will not go into details.
[0163] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0164] In the present invention, there is no need to rely on the image quality captured by the camera, and it is not affected by insufficient ambient light, poor camera position or obstructions, image quality, and wiring changes. Instead, by acquiring temperature sensor data, humidity sensor data, smoke sensor data, power data, and network device data, the electronic distribution frame is detected for abnormalities based on the electronic distribution frame abnormality detection model. Not only can traditional power failures be detected, but also hidden problems such as excessive temperature and abnormal humidity can be found, thereby improving the accuracy of electronic distribution frame abnormality detection. At the same time, the preset score of abnormality detection can be dynamically adjusted according to actual conditions, so that the system can respond to abnormalities in different situations more flexibly and intelligently, thereby improving the universality of electronic distribution frame abnormality detection.
[0165] It should be understood that the processor in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0166] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0167] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0168] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0169] In the present invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0170] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0171] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0172] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0173] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0174] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0175] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0176] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0177] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the electronic distribution frame abnormality detection method as described in the method embodiment.
[0178] A computer-readable storage medium provided by the present invention can implement the steps and effects of the electronic distribution frame abnormality detection method of the above method embodiment. To avoid repetition, the present invention will not go into details.
[0179] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0180] In the present invention, there is no need to rely on the image quality captured by the camera, and it is not affected by insufficient ambient light, poor camera position or obstructions, image quality, and wiring changes. Instead, by acquiring temperature sensor data, humidity sensor data, smoke sensor data, power data, and network device data, the electronic distribution frame is detected for abnormalities based on the electronic distribution frame abnormality detection model. Not only can traditional power failures be detected, but also hidden problems such as excessive temperature and abnormal humidity can be found, thereby improving the accuracy of electronic distribution frame abnormality detection. At the same time, the preset score of abnormality detection can be dynamically adjusted according to actual conditions, so that the system can respond to abnormalities in different situations more flexibly and intelligently, thereby improving the universality of electronic distribution frame abnormality detection.
[0181] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0182] Compared with the prior art, the above technical solution has at least the following beneficial effects:
[0183] In the present invention, the light and shadow of the static objects can be optimized based on the light baking technology, and the light streaming of the game animation can be optimized based on the light streaming processing technology, and the screen of the nostalgic online game can be optimized to enhance the attractiveness of the nostalgic online game to new players and enhance the market competitiveness of the nostalgic online game.
[0184] There are a few points to note:
[0185] (1) The drawings of the embodiments of the present invention only relate to the structures related to the embodiments of the present invention, and other structures may refer to the general design.
[0186] (2) For the sake of clarity, in the drawings used to describe the embodiments of the present invention, the thickness of the layers or regions is exaggerated or reduced, that is, these drawings are not drawn according to the actual scale. It is understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element or there may be intermediate elements.
[0187] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.
[0188] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for detecting abnormality of an electronic distribution frame, It is characterized in that A plurality of electronic distribution frames are used as edge terminals, a cloud server is used as a cloud terminal, and a plurality of the electronic distribution frames are all connected to the cloud server for communication, including: S1: Acquire original status data of each electronic distribution frame, wherein the original status data includes temperature sensor data, humidity sensor data, smoke sensor data, power data and network equipment data; S2: Connect the encoder, memory unit, decoder and discriminator in series to build an electronic distribution frame anomaly detection model; S3: calculating the anomaly score of each electronic distribution frame according to the original state data of each electronic distribution frame and based on the electronic distribution frame anomaly detection model; S4: When the abnormal score of the electronic distribution frame is greater than the preset score, an alarm message is output; Among them, S3 specifically includes: S301: Mapping the original state data of each electronic distribution frame to a high-dimensional vector through the encoder; S302: Outputting a hidden vector according to the high-dimensional vector through the memory unit; S303: Outputting a reconstructed vector according to the hidden vector through the decoder; S304: calculating the abnormality score of each electronic distribution frame through the discriminator according to the reconstructed vector and combining the association difference and the data difference; Wherein, the S304 specifically includes: S3041: According to the reconstruction vector and based on the activation function, the state abnormal value of each electronic distribution frame is calculated: s 1 =Sigmoid(W s X+b s ) Among them, s 1 represents the state abnormal value, Sigmoid() represents the Sigmoid activation function, W s represents the abnormal calculation weight coefficient, X represents the reconstruction vector, b s Indicates the state abnormality bias item; S3042: Calculate the correlation difference value according to the difference between the original state correlation parameters of each electronic distribution frame and the reconstructed vector correlation parameters: s 2 =|c 0 -c 1 | Among them, s 2 represents the correlation difference value, c 0 represents the original state correlation parameter, c 1 Represents the reconstructed vector association parameter; The calculation method of the original state correlation parameter is: Among them, c 0 (i) represents the original state correlation parameter of the i-th electronic distribution frame, cor 0 (ij) represents the correlation between the original state data of the i-th electronic distribution frame and the j-th electronic distribution frame, and n represents the total number of electronic distribution frames; The calculation method of the reconstruction vector correlation parameter is: Among them, c 1 (i) represents the relevance parameter of the reconstruction vector of the i-th electronic distribution frame, cor 1 (ij) represents the correlation between the reconstruction vectors of the i-th electronic distribution frame and the j-th electronic distribution frame; S3043: Calculate the data difference value according to the difference between the original state of each electronic distribution frame and the reconstructed vector: s 3 =||X-x|| 2 Among them, s 3 represents the data difference value, X represents the reconstructed vector, x represents the original state data, || || 2 represents the calculation of the second norm; S3044: Calculate the abnormality score of the electronic distribution frame according to the state abnormality value, the associated difference value and the data difference value: s=λ 1 s 1 +λ 2 s 2 +λ 3 s 3 Where s represents the anomaly score, λ 1 Represents the weight coefficient of state abnormality, λ 2 Represents the weight coefficient of the associated difference value, λ 3 The weight coefficient representing the data difference value.
2. The method for detecting abnormality of an electronic distribution frame according to claim 1, It is characterized in that The memory unit is specifically a long short-term memory neural network, and the discriminator is specifically a convolutional neural network.
3. The method for detecting abnormality of an electronic distribution frame according to claim 1, It is characterized in that The S301 is specifically as follows: According to the following formula, the original state data of each electronic distribution frame is mapped to a high-dimensional vector: z=f e (x)=Sigmoid(W e x+b e ) Among them, z represents a high-dimensional vector, f e () represents the encoding function, x represents the original state data, Sigmoid() represents the Sigmoid activation function, W e represents the encoding weight coefficient, b e Represents the encoding bias term.
4. The method for detecting abnormality of an electronic distribution frame according to claim 1, It is characterized in that The S303 is specifically: Through the decoder, a reconstructed vector is output according to the following formula: X=f d (h)=Sigmoid(W d x+b d ) Where X represents the reconstruction vector, f d () represents the decoding function, h represents the hidden vector, Sigmoid() represents the Sigmoid activation function, W d represents the decoding weight coefficient, b e Represents the decoding bias term.
5. The method for detecting abnormality of an electronic distribution frame according to claim 1, It is characterized in that The training method of the electronic distribution frame anomaly detection model is specifically as follows: Taking the minimization of the overall loss function as the goal, the electronic distribution frame anomaly detection model is trained as a whole; The overall loss function is specifically: Among them, L(θ Z ) represents the overall loss function, θ Z represents the parameters of the electronic distribution frame anomaly detection model, x i represents the original state data of the i-th sample, z i Represents the high-dimensional vector of the i-th sample, || || 2 represents the calculation of the second norm, X i represents the reconstruction vector of the i-th sample, y i represents the true label value of the i-th sample, represents the discriminant result for the i-th sample, log represents the logarithmic function with base 10, m represents the total number of samples, μ 1 Represents the weight coefficient of the encoding loss term, μ 2 Represents the weight coefficient of the reconstruction loss term, μ 3 Represents the weight coefficient of the discriminative loss term.
6. The method for detecting abnormality of an electronic distribution frame according to claim 1, It is characterized in that The training method of the electronic distribution frame anomaly detection model is specifically as follows: Generative adversarial networks are introduced to form a generator consisting of an encoder, a storage unit, and a decoder. The generator is trained separately with the goal of minimizing the generator training loss function. The generator training loss function is specifically: Among them, L(θ G ) represents the generator training loss function, θ G represents the generator parameters, z i represents the i-th real sample that obeys the prior distribution, represents the i-th pseudo sample generated by the generator, log represents the logarithmic function with base 10, and m represents the total number of samples. The discriminator training loss function is specifically: Among them, L(θ D ) represents the discriminator training loss function, θ D represents the discriminator parameters, y i represents the true label value of the i-th sample, represents the discrimination result of the discriminator for the i-th sample, log represents the logarithmic function with base 10, and m represents the total number of samples.
7. An electronic distribution frame abnormality detection system, It is characterized in that include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method for detecting anomalies in an electronic distribution frame according to any one of claims 1 to 6 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the electronic distribution frame abnormality detection method according to any one of claims 1 to 6 is implemented.
