Cable fault detection method and related device

By performing frequency domain transformation and interpolation processing on cable fault data, and combining it with a deep learning model, the problems of insufficient sensitivity and limited positioning accuracy in existing cable fault detection technologies have been solved, achieving efficient and accurate fault detection and diagnosis.

CN121456464APending Publication Date: 2026-02-03SHENZHEN POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511557038.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

Existing cable fault detection technologies lack sensitivity to high-resistance faults and early aging faults, have limited location accuracy, and cannot effectively diagnose fault types, resulting in low repair efficiency and difficulty in tracing the source of faults.

Method used

By performing frequency domain transformation on the original dataset of faulty cables, extracting the difference data, and iteratively updating the model based on the difference data, fault feature learning is performed using a one-dimensional convolutional neural network, and the model is validated using a test dataset to obtain the target model for faulty cable detection.

Benefits of technology

It improves the accuracy and efficiency of cable fault detection, realizes intelligent detection throughout the entire process with high positioning accuracy and high diagnostic accuracy, supports rapid and accurate output of fault information, and provides reliable decision support for cable operation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121456464A_ABST
    Figure CN121456464A_ABST
Patent Text Reader

Abstract

The invention provides a cable fault detection method and a related device, and the method comprises the steps: obtaining an original data set of a fault cable, and dividing the original data set into a training data set and a test data set according to a preset proportion; performing frequency domain conversion on the training data set to obtain a first frequency spectrum signal and a second frequency spectrum signal; performing difference processing on the first frequency spectrum signal and the second frequency spectrum signal to obtain difference data; inputting the difference data into a preset first model to obtain first data; iteratively updating the first model according to the first data to obtain a second model; testing the second model according to the test data set to obtain a test result; if the test result meets the preset test condition, determining the second model as a target model; the target model is used for detecting a fault cable. And the model is iteratively updated based on the difference data, and the fault cable is detected by using the model, so that the accuracy and efficiency of cable fault detection are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cable fault detection, and in particular to a cable fault detection method and related device. BACKGROUND

[0002] As a key carrier of power supply in urban core area, power collection system of new energy power station and cross-sea power grid, the operation stability of high-voltage power cable is directly related to the safe and reliable power supply of power system. Once the cable fails, it will cause millions of economic losses and seriously affect industrial production, urban operation and residents' life. However, the existing cable fault detection technology has obvious shortcomings: some methods lack sensitivity to high-resistance faults, early aging faults and other faults, which easily leads to missed detection; the positioning accuracy is limited by technical principles or environmental interference, and it is difficult to meet the demand of accurate repair; at the same time, most detection technologies can only realize fault positioning, and cannot effectively diagnose fault types (such as insulation aging, short circuit, open circuit, etc.), resulting in low repair efficiency and difficulty in fault tracing.

[0003] Therefore, how to improve the accuracy and efficiency of cable fault detection needs to be solved urgently. SUMMARY

[0004] The embodiments of the present application provide a cable fault detection method and related device, which converts the training data set into frequency domain and extracts difference data, iteratively updates the model based on the difference data, obtains the target model after the test data set is verified, and then is used for fault cable detection, thereby effectively improving the accuracy and efficiency of cable fault detection.

[0005] In a first aspect, the embodiments of the present application provide a cable fault detection method, which comprises: obtaining an original data set of a fault cable, and dividing the original data set into a training data set and a test data set according to a preset proportion; performing frequency domain conversion on the training data set to obtain a first frequency spectrum signal and a second frequency spectrum signal; performing difference processing on the first frequency spectrum signal and the second frequency spectrum signal to obtain difference data; inputting the difference data into a preset first model to obtain first data; iteratively updating the first model according to the first data to obtain a second model; testing the second model according to the test data set to obtain a test result; if the test result meets a preset test condition, determining that the second model is a target model; the target model is used for detecting the fault cable.

[0006] Secondly, embodiments of this application provide a cable fault detection device, the device comprising an acquisition module, a conversion module, a processing module, an update module, a testing module, and a determination module, wherein: The acquisition module is used to acquire the original dataset of the faulty cable and divide the original dataset into a training dataset and a test dataset according to a preset ratio. The conversion module is used to perform frequency domain conversion on the training dataset to obtain a first spectral signal and a second spectral signal; The processing module is used to perform difference processing on the first spectrum signal and the second spectrum signal to obtain difference data; and input the difference data into a preset first model to obtain first data; The update module is used to iteratively update the first model based on the first data to obtain the second model; The testing module is used to test the second model based on the test dataset and obtain test results; The determining module is used to determine the second model as the target model if the test result meets the preset test conditions; the target model is used to detect the faulty cable.

[0007] Thirdly, embodiments of this application provide an electronic device, including a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for performing steps in any method of the first aspect of this application.

[0008] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program for electronic data interchange, wherein the computer program causes a computer to perform some or all of the steps described in any method of the first aspect of this application.

[0009] Fifthly, embodiments of this application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in any method of the first aspect of this application. The computer program product may be a software installation package.

[0010] By implementing the embodiments of this application, the training dataset can be frequency domain transformed and the difference data can be extracted. The model can be iteratively updated based on the difference data. After the target model is verified by the test dataset, it can be obtained and then used for fault cable detection, which effectively improves the accuracy and efficiency of cable fault detection. Attached Figure Description

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

[0012] Figure 1 This is a system architecture diagram of a cable fault detection system provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application; Figure 3 This is an application scenario diagram of a cable fault detection system provided in an embodiment of this application; Figure 4 This is a schematic diagram of a deep learning process for cable fault detection provided in an embodiment of this application; Figure 5 This is a schematic flowchart of a cable fault detection method provided in an embodiment of this application; Figure 6 This is a schematic diagram of a frequency domain conversion process provided in an embodiment of this application; Figure 7 This is a schematic diagram of the data processing flow of a first model provided in an embodiment of this application; Figure 8 This is a block diagram of the functional modules of a cable fault detection device provided in an embodiment of this application. Detailed Implementation

[0013] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present application.

[0014] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0015] It should be understood that the term "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this document indicates that the preceding and following related objects are in an "or" relationship. In the embodiments of this application, "multiple" refers to two or more.

