Method, apparatus, device and storage medium for predicting collision simulation results

By training a collision simulation model based on graph neural network, calculating the penetration distance and updating the network parameters, the problem of penetration phenomenon in the deep simulation method is solved, and high-precision and efficient simulation results are achieved.

CN114626293BActive Publication Date: 2025-08-05SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210170947.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-23
Publication Date
2025-08-05
Estimated Expiration
2042-02-23

AI Technical Summary

Technical Problem

Existing depth simulation methods are prone to permeation in the process of dealing with deformable objects and collision objects, resulting in low simulation accuracy, inaccurate simulation results, and poor visual fidelity.

Method used

A collision simulation model is used to train the graph neural network based on the sample training set. By calculating the permeability distance between the sample deformable object and the sample collision object, the network parameters of the graph neural network are updated according to the permeability distance to avoid the occurrence of permeability.

Benefits of technology

It improves the accuracy and visual fidelity of simulation results, improves simulation efficiency, and reduces training costs and time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114626293B_ABST
    Figure CN114626293B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of physical simulation technology, and provides a method, apparatus, device, and storage medium for predicting collision simulation results, including: obtaining first dynamic information of a deformable object at time t; obtaining second dynamic information of a collision object at time t+1; inputting the first dynamic information and the second dynamic information into a trained collision simulation model for processing to obtain a collision simulation result of the deformable object at time t+1; during the training process, determining the penetration distance between the sample deformable object and the sample collision object in the sample training set, and updating the network parameters of the graph neural network according to the penetration distance. In the above scheme, when the collision simulation model is used to process the dynamic information of the deformable object and the collision object, there will be no mutual penetration between the deformable object and the collision object, thereby making the collision simulation result predicted by the collision simulation model highly accurate, improving the accuracy of the simulation result, and improving the visual realism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of physical simulation technology, and in particular relates to a method, apparatus, device and storage medium for predicting collision simulation results. Background Art

[0002] Physics simulation, also known as solid simulation, is an important component of many computer graphics applications. For example, collision simulation is widely used in computer graphics, film and television animation, and virtual reality.

[0003] The most traditional simulation method is numerical calculation. Although it can produce physically accurate simulation results and visual effects, this calculation method is too time-consuming, increases simulation costs, and cannot meet the performance requirements of various interactive applications.

[0004] In recent years, with the development of machine learning, deep simulation methods have emerged. These methods primarily leverage the ability of neural networks to rapidly learn nonlinear functions and output differentiable models of deformable objects. However, these deep simulation methods are still immature and prone to object penetration during processing, resulting in low simulation accuracy, inaccurate results, and poor visual fidelity. Summary of the Invention

[0005] In view of this, the embodiments of the present application provide methods, devices, equipment and storage media for predicting collision simulation results to solve the problems that existing deep simulation methods are immature and objects are prone to penetration during the processing process, resulting in low simulation accuracy, inaccurate simulation results and poor visual realism.

[0006] A first aspect of an embodiment of the present application provides a method for predicting collision simulation results, the method comprising:

[0007] Obtain first dynamic information of a deformable object at time t; t≥0 and is an integer; obtain second dynamic information of a collision object at time t+1; input the first dynamic information and the second dynamic information into a trained collision simulation model for processing to obtain a collision simulation result of the deformable object at time t+1; the collision simulation model is obtained by training a graph neural network based on a sample training set; during the training process, determine the penetration distance between a sample deformable object and a sample collision object in the sample training set, and update the network parameters of the graph neural network according to the penetration distance.

[0008] The first aspect provides a method for predicting collision simulation results. Since the collision simulation model calculates the penetration distance between the sample deformable object and the sample collision object during training, and updates the network parameters of the graph neural network according to the penetration distance, the collision simulation model obtained by training will not have a penetration phenomenon during actual use. Therefore, when the collision simulation model is used to process the dynamic information of the deformable object and the collision object, there will be no mutual penetration between the deformable object and the collision object, thereby making the collision simulation results predicted by the collision simulation model highly accurate, improving the accuracy of the simulation results, and improving the visual realism. Moreover, the collision simulation model is obtained by training the graph neural network based on the sample training set, and message transmission, information encoding, data representation, etc. can all be effectively learned through the graph neural network. Therefore, the collision simulation model obtained by training based on the graph neural network can extract more effective information and better perform message transmission in the process of processing state information, thereby making the predicted collision simulation results more realistic and accurate.

[0009] Optionally, in one possible implementation, obtaining the second dynamic information of the collision object at time t+1 includes: obtaining initial dynamic information of the collision object at an initial time; and predicting the second dynamic information based on the initial dynamic information. In this implementation, predicting the second dynamic information of the collision object at time t+1 based on the initial dynamic information of the collision object at the initial time can obtain more accurate second dynamic information, which facilitates subsequent prediction of more accurate collision simulation results based on this second dynamic information.

[0010] Optionally, in one possible implementation, the collision simulation model includes an encoder, a processor, and a decoder, and the inputting the first dynamic information and the second dynamic information into the trained collision simulation model for processing to obtain the collision simulation result of the deformable object at time t+1 includes: inputting the first dynamic information and the second dynamic information into the encoder, and encoding the first dynamic information and the second dynamic information into graph information by the encoder; updating the point information and edge information in the graph information by the processor; and converting the updated point information and edge information by the decoder to obtain the collision simulation result of the deformable object at time t+1. In this implementation, the first dynamic information and the second dynamic information are processed by the encoder, processor, and decoder in the collision simulation model to extract complete point, edge, and surface information, as well as latent variable space information, and the processor is used for better message transmission to effectively avoid the occurrence of penetration phenomenon, thereby making the predicted collision simulation result more realistic and accurate.

[0011] Optionally, in a possible implementation, before the first dynamic information and the second dynamic information are input into the trained collision simulation model for processing to obtain the collision simulation result of the deformable object at time t+1, the method also includes: obtaining the first sample dynamic information of the sample deformable object at time t in the sample training set; obtaining the second sample dynamic information of the sample collision object at time t+1 in the sample training set; inputting the first sample dynamic information and the second sample dynamic information into the graph neural network for processing to obtain the sample collision simulation result of the sample deformable object at time t+1; the graph neural network includes a recursive regression module; based on the second sample dynamic information, the sample collision simulation result and the recursive regression module, determining the penetration distance between the sample deformable object and the sample collision object; determining the loss value according to a preset loss function and the penetration distance; when it is detected that the loss value does not meet the preset conditions, updating the network parameters of the graph neural network, and continuing to train the graph neural network.

[0012] Optionally, in a possible implementation, after determining the loss value based on the preset loss function and the penetration distance, the method further includes: when it is detected that the loss value meets the preset condition, stopping training the graph neural network, and determining the trained graph neural network as the collision simulation model.

[0013] In this implementation, in order to avoid mutual penetration, the existing technology requires manually setting a relatively large collision threshold for training data generation. However, this collision threshold is very difficult to determine, resulting in slow training model speed and high cost. In contrast, in this application, a recursive regression module is used to calculate the penetration distance under different conditions, and the network parameters of the graph neural network are reversely adjusted based on the penetration distance. With a small amount of training data, a collision simulation model with no penetration phenomenon can be obtained. This improves the speed of training the collision simulation model, saves training costs, improves the accuracy of the collision simulation model processing results, and ensures high simulation efficiency and quality.

