Gas molecule insulation strength prediction method and device based on graph attention neural network, terminal equipment and storage medium

Through the method based on the graph attention neural network, the molecular structure diagram of gas molecules is constructed and their insulation strength is predicted, which solves the problem of relying on expert knowledge for gas insulation performance evaluation in the prior art, and achieves efficient and accurate prediction of gas molecules insulation strength.

CN119626349AActive Publication Date: 2025-03-14GUANGDONG POWER GRID CO LTD +1

Patent Information

Application Number
CN202411747166.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-14
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

The prior art relies heavily on expert knowledge and experience in evaluating gas insulation properties, resulting in limited research progress and low efficiency in predicting insulation strength of unknown gas molecules.

Method used

Using a graph-based attention neural network method, a molecular structure diagram of gas molecules is constructed, and a preset insulation strength prediction model is used to predict based on atomic and chemical bond characteristics, and the average value of the two predicted values ​​is calculated to obtain the insulation strength prediction value of gas molecules.

Benefits of technology

It reduces the human resources required for prediction of gas molecules' insulation strength, improves the accuracy of prediction results, and can quickly predict the insulation strength of gas molecules without conducting a large number of manual experiments and data analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119626349A_ABST
    Figure CN119626349A_ABST
Patent Text Reader

Abstract

The invention discloses a gas molecule insulation strength prediction method and device based on a graph attention neural network, terminal equipment and a storage medium, and the method comprises the steps: obtaining the molecular structure information of a to-be-detected gas molecule, and constructing a molecular structure graph; respectively inputting the molecular structure diagram into a preset first insulation strength prediction model and a preset second insulation strength prediction model to obtain a first insulation strength prediction value and a second insulation strength prediction value; and calculating an average value of the first insulation strength predicted value and the second insulation strength predicted value to obtain an insulation strength predicted value of the to-be-detected gas molecule. Through the implementation of the method, a large number of manual experiments and data analysis based on expert knowledge and expert experience do not need to be carried out on unknown gas molecules in the prediction process of the insulation strength of the unknown gas molecules, the restriction of human resources in the work of predicting the insulation strength of the gas molecules is reduced, and the prediction efficiency is improved. And the accuracy of the insulation strength prediction result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of gas molecule insulation strength prediction, and in particular to a gas molecule insulation strength prediction method, device, terminal equipment and storage medium based on a graph attention neural network. Background Art

[0002] Globally, as awareness of climate change and environmental protection increases, SF6, as a commonly used insulating gas, is widely used in power equipment. However, SF6 has a very high global warming potential, and its greenhouse effect is 25,200 times that of carbon dioxide. Therefore, the development of environmentally friendly alternative insulating gases has become a hot topic in current research.

[0003] Previously, many related studies at home and abroad mostly used traditional experimental methods. Traditional experimental methods require testing candidate gases one by one to evaluate their insulation properties. The gas development process of this method, from the design and implementation of the experiment to the analysis and interpretation of the data, is highly dependent on the expert knowledge and experience of researchers. However, high-level expert resources are limited, and over-reliance on expert knowledge means that research progress is constrained by human resources. Summary of the invention

[0004] The present invention provides a method, device, terminal device and storage medium for predicting the insulation strength of gas molecules based on a graph attention neural network. In the process of predicting the insulation strength of unknown gas molecules, there is no need to perform a large number of manual experiments and data analysis based on expert knowledge and expert experience, which reduces the constraints of human resources in predicting the insulation strength of gas molecules and improves the accuracy of the insulation strength prediction results.

[0005] An embodiment of the present invention provides a method for predicting the dielectric strength of gas molecules based on a graph attention neural network, comprising:

[0006] Obtaining molecular structure information of the gas molecules to be measured; wherein the molecular structure information includes: atoms and chemical bonds;

[0007] According to the molecular structure information, a molecular structure graph is constructed; wherein the nodes in the molecular structure graph represent the atoms, and the edges represent the chemical bonds;

[0008] The molecular structure diagram is input into a preset first insulation strength prediction model and a preset second insulation strength prediction model constructed based on a graph attention neural network, respectively, so that the preset first insulation strength prediction model obtains atomic features according to the molecular structure diagram, and obtains a first insulation strength prediction value according to the atoms and the atomic features, and the preset second insulation strength prediction model obtains chemical bond features according to the molecular structure diagram, and obtains a second insulation strength prediction value according to the chemical bonds and the chemical bond features; wherein the atomic features include: atom type, valence electron number and hybridization type; the chemical bond features include: chemical bond type, conjugation type and stereochemical coding;

[0009] The average value of the first insulation strength prediction value and the second insulation strength prediction value is calculated to obtain the insulation strength prediction value of the gas molecule to be measured.

[0010] Furthermore, the training of the preset first insulation strength prediction model includes:

[0011] Obtaining sample molecular structure information of a number of sample gas molecules with real labels; wherein the real labels are used to represent the actual insulation strength of the sample gas molecules;

[0012] Constructing a sample molecular structure diagram of the sample gas molecules according to the sample molecular structure information;

[0013] Input the sample molecular structure diagram into the first insulation strength prediction model to be trained, so that the first insulation strength prediction model to be trained obtains the sample atomic features according to the sample molecular structure diagram, and obtains the sample gas molecules corresponding to the sample molecular structure diagram according to the sample atomic features and the atoms in the sample molecular structure diagram, and the first sample insulation strength prediction value predicted by the first insulation strength prediction model to be trained;

