CN114626293A - Method, device, equipment and storage medium for predicting collision simulation result - Google Patents

Method, device, equipment and storage medium for predicting collision simulation result Download PDF

Info

Publication number
CN114626293A
CN114626293A CN202210170947.1A CN202210170947A CN114626293A CN 114626293 A CN114626293 A CN 114626293A CN 202210170947 A CN202210170947 A CN 202210170947A CN 114626293 A CN114626293 A CN 114626293A
Authority
CN
China
Prior art keywords
sample
collision
information
dynamic information
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210170947.1A
Other languages
Chinese (zh)
Inventor
钱银玲
孙寅紫
王琼
王平安
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Institute of Advanced Technology of CAS
Original Assignee
Shenzhen Institute of Advanced Technology of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Institute of Advanced Technology of CAS filed Critical Shenzhen Institute of Advanced Technology of CAS
Priority to CN202210170947.1A priority Critical patent/CN114626293A/en
Publication of CN114626293A publication Critical patent/CN114626293A/en
Priority to PCT/CN2022/140060 priority patent/WO2023160162A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Computer Hardware Design (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application is applicable to the technical field of physical simulation, and provides a method, a device, equipment and a storage medium for predicting a collision simulation result, wherein the method comprises the following steps: acquiring first dynamic information of the deformable object at the time t; acquiring second dynamic information of the collision object at the moment of 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 the time of t + 1; in 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 neural network of the graph are updated according to the penetration distance. In the scheme, the collision simulation model is adopted to process the dynamic information of the deformable object and the collision object, the condition that the deformable object and the collision object mutually permeate is avoided, the collision simulation result obtained through the prediction of the collision simulation model is high in precision, the accuracy of the simulation result is improved, and the visual fidelity is improved.

Description

Method, device, equipment and storage medium for predicting collision simulation result
Technical Field
The present application relates to the field of physical simulation technologies, and in particular, to a method, an apparatus, a device, and a storage medium for predicting a collision simulation result.
Background
Physical simulation, also known as physical simulation, is an important component of many computer graphics applications. For example, collision simulation has been widely used in the fields of computer graphics, movie animation, and virtual reality.
The most traditional simulation method is a numerical calculation method, and although a physically accurate simulation result and a visual effect can be generated by the numerical calculation method, the calculation method is too time-consuming, the simulation cost is increased, and the performance required by each interactive application program cannot be met.
In recent years, with the development of machine learning, a deep simulation method is started, which mainly uses the capability of a neural network to rapidly learn a nonlinear function and output a micro model of a deformable object. However, the deep simulation method is still immature, and objects are easy to permeate in the process of processing, so that the simulation precision is low, the simulation result is inaccurate, and the visual fidelity is poor.
Disclosure of Invention
In view of this, embodiments of the present application provide a method, an apparatus, a device, and a storage medium for predicting a collision simulation result, so as to solve the problems of low simulation precision, inaccurate simulation result, and poor visual fidelity caused by an immature depth simulation method and easy penetration of an object during a processing process.
A first aspect of an embodiment of the present application provides a method for predicting a collision simulation result, where the method includes:
acquiring first dynamic information of the deformable object at the time t; t is not less than 0 and is an integer; acquiring second dynamic information of the collision object at the moment of 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 the time of t + 1; the collision simulation model is obtained by training a graph neural network based on a sample training set; in 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.
In the method for predicting the collision simulation result provided by the first aspect, because the penetration distance between the sample deformable object and the sample collision object is calculated in the training process of the collision simulation model, and the network parameters of the neural network of the graph are updated according to the penetration distance, the penetration phenomenon of the trained collision simulation model cannot occur in the actual use process. Therefore, when the collision simulation model is adopted to process the dynamic information of the deformable object and the collision object, the situation that the deformable object and the collision object mutually permeate does not occur, so that the collision simulation result obtained through the prediction of the collision simulation model is high in precision, the accuracy of the simulation result is improved, and the visual fidelity is improved. And the collision simulation model is obtained by training the graph neural network based on the sample training set, and can effectively learn message transmission, information coding, data representation and the like through the graph neural network, so that more effective information can be extracted in the process of processing state information, and message transmission is better performed, so that the predicted collision simulation result is more real and more accurate.
Optionally, in a possible implementation manner, the acquiring the second dynamic information of the impact object at the time t +1 includes: acquiring initial dynamic information of the collision object at an initial moment; and predicting the second dynamic information according to the initial dynamic information. In this implementation manner, the second dynamic information of the colliding object at the time t +1 is predicted by the initial dynamic information of the colliding object at the initial time, so that more accurate second dynamic information can be obtained, and the prediction of more accurate collision simulation results according to the second dynamic information is facilitated.
Optionally, in a possible implementation manner, 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 a 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 through the encoder; updating, by the processor, point information and side information in the graph information; and converting the updated point information and the updated side information through the decoder to obtain a collision simulation result of the deformable object at the time of t + 1. In the implementation mode, the first dynamic information and the second dynamic information are processed through an encoder, a processor and a decoder in the collision simulation model, complete point, edge and surface information can be extracted, hidden variable space information is extracted, the processor is utilized to carry out better message transmission, the permeation phenomenon is effectively avoided, and therefore the predicted collision simulation result is more real and accurate.
Optionally, in a possible implementation manner, before the inputting the first dynamic information and the second dynamic information into a trained collision simulation model for processing and obtaining a collision simulation result of the deformable object at the time t +1, the method further includes: acquiring first sample dynamic information of the sample deformable object at the time t in the sample training set; acquiring second sample dynamic information of a sample collision object at the t +1 moment 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 the t +1 moment; the graph neural network comprises 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; and when the loss value is detected not to meet the preset condition, updating the network parameters of the graph neural network, and continuing to train the graph neural network.
Optionally, in a possible implementation manner, after determining the loss value according to a preset loss function and the penetration distance, the method further includes: and when the loss value is detected to meet the preset condition, stopping training the graph neural network, and determining the graph neural network after training as the collision simulation model.
In this implementation, in the prior art, in order to avoid the mutual infiltration, a relatively large collision threshold generated by training data needs to be manually set, but the collision threshold is very difficult to determine, which results in a slow speed and high cost for training the model. In the application, penetration distances under different conditions are calculated through a recursive regression module, and a collision simulation model without penetration can be obtained under the condition of a small amount of training data based on network parameters of a neural network of a penetration distance inverse regulation diagram. The speed of training the collision simulation model is improved, the training cost is saved, the accuracy of the processing result of the collision simulation model is improved, and the high simulation efficiency and quality are ensured.
Meanwhile, the authenticity and the real-time performance of the trained collision simulation model are improved, namely, the object characteristics can be accurately represented on the one hand, and the operational capability can be accelerated on the other hand.
Optionally, in a possible implementation manner, the determining, based on the second sample dynamic information, the sample collision simulation result, and the recursive regression module, a penetration distance between the sample deformable object and the sample collision object includes: extracting first point boundary information corresponding to the sample collision object from the second sample dynamic information; extracting second point side information corresponding to the sample deformable object from the sample collision simulation result; and processing the first point edge face information and the second point edge face information by using the recursive regression module to obtain the penetration distance between the sample deformable object at the time of t +1 and the sample collision object at the time of t + 1. In the implementation mode, the penetration distance is calculated in different modes by utilizing the recursive regression module, and various conditions which can cause the penetration phenomenon can be simulated in multiple directions, so that the conditions are effectively avoided, and the collision simulation model obtained by final training effectively avoids the penetration phenomenon.
Optionally, in a possible implementation manner, the method further includes: acquiring a preset self-supervision function; and adjusting network parameters of the graph neural network according to the self-supervision function. In the implementation mode, the network parameters of the graph network model are adjusted through the self-supervision function, the trained collision simulation model can be used for sampling the hidden space, the problem that the training effect is poor when a sample training set is unbalanced and insufficient can be effectively solved, collision response with more information compactness can be provided, and then the permeation phenomenon can be effectively avoided.
A second aspect of an embodiment of the present application provides an apparatus for predicting a collision simulation result, including:
a first acquisition unit configured to acquire first dynamic information of the deformable object at time t; t is not less than 0 and is an integer;
the second acquisition unit is used for acquiring second dynamic information of the collision object at the moment of t + 1;
the processing unit is used for 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 the moment t + 1; the collision simulation model is obtained by training a graph neural network based on a sample training set; in 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.
A third aspect of the embodiments of the present application provides an apparatus for predicting crash simulation results, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the method for predicting crash simulation results as described in the first aspect.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the steps of the method of predicting collision simulation results as described in the first aspect above.
A fifth aspect of the embodiments of the present application provides a computer program product, which, when running on an apparatus for predicting crash simulation results, causes the apparatus for predicting crash simulation results to execute the steps of the method for predicting crash simulation results according to the first aspect.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic illustration of the permeation phenomenon provided herein;
FIG. 2 is a schematic flow chart diagram of a method of predicting crash simulation results provided by an exemplary embodiment of the present application;
FIG. 3 is a schematic diagram of the matrix operation shown in the present application;
FIG. 4 is a flowchart detailing a step S103 of a method for predicting crash simulation results in accordance with another exemplary embodiment of the present application;
FIG. 5 is a schematic diagram of the encoder process provided herein;
FIG. 6 is a schematic diagram of a processor process provided herein;
FIG. 7 is a detailed flow diagram of a method of training a collision simulation model according to yet another exemplary embodiment of the present application;
FIG. 8 is a schematic illustration of one manner in which the present application illustrates calculating a penetration distance;
FIG. 9 is a schematic illustration of another way of calculating the penetration distance shown herein;
FIG. 10 is a comparison of crash simulation results shown in the present application;
FIG. 11 is a schematic diagram of an apparatus for predicting crash simulation results according to an embodiment of the present application;
fig. 12 is a schematic diagram of an apparatus for predicting collision simulation results according to another embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In the description of the embodiments of the present application, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an association relationship describing an associated object, and means that there may be three relationships, for example, a and/or B, and may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present embodiment, "a plurality" means two or more unless otherwise specified.
In order to better understand the embodiments of the present application, terms or concepts that may be referred to in the embodiments are introduced below.
1. Graph Neural network (Graph Neural Networks, GNN)
The method is a deep learning method based on a graph structure. It can be seen by definition that the graph neural network is composed of two parts, namely a "graph" and a "neural network". Here, "graph" is a graph data structure in graph theory, and "neural network" is a deep learning neural network structure.
2. Collision simulation
Simulating the collision result of the collision object and the deformable object.
Physical simulation is also called physical simulation, and the general simulation process is based on the similarity of physical properties and geometric shapes and the simulation with other properties unchanged. Physical simulations are an important component of many computer graphics applications. For example, collision simulation has been widely used in the fields of computer graphics, movie animation, and virtual reality.
The most traditional simulation method is a numerical calculation method, and although a physically accurate simulation result and a visual effect can be generated by the numerical calculation method, the calculation method is too time-consuming, the simulation cost is increased, and the performance required by each interactive application program cannot be met.
In recent years, with the development of machine learning, deep simulation methods have been developed, which mainly utilize the capability of neural networks to rapidly learn nonlinear functions and output a micro model of a deformable object. However, the deep simulation method is still immature, and is weak in the aspects of collision detection and response, and in the process of collision processing, a collision object and a deformable object are easy to permeate each other, so that the simulation precision is low, the simulation result is inaccurate, and the visual fidelity is poor.
Referring to fig. 1, fig. 1 is a schematic diagram of the permeation phenomenon provided in the present application.
As shown in fig. 1, the ball in fig. 1 represents a colliding object, and the object in contact with the ball is a deformable object. The left side of fig. 1 shows an idealized collision simulation result, and the right side of fig. 1 shows a collision simulation result obtained by a depth simulation method in the prior art. Comparing the boxed portion of the left middle of fig. 1 with the boxed portion of the right middle of fig. 1, it is evident that the right ball and the deformable object have interpenetrated, i.e., the dark boxed portion appears in the right image.
For example, when a ball collides with a cloth, the ball does not penetrate the cloth in a real collision result. When the collision result of the ball and the cloth is simulated, if the permeation phenomenon occurs, irreversible influence can be generated on subsequent simulation, and the simulation result at the moment is low in precision, inaccurate and poor in visual fidelity.
In view of this, the embodiment of the present application provides a method for predicting a collision simulation result, which obtains first dynamic information of a deformable object at time t; t is not less than 0 and is an integer; acquiring second dynamic information of the collision object at the moment of 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 the time of t + 1; the collision simulation model is obtained by training a graph neural network based on a sample training set; in 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 neural network of the graph are updated according to the penetration distance. In the implementation mode, because the penetration distance between the sample deformable object and the sample collision object is calculated in the training process of the collision simulation model, and the network parameters of the neural network of the graph are updated according to the penetration distance, the penetration phenomenon of the collision simulation model obtained by training can not occur in the actual use process. Therefore, when the collision simulation model is adopted to process the dynamic information of the deformable object and the collision object, the situation that the deformable object and the collision object mutually permeate does not occur, so that the collision simulation result obtained through the prediction of the collision simulation model is high in precision, the accuracy of the simulation result is improved, and the visual fidelity is improved.
And the collision simulation model is obtained by training the graph neural network based on the sample training set, and can effectively learn message transmission, information coding, data representation and the like through the graph neural network, so that more effective information can be extracted in the process of processing state information, and message transmission is better performed, so that the predicted collision simulation result is more real and more accurate.
Referring to fig. 2, fig. 2 is a schematic flow chart of a method for predicting collision simulation results according to an exemplary embodiment of the present application. The main execution body 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, an in-vehicle computer, a tablet computer, a Personal Digital Assistant (PDA), a wearable device, and the like, and may further include various types of servers. For example, the server may be an independent server, or may be a cloud service that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a web service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), and a big data and artificial intelligence platform.
The method for predicting collision simulation results as shown in fig. 2 may include: s101 to S103 are as follows:
s101: first dynamic information of the deformable object at time t is acquired.
Deformable objects, as the name implies, may be objects that deform. For example, the deformable object may be cloth, plastic, or the like. This is merely an example and is not intended to be limiting.
The first dynamic information may include position information, attitude information, motion information, velocity information, deformation information, and the like of the deformable object. The motion information may include a motion direction, a motion trend, a motion track, and the like of the deformable object. The velocity information may include acceleration, angular velocity, linear velocity, etc. of the deformable object.
The first dynamic information may further include first point information, first side information, and first side information of the deformable object. For example, in a collision simulation experiment, when a deformable object comes into contact with a collision object, a contact point, a contact side, a contact surface, and the like are generated, the first point information is information corresponding to the contact point on the deformable object, the first side information is information corresponding to the contact side on the deformable object, and the first side information is information corresponding to the contact surface on the deformable object.
Alternatively, during a collision of the deformable object with the collision object, there may be a case where the deformable object is not in contact with the collision object. In this case, the first point information may be information corresponding to a point at which the predicted deformable object will contact the impact object, the first side information may be information corresponding to a side at which the predicted deformable object will contact the impact object, and the first side information may be information corresponding to a side at which the predicted deformable object will contact the impact object. The description is given for illustrative purposes only and is not intended to be limiting.
Illustratively, the first dynamic information of the deformable object at time t is known. For example, in performing a crash simulation experiment, first dynamic information of the deformable object at each moment in time that has occurred is recorded by the apparatus. Such as pre-storing the first dynamic information of the deformable object at time t in a database. Wherein t is not less than 0 and is an integer. When the collision simulation result of the deformable object at the time t +1 needs to be predicted, first dynamic information of the deformable object at the time t is acquired.
For example, upon receiving the prediction instruction, first dynamic information of the deformable object at time t is acquired in the database. Wherein the prediction instruction is used for indicating the collision simulation result of the deformable object at the predicted t +1 moment. The prediction instruction can be sent to the device by other terminals, or can be manually triggered in the device by a user. The description is given for illustrative purposes only and is not intended to be limiting.
At different time, the first dynamic information of the deformable object may be the same or different, based on the actual situation.
S102: and acquiring second dynamic information of the collision object at the moment of t + 1.
In the field of physical simulation, an impact object is also referred to as a tool, and may be understood as an auxiliary tool used in predicting an impact simulation result of a deformable object. In this embodiment, a description will be given taking an impact object as a ball as an example.
The second dynamic information may include position information, attitude information, motion information, velocity information, deformation information, etc. of the colliding object. The motion information may include a motion direction, a motion trend, a motion track, and the like of the collision object. The velocity information may include acceleration, angular velocity, linear velocity, etc. of the impacting object.
The second dynamic information may further include second point information, second side information, and second plane information of the impact object. For example, when the collision object comes into contact with the deformable object, a contact point, a contact edge, a contact surface, and the like are generated, the second point information is information corresponding to the contact point on the collision object, the second side 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.
Alternatively, during a collision of the collision object with the deformable object, there may be a case where the collision object is not in contact with the deformable object. At this time, the second point information may be information corresponding to a point at which the predicted collision object will contact the deformable object, the second side information may be information corresponding to a side at which the predicted collision object will contact the deformable object, and the second surface information may be information corresponding to a surface at which the predicted collision object will contact the deformable object. The description is given for illustrative purposes only and is not intended to be limiting.
Illustratively, the dynamic information of the colliding object at time t is known. For example, in performing a collision simulation experiment, dynamic information of a colliding object at each time point that has occurred is recorded by the apparatus. For example, the dynamic information of the collision object at time t is stored in the database in advance. When the collision simulation result of the deformable object at the time t +1 needs to be predicted, the dynamic information of the collision object at the time t is acquired. And predicting second dynamic information of the collision object at the t +1 moment according to the dynamic information of the collision object at the t moment.
For example, the second dynamic information of the impact object at time t +1 is simulated using an existing simulator. Specifically, the position information, posture information, motion information, velocity information, deformation information, point information, side information, plane information, and the like of the colliding object at time t are input to the simulator, and the second dynamic information of the colliding object at time t +1 is output. The description is given for illustrative purposes only and is not intended to be limiting.
Optionally, in a possible implementation manner, initial dynamic information of the collision object at the initial time may also be obtained, and second dynamic information of the collision object at the time t +1 may be predicted according to the initial dynamic information.
S103: and 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 the t +1 moment.
Illustratively, the collision simulation model is obtained by training a graph neural network based on a sample training set. The sample training set comprises first sample dynamic information corresponding to sample deformable objects at different moments and second sample dynamic information corresponding to sample collision objects at different moments. 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 +1, and the like. Wherein t is not less than 0 and is an integer.
It should be noted that the specific information type included in the first dynamic information is the same as the specific information type included in the first dynamic information. That is, the first sample dynamic information may include position information, posture information, motion information, speed information, deformation information, and the like of the sample deformable object, and may further include point information, side information, plane information, and the like of the sample deformable object. Specifically, refer to the description in S101, and are not described herein again.
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, and reference may be made to the description in S102, which is not repeated herein.
In this embodiment, a collision simulation model trained in advance is stored in advance in the device that predicts the collision simulation result. The collision simulation model is obtained by training a graph neural network based on a sample training set. In 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 neural network of the graph are updated according to the penetration distance.
For example, in the training process, the penetration distance between the sample deformable object and the sample collision object in the sample training set is calculated, when the penetration distance is larger than 0, the current model is proved to be not trained well, the network parameters of the graph neural network are adjusted, and the sample training set is trained continuously according to the graph neural network after the network parameters are adjusted. And when the penetration distance is less than or equal to 0, the current model is proved to be well trained, the network parameters of the neural network of the current diagram are fixed, and the neural network of the diagram after the network parameters are fixed is used as the trained collision simulation model.
It can be understood that the collision simulation model may be trained in advance by the device that predicts the collision simulation result, or may be migrated to the device that predicts the collision simulation result after being trained in advance by another device. That is, the execution subject who trains the collision simulation model may be the same as or different from the execution subject who performs collision simulation result prediction using the collision simulation model. For example, when the collision simulation model is trained by other equipment, after the collision simulation model is trained by other equipment, the network parameters of the collision simulation model are fixed, and a file corresponding to the trained collision simulation model is obtained. The file is then migrated to the device that predicts the results of the crash simulation.
And inputting the first dynamic information of the deformable object at the time t and the second dynamic information of the collision object at the time t +1 into a trained collision simulation model for processing to obtain a collision simulation result of the deformable object at the time t + 1. The value of t can be adjusted according to actual requirements, and therefore collision simulation results of deformable objects at different moments are obtained. That is, the collision simulation result of the deformable object at any time can be predicted by 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 may include the motion state of the deformable object at the time t +1, and specifically includes information similar to the first dynamic information. For example, the collision simulation result may include position information, posture information, motion information, velocity information, deformation information, and the like of the deformable object at time t + 1. The motion information may include a motion direction, a motion trend, a motion track, and the like of the deformable object. The velocity information may include acceleration, angular velocity, linear velocity, etc. of the deformable object at time t + 1. The collision simulation result may also include point information, side information, plane information, and the like of the deformable object at time t + 1. The collision simulation result may also include an image of the deformable object at time t + 1.
In the implementation mode, because the penetration distance between the sample deformable object and the sample collision object is calculated in the training process of the collision simulation model, and the network parameters of the neural network of the graph are updated according to the penetration distance, the penetration phenomenon of the collision simulation model obtained by training can not occur in the actual use process. Therefore, when the collision simulation model is adopted to process the dynamic information of the deformable object and the collision object, the situation that the deformable object and the collision object mutually permeate does not occur, so that the collision simulation result obtained through the prediction of the collision simulation model is high in precision, the accuracy of the simulation result is improved, and the visual fidelity is improved. The method and the device realize the reduction of the mutual permeation artifact and simultaneously ensure high simulation efficiency.
And the collision simulation model is obtained by training the graph neural network based on the sample training set, and can effectively learn message transmission, information coding, data representation and the like through the graph neural network, so that more effective information can be extracted in the process of processing state information, and message transmission is better performed, so that the predicted collision simulation result is more real and more accurate.
Optionally, in some possible implementations of the present application, the S102 may include S1021 to S1022, specifically as follows:
s1021: initial dynamic information of the colliding object at an initial time is acquired.
The specific information type included in the initial dynamic information is the same as the specific information type included in the second dynamic information, that is, the initial dynamic information may include position information, attitude information, motion information, velocity information, deformation information, and the like of the colliding object, and may further include point information, side information, plane information, and the like of the colliding object. Reference is made to the above description for details, which are not repeated here.
The initial time refers to the initial time when the collision object performs the collision simulation experiment. When a collision simulation experiment is carried out, dynamic information of a collision object at each moment when the collision simulation experiment occurs is recorded through equipment, and the recorded information is stored in a database. When the second dynamic information of the collision object at the time t +1 needs to be determined, the initial dynamic information of the collision object at the initial time is obtained in the database.
It should be noted that the collision simulation model is trained based on a graph neural network, which is good at processing data of a graph data structure. In order to improve the processing speed and the simulation accuracy of the collision simulation model, in the present embodiment, the initial dynamic information is expressed in the form of a simulation mesh.
When the initial dynamic information is represented in the form of a simulation grid, the initial dynamic information includes node information and edge information, and it is understood that the initial dynamic information is composed of a plurality of nodes and a plurality of edges. Each node represents the state of the node by using a state vector, and the state of the node is calculated by the feature vector of the node, the feature vector of a neighbor node, the state vector of the neighbor node and the feature vector of an edge connected with the node.
The feature vector may be used to indicate position information, attitude information, motion information, velocity information, deformation information, point information, side information, plane information, and the like of the colliding object.
S1022: and predicting the second dynamic information according to the initial dynamic information.
Illustratively, the initial dynamic information is subjected to matrix operation to obtain second dynamic information of the collision object at the time t + 1.
For example, the node information and the side information are acquired in the initial dynamic information. Specifically, each node and each edge in the simulation grid corresponding to the initial dynamic information are obtained, the number of the nodes and the number of the edges are obtained, and matrix operation is performed on the obtained nodes and edges to obtain second dynamic information of the collision object at the time of t + 1.
Referring to fig. 3, fig. 3 is a schematic diagram of a matrix operation shown in the present application.
As shown in figure 3 of the drawings,
Figure BDA0003517586950000111
indicates the beginningInitial dynamic information of the collision object at the beginning of time,
Figure BDA0003517586950000112
and second dynamic information representing the colliding object at time t + 1.
Figure BDA0003517586950000113
Respectively represents the nodes corresponding to the collision objects at the initial moment, the numbers at the upper right corner represent the number of the nodes,
Figure BDA0003517586950000114
respectively representing the corresponding sides of the collision object at the initial moment, and the numbers at the upper right corner represent the number of the sides.
For acquisition in the manner shown in the figure
Figure BDA0003517586950000115
And
Figure BDA0003517586950000116
and performing matrix operation to obtain second dynamic information of the collision object at the time of t + 1. This is merely an example and is not intended to be limiting.
In the implementation manner, the second dynamic information of the collision object at the time t +1 is predicted by the initial dynamic information of the collision object at the initial time, so that more accurate second dynamic information can be obtained, and the prediction of more accurate collision simulation results according to the second dynamic information is facilitated.
Referring to fig. 4, fig. 4 is a flowchart illustrating a method for predicting a collision simulation result according to another exemplary embodiment of the present application in detail in step S103; optionally, in some possible implementations of the present application, the S103 may include S1031 to S1033, which are as follows:
s1031: the first dynamic information and the second dynamic information are input into an encoder, and the first dynamic information and the second dynamic information are encoded into graph information by the encoder.
Illustratively, the collision simulation model includes an Encoder (Encoder), a Processor (Processor), and a Decoder (Decoder). The encoder is used for encoding the input first dynamic information and the second dynamic information.
It should be noted that the collision simulation model is trained based on a graph neural network, which is good at processing data of a graph data structure. In order to improve the processing speed and the simulation accuracy of the collision simulation model, in the present embodiment, the first dynamic information and the second dynamic information are expressed in the form of a simulation mesh.
The first dynamic information is taken as an example for explanation. When the first dynamic information is represented in the form of the simulation grid, the first dynamic information includes node information and side information, and it can be understood that the first dynamic information is composed of a plurality of nodes and a plurality of edges. Each node represents the state of the node by using a state vector, and the state of the node is calculated by the feature vector of the node, the feature vector of a neighbor node, the state vector of the neighbor node and the feature vector of an edge connected with the node.
The feature vector may be used to represent position information, posture information, motion information, velocity information, deformation information, point information, side information, plane information, and the like of the deformable object. The second dynamic information is the same, and is not described herein again.
For ease of understanding, please refer to fig. 5, and fig. 5 is a schematic diagram of the encoder process provided in the present application. As shown in fig. 5, the light-colored orb indicates a mesh node (Deformable object nodes) corresponding to a Deformable object, the dark-colored orb indicates a mesh node (Tool mesh nodes) corresponding to a collision object, a line between the light-colored orb and the light-colored orb indicates a mesh edge (Deformable object edges) corresponding to the Deformable object, a line between the dark-colored orb and the dark-colored orb indicates a mesh edge (Tool mesh edges) corresponding to the collision object, and a line between the light-colored orb and the dark-colored orb indicates a contact edge (Tool object contacts) corresponding to the collision object.
And encoding the two input simulation grids by an encoder to obtain graph information.
Illustratively, the first dynamic information and the second dynamic information are input into an encoder. For example, the input is a simulation grid pair:
Figure BDA0003517586950000121
wherein, Mx t=(Vx,Ex) For representing the simulated grid of the deformable object at time t, point VxBy grid edge ExAnd (4) connecting.
Figure BDA0003517586950000122
Simulation grid for representing an impacting object at time t +1, point VyEdge E of quilt gridyAnd (4) connecting. Wherein, Pt+1(pt+1,ot+1) Representing the pose information of the colliding object at time t + 1. For example, pt+1Indicates the position ot+1Indicating a rotation.
Figure BDA0003517586950000123
Reference grid information representing the colliding object at time t'.
By pt+1And
Figure BDA0003517586950000124
calculating the simulation grid of the collision object at the time t +1
Figure BDA0003517586950000125
On this basis, the encoder maps the mesh pair:
Figure BDA0003517586950000126
graph information encoded as a graph neural network: g ═ V, E. The point information and the side information in the simulation grid correspond to the point information and the side information in the graph neural network respectively.
S1032: the point information and the side information in the graph information are updated by the processor.
The processor in the collision simulation model is used for updating point information and side information in the graph information.
Illustratively, the processor contains L-layer messaging blocks, each layer of which updates side information and point information in the graph information.
For ease of understanding, please refer to fig. 6, where fig. 6 is a schematic diagram of a processing procedure of the processor provided in the present application.
As shown in FIG. 6, fERepresenting Edge message passing blocks, fVDenotes a Node message passing Block (Node messages passing blocks), e'ijRepresents an updated edge message (Passed edge messages), v'iRepresenting Passed node messages, viRepresenting point feature vectors.
Wherein f isEAnd fVThe size of a residual concatenated Multilayer Perceptron (MLP) that is two layers may be 128.
Exemplarily, may be through e 'in the processor'ij←fE(eij,vi,vj)、
Figure BDA0003517586950000127
And updating point information and side information in the graph information.
S1033: and converting the updated point information and the updated side information through a decoder to obtain a collision simulation result of the deformable object at the time of t + 1.
And a decoder in the collision simulation model is used for converting the hidden variable space information into dynamic information in a physical system. Colloquially is understood to mean that the updated point information and side information are converted by the decoder into the collision simulation result of the deformable object at the time t + 1.
Illustratively, in order to convert hidden variable space information into dynamic information in a physical system, a decoder uses two layers of MLPs to update the dynamic information of the hidden variable space.
Specifically, a point feature vector v of a hidden space at the time t is divided intoiDynamic information a converted into time ti
Calculating dynamic information of a physical system at time t +1 by using feed forward euler integration
Figure BDA0003517586950000131
Namely, it is
Figure BDA0003517586950000132
And obtaining a collision simulation result of the deformable object at the time t + 1.
In the implementation mode, the first dynamic information and the second dynamic information are processed through the encoder, the processor and the decoder in the collision simulation model, complete point, side and surface information can be extracted, hidden variable space information is extracted, the processor is utilized to carry out better message transmission, the permeation phenomenon is effectively avoided, and therefore the predicted collision simulation result is more real and accurate.
Referring to FIG. 7, FIG. 7 is a flowchart illustrating a method for training a collision simulation model according to yet another exemplary embodiment of the present application; optionally, in some possible implementations of the present application, before performing the method shown in fig. 1, a method of training a collision simulation model may be further included, and the method of training the collision simulation model may include: s201 to S206 are as follows:
s201: and acquiring first sample dynamic information of the sample deformable object at the time t in the sample training set.
The database stores a pre-collected sample training set. The sample training set comprises first sample dynamic information corresponding to sample deformable objects at different moments and second sample dynamic information corresponding to sample collision objects at different moments.
When the collision simulation model is trained, the first sample dynamic information of the sample deformable object at the time t can be directly obtained in the sample training set according to actual requirements.
S202: and acquiring second sample dynamic information of the sample collision object at the t +1 moment in the sample training set.
For example, the second sample dynamic information of the sample collision object at the time t +1 may be directly obtained in the sample training set. And initial sample dynamic information of the sample collision object at the initial moment can be obtained in the sample training set, and second sample dynamic information of the sample collision object at the t +1 moment is predicted according to the initial sample dynamic information. For a specific implementation, reference may be made to descriptions in S1021 to S1022, and details are not described herein.
S203: inputting the first sample dynamic information and the second sample dynamic information into a graph neural network for processing to obtain a sample collision simulation result of the sample deformable object at the time of t + 1; the graph neural network includes a recursive regression module.
Illustratively, the structure of the graph neural network is similar to that of the trained collision simulation model, i.e., the graph neural network also includes an encoder, a processor, and a decoder. Therefore, the process of processing the first dynamic information and the second dynamic information through the neural network is similar to the process of processing the first dynamic information and the second dynamic information through the collision simulation model, and reference may be made to the descriptions in S1031 to S1033, which are not repeated herein.
The information specifically included in the sample collision simulation result is similar to the information specifically included in the collision simulation result, and is not described herein again.
It is worth mentioning that the graph neural network further comprises a recursive regression module. The recursive regression module is also called a Collision-aware recursive regression (Collision aware recursive regression) module.
The recursive regression module is used for calculating the penetration distance between the sample deformable object at the moment t +1 and the sample collision object at the moment t +1, and further facilitating the adjustment of network parameters of the graph neural network in training according to the penetration distance until no penetration phenomenon occurs in the collision simulation result output by the graph neural network.
S204: and 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.
The recursive regression module mainly comprises two parts which are used for calculating the penetration distance. One part is Vertex-face test (Vertex-face test), and the other part is Edge-Edge test (Edge-Edge test). I.e., calculating the penetration distance by the vertex-plane test and calculating the penetration distance by the edge-edge test.
The contact place of the sample deformable object and the sample collision object when colliding is different, and the manner of selecting the calculation of the penetration distance is also different. For example, when the place of contact when the sample deformable object collides with the sample collision object is a point and a plane, the penetration distance is calculated by means of the vertex-plane test. For another example, when the place where the sample deformable object is in contact with the sample collision object at the time of collision is an edge and an edge, the penetration distance is calculated by means of an edge-to-edge test. For another example, when the place where the sample deformable object and the sample collision object are in contact when colliding is a plane and a point, the penetration distance is calculated by means of a vertex-plane test. The description is given for illustrative purposes only and is not intended to be limiting.
Optionally, in some possible implementations of the present application, the S204 may include S2041 to S2043, which are as follows:
s2041: and extracting first point boundary information corresponding to the sample collision object from the second sample dynamic information.
Illustratively, the first point side information may include any one of point information, side information, and side information. The actually occurring collisions are different, and the first point boundary information corresponding to the sample collision object extracted from the second sample dynamic information is also different.
S2042: and extracting second point edge information corresponding to the sample deformable object from the sample collision simulation result.
Illustratively, the second point side information may include any one of point information, side information, and side information. And the actually generated collisions are different, and the second point side information corresponding to the sample deformable object extracted from the sample collision simulation result is also different.
For example, when the contact position of the sample deformable object with the sample collision object is a point and a plane, point information corresponding to the sample deformable object is extracted, and plane information corresponding to the sample collision object is extracted. And when the contact position of the sample deformable object and the sample collision object is side and side, extracting side information corresponding to the sample deformable object and extracting side information corresponding to the sample collision object.
Optionally, in order to implement diversity of the collision process and thus ensure accuracy of the training result, any one of the point information, the side information, and the face information of the sample collision object may be randomly extracted, and any one of the point information, the side information, and the face information of the sample deformable object may be randomly extracted. The description is given for illustrative purposes only and is not intended to be limiting.
S2043: and processing the first point edge face information and the second point edge face information by using a recursive regression module to obtain the penetration distance between the sample deformable object at the time of t +1 and the sample collision object at the time of t + 1.
Illustratively, when point information corresponding to the sample deformable object, plane information corresponding to the sample collision object, or point information corresponding to the sample collision object, plane information corresponding to the sample deformable object is extracted, the penetration distance is calculated by way of a vertex-plane test.
Referring to fig. 8, fig. 8 is a schematic diagram illustrating a manner of calculating a penetration distance according to the present application.
As shown in fig. 8, the description will be made by taking an example of a state change between a time point t equal to 0 and a time point t equal to 1 when a sample collides with an object and a sample deformable object, and a state change from an arbitrary time point to a next time point adjacent to the arbitrary time point may be performed in the actual training of the model.
Δa0b0c0A deformed triangle indicating the time when t is 0, Δ a1b1c1A deformed triangle representing the moment when t is 1, p0Denotes the vertex at time t-0, p1Denotes the vertex at time t-1, n0、n1、ntA normal vector is represented.
TtRepresenting a deformed triangle at any time between the time t-0 and the time t-1, ptThe vertex at any time between the time t-0 and the time t-1 is indicated. It is understood that the interval 0,1 is defined by a start position and an end position]These positions being linear, deforming the triangle TtAnd vertex ptIs the interpolation of the time variable t in this interval.
The penetration distance can be determined by detecting coplanarity. When coplanar, can pass through (p)t-at)·ntAnd calculating the penetration distance. A heretAnd represents a deformed triangle at any time between the time t-0 and the time t-1.
Whether coplanar or not can be determined, for example, in the following manner.
If A, B, (2 x C + F)/3, (2 x D + E)/3 are the same sign, TtAnd ptAnd not coplanar during the gap. The method comprises the following specific steps:
A=(p0-a0)·n0,B=(p1-a1)·n1
Figure BDA0003517586950000151
E=(p0-a0)·n1,F=z(p1-a1)·n0
for example, when n0Is orthogonal to Δ a0b0c0,n1Is orthogonal to Δ a1b1c1When n is greater than n0And n1The non-coplanarity can not generate collision and penetration distance.
Illustratively, the penetration distance is calculated by a side-to-side test when side information corresponding to a sample deformable object, and side information corresponding to a sample collision object are extracted.
Referring to fig. 9, fig. 9 is a schematic diagram of another way of calculating the penetration distance shown in the present application.
As shown in fig. 9, the description will be made by taking an example of a state change between a time point t equal to 0 and a time point t equal to 1 when a sample collides with an object and a sample deformable object, and a state change from an arbitrary time point to a next time point adjacent to the arbitrary time point may be performed in the actual training of the model.
u0、v0And k0、l0Two edges representing time t-0, u1、v1And k1、l1Two edges representing time t-1, ntRepresents a normal vector, ut、vtAnd kt、ltThe term "t-0" means any time between t-1 and t-0.
Figure BDA0003517586950000161
Two deformed sides at any time between the time t-0 and the time t-1 are shown. It is understood that the interval 0,1 is defined by a start position and an end position]The positions are linear, and the positions are linear,
Figure BDA0003517586950000162
is the interpolation of the time variable t in this interval.
The penetration distance can be determined by detecting coplanarity. When co-planar, can be by (l)t-kt)·ntAnd calculating the penetration distance.
Whether coplanar or not can be determined, for example, in the following manner.
If the four scalar values a ', B', (2 + C + F ')/3, (2 + D + E')/3 are of the same sign,
Figure BDA0003517586950000164
Figure BDA0003517586950000165
and are not coplanar. The method comprises the following specific steps:
A′=(l0-k0)·n′0,B′=(l1-k1)·n′1
Figure BDA0003517586950000163
E′=(l0-k0)·n′1,F′=(l1-k1)·n′0
e.g. when n'0Normal to plane au0k0v0,n′1Normal to plane au1k1v1N'0And n'1Not coplanar, in which case no collision occursAnd no penetration distance is generated.
In the implementation mode, the penetration distance is calculated in different modes by utilizing the recursive regression module, and various conditions which can cause the penetration phenomenon can be simulated in multiple directions, so that the conditions are effectively avoided, and the collision simulation model obtained by final training effectively avoids the penetration phenomenon.
Optionally, in order to increase the speed of determining the penetration distance and thus increase the speed of training the collision simulation model, a rejection strategy may be adopted to reject some points. These points are points that do not cause the penetration phenomenon. For example, an SDF threshold e is preset, and points with SDF values greater than e are eliminated.
S205: and determining a loss value according to a preset loss function and the penetration distance.
Illustratively, each penetration distance calculated under different conditions is obtained, and each penetration distance is substituted into a preset loss function to calculate a loss value.
The preset loss function may include:
ξVF=max(Dvf),
Figure BDA0003517586950000171
wherein,
Figure BDA0003517586950000172
each representing a respective penetration distance calculated by the vertex-plane test.
The preset loss function may further include:
ξEE=max(Dee),
Figure BDA0003517586950000173
wherein,
Figure BDA0003517586950000174
respectively, for representing the respective penetration distances calculated by the edge-to-edge test.
S206: and when the loss value is detected not to meet the preset condition, updating the network parameters of the graph neural network, and continuing to train the graph neural network.
The preset condition may be that the loss value is less than or equal to the loss value threshold, or that the loss value belongs to a preset error range, but is not limited thereto, and may also be set according to an actual situation, and is not limited herein.
And judging whether the loss value meets a preset condition or not. When the loss value does not meet the preset condition, executing S206; when the loss value satisfies the preset condition, S207 is performed.
For example, assume that the preset condition is that the loss value is less than or equal to a preset loss value threshold. Then, when the device (for example, the device for predicting the collision simulation result, or other devices) executing the training process confirms that the current loss value is greater than the preset loss value threshold, it is determined that the penetration phenomenon still exists in the collision simulation result output by the current graph neural network. At this time, the network parameters of the neural network of the graph need to be updated, and then the process returns to S201, and S201 to S205 are continuously executed until the loss value determined in S206 is less than or equal to the preset loss value threshold, and S207 is executed.
When updating the network parameters of the neural network, the network parameters (such as weight values) in the decoder may be updated first, and the decoder changes the network parameters in the processor and the encoder in a backward transmission manner. The description is given for illustrative purposes only and is not intended to be limiting.
S207: and when the loss value is detected to meet the preset condition, stopping training the graph neural network, and determining the graph neural network after training as a collision simulation model.
For example, assume that 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 smaller than or equal to the preset loss value threshold, it is determined that no percolation phenomenon exists in the collision simulation result output by the current graph neural network, that is, it is determined that the training of the current graph neural network meets the expected requirement, and the training of the graph neural network is stopped. And fixing network parameters in the neural network of the current graph, and determining the neural network of the current graph as a trained collision simulation model.
It should be noted that two loss functions are provided in S205, two loss values can be calculated, and the network parameters of the neural network of the graph are adjusted according to the two loss values, without affecting each other. And when the two loss values respectively meet the corresponding preset conditions, stopping training the graph neural network, and determining the graph neural network after training as a collision simulation model.
In the prior art, in order to avoid mutual infiltration, a relatively large collision threshold generated by training data needs to be manually set, but the collision threshold is very difficult to determine, so that the training model is slow and high in cost. In the application, penetration distances under different conditions are calculated through a recursive regression module, and a collision simulation model without penetration can be obtained under the condition of a small amount of training data based on network parameters of a neural network of a penetration distance inverse regulation diagram. The speed of training the collision simulation model is increased, the training cost is saved, the accuracy of a processing result of the collision simulation model is increased, and the high simulation efficiency and quality are ensured.
Meanwhile, the authenticity and the real-time performance of the trained collision simulation model are improved, namely, the object characteristics can be accurately represented on the one hand, and the operational capability can be accelerated on the other hand.
Optionally, in a possible implementation manner, in the process of training the collision simulation model, the method may further include: acquiring a preset self-supervision function; and adjusting network parameters of the graph neural network according to the self-supervision function.
Illustratively, a self-supervision item can be preset, the self-supervision item can sample a hidden space, and the problem of poor training effect caused by unbalanced and insufficient sample training sets can be effectively solved.
The self-supervision term may include a self-supervision function, specifically as follows:
τcompact=ξRandomKL
Figure BDA0003517586950000181
the auto-supervision function obeys a positive-Taiji distribution, Δ represents a collision-free constraint threshold, SDF () represents a symbolic distance field function, D (z) represents a decoder, P (z)t+1Representing the dynamic information of the colliding object at time t +1, tauKLIndicating a distribution error.
And updating the network parameters of the graph neural network according to the values obtained by the calculation of the self-supervision function. For example, when the value is greater than a preset value, the network parameters of the neural network are updated. When updating the network parameters of the neural network, the network parameters (such as weight values) in the decoder may be updated first, and the decoder changes the network parameters in the processor and the encoder in a backward transmission manner. The description is given for illustrative purposes only and is not intended to be limiting.
When the value is less than or equal to the preset value, the network parameters in the graph neural network are not updated. It should be noted that the network parameters in the neural network of the graph are updated according to the loss values in S206 and the network parameters in the neural network of the graph are updated according to the auto-supervision function in the present embodiment, which are not affected by each other.
Because the network parameters in the neural network of the graph are updated according to the loss values in S206, the trained collision simulation model is not permeable, and the network parameters in the neural network of the graph are updated according to the auto-supervision function in this embodiment, so that the trained collision simulation model can effectively process more different types of collisions.
For example, when the loss value is smaller than or equal to the preset loss value threshold and the value calculated by the auto-supervision function is smaller than or equal to the preset value, the graph neural network at the moment can be determined as the trained collision simulation model. The description is given for illustrative purposes only and is not intended to be limiting.
In the implementation mode, the network parameters of the graph network model are adjusted through the self-supervision function, the trained collision simulation model can be used for sampling the hidden space, the problem that the training effect is poor when the sample training set is unbalanced and insufficient can be effectively solved, collision response with more information compactness can be provided, and the permeation phenomenon can be effectively avoided.
In order to more intuitively sense the collision simulation model provided by the present application, the collision simulation result of the output deformable object has high simulation precision, accurate simulation result and good visual fidelity, please refer to fig. 10, and fig. 10 is a comparison graph of the collision simulation result shown by the present application.
As shown in fig. 10, the first row in fig. 10 shows the real collision result, the second row shows the collision simulation result obtained by the method in the prior art, and the third row shows the collision simulation result obtained after the collision simulation model in the present application is used.
It is obvious that the second row, from the collision simulation results obtained by the method in the prior art, the ball and the deformable object have an interpenetration phenomenon, i.e. dark parts framed by boxes appear in the left and right images of the second row.
By adopting the collision simulation model in the application to predict the collision simulation results at different moments, the phenomenon of penetration can be effectively avoided no matter point-to-surface collision, point-to-point collision, edge-to-surface collision, edge-to-edge collision or face-to-face collision, so that the collision simulation results with high simulation precision, accurate simulation results and high visual fidelity are obtained.
Referring to fig. 11, fig. 11 is a schematic diagram of an apparatus for predicting collision simulation results according to an embodiment of the present application. The device for predicting the collision simulation result comprises units for executing the steps in the embodiments corresponding to fig. 2, 4 and 7. Please refer to fig. 2, fig. 4, and fig. 7 for the corresponding embodiments. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 11, it includes:
a first acquisition unit 310 for acquiring first dynamic information of the deformable object at time t; t is not less than 0 and is an integer;
a second obtaining unit 320, configured to obtain second dynamic information of the collision object at time t + 1;
the processing unit 330 is configured to input the first dynamic information and the second dynamic information into a trained collision simulation model for processing, so as to obtain a collision simulation result of the deformable object at a time t + 1; the collision simulation model is obtained by training a graph neural network based on a sample training set; in 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.
Optionally, the second obtaining unit 320 is specifically configured to:
acquiring initial dynamic information of the collision object at an initial moment;
and predicting the second dynamic information according to the initial dynamic information.
Optionally, the processing unit 330 is specifically configured to:
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 through the encoder;
updating, by the processor, point information and side information in the graph information;
and converting the updated point information and the updated side information through the decoder to obtain a collision simulation result of the deformable object at the time of t + 1.
Optionally, the apparatus further comprises a training unit configured to:
acquiring first sample dynamic information of the sample deformable object at the time t in the sample training set;
acquiring second sample dynamic information of a sample collision object at the t +1 moment 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 the time of t + 1; the graph neural network comprises 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;
and when the loss value is detected not to meet the preset condition, updating the network parameters of the graph neural network, and continuing to train the graph neural network.
Optionally, the training unit is further configured to:
and when the loss value is detected to meet the preset condition, stopping training the graph neural network, and determining the graph neural network after training as the collision simulation model.
Optionally, the training unit is further configured to:
extracting first point boundary information corresponding to the sample collision object from the second sample dynamic information;
extracting second point side information corresponding to the sample deformable object from the sample collision simulation result;
and processing the first point edge face information and the second point edge face information by using the recursive regression module to obtain the penetration distance between the sample deformable object at the time of t +1 and the sample collision object at the time of t + 1.
Optionally, the apparatus further comprises:
the third acquisition unit is used for acquiring a preset self-supervision function;
and the adjusting unit is used for adjusting the network parameters of the graph neural network according to the self-supervision function.
Referring to fig. 12, fig. 12 is a schematic diagram of an apparatus for predicting collision simulation results according to another embodiment of the present application. As shown in fig. 12, the apparatus 4 for predicting the result of collision simulation of this embodiment includes: a processor 40, a memory 41 and a computer program 42 stored in said memory 41 and executable on said processor 40. The processor 40, when executing the computer program 42, implements the steps in the various method embodiments described above for predicting crash simulation results, such as S101-S103 shown in fig. 1. Alternatively, the processor 40 implements the functions of the units in the above embodiments, such as the functions of the units 310 to 330 shown in fig. 11, when executing the computer program 42.
Illustratively, the computer program 42 may be divided into one or more units, which are stored in the memory 41 and executed by the processor 40 to accomplish the present application. The one or more units may be a series of computer instruction segments capable of performing specific functions for describing the execution of the computer program 42 in the device 4 for predicting crash simulation results. For example, the computer program 42 may be divided into a first acquisition unit, a second acquisition unit, and a processing unit, each unit having the specific functions as described above.
The apparatus may include, but is not limited to, a processor 40, a memory 41. Those skilled in the art will appreciate that fig. 12 is merely an example of a device 4 for predicting crash simulation results and does not constitute a limitation of the device and may include more or fewer components than shown, or some components in combination, or different components, e.g., the device may also include input-output devices, network access devices, buses, etc.
The Processor 40 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may be an internal storage unit of the device, such as a hard disk or a memory of the device. The memory 41 may also be an external storage terminal of the device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the device. Further, the memory 41 may also include both an internal storage unit and an external storage terminal of the apparatus. The memory 41 is used for storing 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 to be output.
The embodiment of the present application further provides a computer storage medium, where the computer storage medium may be non-volatile or volatile, and the computer storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps in the above method embodiments for predicting a collision simulation result.
The present application also provides a computer program product which, when run on an apparatus, causes the apparatus to perform the steps in the various above-described method embodiments of predicting crash simulation results.
An embodiment of the present application further provides a chip or an integrated circuit, where the chip or the integrated circuit includes: and the processor is used for calling and running the computer program from the memory so that the device provided with the chip or the integrated circuit executes the steps in each method embodiment for predicting the collision simulation result.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules, so as to perform all or part of the functions described above. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and they should be construed as being included in the scope of the present disclosure.

