Column switch mechanical fault diagnosis system and method based on edge calculation

By combining edge computing and autoencoders with triplet metric learning, the problem of insufficient data in pole-mounted switch fault diagnosis is solved, achieving efficient and accurate fault identification and real-time monitoring, thus improving maintenance efficiency and reliability.

CN121633803APending Publication Date: 2026-03-10CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies lack sufficient experimental data for fault diagnosis of pole-mounted switches, resulting in high computational resource requirements and insufficient generalization ability for traditional machine learning methods when processing high-dimensional data. Feature extraction also relies on manual methods, affecting classification accuracy and efficiency.

Method used

A mechanical fault diagnosis system for pole-mounted switches based on edge computing is adopted. The system collects current data through Hall current sensors, uses an autoencoder for feature extraction and a triplet metric learning model to generate an embedding space, and combines the K-nearest neighbor algorithm for fault classification to achieve fault diagnosis.

Benefits of technology

It improves the accuracy and stability of fault identification, reduces maintenance costs, enhances the level of automation, reduces equipment downtime, and improves maintenance efficiency and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121633803A_ABST
    Figure CN121633803A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of power system monitoring and fault diagnosis, and particularly relates to a column switch mechanical fault diagnosis system and method based on edge computing, and the system comprises an acquisition unit, a data processing unit and a processor which are connected in sequence. The acquisition unit is used for acquiring current data in an opening and closing coil of the pole-mounted switch and sending the current data to the data processing unit; the data processing unit is used for judging whether the current data is generated in the opening and closing process or not, and sending the current data to the processor if the current data is generated in the opening and closing process; otherwise, controlling the acquisition unit to acquire the current data in the opening and closing coil again; and the processor is used for performing fault diagnosis by using the current data. According to the invention, real-time monitoring and fault diagnosis of the pole-mounted switch are realized, and the accuracy, stability and automation level of fault identification are improved, so that the maintenance efficiency and reliability of the pole-mounted switch are improved, the maintenance cost is reduced, and the downtime caused by equipment faults is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power system monitoring and fault diagnosis technology, specifically relating to a mechanical fault diagnosis system and method for pole-mounted switches based on edge computing. Background Technology

[0002] Currently, there are four main methods for maintaining pole-mounted switches: planned maintenance, temporary maintenance, condition-based maintenance, and reliability maintenance. Most maintenance currently focuses on planned and temporary maintenance. However, with the development of detection technology, artificial intelligence technology, and edge computing technology, condition-based maintenance and reliability maintenance will also be further implemented.

[0003] In multi-class classification problems for fault diagnosis, traditional machine learning methods such as Support Vector Machines (SVM), decision trees, and shallow neural networks require a large amount of experimental data and often suffer from the curse of dimensionality. However, due to limitations in experimental conditions and costs, it is difficult to obtain a large amount of experimental data for paddle switches. Moreover, when processing high-dimensional data, these methods often require significant computational resources, and the model's generalization ability may be insufficient. In traditional methods, feature extraction and selection usually require manual intervention, which not only increases the complexity of model design but may also cause the model to fail to capture all relevant features in the data, thus affecting the accuracy and efficiency of classification. Summary of the Invention

[0004] To overcome the problems existing in the above-mentioned related technologies, the present invention provides a mechanical fault diagnosis system and method for pole-mounted switches based on edge computing.

[0005] According to a first aspect of the present invention, a mechanical fault diagnosis system for a pole-mounted switch based on edge computing is provided, comprising: a data acquisition unit, a data processing unit, and a processor connected in sequence; The acquisition unit is used to acquire current data in the opening and closing coils of the pole-mounted switch and send the current data to the data processing unit. The data processing unit is used to determine whether the current data is generated during the opening and closing process. If the current data is generated during the opening and closing process, the current data is sent to the processor; otherwise, the acquisition unit is controlled to re-acquire the current data in the opening and closing coil. The processor is used to perform fault diagnosis using the current data.

[0006] Preferably, the acquisition unit includes: a Hall current sensor and a data conversion module; the data conversion module is connected to both the Hall current sensor and the data processing unit. The Hall current sensor is used to collect current data in the opening and closing coils according to a preset acquisition frequency, and convert the current data from a current signal into an analog signal and output it to the data conversion module. The data conversion module is used to convert the current data from an analog signal into a digital signal and send the current data to the data processing unit.

[0007] Preferably, the data processing unit includes: a first judgment module, a processing module, and a second judgment module; The first judgment module is used to determine whether the current data is greater than or equal to the current threshold. If the current data is greater than or equal to the current threshold, the processing module is executed; otherwise, the acquisition unit is controlled to re-acquire the current data in the opening and closing coil. The processing module is used to divide the current data within the first preset time period into two parts to obtain a first part and a second part, sum the current data of the first part to obtain A, and sum the current data of the second part to obtain B. The second judgment module is used to determine if the current data is generated during the opening and closing process if B is greater than A; otherwise, the current data is not generated during the opening and closing process, and controls the acquisition unit to re-acquire the current data in the opening and closing coil. The time period corresponding to the first part is the same as the time period of the second part.

[0008] Preferably, the processor includes: The feature extraction module is used to extract features from the current data using an autoencoder to obtain key features; The generation module is used to generate an embedding space based on the key features using a triplet metric learning model; the embedding space includes multiple points, each point corresponding to an embedding vector of current data. The classification module is used to classify the points in the embedded space using a pre-established classification model to obtain the fault type corresponding to each point in multiple classification results.

[0009] Preferably, the autoencoder includes an encoder and a decoder; the feature extraction module is specifically used for: The encoder is used to compress the high-dimensional current time series in the current data into low-dimensional embedded features. The decoder is used to reconstruct the original current signal of the current data based on the low-dimensional embedding features to obtain the key features.

[0010] Preferably, the processor further includes: a building module for building the classification model; the building module includes: The data acquisition submodule is used to collect historical current data and its corresponding fault types. The feature extraction submodule is used to extract features from the historical current data using an autoencoder to obtain key historical features. A generation submodule is used to generate the embedding space of the history by taking the key features of the history as input to the triplet metric learning model; the embedding space of the history includes multiple points, each point corresponding to an embedding vector of current data. The training submodule is used to train the K-nearest neighbor algorithm by using the historical embedding space as the input layer training samples of the K-nearest neighbor algorithm and the fault type corresponding to each point in the historical embedding space as the output layer training samples of the K-nearest neighbor algorithm, so as to obtain the trained K-nearest neighbor algorithm, which is the classification model.

