Switch cabinet anomaly detection method, device and equipment and storage medium
By combining feature extraction models of visible light images, infrared thermal images, and ultrasonic partial discharge signals, the problem of insufficient detection by a single sensor is solved, enabling comprehensive and accurate detection of abnormal states in switchgear and adapting to detection needs under different operating conditions.
Patent Information
- Application Number
- CN202511663989.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2026-02-27
AI Technical Summary
Existing technologies use only a single sensor for switchgear anomaly detection, which makes it impossible to obtain comprehensive operating status information and simultaneously detect internal overheating and external anomalies.
A feature extraction model combining visible light images, infrared thermal images, and ultrasonic partial discharge signals is adopted. Cross-modal feature vectors are fused through a multi-head attention mechanism, and Mahalanobis distance is calculated for anomaly detection. The center of the hypersphere is obtained by training Deep-SVDD using normal switchgear samples, and the anomaly threshold is dynamically adjusted.
It enables accurate detection of abnormal states in switchgear, reduces reliance on abnormal samples, improves the comprehensiveness and accuracy of detection, and adapts to detection needs under different operating conditions.
Smart Images

Figure CN121580155A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of switch cabinet detection, and in particular to a switch cabinet anomaly detection method, device, equipment and storage medium. BACKGROUND
[0002] In the prior art, when performing switch cabinet anomaly detection, a single sensor is generally used to collect data, which cannot obtain comprehensive operation state information of the switch cabinet. For example, overheat inside the equipment cannot be detected by relying on visible light images alone, and some subtle appearance anomalies can be ignored by using infrared thermal images alone. SUMMARY
[0003] The embodiments of the present application provide a switch cabinet anomaly detection method, device, equipment and storage medium, which can improve the accuracy and comprehensiveness of switch cabinet anomaly detection.
[0004] To achieve the above-mentioned purpose, the embodiments of the present application provide a switch cabinet anomaly detection method, comprising: inputting a visible light image, an infrared thermal image and an ultrasonic partial discharge signal into a feature extraction model to obtain a cross-modal feature vector; calculating Mahalanobis distance between the cross-modal feature vector and a hypersphere center, wherein the hypersphere center is obtained by training Deep-SVDD with normal switch cabinet samples in advance; outputting an anomaly detection result based on the Mahalanobis distance and an anomaly threshold; The feature extraction model comprises: a feature extraction module for extracting three sub-feature vectors from the visible light image, the infrared thermal image and the ultrasonic partial discharge signal, respectively; a feature splicing module for fusing the three sub-feature vectors based on a multi-head attention mechanism to obtain a cross-modal feature vector.
[0005] As an improvement of the above-mentioned scheme, the feature extraction model is trained in advance by the following way: training an initial feature extraction model with initial training samples to obtain an intermediate feature extraction model and a false positive sample; freezing the intermediate feature extraction model as a teacher model, and taking the lightweight intermediate feature extraction model as a student model; iteratively optimizing parameters of the student model to minimize the KL divergence of the teacher model and the student model to the false positive sample, to obtain a feature extraction model.
[0006] As an improvement of the above-mentioned scheme, the method further comprises: When the switch cabinet to be detected is a new type of switch cabinet, the normal sample of the new type of switch cabinet is used to fine-tune Deep-SVDD to obtain a new hypersphere center and a new reference threshold.
[0007] As an improvement of the above scheme, the abnormal threshold is calculated by the following method: Deep-SVDD is trained using normal switch cabinet samples to obtain a reference threshold; The real-time load current and the rated current of the switch cabinet are input; The reference threshold is corrected using the real-time load current and the rated current to obtain an abnormal threshold.
[0008] As an improvement of the above scheme, the abnormal threshold is calculated by the following formula: Wherein, represents the abnormal threshold; represents the reference threshold; represents the real-time load current; represents the rated current; represents the coefficient.
[0009] As an improvement of the above scheme, before the visible light image, the infrared thermal image and the ultrasonic partial discharge signal are input into the feature extraction model, it further includes: The visible light image is input into a maintenance state recognition model to obtain a switch cabinet state; When the switch cabinet state is a maintenance state, stop abnormal detection on the switch cabinet; When the switch cabinet state is not a maintenance state, continue to detect the abnormality of the switch cabinet.
[0010] As an improvement of the above scheme, when the abnormal detection result is a switch cabinet abnormality, the method further includes: The first internal and external parameters of the target visible light camera and the second internal and external parameters of the target infrared thermal imager are obtained based on the checkerboard calibration method; wherein the visible light camera is used to collect the visible light image; the target infrared thermal imager is used to collect the infrared thermal image; Based on the first internal and external parameters and the second internal and external parameters, an affine transformation matrix is constructed; The infrared thermal image is subjected to affine transformation using the affine transformation matrix to obtain a second infrared thermal image; The second infrared thermal image is mapped onto the visible light image to obtain an intermediate image; The ultrasonic partial discharge signal is mapped onto the intermediate image to output an abnormal result image.
[0011] To achieve the above object, the embodiment of the present application further provides a switch cabinet anomaly detection device, comprising: The feature calculation module is configured to input the visible light image, the infrared thermal image and the ultrasonic partial discharge signal into a feature extraction model to obtain a cross-modal feature vector. The distance calculation module is configured to calculate Mahalanobis distance between the cross-modal feature vector and a hypersphere center. The judgment module is configured to output an anomaly detection result based on the Mahalanobis distance and an anomaly threshold. The feature extraction model comprises: The feature extraction module is configured to extract three sub-feature vectors from the visible light image, the infrared thermal image and the ultrasonic partial discharge signal respectively. The feature splicing module is configured to fuse the three sub-feature vectors based on a multi-head attention mechanism to obtain a cross-modal feature vector.
[0012] To achieve the above object, the embodiment of the present application further provides a switch cabinet anomaly detection device, comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the switch cabinet anomaly detection method according to any one of the above embodiments.
[0013] To achieve the above object, the embodiment of the present application further provides a computer readable storage medium, comprising a stored computer program, wherein the computer readable storage medium controls a device where the computer readable storage medium is located to execute the switch cabinet anomaly detection method according to any one of the above embodiments when the computer program runs.
[0014] Compared with the prior art, the switch cabinet anomaly detection method, device, equipment and storage medium of the embodiment of the present application input the visible light image, the infrared thermal image and the ultrasonic partial discharge signal into a feature extraction model to obtain a cross-modal feature vector, calculate Mahalanobis distance between the cross-modal feature vector and a hypersphere center, wherein the hypersphere center is obtained by training Deep-SVDD with normal switch cabinet samples in advance, and output an anomaly detection result based on the Mahalanobis distance and an anomaly threshold. The embodiment of the present application can obtain more comprehensive switch cabinet information by extracting cross-modal features from three types of data, i.e. visible light image, infrared thermal image and ultrasonic partial discharge signal. Moreover, the embodiment of the present application can reduce the dependence on abnormal samples and reduce the difficulty of obtaining training samples by training a hypersphere with normal samples. Finally, the embodiment of the present application can realize accurate detection of switch cabinet anomaly state by calculating Mahalanobis distance between the cross-modal feature vector and the hypersphere center. BRIEF DESCRIPTION OF DRAWINGS
[0015] Figure 1 is a flow chart of a switch cabinet anomaly detection method provided by an embodiment of the present application; Figure 2 is a structural schematic diagram of a switch cabinet anomaly detection device provided by an embodiment of the present application; Figure 3 is a structural schematic diagram of a switch cabinet anomaly detection device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0016] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0017] In the description of the present application, it should be understood that the terms "center", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship shown in the drawings, and are only for the purpose of facilitating the description of the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application.
[0018] The terms "first", "second", "third", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second", etc. can explicitly or implicitly include one or more of the features. In the description of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more.
[0019] In the description of the present application, it should be noted that, unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connection" should be understood broadly, for example, it can be fixed connection, or detachable connection, or integrally connected; it can be mechanical connection, or electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, or the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0020] Referring to Figure 1 is a flow chart of a switch cabinet anomaly detection method provided by an embodiment of the present application, comprising steps S1-S3: S1, input the visible light image, the infrared thermal image and the ultrasonic partial discharge signal into a feature extraction model to obtain a cross-modal feature vector; S2, calculate Mahalanobis distance of the cross-modal feature vector and the hypersphere center; wherein, the hypersphere center is obtained by training Deep-SVDD with normal switch cabinet samples in advance; S3, output an abnormality detection result based on the Mahalanobis distance and an abnormality threshold; The feature extraction model comprises: a feature extraction module, configured to extract three sub-feature vectors from the visible light image, the infrared thermal image and the ultrasonic partial discharge signal respectively; a feature splicing module, configured to fuse the three sub-feature vectors based on a multi-head attention mechanism to obtain a cross-modal feature vector.
[0021] It is worth noting that the switch cabinet abnormality described in the present application includes appearance abnormality, thermal abnormality and electrical abnormality, wherein the appearance abnormality includes component damage, rust, foreign matter intrusion and indicator light state abnormality, etc., which can be detected by a visible light image, the thermal abnormality includes local overheating, uneven temperature distribution and connection point heating, etc., which can be detected by an infrared thermal image; and the electrical abnormality includes partial discharge, insulation defect and corona discharge, etc., which can be detected by an ultrasonic partial discharge signal.
[0022] For example, in step S1, the visible light image and the infrared thermal image can be collected by using a synchronous trigger type industrial camera, and the frame rate is set to be greater than or equal to 30 fps (Frames Per Second), so as to ensure the synchronous collection of multi-source data and improve the consistency and accuracy of the data; further, the sampling rate of the ultrasonic partial discharge signal is set to be greater than or equal to 10 MHz (Megahertz), so as to improve the sensitivity of detection.
[0023] Further, the feature extraction model comprises a feature extraction module and a feature concatenation module. Illustratively, the feature extraction module adopts a GroundingDINO+DINOv2 joint architecture, wherein the GroundingDINO is a visual language model combining grounding detection and DINO architecture, for extracting a visible light image sub-feature vector according to the provided text and visible light image; the DINOv2 is a self-supervised visual feature extraction model, for extracting an infrared thermal image sub-feature vector and an ultrasonic partial discharge signal sub-feature vector from the infrared thermal image and the ultrasonic partial discharge signal respectively. Further, the above three sub-feature vectors are fused through a multi-head attention mechanism to output a 1280-dimensional cross-modal feature vector. It can be understood that the multi-head attention mechanism will give different importance to different features, and through weighted fusion of different modal features, it can better capture the correlation and difference between data and improve the expression ability of the features. Compared with the prior art, the embodiment of the present application can fully utilize the information of different types of data by extracting the features of multiple types of data and fusing the cross-modal features, thereby improving the accuracy and comprehensiveness of the anomaly detection.
[0024] Further, in step S2, the Mahalanobis distance is calculated using the following formula: (1) wherein, represents the Mahalanobis distance between the cross-modal feature vector and the hypersphere center, for measuring the deviation degree of and the normal distribution center; represents the cross-modal feature vector; represents the transposition operation; represents the hypersphere center, which can be the mean vector of the normal sample features in the training set; represents the covariance matrix of the normal sample features in the training set.
[0025] It is worth noting that in the prior art, when performing anomaly detection, the model is often trained using abnormal samples. However, in actual application, the acquisition of abnormal samples is costly and difficult, which limits the training effect of the model. Therefore, the present application adopts anomaly detection based on positive samples, that is, the Deep-SVDD (Deep One-Class Support Vector Data Description) is trained in advance using normal switch cabinet samples to obtain a hypersphere, wherein the center and radius (or covariance matrix) of the hypersphere define the distribution boundary of the normal data. Illustratively, the radius is taken as a threshold reference value, wherein the threshold reference value can be directly used as an abnormal threshold, or it is modified to calculate an abnormal threshold, which is not limited herein.
[0026] Further, in step S3, when the Mahalanobis distance exceeds the abnormal threshold, an "switch cabinet abnormality" is output, otherwise, an "switch cabinet normal" is output as an abnormality detection result.
[0027] Compared with the prior art, the embodiment of the application can obtain more comprehensive switch cabinet information by extracting cross-modal features from three types of data: visible light images, infrared thermal images and ultrasonic partial discharge signals; and the embodiment of the application can reduce the dependence on abnormal samples and reduce the difficulty of obtaining training samples by training a hypersphere using normal samples. Finally, the accurate detection of the abnormal state of the switch cabinet can be realized by calculating the Mahalanobis distance between the cross-modal feature vector and the center of the hypersphere.
[0028] As one of the optional implementation manners, the feature extraction model is trained in advance by the following manner: The initial feature extraction model is trained using the initial training samples to obtain an intermediate feature extraction model and false positive samples; The intermediate feature extraction model is frozen as a teacher model, and the lightweight intermediate feature extraction model is used as a student model; The parameters of the student model are iteratively optimized to minimize the KL divergence of the teacher model and the student model to the false positive samples, and the feature extraction model is obtained.
[0029] It can be understood that the teacher-student distillation framework uses the high-performance knowledge of the teacher model to guide the learning of the student model, so that the student model can maintain a relatively low complexity while obtaining a performance close to that of the teacher model. Compared with the prior art, the embodiment of the application further uses false positive samples (normal samples identified as abnormal) to perform online incremental training on the intermediate feature extraction model after the preliminary training of the feature extraction model, thereby improving the performance of the model while reducing the complexity of the model as much as possible. Further, the Deep-SVDD can be retrained using positive samples to expand the volume of the hypersphere.
[0030] As one of the optional implementation manners, the method further comprises: When the switch cabinet to be detected is a new model switch cabinet, the Deep-SVDD is fine-tuned using normal samples of the new model switch cabinet to obtain a new hypersphere center and a new reference threshold.
[0031] Understandably, switchgear comes in different models, and the training samples for the feature extraction model and Deep-SVDD are unlikely to cover all models. Therefore, when a new model of switchgear appears in the detection task, Deep-SVDD can be fine-tuned. For example, only the fully connected weight matrix of the Deep-SVDD output layer can be fine-tuned. Furthermore, unlike Deep-SVDD, the feature extraction model has a certain degree of universality across different switchgear models. Therefore, the feature extraction model can be frozen before fine-tuning Deep-SVDD.
[0032] As one optional implementation, the anomaly threshold is calculated in the following manner: Deep-SVDD was trained using normal switchgear samples to obtain the baseline threshold; Input the real-time load current and rated current of the switchgear; The reference threshold is corrected using the real-time load current and the rated current to obtain the abnormal threshold.
[0033] It is worth noting that existing technologies typically use fixed thresholds for anomaly detection. However, in practical applications, the operating conditions of switchgear are not constant. Therefore, the fixed threshold method may lead to misjudgments.
[0034] To address the aforementioned issues, in this embodiment of the invention, the abnormal threshold is dynamically adjusted based on the real-time load current to adapt to abnormal detection under different operating conditions and reduce the false alarm rate. Here, the load current, which is also the operating current of the switchgear, is used to reflect the size of the load carried by the switchgear.
[0035] As one optional implementation, the anomaly threshold is calculated using the following formula: (2) in, Indicates the abnormal threshold; Indicates the baseline threshold; Indicates real-time load current; Indicates the rated current; Represents the coefficient.
[0036] It is worth noting that when When the current approaches zero, the real-time load current is close to 80% of the rated current. At this point, the switchgear's operating condition is close to ideal, which allows... Take the smaller value; conversely, when the real-time load current deviates from 80% of the rated current, the switchgear is in a non-ideal operating condition, and the normal data distribution is more dispersed, then... Take the larger value. For example, when hour, Take 0.6; when hour, Take a value between 0.9 and 1.2, where, The value of can be determined experimentally, and is not limited here. Compared with the prior art, the embodiments of the present invention improve the calculation of the abnormal threshold by adjusting the coefficients in the formula. By making phased adjustments, the abnormal threshold can be dynamically adjusted to adapt to abnormal detection under different working conditions.
[0037] Furthermore, while monitoring the switchgear in real time, the current dynamic threshold can be calculated in real time or at certain intervals. To avoid false alarms caused by dynamically adjusting the threshold, the dynamic threshold can be filtered. For example, the currently calculated dynamic threshold and the dynamic thresholds calculated at previous times can be subjected to Kalman filtering for smoothing, and the filtered dynamic threshold can be used as the final dynamic threshold.
[0038] Compared with the prior art, the embodiments of the present invention can adapt to anomaly detection under different operating conditions by calculating the anomaly threshold based on real-time load current. Furthermore, by adjusting the dynamic threshold calculation formula in segments, the flexibility of dynamic threshold calculation can be further improved. Finally, by filtering the dynamic threshold, the influence of noise can be avoided, further improving the rationality of the dynamic threshold.
[0039] As one optional implementation, before inputting the visible light image, infrared thermogram, and ultrasonic partial discharge signal into the feature extraction model, the method further includes: The visible light image is input into the maintenance status recognition model to obtain the switchgear status. When the switchgear is in maintenance status, stop performing abnormality detection on the switchgear. When the switchgear is not in maintenance status, continue to perform abnormality detection on the switchgear.
[0040] It is understood that the embodiments of the present invention include a maintenance shielding mechanism. When the switchgear is detected to be under maintenance, no anomaly detection is performed to avoid false alarms caused by normal operation. For example, maintenance images are pre-collected and a training set is constructed. These maintenance images can be images of an open maintenance door or images showing a safety helmet, etc. Further, in the embodiments of the present invention, switchgear status detection is performed first. If the switchgear is under maintenance, subsequent steps are not executed; otherwise, the switchgear anomaly detection method described in any embodiment is executed.
[0041] As one optional implementation, when the anomaly detection result indicates a switchgear anomaly, the method further includes: The first internal and external parameters of the target visible light camera and the second internal and external parameters of the target infrared thermal imager are acquired based on a chessboard calibration method; wherein the visible light camera is used to collect the visible light image; and the target infrared thermal imager is used to collect the infrared thermal image; Based on the first internal and external parameters and the second internal and external parameters, an affine transformation matrix is constructed. The infrared thermal image is subjected to affine transformation by using the affine transformation matrix to obtain a second infrared thermal image. The second infrared thermal image is mapped onto the visible light image to obtain an intermediate image. The ultrasonic partial discharge signal is mapped onto the intermediate image to output an abnormal result image.
[0042] It is worth noting that the internal and external parameters include an internal parameter matrix, a rotation matrix and a translation vector. In order to facilitate the distinction, the present application adds "first" before the internal and external parameters of the target visible light camera, and adds "second" before the internal and external parameters of the target infrared thermal imager.
[0043] Further, before constructing the affine transformation matrix, the relative external parameters, i.e. the relative rotation matrix and the relative translation vector, need to be calculated according to the first internal and external parameters and the second internal and external parameters, as shown in formula (3) and formula (4): (3) Wherein, represents the relative rotation matrix; represents the second rotation matrix; represents the first rotation matrix; represents the transposition operation.
[0044] (4) Wherein, represents the relative translation vector; represents the relative rotation matrix; represents the second translation vector; represents the first translation vector.
[0045] Further, the affine transformation matrix is calculated by the following formula: H (5) Wherein, H represents the affine transformation matrix; represents the second internal parameter matrix; represents the external parameter matrix; represents the relative rotation matrix; represents the relative translation vector; represents the first internal parameter matrix.
[0046] Compared with the prior art, the embodiment of the application can more intuitively present the abnormal condition of the switch cabinet by aligning the collected images of the three modalities to the same image and outputting the same to a user.
[0047] Referring to Figure 2 The embodiment of the application also provides a switch cabinet anomaly detection device 10, comprising: A feature calculation module 11 is configured to input a visible light image, an infrared thermal image and an ultrasonic partial discharge signal into a feature extraction model to obtain a cross-modal feature vector. A distance calculation module 12 is configured to calculate Mahalanobis distance between the cross-modal feature vector and a hypersphere center, wherein the hypersphere center is obtained by training Deep-SVDD using normal switch cabinet samples in advance. A judgment module 13 is configured to output an anomaly detection result based on the Mahalanobis distance and an anomaly threshold. The feature extraction model comprises: A feature extraction module is configured to extract three sub-feature vectors from the visible light image, the infrared thermal image and the ultrasonic partial discharge signal, respectively. A feature splicing module is configured to fuse the three sub-feature vectors based on a multi-head attention mechanism to obtain a cross-modal feature vector.
[0048] The switch cabinet anomaly detection device provided by the embodiment of the application can realize all process steps of the switch cabinet anomaly detection method described in the above embodiment, and the functions and technical effects of each module and unit in the device are the same as those of the switch cabinet anomaly detection method described in the above embodiment, and the specific implementation mode is not described here.
[0049] Referring to Figure 3 The embodiment of the application also provides a switch cabinet anomaly detection device 20, comprising a processor 21, a memory 22, and a computer program stored in the memory 22 and configured to be executed by the processor 21, wherein the processor 21 implements steps in the above switch cabinet anomaly detection method embodiments when executing the computer program, such as steps S1-S3 described in the above embodiment. Figure 1 Or, the processor 21 implements the functions of each module in the above device embodiments when executing the computer program.
[0050] The switch cabinet anomaly detection device can be a desktop computer, a notebook, a palm computer, a cloud server, and the like. The switch cabinet anomaly detection device can include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the schematic diagram is only an example of the switch cabinet anomaly detection device, and does not constitute a limitation on the switch cabinet anomaly detection device, and can include more or fewer components than the schematic diagram, or combine certain components, or different components, for example, the switch cabinet anomaly detection device can also include an input / output device, a network access device, a bus, and the like.
[0051] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, and the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor and the like. The processor is a control center of the switch cabinet anomaly detection device, and connects various parts of the switch cabinet anomaly detection device through various interfaces and lines.
[0052] The memory can be used to store the computer program and / or modules, and the processor realizes various functions of the switch cabinet anomaly detection device by running or executing the computer program and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required by a function, and the like; and the data storage area can store data created according to the use of the controller, and the like. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, for example, a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0053] If the modules integrated in the switch cabinet anomaly detection device are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate forms, etc. The computer-readable medium can include any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0054] Compared with the prior art, the switch cabinet anomaly detection method, device, equipment and storage medium of the embodiment of the present application input the visible light image, the infrared thermal image and the ultrasonic partial discharge signal into the feature extraction model to obtain the cross-modal feature vector; the Mahalanobis distance between the cross-modal feature vector and the hypersphere center is calculated; wherein the hypersphere center is obtained by training Deep-SVDD with normal switch cabinet samples in advance; based on the Mahalanobis distance and the anomaly threshold, the anomaly detection result is output. The embodiment of the present application can obtain more comprehensive switch cabinet information by extracting cross-modal features from three types of data: visible light images, infrared thermal images and ultrasonic partial discharge signals; and the embodiment of the present application uses normal samples to train the hypersphere, which can reduce the dependence on abnormal samples and reduce the difficulty of obtaining training samples; finally, by calculating the Mahalanobis distance between the cross-modal feature vector and the hypersphere center, the accurate detection of the abnormal state of the switch cabinet can be realized.
[0055] The above is the preferred embodiment of the present application. It should be noted that for ordinary skilled persons in the technical field, several improvements and refinements can be made without departing from the principles of the present application, and these improvements and refinements are also considered within the protection scope of the present application.
Claims
1. A method for detecting anomalies in switchgear, characterized in that, include: Visible light images, infrared thermal images, and ultrasonic partial discharge signals are input into the feature extraction model to obtain cross-modal feature vectors. Calculate the Mahalanobis distance between the cross-modal feature vector and the center of the hypersphere; wherein the center of the hypersphere is obtained in advance by training Deep-SVDD using normal switchgear samples; Based on the Mahalanobis distance and the anomaly threshold, the anomaly detection result is output; The feature extraction model includes: The feature extraction module is used to extract three sub-feature vectors from the visible light image, the infrared thermal image, and the ultrasonic partial discharge signal, respectively. The feature concatenation module is used to fuse the three sub-feature vectors based on a multi-head attention mechanism to obtain a cross-modal feature vector.
2. The switchgear anomaly detection method as described in claim 1, characterized in that, The feature extraction model is pre-trained using the following methods: The initial feature extraction model is trained using the initial training samples to obtain the intermediate feature extraction model and false positive samples; The intermediate feature extraction model is frozen as the teacher model, and the lightweight intermediate feature extraction model is used as the student model. With the goal of minimizing the KL divergence of the teacher model and the student model on the false positive samples, the parameters of the student model are iteratively optimized to obtain the feature extraction model.
3. The switchgear anomaly detection method as described in claim 1, characterized in that, The method further includes: When the switchgear to be tested is a new model, the Deep-SVDD is fine-tuned using a normal sample of the new model to obtain a new hypersphere center and a new reference threshold.
4. The switchgear anomaly detection method as described in claim 1, characterized in that, The abnormal threshold is calculated in the following way: Deep-SVDD was trained using normal switchgear samples to obtain the baseline threshold; Input the real-time load current and rated current of the switchgear; The reference threshold is corrected using the real-time load current and the rated current to obtain the abnormal threshold.
5. The switchgear anomaly detection method as described in claim 4, characterized in that, The abnormal threshold is calculated using the following formula: in, Indicates the abnormal threshold; Indicates the baseline threshold; Indicates real-time load current; Indicates the rated current; Represents the coefficient.
6. The switchgear anomaly detection method as described in claim 1, characterized in that, Before inputting the visible light image, infrared thermogram, and ultrasonic partial discharge signal into the feature extraction model, the method further includes: The visible light image is input into the maintenance status recognition model to obtain the switchgear status. When the switchgear is in maintenance status, stop the abnormal detection of the switchgear. When the switchgear is not in maintenance status, continue to perform abnormality detection on the switchgear.
7. The switchgear anomaly detection method as described in claim 1, characterized in that, When the anomaly detection result indicates a switchgear anomaly, the method further includes: The first intrinsic and extrinsic parameters of the target visible light camera and the second intrinsic and extrinsic parameters of the target infrared thermal imager are obtained based on the checkerboard calibration method; wherein, the visible light camera is used to acquire the visible light image; and the target infrared thermal imager is used to acquire the infrared thermal image. Based on the first intrinsic and extrinsic parameters and the second intrinsic and extrinsic parameters, construct the affine transformation matrix; The infrared thermal image is subjected to an affine transformation using the affine transformation matrix to obtain a second infrared thermal image. The second infrared thermal image is mapped onto the visible light image to obtain an intermediate image; The ultrasonic partial discharge signal is mapped onto the intermediate image to output an abnormal result image.
8. A switchgear anomaly detection method and apparatus, characterized in that, include: The feature calculation module is used to input visible light images, infrared thermal images, and ultrasonic partial discharge signals into the feature extraction model to obtain cross-modal feature vectors. The distance calculation module is used to calculate the Mahalanobis distance between the cross-modal feature vector and the center of the hypersphere; wherein the center of the hypersphere is obtained in advance by training Deep-SVDD using normal switchgear samples; The judgment module is used to output the anomaly detection result based on the Mahalanobis distance and the anomaly threshold; The feature extraction model includes: The feature extraction module is used to extract three sub-feature vectors from the visible light image, the infrared thermal image, and the ultrasonic partial discharge signal, respectively. The feature concatenation module is used to fuse the three sub-feature vectors based on a multi-head attention mechanism to obtain a cross-modal feature vector.
9. A switchgear anomaly detection device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the switch cabinet anomaly detection method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the switchgear anomaly detection method as described in any one of claims 1 to 7.