Claims (10)

1. A method of predicting crash simulation results, comprising:
acquiring first dynamic information of the deformable object at the time t; t is not less than 0 and is an integer;
acquiring second dynamic information of the collision object at the moment of 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 the time of t + 1; the collision simulation model is obtained by training a graph neural network based on a sample training set; in 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 of claim 1, wherein said obtaining second dynamic information of the impacting object at time t +1 comprises:
acquiring initial dynamic information of the collision object at an initial moment;
and predicting the second dynamic information according to the initial dynamic information.
3. The method of claim 1, wherein the collision simulation model comprises 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 results of the collision simulation of the deformable object at time t +1 comprises:
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 through the encoder;
updating, by the processor, point information and side information in the graph information;
and converting the updated point information and the updated side information through the decoder to obtain a collision simulation result of the deformable object at the time of t + 1.
4. The method of 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 and processing the input result to obtain the collision simulation result of the deformable object at the time t +1, the method further comprises:
acquiring first sample dynamic information of the sample deformable object at the time t in the sample training set;
acquiring second sample dynamic information of a sample collision object at the t +1 moment 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 the time of t + 1; the graph neural network comprises 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;
and when the loss value is detected not to meet the preset condition, updating the network parameters of the graph neural network, and continuing to train the graph neural network.
5. The method of claim 4, wherein after determining a loss value based on a preset loss function and the penetration distance, the method further comprises:
and when the loss value is detected to meet the preset condition, stopping training the graph neural network, and determining the graph neural network after training as the collision simulation model.
6. The method of claim 4, wherein said 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 results, and the recursive regression module comprises:
extracting first point boundary information corresponding to the sample collision object from the second sample dynamic information;
extracting second point side information corresponding to the sample deformable object from the sample collision simulation result;
and processing the first point edge face information and the second point edge face information by using the recursive regression module to obtain the penetration distance between the sample deformable object at the time of t +1 and the sample collision object at the time of t + 1.
7. The method of claim 4, wherein the method further comprises:
acquiring a preset self-supervision function;
and adjusting network parameters of the graph neural network according to the self-supervision function.
8. An apparatus for predicting crash simulation results, comprising:
a first acquisition unit configured to acquire first dynamic information of the deformable object at time t; t is not less than 0 and is an integer;
the second acquisition unit is used for acquiring second dynamic information of the collision object at the moment of t + 1;
the processing unit is used for 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 the moment t + 1; the collision simulation model is obtained by training a graph neural network based on a sample training set; in 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. An apparatus for predicting crash simulation results, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202210170947.1A 2022-02-23 2022-02-23 Method, device, equipment and storage medium for predicting collision simulation result Pending CN114626293A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210170947.1A CN114626293A (en) 2022-02-23 2022-02-23 Method, device, equipment and storage medium for predicting collision simulation result
PCT/CN2022/140060 WO2023160162A1 (en) 2022-02-23 2022-12-19 Method and apparatus for predicting collision simulation result, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210170947.1A CN114626293A (en) 2022-02-23 2022-02-23 Method, device, equipment and storage medium for predicting collision simulation result

