Grid optimization judgment method and device based on domestic scientific calculation software and supercomputing system

Through the grid judgment method based on domestic scientific computing software and supercomputing systems, the grid quality judgment is determined by using graph neural networks, and the problem of inefficient grid judgment in the existing technology is solved, efficient and automated grid quality detection is achieved, and the accuracy and efficiency of CFD simulation are improved.

CN120493078APending Publication Date: 2025-08-15NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510743542.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-05
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In the existing computational fluid mechanics (CFD) simulation, the quality discrimination of grid generation relies on manual discrimination, is inefficient and lacks objectivity, and the existing indicators cannot effectively characterize regional or global features, affecting the solution efficiency and accuracy.

Method used

The grid judgment method based on domestic scientific computing software and supercomputing systems is adopted. By receiving grid quality judgment requests, pre-processing is performed and inputting it to the grid quality judgment model, and feature extraction and classification are used for graph neural network to determine the category and probability of grid quality.

Benefits of technology

It realizes efficient and high-quality grid quality judgment, improves the level of automation, reduces manual intervention, and improves the accuracy and efficiency of computational fluid mechanics simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120493078A_ABST
    Figure CN120493078A_ABST
Patent Text Reader

Abstract

The invention provides a grid optimization judgment method and device based on domestic scientific calculation software and a supercomputing system, and is applied to the technical field of computational fluid mechanics grid quality judgment. Preprocessing grid data in the grid quality discrimination request to obtain a network feature matrix and an adjacent matrix, and inputting the network feature matrix and the adjacent matrix into a grid quality discrimination model to obtain a grid quality discrimination result; and finally, determining a final category and a probability value of the final category according to the grid quality discrimination result, thereby realizing high-efficiency and high-quality discrimination of the grid quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of grid quality judgment in computational fluid dynamics, and in particular to a grid quality judgment method and device based on domestic scientific computing software and supercomputing systems. Background Art

[0002] Computational fluid dynamics (CFD), a key numerical simulation method, has been widely used in aerospace, energy and power, industrial automation, and other fields. With the rapid development of high-performance computing technology, particularly the rise of domestic supercomputer systems, the scale and accuracy of CFD simulations have significantly improved. However, accurate CFD simulations still face challenges such as high computational costs and complex processes. Mesh generation, a key step in CFD simulations, directly impacts solution efficiency and computational accuracy.

[0003] Meshing is achieved by discretizing the computational domain into grid cells. However, the quality of these cells (e.g., shape distortion, distortion, etc.) can lead to ill-conditioned matrices, reducing the convergence speed and accuracy of the solution. Although various automated mesh generation methods exist, the meshes generated by these methods often fail to meet the requirements of solving specific physical problems, requiring manual quality assessment by experts. This time-consuming and inefficient process has become a bottleneck in the CFD workflow.

[0004] Currently, mesh quality is primarily assessed using a series of quality metrics, such as skewness, Jacobian coefficient, and aspect ratio for two-dimensional structural meshes, and volume slope and volume collapse for three-dimensional tetrahedral meshes. These metrics are widely used in automatic mesh generation algorithms, but they still have significant limitations: locality: most metrics are based on a single mesh cell, reflecting only local characteristics and failing to effectively characterize regional or global features; subjectivity: whether a metric meets the required standards often relies on expert experience and lacks objectivity; and lack of correlation: some metrics lack a clear link to solution accuracy and efficiency. Summary of the Invention

[0005] In view of this, the present application provides a grid optimization method and device based on domestic scientific computing software and supercomputing system, which can efficiently and effectively judge the quality of the grid.

[0006] The first aspect of the present application provides a grid arbitration method based on domestic scientific computing software and a supercomputing system, comprising:

[0007] Receiving a grid quality determination request from a user; wherein the grid quality determination request includes grid data;

[0008] Pre-processing the grid data to obtain a network feature matrix and an adjacency matrix;

[0009] The network feature matrix and the adjacency matrix are input into the grid quality discrimination model to obtain a grid quality discrimination result; wherein, the grid quality discrimination result includes the probabilities of different categories of grid quality; the grid quality discrimination model includes a linear layer, a graph convolution module, a graph pooling module, a graph readout module, a graph aggregation module and a fully connected classification module; the linear layer performs a linear transformation on the network feature matrix to obtain target feature data; the graph convolution module performs feature extraction on the target feature data to obtain a convolved network feature matrix; the graph pooling module performs feature extraction on the convolved network feature matrix and the adjacency matrix to obtain a target network feature matrix and a target adjacency matrix; a part of the target network feature matrix and a part of the target adjacency matrix are output to the graph readout module, and the remaining part of the target network feature matrix and the remaining part of the target adjacency matrix are output to the graph convolution module of the next layer; the graph readout module processes the outputs of all graph pooling modules to obtain a graph aggregation result; the graph aggregation module takes the graph aggregation results at each level as input and outputs the graph representation vectors of each level; the fully connected classification module determines the probabilities of different categories of grid quality according to the graph representation vectors of each level;

[0010] The final category and the probability value of the final category are determined according to the grid quality judgment result.

[0011] Optionally, the method for constructing the grid quality discrimination model includes:

[0012] Build an initial model based on graph neural network;

[0013] Construct a grid training dataset;

[0014] The initial model of the graph neural network is trained according to the grid training data set to obtain a grid quality discrimination model.

[0015] Optionally, constructing a grid training data set includes:

[0016] Receive imported mesh data files;

[0017] Implementing a mapping function based on the custom grid tag and the grid data file; wherein the mapping function defines a correspondence between the grid data file and the tag number;

[0018] The grid data file is pre-processed to generate a grid training data set.

