Methods, devices, equipment, storage media, and products for optimizing CNC machining processes.

By combining large language models and predictive models, the CNC machining process is automatically optimized, solving the problem of parts not conforming due to misunderstandings of customer requirements and realizing efficient generation of process solutions.

CN118364943BActive Publication Date: 2025-10-28SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410456049.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-16
Publication Date
2025-10-28
Estimated Expiration
2044-04-16

AI Technical Summary

Technical Problem

In existing CNC machining processes, relying on experience to process parts can easily lead to misunderstandings of customer needs, resulting in parts that fail to meet customer preferences.

Method used

By acquiring users' process quality requirements, quantitative processing is performed using a pre-set large language model, combined with a pre-set prediction model and a scoring model, and the process scheme is optimized until the model converges to output the optimal solution.

Benefits of technology

It enables automatic optimization of CNC machining processes based on customer needs, ensuring that part quality meets customer preferences and improving the adaptability and precision of machining quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118364943B_ABST
    Figure CN118364943B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, equipment, storage medium, and product for optimizing CNC machining processes. The method includes the following steps: obtaining the user's process quality requirements; quantifying the process quality requirements based on a preset large language model to obtain quantified process data to be input into the model; inputting the quantified process data into a preset prediction model, performing prediction processing on the quantified process data based on the preset prediction model, and outputting a process solution; scoring the process solution based on the process quality requirements, and adjusting the cumulative reward of the preset prediction model based on the obtained scoring results, until the preset prediction model converges and outputs the optimal process solution. This application enables the process solution output by the model to meet the user's process quality requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of CNC machining technology, and in particular to a method, apparatus, equipment, storage medium, and computer program product for optimizing CNC machining processes. Background Technology

[0002] In existing CNC machining process optimization methods, clear numerical requirements are usually required as optimization targets. However, in reality, customers often only want the machining quality of CNC parts to reach a certain level without clear numerical requirements or quality standards. This leads to people having to rely on experience to process the parts. If the customer's needs are misunderstood or not understood at all, the parts produced during the CNC machining process will not meet the customer's needs and preferences. Summary of the Invention

[0003] The main purpose of this application is to provide a method, apparatus, equipment, storage medium, and computer program product for optimizing CNC machining processes. It aims to solve the technical problem in related technologies where parts are processed based on experience, and if the customer's needs are misunderstood or completely misunderstood, the parts produced during CNC machining will not meet the customer's needs and preferences.

[0004] To achieve the above objectives, embodiments of this application provide a method for optimizing CNC machining processes, the method comprising:

[0005] Obtain the user's process quality requirements;

[0006] Based on a pre-defined large language model, the process quality requirements are quantified to obtain quantified process data to be input into the model.

[0007] The quantified process data is input into a preset prediction model, and based on the preset prediction model, the quantified process data is processed for prediction, and a process plan is output.

[0008] Based on the process quality requirements, the process scheme is scored, and the cumulative reward of the preset prediction model is adjusted according to the scoring results until the preset prediction model converges and the optimal process scheme is output.

[0009] In one possible implementation of this application, the step of scoring the process scheme based on the process quality requirements and adjusting the cumulative reward of the preset prediction model based on the obtained scoring results until the preset prediction model converges and outputs the optimal process scheme includes:

[0010] Based on a preset scoring model, the process quality requirements are scored according to the process scheme to obtain the scoring results;

[0011] The scoring result is used as a feedback signal and input to a preset feedback function. The current adjustment strategy and the old adjustment strategy corresponding to the scoring result are weighted and summed to output the optimized process scheme.

[0012] The preset prediction model outputs the optimal process solution after the preset return function converges.

[0013] In one possible implementation of this application, the step of scoring the process quality requirements based on the process scheme according to the preset scoring model and obtaining the scoring result includes:

[0014] Based on a preset scoring model, the process scheme is feature extracted through an attention mechanism to obtain text feature data;