[0011] Preferably, the system further includes: a power supply module connected to the Hall current sensor, the data conversion module, the data processing unit, and the processor, respectively; The power module is used to supply power to the Hall current sensor, the data conversion module, the data processing unit, and the processor.

[0012] Preferably, it further includes: a data storage module connected to the data processing unit for storing the current data; The data processing unit is also used to send the current data to the data storage module.

[0013] Preferably, the Hall current sensor is a magnetically balanced Hall current sensor; The data conversion module is model AD7606.

[0014] Preferably, the data processing unit is a microcontroller.

[0015] Preferably, the microcontroller is an STM32F407ZGT6.

[0016] Preferably, the data storage module is an AT24C02 type external storage chip.

[0017] According to a second aspect of the present invention, a method for diagnosing mechanical faults of a pole-mounted switch based on edge computing is provided, comprising: Collect current data from the opening and closing coils of the pole-mounted switch; Determine whether the current data was generated during the opening and closing process. If the current data was generated during the opening and closing process, then use the current data for fault diagnosis; otherwise, control the acquisition unit to re-acquire the current data in the opening and closing coil.

[0018] According to a third aspect of the present invention, an electronic device is provided, comprising: at least one processor and a memory; the memory and the processor are connected via a bus; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, the edge computing-based mechanical fault diagnosis method for pole-mounted switches is implemented.

[0019] According to a fourth aspect of the present invention, a readable storage medium is provided having an executable program stored thereon, wherein when the executable program is executed, the aforementioned edge computing-based method for diagnosing mechanical faults in pole-mounted switches is implemented.

[0020] The technical solution provided by this invention has the following beneficial effects: This invention provides a mechanical fault diagnosis system and method for pole-mounted switches based on edge computing, comprising: a data acquisition unit, a data processing unit, and a processor connected in sequence; the data acquisition unit is used to acquire current data in the opening and closing coils of the pole-mounted switch and send the current data to the data processing unit; the data processing unit is used to determine whether the current data is generated during the opening and closing process; if the current data is generated during the opening and closing process, it sends the current data to the processor; otherwise, it controls the data acquisition unit to re-acquire the current data in the opening and closing coils; the processor is used to perform fault diagnosis using the current data. This invention realizes real-time monitoring and fault diagnosis of pole-mounted switches, improves the accuracy, stability, and automation level of fault identification, thereby improving the maintenance efficiency and reliability of pole-mounted switches, reducing maintenance costs, and reducing downtime caused by equipment failure. This invention improves the accuracy of data acquisition by determining whether the current data is generated during the opening and closing process; and improves the accuracy of fault type determination by using an autoencoder to extract features from the current data to capture all relevant features in the data. Attached Figure Description

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

[0022] Figure 1 This is a structural block diagram of a pole-mounted switch mechanical fault diagnosis system based on edge computing provided in an embodiment of the present invention; Figure 2 These are the nine state current signal curves provided in the embodiments of the present invention; Figure 3This is a confusion matrix diagram of the recognition results based on autoencoder and metric learning provided in the embodiments of the present invention; Figure 4 This is a structural block diagram of the edge computing-based mechanical fault diagnosis system for pole-mounted switches provided in an embodiment of the present invention. Figure 5 This is a connection diagram of the AD7606 module and the microcontroller provided in an embodiment of the present invention; Figure 6 This is a flowchart of the mechanical fault diagnosis method for pole-mounted switches based on edge computing provided in an embodiment of the present invention; Figure 7 This is a diagram showing the change in the closing current curve provided in an embodiment of the present invention; Figure 8 This is a flowchart of the autoencoder and metric learning provided in the embodiments of the present invention; Figure 9 This is a flowchart of a mechanical fault diagnosis method for pole-mounted switches based on edge computing, provided in an embodiment of the present invention. Figure 10 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the following embodiments are only some embodiments of this invention, not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0024] Example 1 This invention provides a mechanical fault diagnosis system for pole-mounted switches based on edge computing, such as... Figure 1 As shown, it includes: a data acquisition unit, a data processing unit, and a processor connected in sequence; The acquisition unit is used to acquire the current data in the opening and closing coils of the pole-mounted switch and send the current data to the data processing unit. The data processing unit is used to determine whether the current data was generated during the opening and closing process. If the current data was generated during the opening and closing process, the current data is sent to the processor; otherwise, the acquisition unit is controlled to reacquire the current data in the opening and closing coil. The processor is used for fault diagnosis using current data.

[0025] Specifically, the data processing unit may be, but is not limited to, a microcontroller module; the microcontroller model may be, but is not limited to, STM32F407ZGT6.

[0026] Furthermore, the acquisition unit includes: a Hall current sensor and a data conversion module; the data conversion module is connected to both the Hall current sensor and the data processing unit. The Hall current sensor is used to collect current data in the opening and closing coils according to a preset sampling frequency, and convert the current data from a current signal into an analog signal and output it to the data conversion module. The data conversion module is used to convert current data from analog signals to digital signals and send the current data to the data processing unit.

[0027] It should be noted that the embodiments of the present invention do not limit the "preset acquisition frequency," which can be set by those skilled in the art based on experimental data, engineering needs, and expert experience. For example, the preset acquisition frequency can be set to 10kHz.

[0028] Specifically, the Hall current sensor can be, but is not limited to, a magnetically balanced Hall current sensor; The data conversion module model can be, but is not limited to, AD7606.

[0029] In some embodiments, the Hall current sensor may be, but is not limited to, the WCS1700.

[0030] Furthermore, the data processing unit includes: a first judgment module, a processing module, and a second judgment module; The first judgment module is used to determine whether the current data is greater than or equal to the current threshold. If the current data is greater than or equal to the current threshold, the processing module is executed; otherwise, the acquisition unit is controlled to re-acquire the current data in the opening and closing coils. The processing module is used to divide the current data within the first preset time period into two parts to obtain the first part and the second part, sum the current data of the first part to obtain A, and sum the current data of the second part to obtain B. The second judgment module is used to determine if the current data is generated during the opening and closing process if B is greater than A; otherwise, the current data is not generated during the opening and closing process, and the acquisition unit is controlled to re-acquire the current data in the opening and closing coil. The time period corresponding to the first part is the same as the time period corresponding to the second part.