[0019] Optionally, the initial model of the graph neural network is trained according to the grid training data set to obtain a grid quality discrimination model, including:

[0020] Perform maximum and minimum value normalization operations on all grid feature matrices in the grid training data set to obtain a normalized data set;

[0021] The initial model of the graph neural network is trained according to the training conditions and the normalized data set to obtain a grid quality discrimination model; wherein the training conditions include: optimizing the model parameters using the AMSGrad optimizer; using cross entropy as the loss function and setting the L2 regularization rate to 0.0001; setting the batch size to 32; and setting the pooling rate of the pooling layer after each convolutional layer to 0.78.

[0022] Optionally, after determining the final category and the probability value of the final category according to the grid quality judgment result, the method further includes:

[0023] If the final category is that the mesh quality is poorly smooth or unevenly distributed, the mesh is optimized using smoothing or local transformation techniques;

[0024] If the final category is poor mesh distribution, too sparse mesh or uneven mesh, then optimization is performed through mesh refinement or encryption techniques;

[0025] If the final category is that the mesh is greatly distorted, resulting in poor mesh orthogonality, an adaptive algorithm is applied to adjust the mesh.

[0026] A second aspect of the present application provides a grid arbitration device based on domestic scientific computing software and a supercomputing system, comprising:

[0027] A first receiving unit is configured to receive a grid quality determination request from a user; wherein the grid quality determination request includes grid data;

[0028] A first pre-processing unit is used to pre-process the grid data to obtain a network feature matrix and an adjacency matrix;

[0029] The analysis unit is used to input the network feature matrix and the adjacency matrix into the grid quality discrimination model to obtain a grid quality discrimination result; wherein the grid quality discrimination result includes the probability of different categories of grid quality; the grid quality discrimination model includes a linear layer, a graph convolution module, a graph pooling module, a graph readout module, a graph aggregation module and a fully connected classification module; the linear layer performs a linear transformation on the network feature matrix to obtain target feature data; the graph convolution module performs feature extraction on the target feature data to obtain a convolved network feature matrix; the graph pooling module performs feature extraction on the convolved network feature matrix matrix and adjacency matrix to obtain the target network feature matrix and the target adjacency matrix; output a part of the target network feature matrix and a part of the target adjacency matrix to the graph readout module, and output the remaining part of the target network feature matrix and the remaining part of the target adjacency matrix to the graph convolution module of the next layer; the graph readout module processes the output of all graph pooling modules to obtain a graph aggregation result; the graph aggregation module takes the graph aggregation results at each level as input and outputs the graph representation vectors at each level; the fully connected classification module determines the probability of different categories of grid quality according to the graph representation vectors at each level;

[0030] A determination unit is used to determine a final category and a probability value of the final category according to the grid quality judgment result.

[0031] Optionally, the construction unit of the grid quality discrimination model includes:

[0032] Model building unit, used to build the initial model based on graph neural network;

[0033] A data set construction unit, used to construct a grid training data set;

[0034] The training unit is used to train the initial model of the graph neural network according to the grid training data set to obtain a grid quality discrimination model.

[0035] Optionally, the data set construction unit includes:

[0036] A second receiving unit, configured to receive an imported grid data file;

[0037] A mapping unit, configured to implement a mapping function based on a user-defined grid tag and the grid data file; wherein the mapping function defines a correspondence between the grid data file and the tag number;

[0038] The second pre-processing unit is used to perform pre-processing on the grid data file to generate a grid training data set.

[0039] Optionally, the training unit includes:

[0040] A normalization unit is used to perform maximum and minimum value normalization operations on all grid feature matrices in the grid training data set to obtain a normalized data set;

[0041] A training subunit is used to train the initial model of the graph neural network according to the training conditions and the normalized data set to obtain a grid quality discrimination model; wherein the training conditions include: optimizing the model parameters using the AMSGrad optimizer; using cross entropy as the loss function and setting the L2 regularization rate to 0.0001; setting the batch size to 32; and setting the pooling rate of the pooling layer after each convolutional layer to 0.78.

[0042] Optionally, the grid arbitration device based on domestic scientific computing software and supercomputing system further includes:

[0043] The first optimization unit is used to optimize the mesh by using smoothing processing or local transformation technology if the final category is that the mesh quality is poor in smoothness or uneven in mesh distribution;

[0044] The second optimization unit is used to optimize by mesh refinement or encryption technology if the final category is poor mesh distribution, too sparse mesh or uneven mesh;

[0045] The third optimization unit is used to apply an adaptive algorithm to adjust the grid if the final category is that the grid has a large distortion, resulting in poor grid orthogonality.

[0046] A third aspect of the present application provides an electronic device, including:

[0047] one or more processors;

[0048] a storage device having one or more programs stored thereon;

[0049] When the one or more programs are executed by the one or more processors, the one or more processors implement the grid arbitration method based on domestic scientific computing software and supercomputing system as described in any one of the first aspects.

[0050] The fourth aspect of the present application provides a computer storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the grid arbitration method based on domestic scientific computing software and supercomputing system as described in any one of the first aspects is implemented.

[0051] It can be seen from the above scheme that the present application provides a grid judgment method and device based on domestic scientific computing software and supercomputing systems. After receiving the user's grid quality judgment request, the grid data in the grid quality judgment request is pre-processed to obtain a network feature matrix and an adjacency matrix, and the network feature matrix and the adjacency matrix are input into the grid quality judgment model to obtain a grid quality judgment result; finally, the final category and the probability value of the final category are determined according to the grid quality judgment result, thereby realizing efficient and high-quality judgment of the grid quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0053] Figure 1 A specific flow chart of a grid arbitration method based on domestic scientific computing software and supercomputing systems provided in an embodiment of the present application;