[0015] The text feature data is input into a fully connected layer, and the fully connected layer is used to predict the score of the text feature data to obtain the score result.

[0016] In one possible implementation of this application, the step of performing predictive processing on the quantified process data based on the preset prediction model and outputting a process plan includes:

[0017] Based on the preset prediction model, the features of the quantified process data are extracted to obtain the first feature data;

[0018] The first feature data is input into each neural network layer and the fully connected layer for prediction processing, and the process plan is output.

[0019] In one possible implementation of this application, the loss function of the preset prediction model is calculated using a policy gradient algorithm, wherein the loss function formula is expressed as:

[0020]

[0021] Where, φ t (θ) is the ratio of the current process scheme to the optimization scheme of the previous iteration. It is an estimate of the advantage function, and ε is a hyperparameter that controls the range of allowable ratios in the target.

[0022] In one possible implementation of this application, the step of quantifying the process quality requirements based on a preset large language model to obtain quantified process data to be input into the model includes:

[0023] Based on a pre-defined large language model, the text data corresponding to the process quality requirements is expanded to obtain the requirement text data.

[0024] The required text data is vectorized to obtain the quantized process data to be input into the model.

[0025] This application also provides a CNC machining process optimization device, the CNC machining process optimization device comprising:

[0026] The acquisition module is used to acquire the user's process quality requirements;

[0027] The quantization processing module is used to quantify the process quality requirements based on a preset large language model to obtain quantified process data to be input into the model.

[0028] The prediction processing module is used to input the quantified process data into a preset prediction model, perform prediction processing on the quantified process data based on the preset prediction model, and output a process plan.

[0029] The output module is used to score the process scheme based on the process quality requirements, and adjust the cumulative reward of the preset prediction model based on the obtained scoring results until the preset prediction model converges and outputs the optimal process scheme.

[0030] This application also provides a CNC machining process optimization device, which is a physical node device. The CNC machining process optimization device includes: a memory, a processor, and a program of the CNC machining process optimization method stored in the memory and executable on the processor. When the program of the CNC machining process optimization method is executed by the processor, it can implement the steps of the CNC machining process optimization method as described above.

[0031] To achieve the above objectives, a storage medium is also provided, wherein a CNC machining process optimization program is stored on the storage medium, and when the CNC machining process optimization program is executed by a processor, the steps of any of the CNC machining process optimization methods described above are implemented.

[0032] In addition, to achieve the above objectives, the present invention also provides a computer program product, the computer program product including a CNC machining process optimization program, which, when executed by a processor, implements the steps of the CNC machining process optimization method as described above.

[0033] This application provides a method, apparatus, equipment, storage medium, and computer program product for optimizing CNC machining processes. Compared with related technologies that rely solely on experience to process parts, where misunderstandings or complete lack of understanding of customer needs can lead to parts produced during CNC machining failing to meet customer preferences, this application obtains the user's process quality requirements and quantifies these requirements using a preset large language model. This yields quantified process data that can be used to output a model. A preset prediction model then predicts and processes this quantified process data to determine the corresponding process execution plan. The process plan is scored, and the cumulative reward of the preset prediction model is adjusted based on the scoring results. This continuously optimizes the process plan output by the preset prediction model until it converges, resulting in the optimal process plan that maximizes the satisfaction of the user's quality requirements for the machined parts. Attached Figure Description

[0034] Figure 1 This is a flowchart illustrating the first embodiment of the CNC machining process optimization method of this application;

[0035] Figure 2 This is a schematic diagram of the overall execution flow of the CNC machining process optimization method in this application;

[0036] Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of this application;

[0037] Figure 4 This is a detailed flowchart of step S40 in the second embodiment of the CNC machining process optimization method of this application;

[0038] Figure 5 This is a schematic diagram of the device structure involved in the CNC machining process optimization method of this application. Detailed Implementation

[0039] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0040] This application provides a method for optimizing CNC machining processes. In the first embodiment of this method, refer to... Figure 1 The method includes the following steps:

[0041] Step S10: Obtain the user's process quality requirements;

[0042] It should be noted that the CNC machining process optimization method can be applied to the CNC machining process optimization device, which belongs to the CNC machining process optimization system, and the CNC machining process optimization system belongs to the CNC machining process optimization equipment.

[0043] It should be noted that the main body executing this method is a CNC machining process optimization system. This system includes a client and a model processing module. The client is the control terminal corresponding to the user, used to receive the user's process quality requirements. Then, the model processing module converts the process quality requirements into quantitative text data corresponding to the quality standards. Then, the quantitative text data is processed by a deep learning model to predict and output multiple process execution strategies or process schemes. Then, it is scored by a preset large language model and a preset scoring model. Based on the scoring results, the process scheme generated by the deep learning model is continuously optimized until the model converges and the optimal process scheme that meets the user's requirements is obtained.

[0044] It should be noted that process quality requirements can be the quality requirements proposed when processing parts to a certain level. For example, the parts to be processed may be round, square, or of a certain length, but there are no specific numerical requirements.

[0045] It's important to understand that the core of CNC process optimization lies in optimizing process parameters, tool orientation, and machining resources. In practice, two main methods are employed: knowledge-driven and heuristic optimization. Knowledge-driven methods are based on long-term human machining practices and experience, extracting rules from these rules regarding cutting formation mechanisms, heat dissipation mechanisms, and tool wear mechanisms, and transforming them into knowledge representations. These empirical rules can be used to guide the optimization of process parameters and tool orientation, making the resulting process optimization scheme highly interpretable. The advantage of knowledge-driven methods is that they can fully utilize the experiential knowledge of human experts, providing rationality and reliability for machining. However, knowledge-driven methods also have some drawbacks. First, they rely on the experience of human experts, and therefore may be limited by the experts' subjective cognition and personal preferences. Second, knowledge-driven methods typically require significant time and resources to collect, organize, and extract expert knowledge, which may increase the cost and complexity of process optimization. Furthermore, knowledge-driven methods may not fully leverage the advantages of technologies such as big data and machine learning, resulting in limited effectiveness when facing complex and diverse machining needs.

[0046] In contrast, heuristic algorithms focus more on using computer algorithms for process optimization. These algorithms possess powerful global optimum approximation capabilities and multi-objective, multi-constraint handling capabilities, thus finding widespread application in practice. Heuristic algorithms can find the optimal combination of process parameters to achieve specific processing goals through search and optimization algorithms. Compared to knowledge-driven methods, heuristic algorithms are more flexible and adaptive, better able to adapt to different processing scenarios and requirements. Since heuristic algorithms rely on these complex models to evaluate and optimize process parameters, model construction is crucial to the algorithm's performance and effectiveness. If the model cannot accurately capture the relationship between customer needs and part properties, the algorithm may produce erroneous results or fail to find a suitable solution. Furthermore, building such models typically requires a large amount of data and expertise, and often necessitates in-depth analysis and understanding of different processing scenarios and requirements, which increases the complexity and challenge of model construction.

[0047] Step S20: Based on the preset large language model, the process quality requirements are quantified to obtain the quantified process data to be input into the model.

[0048] It should be noted that the default large language model is a deep learning model trained on massive amounts of text data. It is mainly used to convert user-proposed process quality requirements into natural language text, and can also deeply understand the meaning of the text and handle various natural language tasks, such as text summarization, question answering, and translation.

[0049] It should be noted that the quantified process data is the data obtained after the large language model transforms the process quality requirements. For example, the diameter of the part is 5mm and the length is 6cm. After the user's requirements are converted into fixed standard data, the quantified process data is then processed by a deep learning model to generate the corresponding process plan.

[0050] The step S20, which quantifies the process quality requirements based on a preset large language model to obtain quantified process data to be input into the model, includes:

[0051] Step S21: Based on the preset large language model, expand the text data corresponding to the process quality requirements to obtain the requirement text data;

[0052] It should be noted that after receiving the user's process quality requirements through the client, the process quality requirements are expanded using a large language model to gain a deeper understanding of the meaning of the text data, thereby obtaining the expanded requirement text data.

[0053] Step S22: Perform vector conversion on the required text data to obtain the quantitative process data of the model to be input.

[0054] It should be noted that the requirement text data is converted into text vectors to obtain the quantitative process data to be input into the model.

[0055] Specifically, the method for converting requirement text data into text vectors can be:

[0056] Converting textual information from a large model into a numerical representation can be achieved using the word embedding technique Word2Vec, which transforms words into dense vectors. The loss function of the Word2Vec network based on Continuous Bag of Words (CBOW) is:

[0057]

[0058] Where Vcontext is a vector of context words, representing the vector representation of the context words input to the model. wtarget For the target word w target The output vector is the parameter representing the target word learned during model training.

[0059] Step S30: Input the quantified process data into a preset prediction model, perform prediction processing on the quantified process data based on the preset prediction model, and output a process scheme.

[0060] It should be noted that the preset prediction model is a deep learning model. The input data to the preset prediction model is the initial data. The pre-defined parts are the state space, action space, and reward function. When generating the process scheme, the agent is trained through the PPO algorithm so that the model can select the optimal action in a given state, thereby maximizing the cumulative reward.

[0061] Unlike ordinary single-policy generative deep learning models, this model introduces a generator. The policy distribution is generated by sampling from this distribution. Policies sampled from this distribution have better flexibility, exploratory nature, adaptability, and ability to cope with uncertainty. The pre-training process of the model includes the training process of the RL (Reinforcement Learning) model and the training process of the policy generation network. The generator learns how to generate better policies based on the behavior and rewards of the reinforcement learning agent.

[0062] It should be noted that the creation process for the preset prediction model is as follows:

[0063] 1.1 State representation s t = <W t ,T t C t>: The state at each time t can include the current workpiece Wh and tool state Th (i.e., workpiece material, size, shape, and tool wear), and the environmental conditions Ch during the machining process (i.e., temperature, humidity, coolant flow rate and pressure).

[0064] 1.2 Motion space design {at}, where a∈Rh (h is the dimension of the motion variable): the design of a needs to take into account the actual situation and operability of different CNC equipment. These actions include the adjustment of process parameters, whether to change tools, and whether to reposition the workpiece. Each time step t will change a according to the state.

[0065] 1.3 Hard Reward Function Design: A hard reward function is designed to evaluate the effect of the agent's actions. The reward function includes measurable indicators, such as reduced processing time, improved processing accuracy, and extended tool life. Since the process optimization process also needs to satisfy constraint g... i (a), therefore, the reward function is expressed as follows:

[0066] r(s t ,a t )=-B T [max{0,g t (a t )}] 2 , t=1,...,T

[0067] r{(s0,a0),...,(s t ,a t ),...,(s T ,a T )}=B L ×HV(F(a0,...,a T ),J(θ))

[0068] Where r(s) t ,a t To ensure timely feedback, the primary consideration in timely feedback is whether the action violates constraints. Actions that violate constraints will be assigned a coefficient of B. T The punishment. r{(s0,a0),...,(s t ,a t ),...,(s T ,a T )} is the coefficient B L The long-term reward is due to the fact that indicators such as processing time and accuracy can only be calculated under strategy J(θ) after one iteration round, thus generating a long-term reward at the end of the round. Furthermore, since the process evaluation index is multi-objective, i.e., F = {F1,2,3,…}, the hypervolume(·) function is needed to convert the objective vector into a scalar for calculation.

[0069] It should be noted that after the quantitative process data is input into the preset prediction model, the preset prediction model performs prediction processing on the quantitative process data and outputs a process plan. At this time, there can be multiple process plans.

