A method, device, terminal device and storage medium for predicting the dielectric strength of gas molecules based on graph attention neural network

By constructing a molecular structure graph based on a graph attention neural network method, the insulation strength of gas molecules is predicted using atomic and chemical bond characteristics, which solves the problem of reliance on expert knowledge in existing technologies and achieves efficient and accurate gas insulation strength assessment.

CN119626349BActive Publication Date: 2025-09-30GUANGDONG POWER GRID CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies rely heavily on expert knowledge and experience when evaluating gas insulation performance, which limits research progress and lacks efficient non-experimental methods.

Method used

A gas molecule insulation strength prediction method based on graph attention neural network is adopted. By constructing a molecular structure graph, the insulation strength of gas molecules is predicted using the graph attention neural network model, and the prediction is made by combining the atomic and chemical bond characteristics, reducing manual experiments and data analysis.

Benefits of technology

The accuracy of gas molecule insulation strength prediction is improved, the dependence on human resources is reduced, and efficient insulation strength evaluation is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119626349B_ABST
    Figure CN119626349B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, apparatus, terminal device, and storage medium for predicting the dielectric strength of gas molecules based on a graph attention neural network. The method comprises: obtaining molecular structure information of the gas molecules to be measured and constructing a molecular structure graph; inputting the molecular structure graph into a preset first dielectric strength prediction model and a preset second dielectric strength prediction model, respectively, to obtain a first dielectric strength prediction value and a second dielectric strength prediction value; and calculating the average of the first dielectric strength prediction value and the second dielectric strength prediction value to obtain a dielectric strength prediction value for the gas molecules to be measured. By implementing the present invention, the dielectric strength prediction process of unknown gas molecules can be eliminated from the need for extensive manual experiments and data analysis based on expert knowledge and experience, thereby reducing the human resource constraints in predicting the dielectric strength of gas molecules and improving the accuracy of dielectric strength prediction results.
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 dielectric strength prediction, and in particular to a method, device, terminal device and storage medium for predicting gas molecule dielectric strength based on a graph attention neural network. Background Art

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

[0003] Previously, many related studies, both domestically and internationally, relied on traditional experimental methods. These methods required testing candidate gases individually to evaluate their insulation properties. This gas development process, from experimental design and execution to data analysis and interpretation, relied heavily on the researchers' expert knowledge and experience. However, highly skilled expert resources are limited, and overreliance on expert knowledge meant that research progress was constrained by human resources. Summary of the Invention

[0004] The present invention provides a method, apparatus, terminal device and storage medium for predicting the dielectric strength of gas molecules based on a graph attention neural network. The method eliminates the need for extensive manual experiments and data analysis based on expert knowledge and experience in predicting the dielectric strength of unknown gas molecules, thereby reducing the constraints on human resources required for predicting the dielectric strength of gas molecules and improving the accuracy of dielectric 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] Constructing a molecular structure graph based on the molecular structure information; wherein the nodes in the molecular structure graph represent the atoms, and the edges represent the chemical bonds;

[0008] 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 based on the molecular structure diagram, and obtains a first insulation strength prediction value based on the atoms and the atomic features, and the preset second insulation strength prediction model obtains chemical bond features based on the molecular structure diagram, and obtains a second insulation strength prediction value based on the chemical bonds and the chemical bond features; wherein the atomic features include: atom type, valence electron number, and hybridization type; and the chemical bond features include: chemical bond type, conjugation type, and stereochemical code;

[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 plurality of sample gas molecules with real labels, wherein the real labels are used to represent the actual dielectric 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] Inputting the sample molecular structure diagram into a first insulation strength prediction model to be trained, so that the first insulation strength prediction model to be trained obtains sample atomic features based on the sample molecular structure diagram, and obtains a first sample insulation strength prediction value predicted by the first insulation strength prediction model to be trained for the sample gas molecule corresponding to the sample molecular structure diagram based on the sample atomic features and the atoms in the sample molecular structure diagram;