[0014] At the same time, the trained collision simulation model is improved in terms of authenticity and real-time performance, that is, on the one hand, it can accurately represent the characteristics of the object, and on the other hand, it can speed up the computing power.

[0015] Optionally, in one possible implementation, the method of determining the penetration distance between the sample deformable object and the sample collision object based on the second sample dynamic information, the sample collision simulation result, and the recursive regression module includes: extracting first-point edge information corresponding to the sample collision object from the second sample dynamic information; extracting second-point edge information corresponding to the sample deformable object from the sample collision simulation result; and processing the first-point edge information and the second-point edge information using the recursive regression module to obtain the penetration distance between the sample deformable object at time t+1 and the sample collision object at time t+1. In this implementation, by using the recursive regression module to calculate the penetration distance in different ways, various situations in which the penetration phenomenon may occur can be simulated in multiple ways, thereby effectively avoiding these situations and enabling the ultimately trained collision simulation model to effectively avoid the penetration phenomenon.

[0016] Optionally, in one possible implementation, the method further includes: obtaining a preset self-supervisory function; and adjusting the network parameters of the graph neural network based on the self-supervisory function. In this implementation, adjusting the network parameters of the graph neural network model through the self-supervisory function enables the trained collision simulation model to sample the latent space. This effectively addresses the problem of poor training results caused by an unbalanced or insufficient sample training set, provides more informative and compact collision responses, and more effectively avoids percolation.

[0017] A second aspect of an embodiment of the present application provides a device for predicting collision simulation results, comprising:

[0018] A first acquiring unit is configured to acquire first dynamic information of the deformable object at time t, where t is an integer and is greater than or equal to 0;

[0019] A second acquiring unit, configured to acquire second dynamic information of the collision object at time t+1;

[0020] A processing unit is used to input the first dynamic information and the second dynamic information into a trained collision simulation model for processing to obtain a collision simulation result of the deformable object at time t+1; the collision simulation model is obtained by training a graph neural network based on a sample training set; during the training process, the penetration distance between the sample deformable object and the sample collision object in the sample training set is determined, and the network parameters of the graph neural network are updated according to the penetration distance.

[0021] A third aspect of an embodiment of the present application provides a device for predicting collision simulation results, comprising a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein the processor implements the steps of the method for predicting collision simulation results as described in the first aspect above when executing the computer program.

[0022] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the method for predicting collision simulation results as described in the first aspect above.

[0023] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product runs on a device for predicting collision simulation results, the device for predicting collision simulation results executes the steps of the method for predicting collision simulation results described in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0025] Figure 1 It is a schematic diagram of the penetration phenomenon provided by this application;

[0026] Figure 2 is a schematic flow chart of a method for predicting collision simulation results provided by an exemplary embodiment of the present application;

[0027] Figure 3 It is a schematic diagram of matrix operations shown in this application;

[0028] Figure 4 is a specific flow chart of step S103 of a method for predicting collision simulation results shown in another exemplary embodiment of the present application;

[0029] Figure 5 This is a schematic diagram of the encoder processing process provided by this application;

[0030] Figure 6 This is a schematic diagram of the processor processing process provided by this application;

[0031] Figure 7 is a specific flow chart of a method for training a collision simulation model shown in yet another exemplary embodiment of the present application;

[0032] Figure 8is a schematic diagram of a method for calculating penetration distance shown in the present application;

[0033] Figure 9 is a schematic diagram of another method for calculating the penetration distance shown in the present application;

[0034] Figure 10 is a comparison chart of collision simulation results shown in this application;

[0035] Figure 11 is a schematic diagram of a device for predicting collision simulation results provided by an embodiment of the present application;

[0036] Figure 12 It is a schematic diagram of a device for predicting collision simulation results provided by another embodiment of the present application. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0038] In the description of the embodiments of this application, unless otherwise specified, " / " represents or. For example, A / B can represent A or B. "And / or" in this article is simply a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of this application, "plurality" means two or more than two.

[0039] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.

[0040] To better understand the embodiments of the present application, the following introduces terms or concepts that may be involved in the embodiments.

[0041] 1. Graph Neural Networks (GNN)

[0042] It is a deep learning method based on graph structures. As can be seen from the definition, graph neural networks are mainly composed of two parts: "graph" and "neural network." The "graph" here refers to the graph data structure in graph theory, and the "neural network" refers to the deep learning neural network structure.

[0043] 2. Collision simulation

[0044] Simulates the collision results of colliding objects with deformable objects.

[0045] Physical simulation, also known as solid simulation, is a simulation process based on the similarity of physical properties and geometric shapes, while other properties remain unchanged. Physical simulation is an important component of many computer graphics applications. For example, collision simulation is widely used in computer graphics, film and television animation, and virtual reality.

[0046] The most traditional simulation method is numerical calculation. Although it can produce physically accurate simulation results and visual effects, this calculation method is too time-consuming, increases simulation costs, and cannot meet the performance requirements of various interactive applications.

[0047] In recent years, with the development of machine learning, deep simulation methods have emerged. These methods primarily leverage the power of neural networks to rapidly learn nonlinear functions and output differentiable models of deformable objects. However, these deep simulation methods are still immature and relatively weak in both collision detection and response. During collision processing, colliding objects and deformable objects can easily interpenetrate, resulting in low simulation accuracy, inaccurate results, and poor visual fidelity.

[0048] See Figure 1 , Figure 1 This is a schematic diagram of the penetration phenomenon provided by this application.

[0049] like Figure 1 As shown, Figure 1 The ball in the figure represents the collision object, and the object in contact with the ball is the deformable object. Figure 1 The left side shows the idealized collision simulation result. Figure 1 The right side shows the collision simulation results obtained by the depth simulation method in the existing technology. Figure 1 The part framed in the middle left and Figure 1 From the part framed in the middle of the right side, it can be clearly seen that the right ball and the deformable object have mutually penetrated each other, that is, the dark part framed by the square appears in the right picture.

[0050] For example, when a ball collides with cloth, the ball does not penetrate the cloth in the real collision result. When we simulate the collision result of the ball and cloth, if penetration occurs, it will have an irreversible impact on subsequent simulations, and the simulation results will be low in precision, inaccurate, and lack visual fidelity.

[0051] In view of this, an embodiment of the present application provides a method for predicting collision simulation results, obtaining first dynamic information of a deformable object at time t; t≥0 and is an integer; obtaining second dynamic information of the collision object at time t+1; inputting the first dynamic information and the second dynamic information into a trained collision simulation model for processing to obtain a collision simulation result of the deformable object at time t+1; the collision simulation model is obtained by training a graph neural network based on a sample training set; during the training process, determining the penetration distance between the sample deformable object and the sample collision object in the sample training set, and updating the network parameters of the graph neural network according to the penetration distance. In the above implementation, since the collision simulation model calculates the penetration distance between the sample deformable object and the sample collision object during the training process, and updates the network parameters of the graph neural network according to the penetration distance, the trained collision simulation model will not have a penetration phenomenon during actual use. Therefore, when using this collision simulation model to process the dynamic information of the deformable object and the collision object, there will be no mutual penetration between the deformable object and the collision object, thereby making the collision simulation result predicted by the collision simulation model highly accurate, improving the accuracy of the simulation result, and improving the visual realism.