[0014] Calculating a first loss function value between the first sample insulation strength prediction value and the true label;

[0015] Determine whether the above-mentioned first loss function value converges; if so, the training of the above-mentioned first insulation strength prediction model is completed, and the above-mentioned preset first insulation strength prediction model is obtained; if not, calculate the first gradient of the parameters in the above-mentioned first insulation strength prediction model to optimize the parameters in the above-mentioned first insulation strength prediction model according to the above-mentioned first gradient, and continue to train the first insulation strength prediction model to be trained.

[0016] Furthermore, the training of the preset second insulation strength prediction model includes:

[0017] Inputting the sample molecular structure diagram into the second insulation strength prediction model to be trained, so that the second insulation strength prediction model to be trained obtains the sample chemical bond characteristics according to the sample molecular structure diagram, and obtains the sample gas molecules corresponding to the sample molecular structure diagram according to the sample chemical bond characteristics and the chemical bonds in the sample molecular structure diagram, and the second sample insulation strength prediction value predicted by the second insulation strength prediction model to be trained;

[0018] Calculating a second loss function value between the second sample insulation strength prediction value and the true label;

[0019] Determine whether the above-mentioned second loss function value converges; if so, the training of the above-mentioned second insulation strength prediction model is completed, and the above-mentioned preset second insulation strength prediction model is obtained; if not, calculate the second gradient of the parameters in the above-mentioned second insulation strength prediction model to optimize the parameters in the above-mentioned second insulation strength prediction model according to the above-mentioned second gradient, and continue to train the second insulation strength prediction model to be trained.

[0020] Furthermore, after obtaining the above molecular structure information, it also includes:

[0021] According to the above molecular structure information, the relative position of each atom is calculated;

[0022] According to the above atoms and chemical bonds, the element label of each atom and the type edge corresponding to each chemical bond are obtained from the preset index library;

[0023] Add nodes to the first canvas subgraph according to the above relative positions, and add the above element labels to each node;

[0024] The corresponding two nodes are connected by edges of various types to obtain the basic molecular structure diagram of the gas molecules, and the basic molecular structure diagram is displayed on the first canvas sub-graph.

[0025] Furthermore, after obtaining the first insulation strength prediction value and the second insulation strength prediction value, the method further includes:

[0026] According to the back propagation algorithm, the atomic feature gradient of the atomic feature corresponding to the first insulation strength prediction value and the chemical bond feature gradient of the chemical bond feature corresponding to the second insulation strength prediction value are calculated, and the atomic feature gradient and the chemical bond feature gradient are normalized respectively to obtain a normalized atomic feature gradient and a normalized chemical bond feature gradient;

[0027] According to the preset gradient color mapping function, the normalized atomic feature gradient and the normalized chemical bond feature gradient, the color corresponding to each node and each type of edge on the basic molecular structure diagram is determined, and then the corresponding color is added to each node and each type of edge on the basic molecular structure diagram to obtain a molecular importance visualization diagram;

[0028] The above molecular importance visualization is displayed on the second canvas sub-graph.

[0029] Based on the above method embodiment, the present invention provides a corresponding device embodiment;

[0030] The present invention provides a gas molecule dielectric strength prediction device based on a graph attention neural network, comprising:

[0031] Molecular structure acquisition module, molecular structure diagram construction module, model prediction module and insulation strength calculation module;

[0032] The molecular structure acquisition module is used to acquire molecular structure information of the gas molecules to be measured; wherein the molecular structure information includes: atoms and chemical bonds;

[0033] The molecular structure graph construction module is used to construct a molecular structure graph according to the molecular structure information; wherein the nodes in the molecular structure graph represent the atoms, and the edges represent the chemical bonds;

[0034] The model prediction module is used to input the molecular structure diagram into a preset first insulation strength prediction model and a preset second insulation strength prediction model constructed based on a graph attention neural network, respectively, so that the preset first insulation strength prediction model obtains atomic features according to the molecular structure diagram, and obtains a first insulation strength prediction value according to the atoms and the atomic features, and the preset second insulation strength prediction model obtains chemical bond features according to the molecular structure diagram, and obtains a second insulation strength prediction value according to the chemical bonds and the chemical bond features; wherein the atomic features include: atom type, valence electron number and hybridization type; the chemical bond features include: chemical bond type, conjugation type and stereochemical coding;

[0035] The insulation strength calculation module is used to calculate the average value of the first insulation strength prediction value and the second insulation strength prediction value to obtain the insulation strength prediction value of the gas molecule to be measured.

[0036] Furthermore, it also includes: a basic molecular structure diagram display module;

[0037] The above-mentioned basic molecular structure diagram display module is used to calculate the relative position of each atom according to the above-mentioned molecular structure information; obtain the element label of each atom and the type edge corresponding to each chemical bond from the preset index library according to the above-mentioned atoms and chemical bonds; add nodes on the first canvas sub-graph according to the above-mentioned relative positions, and add the above-mentioned element labels on each node; connect the corresponding two nodes through each type of edge to obtain the basic molecular structure diagram of the above-mentioned gas molecules, and display the above-mentioned basic molecular structure diagram on the above-mentioned first canvas sub-graph.