[0054] Figure 2 A flowchart of a method for constructing a mesh quality discrimination model provided in another embodiment of the present application;

[0055] Figure 3 A flowchart of a method for constructing a grid training data set provided in another embodiment of the present application;

[0056] Figure 4 A flowchart of a model training method provided in another embodiment of the present application;

[0057] Figure 5 A schematic diagram of a grid arbitration device based on domestic scientific computing software and a supercomputing system provided in another embodiment of the present application;

[0058] Figure 6 A schematic diagram of an electronic device for implementing a grid arbitration method based on domestic scientific computing software and a supercomputing system, provided as another embodiment of the present application. DETAILED DESCRIPTION

[0059] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0060] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0061] It should be noted that the information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.

[0062] It should be noted that the concepts of "first" and "second" mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0063] It should be noted that the modifications of "one" and "multiple" mentioned in this application are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0064] The embodiment of the present application provides a grid arbitration method based on domestic scientific computing software and supercomputing system, such as Figure 1 As shown, the specific steps include:

[0065] S101: Receive a grid quality determination request from a user.

[0066] The mesh quality determination request includes mesh data.

[0067] In the actual application process of this application, the deployment and service of the model can be implemented through but not limited to TorchServe on a supercomputing system, which is not limited here.

[0068] The main steps to deploy a mesh quality assessment model include:

[0069] First, start the TorchServe service environment. Create a new config.properties file in the project folder, which describes the server configuration information. In the present invention, in order to process larger grids, the request size can be set to, but is not limited to, max_request_size=655350000 and max_response_size=655350000; at the same time, set the grid quality judgment port and server management port inference_address=http: / / 127.0.0.1:9543 and management_address=http: / / 127.0.0.1:6867 in the TorchServe server environment. After configuring the relevant parameters, start the TorchServe environment, specify the model folder as ModelStore in the startup command, and specify the configuration file as config.properties.

[0070] Users can request services by sending an HTTPS request to the port. The server responds with different functions based on the type of user request. For the mesh quality assessment task, users specify the deep learning model to be inferred through a POST request and include the mesh data in the request to send data to the cloud.

[0071] S102: Pre-process the grid data to obtain a network feature matrix and an adjacency matrix.

[0072] Specifically, the network feature matrix is directly converted into a tensor data structure as input to the cloud model, while the adjacency matrix undergoes further transformations: first, the adjacency matrix is converted to the coo sparse matrix format, and then the non-zero indices are converted to the 2*k tensor data format, where k is the number of elements in the adjacency matrix with a node value of 1. Because different batch sizes are specified during training, the batch indices of all nodes are set to 0 during inference. Specifically, the data converted to the 2*k tensor data format is converted into an N-dimensional all-zero matrix batch (data type long integer), which is then passed to the mesh quality discrimination model.

[0073] S103: Input the network feature matrix and the adjacency matrix into the mesh quality judgment model to obtain the mesh quality judgment result.

[0074] Among them, the mesh quality judgment results include the probabilities of different categories of mesh quality; the mesh quality judgment model includes a linear layer, a graph convolution module, a graph pooling module, a graph readout module, a graph aggregation module and a fully connected classification module.

[0075] The linear layer performs a linear transformation on the network feature matrix to obtain the target feature data; the graph convolution module extracts features from the target feature data to obtain the convolved network feature matrix; the graph pooling module convolves the network feature matrix and the adjacency matrix to obtain the target network feature matrix and the target adjacency matrix; a part of the target network feature matrix and a part of the target adjacency matrix are output to the graph readout module, and the remaining target network feature matrix and the remaining target adjacency matrix are output to the graph convolution module of the next layer; the graph readout module processes the output of all graph pooling modules to obtain the graph aggregation result; the graph aggregation module takes the graph aggregation results at each level as input and outputs the graph representation vectors at each level; the fully connected classification module determines the probability of grid quality of different categories based on the graph representation vectors at each level.

[0076] The linear layer performs a linear transformation on the network feature matrix to increase its dimension. For example, if the input feature has 6 channels, the output feature will have 16 channels after the transformation.

[0077] The graph convolution module extracts features from the target feature data and obtains the network feature matrix after convolution. The specific implementation method can be: perform normalization through LayerNorm: normalize each grid point feature of the feature matrix. Secondly, activate each feature, and the activation function adopted is the ReLU activation function. Then, the local information of the grid is aggregated through the graph convolution layer based on the attention mechanism. In order to perform the residual operation, the dimension of the linear transformation matrix in the convolution layer is 16*16. Finally, the input matrix of the graph convolution module and the feature matrix after convolution are added through the aggregation and addition operation to obtain the network feature matrix after convolution, and the network feature matrix after convolution is output to the matrix input of the graph pooling module. The graph convolution module does not involve the operation of the adjacency matrix. The adjacency matrix is directly input into the next module, namely the graph pooling module.

[0078] The graph pooling module extracts local features from the convolved grid. The main inputs to the graph pooling module are the post-convolution feature matrix and adjacency matrix. In this module, the neural network scores the feature importance of each node using vector projection. The dimension of the projection vector is 16. After scoring, a sorting operation is performed to select nodes above the 78% percentile for retention. Let the index of the retained node be idx. The feature matrix after the graph pooling layer is X[idx]@score, and the adjacency matrix is A[idx, idx], where score is the node score vector obtained through scoring. Part of the output of this part is output to the graph readout module, and part is output to the next layer of graph convolution module.