[0070] The step S30, which involves performing predictive processing on the quantified process data based on the preset prediction model and outputting a process plan, includes:

[0071] Step S31: Based on the preset prediction model, extract the features of the quantified process data to obtain the first feature data;

[0072] It should be noted that the first feature data is the data after feature transformation of the quantized process data, which is convenient for subsequent network layers to perform prediction processing.

[0073] Step S32: Input the first feature data into each neural network layer and the fully connected layer for prediction processing, and output the process plan.

[0074] It should be noted that after processing through multiple neural network layers of the model, various process schemes or process execution strategies are output.

[0075] Step S40: Based on the process quality requirements, score the process scheme, and adjust the cumulative reward of the preset prediction model according to the obtained score results until the preset prediction model converges and outputs the optimal process scheme.

[0076] It should be noted that the scoring process can involve comparing the output process solutions with the process quality requirements, and then scoring each process solution. Each process solution corresponds to a scoring result.

[0077] It should be noted that since the scoring results of the model are biased and only have a certain reference value, the obtained scoring results need to be output to the preset prediction model again. By continuously weighting and summing the currently generated process strategy / process scheme with the previous process strategy, and then outputting a new process scheme, the optimal process scheme that meets the user's needs can be obtained after the model converges.

[0078] It should be noted that the overall execution flowchart of this application is as follows: Figure 2 As shown, by Figure 2Therefore, after receiving the customer's quality requirement description, the requirement is expanded through the large language model and then output to the scoring model. The state space, action space and reward function of the preset prediction model are created. Then, multiple process solutions are output. The process solutions are evaluated through the large model and the scoring model. The reward function of the preset prediction model is adjusted using the corresponding scoring results to maximize the cumulative reward until the optimal process solution is output.

[0079] This application provides a method, apparatus, equipment, storage medium, and computer program product for optimizing CNC machining processes. Compared with related technologies that rely solely on experience to process parts, where misunderstandings or complete lack of understanding of customer needs can lead to parts produced during CNC machining failing to meet customer preferences, this application obtains the user's process quality requirements and quantifies these requirements using a preset large language model. This yields quantified process data that can be used to output a model. A preset prediction model then predicts and processes this quantified process data to determine the corresponding process execution plan. The process plan is scored, and the cumulative reward of the preset prediction model is adjusted based on the scoring results. This continuously optimizes the process plan output by the preset prediction model until it converges, resulting in the optimal process plan that maximizes the satisfaction of the user's quality requirements for the machined parts.

[0080] Furthermore, referring to Figure 4 Based on the first embodiment of this application, another embodiment of this application is provided. In this embodiment, the step S40 of scoring the process scheme based on the process quality requirements and adjusting the cumulative reward of the preset prediction model based on the obtained scoring results until the preset prediction model converges and outputs the optimal process scheme includes:

[0081] Step S41: Based on the preset scoring model, score the process quality requirements according to the process scheme to obtain the scoring results;

[0082] It should be noted that the preset scoring model is a network model based on deep reinforcement learning. The preset scoring model also includes a neural network of a large language model, which is used to identify the process plan and the process quality requirements sent by the user, and then compare the two to obtain the scoring result.

[0083] It should be noted that the score can be 50, 60, 80, etc., and there is no specific limit.

[0084] Step S42: Input the scoring result as a feedback signal into a preset feedback function, perform a weighted summation of the current adjustment strategy and the old adjustment strategy corresponding to the scoring result, and output the optimized process scheme.

[0085] It should be noted that the preset reward function is expressed as follows:

[0086] r(s t ,a t )=-B T [max{0,g t (a t )}] 2 , t=1,...,T

[0087] r{(s0,a0),...,(s t ,a t ),...,(s T ,a T )}=B L ×HV(F(a0,...,a T ),J(θ))

