Training method of structural optimization model, structural optimization method and device
By sampling and network training of sample engineering components in the engineering field, combining position information, predicted stress and density, and adjusting network parameters, the problem that deep learning network cannot take into account both physical information and structural space information in structural topology optimization, and the generalization ability and interpretability of the model are improved.
Patent Information
- Application Number
- CN202311754483.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-19
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2043-12-19
AI Technical Summary
Deep learning networks cannot take into account both physical information and structural space information in structural topology optimization, and the data demand is large and the results are difficult to understand.
By sampling sample engineering components in the engineering field, the training stress solution network and density solution network are adjusted, and the network parameters are adjusted and the end conditions of model training are met.
The correlation between stress information and density information is improved, the ability of structural optimization model to capture and apply spatial information is enhanced, and the problem of insufficient interpretability when the model solves physical problems is solved.
Smart Images

Figure CN117494779B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a training method for a structural optimization model, a structural optimization method and a device. Background Art
[0002] In order to achieve meshless optimization in the process of structural topology optimization and avoid wasting resources and time, deep learning networks can be used for structural topology optimization. However, deep learning networks cannot take into account both physical information and structural spatial information, and have large data requirements and difficult-to-understand results, which have obvious defects. Summary of the invention
[0003] The present disclosure provides a training method for a structural optimization model, a structural optimization method, an apparatus, an electronic device, a storage medium, and a computer program product.
[0004] According to one aspect of the present disclosure, a training method for a structural optimization model is provided, comprising: sampling component structures of sample engineering components in an engineering field to obtain a plurality of sampling points of the sample engineering components; training a stress solving network in the structural optimization model based on position information of the sampling points to obtain predicted stresses of the sampling points; training a density solving network in the structural optimization model based on the predicted stresses to obtain predicted densities of the sampling points; adjusting network parameters of the stress solving network and the density solving network respectively based on the position information of the sampling points, the predicted stresses and the predicted density, and continuing to train the adjusted networks until an end condition of model training is met to obtain a target structural optimization model.
[0005] According to another aspect of the present disclosure, a structural optimization method is provided, comprising: obtaining a component structure of a target engineering component to be optimized; performing density prediction on the component structure of the target engineering component based on a target structure optimization model to obtain density distribution data of the component structure of the target engineering component, wherein the target structure optimization model is a model trained using the training method of the present disclosure.
[0006] According to another aspect of the present disclosure, a training device for a structural optimization model is provided, comprising: a sampling module, used to sample the component structure of a sample engineering component in the engineering field to obtain a plurality of sampling points of the sample engineering component; a first training module, used to train a stress solving network in the structural optimization model based on the position information of the sampling points to obtain the predicted stress of the sampling points; a second training module, used to train a density solving network in the structural optimization model based on the predicted stress to obtain the predicted density of the sampling points; an adjustment module, used to adjust the network parameters of the stress solving network and the density solving network respectively based on the position information of the sampling points, the predicted stress and the predicted density, and continue to train the adjusted networks until the end condition of the model training is met to obtain the target structural optimization model.
[0007] According to another aspect of the present disclosure, a structural optimization device is provided, comprising: an acquisition module for acquiring a component structure of a target engineering component to be optimized; a prediction module for performing density prediction on the component structure of the target engineering component based on a target structure optimization model to obtain density distribution data of the component structure of the target engineering component, wherein the target structure optimization model is a model trained using the training method of the present disclosure.
[0008] According to another aspect of the present disclosure, there is provided an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the training method of the structural optimization model and the structural optimization method described in the above-mentioned first embodiment.
[0009] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, on which a computer program / instructions are stored, and the computer instructions are used to enable the computer to execute the training method and the structural optimization method of the structural optimization model described in the above-mentioned embodiment.
[0010] According to another aspect of the present disclosure, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the training method of the structural optimization model and the structural optimization method described in the above-mentioned embodiment.
[0011] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0013] Figure 1 A schematic diagram of a flow chart of a training method for a structure optimization model provided in an embodiment of the present disclosure;
[0014] Figure 2 A schematic diagram of a flow chart of another method for training a structural optimization model provided in an embodiment of the present disclosure;
[0015] Figure 3 A schematic diagram of a process for training a structural optimization model provided in an embodiment of the present disclosure;
[0016] Figure 4 A schematic diagram of a flow chart of another method for training a structural optimization model provided in an embodiment of the present disclosure;
[0017] Figure 5 A schematic diagram of a flow chart of a structural optimization method provided in an embodiment of the present disclosure;
[0018] Figure 6 A schematic diagram of the structure of a training device for a structural optimization model provided by an embodiment of the present disclosure;
[0019] Figure 7 A schematic diagram of the structure of a structure optimization device provided in an embodiment of the present disclosure;
[0020] Figure 8 It is a block diagram of an electronic device used to implement the training method of the structure optimization model of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0021] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0022] Artificial Intelligence (AI) is a technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. At present, AI technology has the advantages of high automation, high precision and low cost, and has been widely used.
[0023] Deep Learning (DL) is a new research direction in the field of Machine Learning (ML). It is a science that studies the inherent laws and representation levels of sample data, enabling machines to have analytical learning capabilities like humans and to recognize data such as text, images, and sounds. It is widely used in speech and image recognition.
[0024] Structural topology optimization is an important engineering design task, which is currently widely used in engineering fields such as aerospace, automobile manufacturing, architectural design and mechanical engineering to improve product design, enhance performance, and reduce material and energy waste. It can be used to design the structure of new materials, improve the strength and durability of materials, or design the structure of certain specific components to reduce the weight of the structure while ensuring the strength of the structure.
[0025] The training method of the structural optimization model provided by the embodiments of the present disclosure can be applied to engineering fields such as aerospace, automobile manufacturing, and architectural design, and is mainly aimed at the structural design and optimization of engineering components.
[0026] Figure 1 A flow chart of a training method for a structure optimization model provided in an embodiment of the present disclosure. Figure 1 As shown, the training method of the structure optimization model may include:
[0027] S101, sampling the component structure of a sample engineering component in the engineering field to obtain a plurality of sampling points of the sample engineering component.
[0028] It should be noted that the execution subject of the training method of the structural optimization model in the embodiment of the present disclosure may be a hardware device with data information processing capabilities and / or the necessary software required to drive the hardware device to work. Optionally, the execution subject may include a server, a computer, a user terminal and other intelligent devices. The embodiment of the present disclosure is not specifically limited.
[0029] It is understandable that the component structure of an engineering component refers to a machine learning or deep learning structure designed and constructed in the engineering field to solve specific problems of the component. The component structure of an engineering component may be a network topology structure.
[0030] In some implementations, a plurality of sampling points of the sample engineering component are obtained by sampling the component structure of the sample engineering component. The sampling points collect position information. For example, the sampling points are (x, y, z) in the spatial coordinate system. Optionally, the component structure of the sample engineering component can be randomly sampled, or the component structure of the sample engineering component can be uniformly sampled to obtain a plurality of sampling points. For example, the central area, edge area, corner area, etc. on the component structure of the sample engineering component can be sampled.
[0031] S102, training a stress solving network in the structural optimization model based on the position information of the sampling points to obtain predicted stresses of the sampling points.
[0032] In some implementations, a stress solving network in the structural optimization model can be pre-built, and the location information of the sampling points can be input into the stress solving network for training to obtain the predicted stress of the sampling points. The stress solving network can be a linear neural network, and the predicted stress is expressed as (u, v, w).
[0033] Optionally, the number of training times of the stress solving network can be set. When the number of training times of the stress solving network reaches the set number, the training of the stress solving network is terminated, and then the training of the density solving network is started.
[0034] S103, training a density solving network in the structural optimization model based on the predicted stress to obtain predicted density of the sampling points.
[0035] In some implementations, a density solving network in the structural optimization model can be pre-built, and the predicted stress can be input into the density solving network for training to obtain the predicted density of the sampling point. The density solving network can be a convolutional neural network, and the predicted density is represented by (d).
[0036] In some implementations, the stress solving network and the density solving network can be trained alternately. That is, the number of training times for the stress solving network and the number of training times for the density solving network can be set respectively, and the stress solving network is trained first. When the number of training times reaches the set number, the density solving network begins to be trained. When the number of training times for the density solving network reaches the set number, the stress solving network continues to be trained. In the disclosed embodiment, by alternately training the two solving networks, the error accumulation of serial training of the two solving networks can be reduced, and the training accuracy of the two solving networks can be improved.
[0037] For example, the stress solving network is trained first. When the number of training times reaches 50, the density solving network is trained. When the number of training times reaches 100, the training returns to the stress solving network.
[0038] S104, based on the location information of the sampling points, the predicted stress and the predicted density, the network parameters of the stress solving network and the density solving network are adjusted respectively, and the adjusted networks are continuously trained until the end condition of the model training is met, thereby obtaining the target structure optimization model.
[0039] In some implementations, the loss function of the stress solving network can be determined based on the location information of the sampling points, the predicted stress, and the predicted density, the network parameters of the stress solving network can be adjusted based on the loss function, and the adjusted stress solving network can continue to be trained.
[0040] In some implementations, the loss function of the density solving network can also be determined based on the location information of the sampling points, the predicted stress and the predicted density, the network parameters of the density solving network can be adjusted based on the loss function, and the adjusted density solving network can continue to be trained.
[0041] Optionally, since the stress solving network and the density solving network are trained alternately, the network parameters of the stress solving network can be adjusted based on the loss function of the stress solving network, and the adjusted stress solving network is continuously trained until a set number of times is reached. Further, based on the loss function of the density solving network, the network parameters of the density solving network are adjusted, and the adjusted density solving network is continuously trained.
[0042] Optionally, the end condition of model training can be determined based on the loss function of the density solution network. Since the smaller the loss function, the better the training effect of the model, the threshold of the loss function of the density solution network can be set, and the loss function of the density solution network is less than or equal to the set threshold as the end condition of model training.
[0043] In some implementations, when training the adjusted network, it is determined whether the loss function of the density solving network is less than or equal to a set threshold. In response to the loss function of the density solving network being less than or equal to the set threshold, it is determined that the end condition of the model training is met, the training of the structural optimization model is ended, and the target structural optimization model is obtained.
[0044] According to the training method of the structural optimization model provided by the embodiment of the present disclosure, by sampling the component structure of the sample engineering component in the engineering field, a plurality of sampling points of the sample engineering component are obtained, and the position information of the sampling points is input into the stress solving network in the structural optimization model for training to obtain the predicted stress of the sampling points. Then the predicted stress is input into the density solving network in the structural optimization model for training to obtain the predicted density of the sampling points, which can improve the correlation between the stress information and the density information. Further, based on the position information, predicted stress and predicted density of the sampling points, the network parameters are adjusted, and the adjusted network is continuously trained until the structural optimization model meets the training end conditions to obtain the target structural optimization model, thereby improving the generalization ability of the target structural optimization model, combining the position information, stress and density, and improving the capture and application of spatial information by the target structural optimization model during the model optimization process, so as to help the target structural optimization model understand the spatial relationship and geometric structure of the engineering components, and solve the problem of insufficient interpretability of the target structural optimization model when solving physical problems.
[0045] Figure 2 A flow chart of a training method for a structure optimization model provided in an embodiment of the present disclosure. Figure 2 As shown, the training method of the structure optimization model may include:
[0046] S201, sampling the component structure of a sample engineering component in the engineering field to obtain a plurality of sampling points of the sample engineering component.
[0047] S202, training a stress solving network in the structural optimization model based on the position information of the sampling points to obtain predicted stresses of the sampling points.
[0048] S203, training a density solving network in the structural optimization model based on the predicted stress to obtain predicted density of the sampling points.
[0049] The relevant contents of steps S201 - S203 can be found in the above embodiment and will not be described again here.
[0050] In some implementations, the stress solving network is a linear neural network, and the density solving network is a convolutional neural network. The stress solving network and the density solving network are connected in series, and the stress information and the density information can be directly associated, and a true and definite prediction result can be provided.
[0051] It should be noted that when training the network in the structural optimization model, the stress solving network and the density solving network are trained alternately, and the network parameters of one network are maintained during the training of the other network, which can promote the correlation and fusion of stress information and density information, thereby improving the overall performance of the model.
[0052] That is, whenever the training times of one of the networks reaches the first set times, the training of the other network is started. Whenever the training parameters of the other network reach the second set times, the training of one of the networks is started.
[0053] For example, the first set number of times for the stress solution network is 100, and the second set number of times for the density solution network is 80. When the number of training times for the stress solution network reaches 100, the training for the density solution network is started; when the number of training times for the density solution network reaches 80, the training for the stress solution network is started. When the stress solution network is trained, the network parameters of the density solution network remain unchanged. When the density solution network is trained, the network parameters of the stress solution network remain unchanged.
[0054] S204, adjusting network parameters of the stress solving network based on the location information of the sampling points, the predicted stress and the predicted density.
[0055] In some implementations, network parameters of the stress solving network may be adjusted based on a loss function of the stress solving network to optimize the performance and generalization capability of the stress solving network. Alternatively, the loss function of the stress solving network may be determined based on predicted stresses and physical information of the sampling points.
[0056] Optionally, physical information of the sampling point can be obtained based on the position information, predicted stress and predicted density of the sampling point, wherein the physical information at least includes the compliance parameter of the sampling point. Based on the compliance equation, the position information, predicted stress and predicted density of the sampling point can be input into the compliance equation to output the compliance parameter of the sampling point.
[0057] Furthermore, based on the predicted stress and physical information of the sampling points, the first loss function of the stress solving network is obtained, and the network parameters of the stress solving network are adjusted based on the first loss function, so that the stress solving network can be adjusted in a more optimal direction, so that the structural optimization model is gradually optimized during the training process.
[0058] S205, adjusting network parameters of the density solving network based on the location information of the sampling points, the predicted stress and the predicted density.
[0059] In some implementations, network parameters of the density solving network may be adjusted based on the loss function of the density solving network to optimize the performance and generalization ability of the density solving network. Optionally, the loss function of the density solving network may be determined based on the predicted density and physical information of the sampling points.
[0060] Optionally, physical information of the sampling point can be obtained based on the position information, predicted stress and predicted density of the sampling point. The physical information can be the compliance parameter of the sampling point. Based on the compliance equation, the position information, predicted stress and predicted density of the sampling point can be input into the compliance equation to output the compliance parameter of the sampling point.
[0061] Furthermore, based on the predicted density and physical information of the sampling points, a second loss function of the density solution network is obtained, and the network parameters of the density solution network are adjusted based on the second loss function. The density solution network can be adjusted in a more optimal direction, so that the structural optimization model is gradually optimized during the training process.
[0062] Optionally, in order to retain a relatively concise and smooth structure, the physical information of the sampling points can be Gaussian filtered to obtain the derivative information of the physical information, where the derivative information refers to the derivative of the compliance parameter. Based on the predicted density, physical information and derivative information of the sampling points, the second loss function of the density solution network is obtained. Combining Gaussian filtering with loss function design can improve the smoothness of the density solution network prediction results, thereby optimizing the smoothness of the structural optimization model.
[0063] In some implementations, the network parameters of any solution network can also be adjusted based on the gradient information of the loss function to optimize the performance and generalization ability of the solution network and the structural optimization model. Optionally, for any solution network in the stress solution network and the density solution network, the gradient of the loss function of any solution network is calculated to obtain the gradient information of any solution network, and then the network parameters of any solution network are adjusted based on the gradient information.
[0064] S206, continue training the adjusted network until the end condition of model training is met, and obtain the target structure optimization model.
[0065] In some implementations, after each training of the density solving network, the end condition of the model training can be determined based on the second loss function of the density solving network. Since the smaller the loss function, the better the training effect of the model, a set threshold of the second loss function can be set, and the second loss function is less than or equal to the set threshold as the end condition of the model training.
[0066] Optionally, after each training of the density solving network is completed, the second loss function of the density solving network is compared with a set threshold. If the second loss function is less than or equal to the set threshold, it is determined that the end condition of the model training is met.
[0067] According to the training method of the structural optimization model provided by the embodiment of the present disclosure, by sampling the component structure of the sample engineering component in the engineering field, a plurality of sampling points of the sample engineering component are obtained, and the position information of the sampling points is input into the stress solving network in the structural optimization model for training to obtain the predicted stress of the sampling points. Then the predicted stress is input into the density solving network in the structural optimization model for training to obtain the predicted density of the sampling points, which can improve the correlation between the stress information and the density information. Further, based on the position information, predicted stress and predicted density of the sampling points, the first loss function and the second loss function are determined, and the gradient information of the loss function is calculated, the network parameters are adjusted based on the gradient information, and the adjusted network is continuously trained until the structural optimization model meets the training end condition, and the target structural optimization model is obtained, which improves the generalization ability of the target structural optimization model, and combines the position information, stress and density, so as to improve the capture and application of spatial information by the target structural optimization model in the model optimization process, so as to help the target structural optimization model understand the spatial relationship and geometric structure of the engineering components, and solve the problem of insufficient interpretability when the target structural optimization model solves physical problems.
[0068] like Figure 3 The flowchart for training the structural optimization model is shown. By obtaining multiple sampling points of the component structure of the sample engineering component and inputting them into the pre-constructed stress solution network, the predicted stress of the sampling point is obtained through training, and then the predicted stress input value is input into the pre-constructed density solution network to obtain the predicted density of the sampling point through training. Based on the predicted stress, predicted density and the location information of the sampling point, the compliance parameter of the sampling point is determined as physical information, and the first loss function of the stress solution network is calculated based on the physical information and the predicted stress, and the gradient of the first loss function is calculated to determine the gradient information of the first loss function, and the network parameters of the stress solution network are updated and adjusted based on the gradient information to obtain the adjusted stress solution network. When training the stress solution network and adjusting the network parameters, the network parameters of the density solution network are maintained unchanged.
[0069] Furthermore, after the stress solving network is trained for a set number of times, the training of the density solving network is started. The predicted stress output from the last training of the stress solving network is input into the density solving network, and the predicted density of the sampling point is trained. Based on the predicted stress, the predicted density and the location information of the sampling point, the compliance parameter of the sampling point is determined as the physical information, and the physical information of the sampling point is Gaussian filtered to obtain the derivative information of the physical information. Then, based on the predicted density, the physical information and the derivative information, the second loss function of the density solving network can be determined. The gradient information of the second loss function is determined by performing gradient calculation on the second loss function, and the network parameters of the density solving network are updated and adjusted based on the gradient information to obtain the adjusted density solving network. When the density solving network is trained and the network parameters are adjusted, the network parameters of the stress solving network are maintained unchanged. After each density solving network training is completed, the second loss function of the density solving network is compared with the set threshold. If the second loss function is less than or equal to the set threshold, it is determined that the end condition of the model training is met, the model training is terminated, and the target structure optimization model is obtained.
[0070] Figure 4 A flow chart of a training method for a structure optimization model provided in an embodiment of the present disclosure. Figure 4 As shown, the training method of the structure optimization model may include:
[0071] S401, sampling the component structure of a sample engineering component in the engineering field to obtain a plurality of sampling points of the sample engineering component.
[0072] S402, training a stress solving network in the structural optimization model based on the position information of the sampling points to obtain predicted stresses of the sampling points.
[0073] S403, training a density solving network in the structural optimization model based on the predicted stress to obtain predicted density of the sampling points.
[0074] S404, obtaining physical information of the sampling point based on the position information, predicted stress and predicted density of the sampling point, wherein the physical information at least includes compliance parameters of the sampling point.
[0075] S405, obtaining a first loss function of the stress solving network based on the predicted stress and physical information of the sampling points.
[0076] S406: Adjust network parameters of the stress solving network based on the first loss function.
[0077] S407, obtaining physical information of the sampling point based on the position information, predicted stress and predicted density of the sampling point.
[0078] S408, obtaining a second loss function of the density solving network based on the predicted density and physical information of the sampling points.
[0079] S409: Adjust the network parameters of the density solving network based on the second loss function.
[0080] S410, continue to train the adjusted network until the end condition of the model training is met, and obtain the target structure optimization model.
[0081] According to the training method of the structural optimization model provided by the embodiment of the present disclosure, by sampling the component structure of the sample engineering component in the engineering field, a plurality of sampling points of the sample engineering component are obtained, and the position information of the sampling points is input into the stress solving network in the structural optimization model for training to obtain the predicted stress of the sampling points. Then the predicted stress is input into the density solving network in the structural optimization model for training to obtain the predicted density of the sampling points, which can improve the correlation between the stress information and the density information. Further, based on the position information, predicted stress and predicted density of the sampling points, the first loss function and the second loss function are obtained, the network parameters are adjusted, and the adjusted network is continuously trained until the structural optimization model meets the training end condition to obtain the target structural optimization model, which improves the generalization ability of the target structural optimization model, combines the position information, stress and density, and can improve the capture and application of spatial information by the target structural optimization model during the model optimization process, so as to help the target structural optimization model understand the spatial relationship and geometric structure of the engineering components, and solve the problem of insufficient interpretability of the target structural optimization model when solving physical problems.
[0082] Figure 5 A flow chart of a structural optimization method provided in an embodiment of the present disclosure.
[0083] like Figure 5 As shown, the structure optimization method may include:
[0084] S501, obtaining a component structure of a target engineering component to be optimized.
[0085] In some implementations, the component structure of the target engineering component to be optimized can be generated by scanning and measuring the target engineering component. A candidate component structure of the target engineering component can also be obtained from a model library as the component structure of the target engineering component. It is necessary to ensure that the component structure matches the shape and size of the target engineering component.
[0086] S502 , performing density prediction on the component structure of the target engineering component based on the target structure optimization model to obtain density distribution data of the component structure of the target engineering component.
[0087] It should be noted that the target structure optimization model can be used Figure 1-Figure 4 The training method of the structural optimization model shown is obtained and will not be repeated here.
[0088] In some implementations, by determining the target position on the component structure of the target engineering component and performing position acquisition on the target position to obtain position information of the target position on the component structure of the target engineering component, and based on the target structure optimization model and density prediction based on the position information, density distribution data of the component structure can be obtained.
[0089] Optionally, the position information of the target position is input into the stress solving network of the target structure optimization model to obtain the predicted stress of the target position, and the predicted stress of the target position is input into the density solving network of the target structure optimization model to obtain the predicted density of the target position.
[0090] Furthermore, by taking each position on the component structure of the target engineering component as a target position, based on the target structure optimization model, a predicted density based on each target position can be obtained, thereby generating density distribution data of the component structure of the target engineering component.
[0091] In some implementations, it may be determined based on the density distribution data whether the component structure of the target engineering component meets the engineering requirements. For example, if the engineering requirements require that the density of the component structure of the target engineering component is uniform, it may be determined based on the density distribution data whether the component structure of the target engineering component is uniform.
[0092] In some implementations, if the engineering requirements are not met, optimization information of the component structure of the target engineering component can be generated based on the density distribution data, and the component structure of the target engineering component can be optimized based on the optimization information. For example, based on the density distribution data, an abnormal area with a low density or a high density in the component structure of the target engineering component can be obtained, and the structure can be optimized based on the abnormal density area. In the disclosed embodiment, the density distribution data of the component structure of the target engineering component obtained can help optimize the structural performance, reduce production costs, and improve the performance and reliability of the structure.
[0093] As an example, taking the automobile manufacturing field as an example, assuming that the target engineering component is a car door, by measuring the car door, the component structure of the car door can be generated, and the position of the target position on the component structure can be collected to obtain the position information of the target position on the component structure of the car door, and the position information is input into the target structure optimization model for density prediction, so as to obtain the density distribution data of the component structure of the car door.
[0094] Furthermore, based on the density distribution data, it can be determined whether the component structure of the door meets the requirements of automobile manufacturing, such as whether the strength and rigidity of the door need to be guaranteed. If the requirements of automobile manufacturing are not met, optimization information of the door can be generated based on the density distribution data, and the door can be optimized based on the optimization information.
[0095] According to the structural optimization method provided by the embodiment of the present disclosure, by obtaining the component structure of the target engineering component to be optimized, and inputting the position information of the target position on the component structure into the target structure optimization model, the density distribution data of the component structure of the target engineering component can be obtained. Optimizing the structure of the target engineering component based on the density distribution data is conducive to improving the structural design, improving the performance, and reducing the waste of materials and energy.
[0096] Corresponding to the training methods for the structural optimization models provided in the above-mentioned embodiments, an embodiment of the present disclosure further provides a training device for the structural optimization model. Since the training device for the structural optimization model provided in the embodiment of the present disclosure corresponds to the training methods for the structural optimization models provided in the above-mentioned embodiments, the implementation methods of the training methods for the structural optimization models are also applicable to the training device for the structural optimization model provided in the embodiment of the present disclosure, and will not be described in detail in the following embodiments.
[0097] Figure 6 A schematic diagram of the structure of a training device for a structural optimization model provided in an embodiment of the present disclosure.
[0098] like Figure 6 As shown, the training device 600 of the structural optimization model of the embodiment of the present disclosure includes: a sampling module 601, a first training module 602, a second training module 603 and an adjustment module 604.
[0099] The sampling module 601 is used to sample the component structure of a sample engineering component in the engineering field to obtain a plurality of sampling points of the sample engineering component.
[0100] The first training module 602 is used to train the stress solving network in the structural optimization model based on the position information of the sampling points to obtain the predicted stress of the sampling points.
[0101] The second training module 603 is used to train the density solving network in the structural optimization model based on the predicted stress to obtain the predicted density of the sampling point.
[0102] The adjustment module 604 is used to adjust the network parameters of the stress solving network and the density solving network respectively based on the position information of the sampling point, the predicted stress and the predicted density, and continue to train the adjusted networks until the end condition of the model training is met to obtain the target structure optimization model.
[0103] In one embodiment of the present disclosure, the adjustment module 604 is further used to: obtain physical information of the sampling point based on the position information of the sampling point, the predicted stress and the predicted density, wherein the physical information at least includes the compliance parameter of the sampling point; obtain a first loss function of the stress solving network based on the predicted stress of the sampling point and the physical information; and adjust the network parameters of the stress solving network based on the first loss function.
[0104] In one embodiment of the present disclosure, the adjustment module 604 is further used to: obtain physical information of the sampling point based on the position information of the sampling point, the predicted stress and the predicted density; obtain a second loss function of the density solving network based on the predicted density of the sampling point and the physical information; and adjust network parameters of the density solving network based on the second loss function.
[0105] In one embodiment of the present disclosure, the adjustment module 604 is further used to: perform Gaussian filtering on the physical information of the sampling point to obtain derivative information of the physical information; and obtain a second loss function of the density solution network based on the predicted density of the sampling point, the physical information and the derivative information.
[0106] In one embodiment of the present disclosure, the adjustment module 604 is further used to: perform gradient calculation on the loss function of any solution network among the stress solution network and the density solution network to obtain gradient information of any solution network; and adjust the network parameters of any solution network based on the gradient information.
[0107] In one embodiment of the present disclosure, the apparatus further comprises: the stress solving network and the density solving network are trained alternately, and during the training of one network, the network parameters of the other network are maintained.
[0108] In one embodiment of the present disclosure, the device further includes: starting training of the other network whenever the number of training times of one of the networks reaches a first set number of times; starting training of the one of the networks whenever the training parameters of the other network reach a second set number of times.
[0109] In one embodiment of the present disclosure, the stress solving network is a linear neural network, the density solving network is a convolutional neural network, and the stress solving network is connected in series with the density solving network.
[0110] In one embodiment of the present disclosure, the adjustment module 604 is also used to: after each training of the density solution network, compare the second loss function of the density solution network with a set threshold, if the second loss function is less than or equal to the set threshold, determine that the end condition of the model training is met.
[0111] According to the training device of the structural optimization model provided by the embodiment of the present disclosure, by sampling the component structure of the sample engineering component in the engineering field, a plurality of sampling points of the sample engineering component are obtained, and the position information of the sampling points is input into the stress solving network in the structural optimization model for training to obtain the predicted stress of the sampling points. Then the predicted stress is input into the density solving network in the structural optimization model for training to obtain the predicted density of the sampling points, which can improve the correlation between the stress information and the density information. Furthermore, based on the position information, predicted stress and predicted density of the sampling points, the network parameters are adjusted, and the adjusted network is continuously trained until the structural optimization model meets the training end condition to obtain the target structural optimization model, thereby improving the generalization ability of the target structural optimization model, and combining the position information, stress and density to improve the capture and application of spatial information by the target structural optimization model during the model optimization process, so as to help the target structural optimization model understand the spatial relationship and geometric structure of the engineering components, and solve the problem of insufficient interpretability of the target structural optimization model when solving physical problems.
[0112] According to an embodiment of the present disclosure, the present disclosure also provides a structure optimization device for implementing the above-mentioned structure optimization method.
[0113] Figure 7 It is a schematic diagram of the structure of the structural optimization device according to the first embodiment of the present disclosure.
[0114] like Figure 7 As shown, the structure optimization device 700 of the embodiment of the present disclosure includes: a first acquisition module 701 and a prediction module 702.
[0115] The acquisition module 701 is used to acquire the component structure of the target engineering component to be optimized.
[0116] The prediction module 702 is used to perform density prediction on the component structure of the target engineering component based on the target structure optimization model to obtain density distribution data of the component structure of the target engineering component.
[0117] In one embodiment of the present disclosure, the device further includes: generating optimization information of the component structure of the target engineering component based on the density distribution data; and optimizing the component structure of the target engineering component based on the optimization information.
[0118] In one embodiment of the present disclosure, the prediction module 702 is also used to: obtain the position information of the target position on the component structure of the target engineering component; input the position information of the target position into the stress solution network of the target structure optimization model to obtain the predicted stress of the target position; input the predicted stress of the target position into the density solution network of the target structure optimization model to obtain the predicted density of the target position; and generate density distribution data of the component structure of the target engineering component based on the predicted density of each target position.
[0119] According to the structural optimization device provided by the embodiment of the present disclosure, by obtaining the component structure of the target engineering component to be optimized, and inputting the position information of the target position on the component structure into the target structure optimization model, the density distribution data of the component structure of the target engineering component can be obtained. Optimizing the structure of the target engineering component based on the density distribution data is conducive to improving the structural design, improving the performance, and reducing the waste of materials and energy.
[0120] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0121] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0122] like Figure 8 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program / instruction stored in a read-only memory (ROM) 802 or a computer program / instruction loaded from a storage unit 806 to a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0123] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806 such as a keyboard, a mouse, etc.; an output unit 807 such as various types of displays, speakers, etc.; a storage unit 808 such as a disk, an optical disk, etc.; and a communication unit 809 such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0124] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the training method of the structural optimization model. For example, in some embodiments, the training method of the structural optimization model may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 806. In some embodiments, part or all of the computer program / instructions may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program / instructions are loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the training method of the structural optimization model described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute the training method of the structure optimization model in any other appropriate manner (eg, by means of firmware).
[0125] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs / instructions that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0126] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0127] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0128] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0129] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0130] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs / instructions running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0131] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in the disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in the disclosure can be achieved, and this document does not limit them here.
[0132] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A training method for a structural optimization model, wherein: The method comprises: Sampling the component structure of a sample engineering component in the engineering field to obtain a plurality of sampling points of the sample engineering component; Training a stress solving network in the structural optimization model based on the position information of the sampling points to obtain predicted stresses of the sampling points; Based on the predicted stress, a density solving network in the structural optimization model is trained to obtain the predicted density of the sampling point; Based on the position information of the sampling points, the predicted stress and the predicted density, the network parameters of the stress solving network and the density solving network are adjusted respectively, and the adjusted networks are continuously trained until the end condition of the model training is met, so as to obtain the target structure optimization model; The step of adjusting the network parameters of the density solving network includes: Based on the position information of the sampling point, the predicted stress and the predicted density, obtaining physical information of the sampling point, wherein the physical information at least includes a compliance parameter of the sampling point; Based on the predicted density of the sampling points and the physical information, a second loss function of the density solving network is obtained; Adjusting network parameters of the density solving network based on the second loss function; The step of adjusting the network parameters of the stress solving network includes: Based on the position information of the sampling point, the predicted stress and the predicted density, obtaining physical information of the sampling point, wherein the physical information at least includes a compliance parameter of the sampling point; Based on the predicted stress of the sampling point and the physical information, a first loss function of the stress solving network is obtained; Adjusting network parameters of the stress solving network based on the first loss function; The step of obtaining a second loss function of the density solving network based on the predicted density of the sampling points and the physical information includes: Performing Gaussian filtering on the physical information of the sampling point to obtain derivative information of the physical information; A second loss function of the density solving network is obtained based on the predicted density of the sampling points, the physical information and the derivative information.
2. The method according to claim 1, wherein: The method further comprises: For any one of the stress solving network and the density solving network, performing gradient calculation on the loss function of any one of the solving networks to obtain gradient information of any one of the solving networks; The network parameters of any one of the solution networks are adjusted based on the gradient information.
3. The method according to claim 1, wherein: The method further comprises: The stress solving network and the density solving network are trained alternately, and the network parameters of one network are maintained during the training of the other network.
4. The method according to claim 2, wherein: The method further comprises: Whenever the number of training times of one of the networks reaches the first set number of times, the training of the other network is started; Whenever the training parameter of the other network reaches a second set number of times, the training of the one of the networks is started.
5. The method according to claim 1, wherein: The stress solving network is a linear neural network, the density solving network is a convolutional neural network, and the stress solving network is connected in series with the density solving network.
6. The method according to claim 1, wherein: The method further comprises: After each training of the density solving network is completed, the second loss function of the density solving network is compared with a set threshold. If the second loss function is less than or equal to the set threshold, it is determined that the end condition of the model training is met.
7. A method for structural optimization, wherein: The method comprises: Obtaining a component structure of a target engineering component to be optimized; Based on the target structure optimization model, density prediction is performed on the component structure of the target engineering component to obtain density distribution data of the component structure of the target engineering component, wherein the target structure optimization model is trained by the method according to any one of claims 1 to 6.
8. The method according to claim 7, wherein: The method further comprises: Based on the density distribution data, generating optimization information of the component structure of the target engineering component; Based on the optimization information, the component structure of the target engineering component is optimized.
9. The method according to claim 7 or 8, wherein: The method of performing density prediction on the component structure of the target engineering component based on the target structure optimization model to obtain density distribution data of the component structure of the target engineering component includes: Acquire position information of a target position on a component structure of the target engineering component; Inputting the position information of the target position into the stress solving network of the target structure optimization model to obtain the predicted stress of the target position; Inputting the predicted stress of the target position into the density solving network of the target structure optimization model to obtain the predicted density of the target position; Based on the predicted density of each of the target positions, density distribution data of the component structure of the target engineering component is generated.
10. A training device for a structural optimization model, wherein: The device comprises: A sampling module, used to sample the component structure of a sample engineering component in the engineering field to obtain a plurality of sampling points of the sample engineering component; A first training module is used to train the stress solving network in the structural optimization model based on the position information of the sampling point to obtain the predicted stress of the sampling point; A second training module is used to train the density solving network in the structural optimization model based on the predicted stress to obtain the predicted density of the sampling point; An adjustment module, used to adjust the network parameters of the stress solving network and the density solving network respectively based on the position information of the sampling point, the predicted stress and the predicted density, and continue to train the adjusted networks until the end condition of the model training is met, so as to obtain a target structure optimization model; Wherein, the adjustment module is also used for: Based on the position information of the sampling point, the predicted stress and the predicted density, obtaining physical information of the sampling point, wherein the physical information at least includes a compliance parameter of the sampling point; Based on the predicted density of the sampling points and the physical information, a second loss function of the density solving network is obtained; Adjusting network parameters of the density solving network based on the second loss function; Wherein, the adjustment module is also used for: Based on the position information of the sampling point, the predicted stress and the predicted density, obtaining physical information of the sampling point, wherein the physical information at least includes a compliance parameter of the sampling point; Based on the predicted stress of the sampling point and the physical information, a first loss function of the stress solving network is obtained; Adjusting network parameters of the stress solving network based on the first loss function; Wherein, the adjustment module is also used for: Performing Gaussian filtering on the physical information of the sampling point to obtain derivative information of the physical information; A second loss function of the density solving network is obtained based on the predicted density of the sampling points, the physical information and the derivative information.
11. The device according to claim 10, wherein: The adjustment module is further used for: For any one of the stress solving network and the density solving network, performing gradient calculation on the loss function of any one of the solving networks to obtain gradient information of any one of the solving networks; The network parameters of any one of the solution networks are adjusted based on the gradient information.
12. The device according to claim 10, wherein: The device also includes: The stress solving network and the density solving network are trained alternately, and the network parameters of one network are maintained during the training of the other network.
13. The device according to claim 11, wherein: The device also includes: Whenever the number of training times of one of the networks reaches the first set number of times, the training of the other network is started; Whenever the training parameter of the other network reaches a second set number of times, the training of the one of the networks is started.
14. The device according to claim 10, wherein: The stress solving network is a linear neural network, the density solving network is a convolutional neural network, and the stress solving network is connected in series with the density solving network.
15. The device according to claim 10, wherein: The adjustment module is further used for: After each training of the density solving network is completed, the second loss function of the density solving network is compared with a set threshold. If the second loss function is less than or equal to the set threshold, it is determined that the end condition of the model training is met.
16. A structural optimization device, wherein: The device comprises: An acquisition module, used to acquire the component structure of the target engineering component to be optimized; A prediction module is used to perform density prediction on the component structure of the target engineering component based on a target structure optimization model to obtain density distribution data of the component structure of the target engineering component, wherein the target structure optimization model is trained by the device as described in any one of claims 10-15.
17. The device according to claim 16, wherein: The device also includes: Based on the density distribution data, generating optimization information of the component structure of the target engineering component; Based on the optimization information, the component structure of the target engineering component is optimized.
18. The device according to claim 16 or 17, wherein: The prediction module is further used for: Acquire position information of a target position on a component structure of the target engineering component; Inputting the position information of the target position into the stress solving network of the target structure optimization model to obtain the predicted stress of the target position; Inputting the predicted stress of the target position into the density solving network of the target structure optimization model to obtain the predicted density of the target position; Based on the predicted density of each of the target positions, density distribution data of the component structure of the target engineering component is generated.
19. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.
20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-9.
21. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method steps of any one of claims 1-9 are implemented.
Citation Information
Patent Citations
Neural network training method and device and electronic equipment
CN114970817A
Object simulation method and device, model training method and device, equipment and storage medium
CN116484744A
Method for optimizing variable-density anti-impact structure based on artificial intelligence
CN117235916A