[0016] In the embodiments of this application, "at least one item" or its similar expression refers to any combination of these items, including any combination of a single item or a plurality of items. "One or more" means one or more, while "multiple" means two or more. For example, "at least one item" of a, b, or c can represent the following seven cases: a, b, c; a and b; a and c; b and c; a, b, and c. Each of a, b, and c can be an element or a set containing one or more elements.

[0017] In this application, the term "connection" refers to various connection methods, such as direct connection or indirect connection, to achieve communication between devices. This application does not impose any limitations on this.

[0018] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0019] High-voltage power cables serve as crucial carriers for power supply in urban core areas, power collection systems for new energy power plants, and cross-sea power grids. Their operational stability directly impacts the safe and reliable power supply of the power system. Power outages caused by cable faults can result in economic losses in the millions, severely affecting industrial production, urban operations, and residents' lives. However, existing cable fault detection technologies have significant shortcomings: some methods lack sensitivity to high-resistance faults and early aging faults, easily leading to missed faults; location accuracy is limited by technical principles or environmental interference, making it difficult to meet the needs of precise emergency repairs; furthermore, most detection technologies can only locate faults and cannot effectively diagnose fault types (such as insulation aging, short circuits, and open circuits), resulting in low repair efficiency and difficulty in tracing the source of the fault. Therefore, improving the accuracy and efficiency of cable fault detection is an urgent issue to be addressed.

[0020] To address the aforementioned problems, this application provides a cable fault detection method and related apparatus. First, an original dataset of the faulty cable is acquired and divided into a training dataset and a test dataset according to a preset ratio. Then, the training dataset undergoes frequency domain transformation to obtain a first spectral signal and a second spectral signal. Next, the first spectral signal and the second spectral signal are subjected to difference processing to obtain difference data. The difference data is input into a preset first model to obtain first data. The first model is iteratively updated based on the first data to obtain a second model. The second model is tested using the test dataset to obtain test results. If the test results meet preset test conditions, the second model is determined as the target model. The target model is used to detect the faulty cable. By performing frequency domain transformation on the training dataset and extracting difference data, iteratively updating the model based on this difference data, and verifying its compliance with the test dataset, a target model is obtained and used for faulty cable detection, effectively improving the accuracy and efficiency of cable fault detection.

[0021] For easier understanding, please refer to Figure 1 , Figure 1 This is a system architecture diagram of a cable fault detection system provided in an embodiment of this application. The cable fault detection system includes a sensing and acquisition module, a data preprocessing module, a core computing module, and a decision output module. The modules work together to realize intelligent detection throughout the entire process from data acquisition to fault diagnosis.

[0022] The sensing and acquisition module is responsible for collecting the imaginary part of the input impedance at the cable end, which directly reflects the changes in the cable's electrical characteristics. It can output excitation signals at multiple preset signal frequencies to ensure that the detection can cover the performance of fault characteristics at different frequencies, ensuring comprehensive capture of fault characteristics. It can also collect information such as cable type, laying environment, and length to provide background reference for data analysis and model adaptation, enabling the model to perform accurate analysis based on the characteristics of different cables.

[0023] The data preprocessing module can convert time-domain impedance data into frequency-domain spectral signals using Fast Fourier Transform, transforming fault characteristics from the time dimension to the frequency dimension, thus highlighting the unique frequency domain manifestations of the fault. It can also calculate the spectral difference between theoretically lossless cables and measured lossy cables, removing interference from the inherent characteristics of the cables themselves and retaining only the characteristic differences caused by the fault, focusing on fault-specific information. Furthermore, it can use preset thresholds to filter out noise and data unrelated to the fault, retaining only the effective difference information of the fault region, reducing the workload of subsequent calculations and improving processing efficiency.

[0024] The core computing module can learn features from preprocessed fault data based on a one-dimensional convolutional neural network. By continuously iterating and optimizing the model's parameters, the model can accurately establish the mapping relationship between fault features and fault location and type. It can also use an independent test dataset to validate the trained model, evaluate the model's positioning accuracy and classification accuracy, and select target models whose performance meets the actual engineering requirements, ensuring the model's reliability in real-world applications.

[0025] The decision output module can load a validated target model, quickly perform reasoning calculations on new cable inspection data, and output the precise location and specific type of fault (such as insulation aging, short circuit, etc.), providing a direct basis for fault handling. It can also present fault information through a visual interface, support data export and multi-terminal synchronization, allowing maintenance personnel to intuitively and clearly understand the fault situation, facilitating decision-making and subsequent operations.

[0026] It is evident that the cable fault detection system achieves intelligent detection throughout the entire process through multi-module collaboration, combining high positioning accuracy, high diagnostic accuracy, strong scenario adaptability, and high automation efficiency. It can quickly and accurately output fault information, providing reliable decision support for cable operation and maintenance, and ensuring the safe and stable operation of the power grid.

[0027] The following is combined Figure 2 The electronic devices in the embodiments of this application will be described. Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 2 As shown, the electronic device includes one or more processors, a memory, a communication interface, and one or more programs. The processor is connected to the memory and the communication interface via an internal communication bus.

[0028] The processor can be used for: Obtain the original dataset of the faulty cable, and divide the original dataset into a training dataset and a test dataset according to a preset ratio; The training dataset is frequency domain transformed to obtain a first spectral signal and a second spectral signal; The first spectral signal and the second spectral signal are subjected to difference processing to obtain difference data; The difference data is input into a preset first model to obtain the first data; The first model is iteratively updated based on the first data to obtain the second model; The second model is tested based on the test dataset to obtain test results; If the test results meet the preset test conditions, then the second model is determined to be the target model; the target model is used to detect the faulty cable.

[0029] The one or more programs are stored in the aforementioned memory and configured to be executed by the aforementioned processor, and the one or more programs include instructions for performing any step in the above method embodiments.

[0030] The processor can be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, cells, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. The communication unit can be a communication interface, transceiver, transceiver circuit, etc., and the storage unit can be a memory.

