A model training method, a service execution method, a device, and a storage medium
By constructing the initial graph of the target object and training the model, predicting the updated attribute information, the problem that existing simulation tools are difficult to capture local features is solved, and the simulation accuracy and efficiency are improved.
Patent Information
- Application Number
- CN202411327541.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2044-09-23
AI Technical Summary
Existing simulation tools are difficult to effectively capture local features of objects, resulting in low simulation accuracy.
By constructing the initial graph of the target object, input external control information into the target model, predict the updated attribute information, and determine the loss value based on the deviation for model training to obtain rich attribute information and node association relationships.
It improves the prediction accuracy and simulation efficiency of the target model, and can quickly capture local features of objects under external control.
Smart Images

Figure CN119274017B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular, to a model training method, a service execution method, an apparatus, and a storage medium. Background Art
[0002] In recent years, with the rapid development of computer technology, simulation technology has made remarkable progress, and simulation tools have emerged in an endless stream. Currently, simulation tools often simulate and analyze objects based on the finite element method, that is, by decomposing an object into many small parts (called finite elements) and analyzing based on these finite elements, so as to simulate the behavior and performance of the object under different conditions.
[0003] For example, a simulation tool can be used to simulate the behavior of an object under various external control conditions (such as pressure change, temperature change, etc.), so as to analyze the deformation process of the object under the action of pressure, the heating and curing process of composite materials, etc.
[0004] However, when using existing simulation tools for simulation, it is often unable to effectively capture the local features of an object, resulting in low simulation accuracy. Summary of the Invention
[0005] This specification provides a model training method, a service execution method, an apparatus, and a storage medium to partially solve the above problems existing in the prior art.
[0006] This specification adopts the following technical solutions:
[0007] This specification provides a model training method, including:
[0008] Obtain an initial graph of a target object, where the initial graph is a heterogeneous graph composed of multiple nodes and edges between the nodes. Each node records the initial attribute information corresponding to the node. The nodes include vertex nodes and grid unit nodes. Each grid unit node corresponds to a grid unit divided in the target object. The grid unit corresponding to the grid unit node is a closed area surrounded by vertices corresponding to multiple vertex nodes. The initial attribute information corresponding to the grid unit node includes the initial material attribute information and the initial unit state information corresponding to the target object at the grid unit. The initial attribute information corresponding to each vertex node includes the initial position information and the initial vertex state information corresponding to the target object at the vertex corresponding to the vertex node. The edge between any two nodes is used to represent the node association relationship between the two nodes in the target object;
[0009] Input the initial graph and the preset external control information into the target model to be trained, so that the target model predicts the updated attribute information corresponding to each node of the target object under the external control corresponding to the external control information according to the initial graph, and update the initial graph according to the updated attribute information to obtain an updated graph;
[0010] Determine a loss value according to the deviation between the updated attribute information corresponding to each node in the updated graph and the label attribute information corresponding to each node in the label graph corresponding to the target object, and train the target model according to the loss value. There is a positive correlation between the loss value and the deviation.
[0011] Optionally, obtaining the initial graph of the target object specifically includes:
[0012] Perform finite element mesh division on the target object to obtain each mesh unit corresponding to the target object;
[0013] For each mesh unit, construct a mesh unit node corresponding to the mesh unit based on the initial material attribute information and initial unit state information corresponding to the target object at the mesh unit, and for each vertex, construct a vertex node corresponding to the vertex based on the initial position information and initial vertex state information corresponding to the target object at the vertex;
[0014] Based on the association relationship between each mesh unit and each vertex in the target object, construct edges between each mesh unit node and each vertex node to obtain the initial graph of the target object.
[0015] Optionally, inputting the initial graph and the preset external control information into the target model to be trained, so that the target model predicts the updated attribute information corresponding to each node of the target object under the external control corresponding to the external control information according to the initial graph specifically includes:
[0016] Input the initial graph and the preset external control information into the target model to be trained, so that the target model determines the attribute association relationship between different initial attribute information corresponding to each node, and predicts the updated attribute information corresponding to each node of the target object under the external control corresponding to the external control information according to the node association relationship corresponding to each edge included in the initial graph and the attribute association relationship corresponding to each node.
[0017] Optionally, determining the loss value according to the deviation between the updated attribute information corresponding to each node in the updated graph and the label attribute information corresponding to each node in the label graph corresponding to the target object specifically includes:
[0018] Determine a first loss value based on the deviation between the updated attribute information corresponding to each node in the updated graph and the label attribute information corresponding to each node in the label graph corresponding to the target object, and determine a second loss value based on the preset physical constraint information and the updated attribute information corresponding to at least some nodes in the updated graph, where there is a positive correlation between the first loss value and the deviation, and the smaller the second loss value is when the updated attribute information corresponding to at least some nodes in the updated graph better conforms to the physical constraint conditions corresponding to the physical constraint information;
[0019] Determine a loss value according to the first loss value and the second loss value.
[0020] This specification provides a service execution method, including:
[0021] Obtain an initial graph of the object to be simulated. The initial graph is a heterogeneous graph composed of multiple nodes and the edges between the nodes. Each node records the initial attribute information corresponding to the node. The nodes include vertex nodes and grid cell nodes. Each grid cell node corresponds to a grid cell divided in the object to be simulated. The grid cell corresponding to the grid cell node is a closed area surrounded by the vertices corresponding to multiple vertex nodes. The initial attribute information corresponding to the grid cell node includes the initial material attribute information and the initial cell state information corresponding to the object to be simulated at this grid cell. The initial attribute information corresponding to each vertex node includes the initial position information and the initial vertex state information corresponding to the vertex corresponding to the vertex node in the object to be simulated. The edge between any two nodes is used to represent the node association relationship between the two nodes in the object to be simulated;
[0022] Input the initial graph and the preset external control information into a pre-trained target model, so that the target model predicts the updated attribute information corresponding to each node of the object to be simulated under the external control corresponding to the external control information according to the initial graph, and update the initial graph according to the updated attribute information to obtain an updated graph. The target model is trained by the above model training method;
[0023] Execute a target simulation service on the object to be simulated according to the attribute information corresponding to each node included in the updated graph.
[0024] Optionally, inputting the initial graph and the preset external control information into a pre-trained target model, so that the target model predicts the updated attribute information corresponding to each node of the object to be simulated under the external control corresponding to the external control information according to the initial graph, specifically includes:
[0025] Input the initial graph and the preset external control information into a pre-trained target model, so that for each node, the target model determines the attribute association relationship between different initial attribute information corresponding to the node, and predicts the updated attribute information corresponding to each node of the object to be simulated under the external control corresponding to the external control information according to the node association relationship corresponding to each edge included in the initial graph and the attribute association relationship corresponding to each node.
[0026] This specification provides a model training device, including:
[0027] An acquisition module: used to acquire the initial graph of the target object. The initial graph is a heterogeneous graph composed of multiple nodes and edges between the nodes. Each node records the initial attribute information corresponding to the node. The nodes include vertex nodes and grid cell nodes. Each grid cell node corresponds to a grid cell divided in the target object. The grid cell corresponding to the grid cell node is a closed area surrounded by vertices corresponding to multiple vertex nodes. The initial attribute information corresponding to the grid cell node includes the initial material attribute information and the initial cell state information corresponding to the target object at the grid cell. The initial attribute information corresponding to each vertex node includes the initial position information and the initial vertex state information corresponding to the vertex of the target object at the vertex node corresponding to the vertex node. The edge between any two nodes is used to represent the node association relationship between the two nodes in the target object;
[0028] A prediction module: used to input the initial graph and the preset external control information into the target model to be trained, so that the target model predicts the updated attribute information corresponding to each node of the target object under the external control corresponding to the external control information according to the initial graph, and updates the initial graph according to the updated attribute information to obtain an updated graph;
[0029] A training module: used to determine a loss value according to the deviation between the updated attribute information corresponding to each node in the updated graph and the labeled attribute information corresponding to each node in the labeled graph corresponding to the target object, and train the target model according to the loss value. The loss value has a positive correlation with the deviation.
[0030] This specification provides a service execution device, including:
[0031] Acquisition module: It is used to acquire the initial graph of the object to be simulated. The initial graph is a heterogeneous graph composed of multiple nodes and the edges between each node. Each node records the initial attribute information corresponding to that node. The nodes include vertex nodes and grid cell nodes. Each grid cell node corresponds to a grid cell divided in the object to be simulated. The grid cell corresponding to the grid cell node is a closed area surrounded by the vertices corresponding to multiple vertex nodes. The initial attribute information corresponding to the grid cell node includes the initial material attribute information and the initial cell state information corresponding to the object to be simulated at this grid cell. The initial attribute information corresponding to each vertex node includes the initial position information and the initial vertex state information corresponding to the vertex corresponding to this vertex node. The edge between any two nodes is used to represent the node association relationship between these two nodes in the object to be simulated;
[0032] Prediction module: It is used to input the initial graph and the preset external control information into the pre-trained target model, so that the target model predicts the updated attribute information corresponding to each node of the object to be simulated under the external control corresponding to the external control information according to the initial graph, and updates the initial graph according to the updated attribute information to obtain the updated graph. The target model is trained by the above model training method;
[0033] Execution module: It is used to execute the target simulation service on the object to be simulated according to the attribute information corresponding to each node included in the updated graph.
[0034] This specification provides a computer-readable storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, it implements the above model training method or service execution method.
[0035] This specification provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the above model training method or service execution method.
[0036] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:
[0037] The model training method provided in this specification can obtain the initial graph of the target object, input the initial graph and the preset external control information into the target model to be trained, so that the target model can predict the updated attribute information corresponding to each node of the target object under the external control corresponding to the external control information according to the initial graph, update the initial graph according to the updated attribute information to obtain the updated graph, determine the loss value according to the deviation between the updated attribute information corresponding to each node in the updated graph and the labeled attribute information corresponding to each node in the labeled graph corresponding to the target object, and train the target model according to the loss value.
[0038] It can be seen from this that in the above model training process, the target model can obtain relatively rich attribute information corresponding to each grid cell node and each vertex node from the initial graph of the target object. In addition, it can also obtain the node association relationship between each grid cell node and each vertex node from the initial graph. Furthermore, it can predict the updated attribute information of each node corresponding to the target object under the external control according to the relatively rich attribute information and each node association relationship obtained, thereby greatly improving the prediction accuracy of the target model. In addition, through the above target model, relatively rich local features corresponding to the target object under the external control can be quickly predicted, and thus the prediction efficiency of the target model is also greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings described herein are used to provide a further understanding of this specification, and constitute a part of this specification. The schematic embodiments of this specification and their descriptions are used to explain this specification and do not constitute an improper limitation of this specification. In the drawings:
[0040] Figure 1 is a schematic flowchart of a model training method provided in this specification;
[0041] Figure 2 is a schematic diagram of an initial graph provided in this specification;
[0042] Figure 3 is a schematic flowchart of a service execution method provided in this specification;
[0043] Figure 4 is a schematic diagram of a model training device provided in this specification;
[0044] Figure 5 is a schematic diagram of a service execution device provided in this specification;
[0045] Figure 6 is provided in this specification corresponding to Figure 1 or Figure 3 is a schematic structural diagram of an electronic device. Detailed implementation manners
[0046] To make the objectives, technical solutions and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only a part rather than all of the embodiments of this specification. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this specification without creative efforts shall fall within the scope of protection of this specification.
[0047] In recent years, with the rapid development of computer technology, simulation technology has made remarkable progress, and simulation tools have emerged in an endless stream. Currently, simulation tools often simulate and analyze objects based on the finite element method, that is, by decomposing an object into many small parts (called finite elements) and analyzing based on these finite elements to simulate the behavior and performance of the object under different conditions. For example, the behavior of an object under various external controls (such as pressure changes, temperature changes, etc.) can be simulated by a simulation tool to analyze the deformation process of the object under pressure, the heating and curing process of composite materials, etc. However, when using existing simulation tools for simulation, the local characteristics of the object are often not effectively captured, resulting in low simulation accuracy.
[0048] Therefore, this specification provides a model training method, which can effectively solve the problems in the prior art.
[0049] The following will, with reference to the drawings, detail the technical solutions provided by each embodiment of this specification.
[0050] Figure 1 FIG. is a schematic flow chart of a model training method provided in this specification, including the following steps:
[0051] S101: Obtain an initial graph of a target object, where the initial graph is a heterogeneous graph composed of multiple nodes and edges between the nodes. Each node records the initial attribute information corresponding to the node. The nodes include vertex nodes and mesh unit nodes. Each mesh unit node corresponds to a mesh unit divided in the target object. The mesh unit corresponding to the mesh unit node is a closed area surrounded by vertices corresponding to multiple vertex nodes. The initial attribute information corresponding to the mesh unit node includes the initial material attribute information and initial unit state information corresponding to the target object at this mesh unit. The initial attribute information corresponding to each vertex node includes the initial position information and initial vertex state information corresponding to the target object at the vertex corresponding to the vertex node. The edge between any two nodes is used to represent the node association relationship between the two nodes in the target object.
[0052] The execution subject of the model training method involved in this specification can be a terminal device such as a desktop computer or a laptop computer, or a client installed in the terminal device, or a server. Hereinafter, only taking the server as the execution subject as an example, the model training method in the embodiments of this specification will be described.
[0053] In this specification, the server can first obtain an initial graph of a target object, and use the obtained initial graph as sample data to train a target model, so as to execute corresponding simulation services based on the output result of the trained target model. Among them, the initial graph is a heterogeneous graph composed of multiple nodes and the edges between each node. The edge between any two nodes can be used to represent the node association relationship between these two nodes in the target object. Correspondingly, in the initial graph, for each node, the initial attribute information corresponding to the node is recorded in the node. And the nodes in the initial graph can be divided into two types: vertex nodes and grid cell nodes. Among them, each grid cell node corresponds to a grid cell divided in the target object, and the grid cell corresponding to each grid cell node is a closed area surrounded by the vertices corresponding to multiple vertex nodes. The initial graph of the target object can be specifically referred to as follows Figure 2 .
[0054] Figure 2 is a schematic diagram of an initial graph provided in this specification.
[0055] As Figure 2 can be seen, the target object can correspond to multiple divided grid cells. The grid cell is a closed area surrounded by eight vertices. Correspondingly, in the initial graph of the target object, it includes grid cell nodes corresponding to each grid cell and vertex nodes corresponding to each vertex. Among them, the vertex node corresponding to each vertex can be connected to the grid cell node corresponding to the grid cell where the vertex is located. At the same time, the vertex node corresponding to each vertex can also be connected to the vertex nodes corresponding to the adjacent vertices of the vertex. And the grid cell node corresponding to each grid cell can be connected to the grid cell node corresponding to the adjacent grid cell of the grid cell. Of course, Figure 2 is just a form of the initial graph. In practical applications, different initial graphs can be obtained according to actual needs, and this specification will not list them one by one here.
[0056] In the initial graph, the initial attribute information corresponding to the grid cell nodes may include the initial material attribute information and the initial cell state information corresponding to the target object at this grid cell. The material attribute information may refer to the thermal conductivity, specific heat capacity, hardness, Young's modulus, Poisson's ratio, etc. corresponding to the target object at the grid cell, and the cell state information may refer to the temperature, degree of curing, stress, etc. corresponding to the target object at the grid cell. The initial material attribute information refers to the material attribute information of the target object at the initial time (i.e., without external control), and the initial cell state information refers to the cell state information of the target object at the initial time (i.e., without external control). In the above description of the material attribute information and the cell state information, the state of the target object is not distinguished, that is, it can be either an explanation of the initial material attribute information and the initial cell state information of the target object at the initial time (i.e., without external control), or an explanation of the material attribute information and the cell state information of the target object under external control (i.e., the updated attribute information corresponding to the grid cell nodes mentioned later).
[0057] For each vertex node, the initial attribute information corresponding to this vertex node may include the initial position information (e.g., coordinate information) of the target object at the vertex corresponding to this vertex node and the initial vertex state information. The vertex state information may refer to the temperature, stress, etc. of the target object at the vertex. The initial vertex state information refers to the vertex state information of the target object at the initial time (i.e., without external control). In the above description of the vertex state information, the state of the target object is not distinguished, that is, it can be either an explanation of the initial vertex state information of the target object at the initial time (i.e., without external control), or an explanation of the vertex state information of the target object under external control (i.e., the updated attribute information corresponding to the vertex nodes mentioned later).
[0058] For example, in order to simulate the curing situation of a target object (such as an epoxy resin-based composite material) under heating conditions, an initial graph corresponding to the epoxy resin-based composite material can be constructed. In the initial graph corresponding to the epoxy resin-based composite material, the initial attribute information corresponding to the vertex nodes in the initial graph may include the initial coordinate information of the target object at the vertex corresponding to this vertex node and the initial temperature at the vertex corresponding to this vertex node. The initial attribute information corresponding to the grid cell nodes in the initial graph may include the initial temperature (the average of the temperatures at each vertex in this grid cell), the initial degree of curing, the initial curing rate, and the initial thermal conductivity of the target object at the grid cell corresponding to this grid cell node. The corresponding node association relationships in this initial graph may be, for example, the association relationships of the positions of each node, the heat conduction relationships between the temperatures corresponding to each node, etc.
[0059] For another example, in order to simulate the deformation of a target object (such as polymer materials like plastics and rubbers) under pressure, an initial graph corresponding to the polymer materials such as plastics and rubbers can be constructed. Among them, the attribute information corresponding to the vertex nodes in the initial graph can include the initial coordinate information of the target object at the vertex corresponding to the vertex node, the initial stress and initial strain at the vertex corresponding to the vertex node. The attribute information corresponding to the mesh element nodes in the initial graph includes the initial stress (the average stress at each vertex in the mesh element), the initial strain (the average strain at each vertex in the mesh element), the initial Young's modulus, and the initial Poisson's ratio of the target object at the mesh element corresponding to the mesh element node. The node association relationships in the initial graph can be, for example, the association relationships of the positions of the nodes, the association relationships between the stresses corresponding to the nodes, and the association relationships between the strains.
[0060] It should be noted that the initial graph of the above-mentioned target object can be directly obtained from the graph database. Of course, it is also possible to perform finite element mesh division on the target object to construct the initial graph based on the division result.
[0061] Specifically, the server can perform finite element mesh division on the target object to obtain each mesh element corresponding to the target object. For each mesh element, a mesh element node corresponding to the mesh element can be constructed based on the initial material attribute information and the initial element state information of the target object at the mesh element. In addition, for each vertex, a vertex node corresponding to the vertex can be constructed based on the initial position information and the initial vertex state information of the target object at the vertex. Furthermore, based on the association relationships between the mesh elements and the vertices in the target object, the edges between each mesh element node and each vertex node can be constructed to obtain the initial graph of the target object. For example, the edges between each mesh element node and each vertex node in the initial graph can be constructed based on the association relationships between adjacent vertices, the association relationships between adjacent mesh elements, and the association relationships between each vertex and the mesh element where the vertex is located.
[0062] In addition, since there are multiple types of the above-mentioned nodes (such as vertex nodes and mesh element nodes) and edges (such as the edges between adjacent vertex nodes, the edges between adjacent mesh element nodes, and the edges between mesh element nodes and vertex nodes), the initial graph in this specification can be in the form of a heterogeneous graph, where a heterogeneous graph refers to a graph that contains multiple types of nodes or edges.
[0063] S102: Input the initial graph and the preset external control information into the target model to be trained, so that the target model predicts the updated attribute information corresponding to each node of the target object under the external control corresponding to the external control information, and update the initial graph according to the updated attribute information to obtain an updated graph.
[0064] In this specification, in order to simulate the state of the target object under external controls such as temperature change and pressure change, corresponding external control information can be input into the target model during the model training process, so that the trained target model can predict various information of the target object under the external control corresponding to the external control information.
[0065] The server can input the initial graph of the target object and the preset external control information into the target model to be trained (such as: heterogeneous graph network model). The target model can predict the updated attribute information corresponding to each node of the target object under the external control corresponding to the external control information according to the input initial graph, and update the initial graph according to the predicted updated attribute information to obtain an updated graph. Among them, the external control information can be the preset temperature change control information (such as: the change information of the applied temperature over time), the preset pressure change control information (such as: the change information of the applied pressure over time), etc.
[0066] Specifically, for each node, the target model can determine the attribute association relationship between different initial attribute information corresponding to the node. For example, the attribute association relationship can be the association relationship between the temperature and the curing rate corresponding to the grid cell node (as the temperature increases, the curing rate also increases), or the association relationship between the temperature and the position information corresponding to the vertex node (the change in temperature causes the position at the vertex corresponding to the vertex node to change accordingly). Another example is that the attribute association relationship can be the association relationship between the stress and the Young's modulus corresponding to the grid cell node (as the stress changes, the Young's modulus also changes), or the association relationship between the stress and the position information corresponding to the vertex node (as the stress changes, the position information corresponding to the vertex node also changes).
[0067] Then, according to the node association relationship corresponding to each edge included in the initial graph and the attribute association relationship corresponding to each node, the updated attribute information corresponding to each node of the target object under the external control corresponding to the external control information can be predicted.
[0068] In addition, during the actual application process, a time interval can often be preset. Then, the target model can predict the updated attribute information corresponding to each node of the target object under the external control corresponding to the external control information at the preset time interval (i.e., predict the updated attribute information at each time) until the preset termination condition is met (e.g., reaching the specified prediction end time). For example, the target model can predict the updated attribute information corresponding to each node of the target object under the external control corresponding to the external control information every 5 ms.
[0069] It should be noted that when simulating the heating and curing simulation by directly heating the surface of the target object (i.e., applying corresponding temperature control), since it directly acts on the surface of the target object, the temperature represented in the corresponding temperature control information can be directly used as the temperature of the mesh unit or vertex on the surface of the target object. Among them, in order to identify the mesh unit or vertex on the surface of the target object during this process, for example, a setting identifier can be set in the attribute information of each node. When the setting identifier is 1, it can be determined that the node is the node corresponding to the mesh unit or vertex on the surface of the target object. When the setting identifier is 0, it can be determined that the node is the node corresponding to the mesh unit or vertex inside the target object.
[0070] After predicting the updated attribute information corresponding to each node of the target object under the external control corresponding to the external control information, the initial graph of the target object can be updated according to the updated attribute information, and then the updated graph can be obtained.
[0071] S103: Determine the loss value according to the deviation between the updated attribute information corresponding to each node in the updated graph and the label attribute information corresponding to each node in the label graph corresponding to the target object, and train the target model according to the loss value. The loss value has a positive correlation with the deviation.
[0072] The server can determine the loss value according to the deviation between the updated attribute information corresponding to each node in the updated graph and the label attribute information corresponding to each node in the label graph corresponding to the target object, and then train the target model by gradually reducing the loss value. Among them, the loss value and the deviation have a positive correlation.
[0073] Of course, in order to improve the prediction accuracy of the trained target model, in addition to training the target model by referring to the deviation between the updated attribute information corresponding to each node in the updated graph and the label attribute information corresponding to each node in the label graph corresponding to the target object, the target model can also be trained by referring to the preset physical constraint information.
[0074] Specifically, the server can determine the first loss value based on the deviation between the updated attribute information corresponding to each node in the updated graph and the label attribute information corresponding to each node in the label graph of the target object. The first loss value can specifically refer to the following formula:
[0075] l = RMSE(D p , D r )
[0076] where l can be used to represent the first loss value, RMSE() can be used to represent the first loss function, D p can be used to represent the updated attribute information, and D r can be used to represent the label attribute information.
[0077] Moreover, the second loss value can be determined based on the preset physical constraint information and the updated attribute information corresponding to at least some nodes in the updated graph. When the updated attribute information corresponding to at least some nodes in the updated graph conforms more to the physical constraint conditions corresponding to the physical constraint information, the second loss value is smaller. Among them, the physical constraint information can represent the physical laws between the updated attribute information corresponding to at least some nodes in the updated graph. For example: To simulate the deformation of the target object under pressure, the physical constraint conditions corresponding to the physical constraint information can be σ - [D]ε = 0, where σ can be used to represent the stress at the vertex corresponding to the vertex node of the target object, ε can be used to represent the strain at the vertex corresponding to the vertex node of the target object, and [D] can be used to represent the preset parameter matrix.
[0078] Correspondingly, during the model training process, the second loss value can specifically refer to the following formula:
[0079] L = MSE(σ - [D]ε, 0)
[0080] where L can be used to represent the second loss value, MSE() can be used to represent the second loss function, σ can be used to represent the stress at the vertex corresponding to the vertex node of the target object, ε can be used to represent the strain at the vertex corresponding to the vertex node of the target object, and [D] can be used to represent the preset parameter matrix.
[0081] It can be seen from this that when the stress σ and strain at the vertex corresponding to the vertex node conform more to the physical constraint condition σ - [D]ε = 0, the second loss value is smaller.
[0082] Then, the loss value can be determined based on the first loss value and the second loss value. The loss value can specifically refer to the following formula:
[0083] L ′ = l + ε * L
[0084] where L ′It can be used to characterize the loss value, l can be used to characterize the first loss value, L can be used to characterize the second loss value, and ε can be used to characterize the preset weight coefficient.
[0085] In addition, in the actual application process, in order to simulate the behavior of the target object under different external control conditions (such as pressure change, temperature change, magnetic field change, etc.), different target models can be trained respectively, so as to predict the attribute information of each grid unit and each vertex of the target object under the external control conditions through the trained target models, and then perform corresponding simulation tasks on the target object according to the predicted attribute information.
[0086] It can be seen from this that in the above model training process, the target model can obtain relatively rich attribute information corresponding to each grid unit node and each vertex node from the initial graph of the target object. In addition, it can also obtain the node association relationship between each grid unit node and each vertex node from the initial graph. Furthermore, it can predict the updated attribute information of each node corresponding to the target object under external control according to the relatively rich attribute information and each node association relationship obtained, thus greatly improving the prediction accuracy of the target model and enhancing the accuracy of the simulation.
[0087] In addition, through the above target model, relatively rich local features corresponding to the target object under external control can be quickly predicted, which also greatly improves the prediction efficiency of the target model.
[0088] In addition, in the above model training process, in addition to predicting according to the node association relationship, the target model can also predict by referring to the attribute association relationship between different attribute information corresponding to each node, that is, it can capture more rich local information and further improve the prediction accuracy of the trained target model.
[0089] The above mainly introduces the model training method. After the model is trained, it can be deployed to execute the business. Next, a business execution method provided in this specification will be described.
[0090] Figure 3 It is a schematic flowchart of a business execution method provided in this specification, including the following steps:
[0091] S301: Obtain the initial graph of the object to be simulated. The initial graph is a heterogeneous graph composed of multiple nodes and the edges between the nodes. Each node records the initial attribute information corresponding to the node. The nodes include vertex nodes and grid cell nodes. Each grid cell node corresponds to a grid cell divided in the object to be simulated. The grid cell corresponding to the grid cell node is a closed area surrounded by the vertices corresponding to multiple vertex nodes. The initial attribute information corresponding to the grid cell node includes the initial material attribute information and the initial cell state information corresponding to the object to be simulated at this grid cell. The initial attribute information corresponding to each vertex node includes the initial position information and the initial vertex state information corresponding to the vertex of the object to be simulated at this vertex node. The edge between any two nodes is used to represent the node association relationship between the two nodes in the object to be simulated.
[0092] For the service execution method provided in this specification, the execution subject can be a server or a terminal device such as a desktop computer or a laptop computer. Hereinafter, only the server is taken as an example to elaborate on the subsequent content in detail.
[0093] In this specification, the target model trained by the above model training method can be deployed in the server. In practical applications, the server can obtain the initial graph of the object to be simulated, and thus can input the obtained initial graph and external control information into the target model, so that the target model predicts the attribute information of each grid cell and each vertex of the object to be simulated under the corresponding external control, and thus can, after receiving the simulation instruction, execute the corresponding simulation service based on the predicted attribute information of each grid cell and each vertex.
[0094] S302: Input the initial graph and the preset external control information into the pre-trained target model, so that the target model predicts the updated attribute information corresponding to each node of the object to be simulated under the external control corresponding to the external control information according to the initial graph, and update the initial graph according to the updated attribute information to obtain an updated graph. The target model is trained by the model training method as described above.
[0095] In the actual application process, the server can input the preset external control information and the initial graph into the target model. The target model can often predict the attribute information of each node of the object to be simulated at different moments during the corresponding external control process by obtaining the attribute information of each node in the initial graph and the node association relationship corresponding to each edge, and thus can execute the simulation service for the object to be simulated based on the attribute information of each node at different moments.
[0096] S303: Perform a target simulation service on the object to be simulated according to the attribute information corresponding to each node included in the updated graph.
[0097] The server can perform a target simulation service on the object to be simulated according to the predicted attribute information corresponding to each node. For example, according to the position information corresponding to the vertex nodes, the specific shape of the target object after heating and curing or pressure deformation can be simulated. Of course, according to the predicted attribute information corresponding to each node at different times, the entire heating and curing process or pressure deformation process of the target object can also be simulated.
[0098] Moreover, when performing the target simulation service, corresponding data analysis can also be performed according to the predicted attribute information corresponding to each node. For example, according to the predicted temperature at the vertex corresponding to the vertex node of the target object, the temperature at the grid cell corresponding to the grid cell node, the degree of curing, etc., a curve of the degree of curing changing with temperature can be fitted to analyze the heating and curing process.
[0099] The above is the method of one or more embodiments of this specification. Based on the same idea, this specification also provides corresponding model training devices and service execution devices, as Figure 4 、 Figure 5 shown.
[0100] Figure 4 The figure shows a schematic diagram of a model training device provided by this specification, including:
[0101] An acquisition module 401: used to acquire an initial graph of a target object. The initial graph is a heterogeneous graph composed of multiple nodes and edges between each node. Each node records the initial attribute information corresponding to the node. The nodes include vertex nodes and grid cell nodes. Each grid cell node corresponds to a grid cell divided in the target object. The grid cell corresponding to the grid cell node is a closed area surrounded by vertices corresponding to multiple vertex nodes. The initial attribute information corresponding to the grid cell node includes the initial material attribute information and initial unit state information corresponding to the target object at this grid cell. The initial attribute information corresponding to each vertex node includes the initial position information and initial vertex state information corresponding to the vertex of the target object at this vertex node. The edge between any two nodes is used to represent the node association relationship between the two nodes in the target object;
[0102] A prediction module 402: used to input the initial graph and preset external control information into a target model to be trained, so that the target model predicts the updated attribute information corresponding to each node of the target object under the external control corresponding to the external control information according to the initial graph, and updates the initial graph according to the updated attribute information to obtain an updated graph;
[0103] Training module 403: configured to determine a loss value based on the deviation between the updated attribute information corresponding to each node in the updated graph and the label attribute information corresponding to each node in the label graph corresponding to the target object, and train the target model according to the loss value, where there is a positive correlation between the loss value and the deviation.
[0104] Optionally, the obtaining module 401 is specifically configured to: perform finite element mesh division on the target object to obtain each mesh unit corresponding to the target object; for each mesh unit, construct a mesh unit node corresponding to the mesh unit based on the initial material attribute information and the initial unit state information corresponding to the target object at the mesh unit, and, for each vertex, construct a vertex node corresponding to the vertex based on the initial position information and the initial vertex state information corresponding to the target object at the vertex; construct edges between each mesh unit node and each vertex node based on the association relationship between each mesh unit and each vertex in the target object to obtain the initial graph of the target object.
[0105] Optionally, the prediction module 402 is specifically configured to: input the initial graph and preset external control information into the target model to be trained, so that the target model determines the attribute association relationship between different initial attribute information corresponding to each node, and predicts the updated attribute information corresponding to each node of the target object under the external control corresponding to the external control information according to the node association relationship corresponding to each edge included in the initial graph and the attribute association relationship corresponding to each node.
[0106] Optionally, the training module 403 is specifically configured to: determine a first loss value based on the deviation between the updated attribute information corresponding to each node in the updated graph and the label attribute information corresponding to each node in the label graph corresponding to the target object, and determine a second loss value according to the preset physical constraint information and the updated attribute information corresponding to at least some nodes in the updated graph, where there is a positive correlation between the first loss value and the deviation, and the smaller the second loss value is when the updated attribute information corresponding to at least some nodes in the updated graph conforms to the physical constraint conditions corresponding to the physical constraint information; determine the loss value according to the first loss value and the second loss value.
[0107] Figure 5 The figure provided in this specification is a schematic diagram of a service execution device, including:
[0108] Acquisition module 501: It is used to acquire an initial graph of an object to be simulated. The initial graph is a heterogeneous graph composed of multiple nodes and edges between each node. Each node records the corresponding initial attribute information of the node. The nodes include vertex nodes and grid cell nodes. Each grid cell node corresponds to a grid cell divided in the object to be simulated. The grid cell corresponding to the grid cell node is a closed area surrounded by vertices corresponding to multiple vertex nodes. The initial attribute information corresponding to the grid cell node includes the initial material attribute information and initial cell state information corresponding to the object to be simulated at this grid cell. The initial attribute information corresponding to each vertex node includes the initial position information and initial vertex state information corresponding to the vertex of the object to be simulated at this vertex node. The edge between any two nodes is used to represent the node association relationship between the two nodes in the object to be simulated;
[0109] Prediction module 502: It is used to input the initial graph and preset external control information into a pre-trained target model, so that the target model predicts the updated attribute information corresponding to each node of the object to be simulated under the external control corresponding to the external control information according to the initial graph, and updates the initial graph according to the updated attribute information to obtain an updated graph. The target model is trained by the above model training method;
[0110] Execution module 503: It is used to execute a target simulation service on the object to be simulated according to the attribute information corresponding to each node included in the updated graph.
[0111] Optionally, the prediction module 502 is specifically used to: input the initial graph and preset external control information into a pre-trained target model, so that the target model determines the attribute association relationship between different initial attribute information corresponding to each node, and predicts the updated attribute information corresponding to each node of the object to be simulated under the external control corresponding to the external control information according to the node association relationship corresponding to each edge included in the initial graph and the attribute association relationship corresponding to each node.
[0112] This specification also provides a computer-readable storage medium. The storage medium stores a computer program, and the computer program can be used to execute the above Figure 1 shown model training method or Figure 3 shown service execution method.
[0113] This specification also provides Figure 6 shown a schematic structural diagram of an electronic device corresponding to Figure 1 or Figure 3 . As Figure 6As shown in the figure, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory. Of course, it may also include other hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the above Figure 1 model training method shown in the figure or Figure 3 business execution method shown in the figure.
[0114] Of course, in addition to the software implementation method, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or a logic device.
[0115] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software improvements (improvements to method flows). However, with the development of technology, many method flow improvements today can be regarded as direct improvements to hardware circuit structures. Almost all designers obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement to a method flow cannot be implemented using a hardware entity module. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is an integrated circuit whose logic function is determined by the user programming the device. Designers can program themselves to "integrate" a digital system onto a single PLD, without having to ask a chip manufacturer to design and fabricate a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly implemented using "logic compiler" software, which is similar to the software compilers used in program development and writing. The original code before compilation also has to be written in a specific programming language, which is called a Hardware Description Language (HDL), and there is not just one type of HDL, but many types, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones currently are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also be aware that by simply performing a little logical programming on the method flow using the above-mentioned several hardware description languages and programming it into an integrated circuit, it is easy to obtain the hardware circuit that implements the logical method flow.
[0116] The controller can be implemented in any suitable manner. For example, the controller can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program code (such as software or firmware) executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of the controller include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in the form of pure computer-readable program code, it is entirely possible to make the controller implement the same function in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be regarded as the structures within the hardware component. Or even, the devices for implementing various functions can be regarded as either software modules for implementing the method or the structures within the hardware component.
[0117] The systems, devices, modules, or units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0118] For the convenience of description, when describing the above devices, they are described separately as various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0119] Those skilled in the art should understand that the embodiments of this specification can be provided as a method, a system, or a computer program product. Therefore, this specification can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code.
[0120] This specification is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the specification. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to produce a machine, such that the instructions executed by the processors of the computer or other programmable data processing devices produce means for implementing the functions specified in one or more flows Figure 1 one or more flows and / or blocks Figure 1 or the functions specified in one or more blocks.
[0121] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including instruction means that implement the functions specified in one or more flows Figure 1 one or more flows and / or blocks Figure 1 or the functions specified in one or more blocks.
[0122] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more flows Figure 1 one or more flows and / or blocks Figure 1 or the functions specified in one or more blocks.
[0123] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0124] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of computer-readable media.
[0125] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0126] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0127] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Thus, this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0128] This specification may be described in the general context of computer-executable instructions, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media, including storage devices.
[0129] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for the relevant parts, reference can be made to the corresponding description in the method embodiment.
[0130] The above is only the embodiment of this specification and is not intended to limit this specification. For those skilled in the art, various modifications and changes can be made to this specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included within the scope of the claims of this specification.
Claims
1. A model training method, characterized in that, Including: Obtain an initial graph of a target object, where the initial graph is a heterogeneous graph composed of multiple nodes and edges between the nodes. Each node records initial attribute information corresponding to the node. The nodes include vertex nodes and mesh unit nodes. Each mesh unit node corresponds to a mesh unit divided in the target object. The mesh unit corresponding to the mesh unit node is a closed area surrounded by vertices corresponding to multiple vertex nodes. The initial attribute information corresponding to the mesh unit node includes the initial material attribute information and the initial unit state information corresponding to the target object at the mesh unit. The initial attribute information corresponding to each vertex node includes the initial position information and the initial vertex state information corresponding to the target object at the vertex corresponding to the vertex node. The edge between any two nodes is used to represent the node association relationship between the two nodes in the target object; where the unit state information includes at least one of temperature, curing degree, and stress corresponding to the target object at the mesh unit, and the vertex state information includes at least one of temperature and stress corresponding to the target object at the vertex. Input the initial graph and preset external control information into a target model to be trained, so that the target model predicts the updated attribute information corresponding to each node of the target object under the external control corresponding to the external control information according to the initial graph, and update the initial graph according to the updated attribute information to obtain an updated graph. Determine a loss value according to the deviation between the updated attribute information corresponding to each node in the updated graph and the labeled attribute information corresponding to each node in the labeled graph corresponding to the target object, and train the target model according to the loss value. The loss value has a positive correlation with the deviation.
2. The method according to claim 1, wherein Obtain the initial graph of the target object, specifically including: Perform finite element mesh division on the target object to obtain each mesh unit corresponding to the target object. For each mesh unit, construct a mesh unit node corresponding to the mesh unit based on the initial material attribute information and the initial unit state information corresponding to the target object at the mesh unit, and for each vertex, construct a vertex node corresponding to the vertex based on the initial position information and the initial vertex state information corresponding to the target object at the vertex. Based on the association relationship between each mesh unit and each vertex in the target object, construct edges between each mesh unit node and each vertex node to obtain the initial graph of the target object.
3. The method according to claim 1, characterized in that, Input the initial graph and preset external control information into a target model to be trained, so that the target model predicts the updated attribute information corresponding to each node of the target object under the external control corresponding to the external control information according to the initial graph, specifically including: Input the initial graph and the preset external control information into the target model to be trained, so that for each node, the target model determines the attribute association relationship between different initial attribute information corresponding to the node, and predicts the updated attribute information corresponding to each node of the target object under the external control corresponding to the external control information according to the node association relationship corresponding to each edge included in the initial graph and the attribute association relationship corresponding to each node.
4. The method according to claim 1, wherein Determine the loss value according to the deviation between the updated attribute information corresponding to each node in the updated graph and the labeled attribute information corresponding to each node in the labeled graph corresponding to the target object, specifically including: Determine the first loss value according to the deviation between the updated attribute information corresponding to each node in the updated graph and the labeled attribute information corresponding to each node in the labeled graph corresponding to the target object, and determine the second loss value according to the preset physical constraint information and the updated attribute information corresponding to at least some nodes in the updated graph. Among them, there is a positive correlation between the first loss value and the deviation, and the more the updated attribute information corresponding to at least some nodes in the updated graph conforms to the physical constraint conditions corresponding to the physical constraint information, the smaller the second loss value; Determine the loss value according to the first loss value and the second loss value.
5. A service execution method, characterized in that, Include: Obtain the initial graph of the object to be simulated. The initial graph is a heterogeneous graph composed of multiple nodes and edges between the nodes. Each node records the initial attribute information corresponding to the node. The nodes include vertex nodes and grid cell nodes. Each grid cell node corresponds to a grid cell divided in the object to be simulated. The grid cell corresponding to the grid cell node is a closed area surrounded by the vertices corresponding to multiple vertex nodes. The initial attribute information corresponding to the grid cell node includes the initial material attribute information and the initial cell state information corresponding to the object to be simulated at the grid cell. The initial attribute information corresponding to each vertex node includes the initial position information and the initial vertex state information of the object to be simulated at the vertex corresponding to the vertex node. The edge between any two nodes is used to represent the node association relationship between the two nodes in the object to be simulated; among them, the cell state information includes at least one of the temperature, curing degree, and stress corresponding to the target object at the grid cell, and the vertex state information includes at least one of the temperature and stress of the target object at the vertex. Input the initial graph and the preset external control information into the pre-trained target model, so that the target model predicts the updated attribute information corresponding to each node of the object to be simulated under the external control corresponding to the external control information according to the initial graph, and updates the initial graph according to the updated attribute information to obtain an updated graph. The target model is trained by the method according to any one of the above claims 1-4; Execute the target simulation service for the object to be simulated according to the attribute information corresponding to each node included in the updated graph.
6. The method according to claim 5, wherein Input the initial graph and the preset external control information into a pre-trained target model, so that the target model predicts the updated attribute information corresponding to each node of the object to be simulated under the external control corresponding to the external control information, specifically including: Input the initial graph and the preset external control information into a pre-trained target model, so that for each node, the target model determines the attribute association relationship between different initial attribute information corresponding to the node, and according to the node association relationship corresponding to each edge included in the initial graph and the attribute association relationship corresponding to each node, predicts the updated attribute information corresponding to each node of the object to be simulated under the external control corresponding to the external control information.
7. A model training device, characterized in that, Including: Acquisition module: used to acquire the initial graph of the target object. The initial graph is a heterogeneous graph composed of multiple nodes and the edges between the nodes. Each node records the initial attribute information corresponding to the node. The nodes include vertex nodes and grid unit nodes. Each grid unit node corresponds to a grid unit divided in the target object. The grid unit corresponding to the grid unit node is a closed area surrounded by the vertices corresponding to multiple vertex nodes. The initial attribute information corresponding to the grid unit node includes the initial material attribute information and the initial unit state information corresponding to the target object at the grid unit. The initial attribute information corresponding to each vertex node includes the initial position information and the initial vertex state information corresponding to the target object at the vertex corresponding to the vertex node. The edge between any two nodes is used to represent the node association relationship between the two nodes in the target object; wherein, the unit state information includes at least one of the temperature, curing degree, and stress corresponding to the target object at the grid unit, and the vertex state information includes at least one of the temperature and stress corresponding to the target object at the vertex. Prediction module: used to input the initial graph and the preset external control information into the target model to be trained, so that the target model predicts the updated attribute information corresponding to each node of the target object under the external control corresponding to the external control information, and updates the initial graph according to the updated attribute information to obtain an updated graph. Training module: used to determine the loss value according to the deviation between the updated attribute information corresponding to each node in the updated graph and the label attribute information corresponding to each node in the label graph corresponding to the target object, and train the target model according to the loss value. The loss value has a positive correlation with the deviation.
8. A service execution device, characterized in that, Including: Acquisition Module: It is used to acquire the initial graph of the object to be simulated. The initial graph is a heterogeneous graph composed of multiple nodes and the edges between each pair of nodes. Each node records the initial attribute information corresponding to that node. The nodes include vertex nodes and mesh cell nodes. Each mesh cell node corresponds to a mesh cell divided in the object to be simulated. The mesh cell corresponding to the mesh cell node is a closed area surrounded by the vertices corresponding to multiple vertex nodes. The initial attribute information corresponding to the mesh cell node includes the initial material attribute information and the initial cell state information corresponding to the object to be simulated at this mesh cell. The initial attribute information corresponding to each vertex node includes the initial position information and the initial vertex state information corresponding to the vertex of the object to be simulated at this vertex node. The edge between any two nodes is used to represent the node association relationship between these two nodes in the object to be simulated; wherein, the cell state information includes at least one of the temperature, curing degree, and stress corresponding to the target object at the mesh cell, and the vertex state information includes at least one of the temperature and stress of the target object at the vertex. Prediction Module: It is used to input the initial graph and the preset external control information into the pre-trained target model, so that the target model predicts the updated attribute information corresponding to each node of the object to be simulated under the external control corresponding to the external control information according to the initial graph, and updates the initial graph according to the updated attribute information to obtain an updated graph. The target model is trained by the method according to any one of claims 1 to 4 above. Execution Module: It is used to execute the target simulation service on the object to be simulated according to the attribute information corresponding to each node included in the updated graph.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and when the computer program is executed by a processor, it implements the method according to any one of claims 1 to 6 above.
10. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method according to any one of claims 1 to 6 above.
Citation Information
Patent Citations
Nonlinear analysis method and device of structural system, equipment and medium
CN116305995A
Model training method, business risk control method and device
CN116308738A