[0031] It should be noted that the embodiments of the present invention do not limit the "current threshold", "first preset time period", "first part" and "second part", which can be set by those skilled in the art based on experimental data, engineering needs and expert experience. For example, the current data in the first 6ms can be divided into two parts: the current data in the first 3ms is the first part, and the current data in the last 3ms is the second part. The current data in the first 3ms can be summed to obtain A, and the current data in the last 3ms can be summed to obtain B.

[0032] Furthermore, the processor includes: The feature extraction module is used to extract key features from the current data using an autoencoder. The generation module is used to generate an embedding space based on key features using a triplet metric learning model; the embedding space includes multiple points, each point corresponding to an embedding vector of current data. The classification module is used to classify points in the embedded space using a pre-established classification model, and obtain the fault type corresponding to each point in multiple classification results.

[0033] It should be noted that the method of "generating an embedding space using a triplet metric learning model" involved in this invention is well known to those skilled in the art, therefore, its specific implementation will not be described in detail.

[0034] Furthermore, the autoencoder includes: an encoder and a decoder; and a feature extraction module, specifically used for: The encoder is used to compress the high-dimensional current time series in the current data into low-dimensional embedded features. The original current signal of the current data is reconstructed using a decoder based on low-dimensional embedding features to obtain key features.

[0035] It's important to note that autoencoders automatically extract features by compressing, encoding, and reconstructing the input current data. In principle, an autoencoder consists of two parts: an encoder and a decoder. The encoder compresses the high-dimensional current time series into a low-dimensional latent representation (also called embedded features), and the decoder then reconstructs the original current data based on this low-dimensional representation. Because the dimension of the latent representation is much smaller than the dimension of the original data, the network learns the intrinsic important features of the current data during training to reconstruct the original signal as accurately as possible. In short, autoencoders automatically extract the key patterns and variations most useful for reconstruction and identification from the current waveform. For example, subtle changes, peak times, and rising / falling trends in the closing current waveform are reflected in the intermediate layer representation of the autoencoder. These extracted features constitute a deep-level feature representation of the current signal, which can condense and reflect the main morphology and anomalies of the current waveform, providing useful information for subsequent fault identification.

[0036] Furthermore, the processor also includes: a building module for building a classification model; the building module includes: The data acquisition submodule is used to collect historical current data and its corresponding fault types. The feature extraction submodule is used to extract features from historical current data using an autoencoder to obtain key historical features. The generation submodule is used to generate the historical embedding space by taking the key features of history as input to the triplet metric learning model; the historical embedding space includes multiple points, each point corresponding to an embedding vector of current data. The training submodule is used to train the K-nearest neighbor algorithm by using the historical embedding space as the input layer training samples and the fault type corresponding to each point in the historical embedding space as the output layer training samples. The trained K-nearest neighbor algorithm is then used as a classification model.

[0037] It's important to note that the K-Nearest Neighbors (KNN) classifier calculates the similarity (or distance) between feature vectors of samples. In fault diagnosis, we first use the previous model to obtain the embedded feature vector of the new current data to be identified. During KNN classification, the feature vector of the sample to be classified is compared with the feature vectors of samples of known categories in the training set to measure the degree of similarity. Specifically, the K nearest neighbors of the sample to be tested are found in the embedding space, and the categories of these neighbors are observed. KNN classifies the sample to be tested according to the category of the majority of these K neighbors. For example, if K=5, and the majority of the 5 nearest neighbors of an unknown sample belong to the "insufficient mechanism lubrication" fault category, then the unknown sample is classified as having an "insufficient mechanism lubrication" fault.

[0038] The classification result refers to the identified fault type or state category (including normal state or specific fault type, such as insufficient voltage, mechanism jamming, spring fatigue, etc.). After obtaining the classification result, we can determine whether the equipment's current operating status is normal and what type of fault has occurred. By analyzing the classification result, maintenance personnel can determine the fault location and cause: for example, if the classification result is "braking spring fatigue," it indicates that the circuit breaker's bracing spring may be aging and needs maintenance and replacement; if the result is "normal state," the current equipment is working normally and no additional intervention is required. In summary, the KNN classifier uses embedded features to measure sample similarity to determine the fault category of a new signal. The classification result provides a basis for fault diagnosis, and subsequent maintenance or repair measures can be taken based on this result. Furthermore, the classification performance and model reliability can be evaluated by combining the confusion matrix and other methods.

[0039] Furthermore, the generation module is specifically used for: Map key features to a low-dimensional embedding space; Construct triples in the embedding space. Each triple contains an anchor sample, a positive sample with the same fault class as the anchor sample, and a negative sample with a different fault class than the anchor sample. The anchor sample, positive sample, and negative sample are points. The triplet loss is calculated based on triplet pairs. The triplet loss is used to constrain the distance between the anchor sample and the positive sample in the embedding space to be less than the distance between the anchor sample and the negative sample, and the distance difference must at least meet the preset margin. The points in the embedding space are optimized by backpropagation so that key features of similar faults are clustered in the embedding space and key features of different faults are dispersed in the embedding space. The resulting embedding space is used to provide an optimized feature space for subsequent fault classification tasks.

[0040] It's important to note that the extracted current data features (i.e., the latent representation of the autoencoder) will be used as input in the triplet metric learning model. Metric learning utilizes these features to optimize distance metrics in the feature space by training a triplet network. Specifically, during training, a "triple" is constructed: it contains an anchor sample, a positive sample of the same class, and a negative sample of a different class. The triplet loss function brings the anchor closer to the positive sample in the feature space while simultaneously widening the distance between the anchor and the negative sample (at least with a certain margin). Through iterative optimization, this learning strategy makes current features of the same fault category closer in the embedding space, and features of different fault categories farther apart. In short, metric learning uses features extracted by the autoencoder to readjust the distance relationships between features, ensuring that features of similar faults cluster together and features of dissimilar faults are dispersed, thus preparing for precise and accurate classification.