[0088] Where r(s) t ,a t To ensure timely feedback, the primary consideration in timely feedback is whether the action violates constraints. Actions that violate constraints will be assigned a coefficient of B. T The punishment. r{(s0,a0),...,(s t ,a t ),...,(s T ,a T )} is the coefficient B L The long-term reward is due to the fact that indicators such as processing time and accuracy can only be calculated under strategy J(θ) after one iteration round, thus generating a long-term reward at the end of the round. Furthermore, since the process evaluation index is multi-objective, i.e., F = {F1,2,3,…}, the hypervolume(·) function is needed to convert the objective vector into a scalar for calculation.

[0089] It should be noted that the weighted summation of the current adjustment strategy and the old adjustment strategy corresponding to the scoring result can be achieved by using the scoring result as part of the reward function, and weighting it with other factors considered during the training of the preset prediction model (such as processing time, processing accuracy, etc.) using a weighted method (weights are Bs and BL) to construct the final reward signal.

[0090] r{(s0,a0),...,(s t ,a t ),...,(s T ,a T )}=B S LLM Score +B L ×HV(F(a0,...,a T ),J(θ))

[0091] The model's agent adjusts its strategy based on this reward signal to maximize the cumulative reward, thereby outputting the final process solution result.

[0092] Step S43: After the preset return function converges, the preset prediction model outputs the optimal process scheme.

[0093] It should be noted that after the reward function converges, the process scheme output by the model will no longer change, thus obtaining the optimal process scheme.

[0094] The step S41, which involves scoring the process quality requirements based on the process scheme according to a preset scoring model to obtain the scoring result, includes:

[0095] Based on a preset scoring model, the process scheme is feature extracted through an attention mechanism to obtain text feature data;

[0096] The text feature data is input into a fully connected layer, and the fully connected layer is used to predict the score of the text feature data to obtain the score result.

[0097] It should be noted that the process scheme can be scored using a preset scoring model in the following ways:

[0098] A CNN model is used to extract features from the text representation to capture local features and patterns. An attention mechanism is introduced at this stage to enable the model to focus on important parts of the input text.

[0099] The extracted text features are input into the output layer, and the model predicts scores through forward propagation. The output layer is typically a fully connected layer, and the loss function used during training is the difference between the predicted and actual scores.

[0100] In this embodiment, combining hard rewards and scored rewards allows for a more comprehensive and integrated solution by taking into account both environmental feedback and information from the scoring model. This approach balances the advantages and disadvantages of both types of rewards, enabling the agent to consider both direct environmental feedback and the predictive power of the scoring model during the decision-making process, thereby improving the accuracy and robustness of the decision.

[0101] Furthermore, based on the first and second embodiments of this application, another embodiment of this application is provided. In this embodiment, the loss function of the preset prediction model is calculated using a policy gradient algorithm, wherein the loss function formula is expressed as:

[0102]

[0103] Where, φ t(θ) is the ratio of the current process scheme to the optimization scheme of the previous iteration. It is an estimate of the advantage function, and ε is a hyperparameter that controls the range of allowable ratios in the target.

[0104] It should be noted that the reward function of the preset prediction model is proxied using a policy gradient algorithm. Unlike ordinary single-policy RL, a generator is introduced to improve policy diversity. The goal is to generate a policy distribution from which policies sampled exhibit greater flexibility, exploratory nature, adaptability, and the ability to cope with uncertainty. Therefore, the RL pre-training process encompasses both the RL training process and the policy generation network training process. The generator learns how to generate better policies based on the behavior and rewards of the reinforcement learning agent. The agent learns through interaction with the environment, continuously trying different actions and adjusting its policy and generator performance based on feedback reward signals, gradually improving the quality and efficiency of decision-making.

[0105] It should be noted that the generator's policy network (parameterized as) The loss function is:

[0106]

[0107] In this embodiment, a generator is introduced to generate policy distributions, thereby providing more policy options and increasing the flexibility and robustness of learning. This approach has potential advantages when dealing with diverse and complex problems.

[0108] Reference Figure 3 , Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of this application.