[0031] The memory can be volatile or non-volatile, or a combination of both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0032] It is understood that the electronic device may include more or fewer structural elements than those shown in the block diagram above, such as a power module, physical buttons, a Wi-Fi module, a speaker, a Bluetooth module, sensors, a display module, etc., without limitation. It is understood that the electronic device may incorporate elements such as... Figure 1 The system architecture described above.

[0033] For easier understanding, please refer to Figure 3 , Figure 3This diagram illustrates an application scenario of a cable fault detection system provided in this application. The faulty cable is the object to be detected; when a fault exists within it (such as insulation aging or a short circuit), abnormal changes in its electrical characteristics will occur. Faulty cable data refers to the raw information collected from the faulty cable, including but not limited to: the imaginary part of the input impedance at the cable's head, the cable's model, length, and laying environment, etc., which are not specifically limited here. The cable fault detection system can perform frequency domain transformation, difference calculation, and threshold filtering on the input faulty cable data to extract feature data focusing on the fault. Then, using a trained deep learning model (such as a target model), it analyzes the feature data, outputs the fault location and fault type, and feeds it back to the target user. This target user can be power grid maintenance personnel who can use this fault information to perform fault location, emergency repairs, and other work, ultimately completing the cable fault handling.

[0034] For easier understanding, please refer to Figure 4 , Figure 4 This is a flowchart illustrating a deep learning process for cable fault detection provided in an embodiment of this application. At the beginning of the process, the original dataset is first identified and preprocessed, i.e., divided into a test dataset and a training dataset. Then, a Fast Fourier Transform is performed on the imaginary part of the impedance data in the training dataset to convert the time-domain signal into a spectral signal. Next, the difference between the theoretical lossless cable spectral signal and the measured lossy cable spectral signal is calculated to obtain the difference data, thereby removing interference from the inherent structure of the cable and focusing on fault-specific characteristics. Finally, the difference is judged... Is it greater than the preset threshold? If the difference Greater than the preset threshold If the difference is not zero, it is identified as a fault region, its fault reference coordinates are recorded, and the difference is retained; otherwise, the difference is zeroed to filter out noise and irrelevant information. Then, only the difference data of the fault region is retained to narrow the input range of subsequent models. Next, a one-dimensional convolutional neural network is used to perform convolution and pooling operations on the difference data of non-zero regions to extract the local correlation features of the fault. Then, the relative position of the fault is calculated by convolutional and fully connected layers, and the absolute position of the fault is obtained by combining it with the fault reference coordinates. The fault type code is output by a Softmax classifier. Then, the model output is compared with the standard data of the training set, and its loss value is calculated. If the loss value meets the iteration stopping condition (such as the loss is lower than the threshold or the number of iterations is exhausted), the training is terminated and the optimal parameters are saved; otherwise, backpropagation is used to update the model parameters and continue iterating. Finally, the test dataset is input into the trained model, and the predicted fault location and fault type are output and compared with the true label of the test dataset to complete the performance test. If the model performance meets the requirements, the process ends; otherwise, backtracking optimization is required.

[0035] After understanding the software and hardware architecture of this application, the following will be combined with...Figure 5 This application describes a cable fault detection method according to an embodiment. Figure 5 This is a flowchart illustrating a cable fault detection method provided in an embodiment of this application, specifically including the following steps: Step S501: Obtain the original dataset of the faulty cable and divide the original dataset into a training dataset and a test dataset according to a preset ratio.

[0036] Specifically, the original dataset includes, but is not limited to, the imaginary part of the theoretical input impedance at the beginning of a lossless cable, the imaginary part of the input impedance at the beginning of a measured lossy cable, the input signal frequency, the cable length, the fault location parameters, the fault type key value, and the cable wave velocity; no specific limitations are imposed here. This original dataset is divided into a training dataset and a test dataset according to a preset ratio, which can be 8:2 or 7:3; no specific limitations are imposed here.

[0037] The imaginary part of the input impedance at the beginning of the theoretical lossless cable can be calculated using a preset cable simulation model, or obtained by introducing a lossless cable of the same type and length that has been actually measured as a standard model library.

[0038]

[0039] in, Represents the original dataset; This represents the imaginary part of the input impedance at the beginning of the theoretically lossless cable, i.e., the first imaginary part of the impedance; This represents the imaginary part of the measured input impedance at the beginning of the lossy cable, i.e., the imaginary part of the second impedance. Indicates the frequency of the input signal; Indicates the cable length; Indicates the location parameter of the fault point; The key value indicates the fault type.

[0040] Step S502: Perform frequency domain transformation on the training dataset to obtain the first spectral signal and the second spectral signal.

[0041] For easier understanding, please refer to Figure 6 , Figure 6 This is a schematic diagram of a frequency domain conversion process provided in an embodiment of this application. The training dataset includes N signal frequencies, N imaginary parts of a first impedance, and N imaginary parts of a second impedance, where N is an integer greater than 1. Each signal frequency corresponds to one imaginary part of a first impedance and one imaginary part of a second impedance. The specific steps of performing frequency domain conversion on the training dataset to obtain a first spectral signal and a second spectral signal include: A1. Determine the N frequency times corresponding to the N signal frequencies based on the preset mapping relationship between signal frequencies and frequency times; A2. Determine the first spectral sequence based on the N frequency times and the N imaginary parts of the first impedance; A3. Determine the second spectral sequence based on the N frequency times and the N imaginary parts of the second impedance; A4. Perform Fast Fourier Transform on the first spectral sequence and the second spectral sequence respectively to obtain the first spectral signal and the second spectral signal.

[0042] In a specific embodiment, firstly, the frequency time corresponding to each of the N signal frequencies can be calculated according to a pre-defined mapping relationship between signal frequency and frequency time, thereby obtaining N frequency times. By converting discrete frequency values ​​into corresponding time series, the time dimension of subsequent spectral sequences can be ensured to be consistent, laying the foundation for sequence alignment and comparison.

[0043] Then, using N frequency times as the horizontal axis and the corresponding N imaginary parts of the first impedance (the imaginary impedance parts of the theoretical lossless cable at each frequency) as the vertical axis, a discrete sequence is formed, namely the first spectrum sequence. Next, using N frequency times as the horizontal axis and the corresponding N imaginary parts of the second impedance (the imaginary impedance parts of the measured cable at each frequency) as the vertical axis, a discrete sequence is formed, namely the second spectrum sequence.