[0041] "Embedding space" refers to the feature vector space obtained by mapping the original data through a model. In this invention, the embedding space is jointly generated by an autoencoder and a metric learning model. First, the autoencoder encodes the original current data into low-dimensional feature vectors; then, after adjustment by metric learning, these feature vectors are mapped to a new space, such that the distances in the space reflect the similarity and class relationships between samples. The vector space in which this final set of feature representations resides is the embedding space. Each point in this space corresponds to a compressed representation (embedded vector) of the current signal. In this embedding space, distance and direction have clear semantics: nearby points represent samples with similar fault states, and distant points represent samples with different fault types. The generation process of the embedding space is essentially the model learning a mapping function that transforms the original current data into a discriminative feature representation space for subsequent classification and retrieval.

[0042] Furthermore, it also includes: a power supply module that is connected to the Hall current sensor, the data conversion module, the data processing unit, and the processor, respectively; The power supply module is used to power the Hall current sensor, data conversion module, data processing unit, and processor.

[0043] Furthermore, it also includes: a data storage module connected to the data processing unit for storing current data; The data processing unit is also used to send current data to the data storage module.

[0044] Specifically, the data storage module may be, but is not limited to, an AT24C02 type external storage chip.

[0045] In practical applications, the edge computing-based mechanical fault diagnosis system for pole-mounted switches provided by this invention can be deployed within the control box of the pole-mounted switch mechanism. By collecting the closing current transmitted from the drive module to the control coil, and performing fault diagnosis based on an autoencoder-metric learning algorithm, it is a low-cost and widely applicable method for diagnosing mechanical faults in pole-mounted switch operating mechanisms.

[0046] To verify the effectiveness of the edge computing-based pole-mounted switch mechanical fault diagnosis system provided by this invention, a pole-mounted switch fault experimental prototype was built in the laboratory to obtain a training dataset. For the closing coil current signal, a Hall current sensor was used to collect the current signal, which was then amplified, conditioned, and connected to a microcontroller. Waveform acquisition used the opening and closing current pulse signals, employing a single-shot acquisition mode after triggering. A segment of the waveform at the trigger (closing) moment was pre-configured. The sampling frequency was 125 MSa / s, and the sampling duration was 60 ms to ensure the acquisition of a complete current waveform signal.

[0047] As current flows, a magnetic flux is generated inside the electromagnet. Due to the electromagnetic effect, the electromagnetic force drives the moving iron core to move, thereby causing the high-voltage circuit breaker to complete the closing or opening action. The fault condition can be reflected by measuring its current.

[0048] When the circuit breaker is in the open state, the auxiliary contacts are in the normal position, and the drive module is energized. Upon receiving the closing command, the drive module injects a positive excitation current into the excitation coil via the closing discharge circuit. The current rises exponentially, causing the magnetically controlled shape memory alloy core to generate a strong magnetic field. When the current reaches a certain limit, it causes the core to move, executing the closing action. At this time, the back electromotive force in the circuit increases, and the current gradually decreases. After the contacts move 6 mm, the circuit breaker is in the just-closed state. The moving core then continues to move 2 mm overtravel, compressing the contact pressure spring to maintain contact pressure. The coil current then rises exponentially again, reaching a stable value before the auxiliary switch opens, and the current decreases again. After the closing action is completed, the excitation coil is de-energized, and the circuit breaker remains in the closed position due to the residual magnetic force of the mechanism. The timing of the current waveform reaching its extreme value can be described by the extreme value moment; therefore, the moment of abrupt change is selected as the coil current characteristic. Based on these characteristics, the operating status of the electromagnet is determined, and consequently, the operating status of the transmission mechanism is judged.

[0049] As current flows, a magnetic flux is generated inside the electromagnet. Due to the electromagnetic effect, the electromagnetic force drives the moving iron core to move, thereby causing the high-voltage circuit breaker to complete the closing or opening action. The fault condition can be reflected by measuring its current.

[0050] The experiment included 450 sets of samples across 9 fault identification scenarios, including 50 sets each for normal operation, insufficient voltage, insufficient lubrication of the operating mechanism, jamming of the operating mechanism, insufficient travel of the moving iron core (2 turns), insufficient travel of the moving iron core (1 turn), excessive travel of the moving iron core (1 turn), excessive travel of the moving iron core (2 turns), and fatigue of the trip spring. The current curves after collecting and filtering the current signals for each of these scenarios are shown below. Figure 2 As shown.

[0051] The current signals of all samples were identified using traditional metric learning and the autoencoder-based metric learning algorithm of this invention. The training set accounted for 80% and the test set accounted for 20%. Traditional metric learning achieved a recognition accuracy of 92%. This invention, through deep feature extraction using an autoencoder and refined classification processing using metric learning, improves the recognition accuracy to 100%. The final recognition result is as follows: Figure 3 As shown. Figure 3 The states 0-8 represent the normal state, insufficient voltage, insufficient lubrication of the operating mechanism, jamming of the operating mechanism, insufficient travel of the moving iron core (2 turns), insufficient travel of the moving iron core (1 turn), excessive travel of the moving iron core (1 turn), excessive travel of the moving iron core (2 turns), and fatigue state of the trip spring, respectively. True is the true label and Predicted is the predicted label.

[0052] This invention migrates a trained fault diagnosis model to a Raspberry Pi, achieving high-precision acquisition of current signals through a coil current acquisition device and data conversion module. The acquired data undergoes preliminary processing via an STM32F407 and is further processed by communicating with the Raspberry Pi via serial port. Within the Raspberry Pi, an autoencoder and metric learning algorithm are applied to perform deep learning processing on the signals to identify potential fault states. This edge computing-based fault diagnosis system enables real-time monitoring of the mechanical status of pole-mounted switches and accurate diagnosis of various faults. This significantly improves maintenance efficiency and reliability, greatly reduces maintenance costs and equipment downtime, and further promotes the application and development of smart grid technology.

[0053] The mechanical fault diagnosis system for pole-mounted switches based on edge computing provided by this invention has the following advantages: (1) It effectively solves the problem of low acquisition accuracy and large measurement error of analog signals output by current transformers in the existing technology; (2) It effectively solves the problem of poor matching between analog fixed-frequency sampling measurement and the actual operating environment of the power grid in the existing device. Based on the real-time measured frequency, the STM32F407 controls the sampling rate of the ADC chip in real time (collecting ten current values ​​in 1ms), which ensures the accuracy of data acquisition and increases the adaptability to the real operating environment.