[0038] Further, it also includes: a molecular importance visualization diagram display module;

[0039] The above-mentioned molecular importance visualization diagram display module is used to calculate the atomic feature gradient of the atomic feature corresponding to the above-mentioned first insulation strength prediction value and the chemical bond feature gradient of the chemical bond feature corresponding to the above-mentioned second insulation strength prediction value according to the back propagation algorithm, and normalize the above-mentioned atomic feature gradient and the above-mentioned chemical bond feature gradient respectively to obtain the normalized atomic feature gradient and the normalized chemical bond feature gradient; determine the color corresponding to each node and each type of edge on the above-mentioned basic molecular structure diagram according to the preset gradient color mapping function, the above-mentioned normalized atomic feature gradient and the above-mentioned normalized chemical bond feature gradient, and then add the corresponding color to each node and each type of edge on the above-mentioned basic molecular structure diagram to obtain a molecular importance visualization diagram; display the above-mentioned molecular importance visualization diagram on the second canvas sub-graph.

[0040] Based on the above method embodiment, the present invention provides a terminal device embodiment;

[0041] The present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the method for predicting the insulating strength of gas molecules based on a graph attention neural network according to any embodiment of the present invention is implemented.

[0042] Based on the above method embodiment, the present invention provides a storage medium embodiment;

[0043] The present invention provides a storage medium, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the method for predicting the insulating strength of gas molecules based on a graph attention neural network according to any embodiment of the present invention is implemented.

[0044] The embodiments of the present invention have the following beneficial effects:

[0045] The present invention provides a method for evaluating transient stability of a power system based on phase area. The method first obtains molecular structure information of the gas molecule to be tested; wherein the molecular structure information includes atoms and chemical bonds; then, a molecular structure graph is constructed based on the molecular structure information; wherein the nodes in the molecular structure graph represent the atoms and the edges represent the chemical bonds; then, the molecular structure graph is respectively input into a preset first insulation strength prediction model constructed based on a graph attention neural network, and a preset second insulation strength prediction model, so that the preset first insulation strength prediction model obtains atomic features according to the molecular structure graph, and obtains a first insulation strength prediction value according to the atoms and the atomic features, and the preset second insulation strength prediction model obtains chemical bond features according to the molecular structure graph, and obtains a second insulation strength prediction value according to the chemical bonds and the chemical bond features; wherein the atomic features include atomic type, valence electron number and hybridization type; the chemical bond features include chemical bond type, conjugation type and stereochemical coding; finally, the average of the first insulation strength prediction value and the second insulation strength prediction value is calculated to obtain the insulation strength prediction value of the gas molecule to be tested. Therefore, the present invention utilizes two preset insulation strength prediction models constructed based on the graph attention neural network model to make predictions based on the atoms and chemical bonds in the gas molecule structure diagram to be tested, respectively, and then takes the average of the two insulation strength prediction values ​​as the final insulation strength prediction result. This eliminates the need for a large number of manual experiments and data analyses based on expert knowledge and experience on the gas molecules to be tested during the entire prediction process, thereby reducing the constraints on human resources in predicting the insulation strength of gas molecules and improving the accuracy of insulation strength prediction results. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a flow chart of a method for predicting the dielectric strength of gas molecules based on a graph attention neural network provided by one embodiment of the present invention.

[0047] Figure 2 It is a structural schematic diagram of a gas molecule dielectric strength prediction device based on a graph attention neural network provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0048] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] like Figure 1As shown, an embodiment of the present invention provides a method for predicting the dielectric strength of gas molecules based on a graph attention neural network, comprising:

[0050] Step S101: obtaining molecular structure information of the gas molecules to be tested; wherein the molecular structure information includes atoms and chemical bonds;

[0051] Specifically, the molecular mechanical energy of the gas to be tested can be related to the experiment to obtain the molecular structure information, wherein the molecular structure information is a SMILES code.

[0052] In a preferred embodiment, after obtaining the above molecular structure information, the method further includes:

[0053] According to the above molecular structure information, the relative position of each atom is calculated;

[0054] According to the above atoms and chemical bonds, the element label of each atom and the type edge corresponding to each chemical bond are obtained from the preset index library;

[0055] Add nodes to the first canvas subgraph according to the above relative positions, and add the above element labels to each node;

[0056] The corresponding two nodes are connected by edges of various types to obtain the basic molecular structure diagram of the gas molecules, and the basic molecular structure diagram is displayed on the first canvas sub-graph.

[0057] Specifically, the canvas is divided into subgraphs of 1 row and 2 columns. The basic molecular structure diagram is drawn in the first subgraph. The spring layout algorithm is used to calculate the position of the nodes. The node index and chemical bond index are used to draw the nodes with element labels and connect them with edges with different chemical bond types.

[0058] In this preferred embodiment, the relative positions of atoms in the molecule are calculated using the spring layout algorithm, and element labels and type edges are added using node indexes and chemical bond indexes. Each type edge corresponds to a chemical bond, and the nodes are connected using type edges to obtain a basic molecular structure diagram.

[0059] Step S102: constructing a molecular structure graph according to the molecular structure information; wherein the nodes in the molecular structure graph represent the atoms, and the edges represent the chemical bonds;

[0060] Specifically, based on the atoms and chemical bonds of the gas molecules, Gou Jin obtained a molecular structure diagram, and in the molecular structure diagram, each node represents an atom, and each edge represents a chemical bond.