Publications (1)

Publication Number Publication Date
CN114626293A true CN114626293A (en) 2022-06-14

Family

ID=81899780

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210170947.1A Pending CN114626293A (en) 2022-02-23 2022-02-23 Method, device, equipment and storage medium for predicting collision simulation result

Country Status (2)

Country Link
CN (1) CN114626293A (en)
WO (1) WO2023160162A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114972366A (en) * 2022-07-27 2022-08-30 山东大学 Full-automatic segmentation method and system for cerebral cortex surface based on graph network
CN115952569A (en) * 2023-03-14 2023-04-11 安世亚太科技股份有限公司 Simulation method, simulation device, electronic equipment and computer-readable storage medium
WO2023160162A1 (en) * 2022-02-23 2023-08-31 中国科学院深圳先进技术研究院 Method and apparatus for predicting collision simulation result, device and storage medium
CN118246294A (en) * 2024-05-27 2024-06-25 浙江凌迪数字科技有限公司 Cloth simulation method and device, electronic equipment and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118245136B (en) * 2024-05-21 2024-08-27 北京天平地成信息技术服务有限公司 VR physical engine optimization method and system based on machine learning

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2868180B1 (en) * 2004-03-24 2006-06-16 Commissariat Energie Atomique METHOD AND DEVICE FOR INTERACTIVE SIMULATION OF CONTACT BETWEEN OBJECTS
CN111192367B (en) * 2020-01-03 2021-01-15 北京中科深智科技有限公司 Method and device for simulating collision deformation of deformable object in real time
CN112417746B (en) * 2020-11-18 2022-11-25 中北大学 Method for predicting collision detection based on neural network
CN112915542B (en) * 2021-03-31 2022-07-22 腾讯科技(深圳)有限公司 Collision data processing method and device, computer equipment and storage medium
CN114626293A (en) * 2022-02-23 2022-06-14 中国科学院深圳先进技术研究院 Method, device, equipment and storage medium for predicting collision simulation result

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023160162A1 (en) * 2022-02-23 2023-08-31 中国科学院深圳先进技术研究院 Method and apparatus for predicting collision simulation result, device and storage medium
CN114972366A (en) * 2022-07-27 2022-08-30 山东大学 Full-automatic segmentation method and system for cerebral cortex surface based on graph network
CN114972366B (en) * 2022-07-27 2022-11-18 山东大学 Full-automatic segmentation method and system for cerebral cortex surface based on graph network
CN115952569A (en) * 2023-03-14 2023-04-11 安世亚太科技股份有限公司 Simulation method, simulation device, electronic equipment and computer-readable storage medium
CN118246294A (en) * 2024-05-27 2024-06-25 浙江凌迪数字科技有限公司 Cloth simulation method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2023160162A1 (en) 2023-08-31

