Three-dimensional model parameter optimization method, device and equipment and readable storage medium
By using automated model parameter optimization methods, model simulation programs, and parameter optimization algorithms, the problem of low efficiency in 3D model parameter optimization has been solved, achieving efficient and accurate model parameter adjustment and product optimization.
Patent Information
- Application Number
- CN202411111286.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2026-02-13
AI Technical Summary
Existing technologies for optimizing 3D model parameters are inefficient, lack full-process automation, and rely on cumbersome and error-prone manual operations.
A 3D model is generated by acquiring model parameters and constructing functions. A simulation task is performed using a model simulation program. The model parameters are adjusted based on a preset parameter optimization algorithm until the simulation results meet the loop conditions, thus achieving automated iterative optimization.
This improves the efficiency of 3D model parameter optimization, reduces manual operations, ensures the accuracy and reliability of simulation results, and yields higher-performance 3D models and corresponding physical products.
Smart Images

Figure CN121525352A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of 3D model construction technology, and in particular to a method, apparatus, device and readable storage medium for optimizing 3D model parameters. Background Technology
[0002] With the development of technology, more and more products are being produced for people to consume. When manufacturing some products, it is necessary to pay attention to the overall structure of the product, as the overall structure affects the product's performance. Therefore, it is necessary to test the product structure to understand the product's performance and thus make improvements and optimizations.
[0003] Currently, products can be 3D modeled, and then the 3D model can be tested to quickly understand the product's performance. R&D personnel can then continuously debug and improve the 3D model.
[0004] However, the current solution requires R&D personnel to continuously debug and improve the 3D model after product testing, resulting in low optimization efficiency. Summary of the Invention
[0005] To address the aforementioned technical problems, this disclosure provides a method, apparatus, device, and readable storage medium for optimizing three-dimensional model parameters.
[0006] In a first aspect, embodiments of this disclosure provide a method for optimizing three-dimensional model parameters.
[0007] Obtain the model parameters and model building function, and execute the model building function to generate the 3D model corresponding to the model parameters;
[0008] The three-dimensional model is input into a model simulation program, and the model simulation program is controlled to execute at least one simulation task to generate model simulation results; the at least one simulation task is used to generate the model simulation results based on the three-dimensional model during execution;
[0009] When the simulation results of the model do not meet the preset simulation cycle conditions, the model parameters are adjusted based on the preset parameter optimization algorithm to obtain the adjusted model parameters.
[0010] Based on the adjusted model parameters, proceed to the step of obtaining model parameters and model construction function, and execute the model construction function until the model simulation result satisfies the simulation loop condition;
[0011] If the simulation results of the model satisfy the simulation cycle conditions, the current model parameters are obtained to complete the optimization of the three-dimensional model parameters.
[0012] Secondly, embodiments of this disclosure provide a three-dimensional model parameter optimization device, the device comprising:
[0013] The model building module is used to obtain model parameters and model building functions, and execute the model building functions to generate a 3D model corresponding to the model parameters.
[0014] The model simulation module is used to input the three-dimensional model into the model simulation program and control the model simulation program to execute at least one simulation task to generate model simulation results; the at least one simulation task is used to generate the model simulation results based on the three-dimensional model during execution.
[0015] The parameter optimization module is used to adjust the model parameters based on a preset parameter optimization algorithm when the model simulation results do not meet the preset simulation cycle conditions, so as to obtain the adjusted model parameters.
[0016] The iterative loop module is used to enter the steps of obtaining model parameters and model construction function based on the adjusted model parameters, and execute the model construction function until the model simulation result satisfies the simulation loop condition.
[0017] The optimization completion module is used to obtain the current model parameters when the model simulation results meet the simulation cycle conditions, so as to complete the optimization of the three-dimensional model parameters.
[0018] Thirdly, embodiments of this disclosure provide an electronic device, including:
[0019] Memory;
[0020] Processor; and
[0021] Computer programs;
[0022] The computer program is stored in the memory and configured to be executed by the processor to implement the method as described in the first aspect.
[0023] Fourthly, embodiments of this disclosure provide a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the method as described in the first aspect.
[0024] Fifthly, embodiments of this disclosure also provide a computer program product comprising a computer program or instructions that, when executed by a processor, implement the method described in the first aspect.
[0025] In this embodiment of the invention, model parameters and model building functions are obtained, and the model building functions are executed to generate a 3D model corresponding to the model parameters. The 3D model is input into a model simulation program, which is then controlled to execute at least one simulation task to generate model simulation results. When the model simulation results do not meet preset simulation loop conditions, the model parameters are adjusted based on a preset parameter optimization algorithm. Based on the adjusted model parameters, the model is rebuilt and simulated. When the model simulation results meet the simulation loop conditions, the current model parameters, i.e., the unoptimized model parameters, are obtained. This allows for quick adjustment of model parameters that do not meet the conditions and immediate execution of the next model building and verification. Through iterative optimization, optimized model parameters can be easily obtained, thereby improving the efficiency of model parameter optimization. Furthermore, based on the optimized model parameters, a higher-performance 3D model and corresponding physical product can be obtained, ultimately improving the optimization efficiency of the 3D model and product.
[0026] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0027] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0028] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 A flowchart of a three-dimensional model parameter optimization method provided in this disclosure embodiment;
[0030] Figure 2 A flowchart of another three-dimensional model parameter optimization method provided in this disclosure embodiment;
[0031] Figure 3 A schematic diagram of the architecture for optimizing three-dimensional model parameters provided in the embodiments of this disclosure;
[0032] Figure 4 This is a schematic diagram of the structure of the three-dimensional model parameter optimization device provided in the embodiments of this disclosure;
[0033] Figure 5This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0034] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0035] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0036] This disclosure provides a method for optimizing three-dimensional model parameters, which will be described below with reference to specific embodiments.
[0037] Figure 1 This is a schematic diagram illustrating the steps of a three-dimensional model parameter optimization method provided in an embodiment of the present invention. The method includes:
[0038] Step 101: Obtain model parameters and model building function, and execute the model building function to generate the 3D model corresponding to the model parameters;
[0039] In this embodiment, the execution entity can be a user terminal or a server used for parameter optimization. The acquired model parameters are used to generate a 3D model. These parameters define the various features of the 3D model, allowing the generation of a corresponding model based on them. For example, model parameters can be length, width, and height parameters, which can then generate a corresponding cuboid 3D model. The content of the model parameters can be more complex or simpler depending on the product being targeted. For instance, the product could be a vehicle's infotainment system (a vehicle's in-vehicle information system with functions including navigation, entertainment, and communication). No specific limitations are imposed here.
[0040] Model building functions are functions used to generate models. Based on specific model parameters, they can construct the corresponding 3D model. Model building functions can be functions within 3D modeling software, such as AutoCAD, SketchUp, Blender, Maya, and SpaceClaim. Different 3D modeling software has different model building functions. For example, if the 3D modeling software is SpaceClaim, the corresponding model building functions can be found in SpaceClaim's Application Programming Interface (API) documentation. Different model building functions perform different model building operations, which may include geometry creation operations, Boolean operations, and feature operations.
[0041] Step 102: Input the three-dimensional model into the model simulation program, and control the model simulation program to execute at least one simulation task to generate model simulation results; the at least one simulation task is used to generate the model simulation results based on the three-dimensional model during execution;
[0042] In this embodiment of the disclosure, the user can pre-install the required model simulation program on a terminal or server used for parameter optimization. There can be one or more model simulation programs, and different model simulation programs can perform different three-dimensional model tests. The model simulation program can be a program based on finite element analysis (FEA), which is a numerical calculation method used to solve physical problems in engineering fields, such as structural mechanics, heat conduction, and fluid dynamics.
[0043] For example, the model simulation program can specifically be ANSYS Mechanical (computer-aided engineering software) and ANSYS Fluent (computer-aided engineering software). ANSYS Mechanical can be used to analyze linear and nonlinear structural problems, such as stress, strain, vibration, and fatigue. It can be applied to various structural types, such as solids, shells, and beams, and can perform various types of analyses, such as static analysis, dynamic analysis, and thermal analysis. Essentially, it involves preparatory steps such as meshing the 3D model before performing the analysis. ANSYS Fluent can be used to analyze fluid flow, heat transfer, and mass transfer problems, and can simulate various fluid phenomena, such as internal flow, external flow, turbulence, and multiphase flow. The specific functions and number of model simulation programs are not limited here.
[0044] By inputting a 3D model into a model simulation program, the program can be controlled to execute at least one simulation task. Upon completion of each task, corresponding simulation results can be obtained and saved to a preset file directory for later retrieval. For example, simulation tasks can include static analysis tasks, dynamic analysis tasks, and so on.
[0045] Step 103: When the model simulation results do not meet the preset simulation cycle conditions, the model parameters are adjusted based on the preset parameter optimization algorithm to obtain the adjusted model parameters.
[0046] In this embodiment of the disclosure, the model simulation result can be test parameters output by one or more model simulation programs. For example, the test parameters can be the stress, stiffness, and aerodynamic performance parameters of the current three-dimensional model, etc. Correspondingly, the simulation loop conditions can also be conditions corresponding to these related parameters. For example, if the test parameters are stress and stiffness, then the simulation loop conditions are that the stress is less than a first specific value and the stiffness is greater than a second specific value. The simulation loop conditions can also be conditions corresponding to the number of iteration steps, i.e., the number of iterations, such as setting a threshold for the number of iterations.
[0047] If the simulation results do not meet the preset simulation cycle conditions, the model parameters are adjusted based on a preset parameter optimization algorithm. Parameter optimization algorithms can include genetic algorithms, particle swarm optimization, and others. These algorithms automatically adjust the model parameters to obtain the adjusted parameters. ANSYS Design Exploration can be installed on a terminal or server to perform parameter adjustment operations based on the parameter optimization algorithm. Scripts can be written to call the ANSYS Design Exploration API, allowing the simulation results output by the model simulation program to be input into ANSYS Design Exploration, ensuring the accuracy and reliability of the simulation results.
[0048] In summary, automated modeling, iterative optimization, and efficient analysis significantly improved the efficiency and accuracy of vehicle infotainment system design and optimization. Using ANSYS Design Exploration for parameter optimization effectively reduced the complexity of manual operations, providing an excellent user experience and operational flexibility.
[0049] Step 104: Based on the adjusted model parameters, proceed to the step of obtaining model parameters and model construction function, and execute the model construction function until the model simulation result satisfies the simulation loop condition;
[0050] In this embodiment, based on the adjusted model parameters, the process proceeds to the steps of obtaining model parameters and model construction functions, and executing the model construction functions. Specifically, based on the adjusted model parameters, the 3D model is reconstructed and simulated, and the simulation results are further evaluated to determine if they meet preset simulation loop conditions. If the simulation results of the 3D model generated based on the adjusted model parameters still fail to meet the preset simulation loop conditions, the model parameters are adjusted again, and the process is iterated until the simulation results meet the simulation loop conditions.
[0051] Step 105: If the model simulation results satisfy the simulation cycle conditions, obtain the current model parameters to complete the 3D model parameter optimization.
[0052] In this embodiment of the disclosure, when the simulation results of the model parameters after several adjustments meet the simulation cycle conditions, the current model parameters after several adjustments can be obtained, which are the optimized model parameters, thus completing the process of optimizing the three-dimensional model parameters.
[0053] In summary, this embodiment of the invention can obtain model parameters and a model building function, execute the model building function to generate a 3D model corresponding to the model parameters, input the 3D model into a model simulation program, control the model simulation program to execute at least one simulation task to generate model simulation results, and when the model simulation results do not meet preset simulation loop conditions, adjust the model parameters based on a preset parameter optimization algorithm, and reconstruct and simulate the model based on the adjusted model parameters. When the model simulation results meet the simulation loop conditions, the current model parameters, i.e., the unoptimized model parameters, are obtained. This allows for quick adjustment of poor model parameters and immediate execution of the next model construction and verification. Through iterative optimization, optimized model parameters can be easily obtained, thereby improving the efficiency of model parameter optimization. Furthermore, based on the optimized model parameters, a higher-performance 3D model and corresponding physical product can be obtained, ultimately improving the optimization efficiency of the 3D model and product.
[0054] This approach avoids the cumbersome manual operations inherent in current parameter optimization processes. Specifically, traditional finite element analysis relies heavily on manual intervention, particularly in model optimization and parameter tuning, which is time-consuming, labor-intensive, and prone to errors. It also addresses the lack of end-to-end automation in parameter optimization, specifically the absence of a system capable of automating the entire process from modeling and analysis to optimization.
[0055] The following is a specific implementation process to illustrate the method for optimizing three-dimensional model parameters according to an embodiment of the present invention, such as... Figure 2 As shown, it includes:
[0056] Step 201: Obtain model parameters and model building function, and execute the model building function to generate the 3D model corresponding to the model parameters;
[0057] Step 202: Input the three-dimensional model into the model simulation program, and control the model simulation program to execute at least one simulation task to generate model simulation results; the at least one simulation task is used to generate the model simulation results based on the three-dimensional model during execution;
[0058] Step 203: When the model simulation results do not meet the preset simulation cycle conditions, the model parameters are adjusted based on the preset parameter optimization algorithm to obtain the adjusted model parameters.
[0059] Step 204: Based on the adjusted model parameters, proceed to the step of obtaining model parameters and model construction function, and execute the model construction function until the model simulation result satisfies the simulation loop condition;
[0060] Step 205: If the model simulation results satisfy the simulation cycle conditions, obtain the current model parameters to complete the 3D model parameter optimization.
[0061] Steps 201-205 above can be referenced. Figure 1 The details of the embodiments will not be repeated here.
[0062] Optionally, step 201, which involves obtaining model parameters and a model building function, and executing the model building function to generate a 3D model corresponding to the model parameters, includes:
[0063] Sub-step 2011: Display at least one parameter control in the graphical user interface of the user terminal; each parameter control is used to receive model parameters of different parameter types;
[0064] Sub-step 2012: In response to the user's parameter input operation, determine the target parameter control to which the parameter input operation is directed and its corresponding target parameter type, as well as the model parameter specified by the parameter input operation, so as to obtain the model parameter of the target parameter type;
[0065] Sub-step 2013: Obtain the model building function and execute the model building function based on the model parameters to generate a 3D model corresponding to the model parameters of the target parameter type.
[0066] In this embodiment of the disclosure, the user terminal can be a terminal for optimizing 3D model parameters, or a terminal that interacts with a server for optimizing 3D model parameters. At least one parameter control is displayed in the user terminal's graphical user interface (GUI). Each parameter control corresponds to a model parameter of a different parameter type, which can be length, width, or other related dimensions, shapes, and geometric features. For example, the first parameter control can be a length control for receiving a model length parameter input by the user; the second parameter control can be a width control for receiving a model width parameter input by the user.
[0067] Users can directly trigger parameter controls, such as by performing parameter input operations. By identifying the target parameter control and its corresponding target parameter type, and simultaneously retrieving the model parameter specified in the input operation, the model parameter of the target parameter type can be obtained. For example, a parameter control could be an input box, with the target parameter type displayed next to each input box, such as "length". If the parameter input operation for an input box is, for example, entering 30, the user's input value can be retrieved, resulting in the target parameter type being "length" and the model parameter variable being 30.
[0068] Furthermore, a model building function can be obtained, and then a 3D model can be generated based on the model parameters of the target parameter type. For example, if the target parameter type model parameters are length 30, width 20, and height 10, then a corresponding cuboid 3D model can be generated.
[0069] By implementing embodiments of this disclosure, at least one parameter control is displayed in the graphical user interface of a user terminal. In response to a user's parameter input operation, the target parameter control targeted by the parameter input operation and its corresponding target parameter type, as well as the model parameter specified by the parameter input operation, are determined to obtain the model parameter of the target parameter type. This allows users to conveniently select parameter types and input model parameters on a visual interface, improving the intuitiveness and convenience of model parameter input.
[0070] Obtain the model building function and execute the model building function based on the model parameters to generate a 3D model corresponding to the model parameters of the target parameter type.
[0071] Optionally, step 201, which involves obtaining model parameters and a model building function, and executing the model building function to generate a 3D model corresponding to the model parameters, includes:
[0072] Obtain model parameters and model building strategy; the model building strategy represents the sequence of building operations used to generate the 3D model.
[0073] Based on at least one construction operation in the construction operation sequence, at least one corresponding target model construction function is obtained from the preset model construction function library;
[0074] Based on the construction operation sequence and the model parameters, the at least one target model construction function is executed one by one to generate the three-dimensional model corresponding to the model parameters.
[0075] In this embodiment, the process of obtaining model parameters will not be described in detail. The process of obtaining model construction functions may involve first obtaining a model construction strategy. A model construction strategy represents a sequence of construction operations used to generate a 3D model. At least one construction operation in the sequence may be a geometry creation operation, a Boolean operation, a feature operation, etc. The construction operation sequence indicates that the various construction operations have a certain order; that is, the various construction operations must be executed in a specific order. Based on at least one construction operation in the construction operation sequence, at least one corresponding target model construction function can be obtained from a preset model construction function library. The preset model construction function library may be multiple functions, along with their corresponding parameters and functions, recorded in the API documentation of various 3D modeling software.
[0076] It is understandable that after obtaining the target model construction function, based on the existing model parameters and the order of construction operations indicated by the construction operation sequence, at least one target model construction function is executed sequentially to generate the 3D model corresponding to the model parameters. It is also understood that the order of construction operations indicated by the construction operation sequence can be flexibly adjusted; different construction operation sequences can achieve the same 3D model constructed in different ways, and no specific restrictions are imposed here.
[0077] By implementing embodiments of this disclosure, a model building strategy is obtained to represent a sequence of building operations for generating a 3D model. Based on at least one building operation in the sequence, at least one corresponding target model building function is obtained from a pre-defined model building function library. Based on the sequence of building operations and model parameters, at least one target model building function is executed sequentially to generate the 3D model corresponding to the model parameters. This approach accurately determines the required model building functions and executes each function in sequence, improving the accuracy of function execution.
[0078] Optionally, the 3D model is generated by a modeling program; the step of inputting the 3D model into a model simulation program and controlling the model simulation program to execute at least one simulation task to generate model simulation results includes:
[0079] Based on the output interface of the modeling program and the input interface of the model simulation program, a model transfer function is constructed;
[0080] When the modeling program generates the three-dimensional model, the model transfer function is executed to input the three-dimensional model into the model simulation program;
[0081] Send a task execution instruction to the model simulation program to control the model simulation program to execute at least one simulation task to generate model simulation results.
[0082] In this embodiment, the 3D model can be generated by a modeling program; that is, the 3D model can be generated by controlling the modeling program to execute model building functions. The process of inputting the 3D model into the model simulation program can involve first constructing a model transfer function based on the output interface of the modeling program and the input interface of the model simulation program. The output and input interfaces can refer to APIs. The model transfer function constructed based on the output and input interfaces can call the output interface of the modeling program and the input interface of the model simulation program, seamlessly transferring the 3D model generated by the modeling program to the model simulation program. The constructed model transfer function can be implemented in an IronPython script (a Python language).
[0083] The system can continuously monitor whether the modeling program has generated a 3D model. If generation is complete, it executes the model transfer function to input the 3D model into the model simulation program. Then, it sends a task execution command to the model simulation program, controlling it to start executing at least one simulation task based on the 3D model.
[0084] In implementing embodiments of this disclosure, a model transfer function is constructed based on the output interface of the modeling program and the input interface of the model simulation program. When the modeling program generates the 3D model, the model transfer function is executed to input the 3D model into the model simulation program. Task execution instructions are sent to the model simulation program to control it to execute at least one simulation task. This allows for seamless and automatic transfer of the 3D model through the model transfer function, improving the efficiency of 3D model parameter optimization.
[0085] Optionally, the step of sending task execution instructions to the model simulation program to control the model simulation program to execute at least one simulation task to generate model simulation results includes:
[0086] Obtain at least one simulation task corresponding to the model simulation program, and display the task control corresponding to the at least one simulation task in the graphical user interface of the user terminal;
[0087] In response to the user's task selection operation, determine the target task control triggered by the task selection operation and its corresponding target simulation task;
[0088] Send a task execution instruction carrying the target simulation task to the model simulation program to control the model simulation program to execute the target simulation task.
[0089] In this embodiment of the disclosure, at least one simulation task corresponding to the model simulation program is obtained, or it can be the task information corresponding to the simulation task. At least one task control corresponding to the simulation task can be displayed in the graphical user interface of the user terminal. The display method of the task control can be similar to the display method of the parameter control.
[0090] Users can perform task selection operations, such as through task controls on the trigger interface. In response to the user's task selection operation, the target task control triggered by the task selection operation and its corresponding target simulation task can be determined.
[0091] Then, a task execution instruction carrying the target simulation task can be sent to the model simulation program, so that the model simulation program can only execute the simulation tasks that the current user needs to execute.
[0092] Implementing embodiments of this disclosure involves acquiring at least one simulation task corresponding to a model simulation program and displaying task controls corresponding to at least one simulation task in the graphical user interface of a user terminal; responding to a user's task selection operation, determining the target task control triggered by the task selection operation and its corresponding target simulation task; and sending a task execution instruction carrying the target simulation task to the model simulation program to control the model simulation program to execute the target simulation task. This allows the user to select simulation tasks on a visual interface, flexibly optimize according to the user's parameter requirements, and selectively execute the corresponding target simulation task, avoiding the need to perform all simulation tasks. This reduces the execution pressure of the simulation tasks and improves their execution efficiency.
[0093] Optionally, the step of obtaining model parameters and model construction functions includes:
[0094] Obtain a set of model parameters, a model construction function, and a preset first type set; the set of model parameters includes at least one model parameter, and the first type set includes at least one preset parameter type;
[0095] Based on at least one model parameter in the model parameter set, determine a second type set corresponding to the model parameter set; the second type set represents the parameter type of each model parameter in the model parameter set.
[0096] If there is a difference between the first type set and the second type set, proceed to the step of obtaining the model parameter set and model construction function to obtain new model parameters until the first type set and the second type set are consistent.
[0097] In this embodiment of the disclosure, multiple model parameters can be obtained, forming a model parameter set. A model construction function and a preset first type set also need to be obtained. Different model parameters can be used to define different features of the 3D model; therefore, model parameters can actually have corresponding parameter types. For example, parameter types can be length, width, height, diameter, etc.
[0098] The first set of preset types actually refers to the parameter types required to construct a 3D model. For example, to construct a 3D model of a cuboid, three parameter types are required: length, width, and height. If any of these three parameter types are missing, the corresponding 3D model cannot be generated.
[0099] Alternatively, a second type set can be determined based on at least one model parameter in the model parameter set. The second type set represents the parameter type of each model parameter in the model parameter set. Then, the first type set and the second type set can be compared. If there is a difference between the first type set and the second type set, the process proceeds to obtain the model parameter set and the model construction function to obtain new model parameters, until the first type set and the second type set are consistent.
[0100] By implementing the embodiments of this disclosure, a set of model parameters and a preset first type set are obtained, and a corresponding second type set is determined based on the set of model parameters. If there is a difference between the first type set and the second type set, the process proceeds to obtaining the set of model parameters and the model construction function to obtain new model parameters, until the first type set and the second type set are consistent. This ensures that the obtained model parameters are reasonable and meet the requirements of model construction, avoiding errors in 3D model construction, improving the efficiency of 3D model construction, and consequently improving the efficiency of 3D model parameter optimization.
[0101] Optionally, the step of obtaining model parameters and model construction functions includes:
[0102] Obtain the model parameter set and model construction function, and determine the type set corresponding to the model parameter set; the type set represents the parameter type of each model parameter in the model parameter set;
[0103] For each parameter type in the set of types, determine the preset parameter range corresponding to each parameter type;
[0104] If the model parameters in the model parameter set exceed the preset parameter range of the corresponding parameter type, proceed to the step of obtaining the model parameter set and model construction function to obtain new model parameters, until the new model parameters are within the preset parameter range of the corresponding parameter type.
[0105] In this embodiment of the disclosure, a set of model parameters and a model construction function are obtained, and a set of types corresponding to the set of model parameters is determined. The set of types also represents the parameter type of each model parameter in the set of model parameters, which will not be elaborated here.
[0106] For each parameter type in the type set, it is necessary to determine the corresponding preset parameter range for each parameter type. The preset parameter range for each parameter type can be pre-defined, or the user can define the preset parameter range. For example, if the parameter type can have length, width, and height, the user can set a preset parameter range for each parameter type, such as length 40-50, width 25-35, and height 10-15.
[0107] After determining the parameter type of each model parameter in the model parameter set, a preset parameter range for each model parameter can be determined. This allows for comparison of the specific values of the model parameters with the preset parameter ranges. If a model parameter in the model parameter set exceeds the preset parameter range for its corresponding parameter type, the process proceeds to obtain the model parameter set and model construction function to acquire new model parameters. It can be understood that re-entering the acquisition step can involve retrieving the entire model parameter set, or it can be for specific cases where parameters do not conform to the preset parameter range, retrieving one or more specific model parameters.
[0108] By implementing the embodiments of this disclosure, a set of model parameters and a model construction function are obtained, and a set of types corresponding to the set of model parameters is determined. For each parameter type in the type set, a preset parameter range corresponding to each parameter type is determined. If a model parameter in the set of model parameters exceeds the preset parameter range of the corresponding parameter type, the process of obtaining the set of model parameters and the model construction function is initiated to obtain new model parameters until the new model parameters fall within the preset parameter range of the corresponding parameter type. This avoids the problem of one or more unreasonable model parameters in the set of model parameters leading to errors in 3D model construction, improves the efficiency of 3D model construction, and thus improves the efficiency of 3D model parameter optimization.
[0109] Figure 3 This is a schematic diagram of the architecture for optimizing three-dimensional model parameters provided in an embodiment of this disclosure;
[0110] Step 301: Automated modeling based on model parameters to generate a 3D model; Step 302: Select simulation tasks and perform different types of analysis; Step 303: Perform structural mechanics analysis based on Mechanical; Step 304: Perform fluid dynamics analysis based on Fluent; Step 305: Generate simulation results; Step 306: Optimize parameters and adjust model parameters using ANSYS Design Exploration (parameter optimization tool); Step 307: Determine whether the optimization objective has been achieved, i.e., whether the cyclic optimization conditions are met; Step 308: If the optimization objective has not been achieved, the user can adjust the model parameters in the graphical user interface; Step 309: If the optimization objective has been achieved, the parameter optimization process ends.
[0111] It is understandable that the method steps in the above method embodiments can all be implemented by writing scripts, and the execution of the scripts enables the automated execution of the above 3D model parameter optimization method. Error printing functionality can be added to the scripts for each method step to specifically locate the problematic code during execution, and detailed error information output can be set, including the function name, error description, and possible solutions. Furthermore, repetitive steps used in the overall code can be encapsulated into functions to reduce code redundancy and improve code maintainability.
[0112] The graphical user interface (GUI) in the above methods and steps can be implemented using different development tools, such as PyQt and Tkinter. The GUI can include parameter controls for users to input model parameters of specific types, and can also provide parameter input areas in specific display areas for adjusting parameter optimization algorithms and model simulation programs. A model viewer can be integrated, allowing users to view the 3D model in real time and perform operations such as rotation and scaling. The GUI can also provide simulation result monitoring functions, allowing users to view the results generated during the simulation process, including stress distribution, displacement field, and flow field. The GUI can also display the parameter adjustment status and simulation results for each iteration for users to view. For the error printing function mentioned above, a corresponding log output window can be displayed to show error information during script execution, facilitating user debugging. Using a GUI during parameter optimization achieves an intuitive interface, convenient operation, and improves user experience and work efficiency.
[0113] The scripts described above allow users to modify model parameters and analysis code via IronPython scripts. Detailed API documentation can be written, explaining the usage and parameter descriptions of each interface. Users can call functional modules for finite element analysis and parameter optimization via scripts, achieving higher precision control and adjustment. Sample scripts are provided to help users get started quickly and customize development according to their needs. The script interfaces support multiple programming languages, facilitating system expansion and integration.
[0114] Figure 4 A schematic diagram of the structure of the three-dimensional model parameter optimization device provided in the embodiments of this disclosure. The device includes:
[0115] The model building module 401 is used to obtain model parameters and model building functions, and execute the model building functions to generate a three-dimensional model corresponding to the model parameters.
[0116] The model simulation module 402 is used to input the three-dimensional model into the model simulation program and control the model simulation program to execute at least one simulation task to generate model simulation results; the at least one simulation task is used to generate the model simulation results based on the three-dimensional model during execution;
[0117] The parameter optimization module 403 is used to adjust the model parameters based on a preset parameter optimization algorithm when the model simulation results do not meet the preset simulation cycle conditions, so as to obtain the adjusted model parameters.
[0118] The iterative loop module 404 is used to enter the steps of obtaining model parameters and model construction function based on the adjusted model parameters, and execute the model construction function until the model simulation result satisfies the simulation loop condition.
[0119] The optimization module 405 is used to obtain the current model parameters when the model simulation results meet the simulation cycle conditions, so as to complete the optimization of the three-dimensional model parameters.
[0120] Optional model building modules include:
[0121] The model parameter control submodule is used to display at least one parameter control in the graphical user interface of the user terminal; each parameter control is used to receive model parameters of different parameter types.
[0122] The parameter input response submodule is used to respond to the user's parameter input operation, determine the target parameter control to which the parameter input operation is targeted and its corresponding target parameter type, as well as the model parameter specified by the parameter input operation, so as to obtain the model parameter of the target parameter type;
[0123] The first model construction submodule is used to obtain a model construction function and execute the model construction function based on the model parameters to generate a three-dimensional model corresponding to the model parameters of the target parameter type.
[0124] Optional model building modules include:
[0125] The model building strategy submodule is used to obtain model parameters and model building strategies; the model building strategy represents the sequence of building operations used to generate a 3D model.
[0126] The construction function acquisition submodule is used to acquire at least one target model construction function from a preset model construction function library based on at least one construction operation in the construction operation sequence.
[0127] The second model construction submodule is used to execute the at least one target model construction function one by one based on the construction operation sequence and the model parameters to generate the three-dimensional model corresponding to the model parameters.
[0128] Optionally, the 3D model is generated by a modeling program; the model simulation module includes:
[0129] The transfer function construction submodule is used to construct the model transfer function based on the output interface of the modeling program and the input interface of the model simulation program;
[0130] The model transfer submodule is used to execute the model transfer function to input the three-dimensional model into the model simulation program when the modeling program generates the three-dimensional model;
[0131] The first simulation submodule is used to send task execution instructions to the model simulation program to control the model simulation program to execute at least one simulation task to generate model simulation results.
[0132] Optional, model simulation module, including:
[0133] The simulation task control submodule is used to obtain at least one simulation task corresponding to the model simulation program and display the task control corresponding to the at least one simulation task in the graphical user interface of the user terminal.
[0134] The task selection response submodule is used to respond to the user's task selection operation and determine the target task control triggered by the task selection operation and its corresponding target simulation task.
[0135] The second simulation submodule is used to send a task execution instruction carrying the target simulation task to the model simulation program, so as to control the model simulation program to execute the target simulation task.
[0136] Optional model building modules include:
[0137] The first type submodule is used to obtain a model parameter set, a model construction function, and a preset first type set; the model parameter set includes at least one model parameter, and the first type set includes at least one preset parameter type;
[0138] The second type submodule is used to determine the second type set corresponding to the model parameter set based on at least one model parameter in the model parameter set; the second type set represents the parameter type of each model parameter in the model parameter set.
[0139] The type comparison submodule is used to proceed to the step of obtaining the model parameter set and model construction function to obtain new model parameters when there is a difference between the first type set and the second type set, until the first type set and the second type set are consistent.
[0140] Optional model building modules include:
[0141] The type set submodule is used to obtain the model parameter set and model construction function, and determine the type set corresponding to the model parameter set; the type set represents the parameter type of each model parameter in the model parameter set;
[0142] The parameter range submodule is used to determine the preset parameter range corresponding to each parameter type for each parameter type in the type set;
[0143] The range determination submodule is used to proceed to the step of obtaining the model parameter set and model construction function to obtain new model parameters when the model parameters in the model parameter set exceed the preset parameter range of the corresponding parameter type, until the new model parameters are within the preset parameter range of the corresponding parameter type.
[0144] In summary, the apparatus in this embodiment of the invention can obtain model parameters and a model building function, execute the model building function to generate a 3D model corresponding to the model parameters, input the 3D model into a model simulation program, control the model simulation program to execute at least one simulation task to generate model simulation results, and when the model simulation results do not meet preset simulation loop conditions, adjust the model parameters based on a preset parameter optimization algorithm, and reconstruct and simulate the model based on the adjusted model parameters. When the model simulation results meet the simulation loop conditions, the current model parameters, i.e., the unoptimized model parameters, are obtained. This allows for quick adjustment of model parameters that do not meet the conditions and immediate execution of the next model construction and verification. Through iterative optimization, optimized model parameters can be easily obtained, thereby improving the efficiency of model parameter optimization. Furthermore, based on the optimized model parameters, a higher-performance 3D model and corresponding physical product can be obtained, ultimately improving the optimization efficiency of the 3D model and product.
[0145] Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of this disclosure. See below for details. Figure 5 It shows a schematic diagram of a structure suitable for implementing the electronic device 600 in the embodiments of this disclosure. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0146] like Figure 5 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603 to implement the three-dimensional model parameter optimization method as described in the embodiments of this disclosure. The RAM 603 also stores various programs and data required for the operation of the electronic device 600. The processing device 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0147] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0148] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts, thereby implementing the three-dimensional model parameter optimization method as described above. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.
[0149] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0150] Additionally, this disclosure also provides a vehicle, including: a memory; a processor; and a computer program; wherein the computer program is stored in the memory and configured to be executed by the processor to implement the three-dimensional model parameter optimization method as described above.
[0151] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0152] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0153] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the aforementioned embodiments.
[0154] Optionally, when one or more of the above-described procedures are executed by the electronic device, the electronic device may also perform other steps described in the above embodiments.
[0155] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0156] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0157] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0158] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0159] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0160] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0161] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0162] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A method for optimizing parameters of a three-dimensional model, characterized in that, The method includes: Obtain the model parameters and model building function, and execute the model building function to generate the 3D model corresponding to the model parameters; The three-dimensional model is input into a model simulation program, and the model simulation program is controlled to execute at least one simulation task to generate model simulation results; the at least one simulation task is used to generate the model simulation results based on the three-dimensional model during execution; When the simulation results of the model do not meet the preset simulation cycle conditions, the model parameters are adjusted based on the preset parameter optimization algorithm to obtain the adjusted model parameters. Based on the adjusted model parameters, proceed to the step of obtaining model parameters and model construction function, and execute the model construction function until the model simulation result satisfies the simulation loop condition; If the simulation results of the model satisfy the simulation cycle conditions, the current model parameters are obtained to complete the optimization of the three-dimensional model parameters.
2. The method according to claim 1, characterized in that, The steps of obtaining model parameters and model construction functions, and executing the model construction functions to generate a 3D model corresponding to the model parameters, include: At least one parameter control is displayed in the graphical user interface of the user terminal; each parameter control is used to receive model parameters of different parameter types; In response to the user's parameter input operation, determine the target parameter control to which the parameter input operation is directed and its corresponding target parameter type, as well as the model parameter specified by the parameter input operation, so as to obtain the model parameter of the target parameter type; Obtain the model building function and execute the model building function based on the model parameters to generate a 3D model corresponding to the model parameters of the target parameter type.
3. The method according to claim 1, characterized in that, The steps of obtaining model parameters and model construction functions, and executing the model construction functions to generate a 3D model corresponding to the model parameters, include: Obtain model parameters and model building strategy; the model building strategy represents the sequence of building operations used to generate the 3D model. Based on at least one construction operation in the construction operation sequence, at least one corresponding target model construction function is obtained from a preset model construction function library; Based on the construction operation sequence and the model parameters, the at least one target model construction function is executed one by one to generate the three-dimensional model corresponding to the model parameters.
4. The method according to claim 1, characterized in that, The three-dimensional model is generated by a modeling program; the step of inputting the three-dimensional model into a model simulation program and controlling the model simulation program to execute at least one simulation task to generate model simulation results includes: Based on the output interface of the modeling program and the input interface of the model simulation program, a model transfer function is constructed; When the modeling program generates the three-dimensional model, the model transfer function is executed to input the three-dimensional model into the model simulation program; Send a task execution instruction to the model simulation program to control the model simulation program to execute at least one simulation task to generate model simulation results.
5. The method according to claim 4, characterized in that, The step of sending task execution instructions to the model simulation program to control the model simulation program to execute at least one simulation task to generate model simulation results includes: Obtain at least one simulation task corresponding to the model simulation program, and display the task control corresponding to the at least one simulation task in the graphical user interface of the user terminal; In response to the user's task selection operation, determine the target task control triggered by the task selection operation and its corresponding target simulation task; Send a task execution instruction carrying the target simulation task to the model simulation program to control the model simulation program to execute the target simulation task.
6. The method according to claim 1, characterized in that, The steps for obtaining model parameters and model construction functions include: Obtain a set of model parameters, a model construction function, and a preset first type set; the set of model parameters includes at least one model parameter, and the first type set includes at least one preset parameter type; Based on at least one model parameter in the model parameter set, determine a second type set corresponding to the model parameter set; the second type set represents the parameter type of each model parameter in the model parameter set. If there is a difference between the first type set and the second type set, proceed to the step of obtaining the model parameter set and model construction function to obtain new model parameters until the first type set and the second type set are consistent.
7. The method according to claim 1, characterized in that, The steps for obtaining model parameters and model construction functions include: Obtain the model parameter set and model construction function, and determine the type set corresponding to the model parameter set; the type set represents the parameter type of each model parameter in the model parameter set; For each parameter type in the set of types, determine the preset parameter range corresponding to each parameter type; If the model parameters in the model parameter set exceed the preset parameter range of the corresponding parameter type, proceed to the step of obtaining the model parameter set and model construction function to obtain new model parameters, until the new model parameters are within the preset parameter range of the corresponding parameter type.
8. A three-dimensional model parameter optimization device, characterized in that, The device includes: The model building module is used to obtain model parameters and model building functions, and execute the model building functions to generate a 3D model corresponding to the model parameters. The model simulation module is used to input the three-dimensional model into the model simulation program and control the model simulation program to execute at least one simulation task to generate model simulation results; the at least one simulation task is used to generate the model simulation results based on the three-dimensional model during execution. The parameter optimization module is used to adjust the model parameters based on a preset parameter optimization algorithm when the model simulation results do not meet the preset simulation cycle conditions, so as to obtain the adjusted model parameters. The iterative loop module is used to enter the steps of obtaining model parameters and model construction function based on the adjusted model parameters, and execute the model construction function until the model simulation result satisfies the simulation loop condition. The optimization completion module is used to obtain the current model parameters when the model simulation results meet the simulation cycle conditions, so as to complete the optimization of the three-dimensional model parameters.
9. An electronic device, characterized in that, include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and configured to be executed by the processor to implement the method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7.