[0052] Moreover, the collision simulation model is obtained by training the graph neural network based on the sample training set. Message transmission, information encoding, data representation, etc. can all be effectively learned through the graph neural network. Therefore, the collision simulation model obtained by training the graph neural network can extract more effective information and better perform message transmission in the process of processing state information, thereby making the predicted collision simulation results more realistic and accurate.

[0053] See Figure 2 , Figure 2 It is a schematic flow chart of a method for predicting collision simulation results provided by an exemplary embodiment of the present application. The execution subject of the method for predicting collision simulation results provided by the present application is a device for predicting collision simulation results, wherein the device for predicting collision simulation results includes but is not limited to a vehicle-mounted computer, a tablet computer, a computer, a personal digital assistant (PDA), a wearable device, etc., and may also include various types of servers. For example, the server can be an independent server, or it can be a cloud service that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0054] like Figure 2The method for predicting collision simulation results shown may include: S101 to S103, which are specifically as follows:

[0055] S101: Acquire first dynamic information of a deformable object at time t.

[0056] As the name implies, a deformable object is an object that can be deformed. For example, a deformable object can be cloth, plastic, etc. This is merely an example and is not intended to be limiting.

[0057] The first dynamic information may include the position information, posture information, motion information, velocity information, deformation information, etc. of the deformable object. The motion information may include the deformable object's motion direction, motion trend, motion trajectory, etc. The velocity information may include the deformable object's acceleration, angular velocity, linear velocity, etc.

[0058] The first dynamic information may also include first point information, first edge information, and first surface information of the deformable object. For example, during a collision simulation, when the deformable object contacts a collision object, contact points, contact edges, and contact surfaces are generated. The first point information corresponds to the contact point on the deformable object, the first edge information corresponds to the contact edge on the deformable object, and the first surface information corresponds to the contact surface on the deformable object.

[0059] Optionally, during a collision between the deformable object and the collision object, the deformable object may not make contact with the collision object. In this case, the first point information may be information corresponding to the point where the deformable object is predicted to make contact with the collision object, the first edge information may be information corresponding to the edge where the deformable object is predicted to make contact with the collision object, and the first surface information may be information corresponding to the surface where the deformable object is predicted to make contact with the collision object. This is merely an example and is not intended to be limiting.

[0060] Exemplarily, the first dynamic information of the deformable object at time t is known. For example, during a collision simulation experiment, the first dynamic information of the deformable object at each moment is recorded by a device. For example, the first dynamic information of the deformable object at time t is pre-stored in a database. Here, t ≥ 0 and is an integer. When predicting the collision simulation results of the deformable object at time t+1, the first dynamic information of the deformable object at time t is obtained.

[0061] For example, upon receiving a prediction instruction, the first dynamic information of the deformable object at time t is retrieved from the database. The prediction instruction indicates a prediction of the collision simulation result of the deformable object at time t+1. The prediction instruction can be sent to the device by another terminal or manually triggered by a user on the device. This is merely an example and is not intended to be limiting.

[0062] At different moments, the first dynamic information of the deformable object may be the same or different, depending on the actual situation.

[0063] S102: Acquire second dynamic information of the collision object at time t+1.

[0064] In the field of physical simulation, a collision object is also called a tool, which can be understood as an auxiliary tool used in the process of predicting the collision simulation results of a deformable object. In this embodiment, a collision object is taken as an example to illustrate.

[0065] The second dynamic information may include the position information, posture information, motion information, speed information, deformation information, etc. of the colliding object. The motion information may include the movement direction, movement trend, movement trajectory, etc. of the colliding object. The speed information may include the acceleration, angular velocity, linear velocity, etc. of the colliding object.

[0066] The second dynamic information may also include second point information, second edge information, and second surface information of the collision object. For example, when the collision object contacts the deformable object, contact points, contact edges, and contact surfaces are generated. The second point information is information corresponding to the contact point on the collision object, the second edge information is information corresponding to the contact edge on the collision object, and the second surface information is information corresponding to the contact surface on the collision object.

[0067] Optionally, during the collision between the collision object and the deformable object, there may be a situation where the collision object and the deformable object do not make contact. In this case, the second point information may be information corresponding to the point where the collision object is predicted to make contact with the deformable object, the second edge information may be information corresponding to the edge where the collision object is predicted to make contact with the deformable object, and the second surface information may be information corresponding to the surface where the collision object is predicted to make contact with the deformable object. This is merely an example and is not intended to be limiting.

[0068] For example, the dynamic information of the collision object at time t is known. For example, when performing a collision simulation experiment, the dynamic information of the collision object at each moment that has occurred is recorded by a device. For example, the dynamic information of the collision object at time t is pre-stored in a database. When it is necessary to predict the collision simulation result of the deformable object at time t+1, the dynamic information of the collision object at time t is obtained. Based on the dynamic information of the collision object at time t, the second dynamic information of the collision object at time t+1 is predicted.

[0069] For example, an existing simulator is used to simulate the second dynamic information of the collision object at time t+1. Specifically, the position information, posture information, motion information, velocity information, deformation information, point information, edge information, and surface information of the collision object at time t are input into the simulator, and the second dynamic information of the collision object at time t+1 is output. This is merely an example and is not intended to be limiting.

[0070] Optionally, in a possible implementation, initial dynamic information of the collision object at the initial moment may be acquired, and second dynamic information of the collision object at time t+1 may be predicted based on the initial dynamic information.

[0071] S103: Input the first dynamic information and the second dynamic information into the trained collision simulation model for processing to obtain a collision simulation result of the deformable object at time t+1.

[0072] Exemplarily, the collision simulation model is obtained by training the graph neural network based on a sample training set. The sample training set includes first sample dynamic information corresponding to sample deformable objects at different times, and second sample dynamic information corresponding to sample collision objects at different times. For example, the sample training set includes first sample dynamic information of the sample deformable object at time t, first sample dynamic information of the sample deformable object at time t+1, second sample dynamic information of the sample collision object at time t, and second sample dynamic information of the sample collision object at time t+1, etc. Wherein, t≥0 and is an integer.

[0073] It is worth noting that the specific information types included in the first sample dynamic information are the same as the specific information types included in the first dynamic information. That is, the first sample dynamic information may include position information, posture information, motion information, velocity information, deformation information, and the like of the sample deformable object. It may also include point information, edge information, and surface information of the sample deformable object. For details, please refer to the description in S101 and will not be repeated here.

[0074] Similarly, the specific information type included in the second sample dynamic information is the same as the specific information type included in the second dynamic information. Please refer to the description in S102 and will not be repeated here.

[0075] In this embodiment, a pre-trained collision simulation model is pre-stored in the device for predicting collision simulation results. This collision simulation model is obtained by training a graph neural network based on a sample training set. During the training process, the penetration distance between the sample deformable objects and the sample collision objects in the sample training set is determined, and the network parameters of the graph neural network are updated based on the penetration distance.