[0044] Finally, fast Fourier transforms are performed on the first and second spectral sequences respectively to obtain the first and second spectral signals.

[0045] It is evident that by converting the impedance imaginary part sequence in the time domain (time dimension) into a spectrum signal in the frequency domain (frequency dimension), the amplitude and phase characteristics of different frequency components can be highlighted, making it easier to more clearly reflect the energy anomalies in specific frequency bands caused by the fault.

[0046] In one possible embodiment, the relationship between impedance and location in the faulty cable can be clarified first. Then, the faulty cable can be regarded as a distributed parameter circuit consisting of resistance R, inductance L, capacitance C, and conductance G per unit length. The electrical parameters can be obtained through experiments or production data corresponding to the cable model. The skin effect (current concentration on the conductor surface at high frequencies leads to an increase in R) and the proximity effect (magnetic coupling between multiple conductors leads to changes in L) need to be considered to better reflect the actual operating characteristics.

[0047] One can take the coordinates of the load location as the origin to obtain any position. Voltage-current relationship at the location:

[0048] in, and These represent the forward voltage wave and the reflected voltage wave, respectively; γ represents the propagation coefficient of the faulty cable; The characteristic impedance of a faulty cable is only related to the cable type and is independent of the cable length. This indicates the voltage of the faulty cable at position x; This indicates the current in the faulty cable at position x.

[0049] Among them, the propagation coefficient γ of the faulty cable and the characteristic impedance of the faulty cable It can be obtained from the following formula:

[0050] Where R, L, C, and G represent the resistance, inductance, capacitance, and conductance per unit length of the faulty cable, respectively. It represents the angular frequency of an electrical signal.

[0051] Among them, the load impedance can be Then the reflection coefficient at the load end The calculation formula is as follows:

[0052] Furthermore, it can be obtained = The first-end impedance at that time As shown below:

[0053] Meanwhile, the approximate expression for the imaginary part of the impedance can be obtained as follows:

[0054] in, This represents the imaginary part of the impedance of the faulty cable. Indicates cable wave speed; Indicates the length of the cable reflection point; It represents any one of the N signal frequencies.

[0055] It should be noted that the signal frequency can be treated as a time variable, and a Fast Fourier Transform can be performed on it. Impedance mismatch at the fault point will cause additional reflections, i.e. Medium variables The presence of components beyond the cable length (corresponding to the fault location) will, in the frequency domain, cause an increase in the amplitude of the signal at that location. Therefore, a Fast Fourier Transform can be performed on both the imaginary part of the theoretically lossless cable's input impedance and the measured imaginary part of the measured lossy cable's input impedance to obtain the corresponding spectral signals, as shown below:

[0056] in, Indicates the first spectrum signal; This indicates the second frequency spectrum signal.

[0057] Step S503: Perform difference processing on the first spectrum signal and the second spectrum signal to obtain difference data.

[0058] Wherein, the first spectral signal includes N first spectral values, and the second spectral signal includes N second spectral values. The specific steps of performing difference processing on the first spectral signal and the second spectral signal to obtain difference data include: B1. Determine the N frequency components corresponding to the N first spectral values ​​and the N second spectral values; each frequency component corresponds to one first spectral value and one second spectral value; B2. Subtract the first spectral value and the second spectral value corresponding to each of the N frequency components to obtain N difference values; B3. Determine a reference difference sequence based on the N differences; B4. Normalize the reference difference sequence to obtain the target difference sequence; B5. Filter the data in the target difference sequence that are greater than a preset threshold to obtain the difference data.

[0059] In a specific embodiment, firstly, N frequency components corresponding to N first spectral values ​​and N second spectral values ​​are determined, where each frequency component corresponds to one first spectral value and one second spectral value. Then, based on the principle of corresponding frequency components, the first spectral value and the second spectral value are subtracted one by one; that is, the difference between the first spectral value and the second spectral value corresponding to each of the N frequency components is calculated to obtain N difference values. Next, the N difference values ​​are arranged in the order of their corresponding frequency components to obtain a reference difference value sequence. Then, the reference difference value sequence is normalized to map all differences to a preset interval (such as [0,1] or [-1,1]) to obtain the target difference value sequence.

[0060] The normalization calculation formula is shown below:

[0061] in, This represents the target difference in the target difference sequence, i.e., the normalized difference.

[0062] Finally, data points in the target difference sequence that exceed a preset threshold are selected to obtain the difference data. This preset threshold can be determined through experimental calibration, statistical analysis, or empirical values, such as the mean of the target difference sequence plus twice the standard deviation.

[0063] Among them, the preset threshold can be set to The calculation formula for threshold filtering is as follows:

[0064] Among them, if the target difference Greater than the preset threshold Then retain the target difference. If the target difference Less than or equal to the preset threshold Then ignore the target difference. .

[0065] It is evident that by normalizing the target difference sequence and applying threshold filtering, noise and characteristic interference can be effectively removed, focusing on the core features of the fault, providing standardized input data for the model, and improving the sensitivity and accuracy of cable fault detection.

[0066] Step S504: Input the difference data into a preset first model to obtain the first data.

[0067] For easier understanding, please refer to Figure 7 , Figure 7 This is a schematic flowchart of data processing for a first model provided in an embodiment of this application. The specific steps of inputting the difference data into a preset first model to obtain first data include: C1. The difference data is processed by convolution and pooling layers of the first model to obtain the target feature vector; C2. Determine the weight matrix, bias vector, and activation function corresponding to the fully connected layer of the first model; C3. Perform a linear transformation on the target feature vector based on the weight matrix and the bias vector to obtain a first linear result; C4. Process the first linear result according to the activation function to obtain the first data.