[0079] The graph readout module processes the outputs of all graph pooling modules to produce a graph aggregation result. This can be achieved by, but is not limited to, concatenating the feature vectors obtained by global average pooling and global maximum pooling to represent the grid structure. This concatenation method involves taking the outputs of global average pooling and global maximum pooling and concatenating them into a single feature vector whose dimension is the sum of the two.

[0080] The graph aggregation module takes the graph aggregation results at each level as input and outputs graph representation vectors at each level. A specific implementation method can be, but is not limited to, inputting the graph representation vectors at each level, with a dimension of 32. The model contains 25 layers, and the final concatenated output feature dimension is 800. This feature vector serves as the input to the fully connected classification module for final classification, which is not limited here.

[0081] The fully connected classification module determines the probabilities of different mesh quality categories based on the graph representation vectors at each level. A specific implementation method can be, but is not limited to, an 800-dimensional feature vector as input to the fully connected classification module. This module contains three linear activation layers with an input dimension of 800 and hidden layer dimensions of 200 and 3, resulting in an output feature dimension of 8. This 8-feature vector is then input to the Softmax module for probabilistic normalization, yielding the probability of the model belonging to different mesh quality categories (good or bad mesh orthogonality, good or bad mesh distribution, good or bad mesh smoothness).

[0082] S104: Determine the final category and the probability value of the final category according to the grid quality judgment result.

[0083] During the specific implementation of this application, the mesh quality discrimination result output by the mesh quality discrimination model will be returned to the TorchServe server. The server compares the index of the vector with the mapping of the index to the quality label in the index_to_name.json file to obtain the final category and the probability value of the final category.

[0084] It can be seen that the present invention realizes intelligent detection of grid quality through the grid quality discrimination model without manual intervention, ensuring a fully automated grid quality detection method, which not only improves the automation level of grid processing, but also promotes the further development of the grid automation processing flow.

[0085] It is understood that, in the specific implementation process of the present application, after obtaining the final category and the probability value of the final category, the grid may be optimized, and the following optimization methods may be used, but are not limited to:

[0086] If the final category is that the mesh quality is characterized by poor smoothness or uneven mesh distribution, the mesh is optimized using smoothing or local transformation technology to improve the smoothness and uniformity of the mesh.

[0087] If the final category is poor mesh distribution, too sparse mesh, or uneven mesh, mesh refinement or encryption technology is used to optimize the mesh distribution in the computational domain, thereby improving the accuracy of the calculation results.

[0088] If the final category is that the mesh is significantly distorted, resulting in poor mesh orthogonality, an adaptive algorithm is applied to adjust the mesh to improve the orthogonality of the mesh, thereby avoiding the occurrence of ill-conditioned matrix problems during the calculation and solution process.

[0089] Optionally, in another embodiment of the present application, an implementation method of a method for constructing a grid quality discrimination model is as follows: Figure 2 Shown, including:

[0090] S201. Build an initial model based on graph neural network.

[0091] In the specific implementation process of this application, the architecture of the initial model based on the graph neural network can be but is not limited to including: 6 sub-modules, a total of 25 layers of model structure.

[0092] The six submodules are: grid pre-processing module, graph convolution module, graph pooling module, graph readout module, aggregation module, and fully connected classification module. The grid pre-processing module is deployed on the client to convert grid data into graph data; the remaining modules are deployed on the supercomputing system to extract features from grid data and determine grid quality.

[0093] The mesh pre-processing module is used to read mesh data from surface mesh files in GRD format, convert it into graph data, and generate intermediate data representations: the mesh feature matrix X and the mesh topology matrix A. The mesh feature matrix X and the mesh topology matrix A serve as the input of the graph data and are sent to the supercomputing system for subsequent feature extraction.

[0094] The graph convolution module is a graph neural network layer composed of the following components in sequence: a LayerNorm regularization layer, a ReLU activation function, an attention-based graph convolution layer, and a feature summation layer. The attention-based graph convolution layer uses a single-head attention mechanism and contains 16 hidden layers. For the first graph convolution module, its input feature dimension is 6 (consistent with the dimension of the grid data feature matrix), and its output feature dimension is 16. The input and output feature dimensions of the remaining graph convolution modules are both 16. The graph convolution module is used to aggregate information from local cells in the grid data, and its output is sent to the graph pooling module.

[0095] The graph pooling module aggregates local information from mesh data. It uses a node-dropping pooling method and an attention mechanism to extract important regions within the mesh. During pooling, the module uses a downsampling ratio of 0.78 and a 16-dimensional projection vector to calculate the attention score on the graph. Sorted by attention scores, the module selects the top 78% of mesh points to form a new mesh feature map. The output of the graph pooling module serves as the input to the next graph convolution module for further mesh feature extraction.

[0096] The graph readout module is responsible for achieving a global representation of the entire grid. It consists of two parts: a global pooling module, which represents the grid data by calculating the average value of the features of all nodes on the grid; and a maximum pooling module, which represents the grid data by calculating the maximum value of the features of all nodes in the channel dimension. Finally, the graph readout module concatenates these two representation vectors to obtain a complete grid representation. The output of the graph readout module is input to the aggregation module, which aggregates the multi-layer graph representation.

[0097] The aggregation module is used to integrate mesh information from different hierarchical structures and achieve feature combination through vector concatenation. The output feature dimension of each graph pooling module is 32. Since the model contains a total of 25 layers, the input feature dimension of the aggregation module is 800. The output of the aggregation module is further passed to the fully connected classification module for final mesh quality judgment.