[0076] For example, during training, the penetration distance between the sample deformable objects and the sample collision objects in the sample training set is calculated. If the penetration distance is greater than 0, it indicates that the current model has not been trained well. The network parameters of the graph neural network are adjusted, and the sample training set is trained again based on the adjusted network parameters. If the penetration distance is less than or equal to 0, it indicates that the current model has been trained well. The network parameters of the current graph neural network are fixed, and the graph neural network with fixed network parameters is used as the trained collision simulation model.

[0077] It is understood that the collision simulation model can be pre-trained by the device that predicts collision simulation results, or it can be pre-trained by another device and then the corresponding file of the collision simulation model can be transplanted to the device that predicts collision simulation results. In other words, the execution entity that trains the collision simulation model and the execution entity that uses the collision simulation model to predict collision simulation results can be the same or different. For example, when the collision simulation model is trained using another device, after the other device completes training the collision simulation model, it fixes the network parameters of the collision simulation model and obtains the file corresponding to the trained collision simulation model. This file is then transplanted to the device that predicts collision simulation results.

[0078] The first dynamic information of the deformable object at time t and the second dynamic information of the collision object at time t+1 are input into a trained collision simulation model for processing to obtain the collision simulation result of the deformable object at time t+1. The value of t can be adjusted according to actual needs to obtain collision simulation results of the deformable object at different times. In other words, using the first dynamic information of the deformable object at different times, the second dynamic information of the collision object at the next time adjacent to the different times, and the trained collision simulation model, the collision simulation result of the deformable object at any time can be predicted.

[0079] The collision simulation result may include the motion state of the deformable object at time t+1, and the specific information included is similar to the first dynamic information. For example, the collision simulation result may include the position information, posture information, motion information, velocity information, deformation information, etc. of the deformable object at time t+1. Among them, the motion information may include the motion direction, motion trend, motion trajectory, etc. of the deformable object. The velocity information may include the acceleration, angular velocity, linear velocity, etc. of the deformable object at time t+1. The collision simulation result may also include the point information, edge information, surface information, etc. of the deformable object at time t+1. The collision simulation result may also include the image of the deformable object at time t+1.

[0080] In the above implementation, since the collision simulation model calculates the penetration distance between the sample deformable object and the sample collision object during training and updates the network parameters of the graph neural network based on the penetration distance, the trained collision simulation model will not experience penetration during actual use. Therefore, when using this collision simulation model to process the dynamic information of deformable objects and collision objects, there will be no mutual penetration between the deformable objects and the collision objects, which in turn makes the collision simulation results predicted by this collision simulation model highly accurate, improves the accuracy of the simulation results, and enhances visual realism. This achieves the goal of reducing mutual penetration artifacts while ensuring high simulation efficiency.

[0081] Moreover, the collision simulation model is obtained by training the graph neural network based on the sample training set. Message transmission, information encoding, data representation, etc. can all be effectively learned through the graph neural network. Therefore, the collision simulation model obtained by training the graph neural network can extract more effective information and better perform message transmission in the process of processing state information, thereby making the predicted collision simulation results more realistic and accurate.

[0082] Optionally, in some possible implementations of the present application, the above S102 may include S1021 to S1022, which are specifically as follows:

[0083] S1021: Obtaining initial dynamic information of the collision object at the initial moment.

[0084] The specific information types included in the initial dynamic information are the same as those included in the second dynamic information. Specifically, the initial dynamic information may include the position, posture, motion, velocity, and deformation information of the colliding object. It may also include point, edge, and surface information of the colliding object. For details, please refer to the above description and will not be repeated here.

[0085] The initial moment refers to the moment when the collision object begins a collision simulation. During the collision simulation, the device records the dynamic information of the collision object at each moment and stores this information in a database. To determine the secondary dynamic information of the collision object at time t+1, the initial dynamic information of the collision object at the initial moment is retrieved from the database.

[0086] It's worth noting that the collision simulation model is trained using a graph neural network, which excels at processing data with graph structures. To improve the processing speed and accuracy of the collision simulation model, in this implementation, the initial dynamic information is presented as a simulation grid.

[0087] When the initial dynamic information is represented as a simulation grid, it includes both node and edge information. This means that the initial dynamic information consists of multiple nodes and edges. Each node is represented by a state vector. The node's state is calculated from the node's eigenvector, the eigenvectors of its neighbors, the state vectors of its neighbors, and the eigenvectors of the edges connected to it.

[0088] Among them, the feature vector can be used to represent the position information, posture information, motion information, speed information, deformation information, point information, edge information, surface information, etc. of the collision object.

[0089] S1022: Predict second dynamic information according to the initial dynamic information.

[0090] Exemplarily, a matrix operation is performed on the initial dynamic information to obtain the second dynamic information of the collision object at time t+1.

[0091] For example, node information and edge information are obtained from the initial dynamic information. Specifically, each node and each edge in the simulation grid corresponding to the initial dynamic information is obtained, as well as the number of nodes and the number of edges. Matrix operations are performed on the obtained nodes and edges to obtain the second dynamic information of the collision object at time t+1.

[0092] See Figure 3 , Figure 3 It is a schematic diagram of matrix operations shown in this application.

[0093] like Figure 3 As shown, Represents the initial dynamic information of the collision object at the initial moment, Indicates the second dynamic information of the collision object at time t+1. They represent the nodes corresponding to the collision objects at the initial moment, and the number in the upper right corner represents the number of nodes. They represent the edges corresponding to the collision objects at the initial moment, and the number in the upper right corner represents the number of edges.

[0094] Obtain the and Perform matrix operations to obtain the second dynamic information of the collision object at time t+1. This is only an example and is not intended to be limiting.

[0095] In the above implementation, by predicting the second dynamic information of the collision object at time t+1 using the initial dynamic information of the collision object at the initial time, more accurate second dynamic information can be obtained, which helps to predict more accurate collision simulation results based on the second dynamic information.

[0096] See Figure 4 , Figure 4 is a specific flow chart of step S103 of a method for predicting collision simulation results, shown in another exemplary embodiment of the present application; optionally, in some possible implementations of the present application, the above S103 may include S1031 to S1033, as follows:

[0097] S1031: Input the first dynamic information and the second dynamic information into an encoder, and use the encoder to encode the first dynamic information and the second dynamic information into graph information.

[0098] Exemplarily, the collision simulation model includes an encoder, a processor, and a decoder, wherein the encoder is used to encode the input first dynamic information and the second dynamic information.

[0099] It's worth noting that the collision simulation model is trained using a graph neural network, which excels at processing data with graph structures. To improve the processing speed and simulation accuracy of the collision simulation model, in this embodiment, the first and second dynamic information are presented as simulation grids.

[0100] Let's take the first dynamic information as an example. When the first dynamic information is represented as a simulation grid, it contains node information and edge information. This means that the first dynamic information is composed of multiple nodes and multiple edges. Each node is represented by a state vector. The node's state is calculated using the node's feature vector, the feature vectors of its neighboring nodes, the state vectors of its neighboring nodes, and the feature vectors of the edges connected to the node.