[0054] (3) Improved accuracy of fault diagnosis: Through deep feature extraction by autoencoder and fine classification processing by metric learning, this algorithm significantly improves the accuracy of fault type determination. In experiments and practical applications, the accuracy is improved compared with traditional fault diagnosis methods.

[0055] (4) Enhance the robustness of the model: This invention improves the model’s ability to handle noise and abnormal data through a metric learning method optimized by triplet loss, thereby enhancing the robustness of the system and maintaining high diagnostic performance even when the data quality is poor.

[0056] The present invention provides a mechanical fault diagnosis system for pole-mounted switches based on edge computing, which is also suitable for small samples and effectively processes high-dimensional data and improves the automation level of feature extraction. The fault diagnosis method based on autoencoder and metric learning provided by the present invention is an advanced machine learning method that can improve the robustness of the model to noisy data.

[0057] This invention provides a pole-mounted switch mechanical fault diagnosis system based on edge computing, which improves the maintenance efficiency and reliability of pole-mounted switches, reduces maintenance costs, and minimizes downtime caused by equipment failures. By employing condition-based maintenance and reliability-based maintenance methods, real-time monitoring and fault diagnosis of the pole-mounted switch can be achieved. The data is then transmitted to a host computer for analysis and processing via efficient and stable communication, improving the accuracy, stability, and automation level of fault identification, and optimizing model training time.

[0058] Example 2 To further illustrate the aforementioned edge computing-based mechanical fault diagnosis system for pole-mounted switches, this invention provides a specific example: a Hall current sensor is used for current acquisition; a high-precision analog-to-digital converter (ADC) is used to convert the analog signal into a digital signal; then, an STM32 microcontroller is used for data processing and transmission control; finally, communication is established with a Raspberry Pi via a serial port to achieve upper-computer display and further processing of the data. Figure 4 As shown, it includes: Power Supply Module: In this hardware design, the Hall current sensor and the AD7606 data conversion module both require an external 5V power supply, while the STM32F407ZGT6 microcontroller module, which serves as the main control chip, requires a 3.3V power supply. Therefore, an AMS1117 step-down regulator module is used to convert the 12V input voltage into 5V and 3.3V DC voltages to power each module, ensuring the stable operation of the hardware system.

[0059] Magnetic balance Hall current sensor: This sensor operates at 5V, with a DC current detection range of -70A to 70A, sufficient for detecting current within the opening and closing coils. The AC current detection range is -25A to 25A, with a linearity of 60mV / A. During the acquisition process, the detected current signal is converted into an analog signal output.

[0060] Data Conversion Module: The A / D data acquisition module used in this design is the AD7606. This chip has an internal 16-bit conversion bit, enabling eight-channel synchronous sampling and accepting both positive and negative voltage inputs. Furthermore, this chip is an A / D converter with high-speed serial and parallel interfaces, an internal 16-bit charge repetition distribution, and a successive approximation model. Its performance is sufficient to meet the requirements for high-speed acquisition of the current in the opening and closing coils of the pole-mounted switch.

[0061] The voltage input range of the AD7606 module is determined by the logic level of the RANGE pin. When set to high, the voltage input range is ±10V; when set to low, the voltage input range is ±5V. This input voltage range matches the output voltage of the Hall current sensor. Therefore, a signal amplification circuit is unnecessary in the circuit design, reducing the design complexity. The AD7606 chip is responsible for converting the voltage data signal output by the Hall current sensor into a digital signal for the microcontroller to read. In this design, a +5V power supply is used to power the module. The output terminal of the Hall current sensor is connected to the V1 signal input pin of the AD7606. There are three connection methods between the AD7606 and the main control chip: parallel interface, high-speed SPI serial interface, and parallel byte interface. Since only the opening and closing coil current signal needs to be detected, the SPI serial interface is used. This connection method effectively saves the I / O interface of the main control chip. The connection method between the AD7606 module and the STM32F407ZGT6 microcontroller is as follows: Figure 5 As shown.

[0062] The data processing unit uses an STM32F407ZGT6 microcontroller module: the opening and closing coil current detection system uses the STM32F407ZGT6 microcontroller as the main control chip. This microcontroller has rich peripherals and functions, and is widely used in various signal processing and detection systems. The STM32F407ZGT6 microcontroller is the core component of the entire current detection system. Its main function is to judge the current signal collected by the AD module, and save the signal exceeding the set threshold to the EEPROM via IIC communication. Then, it sends AT commands via serial communication to control the 4G module to remotely transmit the stored current data, realizing remote detection of the current signal.

[0063] The STM32F407ZGT6 chip boasts abundant internal resources. It has 144 pins and 114 I / O ports; its core is a high-performance 32-bit ARM Cortex-M4 processor, supporting FPU (floating-point) and DSP instructions, with an operating frequency of up to 168MHz; it has 1024K of FLASH and 192K of SRAM; three 12-bit ADCs and two 12-bit DACs, 16 DMA channels; 17 timers; and 17 communication interfaces. It supports IIC, USART, and SPI communication. It features three low-power modes: sleep, stop, and standby; and its operating voltage is 1.8V~3.6V. These abundant internal resources and superior fundamental characteristics give the STM32F407ZGT6 chip powerful performance, enabling efficient data processing and effective data communication with various modules in the hardware system.

[0064] EEPROM Data Storage Module: EEPROM is a plug-and-play, small-capacity, programmable read-only memory device. The AT24C02 external storage chip is used to store the detected opening and closing coil current data, preventing data loss after power failure. The AT24C02 chip communicates with the microcontroller via IIC.

[0065] The processor is a Raspberry Pi 5: The Raspberry Pi 5 is a powerful microcomputer featuring a 64-bit quad-core Arm Cortex-A76 processor with a clock speed of up to 2.4GHz, offering two to three times the performance of its predecessor. It supports a single-channel PCIe 2.0 interface, although an adapter such as an M.2 HAT (hardware connected on the top) is required for use, which greatly expands its application range and enables high-bandwidth peripherals.

[0066] In terms of hardware specifications, the Raspberry Pi 5 features dual-band 802.11ac Wi-Fi, Bluetooth 5.0 / BLE, a high-speed microSD card slot, two USB 3.0 ports, two USB 2.0 ports, and Gigabit Ethernet (with PoE+ support, requiring a separate PoE+ HAT). It retains the standard 40-pin GPIO interface, significantly improving expandability.