[0098] The fully connected classification module, used for the final mesh classification, consists of three layers of fully connected neural networks: the first layer has an input feature dimension of 800 and an output feature dimension of 200; the second layer has an input feature dimension of 200 and an output feature dimension of 3; and the third layer has an input feature dimension of 3 and an output feature dimension of 8. A BatchNorm structure is added after each linear layer to stabilize the training process. The output of the third layer is probabilistically normalized through a Softmax layer to obtain the probability of a mesh belonging to each quality category. Finally, the probability index is converted into the corresponding category label using the index_to_name module in TorchServer deployed on the supercomputing system.

[0099] It can be understood that the present invention comprehensively extracts high-dimensional grid features related to calculation accuracy from multiple dimensions by adopting four feature extraction modules composed of convolution layers with different numbers of channels and convolution kernel sizes, thereby ensuring the high accuracy of the detection results.

[0100] Furthermore, the present invention fully utilizes the data reading and writing speed of the CPU and the computing power of the GPU, splitting the grid quality detection system into five modules: grid processing, feature extraction, compression, classification, and result analysis, which are deployed on the client and supercomputing system respectively. By deploying the computationally intensive modules to the supercomputing system, the calculation process is significantly accelerated, reducing the computational burden and performance bottlenecks of traditional methods on the client. At the same time, the three compression modules compress high-dimensional features while retaining key feature information, further reducing the amount of computation and thus accelerating the grid quality detection process.

[0101] S202: Construct a grid training data set.

[0102] It's important to note that model training based on graph neural networks requires converting mesh data into graph data and constructing a dataset to train on specific mesh types. Before training, mesh data must be imported into the server. This data should contain mesh data with different mesh quality labels, with at least 1,000 mesh data for each quality label.

[0103] The large-scale grid training dataset constructed by the present invention provides rich training samples and parameter optimization space with strong generalization ability for the graph neural network-based model, further improving the accuracy of model detection based on the graph neural network and solving the problem of low accuracy of existing methods.

[0104] Optionally, in another embodiment of the present application, an implementation of step S202 is as follows: Figure 3 Shown, including:

[0105] S301: Receive an imported grid data file.

[0106] It should be noted that the supported mesh formats for imported mesh data files include STL for unstructured meshes and GRD for 2D surface meshes. Imported mesh files should be organized as datasets in a single folder. Meshes are categorized into eight categories based on orthogonality, smoothness, and distribution. If mesh quality evaluation for other categories is required, the model structure must be adjusted accordingly.

[0107] S302: Implement a mapping function based on the user-defined grid label and grid data file.

[0108] The mapping function defines the correspondence between the grid data file and the label number.

[0109] S303: Pre-process the grid data file to generate a grid training data set.

[0110] In the specific implementation process of this application, the mesh file is pre-processed by the mesh pre-processing module to generate a mesh dataset. The processing script of the mesh pre-processing module is preprocess, and its input parameters include: mesh data folder, the location of the imported mesh file; output folder, which saves the generated intermediate folder and the final mesh dataset folder. In the output folder, the model will output the following data: the feature matrix X of each mesh, stored in .npy format, which characterizes the geometric and topological characteristics of the mesh; the adjacency matrix A, stored in .npz format, which characterizes the topological connection relationship of the mesh. In the final generated mesh dataset folder, a .pt format file that supports PyTorch framework data loading is saved for training the mesh quality discrimination model.

[0111] S203. Train the initial model of the graph neural network according to the grid training data set to obtain a grid quality discrimination model.

[0112] Optionally, in another embodiment of the present application, an implementation of step S203 is as follows: Figure 4 Shown, including:

[0113] S401 , performing a maximum and minimum value normalization operation on all grid feature matrices in the grid training data set to obtain a normalized data set.

[0114] It is understandable that in order to avoid overfitting and oversmoothing during the training process, all grid feature matrices X in the grid data input to the model are normalized to their maximum and minimum values.

[0115] The specific steps can be as follows:

[0116] 1.1.1 Initialize the grid index vector i=1 and set the number of grid data in the grid dataset to M.

[0117] 1.1.2 For each grid data i, its feature matrix X i Contains m i *n-dimensional data. i represents the number of grid points in the grid data, and n represents the characteristic dimension of each grid point. In the present invention, the characteristics of the grid point are composed of the side length, maximum internal angle and side length ratio of the grid unit.

[0118] 1.1.3 Initializing the matrix X i The column index is j=1.

[0119] 1.1.4 For each matrix column X i,j , let X i,j,max is the maximum value of the column data, X i,j,min is the minimum value of the column data, then the normalization method result of this example data is Xi,j =(X i,j -X i,j,min [1, 1, 1, …, 1] T ) / (X i,j,max -X i,j,min ), where [1, 1, 1, …, 1] T is a column vector with length m i .

[0120] 1.1.5 Increment the index j. If j < n, go to 1.1.4; otherwise, go to 1.1.6.

[0121] 1.1.6 Increment the index i. If i < M, go to 1.1.3; otherwise, transfer the normalized dataset (including feature matrices X1, X2, ..., X M and adjacency matrices A1, A2, ..., A M ) and the defined neural network model from memory to video memory.

[0122] It can be understood that if the dataset is large and cannot be read into video memory at one time, then during training, part of the data is loaded into video memory separately, and the proportion of the loaded dataset is determined according to the user's video memory size and data size.

[0123] S402. Train the initial model of the graph neural network according to the training conditions and the normalized dataset to obtain a grid quality discrimination model.

[0124] Among them, the training conditions include: using the AMSGrad optimizer to optimize the model parameters; using cross-entropy as the loss function and setting the L2 regularization rate to 0.0001; setting the batch size to 32; setting the pooling rate of the pooling layer after each convolutional layer to 0.78.