[0109] like Figure 3 As shown, the CNC machining process optimization equipment may include: a processor 1001, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the processor 1001 and the memory 1005.

[0110] Optionally, the CNC machining process optimization equipment may also include a user interface, a network interface, a camera, RF (Radio Frequency) circuitry, sensors, a WiFi module, etc. The user interface may include a display screen and an input submodule such as a keyboard; optional user interfaces may also include standard wired or wireless interfaces. The network interface may include standard wired or wireless interfaces (such as a Wi-Fi interface).

[0111] Those skilled in the art will understand that Figure 3The structure of the CNC machining process optimization equipment shown in the figure does not constitute a limitation on the CNC machining process optimization equipment. It may include more or fewer parts than shown, or combine certain parts, or have different part arrangements.

[0112] like Figure 3 As shown, the memory 1005, serving as a storage medium, may include an operating system, a network communication module, and a CNC machining process optimization program. The operating system is a program that manages and controls the hardware and software resources of the CNC machining process optimization equipment, supporting the operation of the CNC machining process optimization program and other software and / or programs. The network communication module is used to enable communication between the various components within the memory 1005, as well as communication with other hardware and software in the CNC machining process optimization system.

[0113] exist Figure 3 In the CNC machining process optimization equipment shown, the processor 1001 is used to execute the CNC machining process optimization program stored in the memory 1005 to implement the steps of the CNC machining process optimization method described above.

[0114] The specific implementation method of the CNC machining process optimization equipment in this application is basically the same as the embodiments of the above-mentioned CNC machining process optimization method, and will not be repeated here.

[0115] Furthermore, this invention also proposes a computer program product, including a CNC machining process optimization program, which, when executed by a processor, implements the steps of the CNC machining process optimization method described above.

[0116] The specific implementation of the computer program product of the present invention is basically the same as the embodiments of the above-described CNC machining process optimization method, and will not be repeated here.

[0117] This application also provides a CNC machining process optimization device, referring to... Figure 5 The CNC machining process optimization device includes:

[0118] The acquisition module is used to acquire the user's process quality requirements;

[0119] The quantization processing module is used to quantify the process quality requirements based on a preset large language model to obtain quantified process data to be input into the model.

[0120] The prediction processing module is used to input the quantified process data into a preset prediction model, perform prediction processing on the quantified process data based on the preset prediction model, and output a process plan.

[0121] The output module is used to score the process scheme based on the process quality requirements, and adjust the cumulative reward of the preset prediction model based on the obtained scoring results until the preset prediction model converges and outputs the optimal process scheme.

[0122] In one possible implementation of this application, the output module includes:

[0123] The scoring unit is used to score the process quality requirements based on the process scheme according to the preset scoring model, and obtain the scoring results;

[0124] The weighted summation unit is used to input the scoring result as a feedback signal into a preset feedback function, perform a weighted summation on the current adjustment strategy and the old adjustment strategy corresponding to the scoring result, and output the optimized process scheme.

[0125] The output unit is used to output the optimal process scheme by the preset prediction model after the preset return function converges.

[0126] In one possible implementation of this application, the scoring unit includes:

[0127] The feature extraction subunit is used to extract features from the process scheme based on a preset scoring model and through an attention mechanism to obtain text feature data;

[0128] The scoring prediction subunit is used to input the text feature data into the fully connected layer and perform scoring prediction on the text feature data through the fully connected layer to obtain the scoring result.

[0129] In one possible implementation of this application, the prediction processing module includes:

[0130] An extraction unit is used to extract features from the quantified process data based on the preset prediction model to obtain first feature data;

[0131] The prediction processing unit is used to input the first feature data into each neural network layer and the fully connected layer for prediction processing and output the process plan.

[0132] In one possible implementation of this application, the quantization processing module includes:

[0133] The expansion unit is used to expand the text data corresponding to the process quality requirements based on a preset large language model to obtain the requirement text data.

