A method for identifying external force damage risk based on voiceprint
Through voiceprint recognition technology, combined with the adversarial generation network, multi-granularity honeypot optimization algorithm and latent Dirichlet allocation autoencoder, the differential random forest classifier is trained, which solves the insufficient data utilization and feature extraction difficulties in the risk detection of external force damage to transformers. problems, achieving efficient identification and classification.
Patent Information
- Application Number
- CN202410591411.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-05-14
AI Technical Summary
The existing technology has problems in detecting the risk of external force damage to transformers, such as the inability of visual monitoring systems and sensor networks to effectively identify all types of external force damage activities, insufficient data utilization, difficulty in feature extraction, poor model generalization capabilities, and low efficiency in processing large-scale data.
A voiceprint-based risk identification method is adopted to collect and mark the voiceprint data destroyed by external forces on the transformer, train an adversarial generative network model for optimal architecture search for data expansion, and use a multi-granularity honeypot optimization algorithm to extract features based on latent Dirichlet allocation. The autoencoder is used for dimensionality reduction, and a differential branch random forest classifier is trained for risk type classification.
Effectively identify threat activities to transformers, improve voiceprint feature learning capabilities, enhance feature expression and discrimination, improve the model's ability to understand data, improve classification accuracy and reduce model complexity.
Smart Images