[0101] The feature vector can be used to represent the position information, posture information, motion information, speed information, deformation information, point information, edge information, surface information, etc. of the deformable object. The second dynamic information is similar and will not be described in detail here.

[0102] For example, see Figure 5 , Figure 5 This is a schematic diagram of the encoder processing process provided by this application. Figure 5 As shown, Figure 5The light-colored spheres represent the deformable object mesh nodes, the dark-colored spheres represent the tool mesh nodes, the lines between the light-colored spheres represent the deformable object mesh edges, the lines between the dark-colored spheres represent the tool mesh edges, and the lines between the light-colored spheres represent the tool object contact edges.

[0103] The two input simulation grids are encoded through the encoder to obtain graph information.

[0104] Exemplarily, the first dynamic information and the second dynamic information are input into the encoder. For example, the input is a simulation grid pair: Among them, M x t =(V x ,E x ), used to represent the simulated mesh of the deformable object at time t, point V x Mesh edge E x connect.

[0105] Used to represent the simulation grid of the collision object at time t+1, point V y Mesh edge E y Connection. Among them, P t+1 (p t+1 ,o t+1 ) represents the position information of the collision object at time t+1. For example, p t+1 Indicates position, o t+1 Indicates rotation. Represents the reference grid information of the collision object at time t′.

[0106] By p t+1 and Calculate the simulation mesh of the collision object at time t+1

[0107] Based on this, the encoder transforms the mesh into: The graph information encoded as a graph neural network is: G = (V, E). The point information and edge information in the simulated grid correspond to the point information and edge information in the graph neural network, respectively.

[0108] S1032: Update the vertex information and edge information in the graph information via the processor.

[0109] The processor in the collision simulation model is used to update the point information and edge information in the graph information.

[0110] Exemplarily, the processor includes L layers of message passing blocks, and each layer of message passing blocks updates edge information and vertex information in the graph information.

[0111] For example, see Figure 6 , Figure 6 This is a schematic diagram of the processor processing process provided by this application.

[0112] like Figure 6 As shown, f E represents edge messages passing blocks, f V represents node message passing blocks, e′ ij represents the updated edge messages (Passededge messages), v′ i Indicates passed node messages, v i Represents a point feature vector.

[0113] Among them, f E and f V It is a two-layer residual-connected multilayer perceptron (MLP), the size of which can be 128.

[0114] For example, in the processor, e' ij ←f E (e ij ,v i ,v j ), Update the vertex and edge information in the graph.

[0115] S1033: The updated point information and edge information are converted by the decoder to obtain a collision simulation result of the deformable object at time t+1.

[0116] The decoder in the collision simulation model is used to convert latent variable spatial information into dynamic information in the physical system. In layman's terms, the decoder converts updated point and edge information into the collision simulation results of the deformable object at time t+1.

[0117] For example, in order to transform the latent variable space information into dynamic information in the physical system, the decoder uses a two-layer MLP to update the dynamic information in the latent variable space.

[0118] Specifically, the point feature vector v of the latent space at time t is i Converted into dynamic information a at time t i .

[0119] By using the feedforward Euler integral to calculate the dynamic information of the physical system at time t+1 Right now Get the collision simulation result of the deformable object at time t+1.

[0120] In the above implementation method, the first dynamic information and the second dynamic information are processed by the encoder, processor and decoder in the collision simulation model, so that complete point, edge and surface information can be extracted, as well as latent variable space information. The processor is used for better message transmission to effectively avoid the occurrence of penetration phenomenon, thereby making the predicted collision simulation results more realistic and accurate.

[0121] See Figure 7 , Figure 7 is a specific flow chart of a method for training a collision simulation model shown in another exemplary embodiment of the present application; optionally, in some possible implementations of the present application, when executing Figure 1 Before the method shown, a method for training a collision simulation model may be included. The method for training a collision simulation model may include: S201 to S206, specifically as follows:

[0122] S201: Obtain first sample dynamic information of a sample deformable object at time t in a sample training set.

[0123] The database stores a pre-collected sample training set, which includes first sample dynamic information corresponding to sample deformable objects at different times, and second sample dynamic information corresponding to sample collision objects at different times.

[0124] When training the collision simulation model, the first sample dynamic information of the sample deformable object at time t can be directly obtained from the sample training set according to actual needs.

[0125] S202: Obtain second sample dynamic information of the sample collision object at time t+1 in the sample training set.

[0126] For example, the second sample dynamic information of the sample collision object at time t+1 can be directly obtained from the sample training set. Alternatively, the initial sample dynamic information of the sample collision object at the initial time can be obtained from the sample training set, and the second sample dynamic information of the sample collision object at time t+1 can be predicted based on the initial sample dynamic information. The specific implementation method can be found in the description of S1021 to S1022 and will not be repeated here.

[0127] S203: Input the first sample dynamic information and the second sample dynamic information into the graph neural network for processing to obtain a sample collision simulation result of the sample deformable object at time t+1; the graph neural network includes a recursive regression module.

[0128] For example, the structure of the graph neural network is similar to that of a trained collision simulation model, namely, the graph neural network also includes an encoder, a processor, and a decoder. Therefore, the process of processing the first and second sample dynamic information by the graph neural network is similar to the process of processing the first and second dynamic information by the collision simulation model. Please refer to the description in S1031-S1033 and will not be repeated here.

[0129] The specific information included in the sample collision simulation results is similar to the specific information included in the collision simulation results, and will not be repeated here.

[0130] It is worth noting that the graph neural network also includes a recursive regression module, which is also called a collision-aware recursive regression module.

[0131] The recursive regression module is used to calculate the penetration distance between the sample deformable object at time t+1 and the sample collision object at time t+1, thereby facilitating the adjustment of the network parameters of the graph neural network in training according to the penetration distance until the collision simulation results output by the graph neural network do not show any penetration phenomenon.

[0132] S204: Determine a penetration distance between the sample deformable object and the sample collision object based on the second sample dynamic information, the sample collision simulation result, and the recursive regression module.

[0133] This recursive regression module consists of two main parts, both used to calculate the penetration distance. One part is the vertex-face test, and the other is the edge-edge test. Specifically, the penetration distance is calculated using the vertex-face test, and the other using the edge-edge test.

[0134] The places where the sample deformable object and the sample collision object contact each other when they collide are different, and the method of calculating the penetration distance is also different. For example, when the places where the sample deformable object and the sample collision object contact each other when they collide are points and faces, the penetration distance is calculated by the vertex-face test method. For another example, when the places where the sample deformable object and the sample collision object contact each other when they collide are edges and edges, the penetration distance is calculated by the edge-edge test method. For another example, when the places where the sample deformable object and the sample collision object contact each other when they collide are faces and points, the penetration distance is calculated by the vertex-face test method. This is only an illustrative description and is not a limitation.

[0135] Optionally, in some possible implementations of the present application, the above S204 may include S2041 to S2043, which are specifically as follows:

[0136] S2041: Extracting first point, edge, and surface information corresponding to the sample collision object from the second sample dynamic information.

[0137] For example, the first point-edge-surface information may include any one of point information, edge information, and surface information. The first point-edge-surface information corresponding to the sample collision object extracted from the second sample dynamic information may also be different depending on the actual collision.