[0068] In a specific embodiment, firstly, convolution operations are performed on the input difference data (frequency domain sequences focusing on fault features). A preset convolution kernel (such as a 3×1 or 5×1 one-dimensional convolution kernel, adapted to the one-dimensional characteristics of the frequency domain sequence) is used to slide through the difference data, extracting local correlation features between different frequency components (such as the distribution pattern of fault features in adjacent frequency bands, amplitude abrupt change patterns, etc.). Then, the convolved feature map undergoes dimensionality reduction processing (such as max pooling or average pooling) to retain key features while reducing the amount of data and avoiding overfitting. For example, by using max pooling with a stride of 2, the maximum value within each sliding window is selected to highlight the most significant frequency component response in the fault features. Thus, through alternating processing of multiple layers of convolution and pooling, the target feature vector is finally obtained. It should be noted that the first model can be a one-dimensional convolutional neural network, without specific limitations.

[0069] Then, the weight matrix, bias vector, and activation function corresponding to the fully connected layer of the first model are determined. The dimension of the weight matrix can be [M, K] (M is the dimension of the target feature vector, and K is the dimension of the fully connected layer output), which is used to measure the influence weight of each element in the target feature vector on the output result (the initial value is randomly generated and subsequently optimized through iteration). The dimension of the bias vector can be [1, K], which is used to adjust the baseline value of the linear transformation and compensate for the fitting bias of the first model. The activation function can be a nonlinear function (such as ReLU or Softmax). ReLU is suitable for enhancing the nonlinear expression capability of intermediate layers, and Softmax is suitable for outputting the probability distribution of fault types in the output layer. No specific limitation is made here.

[0070] Next, a linear transformation can be performed on the target feature vector based on the weight matrix and the bias vector. That is, the features of each dimension of the target feature vector are weighted and summed using the weight matrix, and then the bias vector is superimposed to obtain the first linear result. Finally, the first linear result is input into an activation function for nonlinear transformation to obtain the first data. The first data includes, but is not limited to, relative fault location (such as fault point location parameters) and fault type key values, which are not specifically limited here.

[0071] It is evident that by transforming the difference data into prediction results with clear physical meaning, key information about frequency domain fault characteristics is preserved, and the hierarchical structure of the deep learning model enables the transformation from data to decision. This provides accurate intermediate outputs for subsequent iterative optimization of the model based on prediction errors, ultimately improving the model's ability to locate and diagnose cable faults.

[0072] In one possible embodiment, detection can first proceed from the beginning to the end of the faulty cable, and when the first occurrence of the faulty cable... piece The area records the location information. and with Starting with, until A convolution operation is performed on the terminated continuous data sequence to focus on core features near the fault point and avoid interference from irrelevant data areas. The relevant calculation formula for the convolution operation is shown below:

[0073] in, Indicates the first Layer network Each output feature is a feature of the current layer. This represents a non-linear activation function, such as ReLU, Sigmoid, etc. This represents the input feature vector, such as the target feature vector; Indicates the first Layer network Each output feature is a feature of the previous layer. Indicates the first The first in the layer The convolution kernel and the first Weight parameters corresponding to each input feature; Indicates the first Layer Bias terms for each output feature.

[0074] Then, the output of the convolutional layer is reduced in dimensionality using the max pooling operator. The transformation function corresponding to max pooling is shown below:

[0075] in, Indicates the first The first layer One output value; Indicates the width of the pooling region; Indicates the first The index range of each pooled window; Indicates the first The first layer i The first feature channel The output value of each neuron is the input feature of the pooling operation.

[0076] Finally, after multiple convolutions and pooling, the final result is output through a fully connected layer, calculated as follows:

[0077] in, express; This represents the bias vector corresponding to the fully connected layer; This represents the weight matrix corresponding to the fully connected layer; This represents the activation function corresponding to the fully connected layer; Represents the target feature vector; This indicates the relative location of the fault, i.e., the location parameter of the fault point; The key value representing the fault type, i.e., the fault type key value, can be transformed into a probability distribution using a pre-defined Softmax classifier and then standardized using one-hot encoding. The encoding specifications are shown in the table below:

[0078] The accurate fault location can be calculated by combining the starting point of the fault area with the relative offset (relative fault location), as shown below:

[0079] in, Indicates the exact location of the fault; Indicates the starting point position; This indicates the relative offset between the starting point and the fault location.

[0080] Step S505: Iteratively update the first model based on the first data to obtain the second model.

[0081] The first data includes first fault location data and first fault type data. The step of iteratively updating the first model based on the first data to obtain the second model includes: D1. Obtain the second fault location data and the second fault type data corresponding to the first fault location data and the first fault type data in the training dataset, respectively. D2. Process the first fault location data and the second fault location data according to the preset first loss function to obtain the first loss result; D3. Process the first fault type data and the second fault type data according to the preset second loss function to obtain the second loss result; D4. Perform backpropagation calculation based on the first loss result and the second loss result to obtain the adjustment gradient; D5. Iteratively update the first parameter of the first model according to the adjusted gradient until the preset termination condition is met, then the iteration terminates and the second parameter is obtained. D6. Adjust the first model according to the second parameter to obtain the second model.

[0082] In a specific embodiment, firstly, second fault location data and second fault type data corresponding to the first fault location data and first fault type data are obtained from the training dataset, i.e., the actual physical location of the fault and the actual type of the fault, respectively. Then, the first fault location data and second fault location data are processed according to a preset first loss function to obtain a first loss result. The preset first loss function is a loss function suitable for regression tasks, such as mean squared error (MSE) or mean absolute error (MAE), to quantify the deviation between the first and second fault location data. Next, the first and second fault type data are processed according to a preset second loss function to obtain a second loss result. The preset second loss function is a loss function suitable for classification tasks, such as cross-entropy loss, to quantify the deviation between the first and second fault type data.

[0083] Next, the first and second loss results are weighted and summed to obtain the total loss result. Then, a backpropagation algorithm (such as gradient descent) is used to calculate the partial derivatives of the total loss result with respect to each parameter of the first model (such as convolutional kernel weights, bias terms, and fully connected layer weights), obtaining the adjusted gradient. Based on this adjusted gradient, a preset optimization algorithm is used to iteratively update the first parameters of the first model. This iterative update process is repeated until a preset termination condition is met (such as the total loss result being less than a preset threshold, the number of iterations reaching an upper limit, or the loss no longer decreasing), resulting in the converged second parameters. Finally, the iteratively converged second parameters are used to replace the initial parameters (i.e., the first parameters) of the first model to obtain the second model.