[0134] The conversion unit is used to perform vector conversion on the required text data to obtain the quantized process data of the model to be input.

[0135] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0136] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0137] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0138] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for optimizing CNC machining processes, characterized in that, The CNC machining process optimization method includes the following steps: Obtain the user's process quality requirements; Based on a pre-defined large language model, the process quality requirements are quantified to obtain quantified process data to be input into the model. The quantified process data is input into a preset prediction model, and based on the preset prediction model, the quantified process data is processed for prediction, and a process plan is output. Based on a preset scoring model, the process quality requirements are scored according to the process scheme to obtain the scoring results; The scoring result is used as a feedback signal and input to a preset feedback function. The current adjustment strategy and the old adjustment strategy corresponding to the scoring result are weighted and summed to output the optimized process scheme. The preset prediction model outputs the optimal process solution after the preset return function converges.

2. The CNC machining process optimization method as described in claim 1, characterized in that, The step of scoring the process quality requirements based on the process scheme according to the preset scoring model and obtaining the scoring result includes: Based on a preset scoring model, the process scheme is feature extracted through an attention mechanism to obtain text feature data; The text feature data is input into a fully connected layer, and the fully connected layer is used to predict the score of the text feature data to obtain the score result.

3. The CNC machining process optimization method as described in claim 1, characterized in that, The step of performing predictive processing on the quantified process data based on the preset prediction model and outputting a process plan includes: Based on the preset prediction model, the features of the quantified process data are extracted to obtain the first feature data; The first feature data is input into each neural network layer and the fully connected layer for prediction processing, and the process plan is output.

4. The CNC machining process optimization method as described in claim 1, characterized in that, The loss function of the preset prediction model is calculated using the policy gradient algorithm, and the formula for the loss function is as follows: in, It is the ratio of the current process scheme to the optimization scheme of the previous iteration. It is an estimate of the dominance function. It is a hyperparameter that controls the range of allowed ratios in the target.

5. The CNC machining process optimization method as described in claim 1, characterized in that, The step of quantifying the process quality requirements based on a preset large language model to obtain quantified process data to be input into the model includes: Based on a pre-defined large language model, the text data corresponding to the process quality requirements is expanded to obtain the requirement text data. The required text data is vectorized to obtain the quantized process data to be input into the model.

6. A CNC machining process optimization device, characterized in that, The CNC machining process optimization device includes: The acquisition module is used to acquire the user's process quality requirements; The quantization processing module is used to quantify the process quality requirements based on a preset large language model to obtain quantified process data to be input into the model. The prediction processing module is used to input the quantified process data into a preset prediction model, perform prediction processing on the quantified process data based on the preset prediction model, and output a process plan. Output module, the output module includes: The scoring unit is used to score the process quality requirements based on the process scheme according to the preset scoring model, and obtain the scoring results; The weighted summation unit is used to input the scoring result as a feedback signal into a preset feedback function, perform a weighted summation on the current adjustment strategy and the old adjustment strategy corresponding to the scoring result, and output the optimized process scheme. The output unit is used to output the optimal process scheme by the preset prediction model after the preset return function converges.

7. A CNC machining process optimization device, characterized in that, The device includes: a memory, a processor, and a CNC machining process optimization program stored in the memory and executable on the processor, the CNC machining process optimization program being configured to implement the steps of the CNC machining process optimization method as described in any one of claims 1 to 5.

8. A computer storage medium, characterized in that, The computer storage medium stores a CNC machining process optimization program, which, when executed by a processor, implements the steps of the CNC machining process optimization method as described in any one of claims 1 to 5.

9. A computer program product, characterized in that, The computer program product includes a CNC machining process optimization program, which, when executed by a processor, implements the steps of the CNC machining process optimization method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Spray drying process optimization method based on mechanism model and deep reinforcement learning

    CN116585728A

  • Manufacturing process technological parameter optimization method and system based on reinforcement learning

    CN117420800A