[0138] S2042: Extracting second point edge information corresponding to the sample deformable object from the sample collision simulation result.

[0139] For example, the second point-edge-surface information may include any one of point information, edge information, and surface information. Depending on the actual collision, the second point-edge-surface information corresponding to the sample deformable object extracted from the sample collision simulation results may also be different.

[0140] For example, when the sample deformable object and the sample collision object collide at points and surfaces, the point information corresponding to the sample deformable object is extracted, and the surface information corresponding to the sample collision object is extracted. When the sample deformable object and the sample collision object collide at edges, the edge information corresponding to the sample deformable object and the edge information corresponding to the sample collision object are extracted.

[0141] Optionally, to achieve diversity in the collision process and thus ensure the accuracy of the training results, any one of the following types of information can be randomly extracted: point information, edge information, or surface information of the sample collision objects; and any one of the following types of information can be randomly extracted: point information, edge information, or surface information of the sample deformable objects. This is merely an example and is not intended to be limiting.

[0142] S2043: Using a recursive regression module, the first point edge surface information and the second point edge surface information are processed to obtain a penetration distance between the sample deformable object at time t+1 and the sample collision object at time t+1.

[0143] Exemplarily, when point information corresponding to a sample deformable object and surface information corresponding to a sample collision object are extracted, or when point information corresponding to a sample collision object and surface information corresponding to a sample deformable object are extracted, the penetration distance is calculated by vertex-surface testing.

[0144] See Figure 8 , Figure 8 This is a schematic diagram of a method for calculating penetration distance shown in this application.

[0145] like Figure 8 As shown, the state change of a sample collision object and a sample deformable object from time t=0 to time t=1 is used as an example to illustrate. In the actual training process of the model, the state change can be from any time to the next time adjacent to any time.

[0146] Δa0b0c0 represents the deformed triangle at t=0, Δa1b1c1 represents the deformed triangle at t=1, p0 represents the vertex at t=0, p1 represents the vertex at t=1, n0, n1, n t Represents the normal vector.

[0147] T t represents the deformed triangle at any time between t = 0 and t = 1, p t Represents the vertex at any time between t = 0 and t = 1. It can be understood that the interval [0,1] is defined by the starting position and the ending position. These positions are linear, and the deformed triangle T t and vertex p t is the interpolation of the time variable t within this interval.

[0148] The penetration distance can be determined by detecting the coplanarity. When coplanar, the penetration distance can be determined by (p t -a t )·n t Calculate the penetration distance. Here a t Represents the deformed triangle at any time between t=0 and t=1.

[0149] For example, whether or not the two surfaces are coplanar can be determined in the following manner.

[0150] If the four scalar values A, B, (2*C+F) / 3, and (2*D+E) / 3 have the same sign, T t and p t They will not be coplanar during the interval.

[0151] A=(p0-a0)·n0, B=(p1-a1)·n1

[0152]

[0153] E=(p0-a0)·n1, F=z(p1-a1)·n0

[0154] For example, when n0 is orthogonal to Δa0b0c0 and n1 is orthogonal to Δa1b1c1, n0 and n1 are not coplanar, and no collision will occur and no penetration distance will be generated.

[0155] Exemplarily, when edge information corresponding to a sample deformable object and edge information corresponding to a sample collision object are extracted, the penetration distance is calculated through an edge-edge test.

[0156] See Figure 9 , Figure 9 It is a schematic diagram of another method of calculating the penetration distance shown in this application.

[0157] like Figure 9 As shown, the state change of a sample collision object and a sample deformable object from time t=0 to time t=1 is used as an example to illustrate. In the actual training process of the model, the state change can be from any time to the next time adjacent to any time.

[0158] u0, v0 and k0, l0 represent the two edges at time t=0, u1, v1 and k1, l1 represent the two edges at time t=1, n t Represents the normal vector, u t 、v t and k t 、l t Represents two edges at any time between t=0 and t=1.

[0159] Represents two deformation edges at any time between t = 0 and t = 1. It can be understood that the interval [0,1] is defined by the starting position and the ending position. These positions are linear. is the interpolation of the time variable t within this interval.

[0160] The penetration distance can be determined by detecting the coplanarity. When coplanar, the penetration distance can be determined by (l t -k t )·n t Calculate the penetration distance.

[0161] For example, whether or not the two surfaces are coplanar can be determined in the following manner.

[0162] If the signs of the four scalar values A′, B′, (2*C′+F′) / 3, and (2*D′+E′) / 3 are the same, They will not be coplanar.

[0163] A′=(l0-k0)·n′0, B′=(l1-k1)·n′1

[0164]

[0165] E′=(l0-k0)·n′1, F′=(l1-k1)·n′0

[0166] For example, when n′0 is orthogonal to the plane Δu0k0v0 and n′1 is orthogonal to the plane Δu1k1v1, n′0 and n′1 are not coplanar, and no collision will occur and no penetration distance will be generated.

[0167] In the above implementation, the recursive regression module is used to calculate the penetration distance in different ways, which can simulate various situations in which the penetration phenomenon may occur in an all-round way, thereby effectively avoiding these situations and making the collision simulation model finally trained effectively avoid the penetration phenomenon.

[0168] Optionally, to speed up the determination of the penetration distance and thus the training of the collision simulation model, a culling strategy can be employed to remove points that will not cause penetration. For example, a SDF threshold e can be pre-set, and points with an SDF value greater than e can be removed.

[0169] S205: Determine a loss value according to a preset loss function and the penetration distance.

[0170] Exemplarily, each penetration distance calculated under different circumstances is obtained, and each penetration distance is substituted into a preset loss function to calculate a loss value.

[0171] Preset loss functions can include:

[0172] ξ VF =max(D vf ),

[0173] in, They are used to represent the penetration distances calculated by vertex-face testing.

[0174] The preset loss function can also include:

[0175] ξ EE =max(D ee ),

[0176] in, They are used to represent the penetration distances calculated by edge-to-edge testing.

[0177] S206: When it is detected that the loss value does not meet the preset conditions, the network parameters of the graph neural network are updated and the graph neural network training continues.

[0178] The preset condition may be that the loss value is less than or equal to the loss value threshold, or that the loss value is within a preset error range, but is not limited thereto and may be set according to actual conditions, which is not restricted here.

[0179] Determine whether the loss value meets the preset conditions. If the loss value does not meet the preset conditions, execute S206; if the loss value meets the preset conditions, execute S207.

[0180] For example, assume that the preset condition is that the loss value is less than or equal to the preset loss value threshold. Then, when the device executing the training process (for example, a device that predicts collision simulation results, or other devices) confirms that the current loss value is greater than the preset loss value threshold, it is determined that there is still penetration in the collision simulation results output by the current graph neural network. At this time, it is necessary to update the network parameters of the graph neural network, then return to S201, and continue to execute S201 to S205 until the loss value determined in S206 is less than or equal to the preset loss value threshold, and then execute S207.

[0181] When updating the network parameters of a graph neural network, the network parameters (such as weight values) in the decoder can be updated first. The decoder then changes the network parameters in the processor and encoder through reverse propagation. This is only an example and is not intended to be limiting.