[0084] It is evident that by optimizing the first model, an iterative upgrade from initial prediction to accurate fitting was achieved. At the same time, the joint optimization of fault location and type was taken into account, solving the problem that a single loss function cannot balance the accuracy of location and type diagnosis. The resulting second model has a stronger fault feature learning ability.

[0085] Step S506: Test the second model according to the test dataset to obtain the test results.

[0086] The specific steps of testing the second model based on the test dataset to obtain test results include: E1. Input the test dataset into the second model to obtain the third fault location data and the third fault type data; E2. Obtain the fourth fault location data and the fourth fault type data corresponding to the third fault location data and the third fault type data in the test dataset, respectively. E3. Determine the positioning accuracy value based on the third fault location data and the fourth fault location data; E4. Determine the classification accuracy based on the third fault type data and the fourth fault type data; E5. Determine the first weight and the second weight corresponding to the positioning accuracy value and the classification accuracy, respectively; E6. The test result is obtained by weighting the positioning accuracy value, the first weight, the classification accuracy, and the second weight.

[0087] In a specific embodiment, firstly, the test dataset is input into the second model to obtain the third fault location data and the third fault type data, which are the fault locations and fault types predicted by the model. Then, the fourth fault location data and the fourth fault type data corresponding to the third fault location data and the third fault type data in the test dataset are obtained, representing the actual location and type of the fault in the test sample.

[0088] Then, the positioning accuracy is determined based on the third and fourth fault location data. Next, the number of correctly predicted fault types is determined based on the third and fourth fault type data, and the ratio of the number of correctly predicted fault types to the total number of test samples is calculated to obtain the classification accuracy.

[0089] Next, based on actual application requirements (such as the priority of positioning accuracy and type diagnosis in smart grids), weights are assigned to the positioning accuracy value and classification accuracy rate, resulting in a first weight and a second weight. Finally, a weighted calculation is performed based on the positioning accuracy value, the first weight, the classification accuracy rate, and the second weight to obtain the test results.

[0090] As can be seen, by predicting using test datasets and comparing with real labels, the positioning accuracy and classification accuracy are quantified and then weighted and fused according to scenario requirements, thus achieving an objective and comprehensive evaluation of the model's overall positioning and diagnostic performance, providing a reliable basis for verifying the model's applicability in practical applications.

[0091] The third fault location data includes multiple third fault locations, and the fourth fault location data includes multiple fourth fault locations. The specific steps for determining the positioning accuracy value based on the third fault location data and the fourth fault location data include: F1. Calculate the absolute value of the difference between the plurality of third fault locations and the plurality of fourth fault locations to obtain a plurality of positioning error values; F2. Calculate the average value of the multiple positioning error values ​​to obtain the average error value; F3. Normalize the average error value to obtain a reference error value; F4. Subtract the reference error value from the preset value to obtain the positioning accuracy value.

[0092] In a specific embodiment, firstly, for each sample in the test dataset, the absolute value of the difference between the third fault location and the fourth fault location is calculated to obtain multiple positioning error values. Then, the average of these multiple positioning error values ​​is calculated to obtain the average error value. Next, the average error value is normalized to map it to the [0,1] interval, thus obtaining the reference error value. Finally, the reference error value is subtracted from a preset value (usually 1, representing the ideal state with theoretically no error) to obtain the positioning accuracy value (e.g., if the reference error value is 0.15, the positioning accuracy value is 0.85). The closer the positioning accuracy value is to 1, the smaller the average positioning deviation and the higher the accuracy.

[0093] It is evident that by quantifying individual positioning errors, calculating average errors, and then normalizing and inversely transforming them, the model positioning deviation is converted into a standardized positioning accuracy value. This objectively reflects the overall positioning performance of the model and eliminates the differences in error magnitude under different scenarios.

[0094] Step S507: If the test result meets the preset test conditions, then the second model is determined to be the target model; the target model is used to detect the faulty cable.

[0095] Specifically, if the test results meet the preset test conditions, such as the test results being greater than or equal to a preset test threshold, then the second model is determined as the target model. The performance of this target model meets the actual requirements for cable fault detection. New measured cable data can be input into the target model, which will then quickly output the precise location and specific type of the fault.

[0096] The above primarily describes the solutions of the embodiments of this application from the perspective of the method execution process. It is understood that, in order to achieve the above functions, the electronic device includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments provided herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0097] This application embodiment can divide the electronic device into functional units according to the above method example. For example, each function can be divided into a separate functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0098] When dividing each function into modules according to its corresponding function. Figure 8 This is a functional block diagram of a cable fault detection device provided in an embodiment of this application. The cable fault detection device 800 includes an acquisition module 810, a conversion module 820, a processing module 830, an update module 840, a testing module 850, and a determination module 860, wherein: The acquisition module 810 is used to acquire the original dataset of the faulty cable and divide the original dataset into a training dataset and a test dataset according to a preset ratio. The conversion module 820 is used to perform frequency domain conversion on the training dataset to obtain a first spectral signal and a second spectral signal. The processing module 830 is used to perform difference processing on the first spectrum signal and the second spectrum signal to obtain difference data; and input the difference data into a preset first model to obtain first data; The update module 840 is used to iteratively update the first model based on the first data to obtain the second model; The testing module 850 is used to test the second model based on the test dataset and obtain test results; The determining module 860 is used to determine the second model as the target model if the test result meets the preset test conditions; the target model is used to detect the faulty cable.

[0099] Optionally, the training dataset includes N signal frequencies, N imaginary parts of the first impedance, and N imaginary parts of the second impedance, where N is an integer greater than 1. Each signal frequency corresponds to one imaginary part of the first impedance and one imaginary part of the second impedance. Regarding the frequency domain transformation of the training dataset to obtain the first spectral signal and the second spectral signal, the transformation module 820 is specifically used for: Based on the preset mapping relationship between signal frequency and frequency time, determine the N frequency times corresponding to the N signal frequencies; The first spectral sequence is determined based on the N frequency times and the N imaginary parts of the first impedance; The second spectral sequence is determined based on the N frequency times and the N imaginary parts of the second impedance; Perform Fast Fourier Transform on the first spectral sequence and the second spectral sequence respectively to obtain the first spectral signal and the second spectral signal.