[0125] In the specific implementation process of this application, model training can be carried out on a supercomputer system, which is not limited here.

[0126] In the specific implementation process of this application, after the model training is completed, the trained model (grid quality discrimination model) can be packaged for release. The packaged file includes: the handler function of the preprocessing module, the model file model.pt, and the mapping file index_to_name.json from index to name. Specify the parameters, version, etc. of the model during packaging. Place the generated.mar file in the specified ModelStore path so that TorchServe can detect and load the model file.

[0127] In the actual application process of this application, the hardware deployed by the grid arbitration device based on domestic scientific computing software and supercomputing system can be Intel Core i7-12700H CPU with 40G memory; the environment of the supercomputing system is xxx. The training grid constructed by Pointwise2023.1 can be used, which contains 10,000 training grids, and the grid data is stored in GRD format. The grid data set is divided according to the method of the present invention, that is, the training set contains 6,000 grids, the validation set contains 2,000 grids, and the test set contains 2,000 grids. The model is trained using the method of the present invention and tested on a test machine with 2,000 grids. The discrimination accuracy of the model for different grid quality measurement indicators is shown in Table 1:

[0128] Table 1

[0129] Mesh quality Discrimination accuracy Grid orthogonality 99.81% Mesh smoothness 88.16% Grid distribution 99.21%

[0130] The discrimination accuracy of different mesh categories is shown in Table 2, where W represents a high-quality mesh, O represents the orthogonality of the mesh, S represents the smoothness of the mesh, D represents the distribution of the mesh, and N represents the inversion operation. For example, N-OSD represents a mesh with poor orthogonality, smoothness, and distribution.

[0131] Table 2

[0132] Grid Category W NO NS ND N-OS N-OD N-SD N-OSD W 99.22% 0.00% 0.73% 0.09% 0.00% 0.00% 0.00% 0.00% NO 0.00% 94.80% 0.00% 0.00% 4.23% 0.71% 0.00% 0.00% NS 13.28% 0.00% 87.18% 0.00% 0.00% 0.00% 0.00% 0.00% ND 0.78% 0.00% 0.00% 97.25% 0.00% 0.00% 0.00% 0.00% N-OS 0.00% 13.60% 0.73% 0.00% 85.00% 0.35% 0.00% 0.00% N-OD 0.00% 0.40% 0.00% 0.00% 0.00% 93.97% 0.00% 0.00% N-SD 0.00% 0.00% 1.10% 9.02% 0.00% 88.79% 0.00% 0.00% N-OSD 0.00% 0.00% 0.00% 0.77% 0.00% 6.67% 0.00% 87.92%

[0133] Table 2 shows the confusion matrix of the model's predictions, with rows representing true labels and columns representing predicted labels. The experimental results show that the present invention achieves high accuracy on the dataset. For high-quality meshes, the present invention achieves the highest accuracy of 99.22%. The present invention can easily classify meshes with poor orthogonality and distribution. For different mesh types, the accuracy is consistently above 85%, demonstrating the effectiveness of the present invention in mesh quality assessment.

[0134] It can be seen from the above scheme that the present application provides a grid judgment method based on domestic scientific computing software and supercomputing systems. After receiving the user's grid quality judgment request, the grid data in the grid quality judgment request is pre-processed to obtain a network feature matrix and an adjacency matrix, and the network feature matrix and the adjacency matrix are input into the grid quality judgment model to obtain a grid quality judgment result. Finally, the final category and the probability value of the final category are determined according to the grid quality judgment result, thereby realizing efficient and high-quality judgment of the grid quality.

[0135] Another embodiment of the present application provides a grid arbitration device based on domestic scientific computing software and supercomputing system, such as Figure 5 As shown, specifically including:

[0136] The first receiving unit 501 is configured to receive a grid quality determination request from a user.

[0137] The mesh quality determination request includes mesh data.

[0138] The first pre-processing unit 502 is used to perform pre-processing on the grid data to obtain a network feature matrix and an adjacency matrix.

[0139] The analysis unit 503 is used to input the network feature matrix and the adjacency matrix into the mesh quality judgment model to obtain a mesh quality judgment result.

[0140] Among them, the grid quality judgment result includes the probability of grid quality of different categories; the grid quality judgment model includes a linear layer, a graph convolution module, a graph pooling module, a graph readout module, a graph aggregation module and a fully connected classification module; the linear layer performs a linear transformation on the network feature matrix to obtain the target feature data; the graph convolution module performs feature extraction on the target feature data to obtain the convolved network feature matrix; the graph pooling module obtains the target network feature matrix and the target adjacency matrix on the convolved network feature matrix and the adjacency matrix; a part of the target network feature matrix and a part of the target adjacency matrix are output to the graph readout module, and the remaining part of the target network feature matrix and the remaining part of the target adjacency matrix are output to the graph convolution module of the next layer; the graph readout module processes the output of all graph pooling modules to obtain the graph aggregation result; the graph aggregation module takes the graph aggregation results at each level as input and outputs the graph representation vectors at each level; the fully connected classification module determines the probability of grid quality of different categories based on the graph representation vectors at each level.

[0141] The determination unit 504 is configured to determine a final category and a probability value of the final category according to the mesh quality determination result.

[0142] For the specific working process of the units disclosed in the above embodiments of the present application, please refer to the corresponding method embodiments, such as Figure 1 As shown, no further details are given here.

[0143] Optionally, in another embodiment of the present application, an implementation of a construction unit of a grid quality discrimination model includes:

[0144] Model building unit, used to build an initial model based on graph neural network.

[0145] The dataset construction unit is used to construct the grid training dataset.