[0182] S207: When it is detected that the loss value meets the preset conditions, stop training the graph neural network and determine the trained graph neural network as the collision simulation model.

[0183] For example, assuming the preset condition is that the loss value is less than or equal to a preset loss value threshold. Then, when the device executing the training process confirms that the current loss value is less than or equal to the preset loss value threshold, it determines that there is no penetration in the collision simulation results output by the current graph neural network, that is, it determines that the current graph neural network training meets the expected requirements, and stops training the graph neural network. The network parameters in the current graph neural network are fixed, and the current graph neural network is determined to be the trained collision simulation model.

[0184] It is worth noting that two loss functions are provided in S205, which can be used to calculate two loss values. The network parameters of the graph neural network are adjusted according to the two loss values, without affecting each other. When the two loss values meet their corresponding preset conditions, the training of the graph neural network is stopped, and the trained graph neural network is determined as the collision simulation model.

[0185] In the prior art, in order to avoid mutual penetration, it is necessary to manually set a relatively large collision threshold for training data generation. However, this collision threshold is very difficult to determine, resulting in slow training model speed and high cost. In this application, a recursive regression module is used to calculate the penetration distance under different conditions, and the network parameters of the graph neural network are reversely adjusted based on the penetration distance. With a small amount of training data, a collision simulation model with no penetration phenomenon can be obtained. This improves the speed of training the collision simulation model, saves training costs, improves the accuracy of the collision simulation model processing results, and ensures high simulation efficiency and quality.

[0186] At the same time, the trained collision simulation model is improved in terms of authenticity and real-time performance, that is, on the one hand, it can accurately represent the characteristics of the object, and on the other hand, it can speed up the computing power.

[0187] Optionally, in a possible implementation, during the process of training the collision simulation model, it may also include: obtaining a preset self-supervision function; and adjusting the network parameters of the graph neural network according to the self-supervision function.

[0188] For example, a self-supervision item can be pre-set, which can sample the latent space and effectively solve the problem of poor training effect caused by an unbalanced or insufficient sample training set.

[0189] Self-supervision items can include self-supervision functions, as follows:

[0190] τ compact =ξ Random +τ KL

[0191]

[0192] The self-supervisory function obeys the normal distribution, Δ represents the constraint threshold of no collision, SDF() represents the signed distance field function, D(z) represents the decoder, and P t+1 Represents the dynamic information of the collision object at time t+1, τ KL Represents the distribution error.

[0193] The network parameters of the graph neural network are updated based on the value calculated by the self-supervisory function. For example, when the value is greater than a preset value, the network parameters of the graph neural network are updated. When updating the network parameters of the graph neural network, the network parameters (such as weight values) in the decoder can be updated first, and the decoder changes the network parameters in the processor and encoder through reverse propagation. This is only an example and is not limited to this.

[0194] When the value is less than or equal to the preset value, the network parameters in the graph neural network are no longer updated. It is worth noting that updating the network parameters in the graph neural network according to the loss value in S206 above and updating the network parameters in the graph neural network according to the self-supervisory function in this embodiment do not affect each other.

[0195] Because the network parameters in the graph neural network are updated according to the loss value in the above S206, the purpose is to prevent the trained collision simulation model from experiencing penetration, and the self-supervised function in this embodiment updates the network parameters in the graph neural network to enable the trained collision simulation model to effectively handle more different types of collisions.

[0196] For example, when the loss value is less than or equal to a preset loss value threshold, and the value calculated by the self-supervisory function is less than or equal to a preset value, the graph neural network at that time is determined to be a trained collision simulation model. This is merely an example and is not intended to be limiting.

[0197] In the above implementation method, by adjusting the network parameters of the graph network model through the self-supervisory function, the trained collision simulation model can sample the latent space, which can effectively solve the problem of poor training effect caused by unbalanced and insufficient sample training sets, and can provide more information and compact collision responses, thereby more effectively avoiding the penetration phenomenon.

[0198] In order to more intuitively experience the collision simulation model provided by this application, the output of the collision simulation results of deformable objects has high simulation accuracy, accurate simulation results, and good visual fidelity. Figure 10 , Figure 10 It is a comparison chart of the collision simulation results shown in this application.

[0199] like Figure 10 As shown, Figure 10 The first row shows the actual collision results, the second row shows the collision simulation results obtained by the method in the prior art, and the third row shows the collision simulation results obtained after processing using the collision simulation model in this application.

[0200] It can be clearly seen that in the collision simulation results obtained in the second row using the method in the prior art, the ball and the deformable object undergo mutual penetration, that is, dark parts framed by squares appear in the left and right images of the second row.

[0201] By using the collision simulation model in this application to predict the collision simulation results at different times, whether it is a point-to-face collision, a point-to-point collision, an edge-to-face collision, an edge-to-edge collision, or a face-to-face collision, the penetration phenomenon can be effectively avoided, thereby obtaining a collision simulation result with high simulation accuracy, accurate simulation results, and high visual realism.

[0202] See Figure 11 , Figure 11 This is a schematic diagram of a device for predicting collision simulation results provided by an embodiment of the present application. The device for predicting collision simulation results includes various units for executing Figure 2 、 Figure 4 、 Figure 7 Each step in the corresponding embodiment. Please refer to Figure 2 、 Figure 4 、 Figure 7 For the convenience of explanation, only the parts related to this embodiment are shown. Figure 11 ,include:

[0203] The first acquisition unit 310 is configured to acquire first dynamic information of the deformable object at time t, where t is an integer and is greater than or equal to 0.

[0204] A second acquisition unit 320 is configured to acquire second dynamic information of the collision object at time t+1;

[0205] The processing unit 330 is used to input the first dynamic information and the second dynamic information into the trained collision simulation model for processing to obtain the collision simulation result of the deformable object at time t+1; the collision simulation model is obtained by training the graph neural network based on the sample training set; during the training process, the penetration distance between the sample deformable object and the sample collision object in the sample training set is determined, and the network parameters of the graph neural network are updated according to the penetration distance.

[0206] Optionally, the second acquiring unit 320 is specifically configured to:

[0207] Acquiring initial dynamic information of the collision object at an initial moment;

[0208] The second dynamic information is predicted according to the initial dynamic information.

[0209] Optionally, the processing unit 330 is specifically configured to:

[0210] Inputting the first dynamic information and the second dynamic information into the encoder, and encoding the first dynamic information and the second dynamic information into graph information by the encoder;

[0211] Updating the vertex information and edge information in the graph information by the processor;

[0212] The decoder converts the updated point information and edge information to obtain a collision simulation result of the deformable object at time t+1.

[0213] Optionally, the device further comprises a training unit, wherein the training unit is configured to:

[0214] Acquire first sample dynamic information of a sample deformable object at time t in the sample training set;

[0215] Acquire second sample dynamic information of the sample collision object at time t+1 in the sample training set;

[0216] Inputting the first sample dynamic information and the second sample dynamic information into the graph neural network for processing to obtain a sample collision simulation result of the sample deformable object at time t+1; the graph neural network includes a recursive regression module;