[0061] Step S103: inputting the molecular structure diagram into a preset first insulation strength prediction model and a preset second insulation strength prediction model constructed based on a graph attention neural network, respectively, so that the preset first insulation strength prediction model obtains atomic features according to the molecular structure diagram, and obtains a first insulation strength prediction value according to the atoms and the atomic features, and the preset second insulation strength prediction model obtains chemical bond features according to the molecular structure diagram, and obtains a second insulation strength prediction value according to the chemical bonds and the chemical bond features; wherein the atomic features include: atom type, valence electron number and hybridization type; the chemical bond features include: chemical bond type, conjugation type and stereochemical coding;

[0062] Specifically, the chemical bond types in the above chemical bond characteristics include single bonds, double bonds, etc.

[0063] In a preferred embodiment, the training of the preset first insulation strength prediction model includes:

[0064] Obtaining sample molecular structure information of a number of sample gas molecules with real labels; wherein the real labels are used to represent the actual insulation strength of the sample gas molecules;

[0065] Constructing a sample molecular structure diagram of the sample gas molecules according to the sample molecular structure information;

[0066] Input the sample molecular structure diagram into the first insulation strength prediction model to be trained, so that the first insulation strength prediction model to be trained obtains the sample atomic features according to the sample molecular structure diagram, and obtains the sample gas molecules corresponding to the sample molecular structure diagram according to the sample atomic features and the atoms in the sample molecular structure diagram, and the first sample insulation strength prediction value predicted by the first insulation strength prediction model to be trained;

[0067] Calculating a first loss function value between the first sample insulation strength prediction value and the true label;

[0068] Determine whether the above-mentioned first loss function value converges; if so, the training of the above-mentioned first insulation strength prediction model is completed, and the above-mentioned preset first insulation strength prediction model is obtained; if not, calculate the first gradient of the parameters in the above-mentioned first insulation strength prediction model to optimize the parameters in the above-mentioned first insulation strength prediction model according to the above-mentioned first gradient, and continue to train the first insulation strength prediction model to be trained.

[0069] Specifically, the obtained sample gas molecules need to first remove missing values ​​and outliers to ensure the integrity and accuracy of the sample data used for training.

[0070] Specifically, the PyTorch framework is used to construct the first insulation strength prediction model. Within the first insulation strength prediction model, the graph attention convolution function (GATConv) in the PyTorch Geometric library is used to process the molecular structure graph.

[0071] Specifically, when building the above-mentioned first insulation strength prediction model, the model contains two graph attention network layers and two fully connected layers. The input dimension of the first graph attention network layer is 40 dimensions, and the output dimension is 64 dimensions. Eight parallel attention heads are used to process features, and the output results are passed to the second layer after splicing. The input dimension of the second graph attention network layer is 512 dimensions (64*8), and the output dimension is 128 dimensions. A single attention head is used to process features. Next, the 128-dimensional features are input into the first fully connected layer, converted into 64-dimensional features, and then the final 1-dimensional result is output through the second fully connected layer. This 1-dimensional result is used to match the predicted insulation strength value.

[0072] Specifically, within the first insulation strength prediction model, the graph attention network layer uses attention to remember the weighted fusion of the atomic features corresponding to each node in the molecular structure graph, and increases the atomic feature dimension from 40 dimensions to 512 dimensions and then reduces it to 128 dimensions. Subsequently, two fully connected layers further reduce the atomic features from 128 dimensions to 1 dimension. The final output format is a one-dimensional tensor, in which the elements are floating-point values, representing the insulation strength prediction value based on atoms of the first insulation strength prediction model.

[0073] Specifically, when training the first insulation strength prediction model, attention weights are introduced in the forward propagation process of the first insulation strength prediction model, so that each time after passing through the graph attention network layer, the first insulation strength prediction model can dynamically adjust the influence weights of different neighbor nodes on the target node, thereby increasing the attention of the first insulation strength prediction model to important features. The ELU activation function is applied between each layer to update the feature vector of the node and alleviate the gradient vanishing problem, while introducing nonlinear transformation to enhance the nonlinear expression ability of the first insulation strength prediction model.

[0074] Specifically, the loss function used in the above calculation of the first loss function value is the mean square error function. After the first loss function value is calculated, the first insulation strength prediction model uses the back propagation algorithm to calculate the influence of each parameter on the first loss function value, that is, the gradient of the first loss function value to each weight parameter. After obtaining the gradient value, the first insulation strength prediction model updates the parameters based on the obtained gradient value so that the next prediction can be closer to the true label. Preferably, the Adam optimizer is used to update the parameters. The Adam optimizer can adaptively adjust the learning rate and accelerate convergence by calculating the first-order moment (mean) and second-order moment (uncentered variance) of the gradient. At the same time, due to the existence of the adaptive learning rate, the Adam optimizer is robust to hyperparameters and can find suitable hyperparameter settings in a wider range. The initial learning rate of the Adam optimizer is set to 0.001 (1e-3).

[0075] Preferably, during multiple iterations of the first insulation strength prediction model, each iteration will reduce the prediction error. Finally, when the first loss function value converges, the model training is completed. At this time, the first insulation strength prediction model has learned the relevant laws of the sample gas molecules and can make better insulation strength predictions.