[0100] Optionally, the first spectral signal includes N first spectral values, and the second spectral signal includes N second spectral values. In the process of performing difference processing on the first spectral signal and the second spectral signal to obtain difference data, the processing module 830 is specifically used for: Determine N frequency components corresponding to the N first spectral values ​​and the N second spectral values; each frequency component corresponds to one first spectral value and one second spectral value; The difference between the first spectral value and the second spectral value corresponding to each of the N frequency components is calculated to obtain N difference values. A reference difference sequence is determined based on the N differences; The reference difference sequence is normalized to obtain the target difference sequence; The difference data is obtained by filtering out data in the target difference sequence that are greater than a preset threshold.

[0101] Optionally, in the step of inputting the difference data into a preset first model to obtain the first data, the processing module 830 is further specifically used for: The difference data is processed by convolution and pooling layers of the first model to obtain the target feature vector. Determine the weight matrix, bias vector, and activation function corresponding to the fully connected layer of the first model; A first linear result is obtained by performing a linear transformation on the target feature vector based on the weight matrix and the bias vector. The first linear result is processed according to the activation function to obtain the first data.

[0102] Optionally, the first data includes first fault location data and first fault type data. Regarding the iterative update of the first model based on the first data to obtain the second model, the update module 840 is specifically used for: Obtain the second fault location data and the second fault type data corresponding to the first fault location data and the first fault type data in the training dataset, respectively. The first fault location data and the second fault location data are processed according to a preset first loss function to obtain a first loss result; The first fault type data and the second fault type data are processed according to a preset second loss function to obtain a second loss result; Backpropagation is performed based on the first loss result and the second loss result to obtain the adjustment gradient; The first parameter of the first model is iteratively updated according to the adjusted gradient until a preset termination condition is met, then the iteration terminates and the second parameter is obtained. The first model is adjusted according to the second parameter to obtain the second model.

[0103] Optionally, in the step of testing the second model based on the test dataset to obtain test results, the test module 850 is specifically used for: Input the test dataset into the second model to obtain the third fault location data and the third fault type data; Obtain the fourth fault location data and the fourth fault type data corresponding to the third fault location data and the third fault type data in the test dataset, respectively. The positioning accuracy value is determined based on the third fault location data and the fourth fault location data; The classification accuracy is determined based on the third fault type data and the fourth fault type data; Determine the first weight and the second weight corresponding to the positioning accuracy value and the classification accuracy, respectively; The test result is obtained by weighting the positioning accuracy value, the first weight, the classification accuracy, and the second weight.

[0104] Optionally, the third fault location data includes multiple third fault locations, and the fourth fault location data includes multiple fourth fault locations. In determining the positioning accuracy value based on the third fault location data and the fourth fault location data, the test module 850 is further specifically used for: Calculate the absolute value of the difference between the plurality of third fault locations and the plurality of fourth fault locations to obtain a plurality of positioning error values; Calculate the average value of the multiple positioning error values ​​to obtain the average error value; The average error value is normalized to obtain a reference error value; The positioning accuracy value is obtained by subtracting the reference error value from the preset value.

[0105] As can be seen, by performing frequency domain transformation on the training dataset and extracting the difference data, the model is iteratively updated based on the difference data, and the target model is obtained after being verified by the test dataset. This model is then used for fault cable detection, which effectively improves the accuracy and efficiency of cable fault detection.

[0106] It should be noted that the specific implementation of each operation can be described in the corresponding description of the method embodiments shown above. The cable fault detection device 800 can be used to execute the method embodiments of this application, and will not be described again here.

[0107] This application also provides a computer-readable storage medium storing a computer program for electronic data interchange, which causes a computer to perform some or all of the steps of any of the methods described in the above method embodiments, wherein the computer includes an electronic device.

[0108] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments. The computer program product may be a software installation package, and the computer may include an electronic device.

[0109] It should be noted that, for the sake of simplicity, the above embodiments are all described as a series of actions. Those skilled in the art should understand that this application is not limited to the described order of actions, as some steps in the embodiments of this application can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions, steps, modules, or units involved are not necessarily essential to the embodiments of this application.

[0110] In the above embodiments, the descriptions of each embodiment in this application have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0111] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0112] The steps of the methods or algorithms described in the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in RAM, flash memory, ROM, EPROM, electrically erasable programmable read-only memory (EEPROM), registers, hard disk, portable hard disk, read-only optical disk (CD-ROM), or any other form of storage medium well known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. Furthermore, the ASIC can reside in a terminal device or management device. Alternatively, the processor and storage medium can exist as discrete components in the terminal device or management device.

[0113] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in the embodiments of this application can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital video discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).

[0114] The modules / units included in the various devices and products described in the above embodiments can be software modules / units, hardware modules / units, or a combination of both. For example, for devices and products applied to or integrated into a chip, all modules / units can be implemented using hardware methods such as circuits, or at least some modules / units can be implemented using software programs that run on a processor integrated within the chip, while the remaining (if any) modules / units can be implemented using hardware methods such as circuits. For devices and products applied to or integrated into a chip module, all modules / units can be implemented using hardware methods such as circuits. Different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or different components of the chip module, or at least some modules / units can be implemented using hardware methods such as circuits. The implementation is achieved through a software program that runs on the processor integrated within the chip module. The remaining modules / units (if any) can be implemented using hardware methods such as circuits. For various devices and products applied to or integrated into terminal equipment, each of their modules / units can be implemented using hardware methods such as circuits. Different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or different components within the terminal equipment. Alternatively, at least some modules / units can be implemented through a software program that runs on the processor integrated within the terminal equipment, while the remaining modules / units (if any) can be implemented using hardware methods such as circuits.