[0217] determining a penetration distance between the sample deformable object and the sample collision object based on the second sample dynamic information, the sample collision simulation result, and the recursive regression module;

[0218] Determining a loss value according to a preset loss function and the penetration distance;

[0219] When it is detected that the loss value does not meet the preset conditions, the network parameters of the graph neural network are updated and the graph neural network continues to be trained.

[0220] Optionally, the training unit is further configured to:

[0221] When it is detected that the loss value meets the preset condition, the training of the graph neural network is stopped, and the trained graph neural network is determined as the collision simulation model.

[0222] Optionally, the training unit is further configured to:

[0223] Extracting first point edge and surface information corresponding to the sample collision object from the second sample dynamic information;

[0224] Extracting second point edge information corresponding to the sample deformable object from the sample collision simulation result;

[0225] The first point edge surface information and the second point edge surface information are processed by using the recursive regression module to obtain a penetration distance between the sample deformable object at time t+1 and the sample collision object at time t+1.

[0226] Optionally, the device further comprises:

[0227] A third acquisition unit is used to acquire a preset self-supervision function;

[0228] An adjustment unit is used to adjust the network parameters of the graph neural network according to the self-supervisory function.

[0229] See Figure 12 , Figure 12 FIG. 1 is a schematic diagram of a device for predicting collision simulation results provided by another embodiment of the present application. Figure 12 As shown, the device 4 for predicting collision simulation results in this embodiment includes: a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40. When the processor 40 executes the computer program 42, the steps in the above-mentioned method for predicting collision simulation results are implemented, such as Figure 1 Alternatively, when the processor 40 executes the computer program 42, the functions of the units in the above embodiments are realized, for example, Figure 11 The functions of units 310 to 330 are shown.

[0230] Exemplarily, the computer program 42 can be divided into one or more units, each of which is stored in the memory 41 and executed by the processor 40 to implement the present application. The one or more units can be a series of computer instruction segments capable of performing specific functions, which describe the execution process of the computer program 42 in the device 4 for predicting collision simulation results. For example, the computer program 42 can be divided into a first acquisition unit, a second acquisition unit, and a processing unit, with the specific functions of each unit being as described above.

[0231] The device may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will understand that Figure 12 This is merely an example of the device 4 for predicting collision simulation results and does not constitute a limitation on the device. The device may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the device may also include input and output devices, network access devices, buses, etc.

[0232] The processor 40 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0233] The memory 41 may be an internal storage unit of the device, such as a hard disk or memory of the device. The memory 41 may also be an external storage terminal of the device, such as a plug-in hard disk equipped on the device, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Furthermore, the memory 41 may include both an internal storage unit of the device and an external storage terminal. The memory 41 is used to store the computer instructions and other programs and data required by the terminal. The memory 41 may also be used to temporarily store data that has been output or is about to be output.

[0234] An embodiment of the present application further provides a computer storage medium, which may be non-volatile or volatile. The computer storage medium stores a computer program, which, when executed by a processor, implements the steps in the above-mentioned method embodiments for predicting collision simulation results.

[0235] The present application also provides a computer program product. When the computer program product is run on a device, the device is caused to execute the steps in the above-mentioned method embodiments for predicting collision simulation results.

[0236] An embodiment of the present application further provides a chip or integrated circuit, which includes: a processor for calling and running a computer program from a memory, so that a device equipped with the chip or integrated circuit executes the steps in the above-mentioned embodiments of the method for predicting collision simulation results.

[0237] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0238] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0239] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0240] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit of the technical solutions of the embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A method for predicting collision simulation results, characterized in that: include: Obtaining first dynamic information of the deformable object at time t; t≥0 and is an integer; Obtain the second dynamic information of the collision object at time t+1; Inputting the first dynamic information and the second dynamic information into a trained collision simulation model for processing to obtain a collision simulation result of the deformable object at time t+1; The collision simulation model is obtained by training the graph neural network based on the sample training set; During the training process, the penetration distance between the sample deformable object and the sample collision object in the sample training set is determined, and the network parameters of the graph neural network are updated according to the penetration distance.

2. The method according to claim 1, wherein The obtaining of the second dynamic information of the collision object at time t+1 includes: Acquiring initial dynamic information of the collision object at an initial moment; The second dynamic information is predicted according to the initial dynamic information.

3. The method according to claim 1, wherein The collision simulation model includes an encoder, a processor, and a decoder. Inputting the first dynamic information and the second dynamic information into the trained collision simulation model for processing to obtain a collision simulation result of the deformable object at time t+1 includes: Inputting the first dynamic information and the second dynamic information into the encoder, and encoding the first dynamic information and the second dynamic information into graph information by the encoder; Updating the vertex information and edge information in the graph information by the processor; The decoder converts the updated point information and edge information to obtain a collision simulation result of the deformable object at time t+1.

4. The method according to any one of claims 1 to 3, wherein Before inputting the first dynamic information and the second dynamic information into the trained collision simulation model for processing to obtain the collision simulation result of the deformable object at time t+1, the method further includes: Acquire first sample dynamic information of a sample deformable object at time t in the sample training set; Acquire second sample dynamic information of the sample collision object at time t+1 in the sample training set; Inputting the first sample dynamic information and the second sample dynamic information into the graph neural network for processing to obtain a sample collision simulation result of the sample deformable object at time t+1; the graph neural network includes a recursive regression module; determining a penetration distance between the sample deformable object and the sample collision object based on the second sample dynamic information, the sample collision simulation result, and the recursive regression module; Determining a loss value according to a preset loss function and the penetration distance; When it is detected that the loss value does not meet the preset conditions, the network parameters of the graph neural network are updated and the graph neural network continues to be trained.

5. The method according to claim 4, wherein After determining the loss value according to the preset loss function and the penetration distance, the method further includes: When it is detected that the loss value meets the preset condition, the training of the graph neural network is stopped, and the trained graph neural network is determined as the collision simulation model.

6. The method according to claim 4, wherein The determining of the penetration distance between the sample deformable object and the sample collision object based on the second sample dynamic information, the sample collision simulation result, and the recursive regression module includes: Extracting first point edge and surface information corresponding to the sample collision object from the second sample dynamic information; Extracting second point edge surface information corresponding to the sample deformable object from the sample collision simulation result; The first point edge surface information and the second point edge surface information are processed by using the recursive regression module to obtain a penetration distance between the sample deformable object at time t+1 and the sample collision object at time t+1.

7. The method according to claim 4, wherein The method further comprises: Get the preset self-supervision function; Adjust the network parameters of the graph neural network according to the self-supervisory function.

8. A device for predicting collision simulation results, characterized in that: include: a first acquiring unit, configured to acquire first dynamic information of the deformable object at time t; t≥0 and is an integer; A second acquiring unit, configured to acquire second dynamic information of the collision object at time t+1; a processing unit, configured to input the first dynamic information and the second dynamic information into a trained collision simulation model for processing, to obtain a collision simulation result of the deformable object at time t+1; The collision simulation model is obtained by training the graph neural network based on the sample training set; During the training process, the penetration distance between the sample deformable object and the sample collision object in the sample training set is determined, and the network parameters of the graph neural network are updated according to the penetration distance.

9. A device for predicting collision simulation results, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.