[0076] Specifically, after the first insulation strength prediction model is trained, the torch.save method is used to save the model parameters, and the format of the model save file is .pth format. The saved object is the state dictionary (state_dict) of the model, which contains all the learnable parameters of the model.

[0077] In this preferred embodiment, the first insulation strength prediction model is trained using sample molecular structure information with real labels to obtain the above-mentioned preset first insulation strength prediction model.

[0078] In another preferred embodiment, the training of the preset second insulation strength prediction model includes:

[0079] Inputting the sample molecular structure diagram into the second insulation strength prediction model to be trained, so that the second insulation strength prediction model to be trained obtains the sample chemical bond characteristics according to the sample molecular structure diagram, and obtains the sample gas molecules corresponding to the sample molecular structure diagram according to the sample chemical bond characteristics and the chemical bonds in the sample molecular structure diagram, and the second sample insulation strength prediction value predicted by the second insulation strength prediction model to be trained;

[0080] Calculating a second loss function value between the second sample insulation strength prediction value and the true label;

[0081] Determine whether the above-mentioned second loss function value converges; if so, the training of the above-mentioned second insulation strength prediction model is completed, and the above-mentioned preset second insulation strength prediction model is obtained; if not, calculate the second gradient of the parameters in the above-mentioned second insulation strength prediction model to optimize the parameters in the above-mentioned second insulation strength prediction model according to the above-mentioned second gradient, and continue to train the second insulation strength prediction model to be trained.

[0082] Specifically, similar to the training of the first insulation strength prediction model in the previous embodiment, the second insulation strength prediction model is constructed using the PyTorch framework. Within the second insulation strength prediction model, the graph attention convolution function (GATConv) in the PyTorch Geometric library is used to process the molecular structure graph.

[0083] Specifically, when building the above-mentioned second insulation strength prediction model, the model is the same as the first insulation strength prediction model in the previous embodiment, and also includes two graph attention network layers and two fully connected layers. The input dimension of the first graph attention network layer is 40 dimensions, and the output dimension is 64 dimensions. Eight parallel attention heads are used to process features, and the output results are passed to the second layer after splicing. The input dimension of the second graph attention network layer is 512 dimensions (64*8), and the output dimension is 128 dimensions. A single attention head is used to process features. Next, the 128-dimensional features are input into the first fully connected layer, converted into 64-dimensional features, and then the final 1-dimensional result is output through the second fully connected layer. This 1-dimensional result is used to match the predicted insulation strength value.

[0084] Specifically, within the second insulation strength prediction model, the graph attention network layer uses attention to remember the weighted fusion of the chemical bond features corresponding to each edge in the molecular structure graph, and increases the dimension of the chemical bond features from 40 dimensions to 512 dimensions and then reduces it to 128 dimensions. Subsequently, two fully connected layers further reduce the chemical bond features from 128 dimensions to 1 dimension. The final output format is a one-dimensional tensor, in which the elements are floating-point values, representing the insulation strength prediction value based on chemical bonds of the second insulation strength prediction model.

[0085] Specifically, when training the second insulation strength prediction model, attention weights are introduced in the forward propagation process of the second insulation strength prediction model, so that each time after passing through the graph attention network layer, the second insulation strength prediction model can dynamically adjust the influence weights of different neighbor edges on the target edge, thereby increasing the second insulation strength prediction model's attention to important features. The ELU activation function is applied between each layer to update the feature vector of the edge and alleviate the gradient vanishing problem, while introducing nonlinear transformation to enhance the nonlinear expression ability of the second insulation strength prediction model.

[0086] Specifically, the loss function used in the above calculation of the second loss function value is the mean square error function. After the second loss function value is calculated, the second insulation strength prediction model uses the back propagation algorithm to calculate the influence of each parameter on the second loss function value, that is, the gradient of the second loss function value to each weight parameter. After obtaining the gradient value, the second insulation strength prediction model updates the parameters based on the obtained gradient value so that the next prediction can be closer to the true label. Preferably, the Adam optimizer is used to update the parameters. The Adam optimizer can adaptively adjust the learning rate and accelerate convergence by calculating the first-order moment (mean) and second-order moment (uncentered variance) of the gradient. At the same time, due to the existence of the adaptive learning rate, the Adam optimizer is robust to hyperparameters and can find suitable hyperparameter settings in a wider range. The initial learning rate of the Adam optimizer is set to 0.001 (1e-3).

[0087] Preferably, during multiple iterations of the second insulation strength prediction model, each iteration will reduce the prediction error. Finally, when the second loss function value converges, the model training is completed. At this time, the second insulation strength prediction model has learned the relevant laws of the sample gas molecules and can make better insulation strength predictions.

[0088] Specifically, after the second insulation strength prediction model is trained, the torch.save method is used to save the model parameters, and the format of the model save file is .pth format. The saved object is the state dictionary (state_dict) of the model, which contains all the learnable parameters of the model.

[0089] Specifically, when calling the first insulation strength prediction model and the second insulation strength prediction model, the model needs to be initialized so that it has the same model structure parameters as during training, and then the torch.load method is used to load the saved model learnable parameters. Finally, the model is set to evaluation mode to complete the model call.

[0090] In this preferred embodiment, the second insulation strength prediction model is trained using sample molecular structure information with real labels to obtain the above-mentioned preset second insulation strength prediction model.