[0146] The training unit is used to train the initial model of the graph neural network according to the grid training data set to obtain a grid quality discrimination model.

[0147] The specific working process of the units disclosed in the above embodiments of this application can be found in the corresponding method embodiments, such as Figure 2 As shown, no further details are given here.

[0148] Optionally, in another embodiment of the present application, an implementation of the data set construction unit includes:

[0149] The second receiving unit is used to receive the imported grid data file.

[0150] The mapping unit is used to implement the mapping function according to the customized grid label and grid data file.

[0151] The mapping function defines the correspondence between the grid data file and the label number.

[0152] The second pre-processing unit is used to perform pre-processing on the grid data file to generate a grid training data set.

[0153] For the specific working process of the units disclosed in the above embodiments of the present application, please refer to the corresponding method embodiments, such as Figure 3 As shown, no further details are given here.

[0154] Optionally, in another embodiment of the present application, an implementation of the training unit includes:

[0155] The normalization unit is used to perform maximum and minimum value normalization operations on all grid feature matrices in the grid training data set to obtain a normalized data set.

[0156] The training subunit is used to train the initial model of the graph neural network according to the training conditions and the normalized data set to obtain a grid quality discrimination model.

[0157] The training conditions include: using AMSGrad optimizer to optimize model parameters; using cross entropy as the loss function and setting the L2 regularization rate to 0.0001; setting the batch size to 32; and setting the pooling rate of the pooling layer after each convolutional layer to 0.78.

[0158] For the specific working process of the units disclosed in the above embodiments of the present application, please refer to the corresponding method embodiments, such as Figure 4 As shown, no further details are given here.

[0159] Optionally, in another embodiment of the present application, an implementation of a grid arbitration device based on domestic scientific computing software and a supercomputing system further includes:

[0160] The first optimization unit is used to optimize the mesh by using smoothing or local transformation technology if the final category is that the mesh quality is poor in smoothness or uneven in mesh distribution;

[0161] The second optimization unit is used to optimize by mesh refinement or encryption technology if the final category is poor mesh distribution, too sparse mesh or uneven mesh;

[0162] The third optimization unit is used to apply an adaptive algorithm to adjust the grid if the final category is that the grid has a large distortion, resulting in poor grid orthogonality.

[0163] It can be seen from the above scheme that the present application provides a grid judgment device based on domestic scientific computing software and supercomputing systems. After the first receiving unit receives the user's grid quality judgment request; the first pre-processing unit 502 pre-processes the grid data in the grid quality judgment request to obtain a network feature matrix and an adjacency matrix, and the analysis unit 503 inputs the network feature matrix and the adjacency matrix into the grid quality judgment model to obtain a grid quality judgment result; finally, the determination unit 504 determines the final category and the probability value of the final category according to the grid quality judgment result, thereby realizing efficient and high-quality judgment of the grid quality.

[0164] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0165] Another embodiment of the present application provides an electronic device, such as Figure 6 Shown, including:

[0166] One or more processors 601 .

[0167] The storage device 602 stores one or more programs.

[0168] When the one or more programs are executed by the one or more processors 601, the one or more processors 601 implement the grid arbitration method based on domestic scientific computing software and supercomputing system as described in the above embodiment.

[0169] Another embodiment of the present application provides a computer storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the grid arbitration method based on domestic scientific computing software and supercomputing system as described in the above embodiment is implemented.

[0170] In the context of this application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0171] It should be noted that the computer-readable medium referred to in this application may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable storage media may include, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or component. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wire, optical cable, RF (radio frequency), or any suitable combination thereof.

[0172] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0173] Another embodiment of the present application provides a computer program product, which, when executed, is used to execute the above-mentioned grid arbitration method based on domestic scientific computing software and supercomputing system.

[0174] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, the above-mentioned functions defined in the method of the embodiment of the present application are performed.

[0175] Although the subject matter has been described in terms of structural features and / or method logic actions, it should be understood that the subject matter defined in this application is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing this application.

[0176] Although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this application. Certain features described in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented in multiple embodiments individually or in any suitable sub-combination.

[0177] The above description is merely a preferred embodiment of the present application and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of application of this application is not limited to technical solutions formed by a specific combination of the aforementioned technical features. It also encompasses other technical solutions formed by any combination of the aforementioned technical features or their equivalents, without departing from the aforementioned application concept. For example, a technical solution formed by replacing the aforementioned features with (but not limited to) technical features with similar functions claimed in this application.

Claims

1. A grid arbitration method based on domestic scientific computing software and supercomputing system, characterized in that: include: Receiving a grid quality determination request from a user; wherein the grid quality determination request includes grid data; Pre-processing the grid data to obtain a network feature matrix and an adjacency matrix; The network feature matrix and the adjacency matrix are input into the grid quality discrimination model to obtain a grid quality discrimination result; wherein, the grid quality discrimination result includes the probabilities of different categories of grid quality; the grid quality discrimination model includes a linear layer, a graph convolution module, a graph pooling module, a graph readout module, a graph aggregation module and a fully connected classification module; the linear layer performs a linear transformation on the network feature matrix to obtain target feature data; the graph convolution module performs feature extraction on the target feature data to obtain a convolved network feature matrix; the graph pooling module performs feature extraction on the convolved network feature matrix and the adjacency matrix to obtain a target network feature matrix and a target adjacency matrix; a part of the target network feature matrix and a part of the target adjacency matrix are output to the graph readout module, and the remaining part of the target network feature matrix and the remaining part of the target adjacency matrix are output to the graph convolution module of the next layer; the graph readout module processes the outputs of all graph pooling modules to obtain a graph aggregation result; the graph aggregation module takes the graph aggregation results at each level as input and outputs the graph representation vectors of each level; the fully connected classification module determines the probabilities of different categories of grid quality according to the graph representation vectors of each level; The final category and the probability value of the final category are determined according to the grid quality judgment result.