[0067] Understandably, the microcontroller is primarily responsible for high-speed acquisition and preliminary processing of the current signal (such as threshold judgment and data buffering), and then transmits the data to the Raspberry Pi 5 via serial port. The Raspberry Pi 5, acting as the host computer, performs in-depth processing and analysis on the received current data to identify the fault type.

[0068] Traditional fault diagnosis systems often only have simple threshold judgment and data uploading functions, and intelligent analysis relies on remote servers, resulting in poor real-time performance and strong network dependence. This system, by deploying a deep learning model locally on a Raspberry Pi 5, enables data acquisition, analysis, and decision-making to be completed at the field edge, greatly improving the real-time performance of diagnosis and promoting the implementation of condition-based maintenance.

[0069] Furthermore, the workflow of the edge computing-based pole-mounted switch mechanical fault diagnosis system includes three parts: acquisition, conversion, and remote transmission of the opening and closing coil current data. During data acquisition, since the opening and closing operation time of the pole-mounted switch is very short, between 20ms and 50ms, the acquisition frequency is set to 10kHz. When the AD module acquires the opening and closing coil current signal, it is verified that if no opening or closing operation is performed, the current value fluctuates around 1A. Therefore, to obtain more accurate opening and closing current data, a current threshold is set to determine whether to store and remotely transmit the current data; the current threshold is set to K=1. During remote transmission of current data, such a high transmission rate cannot be achieved. Therefore, the acquired current data is placed in the data storage module and then awaits remote transmission. The specific process is as follows: like Figure 6As shown in the figure, first, the AD module is used to collect the current data collected by the Hall current sensor. During the collection process, for the reading method of the data collected by the AD module, the data is read after the conversion is completed. Therefore, after each conversion and reading, the microcontroller module judges the current value to see if it exceeds the set threshold K. If it exceeds, the current data collected within 6 ms after that is stored in the FIFO buffer. To further determine whether to perform the closing or opening operation, the sum of the current data within the first 3 ms of the 6 ms collected is set as A, and the sum of the current data within the last 3 ms is set as B. If B > A, it means that the collected current data is indeed the current data during the closing or opening process, and then the current data for the remaining 44 ms is stored in the EEPROM for caching. If B < A, it means that the collected current data is not the current data during the closing or opening process, and then the threshold judgment on the current data collected by the AD continues, and the 6 ms of current data in the previous buffer area will be overwritten.

[0070] The present invention first constructs an overall hardware design framework. For the closing and opening current signals to be detected, the sensors and the surrounding circuits, as well as the relevant circuits of the main control chip, are analyzed. Then, the entire program flow is designed, including the implementation of the current data collection from the AD data collection program, and the judgment of the value of the closing and opening coil current by the microcontroller module through the set threshold in the main loop, and the writing of the current data into the buffer area of the EEPROM module for storage. The processor is serially connected to the STM32F407ZGT6 microcontroller to obtain the closing and opening current data under different fault states. The current curve collected by the development board is as Figure 7 shown.

[0071] The Raspberry Pi 5 processor is mainly used for fault diagnosis based on autoencoders and metric learning, including autoencoder feature extraction, metric learning, and fault classification, as Figure 8 shown, and includes the following steps: Step 21: The autoencoder uses the input current data for compression encoding and reconstruction processing. The encoder compresses the high-dimensional current time series into a low-dimensional latent representation, and then the decoder reconstructs the original signal based on this representation, thereby extracting the inherent key features of the current signal, such as deep representations like subtle changes in the waveform, peak moments, rising and falling trends, etc.

[0072] Furthermore, the primary purpose of an autoencoder is to encode input data into a compressed, meaningful representation, and then decode it to reconstruct an output that is as similar to the input as possible. An autoencoder typically consists of an encoder and a decoder. First, the encoder compresses the input data to obtain an intermediate layer. Then, the decoder reconstructs the data from the intermediate layer to obtain the original data. Because the dimension of the intermediate layer is much smaller than the dimension of the input, during training, the autoencoder tends to learn the inherent feature representation of the input data—that is, the effective information within the input data—thus better reconstructing the original data. Mathematically, this involves learning two functions... (encoder) and (Decoder) satisfies equation (1), where, E Indicates input data x The distribution express x Reconstruction loss, This refers to performing a linear transformation on the characteristics of the encoder output; that is, the distance between the input and output is usually calculated using the L2 paradigm.

[0073] (1) After detecting an input signal, the autoencoder can identify minute changes in the signal that may indicate a fault. By training the autoencoder to recognize current characteristics under normal operating conditions, the system can automatically detect abnormal signals that deviate from these normal patterns. The autoencoder structure used in this invention effectively reduces the number of parameters and computational load by replacing the fully connected layers in the basic autoencoder with convolutional layers.

[0074] Step 22: Use the extracted current signal features as input to perform triplet metric learning. Construct triplet pairs of anchor samples, positive samples, and negative samples, and apply the triplet loss function to optimize the distance metric in the feature space. This brings the features closer to those of the same type of fault and widens the distance between features of different types of fault, thus obtaining the adjusted feature representation.

[0075] Furthermore, metric learning, a machine learning algorithm designed to learn distance or similarity metrics between data points, has become an important research direction in pattern recognition and machine learning. Its core idea is to improve the performance of learning tasks such as classification, clustering, and retrieval by learning the optimal distance metric for data in the feature space. Unlike traditional algorithms that directly use Euclidean or Manhattan distance, metric learning algorithms optimize the distance metric to make similar samples closer together and dissimilar samples farther apart, thereby improving the algorithm's generalization ability.

[0076] Siamese networks are one of the earliest applied metric learning methods. Their main purpose is to learn the similarity or distance metric between input data pairs, ensuring that similar data pairs have smaller distances and dissimilar data pairs have larger distances. Traditional Siamese networks use contrastive loss. Therefore, the triplet grid, inspired by Siamese networks, contains three objects: positive samples, negative samples, and anchor evolution samples. The triplet loss considers either two positive samples and one negative sample or two negative samples and one positive sample in each iteration, aiming to make the representations of data points from the same class (positive samples) more compact, while making the representations of data points from different classes (negative samples) more distant.

[0077] Consider a pair of input data and ,definition and The distance is given by equation 2, where, For input data x Through deep learning networks in hidden layer parameters W The intrinsic characteristics obtained above represent, for and The distance; (2) The contrast loss is defined by equation (3), if the input data and If they are samples of the same type, then The value of is 1, otherwise it is 0, and m is a constant hyperparameter used to set the appropriate target sample spacing.