[0091] In another preferred embodiment, after obtaining the first insulation strength prediction value and the second insulation strength prediction value, the method further includes:

[0092] According to the back propagation algorithm, the atomic feature gradient of the atomic feature corresponding to the first insulation strength prediction value and the chemical bond feature gradient of the chemical bond feature corresponding to the second insulation strength prediction value are calculated, and the atomic feature gradient and the chemical bond feature gradient are normalized respectively to obtain a normalized atomic feature gradient and a normalized chemical bond feature gradient;

[0093] According to the preset gradient color mapping function, the normalized atomic feature gradient and the normalized chemical bond feature gradient, the color corresponding to each node and each type of edge on the basic molecular structure diagram is determined, and then the corresponding color is added to each node and each type of edge on the basic molecular structure diagram to obtain a molecular importance visualization diagram;

[0094] The above molecular importance visualization is displayed on the second canvas sub-graph.

[0095] Specifically, in the process of predicting the insulation strength by the preset first insulation strength prediction model and the preset second insulation strength prediction model, the gradients of each atomic feature and chemical bond feature are tracked and saved, and back propagation is called to obtain the feature gradients of atoms and chemical bonds as feature importance indicators. Subsequently, after the feature gradients are normalized, the obtained values ​​are respectively mapped using the color mapping of plt.cm.cool and plt.cm.autumn. On the basis of the above basic molecular structure diagram, corresponding shades of color are added to the nodes and edges according to the size of the feature gradients to intuitively represent the importance of atoms and chemical bonds, and finally displayed in the second sub-diagram of the above canvas.

[0096] In this preferred embodiment, the nodes and edges on the basic molecular structure diagram are colored according to the atomic characteristic gradients and chemical bond characteristic gradients, thereby obtaining a molecular importance visualization diagram that can intuitively represent the importance of atoms and chemical bonds.

[0097] Step S104: Calculate the average value of the first insulation strength prediction value and the second insulation strength prediction value to obtain the insulation strength prediction value of the gas molecule to be measured.

[0098] Specifically, the final insulation strength prediction value of the gas molecule to be measured is obtained by calculating the average value of the first insulation strength prediction value predicted by the first insulation strength prediction model and the second insulation strength prediction value predicted by the second insulation strength prediction model.

[0099] Based on the above method embodiment, the present invention provides a corresponding device embodiment.

[0100] like Figure 2 As shown, an embodiment of the present invention provides a gas molecule dielectric strength prediction device based on a graph attention neural network, comprising:

[0101] Molecular structure acquisition module, molecular structure diagram construction module, model prediction module and insulation strength calculation module;

[0102] The molecular structure acquisition module is used to acquire molecular structure information of the gas molecules to be measured; wherein the molecular structure information includes: atoms and chemical bonds;

[0103] The molecular structure graph construction module is used to construct a molecular structure graph according to the molecular structure information; wherein the nodes in the molecular structure graph represent the atoms, and the edges represent the chemical bonds;

[0104] The model prediction module is used to input the molecular structure diagram into a preset first insulation strength prediction model and a preset second insulation strength prediction model constructed based on a graph attention neural network, respectively, so that the preset first insulation strength prediction model obtains atomic features according to the molecular structure diagram, and obtains a first insulation strength prediction value according to the atoms and the atomic features, and the preset second insulation strength prediction model obtains chemical bond features according to the molecular structure diagram, and obtains a second insulation strength prediction value according to the chemical bonds and the chemical bond features; wherein the atomic features include: atom type, valence electron number and hybridization type; the chemical bond features include: chemical bond type, conjugation type and stereochemical coding;

[0105] The insulation strength calculation module is used to calculate the average value of the first insulation strength prediction value and the second insulation strength prediction value to obtain the insulation strength prediction value of the gas molecule to be measured.

[0106] In a preferred embodiment, it further comprises: a basic molecular structure diagram display module;

[0107] The above-mentioned basic molecular structure diagram display module is used to calculate the relative position of each atom according to the above-mentioned molecular structure information; obtain the element label of each atom and the type edge corresponding to each chemical bond from the preset index library according to the above-mentioned atoms and chemical bonds; add nodes on the first canvas sub-graph according to the above-mentioned relative positions, and add the above-mentioned element labels on each node; connect the corresponding two nodes through each type of edge to obtain the basic molecular structure diagram of the above-mentioned gas molecules, and display the above-mentioned basic molecular structure diagram on the above-mentioned first canvas sub-graph.

[0108] In another preferred embodiment, it further comprises: a molecular importance visualization diagram display module;

[0109] The above-mentioned molecular importance visualization diagram display module is used to calculate the atomic feature gradient of the atomic feature corresponding to the above-mentioned first insulation strength prediction value and the chemical bond feature gradient of the chemical bond feature corresponding to the above-mentioned second insulation strength prediction value according to the back propagation algorithm, and normalize the above-mentioned atomic feature gradient and the above-mentioned chemical bond feature gradient respectively to obtain the normalized atomic feature gradient and the normalized chemical bond feature gradient; determine the color corresponding to each node and each type of edge on the above-mentioned basic molecular structure diagram according to the preset gradient color mapping function, the above-mentioned normalized atomic feature gradient and the above-mentioned normalized chemical bond feature gradient, and then add the corresponding color to each node and each type of edge on the above-mentioned basic molecular structure diagram to obtain a molecular importance visualization diagram; display the above-mentioned molecular importance visualization diagram on the second canvas sub-graph.