2. The grid arbitration method based on domestic scientific computing software and supercomputing system according to claim 1 is characterized in that: The method for constructing the grid quality discrimination model includes: Build an initial model based on graph neural network; Construct a grid training dataset; The initial model of the graph neural network is trained according to the grid training data set to obtain a grid quality discrimination model.

3. The grid arbitration method based on domestic scientific computing software and supercomputing system according to claim 2 is characterized in that: The step of constructing a grid training data set includes: Receive imported mesh data files; Implementing a mapping function based on the custom grid tag and the grid data file; wherein the mapping function defines a correspondence between the grid data file and the tag number; The grid data file is pre-processed to generate a grid training data set.

4. The grid arbitration method based on domestic scientific computing software and supercomputing system according to claim 2 is characterized in that: The initial model of the graph neural network is trained according to the grid training data set to obtain a grid quality discrimination model, including: Perform maximum and minimum value normalization operations on all grid feature matrices in the grid training data set to obtain a normalized data set; The initial model of the graph neural network is trained according to the training conditions and the normalized data set to obtain a grid quality discrimination model; wherein the training conditions include: optimizing the model parameters using the AMSGrad optimizer; using cross entropy as the loss function and setting the L2 regularization rate to 0.0001; setting the batch size to 32; and setting the pooling rate of the pooling layer after each convolutional layer to 0.

78.

5. The grid arbitration method based on domestic scientific computing software and supercomputing system according to claim 1 is characterized in that: After determining the final category and the probability value of the final category according to the grid quality judgment result, the method further includes: If the final category is that the mesh quality is poorly smooth or unevenly distributed, the mesh is optimized using smoothing or local transformation techniques; If the final category is poor mesh distribution, too sparse mesh or uneven mesh, then optimization is performed through mesh refinement or encryption techniques; If the final category is that the mesh is greatly distorted, resulting in poor mesh orthogonality, an adaptive algorithm is applied to adjust the mesh.

6. A grid arbitration device based on domestic scientific computing software and supercomputing system, characterized in that: include: A first receiving unit is configured to receive a grid quality determination request from a user; wherein the grid quality determination request includes grid data; A first pre-processing unit is used to pre-process the grid data to obtain a network feature matrix and an adjacency matrix; The analysis unit is used to input the network feature matrix and the adjacency matrix into the grid quality discrimination model to obtain a grid quality discrimination result; wherein the grid quality discrimination result includes the probability of different categories of grid quality; the grid quality discrimination model includes a linear layer, a graph convolution module, a graph pooling module, a graph readout module, a graph aggregation module and a fully connected classification module; the linear layer performs a linear transformation on the network feature matrix to obtain target feature data; the graph convolution module performs feature extraction on the target feature data to obtain a convolved network feature matrix; the graph pooling module performs feature extraction on the convolved network feature matrix matrix and adjacency matrix to obtain the target network feature matrix and the target adjacency matrix; output a part of the target network feature matrix and a part of the target adjacency matrix to the graph readout module, and output the remaining part of the target network feature matrix and the remaining part of the target adjacency matrix to the graph convolution module of the next layer; the graph readout module processes the output of all graph pooling modules to obtain a graph aggregation result; the graph aggregation module takes the graph aggregation results at each level as input and outputs the graph representation vectors at each level; the fully connected classification module determines the probability of different categories of grid quality according to the graph representation vectors at each level; A determination unit is used to determine a final category and a probability value of the final category according to the grid quality judgment result.

7. The grid arbitration device based on domestic scientific computing software and supercomputing system according to claim 6 is characterized in that: The construction unit of the grid quality discrimination model includes: Model building unit, used to build the initial model based on graph neural network; A data set construction unit, used to construct a grid training data set; The training unit is used to train the initial model of the graph neural network according to the grid training data set to obtain a grid quality discrimination model.

8. The grid arbitration device based on domestic scientific computing software and supercomputing system according to claim 7, characterized in that: The data set construction unit includes: A second receiving unit, configured to receive an imported grid data file; A mapping unit, configured to implement a mapping function based on a user-defined grid tag and the grid data file; wherein the mapping function defines a correspondence between the grid data file and the tag number; The second pre-processing unit is used to perform pre-processing on the grid data file to generate a grid training data set.

9. The grid arbitration device based on domestic scientific computing software and supercomputing system according to claim 7, characterized in that: The training unit comprises: A normalization unit is used to perform maximum and minimum value normalization operations on all grid feature matrices in the grid training data set to obtain a normalized data set; A training subunit is used to train the initial model of the graph neural network according to the training conditions and the normalized data set to obtain a grid quality discrimination model; wherein the training conditions include: optimizing the model parameters using the AMSGrad optimizer; using cross entropy as the loss function and setting the L2 regularization rate to 0.0001; setting the batch size to 32; and setting the pooling rate of the pooling layer after each convolutional layer to 0.

78.

10. The grid arbitration device based on domestic scientific computing software and supercomputing system according to claim 6, characterized in that: Also includes: The first optimization unit is used to optimize the mesh by using smoothing processing or local transformation technology if the final category is that the mesh quality is poor in smoothness or uneven in mesh distribution; The second optimization unit is used to optimize by mesh refinement or encryption technology if the final category is poor mesh distribution, too sparse mesh or uneven mesh; The third optimization unit is used to apply an adaptive algorithm to adjust the grid if the final category is that the grid has a large distortion, resulting in poor grid orthogonality.