[0078] (3) In the above formula, For comparative loss, The distance between the input data; The triplet loss uses three input data: anchor input. Similar data to anchor points And outlier data that is not similar to the anchor point Equation (4) is the formula for defining its loss.

[0079] (4) In the above formula, The triplet loss value, The feature vector of the anchor sample. The feature vector of the positive sample. The feature vector of the negative sample. a It is a constant.

[0080] Step 23: An embedding space is generated by extracting features through an autoencoder and adjusting the distance relationship by combining metric learning. This space is a low-dimensional vector space, where each point corresponds to an embedding vector of a current signal. Points that are close together represent samples with similar fault states, and points that are far apart represent samples with different fault types.

[0081] Step 24: The K-nearest neighbor classifier calculates the similarity (or distance) between the feature vector of the sample to be classified and the feature vector of the training sample in the embedding space. It uses this similarity to find the K nearest neighbor samples and classifies the new current signal to be identified according to the majority vote. The classification result is obtained, such as "insufficient lubrication of the mechanism" fault. The model performance, accuracy and fault type distribution are analyzed according to the classification result by creating a confusion matrix and other methods to optimize the fault diagnosis and maintenance strategy.

[0082] Furthermore, the K-Nearest Neighbors algorithm is a fundamental and widely used supervised learning method. Its working principle is simple and intuitive: for a sample with an unknown class, it finds the K nearest neighbors in the training set; the majority class of these neighbors is considered the class of the unknown sample. Due to its simplicity and efficiency, the K-Nearest Neighbors algorithm is used in both classification and regression tasks.

[0083] Specifically, each sample q is obtained by the feature extractor. The process is repeated sequentially. x i In category c Find the K nearest neighbors in the array to obtain , Then calculate each nearest neighbor. and x i The distances between the m local features are calculated, and finally, the distances between the m local features are added to their K nearest neighbors to obtain samples that match the class. q Similarity: (5) In the above formula, Let q be the similarity score between its features and category c. To query the feature vector of sample q.

[0084] The cosine of the angle between two vectors is used to measure their correlation. Cosine distance reduces sensitivity to absolute values ​​and is suitable for measuring distances between discrete data. and x i cosine similarity The calculation formula is as follows: (6) The K-Nearest Neighbors algorithm is trained using embeddings generated by a metric learning model. To more fairly evaluate the model's performance, the test set is balanced to ensure that the number of samples in each class is equal. The trained K-NN model is then applied to classify the balanced test set, and a confusion matrix is ​​created to evaluate the performance.

[0085] The magnetically balanced Hall current sensor of this invention monitors the driving current through a magnetically controlled mechanism and converts it into an electrical signal. A data conversion module converts the electrical signal received from the sensor into a digital signal for subsequent processing and analysis. To preserve historical data long-term, the system is equipped with an EEPROM data storage module. This module records data during equipment operation, providing crucial data support for power grid system operation analysis, fault diagnosis, and maintenance. The system also integrates autoencoders and metric learning algorithms. Through training, the system can not only identify current characteristics during normal operation but also recognize abnormal patterns under various fault conditions. By using a triplet loss function, these algorithms further improve the distinguishability between fault types and optimize the accuracy of fault diagnosis.

[0086] Example 3 This invention also provides a method for diagnosing mechanical faults in pole-mounted switches based on edge computing, such as... Figure 9 As shown, it includes: Step 1: Collect the current data in the opening and closing coils of the pole-mounted switch; Step 2: Determine whether the current data was generated during the opening and closing process. If the current data was generated during the opening and closing process, use the current data for fault diagnosis; otherwise, control the acquisition unit to re-acquire the current data in the opening and closing coil.

[0087] Further, step 1 includes: Step 11: Collect the current data in the opening and closing coils according to the preset acquisition frequency, and convert the current data from current signals into analog signals; Step 12: Convert the current data from analog signals to digital signals.

[0088] Further, step 2 includes: Step 21: Determine whether the current data is greater than or equal to the current threshold. If the current data is greater than or equal to the current threshold, proceed to step 22; otherwise, control the acquisition unit to re-acquire the current data in the opening and closing coils. Step 22: Divide the current data within the first preset time period into two parts to obtain the first part and the second part. Sum the current data of the first part to obtain A, and sum the current data of the second part to obtain B. Step 23: If B is greater than A, then the current data was generated during the opening and closing process; otherwise, the current data was not generated during the opening and closing process, and the acquisition unit is controlled to re-acquire the current data in the opening and closing coil. The time period corresponding to the first part is the same as the time period corresponding to the second part.

[0089] Furthermore, step 2 utilizes current data for fault diagnosis, including: Step 24: Use an autoencoder to extract features from the current data to obtain key features; Step 25: Based on key features, generate an embedding space using a triplet metric learning model; the embedding space includes multiple points, each point corresponding to an embedding vector of current data. Step 26: Use a pre-established classification model to classify the points in the embedding space to obtain the fault type corresponding to each point in multiple classification results.

[0090] Furthermore, the autoencoder includes: an encoder and a decoder; step 24 includes: Step 241: Use an encoder to compress the high-dimensional current time series in the current data into low-dimensional embedded features; Step 242: Use the decoder to reconstruct the original current signal of the current data based on the low-dimensional embedding features to obtain the key features.

[0091] Furthermore, step 26 includes: Step 261: Establishing a classification model; Specifically, step 261 includes: Step 2611: Collect historical current data and their corresponding fault types; Step 2612: Use an autoencoder to extract features from historical current data to obtain key historical features; Step 2613: Using the key features of history as input to the triplet metric learning model, generate the historical embedding space; the historical embedding space includes multiple points, each point corresponding to an embedding vector of current data. Step 2614: Use the historical embedding space as the input layer training samples of the K-nearest neighbor algorithm, and use the fault type corresponding to each point in the historical embedding space as the output layer training samples of the K-nearest neighbor algorithm to train the K-nearest neighbor algorithm and obtain the trained K-nearest neighbor algorithm. The trained K-nearest neighbor algorithm is a classification model.

[0092] It is understood that the method embodiments provided above correspond to the system embodiments described above, and the specific details can be referred to each other, which will not be repeated here.

[0093] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.