[0110] It should be noted that the device embodiments described above are merely schematic, wherein the modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines. Ordinary technicians in this field can understand and implement it without creative work. The above schematic diagram is only an example of a gas molecule insulation strength prediction device based on a graph attention neural network, and does not constitute a limitation on a gas molecule insulation strength prediction device based on a graph attention neural network, and may include more or fewer components than shown in the figure, or a combination of certain components, or different components.

[0111] Based on the above method item embodiments, the present invention provides corresponding terminal device item embodiments.

[0112] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the method for predicting the insulation strength of gas molecules based on a graph attention neural network described in any embodiment of the present invention.

[0113] Exemplarily, in this embodiment, the computer program may be divided into one or more modules, which are stored in the memory and executed by the processor to implement the present invention. The one or more module elements may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the device;

[0114] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The device may include, but is not limited to, a processor, a memory;

[0115] The processor referred to herein may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The above-mentioned processor is the control center of the above-mentioned device, and uses various interfaces and lines to connect various parts of the entire device;

[0116] The above-mentioned memory can be used to store the above-mentioned computer programs and / or modules. The above-mentioned processor realizes various functions of the above-mentioned device by running or executing the computer programs and / or modules stored in the above-mentioned memory, and calling the data stored in the memory. The above-mentioned memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; in addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0117] Based on the above method item embodiments, the present invention provides a corresponding storage medium item embodiment.

[0118] Another embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the above-mentioned method for predicting the insulating strength of gas molecules based on a graph attention neural network in any embodiment of the present invention.

[0119] In this embodiment, the storage medium is a computer-readable storage medium, the computer program includes computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0120] Compared with the prior art, by implementing the above-mentioned embodiments of the present invention, in the process of predicting the insulation strength of unknown gas molecules, there is no need to conduct a large number of manual experiments and data analysis based on expert knowledge and expert experience, thereby reducing the constraints on human resources in the work of predicting the insulation strength of gas molecules and improving the accuracy of the insulation strength prediction results.

[0121] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for predicting the dielectric strength of gas molecules based on graph attention neural network, characterized in that: include: Acquire molecular structure information of the gas molecules to be tested; wherein the molecular structure information includes: atoms and chemical bonds; Constructing a molecular structure graph according to the molecular structure information; wherein the nodes in the molecular structure graph represent the atoms, and the edges represent the chemical bonds; The molecular structure diagram is input into a preset first insulation strength prediction model and a preset second insulation strength prediction model constructed based on a graph attention neural network, respectively, so that the preset first insulation strength prediction model obtains atomic features according to the molecular structure diagram, and obtains a first insulation strength prediction value according to the atoms and the atomic features, and the preset second insulation strength prediction model obtains chemical bond features according to the molecular structure diagram, and obtains a second insulation strength prediction value according to the chemical bonds and the chemical bond features; wherein the atomic features include: atom type, valence electron number and hybridization type; the chemical bond features include: chemical bond type, conjugation type and stereochemical coding; An average value of the first insulation strength prediction value and the second insulation strength prediction value is calculated to obtain the insulation strength prediction value of the gas molecule to be measured.

2. According to claim 1, a method for predicting the dielectric strength of gas molecules based on graph attention neural network is characterized in that: The training of the preset first insulation strength prediction model includes: Acquire sample molecular structure information of a number of sample gas molecules with real labels; wherein the real labels are used to represent the actual insulation strength of the sample gas molecules; Constructing a sample molecular structure diagram of the sample gas molecules according to the sample molecular structure information; Inputting the sample molecular structure diagram into the first insulation strength prediction model to be trained, so that the first insulation strength prediction model to be trained obtains sample atomic features according to the sample molecular structure diagram, and obtains the sample gas molecules corresponding to the sample molecular structure diagram according to the sample atomic features and the atoms in the sample molecular structure diagram, and the first sample insulation strength prediction value predicted by the first insulation strength prediction model to be trained; Calculating a first loss function value between the first sample insulation strength prediction value and the true label; Determine whether the first loss function value converges; if so, the training of the first insulation strength prediction model is completed, and the preset first insulation strength prediction model is obtained; if not, calculate the first gradient of the parameters in the first insulation strength prediction model to optimize the parameters in the first insulation strength prediction model according to the first gradient, and continue to train the first insulation strength prediction model to be trained.

3. The method for predicting the dielectric strength of gas molecules based on graph attention neural network according to claim 2, characterized in that: The training of the preset second insulation strength prediction model includes: Inputting the sample molecular structure diagram into the second insulation strength prediction model to be trained, so that the second insulation strength prediction model to be trained obtains sample chemical bond characteristics according to the sample molecular structure diagram, and obtains the sample gas molecules corresponding to the sample molecular structure diagram according to the sample chemical bond characteristics and the chemical bonds in the sample molecular structure diagram, and the second sample insulation strength prediction value predicted by the second insulation strength prediction model to be trained; Calculating a second loss function value between the second sample insulation strength prediction value and the true label; Determine whether the second loss function value converges; if so, the training of the second insulation strength prediction model is completed, and the preset second insulation strength prediction model is obtained; if not, calculate the second gradient of the parameters in the second insulation strength prediction model to optimize the parameters in the second insulation strength prediction model according to the second gradient, and continue to train the second insulation strength prediction model to be trained.