Similar Documents

Publication Publication Date Title
CN114626293A (en) Method, device, equipment and storage medium for predicting collision simulation result
CN110020620B (en) Face recognition method, device and equipment under large posture
CN109359539B (en) Attention assessment method and device, terminal equipment and computer readable storage medium
CN112348828B (en) Instance segmentation method and device based on neural network and storage medium
CN111046027A (en) Missing value filling method and device for time series data
JP6812086B2 (en) Training method for reticulated pattern removal system, reticulated pattern removal method, equipment, equipment and media
CN112668716A (en) Training method and device of neural network model
CN112085056B (en) Target detection model generation method, device, equipment and storage medium
CN111185909B (en) Robot operation condition acquisition method and device, robot and storage medium
CN111985414B (en) Joint position determining method and device
CN110807379A (en) Semantic recognition method and device and computer storage medium
CN110765843A (en) Face verification method and device, computer equipment and storage medium
CN111798518A (en) Mechanical arm posture detection method, device and equipment and computer storage medium
CN108520532B (en) Method and device for identifying motion direction of object in video
CN113887708A (en) Multi-agent learning method based on mean field, storage medium and electronic device
CN107612737B (en) Alarm method and device
CN117894038A (en) Method and device for generating object gesture in image
CN111461091B (en) Universal fingerprint generation method and device, storage medium and electronic device
CN113657272A (en) Micro-video classification method and system based on missing data completion
CN117785677A (en) Sliding test method for screen sensitivity, mobile terminal and storage medium
CN110728351A (en) Data processing method, related device and computer storage medium
CN113139490B (en) Image feature matching method and device, computer equipment and storage medium
CN114820755A (en) Depth map estimation method and system
CN113886547A (en) Client real-time conversation switching method and device based on artificial intelligence and electronic equipment
CN112242959B (en) Micro-service current-limiting control method, device, equipment and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination