Pouring system and mold cavity design method and system that imitate reinforcement learning

CN122197645BActive Publication Date: 2026-09-15AVIC BEIJING INST OF AERONAUTICAL MATERIALS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610655291.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-13
Publication Date
2026-09-15
Estimated Expiration
2046-05-13

AI Technical Summary

Technical Problem

[0004]发明的目的为:本发明提供一种模仿与强化学习协同的浇注系统及模具内腔设计方法及系统,以解决浇注系统及模具内腔的现有设计方式,由于仍需工程师手动完成设计方案后方可进行模拟验证,并未从根本上解决方案生成阶段对人工经验的依赖问题

Benefits of technology

[0063]The beneficial effects of this invention are as follows: This invention provides a casting system and mold cavity design method and system that combines imitation and reinforcement learning. First, by parsing historical casting design datasets into structured action triples and extracting multi-dimensional state features, this invention can transform implicit engineer experience into quantifiable and reusable training samples, thereby avoiding the limitations of traditional methods where experience transmission relies on individuals and is difficult to standardize, and significantly reducing the dependence on continuous intervention from experts in specific fields. Second, based on the action-state training sample set, this invention obtains an initial strategy model after completing behavioral cloning training, which possesses the ability to adapt to the dimensional compensation rules and casting module layout of different types of castings. The initial generalization capability of the placement strategy enables the system to quickly provide reasonable candidate design solutions when faced with new casting models that have never been seen before, without requiring manual design from scratch. During the continuous optimization phase, a dual reward mechanism that integrates manual and simulation reward signals ensures that the optimization strategy model simultaneously considers the rationality judgment of engineering experience and the objective evaluation of physical simulation. These two types of signals complement each other, effectively overcoming the problems of strong subjectivity and low efficiency when relying solely on manual review, and neglecting process feasibility when relying solely on simulation evaluation. This ensures that the final generated mold cavity model and gating system assembly model reliably meet key quality indicators such as shrinkage rate and filling integrity. Furthermore, for structures with significant differences in wall thickness in castings, the introduction of a cold wax core hard constraint injection mechanism and a human-machine collaborative fine-tuning step further guarantees the safety baseline of the design results under special process requirements. The system can also continuously update itself with each user modification, allowing its design capabilities to grow over time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122197645B_ABST
    Figure CN122197645B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of casting design, and discloses a pouring system and a mold inner cavity design method and system cooperating with imitation and reinforcement learning, which comprises the following steps: imitation learning is carried out by using a historical casting design data set, semantic analysis and action reconstruction are carried out on the historical casting design data set, and an action-state training sample set is obtained; the action-state training sample set is input into a strategy network to obtain an initial strategy model; a to-be-designed casting model is input into the initial strategy model to generate a candidate design scheme; a comprehensive reward signal is generated for each candidate design scheme, and an optimized strategy model is obtained through continuous optimization; a target casting model is input into the optimized strategy model to generate an action sequence of the target casting model, and the action sequence is driven to be executed by three-dimensional computer-aided design software to obtain a mold inner cavity model and a pouring system assembly model. The application improves the design efficiency of the inner cavity model and the pouring system and reduces the defect risk.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of casting design technology, and in particular relates to a gating system and mold cavity design method and system that combines imitation and reinforcement learning. Background Technology

[0002] In the field of casting process design, the design of the mold cavity and the gating system are core aspects. During the filling and solidification process, molten metal undergoes complex shrinkage deformation, making it difficult to accurately predict the dimensional compensation of the mold cavity. The layout and connection relationships of modules such as risers, runners, and inlet pipes in the gating system heavily rely on engineers' experience and judgment regarding filling stability, the effectiveness of feeding channels, and the distribution of hot spots. Traditional design methods primarily rely on engineers' accumulated experience and repeated mold trials, resulting in lengthy design cycles and high costs.

[0003] In existing technologies, some technologies have introduced casting simulation software (such as ProCAST) into the forward verification process of the gating system. However, such methods still require engineers to manually complete the design scheme before simulation verification can be carried out, which does not fundamentally solve the problem of dependence on human experience in the solution generation stage. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for designing gating systems and mold cavities that combines imitation and reinforcement learning, in order to solve the problem that existing design methods for gating systems and mold cavities still require engineers to manually complete the design scheme before simulation verification can be carried out, and do not fundamentally address the problem of reliance on human experience in the solution generation stage.

[0005] The technical solution of the invention is as follows: In a first aspect, the present invention provides a gating system and mold cavity design method based on the synergy of imitation and reinforcement learning, comprising:

[0006] Step 1: Use historical casting design dataset for imitation learning. Perform semantic parsing and action reconstruction on the historical casting design dataset to obtain an action-state training sample set.

[0007] Step 2: Input the action-state training sample set into the policy network, and perform behavior cloning training on the policy network through a supervised learning algorithm to obtain the initial policy model;

[0008] Step 3: Input the casting model to be designed into the initial strategy model to generate candidate design schemes; generate a comprehensive reward signal for each candidate design scheme based on the dual reward mechanism, and use the comprehensive reward signal to continuously optimize the initial strategy model to obtain an optimized strategy model;

[0009] Step 4: Input the target casting model into the optimization strategy model, generate the action sequence of the target casting model from the optimization strategy model, and drive the three-dimensional computer-aided design software to execute the action sequence of the target casting model to obtain the mold cavity model and the gating system assembly model.

[0010] Optionally, in the above-described method for designing a gating system and mold cavity using a combination of imitation and reinforcement learning, the method for constructing the historical casting design dataset in step 1 includes:

[0011] Step 11: Collect multiple sets of casting design cases. Each set of casting design cases includes the original casting model, the operation log of the 3D modeling software, and the modified final model, forming a design triplet dataset.

[0012] Step 12: Perform natural language processing and operation sequence analysis on the operation log to reconstruct the underlying events in the operation log into action triples related to features, thereby obtaining an action sequence set; wherein, each action triple is represented in a structured form of object features, operation type, and parameter vector;

[0013] Step 13: Extract state features from the original casting model of each casting design case to form a state feature vector corresponding to each time step in the action sequence set, thus obtaining the state feature set corresponding to the action sequence set.

[0014] Step 14: Pair and associate the action sequence set with the state feature set to obtain the action-state training sample set.

[0015] Optionally, in the above-described method for designing a gating system and mold cavity using a combination of imitation and reinforcement learning, step 12 includes:

[0016] By performing natural language processing on the operation log files, the text fields in the operation logs are mapped to a predefined process operation dictionary to identify the operation intent corresponding to each underlying event in the operation logs. Subsequently, operation sequence analysis is performed to merge multiple underlying events that are temporally consecutive and semantically belong to the same design action into an action triple. The structured form of each action triple is as follows: ,in, The characteristics of the object being operated on For operation type, This is the parameter vector corresponding to the operation, which is the amount of data in the operation;

[0017] After processing in step 12, the operation logs of each casting design case are output as an ordered sequence of action triples. The action triple sequences of multiple casting design cases together constitute an action sequence set.

[0018] Optionally, in the above-described method for designing a gating system and mold cavity using a combination of imitation and reinforcement learning, step 13 involves extracting four types of state features from each original casting model: global geometric features, local hot spot region features, topological adjacency relationship features, and process constraint features. After extraction, the four types of features are concatenated to obtain a complete state feature vector, and a state feature set is constructed based on the state feature vectors from multiple time steps.

[0019] Optionally, in the above-described method for designing a gating system and mold cavity using a combination of imitation and reinforcement learning, the extraction of state features in step 13 includes:

[0020] Global geometric features: Perform geometric calculations on the original casting model to extract the total volume, projected area of ​​the three views, maximum wall thickness, minimum wall thickness, average wall thickness, typical radius, length, width and height dimensions of the casting. Then, use a deep cavity detection algorithm to mark the areas in the original casting model whose depth-to-diameter ratio exceeds a preset threshold and output the deep cavity marking vector.

[0021] Local hot spot region characteristics: Hot spot regions are identified in the original casting model, and regions with wall thickness exceeding the cold wax core triggering threshold are marked as candidate hot spot regions; for each candidate hot spot region, the region thickness, surface curvature, shortest distance from the casting boundary and hot spot coefficient are extracted.

[0022] Based on the topological adjacency relationship characteristics, a regional adjacency graph is constructed. Using each geometric region of the casting as a node and the shared boundary surface between regions as an edge, a gating module connection graph is constructed to record the connection topology between risers, gating channels, and inlet pipes. The structure of both graphs is encoded as feature vectors in the form of adjacency matrices.

[0023] The process constraint features are used to calculate the minimum draft angle in each draft direction of the casting, and the region with a wall thickness exceeding the cold wax core trigger threshold is placed in the feature vector, and the cold wax core trigger threshold marker vector is output.

[0024] Optionally, in the above-described method for designing a gating system and mold cavity using a combination of imitation and reinforcement learning, step 14 includes:

[0025] The casting design case number and time step index are paired one by one. The state feature vector of the same casting design case at the same time step is associated with the corresponding action triplet as a training sample pair. All training sample pairs are summarized to obtain the action-state training sample set.

[0026] Optionally, in the above-described method for designing a gating system and mold cavity using a combination of imitation and reinforcement learning, step 2 includes:

[0027] Step 21: Using the state feature set in the action-state training sample set as input and the corresponding action sequence set as supervision labels, construct a policy network training task;

[0028] Step 22: Based on the constructed policy network training task, the network parameters of the policy network are iteratively updated by minimizing the negative log-likelihood loss function; the negative log-likelihood loss function is expressed as the negative value of the expected log probability of the policy network output probability distribution on the action-state training sample set.

[0029] Step 23: Perform convergence verification on the trained policy network, solidify the policy network parameters after successful verification, and obtain the initial policy model.

[0030] Optionally, in the above-described method for designing a gating system and mold cavity using a combination of imitation and reinforcement learning, the dual reward mechanism in step 3 includes: a manual reward mechanism and a simulation reward mechanism; the step 3, based on the dual reward mechanism, generates a comprehensive reward signal for each candidate design scheme to obtain an optimization strategy model, including:

[0031] Step 31: The candidate design schemes are reviewed and determined manually. When a candidate design scheme is qualified, a positive reward value is assigned; when a candidate design scheme is unqualified, a negative reward value is assigned, thus forming a manual reward signal.

[0032] Step 32: Simulate the filling process and solidification process of the candidate design scheme using casting simulation software, extract multiple quality indicators from the simulation results, perform weighted calculation on the extracted multiple quality indicators, and generate simulation reward signals.

[0033] Step 33: Merge the artificial reward signal and the simulated reward signal according to the weighting coefficients, and introduce a process complexity penalty term to obtain a comprehensive reward signal;

[0034] Step 34: Based on the comprehensive reward signal, continuously optimize the initial policy model using the policy gradient algorithm to obtain an optimized policy model.

[0035] Optionally, in the above-described method for designing a gating system and mold cavity using a combination of imitation and reinforcement learning, step 32 includes:

[0036] Each candidate design scheme is input into the casting simulation software. The software performs filling process simulation and solidification process simulation for each candidate design scheme. Four quality indicators are extracted from the simulation results: shrinkage rate, filling integrity, temperature gradient penalty term and defect risk index.

[0037] The four quality indicators are normalized so that the values ​​of each quality indicator are uniformly mapped to the [0,1] interval. Then, they are multiplied by the corresponding weight coefficients and summed to obtain the simulation reward signal of each candidate design scheme.

[0038] Optionally, in the above-described method for designing a gating system and mold cavity using a combination of imitation and reinforcement learning, step 33 includes:

[0039] Upon receiving artificial reward signals With simulated reward signal Then, the two types of reward signals are weighted and fused using a balance coefficient α, and then the result is subtracted by a penalty coefficient. The adjusted process complexity penalty term C yields the comprehensive reward signal, expressed as:

[0040] .

[0041] Optionally, in the above-described method for designing a gating system and mold cavity using a combination of imitation and reinforcement learning, step 34 includes:

[0042] Collect action sequence data and corresponding comprehensive reward signals R generated by the current policy model on multiple candidate design schemes, and calculate the ratio of the output probability of each action under the old and new policy models. The ratio is limited to a reasonable range by truncation. The output probability under the new policy model. This represents the output probability under the old policy model.

[0043] With the goal of maximizing the expected reward after truncation, parameter updates are continuously performed in multiple rounds. In each round, candidate design schemes are regenerated, dual reward signals are collected, the comprehensive reward signal R is calculated, and the parameters θ of the policy network are updated until the comprehensive reward signal R of the policy network on the validation set converges, thus obtaining the optimized policy model.

[0044] Optionally, in the above-described method for designing a gating system and mold cavity using a combination of imitation and reinforcement learning, the action sequence of the target casting model in step 4 includes:

[0045] The mold cavity size compensation action subsequence includes: the action of determining the overall scaling coefficient of the casting in each direction, and the action of compensating for the surface displacement of the local hot spot area;

[0046] The design sequence of the gating system includes: determining the number of risers, riser type, riser size, riser placement location, gating runner direction, gating runner cross-sectional shape, gating runner and riser connection method, and determining the location of the inlet pipe and gating runner interface parameters.

[0047] Optionally, in the above-described method for designing a gating system and mold cavity using a combination of imitation and reinforcement learning, step 4 includes:

[0048] After receiving the target casting model input by the user, the first step is to extract features from the target casting model, calculate the global geometric feature vector and the local hot spot region feature vector, and then concatenate them to form the current state. The current state is then input into the optimization strategy model, which generates and outputs the mold cavity size compensation action subsequence and the gating system design action subsequence in sequence according to the current state.

[0049] The generated action sequence is input into the 3D computer-aided design software, which then performs geometric transformations, feature additions, and Boolean operations sequentially according to the parameters in the action sequence, ultimately outputting the mold cavity model and the gating system assembly model.

[0050] Optionally, in the above-described method for designing a gating system and mold cavity using a combination of imitation and reinforcement learning, before step 4, the method further includes: hard constraint injection; the hard constraint injection includes:

[0051] Local areas in the target casting model whose wall thickness exceeds a preset threshold are detected. Local areas that meet the conditions are marked as candidate areas for cold wax cores. The marking information of the candidate areas for cold wax cores is embedded as a constraint condition into the state input of the optimization strategy model. The optimization strategy model, in combination with the comprehensive reward signal, decides the final placement scheme of the cold wax core.

[0052] Optionally, in the above-described method for designing a gating system and mold cavity using a combination of imitation and reinforcement learning, step 4 further includes:

[0053] Step 5: Receive user modification operations on the mold cavity model and gating system assembly model, record the user's modification operations as new action-state samples, and add them to the action-state training sample set for continuous updates of the optimization strategy model for the next round of behavior cloning and reinforcement learning.

[0054] Secondly, the present invention also provides a gating system and mold cavity design system that combines imitation and reinforcement learning. The gating system and mold cavity design system executes a gating system and mold cavity design method that combines imitation and reinforcement learning as described above through various functional modules. The functional modules of the system include: a parsing module, a training module, an optimization module, and an output module.

[0055] The parsing module is used to perform imitation learning using a historical casting design dataset, and to perform semantic parsing and action reconstruction on the historical casting design dataset to obtain an action-state training sample set;

[0056] The training module is used to perform behavior cloning training on the policy network based on the action-state training sample set obtained by the parsing module, and to obtain an initial policy model.

[0057] The optimization module is used to input the casting model to be designed into the initial strategy model trained by the training module to generate candidate design schemes; based on the dual reward mechanism, a comprehensive reward signal is generated for each candidate design scheme, and the comprehensive reward signal is used to continuously optimize the initial strategy model to obtain an optimized strategy model;

[0058] The output module is used to obtain the optimization strategy model generated by the optimization module, input the target casting model into the optimization strategy model, generate the action sequence of the target casting model through the optimization strategy model, drive the three-dimensional computer-aided design software to execute the action sequence of the target casting model, and obtain the mold cavity model and the gating system assembly model.

[0059] Thirdly, the present invention also provides a gating system and mold cavity design device that combines imitation and reinforcement learning, comprising:

[0060] A memory and at least one processor, wherein the memory stores instructions;

[0061] At least one of the processors controls the imitation and reinforcement learning collaborative gating system and mold cavity design device to execute a method for designing an imitation and reinforcement learning collaborative gating system and mold cavity as described above by calling the instructions in the memory.

[0062] Fourthly, the present invention also provides a computer-readable storage medium storing instructions that, when executed by a processor, implement a gating system and mold cavity design method based on imitation and reinforcement learning as described in any of the preceding claims.

[0063] The beneficial effects of this invention are as follows: This invention provides a casting system and mold cavity design method and system that combines imitation and reinforcement learning. First, by parsing historical casting design datasets into structured action triples and extracting multi-dimensional state features, this invention can transform implicit engineer experience into quantifiable and reusable training samples, thereby avoiding the limitations of traditional methods where experience transmission relies on individuals and is difficult to standardize, and significantly reducing the dependence on continuous intervention from experts in specific fields. Second, based on the action-state training sample set, this invention obtains an initial strategy model after completing behavioral cloning training, which possesses the ability to adapt to the dimensional compensation rules and casting module layout of different types of castings. The initial generalization capability of the placement strategy enables the system to quickly provide reasonable candidate design solutions when faced with new casting models that have never been seen before, without requiring manual design from scratch. During the continuous optimization phase, a dual reward mechanism that integrates manual and simulation reward signals ensures that the optimization strategy model simultaneously considers the rationality judgment of engineering experience and the objective evaluation of physical simulation. These two types of signals complement each other, effectively overcoming the problems of strong subjectivity and low efficiency when relying solely on manual review, and neglecting process feasibility when relying solely on simulation evaluation. This ensures that the final generated mold cavity model and gating system assembly model reliably meet key quality indicators such as shrinkage rate and filling integrity. Furthermore, for structures with significant differences in wall thickness in castings, the introduction of a cold wax core hard constraint injection mechanism and a human-machine collaborative fine-tuning step further guarantees the safety baseline of the design results under special process requirements. The system can also continuously update itself with each user modification, allowing its design capabilities to grow over time. Attached Figure Description

[0064] The accompanying drawings are provided to further understand the technical solutions of the present invention and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of the present invention and do not constitute a limitation on the technical solutions of the present invention.

[0065] Figure 1 A flowchart illustrating a method for designing a gating system and mold cavity through a combination of imitation and reinforcement learning, as provided in an embodiment of the present invention;

[0066] Figure 2 This is a schematic diagram of the system architecture of a casting system and mold cavity design system that combines imitation and reinforcement learning, provided as an embodiment of the present invention. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.

[0068] As explained in the background section, existing design methods for gating systems and mold cavities still require engineers to manually complete the design before simulation verification, failing to fundamentally address the reliance on human experience in the solution generation stage. Furthermore, while some research has attempted to apply purely data-driven artificial intelligence methods to casting design, these methods require establishing a direct mapping between the casting's 3D model and the mold cavity and gating system. This places extremely high demands on training data scale, 3D feature extraction capabilities, and computational resources, which are difficult to meet in actual casting production scenarios. This results in unstable model training performance and an inability to effectively automate the generation of design schemes for the mold cavity and gating system from the casting model.

[0069] To address the aforementioned problems, embodiments of the present invention provide a gating system and a method and system for designing mold cavities that combine imitation and reinforcement learning.

[0070] The present invention provides the following specific embodiments, which can be combined with each other. For the same or similar concepts or processes, they may not be described again in some embodiments.

[0071] like Figure 1 The diagram shows a flowchart of a gating system and mold cavity design method based on the collaborative principles of imitation and reinforcement learning provided by this invention. The gating system and mold cavity design method provided by this invention includes the following steps:

[0072] Step 1: Use historical casting design dataset for imitation learning. Perform semantic parsing and action reconstruction on the historical casting design dataset to obtain an action-state training sample set.

[0073] Step 2: Input the action-state training sample set into the policy network, and perform behavior cloning training on the policy network through a supervised learning algorithm to obtain the initial policy model;

[0074] Step 3: Input the casting model to be designed into the initial strategy model to generate candidate design schemes; generate a comprehensive reward signal for each candidate design scheme based on the dual reward mechanism, and use the comprehensive reward signal to continuously optimize the initial strategy model to obtain an optimized strategy model;

[0075] Step 4: Input the target casting model into the optimization strategy model obtained in Step 3. The optimization strategy model generates the action sequence of the target casting model and drives the three-dimensional computer-aided design software to execute the action sequence of the target casting model to obtain the mold cavity model and the gating system assembly model.

[0076] It should be noted that the casting model to be designed in step 3 of this invention is, for example, a representative casting model of a certain type of casting, such as a guide or a typical model of a casing. By completing the model design of a certain type of casting in step 3, the optimization strategy model of that type of casting is obtained. The target casting model in step 4 is a casting model of the same type as the casting model to be designed in step 3. After completing the model design of a certain type of casting in step 3 and obtaining the optimization strategy model, step 4 is the application process of generating the corresponding mold cavity model and gating system assembly model for the target casting model using the optimization strategy model.

[0077] The following describes the specific implementation methods of the above steps in the imitation and reinforcement learning collaborative gating system and mold cavity design method provided by the embodiments of the present invention.

[0078] In one implementation of this invention, the process of constructing the historical casting design dataset in step 1 above may include:

[0079] Step 11: Collect multiple sets of casting design cases. Each set of casting design cases includes the original casting model, the operation log of the 3D modeling software, and the modified final model, forming a design triplet dataset.

[0080] Step 11 first requires collecting multiple sets of casting design cases. The original casting model records the complete 3D shape information of the casting before any compensation processing. The operation log is automatically generated by the 3D modeling software during the engineer's operation, recording each operation event in timestamp order, including menu command calls, parameter value inputs, object selection identifiers, coordinate transformation events, feature creation and deletion records, gating system module (riser, runner, inlet pipe, etc.) call instructions, placement coordinate and dimension parameter settings, and execution records of inter-module connection operations (such as surface fitting and Boolean operations). The modified final model records the complete 3D shape information of the mold cavity geometry model and the gating system assembly model after the engineer has completed all design operations.

[0081] Step 12: Perform natural language processing and operation sequence analysis on the operation log to reconstruct the underlying events in the operation log into action triples related to features, thereby obtaining an action sequence set; wherein, each action sequence in the action sequence set, i.e. each action triple, is represented as a structured form of object features, operation type, and parameter vector.

[0082] It should be noted that the original records in the operation log are low-level event streams, and each record only describes a single interface interaction behavior (such as "open bias plane dialog box", "enter value 10.5", "click OK"), without any process semantics. In step 12 of this embodiment, natural language processing is performed on the operation log file to map the text fields (command name, parameter label, object name, etc.) in the operation log to a predefined process operation dictionary, identifying the operation intent corresponding to each low-level event; then, operation sequence analysis is performed to merge multiple low-level events that are temporally continuous and semantically belong to the same design action into an action triple. The structured form of each action triple is as follows: ,in, The characteristics of the object being operated on For operation type, The parameter vector corresponding to this operation represents the amount of data involved in the operation. Finally, after the above processing, the operation logs for each complete casting design case are output as an ordered sequence of action triplets. Multiple sets of action triplet sequences from various casting design cases together constitute an action sequence set.

[0083] Step 13: Extract state features from the original casting model of each casting design case to form a state feature vector corresponding to each time step in the action sequence set, thus obtaining the state feature set corresponding to the action sequence set.

[0084] It should be noted that the operation in step 13 of this embodiment can be performed in parallel with the construction of the action sequence set in step 12. Specifically, in step 13, global geometric features and local hot spot region features are extracted from each original casting model, and combined with the extracted topological adjacency relationship features and process constraint features to form a state feature set corresponding to the action sequence set.

[0085] The global geometric features in step 13 include: casting volume, projected area, maximum wall thickness, minimum wall thickness, average wall thickness, typical radius (R), length, width, and height dimensions, and deep cavity markings; local hot spot region features include: region thickness, curvature, distance from the boundary, and hot spot coefficient; topological adjacency relationship features include: region adjacency graph and gating module connection graph; process constraint features include: minimum draft angle and cold wax core trigger threshold markings.

[0086] The extraction of state features includes four levels: For global geometric features, geometric calculations are performed on the original casting model to extract the total volume, projected area of ​​the three views, maximum wall thickness, minimum wall thickness, average wall thickness, typical radius (R-angle), and length, width, and height dimensions of the casting. A deep cavity detection algorithm is used to mark areas in the original casting model whose depth-to-diameter ratio exceeds a preset threshold, outputting a deep cavity marking vector. For local hot spot region features, hot spot regions are identified in the original casting model. Regions with wall thickness exceeding the cold wax core triggering threshold (e.g., 10 mm) are marked as candidate hot spot regions. Subsequently, the region thickness and surface curvature are extracted for each candidate hot spot region. The system considers the following features: the shortest distance from the casting boundary and the thermal break coefficient (calculated by the ratio of the region module to the adjacent region module); regarding topological adjacency features, a region adjacency graph is constructed, using each geometric region of the casting as nodes and the shared boundary surface between regions as edges, to build a gating module connection graph, recording the connection topology between modules such as risers, gating systems, and inlet pipes. Both graph structures are encoded as feature vectors in the form of adjacency matrices; regarding process constraint features, the minimum draft angle in each draft direction of the casting is calculated, and regions with wall thickness exceeding the cold wax core trigger threshold are positioned in the feature vector, outputting the cold wax core trigger threshold marker vector. Finally, the above four types of features are concatenated to obtain a complete state feature vector, and a state feature set is constructed based on the state feature vectors of multiple time steps.

[0087] Step 14: Pair and associate the action sequence set with the state feature set to obtain the action-state training sample set.

[0088] After obtaining the action sequence set and the state feature set, the present invention pairs the two one by one according to the casting design case number and the time step index, and associates the state feature vector of the same casting design case at the same time step with the corresponding action triplet as a training sample pair. After summing all the training sample pairs, the action-state training sample set is obtained.

[0089] In one implementation of this invention, step 2 may include the following steps:

[0090] Step 21: Using the state feature set in the action-state training sample set as input and the corresponding action sequence set as supervision labels, construct the policy network training task.

[0091] This step uses the state feature vectors from the action-state training sample set as input to the policy network, along with the corresponding action triples. As a supervisory label. Among them, As discrete classification labels Continuous parameters (such as displacement, scaling factor, and size parameters) are used as regression labels. As object feature localization classification labels, the three types of labels together constitute the multi-task supervised learning objective.

[0092] Step 22: Based on the constructed policy network training task, the network parameters of the policy network are iteratively updated by minimizing the negative log-likelihood loss function. The negative log-likelihood loss function is expressed as the negative value of the expected log probability of the policy network output probability distribution on the action-state training sample set.

[0093] This step uses the negative log-likelihood loss function. As a training objective, the physical meaning of this loss function is: under the state distribution of the training sample set D, the policy network... Output and expert action tags The negative logarithm of the probability of consistency indicates a higher degree of agreement between the probability distribution of the policy network output and the expert action labels. During training, the action-state training sample set D is divided into batches, and the state feature vectors for each batch are... Input Policy Network The negative log-likelihood loss between the action probability distribution output by the network and the supervision label is calculated. Then, the gradient of the loss value with respect to the policy network parameter θ is calculated through backpropagation, and the policy network parameter θ is updated by gradient descent. This process is repeated for all batches until the loss value no longer decreases significantly.

[0094] Step 23: Perform convergence verification on the trained policy network, solidify the policy network parameters after successful verification, and obtain the initial policy model.

[0095] After each round of training, the strategy network is computed using the validation set partitioned from the action-state training sample set D. The action prediction accuracy and continuous parameter regression error are compared. When the negative log-likelihood loss calculated using the validation set no longer decreases over several consecutive rounds, and the action prediction accuracy stabilizes above a preset threshold, the policy network is considered converged. Subsequently, the current network parameters θ are fixed and saved, resulting in the initial policy model. .

[0096] In one implementation of this invention, the dual reward mechanism in step 3 includes a manual reward mechanism and a simulation reward mechanism; correspondingly, the specific method for generating a comprehensive reward signal for each candidate design scheme based on the dual reward mechanism and obtaining the optimization strategy model in step 3 includes:

[0097] Step 31: The candidate design schemes are reviewed and determined manually. When a candidate design scheme is qualified, a positive reward value is assigned; when a candidate design scheme is unqualified, a negative reward value is assigned, thus obtaining a manual reward signal.

[0098] In step 31, after receiving the candidate design schemes, the technical feasibility of each candidate design scheme is reviewed manually. When the riser placement of the candidate design scheme is reasonable, the runner direction conforms to the process specifications, and the dimensional compensation parameters are within the empirical range, a positive reward value (+1) is assigned to the scheme; when the candidate design scheme has problems such as missing risers, incorrect runner connections, or compensation parameters that deviate significantly from the reasonable range, a negative reward value (-1) is assigned; when the candidate design scheme is generally reasonable but some parameters need to be fine-tuned, an intermediate reward value (+0.5) is assigned. At the same time, the engineer's revision operation is recorded as revision difference data and added to the action-state training sample set to form a manual reward signal.

[0099] Step 32: The casting simulation software is used to simulate the filling process and solidification process of the candidate design scheme. Multiple quality indicators are extracted from the simulation results, and the extracted multiple quality indicators are weighted and calculated to generate a simulation reward signal.

[0100] It should be noted that, in this embodiment of the invention, while executing step 31, in step 32, each candidate design scheme is input into casting simulation software (such as ProCAST). The software performs filling process simulation and solidification process simulation for each candidate design scheme, and extracts four key quality indicators from the simulation results: shrinkage rate (the proportion of shrinkage porosity and shrinkage defects in the casting volume), filling integrity (the proportion of molten metal filling the mold cavity), temperature gradient penalty term (the degree of unevenness of temperature gradient distribution in different areas of the casting), and defect risk index (the predicted probability of comprehensive defects such as cold shuts and porosity). Subsequently, the above four quality indicators are normalized so that the values ​​of each quality indicator are uniformly mapped to the [0,1] interval, and then multiplied by the corresponding weight coefficient and summed to obtain the simulation reward signal of the candidate design scheme.

[0101] Step 33: Fuse the artificial reward signal and the simulated reward signal according to the weighting coefficients, and introduce a process complexity penalty term to obtain a comprehensive reward signal.

[0102] In this embodiment of the invention, when obtaining an artificial reward signal With simulated reward signal Then, the two types of reward signals are weighted and fused using a balance coefficient α, and then the result is subtracted by a penalty coefficient. The adjusted process complexity penalty term C yields the comprehensive reward signal, expressed as:

[0103] ;

[0104] The process complexity penalty term C consists of two parts of quantified data: the total number of modules such as risers, runners, and inlet pipes in the gating system. And the sum of the absolute values ​​of scaling in each direction and surface displacement in the mold cavity size compensation. The weighted average of the two results in ,in These correspond to the weighting coefficients. The balance coefficient α is set to a larger value in the early stages of training, making the overall reward signal rely more on the engineer's manual judgment; as simulation evaluation data accumulates and the reliability of the simulation model improves, the value of α is gradually reduced. The proportion of the overall reward signal R is increased accordingly.

[0105] Step 34: Based on the comprehensive reward signal, continuously optimize the initial policy model using the policy gradient algorithm to obtain an optimized policy model.

[0106] In step 34, based on the aforementioned comprehensive reward signal, this invention uses a policy gradient algorithm to update the policy parameters of the initial policy model. Specifically, firstly, it collects action sequence data generated by the current policy model on multiple candidate design schemes and the corresponding comprehensive reward signal R, and calculates the ratio of the output probability of each action under the old and new policy models. Then, the ratio is truncated to limit it to a reasonable range to prevent the strategy from collapsing due to excessively large single update magnitude. The output probability under the new policy model. The output probability under the old policy model is used as the target. The parameter update is performed continuously in multiple rounds with the goal of maximizing the expected reward after truncation. In each round, candidate design schemes are regenerated, dual reward signals are collected, the comprehensive reward signal R is calculated, and the parameters θ of the policy network are updated until the comprehensive reward signal R of the policy network on the validation set converges, thus obtaining the optimized policy model.

[0107] In one implementation of this invention, the action sequence of the target casting model in step 4 above includes: a mold cavity size compensation action sub-sequence, which includes the determination of the overall scaling coefficient of the casting in each direction and the surface displacement compensation action for the local hot spot area; and a gating system design action sub-sequence, which includes the determination of the number of risers, riser type, riser size, riser placement position, gating runner direction, gating runner cross-sectional shape, gating runner and riser connection method, and the determination of the position of the central injection pipe and the gating runner interface parameters.

[0108] In this implementation, after receiving the target casting model input by the user, the target casting model is first subjected to feature extraction, and the global geometric feature vector and the local hot spot region feature vector are calculated. After being concatenated, the current state is formed and input into the optimization strategy model. The optimization strategy model outputs the above two types of action subsequences in sequence according to the current state.

[0109] Specifically, in the mold cavity size compensation action subsequence, the overall scaling factor determination action outputs the scaling ratio factors of the casting in the X, Y, and Z directions respectively. (like The surface displacement compensation action for local hot spot regions outputs the corresponding surface normal displacement for each hot spot region. (e.g., localized thickening of the upper edge plate surface) These two types of actions together constitute a complete set of size compensation parameters.

[0110] In the gating system design action sub-sequence, the riser-related actions output the number of risers, the type code of each riser, the diameter and height dimension parameters, and the placement coordinates in the casting hot spot coordinate system in sequence; the gating-related actions output the gating path point sequence, the cross-sectional shape type code, and the connection surface identifier with each riser; the inlet pipe-related actions output the inlet pipe type code, the installation position coordinates, and the interface parameters with the gating.

[0111] After all the above action sequences are generated, they are fed into 3D computer-aided design software built on OpenCASCADE or CadQuery. The 3D computer-aided design software performs geometric transformations, feature additions and Boolean operations in sequence according to the parameters in the action sequence, and finally outputs the 3D model of the mold cavity and the assembly model of the gating system.

[0112] Furthermore, in an optional embodiment of the present invention, a hard constraint injection step is further included between steps 3 and 4. Specifically, this step includes: detecting local areas in the target casting model where the wall thickness exceeds a preset threshold, marking the local areas that meet the conditions as candidate areas for cold wax cores, embedding the marking information of the candidate areas for cold wax cores as a constraint condition into the state input of the optimization strategy model, and having the optimization strategy model, in conjunction with the comprehensive reward signal, decide on the final placement scheme of the cold wax cores.

[0113] Furthermore, in another optional embodiment of the present invention, step 4 is followed by:

[0114] Step 5: Receive user modifications to the mold cavity model and gating system assembly model, record the user's modifications as new action-state samples, and add them to the action-state training sample set for continuous updates of the optimization strategy model for the next round of behavior cloning and reinforcement learning.

[0115] It should be noted that, in the specific execution of this step, after receiving the user's modification operation regarding the mold cavity model and gating system assembly model obtained in step 4, if local parameters are manually modified, each user modification operation is parsed into an action triple, including object feature, operation type, and parameter vector, and paired with the corresponding state feature vector before the modification to form a new action-state sample. After the new sample is added to the original action-state training sample set, behavior cloning training is re-executed with the expanded action-state training sample set to update the network parameters of the policy network. Subsequently, the updated policy model continues to be optimized using a dual reward mechanism to complete the iterative update of the parameters of the optimized policy model.

[0116] Based on the above embodiments of the present invention, a gating system and mold cavity design method combining imitation and reinforcement learning are provided; such as Figure 2 As shown, this embodiment of the invention also provides a gating system and mold cavity design system that combines imitation and reinforcement learning. This gating system and mold cavity design system executes the imitation and reinforcement learning-based gating system and mold cavity design method provided in any of the above embodiments through various functional modules. The system includes: a parsing module 100, a training module 200, an optimization module 300, and an output module 400.

[0117] The parsing module 100 is used to perform imitation learning using a historical casting design dataset, and to perform semantic parsing and action reconstruction on the historical casting design dataset to obtain an action-state training sample set;

[0118] Training module 200 is used to perform behavior cloning training on the policy network based on the action-state training sample set obtained by parsing module 100, and obtain the initial policy model by using a supervised learning algorithm.

[0119] The optimization module 300 is used to input the casting model to be designed into the initial strategy model trained by the training module 200 to generate candidate design schemes; generate a comprehensive reward signal for each candidate design scheme based on a dual reward mechanism, and use the comprehensive reward signal to continuously optimize the initial strategy model to obtain an optimized strategy model;

[0120] The output module 400 is used to acquire the optimization strategy model generated by the optimization module 300, input the target casting model into the optimization strategy model, generate the action sequence of the target casting model through the optimization strategy model, drive the three-dimensional computer-aided design software to execute the action sequence of the target casting model, and obtain the mold cavity model and the gating system assembly model.

[0121] This invention also provides a gating system and mold cavity design device that combines imitation and reinforcement learning, comprising:

[0122] The device includes a memory and at least one processor, wherein the memory stores instructions; at least one processor invokes the instructions in the memory to control the imitation and reinforcement learning collaborative gating system and mold cavity design device provided in the embodiments of the present invention to execute the imitation and reinforcement learning collaborative gating system and mold cavity design method provided in any of the above embodiments.

[0123] The present invention also provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the gating system and mold cavity design method for imitation and reinforcement learning collaboration as provided in any of the above embodiments.

[0124] This invention provides a method and system for designing a gating system and mold cavity using a combination of imitation and reinforcement learning. First, by parsing historical casting design datasets into structured action triples and extracting multi-dimensional state features, this invention transforms implicit engineer experience into quantifiable and reusable training samples. This avoids the limitations of traditional methods where experience transmission relies on individuals and is difficult to standardize, significantly reducing the dependence on continuous intervention from domain experts. Second, based on the action-state training sample set, this invention obtains an initial strategy model after behavioral cloning training, which possesses the ability to adapt to the dimensional compensation rules and gating module layout strategies for different types of castings. The system's initial generalization capability enables it to quickly provide reasonable candidate design solutions when faced with new casting models that have never been seen before, eliminating the need for manual design from scratch. During the continuous optimization phase, a dual-reward mechanism that integrates manual and simulation reward signals ensures that the optimization strategy model considers both the rationality of engineering experience and the objective evaluation of physical simulation. These two types of signals complement each other, effectively overcoming the problems of high subjectivity and low efficiency associated with relying solely on manual review, and neglecting process feasibility when relying solely on simulation evaluation. This ensures that the final mold cavity model and gating system assembly model reliably meet key quality indicators such as shrinkage rate and filling integrity. Furthermore, for structures with significant differences in wall thickness in castings, the introduction of a cold wax core hard constraint injection mechanism and a human-machine collaborative fine-tuning step further guarantees the safety baseline of the design results under special process requirements. The system can also continuously update itself with each user modification, allowing its design capabilities to grow over time.

[0125] The following example, using the gating system and mold cavity design of a hollow guide vane casting for a certain type of gas turbine, further illustrates the specific implementation of the gating system and mold cavity design method provided by the present invention, which combines imitation and reinforcement learning.

[0126] Implementation Example

[0127] This implementation example uses the design of the gating system and mold cavity of a hollow guide vane casting for a gas turbine as an example. The hollow guide vane casting for a gas turbine has a complex structure, with significant differences in wall thickness in areas such as the rim plate, blade body, and damping platform. The ratio of the maximum wall thickness to the minimum wall thickness exceeds 3:1, and the shrinkage behavior of each area varies greatly during solidification. Traditional design methods rely on engineers' experience and multiple trial moldings for correction, with a single-piece design cycle typically exceeding two weeks. This implementation example uses the gating system and mold cavity design method based on the collaborative approach of imitation learning and reinforcement learning provided in the above embodiments of the present invention to design this casting. The specific design process is as follows:

[0128] In the imitation learning phase: This implementation example collects 10 historical hollow guide vane casting design cases. Each casting design case includes the original casting model (.stp format), the operation log automatically generated by the engineer when completing the design in UG NX software, and the final model of the mold cavity and gating system after modification, forming 10 sets of design triplet datasets.

[0129] Subsequently, natural language processing and operation sequence analysis were performed on the 10 sets of operation logs, reconstructing the underlying event flow in the operation logs into a sequence of action triples related to features. Taking the size compensation operation of the flange area as an example, the three consecutive underlying events in the operation log, "select the upper surface of the flange, input offset distance 0.3, confirm", were merged and reconstructed into a structured action triple, recording the features of the operated object, the operation type (surface displacement), and the corresponding parameter vector; the overall scaling operation was also reconstructed into an action triple containing the three-axis scaling coefficient; the riser addition operation was reconstructed into an action triple containing the riser size and placement coordinates. After processing the operation logs of the above 10 casting design cases, an action sequence set was output.

[0130] In addition, this implementation example extracts state features from 10 original casting models. Specifically, global geometric features and local hot spot region features are extracted from each original casting model. Combined with the extracted topological adjacency relationship features and process constraint features, a state feature set corresponding to the action sequence set is formed.

[0131] For global geometric features, the casting volume, projected area of ​​the three views, maximum wall thickness, minimum wall thickness, average wall thickness, length, width, and height dimensions, and deep cavity markings are extracted. For local hot spot region features, areas with a wall thickness exceeding 10mm, such as the junction of the blade and the flange, and the root of the damping platform, are marked as candidate hot spot regions, and the thickness, curvature, distance from the boundary, and hot spot coefficient of each region are extracted. For topological adjacency relationship features, a region adjacency graph and a gating module connection graph are constructed and encoded into an adjacency matrix. For process constraint features, the minimum draft angle in each draft direction is calculated and the cold wax core trigger threshold is output. The above four types of features are concatenated to form a complete state feature vector, which is then paired with the action sequence set according to time steps to obtain the action-state training sample set.

[0132] Subsequently, using the state feature vectors from the action-state training sample set as input and the action triples as supervision labels, the policy network is trained by behavior cloning by minimizing the negative log-likelihood loss function. After training is completed and convergence is verified, the policy network parameters are solidified, resulting in the initial policy model. After this stage, the initial policy model has learned the scaling factor rules of different regions such as the flange, blade, and damping platform, as well as the riser placement strategy in the hot spot region.

[0133] In the reinforcement learning phase: Using a new hollow guide vane model as input, 30 candidate design schemes are generated in batches from the initial strategy model. Each candidate design scheme includes mold cavity size compensation parameters and gating system module layout parameters. A comprehensive reward signal is generated for each candidate design scheme based on a dual reward mechanism, and the optimized strategy model is obtained as follows:

[0134] Regarding the artificial reward signal, the casting engineer reviews each of the 30 candidate design schemes: positive reward values ​​are assigned to schemes with reasonable riser placement, gating direction conforming to process specifications, and compensation parameters within the empirical range; negative reward values ​​are assigned to schemes with missing risers, incorrect gating connections, or compensation parameters that deviate significantly from the reasonable range; intermediate reward values ​​are assigned to schemes that are generally reasonable but require fine-tuning of local parameters, and the revision difference is recorded as a new action-state sample and added to the training sample set.

[0135] Regarding the simulation reward signal, 30 candidate design schemes were imported into ProCAST to simulate the filling process and solidification process. Four quality indicators were extracted from the simulation results: shrinkage rate, filling integrity, temperature gradient penalty term, and defect risk index. After normalization, they were weighted and summed according to the weight coefficients to obtain the simulation reward signal for each scheme.

[0136] The artificial reward signal and the simulated reward signal were then weighted and fused using a balance coefficient, and a process complexity penalty term, quantified by the total number of modules and the size compensation modification, was subtracted to obtain the comprehensive reward signal. Based on the comprehensive reward signal, the parameters of the initial strategy model were updated using the PPO algorithm. After three rounds of iteration, the strategy network converged, resulting in an optimized strategy model. The corresponding scheme reduced the porosity to below 5% in the ProCAST simulation.

[0137] In the application generation phase: Users upload a new blade STP model, and the system automatically extracts the global geometric features, local hot spot region features, topological adjacency relationship features, and process constraint features of the new blade STP model to form a current state feature vector, which is then input into the optimization strategy model. The optimization strategy model sequentially outputs the mold cavity size compensation action subsequence and the gating system design action subsequence, with the entire output process completed within 3 minutes.

[0138] Regarding the compensation results for the mold cavity dimensions, the overall scaling factors were determined to be 1.4% in the Z direction, 1.7% in the X direction, and 1.8% in the Y direction. The surface displacement compensation result for the local hot spot area was a local thickening of 0.3mm on the upper edge plate surface. For the gating system design, one central injection pipe (ZZG-1 type) was arranged at the top, a serpentine runner (JD-1 type) was used, and a trapezoidal riser (MK-1 type) was used. The above parameters were sequentially processed by the CAD kernel through geometric transformations, feature additions, and Boolean operations, outputting a 3D model of the mold cavity and an assembly model of the gating system. Actual casting verification showed that the casting dimensions were qualified and the metallurgical quality met the drawing requirements.

[0139] Compared to existing data-driven artificial intelligence methods, this invention integrates imitation learning and reinforcement learning to automatically extract implicit process rules and design operation logic from historical design data. It eliminates the need for a direct end-to-end mapping between the 3D model of the casting and the mold cavity and gating system, fundamentally avoiding the dependence of purely data-driven methods on massive training data, ultra-high computing power, and strong 3D feature extraction capabilities. This makes it more feasible in actual casting production scenarios. Furthermore, this invention transforms engineers' implicit operational experience into quantifiable action-state training samples through behavioral cloning training, enabling the strategy network to possess preliminary design generalization capabilities. Based on this, a dual fusion mechanism of manual reward signals and simulation reward signals ensures that the strategy network is simultaneously constrained by the rationality of engineering experience and the objectivity of physical simulation during continuous optimization. Compared to existing simulation verification methods that can only passively verify manually completed solutions, this invention achieves active closed-loop optimization from solution generation to quality evaluation. Furthermore, for structures with significant differences in wall thickness and complex distribution of hot spots in castings (such as hollow guide vanes of gas turbines), this invention can output differentiated scaling compensation coefficients and riser arrangement strategies for different regions such as the flange, blade body, and damping platform. The design results show that the shrinkage rate can be reduced to below 5% in simulation verification. Moreover, the entire process from user uploading of casting model to outputting complete mold cavity model and gating system assembly model can be completed within a few minutes, which significantly reduces the design cycle compared to the traditional design method of multiple mold trials.

[0140] Overall, this invention achieves automation and intelligence in casting mold design by combining imitation learning with a dual-reward reinforcement learning mechanism. The design scheme provided by this invention effectively inherits the experience of historical experts and continuously optimizes the model through simulation and human feedback, significantly improving design efficiency and solution quality while reducing defect risks. Simultaneously, the system supports continuous iterative updates, enabling it to adapt to new design requirements and solving the problems of traditional design relying on manual labor, long cycles, and unstable quality.

[0141] While the embodiments disclosed in this invention are as described above, they are merely illustrative of the embodiments to facilitate understanding of the invention and are not intended to limit the invention. Any person skilled in the art to which this invention pertains may make any modifications and variations in the form and details of the implementation without departing from the spirit and scope disclosed herein; however, the scope of patent protection for this invention shall still be determined by the scope defined in the appended claims.

Claims

1. A method of casting system and mold cavity design emulating reinforcement learning, characterized in that, include: Step 1: Use historical casting design dataset for imitation learning. Perform semantic parsing and action reconstruction on the historical casting design dataset to obtain an action-state training sample set. Step 2: Input the action-state training sample set into the policy network, and perform behavior cloning training on the policy network through a supervised learning algorithm to obtain the initial policy model; Step 3: Input the casting model to be designed into the initial strategy model to generate candidate design schemes; A comprehensive reward signal is generated for each candidate design scheme based on a dual reward mechanism, and the comprehensive reward signal is used to continuously optimize the initial strategy model to obtain an optimized strategy model. Step 4: Input the target casting model into the optimization strategy model, generate the action sequence of the target casting model from the optimization strategy model, and drive the three-dimensional computer-aided design software to execute the action sequence of the target casting model to obtain the mold cavity model and the gating system assembly model. The construction method of the historical casting design dataset in step 1 includes: Step 11: Collect multiple sets of casting design cases. Each set of casting design cases includes the original casting model, the operation log of the 3D modeling software, and the modified final model, forming a design triplet dataset. Step 12: Perform natural language processing and operation sequence analysis on the operation log to reconstruct the underlying events in the operation log into action triples related to features, thereby obtaining an action sequence set; wherein, each action triple is represented in a structured form of object features, operation type, and parameter vector; Step 13: Extract state features from the original casting model of each casting design case to form a state feature vector corresponding to each time step in the action sequence set, thus obtaining the state feature set corresponding to the action sequence set. Step 14: Pair and associate the action sequence set with the state feature set to obtain the action-state training sample set; The dual reward mechanism in step 3 includes: a manual reward mechanism and a simulation reward mechanism; the comprehensive reward signal generated for each candidate design scheme based on the dual reward mechanism in step 3 to obtain the optimization strategy model includes: Step 31: The candidate design schemes are reviewed and determined manually. When a candidate design scheme is qualified, a positive reward value is assigned; when a candidate design scheme is unqualified, a negative reward value is assigned, thus forming a manual reward signal. Step 32: Simulate the filling process and solidification process of the candidate design scheme using casting simulation software, extract multiple quality indicators from the simulation results, perform weighted calculation on the extracted multiple quality indicators, and generate simulation reward signals. Step 33: Merge the artificial reward signal and the simulated reward signal according to the weighting coefficients, and introduce a process complexity penalty term to obtain a comprehensive reward signal; Step 34: Based on the comprehensive reward signal, continuously optimize the initial policy model using the policy gradient algorithm to obtain an optimized policy model.

2. The gating system and mold cavity design method based on the synergy of imitation and reinforcement learning as described in claim 1, characterized in that, Step 12 includes: By performing natural language processing on the operation log files, the text fields in the operation logs are mapped to a predefined process operation dictionary to identify the operation intent corresponding to each underlying event in the operation logs. Subsequently, operation sequence analysis is performed to merge multiple underlying events that are temporally consecutive and semantically belong to the same design action into an action triple. The structured form of each action triple is as follows: ,in, The characteristics of the object being operated on For operation type, This is the parameter vector corresponding to the operation, which is the amount of data in the operation; After processing in step 12, the operation logs of each casting design case are output as an ordered sequence of action triples. The action triple sequences of multiple casting design cases together constitute an action sequence set.

3. The gating system and mold cavity design method based on the synergy of imitation and reinforcement learning as described in claim 1, characterized in that, In step 13, the state features extracted from each original casting model include four types of features: global geometric features, local hot spot region features, topological adjacency relationship features, and process constraint features. After extraction, the four types of features are spliced ​​together to obtain a complete state feature vector, and a state feature set is constructed based on the state feature vectors of multiple time steps.

4. The gating system and mold cavity design method based on the synergy of imitation and reinforcement learning as described in claim 3, characterized in that, The extraction of state features in step 13 includes: Global geometric features: Perform geometric calculations on the original casting model to extract the total volume, projected area of ​​the three views, maximum wall thickness, minimum wall thickness, average wall thickness, typical radius, length, width and height dimensions of the casting. Then, use a deep cavity detection algorithm to mark the areas in the original casting model whose depth-to-diameter ratio exceeds a preset threshold and output the deep cavity marking vector. Local hot spot region characteristics: Hot spot regions are identified in the original casting model, and regions with wall thickness exceeding the cold wax core triggering threshold are marked as candidate hot spot regions; for each candidate hot spot region, the region thickness, surface curvature, shortest distance from the casting boundary and hot spot coefficient are extracted. Based on the topological adjacency relationship characteristics, a regional adjacency graph is constructed. Using each geometric region of the casting as a node and the shared boundary surface between regions as an edge, a gating module connection graph is constructed to record the connection topology between risers, gating channels, and inlet pipes. The structure of both graphs is encoded as feature vectors in the form of adjacency matrices. The process constraint features are used to calculate the minimum draft angle in each draft direction of the casting, and the region with a wall thickness exceeding the cold wax core trigger threshold is placed in the feature vector, and the cold wax core trigger threshold marker vector is output.

5. The gating system and mold cavity design method based on the synergy of imitation and reinforcement learning according to claim 1, characterized in that, Step 14 includes: The casting design case number and time step index are paired one by one. The state feature vector of the same casting design case at the same time step is associated with the corresponding action triplet as a training sample pair. All training sample pairs are summarized to obtain the action-state training sample set.

6. The gating system and mold cavity design method based on the synergy of imitation and reinforcement learning according to claim 1, characterized in that, Step 2 includes: Step 21: Using the state feature set in the action-state training sample set as input and the corresponding action sequence set as supervision labels, construct a policy network training task; Step 22: Based on the constructed policy network training task, the network parameters of the policy network are iteratively updated by minimizing the negative log-likelihood loss function; the negative log-likelihood loss function is expressed as the negative value of the expected log probability of the policy network output probability distribution on the action-state training sample set. Step 23: Perform convergence verification on the trained policy network, solidify the policy network parameters after successful verification, and obtain the initial policy model.

7. The gating system and mold cavity design method based on the synergy of imitation and reinforcement learning according to claim 1, characterized in that, Step 32 includes: Each candidate design scheme is input into the casting simulation software. The software performs filling process simulation and solidification process simulation for each candidate design scheme. Four quality indicators are extracted from the simulation results: shrinkage rate, filling integrity, temperature gradient penalty term and defect risk index. The four quality indicators are normalized so that the values ​​of each quality indicator are uniformly mapped to the [0,1] interval. Then, they are multiplied by the corresponding weight coefficients and summed to obtain the simulation reward signal of each candidate design scheme.

8. The gating system and mold cavity design method based on the synergy of imitation and reinforcement learning according to claim 1, characterized in that, Step 33 includes: Upon receiving artificial reward signals With simulated reward signal Then, the two types of reward signals are weighted and fused using a balance coefficient α, and then the result is subtracted by a penalty coefficient. The adjusted process complexity penalty term C yields the comprehensive reward signal, expressed as: 。 9. The gating system and mold cavity design method based on the synergy of imitation and reinforcement learning according to claim 1, characterized in that, Step 34 includes: Collect action sequence data and corresponding comprehensive reward signals R generated by the current policy model on multiple candidate design schemes, and calculate the ratio of the output probability of each action under the old and new policy models. The ratio is limited to a reasonable range by truncation. The output probability under the new policy model. This represents the output probability under the old policy model. With the goal of maximizing the expected reward after truncation, parameter updates are continuously performed in multiple rounds. In each round, candidate design schemes are regenerated, dual reward signals are collected, the comprehensive reward signal R is calculated, and the parameters θ of the policy network are updated until the comprehensive reward signal R of the policy network on the validation set converges, thus obtaining the optimized policy model.

10. The gating system and mold cavity design method based on the synergy of imitation and reinforcement learning according to claim 1, characterized in that, The action sequence of the target casting model in step 4 includes: The mold cavity size compensation action subsequence includes: the action of determining the overall scaling coefficient of the casting in each direction, and the action of compensating for the surface displacement of the local hot spot area; The design sequence of the gating system includes: determining the number of risers, riser type, riser size, riser placement location, gating runner direction, gating runner cross-sectional shape, gating runner and riser connection method, and determining the location of the inlet pipe and gating runner interface parameters.

11. The gating system and mold cavity design method based on imitation and reinforcement learning collaboration according to claim 10, characterized in that, Step 4 includes: After receiving the target casting model input by the user, the first step is to extract features from the target casting model, calculate the global geometric feature vector and the local hot spot region feature vector, and then concatenate them to form the current state. The current state is then input into the optimization strategy model, which generates and outputs the mold cavity size compensation action subsequence and the gating system design action subsequence in sequence according to the current state. The generated action sequence is input into the 3D computer-aided design software, which then performs geometric transformations, feature additions, and Boolean operations sequentially according to the parameters in the action sequence, ultimately outputting the mold cavity model and the gating system assembly model.

12. The gating system and mold cavity design method based on the synergy of imitation and reinforcement learning according to claim 1, characterized in that, Before step 4, the method further includes: hard constraint injection; the hard constraint injection includes: Local areas in the target casting model whose wall thickness exceeds a preset threshold are detected. Local areas that meet the conditions are marked as candidate areas for cold wax cores. The marking information of the candidate areas for cold wax cores is embedded as a constraint condition into the state input of the optimization strategy model. The optimization strategy model, in combination with the comprehensive reward signal, decides the final placement scheme of the cold wax core.

13. The gating system and mold cavity design method based on the synergy of imitation and reinforcement learning according to claim 1, characterized in that, Step 4 is followed by: Step 5: Receive user modification operations on the mold cavity model and gating system assembly model, record the user's modification operations as new action-state samples, and add them to the action-state training sample set for continuous updates of the optimization strategy model for the next round of behavior cloning and reinforcement learning.

14. A gating system and mold cavity design system that combines imitation and reinforcement learning, characterized in that, The gating system and mold cavity design system executes the gating system and mold cavity design method of any one of claims 1 to 13 through various functional modules, wherein the functional modules of the system include: an analysis module, a training module, an optimization module, and an output module; The parsing module is used to perform imitation learning using a historical casting design dataset, and to perform semantic parsing and action reconstruction on the historical casting design dataset to obtain an action-state training sample set; The training module is used to perform behavior cloning training on the policy network based on the action-state training sample set obtained by the parsing module, and to obtain an initial policy model. The optimization module is used to input the casting model to be designed into the initial strategy model trained by the training module to generate candidate design schemes; based on the dual reward mechanism, a comprehensive reward signal is generated for each candidate design scheme, and the comprehensive reward signal is used to continuously optimize the initial strategy model to obtain an optimized strategy model; The output module is used to obtain the optimization strategy model generated by the optimization module, input the target casting model into the optimization strategy model, generate the action sequence of the target casting model through the optimization strategy model, drive the three-dimensional computer-aided design software to execute the action sequence of the target casting model, and obtain the mold cavity model and the gating system assembly model.

15. A gating system and mold cavity design device that combines imitation and reinforcement learning, characterized in that, include: A memory and at least one processor, wherein the memory stores instructions; At least one of the processors controls the imitation and reinforcement learning collaborative gating system and mold cavity design device to execute the imitation and reinforcement learning collaborative gating system and mold cavity design method as described in any one of claims 1 to 13 by calling the instructions in the memory.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed by a processor, implement a gating system and mold cavity design method based on imitation and reinforcement learning as described in any one of claims 1 to 13.

Citation Information

Patent Citations

  • Intelligent replenishment decision-making method based on reinforcement learning and imitation learning and storage medium

    CN114781724A

  • Water pump shell casting optimization method based on reinforcement learning

    CN121598791A