Figure CN118173101B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of external force damage risk detection for transformers, and specifically relates to a method for identifying external force damage risk based on voiceprint. Background Art
[0002] In the current urban and rural construction and power facility management, frequent external damage to transformers is a serious problem. External damage not only leads to power supply interruption and increases maintenance costs, but may also cause more serious safety accidents, causing huge impacts on society and the economy. Therefore, improving the protection capability of transformers and timely identifying and warning the risk of external damage has become a technical problem that needs to be solved urgently.
[0003] In the existing technology, the monitoring of external force damage risks of transformers mainly relies on physical barriers, surveillance cameras and inspection personnel. However, each of these methods has its limitations. For example, physical barriers cannot completely prevent intentional acts of destruction; surveillance cameras are limited by field of view and lighting conditions, and may have blind spots, and it is challenging to identify destructive behaviors in a timely and accurate manner in massive video data; manual inspections have problems such as high cost, low efficiency, and limited coverage. In addition, with the acceleration of urbanization, construction activities around power facilities have increased, and the ability of traditional monitoring methods to distinguish normal construction from potential destructive activities has also been challenged.
[0004] The prior art has the following deficiencies:
[0005] 1. Existing monitoring methods rely on visual monitoring systems (such as cameras) or simple sensor networks, which cannot effectively identify all types of external force sabotage activities, especially in conditions of poor visibility or high ambient noise.
[0006] 2. Existing technologies fail to fully utilize the collected data and lack effective data expansion methods, resulting in limited model training samples, which affects the generalization ability and accuracy of the model.
[0007] 3. The existing technology lacks effective feature extraction technology, making it difficult to extract useful information from complex sound data, which limits the accuracy of risk identification.
[0008] 4. Due to the limitations of training data and insufficient feature extraction, the models generated by existing technologies face the problem of poor generalization ability, resulting in performance degradation when encountering unseen samples in actual applications.
[0009] 5. The lack of efficient algorithm optimization makes the existing technology inefficient in processing large-scale data and conducting real-time risk identification, making it difficult to meet the needs of rapid response in emergency situations. Summary of the invention
[0010] In view of the many technical deficiencies in the external force damage risk detection of transformers in the prior art, a method for identifying external force damage risk based on voiceprint is provided.
[0011] A method for identifying external force damage risk based on voiceprint, comprising the following steps:
[0012] Step S1: collecting voiceprint data of external force damage to the transformer, and marking the risk type of the collected voiceprint data of external force damage;
[0013] Step S2: training a generative adversarial network model based on optimal architecture search, wherein the trained generative adversarial network model based on optimal architecture search expands the voiceprint data collected in step S1 and outputs the expanded voiceprint data;
[0014] In the process of training the adversarial generative network model based on optimal architecture search, the optimal architecture search strategy is adopted to define the search space S, which contains several different configurations The adversarial generative network model, the search goal is to find the optimal configuration The evaluation function of the adversarial generative network model The value of is maximized, where , and These are all parameters of the adversarial generative network model;
[0015] Step S3: training a neural network model based on a multi-granularity honeypot optimization algorithm, wherein the trained neural network model based on a multi-granularity honeypot optimization algorithm extracts the original feature representation of the expanded voiceprint data in step S2, and outputs the original feature representation;
[0016] Step S4: training an autoencoder based on latent Dirichlet allocation, wherein the trained autoencoder based on latent Dirichlet allocation performs dimensionality reduction and reconstruction on the original feature representation in step S3, and outputs the reconstructed feature representation;
[0017] Step S5: A classifier based on a difference branch random forest is trained according to the risk type marked in step S1. The trained classifier based on a difference branch random forest classifies the reconstructed feature representation in step S4, and determines the risk type of external force damage through classification.
[0018] Further, step S1 includes:
[0019] Step S11: collecting voiceprint data of external force damage to the transformer, the collected voiceprint data format is a digital audio format, and the voiceprint data of external force damage includes the working noise of the construction machinery;
[0020] Step S12: Mark the risk type of the voiceprint data collected in step S1, where the risk types include low risk, medium risk, high risk and no risk.
[0021] Furthermore, the training in step S2 is based on the adversarial generative network model of optimal architecture search, specifically:
[0022] Step S21: Initialize the parameters of the generator G and discriminator D of the adversarial generative network model. Suppose the parameters of the generator G are , the parameters of the discriminator D are , the generator G learns the mapping function The input noise vector z is mapped to the data space to generate simulated voiceprint data. The discriminator D uses the function Evaluate the authenticity of the generated simulated voiceprint data;
[0023] Step S22: Adopt the optimal architecture search strategy and define the search space S, which contains several different configurations The adversarial generative network model, the search goal is to find the optimal configuration The evaluation function of the adversarial generative network model The value of is maximized, where ;
[0024] Step S23: In the adversarial generative network model searched in step S22, the generator loss function is defined by dynamically adjusting the loss function to balance the capabilities of the generator G and the discriminator D. , the discriminator loss function , the way to adjust the training strategy by iteratively updating the loss function is expressed as:
[0025] ;
[0026] ;
[0027] in, Express expectations, It represents the judgment of the discriminator D on the simulated voiceprint data generated by the generator G. express The probability distribution is obeyed, represents the discriminator function, represents a generator function, represents the probability distribution that z obeys;
[0028] The judgment of the discriminator D on the simulated voiceprint data generated by the generator G is expressed as:
[0029] ;
[0030] Discriminator D loss function The logarithmic term in It represents the probability that the discriminator D judges that the generated simulated voiceprint data does not belong to the real data set, and its calculation method is expressed as:
[0031] ;
[0032] Step S24: defining the evaluation function of the generated simulated voiceprint data as E(G), the evaluation function E(G) measures the similarity between the generated simulated voiceprint data and the collected voiceprint data;
[0033] Step S25: According to the evaluation results of the simulated voiceprint data generated in step S24, adjust the optimal architecture search strategy in step S22 and the generator loss function in step S23 And the discriminator loss function , and adjust the parameters of the generator G and the discriminator D. is the feedback mechanism function, which dynamically adjusts the parameters according to the result of the evaluation function E(G). The update rule is expressed as:
[0034] ;
[0035] ;
[0036] in, are the parameters of the updated generator G, is the updated parameter of the discriminator D, represents the feedback mechanism function;
[0037] The evaluation function E(G) is calculated using the FID indicator to measure the similarity between the generated simulated voiceprint data and the collected voiceprint data. The characteristic distribution of the generated simulated voiceprint data, is the characteristic distribution of the collected voiceprint data. FID is based on the mean and covariance of these two distributions, and the calculation formula is expressed as:
[0038] ;
[0039] in, and are the mean vectors of the features of the generated simulated voiceprint data and the collected voiceprint data, and They are and The corresponding covariance matrix, Tr represents the trace of the matrix;
[0040] Step S26: After iterative optimization, the generative adversarial network model is determined by optimizing the parameters, and the generator G is used to generate the expanded voiceprint data.
[0041] Furthermore, the training in step S3 is based on a neural network model of a multi-granularity honeypot optimization algorithm, specifically:
[0042] Step S31: Initializing the parameters of the neural network model based on the multi-granularity honeypot optimization algorithm, the parameters include several granularity levels, each granularity level corresponds to a different feature extraction sub-network;
[0043] Step S32: Train the feature extraction subnetwork corresponding to each granularity level separately, use the expanded voiceprint data for forward propagation and back propagation, and update the network parameters of the feature extraction subnetwork according to the preset training cycle. The feature extraction subnetwork of each granularity level is optimized independently to extract the voiceprint features at the corresponding granularity level. For each granularity level, the feature extraction process is expressed as:
[0044] ;
[0045] in, Indicates the location of the granularity level, For the Voiceprint features extracted at granular level, and Respectively The weights and biases of the feature extraction subnetworks corresponding to the granularity level, represents the Sigmoid activation function, Represents the convolution operation;
[0046] Activation Function The calculation method is expressed as:
[0047] ;
[0048] Among them, xs represents the input of the activation function, that is, Result;
[0049] Step S33: Use the honeypot optimization algorithm to select and combine the voiceprint features extracted by the corresponding feature extraction subnetworks at different granularity levels, simulate the natural selection process, evaluate the performance of different voiceprint feature combinations, and retain the best voiceprint feature combination as the original feature representation. The optimization process of the honeypot optimization algorithm to select and combine features at different granularity levels is formalized as follows:
[0050] ;
[0051] in, represents the total loss function, Indicates The loss function of the voiceprint feature at the granular level, and Respectively represent The diversity measurement function and uniqueness measurement function of voiceprint features at the granular level, , , is a hyperparameter;
[0052] Diversity metric function This is achieved by calculating the average value of the cosine similarity between the extracted voiceprint features, expressed as:
[0053] ;
[0054] Where N represents the total number of voiceprint features extracted. represents the dot product of two extracted voiceprint features, and Respectively represent the modes of the extracted voiceprint features;
[0055] Uniqueness metric function This is done by calculating the Euclidean distance between a feature vector and the average of all feature vectors, expressed as:
[0056] ;
[0057] Where N represents the total number of voiceprint features extracted. Represents the average value of all extracted voiceprint features;
[0058] Step S34: For the total loss function , use the nonlinear conjugate gradient method to optimize and update the weights and bias The process is expressed as:
[0059] ;
[0060] ;
[0061] in, and Respectively about and The gradient of is the first learning rate;
[0062] At the kth iteration, the weight update direction The calculation method is expressed as:
[0063] ;
[0064] in, is the update direction of the previous iteration, represents the second learning rate, It is calculated according to the Fletcher-Reeves formula and is expressed as:
[0065] ;
[0066] in, Indicates the total loss function at the kth iteration about gradient.
[0067] Furthermore, the training in step S4 is based on the autoencoder of latent Dirichlet allocation, specifically:
[0068] Step S41: Initialize the encoder and decoder parameters of the autoencoder, and initialize the parameters of the latent Dirichlet allocation;
[0069] Step S42: Input the original feature representation and perform feature compression through the encoder to obtain a low-dimensional representation, and generate a potential topic distribution according to the potential Dirichlet allocation. The encoding process of the encoder is expressed as:
[0070] ;
[0071] in, is the low-dimensional feature representation after encoder processing, represents the parameters of the encoder, represents the Sigmoid activation function, Represents the bias term of the encoder;
[0072] Step S43: Perform latent variable sampling based on the latent topic distribution. The latent variable represents the latent factors in the process of generating voiceprint data. The latent variable sampling is expressed as:
[0073] ;
[0074] in, represents the Dirichlet distribution, It is a function that converts the encoded features into the parameters of the Dirichlet distribution, and z represents the latent variable sampled from the Dirichlet distribution;
[0075] Step S44: The latent variables are reconstructed through the decoder. The parameters of the autoencoder are optimized by minimizing the reconstruction error and the KL divergence of the potential topic distribution to ensure that the reconstructed feature representation is close to the original feature representation and that the distribution of the latent variables is close to the prior distribution. The decoder reconstruction process is expressed as:
[0076] ;
[0077] in, The voiceprint data features reconstructed by the decoder, Represents the parameters of the decoder, represents the bias term of the decoder;
[0078] During the training process, the loss function is calculated as:
[0079] ;
[0080] ;
[0081] in, Represents the error loss between the reconstructed features and the input features, represents the original feature representation, represents the KL divergence loss, is the posterior distribution of the latent variable after the input data is given, P(z) is the prior distribution of the latent variable, Indicates KL divergence calculation;
[0082] The total loss of the autoencoder is expressed as:
[0083] ;
[0084] Among them, L represents the total loss of the autoencoder, , represents a hyperparameter;
[0085] The parameter update uses the gradient descent method to minimize the total loss. The update is expressed as:
[0086] ;
[0087] ;
[0088] ;
[0089] Among them, among them, , and represents the updated parameters, represents the third learning rate, , and Respectively about , and The updated gradient.
[0090] Furthermore, the training in step S5 is based on a random forest classifier, specifically:
[0091] Step S51: Initialize the parameters of the random forest, including the number of trees in the random forest and the maximum depth of the tree. Suppose the dataset of the reconstructed feature representation is ,in represents the reconstructed feature representation, is the corresponding label, is the total number of reconstructed feature representations, and the total number of trees in the random forest is set to T;
[0092] Step S52: for each tree t in the forest, when splitting each node, an algorithm based on difference branching is introduced to select the features and splitting points that can best increase the difference between trees;
[0093] For each tree t in the forest, a number of reconstructed feature representations are randomly sampled from the dataset D of reconstructed feature representations to form a subset , each decision node randomly selects m features when splitting, where m≤M, where M represents the total number of features;
[0094] Then, the difference branching operation is performed. When each node is split, the optimal feature and the optimal split point are selected to maximize the difference gain ΔG, which is expressed as:
[0095] ;
[0096] in, Represents the optimal feature and the optimal split point A collection of Indicates characteristics, Indicates the split point;
[0097] The differential gain ΔG is defined as:
[0098] (25);
[0099] Where G is the split gain calculated based on Gini impurity, Representation Subset The split gain, and According to the characteristics and split point The left subset and the right subset after the split;
[0100] The split gain G is calculated based on the Gini impurity. For a given dataset D, the Gini impurity is defined as:
[0101] ;
[0102] in, Represents the proportion of samples belonging to class k in the data set D, and K represents the total number of classes;
[0103] Step S53: During the tree construction process, a sparsity improvement mechanism is applied to determine whether to ignore certain features through an optimization process. In each split decision, a sparsity parameter is introduced to control the selection of features and select a feature set. , minimize the objective function including the sparsity regularization term, expressed as:
[0104] ;
[0105] in, represents the loss function based on the selected feature set F, Indicates F Norm, feature set The number of elements in represents the number of selected features. represents the sparsity parameter;
[0106] Loss Function Based on the mean square error calculation, it is defined as:
[0107] ;
[0108] in, is the feature vector of the reconstructed feature representation by the classifier based on the selected feature set F The predicted value of is the actual label value;
[0109] Step S54: Use a cross-validation method to evaluate the performance of the classifier based on the difference random forest, and adjust the classifier parameters according to the evaluation results.
[0110] The beneficial effects of the present invention are:
[0111] 1) Apply voiceprint recognition technology to the risk identification of external force damage to power facilities. By analyzing the sound data of construction machinery, activities that pose a threat to transformers can be effectively identified.
[0112] 2) The generative adversarial network algorithm based on optimal architecture search is used for data expansion, which can automatically find the generative adversarial network architecture that best suits the characteristics of voiceprint data, optimize the performance of the generated model, and improve the learning and reproduction capabilities of voiceprint features.
[0113] 3) In the feature extraction model training, a neural network algorithm based on a multi-granularity honeypot optimization algorithm is used, which can capture the features of voiceprint data at different granularity levels and enhance the expressiveness and discrimination of the features.
[0114] 4) In feature dimensionality reduction, an autoencoder structure based on latent Dirichlet allocation is adopted, so that the encoding process can take into account the potential topic distribution of the data, improving the model's ability to understand the data generation process.
[0115] 5) An improved random forest classification algorithm is proposed, which not only improves the classification accuracy but also reduces the model complexity by increasing the differences between trees and applying sparsity improvement mechanism. BRIEF DESCRIPTION OF THE DRAWINGS
[0116] Figure 1 It is a flow chart of the steps of the present invention. DETAILED DESCRIPTION
[0117] The following describes the embodiments of the present invention through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention is also implemented or applied through other different specific embodiments, and the details in this specification are also modified or changed based on different viewpoints and applications without departing from the spirit of the present invention.
[0118] In one example, if Figure 1 As shown, a method for identifying external force damage risk based on voiceprint includes the following steps:
[0119] Step S1: collecting voiceprint data of external force damage to the transformer, and marking the risk type of the collected voiceprint data of external force damage;
[0120] Step S2: training a generative adversarial network model based on optimal architecture search, wherein the trained generative adversarial network model based on optimal architecture search expands the voiceprint data collected in step S1 and outputs the expanded voiceprint data;
[0121] In the process of training the adversarial generative network model based on optimal architecture search, the optimal architecture search strategy is adopted to define the search space S, which contains several different configurations The adversarial generative network model, the search goal is to find the optimal configuration The evaluation function of the adversarial generative network model The value of is maximized, where , and These are all parameters of the adversarial generative network model;
[0122] Step S3: training a neural network model based on a multi-granularity honeypot optimization algorithm, wherein the trained neural network model based on a multi-granularity honeypot optimization algorithm extracts the original feature representation of the expanded voiceprint data in step S2, and outputs the original feature representation;
[0123] Step S4: training an autoencoder based on latent Dirichlet allocation, wherein the trained autoencoder based on latent Dirichlet allocation performs dimensionality reduction and reconstruction on the original feature representation in step S3, and outputs the reconstructed feature representation;
[0124] Step S5: A classifier based on a difference branch random forest is trained according to the risk type marked in step S1. The trained classifier based on a difference branch random forest classifies the reconstructed feature representation in step S4, and determines the risk type of external force damage through classification.
[0125] Furthermore, in one example, step S1 includes:
[0126] Step S11: collecting voiceprint data of external force damage to the transformer, the collected voiceprint data format is a digital audio format, and the voiceprint data of external force damage includes the working noise of the construction machinery;
[0127] Step S12: Mark the risk type of the voiceprint data collected in step S1, where the risk types include low risk, medium risk, high risk and no risk.
[0128] Further, in one example, the training in step S2 is based on the adversarial generative network model of optimal architecture search, specifically:
[0129] Step S21: Initialize the parameters of the generator G and discriminator D of the adversarial generative network model. Suppose the parameters of the generator G are , the parameters of the discriminator D are , the generator G learns the mapping function The input noise vector z is mapped to the data space to generate simulated voiceprint data. The discriminator D uses the function Evaluate the authenticity of the generated simulated voiceprint data;
[0130] Step S22: Adopt the optimal architecture search strategy and define the search space S, which contains several different configurations The adversarial generative network model, the search goal is to find the optimal configuration The evaluation function of the adversarial generative network model The value of is maximized, where ;
[0131] Step S23: In the adversarial generative network model searched in step S22, the generator loss function is defined by dynamically adjusting the loss function to balance the capabilities of the generator G and the discriminator D. , the discriminator loss function , the way to adjust the training strategy by iteratively updating the loss function is expressed as:
[0132] ;
[0133] ;
[0134] in, Express expectations, It represents the judgment of the discriminator D on the simulated voiceprint data generated by the generator G. express The probability distribution is obeyed, represents the discriminator function, represents a generator function, represents the probability distribution that z obeys;
[0135] The judgment of the discriminator D on the simulated voiceprint data generated by the generator G is expressed as:
[0136] ;
[0137] Discriminator D loss function The logarithmic term in It represents the probability that the discriminator D judges that the generated simulated voiceprint data does not belong to the real data set, and its calculation method is expressed as:
[0138] ;
[0139] Step S24: defining the evaluation function of the generated simulated voiceprint data as E(G), the evaluation function E(G) measures the similarity between the generated simulated voiceprint data and the collected voiceprint data;
[0140] Step S25: According to the evaluation results of the simulated voiceprint data generated in step S24, adjust the optimal architecture search strategy in step S22 and the generator loss function in step S23 And the discriminator loss function , and adjust the parameters of the generator G and the discriminator D. is the feedback mechanism function, which dynamically adjusts the parameters according to the result of the evaluation function E(G). The update rule is expressed as:
[0141] ;
[0142] ;
[0143] in, are the parameters of the updated generator G, is the updated parameter of the discriminator D, represents the feedback mechanism function;
[0144] The evaluation function E(G) is calculated using the FID indicator to measure the similarity between the generated simulated voiceprint data and the collected voiceprint data. The characteristic distribution of the generated simulated voiceprint data, is the characteristic distribution of the collected voiceprint data. FID is based on the mean and covariance of these two distributions, and the calculation formula is expressed as:
[0145] ;
[0146] in, and are the mean vectors of the features of the generated simulated voiceprint data and the collected voiceprint data, and They are and The corresponding covariance matrix, Tr represents the trace of the matrix;
[0147] Step S26: After iterative optimization, the generative adversarial network model is determined by optimizing the parameters, and the generator G is used to generate the expanded voiceprint data.
[0148] Furthermore, in one example, the training in step S3 is based on a neural network model of a multi-granularity honeypot optimization algorithm, specifically:
[0149] Step S31: Initializing the parameters of the neural network model based on the multi-granularity honeypot optimization algorithm, the parameters include several granularity levels, each granularity level corresponds to a different feature extraction sub-network;
[0150] Step S32: Train the feature extraction subnetwork corresponding to each granularity level separately, use the expanded voiceprint data for forward propagation and back propagation, and update the network parameters of the feature extraction subnetwork according to the preset training cycle. The feature extraction subnetwork of each granularity level is optimized independently to extract the voiceprint features at the corresponding granularity level. For each granularity level, the feature extraction process is expressed as:
[0151] ;
[0152] in, Indicates the location of the granularity level, For the Voiceprint features extracted at granular level, and Respectively The weights and biases of the feature extraction subnetworks corresponding to the granularity level, represents the Sigmoid activation function, Represents the convolution operation;
[0153] Activation Function The calculation method is expressed as:
[0154] ;
[0155] Among them, xs represents the input of the activation function, that is, Result;
[0156] Step S33: Use the honeypot optimization algorithm to select and combine the voiceprint features extracted by the corresponding feature extraction subnetworks at different granularity levels, simulate the natural selection process, evaluate the performance of different voiceprint feature combinations, and retain the best voiceprint feature combination as the original feature representation. The optimization process of the honeypot optimization algorithm to select and combine features at different granularity levels is formalized as follows:
[0157] ;
[0158] in, represents the total loss function, Indicates The loss function of the voiceprint feature at the granular level, and Respectively represent The diversity measurement function and uniqueness measurement function of voiceprint features at the granular level, , , is a hyperparameter;
[0159] Diversity metric function This is achieved by calculating the average value of the cosine similarity between the extracted voiceprint features, expressed as:
[0160] ;
[0161] Where N represents the total number of voiceprint features extracted. represents the dot product of two extracted voiceprint features, and Respectively represent the modes of the extracted voiceprint features;
[0162] Uniqueness metric function This is done by calculating the Euclidean distance between a feature vector and the average of all feature vectors, expressed as:
[0163] ;
[0164] Where N represents the total number of voiceprint features extracted. Represents the average value of all extracted voiceprint features;
[0165] Step S34: For the total loss function , use the nonlinear conjugate gradient method to optimize and update the weights and bias The process is expressed as:
[0166] ;
[0167] ;
[0168] in, and Respectively about and The gradient of is the first learning rate;
[0169] At the kth iteration, the weight update direction The calculation method is expressed as:
[0170] ;
[0171] in, is the update direction of the previous iteration, represents the second learning rate, It is calculated according to the Fletcher-Reeves formula and is expressed as:
[0172] ;
[0173] in, Indicates the total loss function at the kth iteration about gradient.
[0174] Further, in one example, the training in step S4 is based on the autoencoder of latent Dirichlet allocation, specifically:
[0175] Step S41: Initialize the encoder and decoder parameters of the autoencoder, and initialize the parameters of the latent Dirichlet allocation;
[0176] Step S42: Input the original feature representation and perform feature compression through the encoder to obtain a low-dimensional representation, and generate a potential topic distribution according to the potential Dirichlet allocation. The encoding process of the encoder is expressed as:
[0177] ;
[0178] in, is the low-dimensional feature representation after encoder processing, represents the parameters of the encoder, represents the Sigmoid activation function, Represents the bias term of the encoder;
[0179] Step S43: Perform latent variable sampling based on the latent topic distribution. The latent variable represents the latent factors in the process of generating voiceprint data. The latent variable sampling is expressed as:
[0180] ;
[0181] in, represents the Dirichlet distribution, It is a function that converts the encoded features into the parameters of the Dirichlet distribution, and z represents the latent variable sampled from the Dirichlet distribution;
[0182] Step S44: The latent variables are reconstructed through the decoder. The parameters of the autoencoder are optimized by minimizing the reconstruction error and the KL divergence of the potential topic distribution to ensure that the reconstructed feature representation is close to the original feature representation and that the distribution of the latent variables is close to the prior distribution. The decoder reconstruction process is expressed as:
[0183] ;
[0184] in, The voiceprint data features reconstructed by the decoder, Represents the parameters of the decoder, represents the bias term of the decoder;
[0185] During the training process, the loss function is calculated as:
[0186] ;
[0187] ;
[0188] in, Represents the error loss between the reconstructed features and the input features, represents the original feature representation, represents the KL divergence loss, is the posterior distribution of the latent variable after the input data is given, P(z) is the prior distribution of the latent variable, Indicates KL divergence calculation;
[0189] The total loss of the autoencoder is expressed as:
[0190] ;
[0191] Among them, L represents the total loss of the autoencoder, , represents a hyperparameter;
[0192] The parameter update uses the gradient descent method to minimize the total loss. The update is expressed as:
[0193] ;
[0194] ;
[0195] ;
[0196] Among them, among them, , and represents the updated parameters, represents the third learning rate, , and Respectively about , and The updated gradient.
[0197] Furthermore, in one example, the training in step S5 is based on a random forest classifier, specifically:
[0198] Step S51: Initialize the parameters of the random forest, including the number of trees in the random forest and the maximum depth of the tree. Suppose the dataset of the reconstructed feature representation is ,in represents the reconstructed feature representation, is the corresponding label, is the total number of reconstructed feature representations, and the total number of trees in the random forest is set to T;
[0199] Step S52: for each tree t in the forest, when splitting each node, an algorithm based on difference branching is introduced to select the features and splitting points that can best increase the difference between trees;
[0200] For each tree t in the forest, a number of reconstructed feature representations are randomly sampled from the dataset D of reconstructed feature representations to form a subset , each decision node randomly selects m features when splitting, where m≤M, where M represents the total number of features;
[0201] Then, the difference branching operation is performed. When each node is split, the optimal feature and the optimal split point are selected to maximize the difference gain ΔG, which is expressed as:
[0202] ;
[0203] in, Represents the optimal feature and the optimal split point A collection of Indicates characteristics, Indicates the split point;
[0204] The differential gain ΔG is defined as:
[0205] ;
[0206] Where G is the split gain calculated based on Gini impurity, Representation Subset The split gain, and According to the characteristics and split point The left subset and the right subset after the split;
[0207] The split gain G is calculated based on the Gini impurity. For a given dataset D, the Gini impurity is defined as:
[0208] ;
[0209] in, Represents the proportion of samples belonging to class k in the data set D, and K represents the total number of classes;
[0210] Step S53: During the tree construction process, a sparsity improvement mechanism is applied to determine whether to ignore certain features through an optimization process. In each split decision, a sparsity parameter is introduced to control the selection of features and select a feature set. , minimize the objective function including the sparsity regularization term, expressed as:
[0211] ;
[0212] in, represents the loss function based on the selected feature set F, Indicates F Norm, feature set The number of elements in represents the number of selected features. represents the sparsity parameter;
[0213] Loss Function Based on the mean square error calculation, it is defined as:
[0214] ;
[0215] in, is the feature vector of the reconstructed feature representation by the classifier based on the selected feature set F The predicted value of is the actual label value;
[0216] Step S54: Use a cross-validation method to evaluate the performance of the classifier based on the difference random forest, and adjust the classifier parameters according to the evaluation results.
[0217] The present invention is described in detail above in conjunction with the embodiments of the accompanying drawings. A person skilled in the art can make various variations of the present invention according to the above description. Therefore, some details in the embodiments should not be construed as limiting the present invention, and the present invention shall be protected by the scope defined by the attached claims.
Claims
1. A method for identifying external force damage risk based on voiceprint, characterized in that: The following steps are involved: Step S1: collecting voiceprint data of external force damage to the transformer, and marking the risk type of the collected voiceprint data of external force damage; Step S2: training a generative adversarial network model based on optimal architecture search, wherein the trained generative adversarial network model based on optimal architecture search expands the voiceprint data collected in step S1 and outputs the expanded voiceprint data; In the process of training the adversarial generative network model based on optimal architecture search, the optimal architecture search strategy is adopted to define the search space S, which contains several different configurations The adversarial generative network model, the search goal is to find the optimal configuration The evaluation function of the adversarial generative network model The value of is maximized, where , and These are all parameters of the adversarial generative network model; Step S3: training a neural network model based on a multi-granularity honeypot optimization algorithm, wherein the trained neural network model based on a multi-granularity honeypot optimization algorithm extracts the original feature representation of the expanded voiceprint data in step S2, and outputs the original feature representation; Step S4: training an autoencoder based on latent Dirichlet allocation, wherein the trained autoencoder based on latent Dirichlet allocation performs dimensionality reduction and reconstruction on the original feature representation in step S3, and outputs the reconstructed feature representation; Step S5: training a classifier based on a difference branch random forest according to the risk type marked in step S1, and classifying the reconstructed feature representation in step S4 by the trained classifier based on a difference branch random forest, and determining the risk type of external force damage by classification; The training in step S2 is based on the adversarial generative network model of optimal architecture search, specifically: Step S21: Initialize the parameters of the generator G and discriminator D of the adversarial generative network model. Suppose the parameters of the generator G are , the parameters of the discriminator D are , the generator G learns the mapping function The input noise vector z is mapped to the data space to generate simulated voiceprint data. The discriminator D uses the function Evaluate the authenticity of the generated simulated voiceprint data; Step S22: Adopt the optimal architecture search strategy and define the search space S, which contains several different configurations The adversarial generative network model, the search goal is to find the optimal configuration The evaluation function of the adversarial generative network model The value of is maximized, where ; Step S23: In the adversarial generative network model searched in step S22, the generator loss function is defined by dynamically adjusting the loss function to balance the capabilities of the generator G and the discriminator D. , the discriminator loss function , the way to adjust the training strategy by iteratively updating the loss function is expressed as: ; ; in, Express expectations, It represents the judgment of the discriminator D on the simulated voiceprint data generated by the generator G. express The probability distribution is obeyed, represents the discriminator function, represents a generator function, represents the probability distribution that z obeys; The judgment of the discriminator D on the simulated voiceprint data generated by the generator G is expressed as: ; Discriminator D loss function The logarithmic term in It represents the probability that the discriminator D judges that the generated simulated voiceprint data does not belong to the real data set, and its calculation method is expressed as: ; Step S24: defining the evaluation function of the generated simulated voiceprint data as E(G), the evaluation function E(G) measures the similarity between the generated simulated voiceprint data and the collected voiceprint data; Step S25: According to the evaluation results of the simulated voiceprint data generated in step S24, adjust the optimal architecture search strategy in step S22 and the generator loss function in step S23 And the discriminator loss function , and adjust the parameters of the generator G and the discriminator D. is the feedback mechanism function, which dynamically adjusts the parameters according to the result of the evaluation function E(G). The update rule is expressed as: ; ; in, are the parameters of the updated generator G, is the updated parameter of the discriminator D, represents the feedback mechanism function; The evaluation function E(G) is calculated using the FID indicator to measure the similarity between the generated simulated voiceprint data and the collected voiceprint data. is the characteristic distribution of the generated simulated voiceprint data, is the characteristic distribution of the collected voiceprint data. FID is based on the mean and covariance of these two distributions, and the calculation formula is expressed as: ; in, and are the mean vectors of the features of the generated simulated voiceprint data and the collected voiceprint data, and They are and The corresponding covariance matrix, Tr represents the trace of the matrix; Step S26: After iterative optimization, the generative adversarial network model is determined by optimizing the parameters, and the generator G is used to generate the expanded voiceprint data; The training in step S3 is based on a neural network model of a multi-granularity honeypot optimization algorithm, specifically: Step S31: Initializing the parameters of the neural network model based on the multi-granularity honeypot optimization algorithm, the parameters include several granularity levels, each granularity level corresponds to a different feature extraction sub-network; Step S32: Train the feature extraction subnetwork corresponding to each granularity level separately, use the expanded voiceprint data for forward propagation and back propagation, and update the network parameters of the feature extraction subnetwork according to the preset training cycle. The feature extraction subnetwork of each granularity level is optimized independently to extract the voiceprint features at the corresponding granularity level. For each granularity level, the feature extraction process is expressed as: ; in, Indicates the location of the granularity level, For the Voiceprint features extracted at granular level, and Respectively The weights and biases of the feature extraction subnetworks corresponding to the granularity level, represents the Sigmoid activation function, Represents the convolution operation; Activation Function The calculation method is expressed as: ; Among them, xs represents the activation function The input, that is Result; Step S33: Use the honeypot optimization algorithm to select and combine the voiceprint features extracted by the corresponding feature extraction subnetworks at different granularity levels, simulate the natural selection process, evaluate the performance of different voiceprint feature combinations, and retain the best voiceprint feature combination as the original feature representation. The optimization process of the honeypot optimization algorithm to select and combine features at different granularity levels is formalized as follows: ; in, represents the total loss function, Indicates The loss function of the voiceprint feature at the granular level, and Respectively represent The diversity measurement function and uniqueness measurement function of voiceprint features at the granular level, , , is a hyperparameter; Diversity metric function This is achieved by calculating the average value of the cosine similarity between the extracted voiceprint features, expressed as: ; Where N represents the total number of voiceprint features extracted. represents the dot product of two extracted voiceprint features, and Respectively represent the modes of the extracted voiceprint features; Uniqueness metric function This is done by calculating the Euclidean distance between a feature vector and the average of all feature vectors, expressed as: ; Where N represents the total number of voiceprint features extracted. Represents the average value of all extracted voiceprint features; Step S34: For the total loss function , use the nonlinear conjugate gradient method to optimize and update the weights and bias The process is expressed as: ; ; in, and Respectively about and The gradient of is the first learning rate; At the kth iteration, the weight update direction The calculation method is expressed as: ; in, is the update direction of the previous iteration, represents the second learning rate, It is calculated according to the Fletcher-Reeves formula and is expressed as: ; in, Indicates the total loss function at the kth iteration about The gradient of The training of the random forest classifier based on the difference branch in step S5 is specifically as follows: Step S51: Initialize the parameters of the random forest, including the number of trees in the random forest and the maximum depth of the tree. Suppose the dataset of the reconstructed feature representation is ,in represents the reconstructed feature representation, is the corresponding label, is the total number of reconstructed feature representations, and the total number of trees in the random forest is set to T; Step S52: for each tree t in the forest, when splitting each node, an algorithm based on difference branching is introduced to select the features and splitting points that can best increase the difference between trees; For each tree t in the forest, a number of reconstructed feature representations are randomly sampled from the dataset D of reconstructed feature representations to form a subset , each decision node randomly selects m features when splitting, where m≤M, where M represents the total number of features; Then, the difference branching operation is performed. When each node is split, the optimal feature and the optimal split point are selected to maximize the difference gain ΔG, which is expressed as: ; in, Represents the optimal feature and the optimal split point A collection of Indicates characteristics, Indicates the split point; The differential gain ΔG is defined as: ; Where G is the split gain calculated based on Gini impurity, Representation Subset The split gain, and According to the characteristics and split point The left subset and the right subset after the split; The split gain G is calculated based on the Gini impurity. For a given dataset D, the Gini impurity is defined as: ; in, Represents the proportion of samples belonging to class k in the data set D, and K represents the total number of classes; Step S53: During the tree construction process, a sparsity improvement mechanism is applied to determine whether to ignore certain features through an optimization process. In each split decision, a sparsity parameter is introduced to control the selection of features and select a feature set. , minimize the objective function including the sparsity regularization term, expressed as: ; in, represents the loss function based on the selected feature set F, Indicates F Norm, feature set The number of elements in represents the number of selected features. represents the sparsity parameter; Loss Function Based on the mean square error calculation, it is defined as: ; in, is the feature vector of the reconstructed feature representation by the classifier based on the selected feature set F The predicted value of is the actual label value; Step S54: Use a cross-validation method to evaluate the performance of the classifier based on the difference random forest, and adjust the classifier parameters according to the evaluation results.
2. The method for identifying external force damage risk based on voiceprint according to claim 1, characterized in that: Step S1 includes: Step S11: collecting voiceprint data of external force damage to the transformer, the collected voiceprint data format is a digital audio format, and the voiceprint data of external force damage includes the working noise of the construction machinery; Step S12: Mark the risk type of the voiceprint data collected in step S1, where the risk types include low risk, medium risk, high risk and no risk.
3. The method for identifying external force damage risk based on voiceprint according to claim 1, characterized in that: The training in step S4 is based on the autoencoder with latent Dirichlet allocation, specifically: Step S41: Initialize the encoder and decoder parameters of the autoencoder, and initialize the parameters of the latent Dirichlet allocation; Step S42: Input the original feature representation and perform feature compression through the encoder to obtain a low-dimensional representation, and generate a potential topic distribution according to the potential Dirichlet allocation. The encoding process of the encoder is expressed as: ; in, is the low-dimensional feature representation after encoder processing, represents the parameters of the encoder, represents the Sigmoid activation function, Represents the bias term of the encoder; Step S43: Perform latent variable sampling based on the latent topic distribution. The latent variable represents the latent factors in the process of generating voiceprint data. The latent variable sampling is expressed as: ; in, represents the Dirichlet distribution, It is a function that converts the encoded features into the parameters of the Dirichlet distribution, and z represents the latent variable sampled from the Dirichlet distribution; Step S44: The latent variables are reconstructed through the decoder. The parameters of the autoencoder are optimized by minimizing the reconstruction error and the KL divergence of the potential topic distribution to ensure that the reconstructed feature representation is close to the original feature representation and that the distribution of the latent variables is close to the prior distribution. The decoder reconstruction process is expressed as: ; in, The voiceprint data features reconstructed by the decoder, Represents the parameters of the decoder, represents the bias term of the decoder; During the training process, the loss function is calculated as: ; ; in, Represents the error loss between the reconstructed features and the input features, represents the original feature representation, represents the KL divergence loss, is the posterior distribution of the hidden variable after the input data is given, P(z) is the prior distribution of the hidden variable, Indicates KL divergence calculation; The total loss of the autoencoder is expressed as: ; Among them, L represents the total loss of the autoencoder, , represents a hyperparameter; The parameter update uses the gradient descent method to minimize the total loss of the autoencoder. The update is expressed as: ; ; ; in, , and represents the updated parameters, represents the third learning rate, , and Respectively about , and The updated gradient.