[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 a second insulation strength prediction model to be trained, so that the second insulation strength prediction model to be trained obtains sample chemical bond characteristics based on the sample molecular structure diagram, and obtains a second sample insulation strength prediction value predicted by the second insulation strength prediction model to be trained for the sample gas molecule corresponding to the sample molecular structure diagram based on the sample chemical bond characteristics and the chemical bonds in the sample molecular structure diagram;

[0018] Calculating a second loss function value between the insulation strength prediction value of the second sample 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, the method further 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 subgraph.

[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] Determine the color corresponding to each node and each type of edge on the basic molecular structure diagram according to a preset gradient color mapping function, the normalized atomic feature gradient, and the normalized chemical bond feature gradient, and then add the corresponding color to each node and each type of edge on the basic molecular structure diagram to obtain a molecular importance visualization diagram;

[0028] Display the above molecular importance visualization 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 obtain 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 based on 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 configured 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 based on the molecular structure diagram and obtains a first insulation strength prediction value based on the atoms and the atomic features, and the preset second insulation strength prediction model obtains chemical bond features based on the molecular structure diagram and obtains a second insulation strength prediction value based on the chemical bonds and the chemical bond features; wherein the atomic features include: atom type, valence electron number, and hybridization type; and the chemical bond features include: chemical bond type, conjugation type, and stereochemical code;

[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 molecules 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 based on 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 based on the above-mentioned atoms and chemical bonds; add nodes according to the above-mentioned relative positions on the first canvas sub-graph, and add the above-mentioned element label 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] Furthermore, it also includes: a module for displaying a molecular importance visualization diagram;

[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; according to the preset gradient color mapping function, the above-mentioned normalized atomic feature gradient and the above-mentioned 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, and then add corresponding colors to each node and each type of edge on the above-mentioned basic molecular structure diagram to obtain a molecular importance visualization diagram; and 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 corresponding terminal device embodiment;

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

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

[0043] The present invention provides a storage medium comprising 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 assessing transient stability of a power system based on phase area. The method first obtains molecular structure information of a gas molecule to be measured, wherein the molecular structure information includes atoms and chemical bonds. A molecular structure graph is then constructed based on the molecular structure information, wherein nodes in the molecular structure graph represent atoms and edges represent chemical bonds. The molecular structure graph is then 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 based on the molecular structure graph and obtains a first insulation strength prediction value based on the atoms and the atomic features. The preset second insulation strength prediction model obtains chemical bond features based on the molecular structure graph and obtains a second insulation strength prediction value based on the chemical bonds and the chemical bond features. The atomic features include atom type, valence electron number, and hybridization type, and 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 measured. Therefore, the present invention uses 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, and then takes the average of the two obtained insulation strength prediction values ​​as the final insulation strength prediction result. During the entire prediction process, there is no need to conduct a large number of manual experiments and data analysis based on expert knowledge and expert experience on the gas molecules to be tested, which reduces the human resource constraints in the work of predicting the insulation strength of gas molecules and improves the accuracy of the insulation strength prediction results. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This 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 This 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 following will clearly and completely describe the technical solutions of the present invention in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall 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: Acquire molecular structure information of the gas molecules to be measured; wherein the molecular structure information includes atoms and chemical bonds;

[0051] Specifically, the molecular mechanical energy of the gas to be tested can be tested first to obtain molecular structure information, where 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 a basic molecular structure diagram of the gas molecules, and the basic molecular structure diagram is displayed on the first canvas subgraph.

[0057] Specifically, the canvas is divided into subgraphs with 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 based on 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 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 based on the molecular structure diagram, and obtains a first insulation strength prediction value based on the atoms and the atomic features, and the preset second insulation strength prediction model obtains chemical bond features based on the molecular structure diagram, and obtains a second insulation strength prediction value based on the chemical bonds and the chemical bond features; wherein the atomic features include: atom type, valence electron number, and hybridization type; and the chemical bond features include: chemical bond type, conjugation type, and stereochemical code;

[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 plurality of sample gas molecules with real labels, wherein the real labels are used to represent the actual dielectric 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] Inputting the sample molecular structure diagram into a first insulation strength prediction model to be trained, so that the first insulation strength prediction model to be trained obtains sample atomic features based on the sample molecular structure diagram, and obtains a first sample insulation strength prediction value predicted by the first insulation strength prediction model to be trained for the sample gas molecule corresponding to the sample molecular structure diagram based on the sample atomic features and the atoms in the sample molecular structure diagram;

[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 above-mentioned 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 spliced ​​and passed to the second layer. 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 memory to weightedly fuse the atomic features corresponding to each node in the molecular structure graph, increasing the atomic feature dimensionality from 40 to 512 and then reducing it to 128. Subsequently, two fully connected layers further reduce the atomic features from 128 to 1 dimension. The final output is a one-dimensional tensor whose elements are floating-point values, representing the first insulation strength prediction model's atom-based insulation strength prediction values.

[0073] Specifically, during the training of the first insulation strength prediction model, attention weights are introduced during the forward propagation of the model. This allows the model to dynamically adjust the influence weights of different neighboring nodes on the target node after each pass through the graph attention network layer, thereby increasing the model's focus on important features. An ELU activation function is applied between each layer to update the node's feature vectors, alleviating the vanishing gradient problem. Nonlinear transformations are also introduced to enhance the nonlinear expression capabilities 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 within 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. The model save file format is .pth. The saved object is the model state dictionary (state_dict), which contains all the model's learnable parameters.

[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 a second insulation strength prediction model to be trained, so that the second insulation strength prediction model to be trained obtains sample chemical bond characteristics based on the sample molecular structure diagram, and obtains a second sample insulation strength prediction value predicted by the second insulation strength prediction model to be trained for the sample gas molecule corresponding to the sample molecular structure diagram based on the sample chemical bond characteristics and the chemical bonds in the sample molecular structure diagram;

[0080] Calculating a second loss function value between the insulation strength prediction value of the second sample 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 internal structure of 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 memory to weightedly fuse the chemical bond features corresponding to each edge in the molecular structure graph, increasing the dimensionality of the chemical bond features from 40 to 512 and then reducing them to 128. Subsequently, two fully connected layers further reduce the chemical bond features from 128 to 1. The final output is a one-dimensional tensor whose elements are floating-point values, representing the insulation strength prediction value based on the chemical bonds of the second insulation strength prediction model.

[0085] Specifically, during the training of the aforementioned second insulation strength prediction model, attention weights are introduced during the forward propagation process. This allows the model to dynamically adjust the influence weights of different neighboring edges on the target edge after each pass through the graph attention network layer, thereby increasing the model's focus on important features. An ELU activation function is applied between each layer to update the edge's feature vectors, alleviating the vanishing gradient problem. Nonlinear transformations are also introduced to enhance the nonlinear expression capabilities 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 will use 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 within 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. The model save file format is .pth. The saved object is the model state dictionary (state_dict), which contains all the model's learnable parameters.

[0089] Specifically, when calling the above-mentioned first insulation strength prediction model and the above-mentioned second insulation strength prediction model, it is necessary to initialize the model so that it has the same model structure parameters as during training, and then use the torch.load method to load the saved model learnable parameters. Finally, set the model 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] Determine the color corresponding to each node and each type of edge on the basic molecular structure diagram according to a preset gradient color mapping function, the normalized atomic feature gradient, and the normalized chemical bond feature gradient, and then add the corresponding color to each node and each type of edge on the basic molecular structure diagram to obtain a molecular importance visualization diagram;

[0094] Display the above molecular importance visualization on the second canvas sub-graph.

[0095] Specifically, during the insulation strength prediction process using the preset first and second insulation strength prediction models, the gradients of each atomic and chemical bond feature are tracked and saved. Backpropagation is then used to obtain the atomic and chemical bond feature gradients, which serve as feature importance indicators. These feature gradients are then normalized, and the resulting values ​​are mapped using the plt.cm.cool and plt.cm.autumn color maps, respectively. Based on the basic molecular structure diagram, nodes and edges are assigned corresponding shades of color based on the magnitude of the feature gradients to visually represent the importance of atoms and chemical bonds. These colors are then displayed in the second subgraph of the canvas.

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

[0097] Step S104: calculating an 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 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 embodiments, the present invention provides corresponding device embodiments.

[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 obtain 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 based on 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 configured 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 based on the molecular structure diagram and obtains a first insulation strength prediction value based on the atoms and the atomic features, and the preset second insulation strength prediction model obtains chemical bond features based on the molecular structure diagram and obtains a second insulation strength prediction value based on the chemical bonds and the chemical bond features; wherein the atomic features include: atom type, valence electron number, and hybridization type; and the chemical bond features include: chemical bond type, conjugation type, and stereochemical code;

[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 molecules 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 based on 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 based on the above-mentioned atoms and chemical bonds; add nodes according to the above-mentioned relative positions on the first canvas sub-graph, and add the above-mentioned element label 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; according to the preset gradient color mapping function, the above-mentioned normalized atomic feature gradient and the above-mentioned 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, and then add corresponding colors to each node and each type of edge on the above-mentioned basic molecular structure diagram to obtain a molecular importance visualization diagram; and 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 present embodiment. In addition, in the 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. A person of ordinary skill in the art can understand and implement it without paying any 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 embodiment, the present invention provides a corresponding terminal device embodiment.

[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 insulating strength of gas molecules based on a graph attention neural network according to any one of the embodiments of the present invention.

[0113] For example, 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 modules may be a series of computer program instruction segments capable of performing 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 computer, a PDA, or a cloud server. The device may include, but is not limited to, a processor and a memory;

[0115] The processor 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), 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. The processor is the control center of the device, connecting the various parts of the device using various interfaces and lines.

[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 device.

[0117] Based on the above method embodiment, the present invention provides a corresponding storage medium 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, and the computer program includes computer program code, which may be in source code form, object code form, an executable file, or some intermediate form. The computer-readable medium may include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium.

[0120] Compared with the prior art, by implementing the above-mentioned embodiments of the present invention, it is possible to eliminate the need for a large number of manual experiments and data analyses based on expert knowledge and experience in the process of predicting the insulation strength of unknown gas molecules, 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 principles 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: Obtaining molecular structure information of the gas molecules to be measured; wherein the molecular structure information includes: atoms and chemical bonds; Constructing a molecular structure graph based on the molecular structure information; wherein the nodes in the molecular structure graph represent the atoms, and the edges represent the chemical bonds; Inputting the molecular structure graph 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 based on the molecular structure graph, and obtains a first insulation strength prediction value based on the atoms and the atomic features, and the preset second insulation strength prediction model obtains chemical bond features based on the molecular structure graph, and obtains a second insulation strength prediction value based on the chemical bonds and the chemical bond features; wherein the atomic features include: atom type, valence electron number, and hybridization type; and 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. The method for predicting the dielectric strength of gas molecules based on graph attention neural network according to claim 1, characterized in that: The training of the preset first insulation strength prediction model includes: Obtaining sample molecular structure information of a plurality of sample gas molecules with real labels, wherein the real labels are used to represent the actual dielectric 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 graph into a first insulation strength prediction model to be trained, so that the first insulation strength prediction model to be trained obtains sample atomic features based on the sample molecular structure graph, and obtains, based on the sample atomic features and the atoms in the sample molecular structure graph, a first sample insulation strength prediction value predicted by the first insulation strength prediction model to be trained for the sample gas molecule corresponding to the sample molecular structure graph; 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 graph into a second insulation strength prediction model to be trained, so that the second insulation strength prediction model to be trained obtains sample chemical bond features based on the sample molecular structure graph, and obtains, based on the sample chemical bond features and the chemical bonds in the sample molecular structure graph, a second sample insulation strength prediction value predicted by the second insulation strength prediction model to be trained for the sample gas molecule corresponding to the sample molecular structure graph; 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, characterized in that: After obtaining the molecular structure information, the method further includes: Calculating the relative positions of atoms based on the molecular structure information; 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 subgraph.

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: calculating, according to a back-propagation algorithm, an atomic feature gradient of an atomic feature corresponding to the first insulation strength prediction value, and a chemical bond feature gradient of a chemical bond feature corresponding to the second insulation strength prediction value, and normalizing 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; Determine the color corresponding to each node and each type of edge on the basic molecular structure diagram according to a preset gradient color mapping function, the normalized atomic feature gradient, and the normalized chemical bond feature gradient, and then add the corresponding color 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 subgraph.

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 obtain 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 based on 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 configured 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 based on the molecular structure diagram, and obtains a first insulation strength prediction value based on the atoms and the atomic features, and the preset second insulation strength prediction model obtains chemical bond features based on the molecular structure diagram, and obtains a second insulation strength prediction value based on the chemical bonds and the chemical bond features; wherein the atomic features include: atom type, valence electron number, and hybridization type; and the chemical bond features include: chemical bond type, conjugation type, and stereochemical coding; The insulation strength calculation module is used to calculate the average of the first insulation strength prediction value and the second insulation strength prediction value to obtain the insulation strength prediction value of the gas molecules to be measured.

7. The device for predicting 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 based on 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 based on the atoms and chemical bonds; add nodes according to the relative position on the first canvas subgraph, and add the element label to 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 subgraph.

8. The device for predicting 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 display module is configured to calculate, based on a back-propagation algorithm, an atomic feature gradient of an atomic feature corresponding to the first insulation strength prediction value, and a chemical bond feature gradient of a chemical bond feature corresponding to the second insulation strength prediction value, 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 gas molecule dielectric strength prediction method 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