[0115] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the embodiments of this application. It should be understood that the above descriptions are merely specific embodiments of the embodiments of this application and are not intended to limit the protection scope of the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solutions of the embodiments of this application should be included within the protection scope of the embodiments of this application.

Claims

1. A method of cable fault detection, characterized by, The method comprises: obtaining an original data set of a fault cable, and dividing the original data set into a training data set and a test data set according to a preset proportion; performing frequency domain conversion on the training data set to obtain a first frequency spectrum signal and a second frequency spectrum signal; performing difference processing on the first frequency spectrum signal and the second frequency spectrum signal to obtain difference data; inputting the difference data into a preset first model to obtain first data; iteratively updating the first model according to the first data to obtain a second model; testing the second model according to the test data set to obtain a test result; if the test result meets a preset test condition, determining the second model as a target model; the target model is used for detecting the fault cable.

2. The method of claim 1, wherein, The training data set comprises N signal frequencies, N first impedance imaginary parts and N second impedance imaginary parts, N is an integer greater than 1, each signal frequency corresponds to a first impedance imaginary part and a second impedance imaginary part, and the frequency domain conversion on the training data set comprises: determining N frequency times corresponding to the N signal frequencies according to a preset mapping relationship between the signal frequencies and the frequency times; determining a first frequency spectrum sequence according to the N frequency times and the N first impedance imaginary parts; determining a second frequency spectrum sequence according to the N frequency times and the N second impedance imaginary parts; performing fast Fourier transform on the first frequency spectrum sequence and the second frequency spectrum sequence respectively to obtain the first frequency spectrum signal and the second frequency spectrum signal.

3. The method of claim 2, wherein, The first frequency spectrum signal comprises N first frequency spectrum values, the second frequency spectrum signal comprises N second frequency spectrum values, and the difference processing on the first frequency spectrum signal and the second frequency spectrum signal comprises: determining N frequency components corresponding to the N first frequency spectrum values and the N second frequency spectrum values; each frequency component corresponds to a first frequency spectrum value and a second frequency spectrum value; performing difference on the first frequency spectrum value and the second frequency spectrum value corresponding to each frequency component in the N frequency components to obtain N differences; determining a reference difference sequence according to the N differences; performing normalization processing on the reference difference sequence to obtain a target difference sequence; screening data greater than a preset threshold value in the target difference sequence to obtain the difference data.

4. The method of claim 1, wherein, The inputting of the difference data into the preset first model to obtain the first data comprises: performing convolution processing and pooling processing on the difference data through a convolution layer and a pooling layer of the first model to obtain a target feature vector; determining a weight matrix, a bias vector and an activation function corresponding to a full connection layer of the first model; performing linear transformation on the target feature vector according to the weight matrix and the bias vector to obtain a first linear result; processing the first linear result according to the activation function to obtain the first data.

5. The method according to any one of claims 1 to 4, characterized in that, The first data comprises first fault position data and first fault type data, and the iteratively updating of the first model according to the first data to obtain the second model comprises: obtaining second fault location data and second fault type data corresponding to the first fault location data and the first fault type data in the training data set respectively; processing the first fault location data and the second fault location data according to a preset first loss function to obtain a first loss result; processing the first fault type data and the second fault type data according to a preset second loss function to obtain a second loss result; performing back propagation calculation according to the first loss result and the second loss result to obtain an adjustment gradient; iteratively updating first parameters of the first model according to the adjustment gradient until a preset termination condition is met, and then terminating the iteration and obtaining second parameters; adjusting the first model according to the second parameters to obtain the second model.

6. The method of claim 5, wherein, The testing of the second model according to the test data set to obtain a test result comprises: inputting the test data set into the second model to obtain third fault location data and third fault type data; obtaining fourth fault location data and fourth fault type data corresponding to the third fault location data and the third fault type data in the test data set respectively; determining a positioning accuracy value according to the third fault location data and the fourth fault location data; determining a classification accuracy according to the third fault type data and the fourth fault type data; determining a first weight and a second weight corresponding to the positioning accuracy value and the classification accuracy respectively; performing weighted calculation according to the positioning accuracy value, the first weight, the classification accuracy and the second weight to obtain the test result.

7. The method of claim 6, wherein, The third fault location data comprises a plurality of third fault locations, the fourth fault location data comprises a plurality of fourth fault locations, and the determination of the positioning accuracy value according to the third fault location data and the fourth fault location data comprises: calculating absolute values of differences between the plurality of third fault locations and the plurality of fourth fault locations to obtain a plurality of positioning error values; calculating an average value of the plurality of positioning error values to obtain an average error value; performing normalization processing on the average error value to obtain a reference error value; subtracting the reference error value from a preset value to obtain the positioning accuracy value.

8. A cable fault detection apparatus characterized by comprising: The device comprises an acquisition module, a conversion module, a processing module, an updating module, a testing module and a determination module, wherein: the acquisition module is configured to acquire an original data set of a fault cable, and divide the original data set into a training data set and a test data set according to a preset ratio; the conversion module is configured to perform frequency domain conversion on the training data set to obtain a first frequency spectrum signal and a second frequency spectrum signal; the processing module is configured to perform difference processing on the first frequency spectrum signal and the second frequency spectrum signal to obtain difference data, and input the difference data into a preset first model to obtain first data; the updating module is configured to iteratively update the first model according to the first data to obtain a second model; the testing module is configured to test the second model according to the test data set to obtain a test result; and the determination module is configured to determine a positioning accuracy value according to the third fault location data and the fourth fault location data, determine a classification accuracy according to the third fault type data and the fourth fault type data, determine a first weight and a second weight corresponding to the positioning accuracy value and the classification accuracy respectively, and perform weighted calculation according to the positioning accuracy value, the first weight, the classification accuracy and the second weight to obtain the test result. The determining module is configured to determine the second model as a target model if the test result meets a preset test condition, and the target model is used to detect the faulty cable.

9. An electronic device, comprising: Comprise: a processor, a memory, a communication interface, and one or more programs; The one or more programs are stored in the memory and configured to be executed by the processor, and the programs comprise instructions for executing steps in the method of any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program comprises program instructions, which, when executed by a processor, cause the processor to execute the method of any one of claims 1-7.