[0094] Example 4 like Figure 10 As shown, the present invention also provides an electronic device, which may be a computer device, a microcontroller device, a smart mobile device, etc. The electronic device in this embodiment may include a processor, a memory, a transceiver component, etc. The memory, processor, and transceiver component are connected via a bus; the memory can be used to store executable programs, and an exemplary executable program may include instructions; the processor is used to execute the instructions stored in the memory. The memory can also be used to store data, which can be accessed and / or modified when instructions are executed.

[0095] The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, and is suitable for implementing one or more instructions. Specifically, it is suitable for loading and executing one or more instructions in the storage medium to realize the corresponding method flow or corresponding function, so as to realize the steps of the edge computing-based pole-mounted switch mechanical fault diagnosis method in the above embodiments.

[0096] Example 5 Based on the same inventive concept, this invention also provides a readable storage medium, specifically an electronic device readable storage medium (Memory). This readable storage medium is a memory device within an electronic device used to store programs and data. It is understood that the storage medium here can include both built-in storage media within the electronic device and extended storage media supported by the electronic device. The storage medium provides storage space, which stores the terminal's operating system. Furthermore, this storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more executable programs (including program code). It should be noted that the storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device. Loading and executing one or more instructions stored in the storage medium by the processor can implement the steps of the edge computing-based mechanical fault diagnosis method for pole-mounted switches in the above embodiments.

[0097] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0098] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0099] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1The function specified in one or more boxes.

[0100] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. An edge-computing-based pole-mounted switch mechanical fault diagnosis system, characterized in that, The method comprises the following steps: sequentially connecting a collection unit, a data processing unit and a processor; the collection unit is used for collecting current data in a switching coil of a pole-mounted switch and sending the current data to the data processing unit; the data processing unit is used for judging whether the current data is generated in a switching process, if the current data is generated in the switching process, the current data is sent to the processor; otherwise, the collection unit is controlled to collect the current data in the switching coil again; the processor is used for performing fault diagnosis by using the current data.

2. The system of claim 1, wherein, The collection unit comprises a Hall current sensor and a data conversion module; the data conversion module is connected with the Hall current sensor and the data processing unit respectively; the Hall current sensor is used for collecting current data in the switching coil according to a preset collection frequency, and converting the current data from a current signal into an analog signal and outputting the analog signal to the data conversion module; the data conversion module is used for converting the current data from the analog signal into a digital signal and sending the current data to the data processing unit.

3. The system of claim 1, wherein, The data processing unit comprises a first judgment module, a processing module and a second judgment module; the first judgment module is used for judging whether the current data is greater than or equal to a current threshold, if the current data is greater than or equal to the current threshold, the processing module is executed; otherwise, the collection unit is controlled to collect the current data in the switching coil again; the processing module is used for dividing the current data in a first preset time period into two parts to obtain a first part and a second part, adding the current data of the first part to obtain A, and adding the current data of the second part to obtain B; the second judgment module is used for judging whether B is greater than A, if B is greater than A, the current data is generated in the switching process; otherwise, the current data is not generated in the switching process, and the collection unit is controlled to collect the current data in the switching coil again; wherein, the time period corresponding to the first part is the same as the time period of the second part.

4. The system of claim 1, wherein, The processor comprises: a feature extraction module, which is used for extracting features of the current data by using a self-encoder to obtain key features; a generation module, which is used for generating an embedding space based on the key features by using a three-tuple metric learning model; the embedding space comprises a plurality of points, and each point corresponds to an embedding vector of current data; a classification module, which is used for classifying the points in the embedding space by using a pre-established classification model to obtain a fault type corresponding to each point in a plurality of classification results.

5. The system of claim 4, wherein, The self-encoder comprises an encoder and a decoder; the feature extraction module is specifically used for: compressing high-dimensional current time series in the current data into low-dimensional embedding features by using the encoder; reconstructing an original current signal of the current data according to the low-dimensional embedding features by using the decoder to obtain the key features.

6. The system of claim 4, wherein, The processor further comprises an establishment module, which is used for establishing the classification model; the establishment module comprises: a collection sub-module, which is used for collecting historical current data and corresponding fault types; The feature extraction submodule is configured to extract features of the historical current data by using the autoencoder to obtain historical key features. The generation submodule is configured to take the historical key features as inputs of a triple metric learning model to generate a historical embedding space; the historical embedding space includes a plurality of points, and each point corresponds to an embedding vector of a current data. The training submodule is configured to take the historical embedding space as input layer training samples of a K-nearest neighbor algorithm, take the fault types corresponding to the points in the historical embedding space as output layer training samples of the K-nearest neighbor algorithm, train the K-nearest neighbor algorithm, and obtain a trained K-nearest neighbor algorithm, which is the classification model.

7. The system of claim 2, wherein, Further comprising: A power module connected with the Hall current sensor, the data conversion module, the data processing unit and the processor respectively; The power module is configured to supply power to the Hall current sensor, the data conversion module, the data processing unit and the processor.

8. The system of claim 1, wherein, Further comprising: A data storage module connected with the data processing unit and configured to store the current data; The data processing unit is further configured to send the current data to the data storage module.

9. The system of claim 2, wherein, The Hall current sensor is a magnetic balance type Hall current sensor. The data conversion module is of the model AD7606.

10. The system of claim 1, wherein, The data processing unit is a single-chip microcomputer.

11. The system of claim 10, wherein, The single-chip microcomputer is of the model STM32F407ZGT6.

12. The system of claim 8, wherein, The data storage module is an AT24C02 external storage chip.

13. An edge computing-based pole-mounted switch mechanical fault diagnosis method, characterized in that, Comprising: Collecting current data in the opening and closing coil of the column switch; Determining whether the current data is generated in the opening and closing process, and if the current data is generated in the opening and closing process, using the current data for fault diagnosis; otherwise, controlling the acquisition unit to reacquire the current data in the opening and closing coil.

14. An electronic device, comprising: Comprising: At least one processor and a memory; The memory and the processor are connected through a bus; The memory is configured to store one or more programs; When the one or more programs are executed by the at least one processor, the edge computing-based mechanical fault diagnosis method for the column switch is implemented.

15. A readable storage medium, characterized by, The execution program is stored thereon, and when the execution program is executed, the edge computing-based mechanical fault diagnosis method for the column switch is implemented.