4. The method for predicting the dielectric strength of gas molecules based on graph attention neural network according to claim 3 is characterized in that: After obtaining the molecular structure information, the method further includes: According to the molecular structure information, the relative position of each atom is calculated; According to the atoms and chemical bonds, the element label of each atom and the type edge corresponding to each chemical bond are obtained from a preset index library; Adding nodes on the first canvas subgraph according to the relative positions, and adding the element labels to each node; The corresponding two nodes are connected by edges of each type to obtain a basic molecular structure diagram of the gas molecules, and the basic molecular structure diagram is displayed on the first canvas sub-graph.

5. The method for predicting the dielectric strength of gas molecules based on graph attention neural network according to claim 4, characterized in that: After obtaining the first insulation strength prediction value and the second insulation strength prediction value, the method further includes: According to the back propagation algorithm, the atomic feature gradient of the atomic feature corresponding to the first insulation strength prediction value and the chemical bond feature gradient of the chemical bond feature corresponding to the second insulation strength prediction value are calculated, and the atomic feature gradient and the chemical bond feature gradient are normalized respectively to obtain a normalized atomic feature gradient and a normalized chemical bond feature gradient; According to the preset gradient color mapping function, the normalized atomic feature gradient and the normalized chemical bond feature gradient, the color corresponding to each node and each type of edge on the basic molecular structure diagram is determined, and then the corresponding color is added to each node and each type of edge on the basic molecular structure diagram to obtain a molecular importance visualization diagram; The molecular importance visualization is displayed on a second canvas sub-graph.

6. A gas molecule dielectric strength prediction device based on graph attention neural network, characterized in that: include: Molecular structure acquisition module, molecular structure diagram construction module, model prediction module and insulation strength calculation module; The molecular structure acquisition module is used to acquire molecular structure information of the gas molecules to be measured; wherein the molecular structure information includes: atoms and chemical bonds; The molecular structure graph construction module is used to construct a molecular structure graph according to the molecular structure information; wherein the nodes in the molecular structure graph represent the atoms, and the edges represent the chemical bonds; The model prediction module is used to input the molecular structure diagram into a preset first insulation strength prediction model and a preset second insulation strength prediction model constructed based on a graph attention neural network, respectively, so that the preset first insulation strength prediction model obtains atomic features according to the molecular structure diagram, and obtains a first insulation strength prediction value according to the atoms and the atomic features, and the preset second insulation strength prediction model obtains chemical bond features according to the molecular structure diagram, and obtains a second insulation strength prediction value according to the chemical bonds and the chemical bond features; wherein the atomic features include: atom type, valence electron number and hybridization type; the chemical bond features include: chemical bond type, conjugation type and stereochemical coding; The insulation strength calculation module is used to calculate the average value of the first insulation strength prediction value and the second insulation strength prediction value to obtain the insulation strength prediction value of the gas molecule to be measured.

7. The device for predicting the dielectric strength of gas molecules based on graph attention neural network according to claim 6, characterized in that: Also includes: Basic molecular structure diagram display module; The basic molecular structure diagram display module is used to calculate the relative position of each atom according to the molecular structure information; obtain the element label of each atom and the type edge corresponding to each chemical bond from a preset index library according to the atoms and chemical bonds; add nodes on the first canvas sub-graph according to the relative position, and add the element label on each node; connect the corresponding two nodes through each type of edge to obtain the basic molecular structure diagram of the gas molecule, and display the basic molecular structure diagram on the first canvas sub-graph.

8. The device for predicting the dielectric strength of gas molecules based on graph attention neural network according to claim 7, characterized in that: Also includes : Molecular importance visualization display module; The molecular importance visualization diagram display module is used to calculate the atomic feature gradient of the atomic feature corresponding to the first insulation strength prediction value and the chemical bond feature gradient of the chemical bond feature corresponding to the second insulation strength prediction value according to the back propagation algorithm, and normalize the atomic feature gradient and the chemical bond feature gradient respectively to obtain a normalized atomic feature gradient and a normalized chemical bond feature gradient; According to the preset gradient color mapping function, the normalized atomic feature gradient and the normalized chemical bond feature gradient, the color corresponding to each node and each type of edge on the basic molecular structure diagram is determined, and then the corresponding color is added to each node and each type of edge on the basic molecular structure diagram to obtain a molecular importance visualization diagram; the molecular importance visualization diagram is displayed on the second canvas sub-diagram.

9. A terminal device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, it implements a method for predicting the dielectric strength of gas molecules based on a graph attention neural network as described in any one of claims 1 to 5.

10. A storage medium, characterized in that: The storage medium includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute a method for predicting the dielectric strength of gas molecules based on a graph attention neural network as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Gas medium insulation capability evaluation method

    CN112182950A

  • Molecular insulation strength prediction method and device based on neural network, and medium

    CN117079741A

  • Insulating gas molecule screening method and system based on neural network

    CN118351968A

  • Power grid model parameter estimation method and system based on physical information graph neural network

    CN119004965A

  • Drug small molecule property prediction method and apparatus based on graph neural network, and device

    WO2023029352A1

Cited By

  • Novel environment-friendly insulating gas molecule design and performance prediction method and system

    CN120895116A