Injection molding parameter optimization method, device and equipment for earphone mold

By collecting and analyzing the temperature and pressure data of the headphone mold in real time, combining topological feature analysis and reinforcement learning optimization controller, the precise adjustment of the injection molding parameters of the headphone mold is achieved, solving the problem of product quality fluctuations under traditional methods, and improving the stability and efficiency of the injection molding process.

CN120056394AInactive Publication Date: 2025-05-30SHENZHEN JINGSHI YANNENG TECH CO LTD
View PDF 0 Cites 6 Cited by

Patent Information

Application Number
CN202510181487.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-19
Publication Date
2025-05-30
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional injection molding parameter control methods are difficult to cope with the coupling influence of complex and variable injection molding environment and process parameters, resulting in large fluctuations in product quality of headphone shells.

Method used

Using real-time feedback and parameter fine-tuning mechanism, the heating power and injection pressure data in the earphone mold cavity are collected, dynamic analysis and topological characteristic analysis are carried out, and the injection process parameter model is constructed, and the heating power and injection pressure are adjusted in real time through an optimized controller combined with a dual Q network and an actor-critic network.

Benefits of technology

It realizes accurate description of the dynamic characteristics of the injection molding process, overcomes the limitations of traditional physical models when dealing with complex geometric structures, improves the modeling accuracy of nonlinear dynamic processes, reduces the uncertainty of manual empirical parameter adjustment, and ensures the consistency of product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120056394A_ABST
    Figure CN120056394A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of deep learning, and discloses an earphone mold injection molding parameter optimization method, device and equipment, and the method comprises the steps: collecting temperature distribution data and mold cavity pressure data in an earphone mold cavity, and carrying out earphone shell injection molding dynamic analysis to obtain an earphone shell material flow curve; carrying out topological characteristic analysis on the earphone shell material flow curve, and constructing an earphone shell injection molding process parameter model; based on the earphone shell injection molding process parameter model, the mold cavity temperature and the mold cavity pressure serve as state variables, the heating power and the injection pressure serve as control variables, and an earphone shell injection molding optimization controller is constructed; the earphone shell injection molding optimization controller is connected with the injection molding machine control system, the heating power and the injection pressure of the earphone mold are adjusted in real time, the optimal technological parameters of the earphone mold are solved, a real-time feedback and parameter fine adjustment mechanism is adopted, the injection molding machine control system can quickly respond to technological fluctuation, and the consistency of product quality is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of deep learning technology, and particularly to an injection parameter optimization method, device, and equipment for headphone molds. Background Art

[0002] In the headphone manufacturing industry, injection molding is a key process for producing headphone housings. With the continuous improvement of consumers' requirements for headphone appearance and quality, the control accuracy of parameters in the injection molding process directly affects the qualified rate of products. Traditional injection parameter control methods mainly rely on the experience of operators for adjustment, and it is difficult to cope with the complex and changeable injection environment and the coupled influence of process parameters, resulting in large fluctuations in product quality.

[0003] Currently, in industrial production, injection process parameter optimization methods based on physical models are generally adopted. These methods describe the injection process by establishing a material flow model and a heat conduction equation. However, due to the complex structure of the headphone housing, the temperature distribution and pressure distribution in the mold cavity show strong non-linear characteristics. Traditional physical models are difficult to accurately describe the flow behavior of materials in the mold, especially when the mold temperature and injection pressure change rapidly, the prediction accuracy of existing models significantly decreases. Summary of the Invention

[0004] This application provides an injection parameter optimization method, device, and equipment for headphone molds. This application adopts a real-time feedback and parameter fine-tuning mechanism, enabling the injection molding machine control system to quickly respond to process fluctuations and ensuring the consistency of product quality.

[0005] In the first aspect of this application, an injection parameter optimization method for a headphone mold is provided. The injection parameter optimization method for the headphone mold includes: Collect temperature distribution data and cavity pressure data in the headphone mold cavity, and perform dynamic analysis of headphone housing injection molding to obtain the headphone housing material flow curve; Conduct topological feature analysis on the headphone housing material flow curve to construct a headphone housing injection process parameter model; Based on the headphone housing injection process parameter model, taking the cavity temperature and cavity pressure as state variables and the heating power and injection pressure as control variables, construct a headphone housing injection optimization controller; Connect the headphone housing injection optimization controller to the injection molding machine control system, adjust the heating power and injection pressure of the headphone mold in real time, and solve the optimal process parameters of the headphone mold.

[0006] In the second aspect of this application, an injection parameter optimization device for a headphone mold is provided. The injection parameter optimization device for the headphone mold includes: A dynamic analysis module, configured to collect temperature distribution data and cavity pressure data inside the earphone mold cavity, and perform dynamic analysis on the injection molding of the earphone housing to obtain the material flow curve of the earphone housing; A feature analysis module, configured to perform topological feature analysis on the material flow curve of the earphone housing to construct an injection molding process parameter model for the earphone housing; A construction module, configured to construct an optimized injection molding controller for the earphone housing based on the injection molding process parameter model of the earphone housing, using the cavity temperature and cavity pressure as state variables and the heating power and injection pressure as control variables; A solution module, configured to connect the optimized injection molding controller of the earphone housing to the injection molding machine control system, adjust the heating power and injection pressure of the earphone mold in real time, and solve the optimal process parameters of the earphone mold.

[0007] A third aspect of the present application provides an electronic device, including: a memory and at least one processor, wherein instructions are stored in the memory; the at least one processor invokes the instructions in the memory to cause the electronic device to execute the above-mentioned injection molding parameter optimization method for the earphone mold.

[0008] Compared with the prior art, the present application has the following beneficial effects: By establishing the material flow curve of the earphone housing and topological feature analysis, an accurate description of the dynamic characteristics of the injection molding process is realized, overcoming the limitations of traditional physical models in dealing with complex geometric structures. The feature extraction method based on topological data analysis effectively captures the internal laws of process parameter changes, improving the modeling accuracy of non-linear dynamic processes. By constructing an optimized controller combining a double Q network and an actor-critic network, adaptive adjustment of injection molding parameters is realized, reducing the uncertainty of manual empirical parameter adjustment. Introducing the Markov decision process and the experience replay mechanism enables the control strategy to be continuously optimized and learned, ensuring the stability of control performance. The real-time feedback and parameter fine-tuning mechanism enables the control system to quickly respond to process fluctuations, ensuring the consistency of product quality. Description of the Drawings

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0010] The structures, proportions, sizes, etc. shown in the accompanying drawings of this specification are only used to cooperate with the content disclosed in the specification for those familiar with this technology to understand and read, and are not used to limit the conditions for the implementation of the present invention. Therefore, they do not have substantial technical significance. Any modification of the structure, change in the proportional relationship, or adjustment of the size, without affecting the efficacy that the present invention can produce and the purpose that can be achieved, should still fall within the scope covered by the technical content disclosed in the present invention.

[0011] Figure 1 is a schematic flow chart of a method for optimizing injection parameters of a headphone mold provided by an embodiment of the present invention; Figure 2 is a schematic structural block diagram of an apparatus for optimizing injection parameters of a headphone mold provided by an embodiment of the present invention; Figure 3 is a schematic structural block diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners

[0012] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0013] The flow chart shown in the accompanying drawings is only an example for illustration, and does not necessarily include all contents and operations / steps, nor does it necessarily execute in the described order. For example, some operations / steps can also be decomposed, combined, or partially merged. Therefore, the actual execution order may be changed according to the actual situation.

[0014] It should also be understood that the terms used in this specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this specification of the present application and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to include the plural forms.

[0015] It should also be further understood that the term " / and" as used in this specification of the present application and the appended claims refers to any combination and all possible combinations of one or more of the related listed items, and includes these combinations. Please refer to Figure 1 , an embodiment of the method for optimizing injection parameters of a headphone mold in an embodiment of the present application includes: Step 100, collect the temperature distribution data and cavity pressure data in the headphone mold cavity, and perform dynamic analysis on the injection molding of the headphone housing to obtain the material flow curve of the headphone housing; It can be understood that the execution subject of this application can be an injection parameter optimization device for a headphone mold, or it can also be a terminal or a server, and specifically, it is not limited here. In the embodiments of this application, the server is taken as an example of the execution subject for illustration.

[0016] Specifically, through high-precision temperature sensors and pressure sensors, the temperature distribution data and cavity pressure data inside the headphone mold cavity are collected. Three-dimensional spatial interpolation calculations are performed on the temperature distribution data and cavity pressure data inside the headphone mold cavity to construct continuous temperature field and pressure field models. Mathematical methods such as Kriging interpolation, spline interpolation, or inverse distance weighted interpolation are used to ensure that the data collected from discrete points can be converted into distribution functions within the entire cavity space, obtaining the cavity temperature field function and cavity pressure field function to describe the temperature and pressure distributions changing with time throughout the entire mold cavity. Gradient analysis is performed on the cavity temperature field function to calculate the temperature gradient field function. The temperature gradient reflects the heat transfer rate and direction in different regions of the mold cavity and is obtained by solving the spatial partial derivatives of the temperature field, i.e., ∇T = (∂T / ∂x, ∂T / ∂y, ∂T / ∂z), where T represents temperature, and x, y, z are spatial coordinates. The solution of the temperature gradient field function is numerically calculated using methods such as the finite difference method to ensure accuracy under complex geometric structures. At the same time, linear regression analysis is performed on the temperature gradient field function and the cavity pressure field function to establish the material flow coefficient function. The material flow coefficient function characterizes the flow characteristics of molten plastic under different temperature and pressure conditions and is obtained through experimental data fitting or derivation based on fluid mechanics theory. The fluidity of molten plastic is affected by temperature and pressure. Assuming that there is a certain linear relationship between its flow coefficient and the temperature gradient and pressure field, i.e., λ = a∇T + bP + c, where λ represents the material flow coefficient, ∇T is the temperature gradient, P is the cavity pressure, and a, b, c are regression coefficients, which are solved by the least squares method or other optimization methods. Through this regression model, the influence of temperature and pressure on the melt fluidity is quantified. Based on the material flow coefficient function, a heat energy transfer equation is established to describe the energy changes of molten plastic during the injection molding process. The heat energy transfer equation is based on the combination of the heat conduction equation and the heat convection equation, i.e., ρCp(∂T / ∂t + v·∇T) = k∇²T + Q, where ρ is the material density, Cp is the specific heat capacity, T is the temperature, t is the time, v is the fluid velocity, k is the thermal conductivity, and Q represents the external heat source term, such as the energy input provided by a heater. This equation describes the heat transfer situation of the material in the mold and is numerically solved in combination with boundary conditions, such as heat exchange on the cavity wall surface and the influence of cooling channels. To obtain the flow velocity of the material, the heat energy transfer equation is converted into a system of differential equations to solve for the velocity components of the fluid. The flow of molten plastic is regarded as unsteady, viscous flow, and its dynamic behavior is described by the Navier-Stokes equation, i.e., ρ(∂v / ∂t + v·∇v) = -∇P + μ∇²v + F, where v is the velocity field, P is the pressure, μ is the dynamic viscosity, and F is the external force term (such as gravity or shear force). Combining the energy conservation equation and the material flow coefficient function, this system of equations is solved by the finite element method or the finite volume method to obtain the material flow velocity field.Calculate the filling state of the mold cavity according to the material flow velocity field, that is, determine the filling process and distribution of the molten plastic in the mold cavity. By tracking the position of the flow front and combining numerical integration methods, simulate the filling trajectory of the material over time after it enters the mold cavity from the injection port. At the same time, consider the geometric constraint conditions of the mold cavity, that is, the fluid flow must conform to the shape and size limitations of the mold cavity and is restricted by the resistance and shear forces inside the mold cavity. By introducing these constraints in the flow simulation, ensure that the calculated filling state conforms to the actual production situation and can effectively predict the defects that occur, such as flow dead corners, weld lines, and insufficient filling. After completing the above calculations, combine the flow velocity field and filling state analysis to draw the flow curve of the headphone housing material, describing the flow path, flow velocity change, and filling trend of the material during the injection molding process.

[0017] Step 200: Conduct a topological feature analysis on the flow curve of the headphone housing material and construct an injection molding process parameter model for the headphone housing; Specifically, the sliding time window sampling technique is used to segment the material flow curve of the headphone housing, splitting the entire injection molding process into multiple consecutive time segments, each corresponding to a specific flow state. Through this step, a set of topological feature sequences are obtained, which contain the topological structure information of the flow curve at different time points. Calculate the zero-order Betti number and the first-order Betti number at each time point in the topological feature sequence to obtain the set of topological invariants of the injection molding process. The zero-order Betti number represents the number of connected components and reflects the filling state of the material in the mold cavity, that is, the degree of independence of different molten regions, while the first-order Betti number represents the number of closed loops and reflects the cavities, flow dead ends or unfilled regions formed during the material flow process. When calculating these topological invariants, the persistent homology method of calculating topological structures, such as the Vietoris-Rips complex or Čech complex based on algebraic topology, is used to ensure that the obtained topological invariants can accurately describe the material flow state of the headphone housing. Organize the topological invariants at all time points into a set to form a topological description of the entire injection molding process. Calculate the cosine similarity between the features in the set of topological invariants to measure the topological structure similarity at different time points. The calculation of the cosine similarity depends on the angular relationship of the topological invariants in the high-dimensional space. By calculating the cosine value between each pair of topological invariant vectors, a topological feature distance matrix is constructed, and the elements of this matrix represent the topological similarity between different time points. For this matrix, singular value decomposition is used for dimensionality reduction to extract the most important feature patterns. Singular value decomposition can decompose the topological feature distance matrix into a linear combination of eigenvectors and screen out the main change patterns, thereby reducing the data dimension, removing redundant information, and at the same time retaining the main change trend of the topological structure. Perform a spatial orthogonal transformation on the dimensionality-reduced eigenvector group so that all eigenvectors are orthogonal to each other in the new coordinate system to avoid information redundancy. The spatial orthogonal transformation is completed by the principal component analysis or Gram-Schmidt orthogonalization method to obtain the standardized eigenbasis, so that each eigenbasis vector can independently describe an injection molding state pattern. Reconstruct the standardized eigenbasis into a state matrix according to the time series information to obtain the injection molding state feature matrix of the headphone housing. Each row of this state matrix corresponds to the topological state at a time point, and each column represents different feature patterns. Based on the injection molding state feature matrix of the headphone housing, an injection molding process parameter model of the headphone housing is constructed to establish the mapping relationship between the process parameters and the injection molding state features.

[0018] The injection molding state feature matrix of the earphone shell is segmented to more effectively capture the dynamic changes in the injection molding process. By segmenting the time dimension of the feature matrix, the target input sequence is obtained, which represents the state characteristics of the earphone shell material at different time points. The target input sequence is subjected to temporal feature extraction, and the short-term and long-term dependencies in the input sequence are obtained by adopting a recurrent neural network structure such as a long short-term memory network (LSTM) or a bidirectional LSTM, thereby capturing the key temporal features of the injection molding process. At the same time, the temporal association weight sequence is calculated by combining the multi-head attention mechanism. The attention mechanism assigns different weights to different time points, so that the model can pay more attention to the characteristics of the key time steps, thereby improving the prediction accuracy. By calculating the impact of each time step on the global state, a set of temporal association weight sequences are formed, which effectively measure the temporal dependencies and interactions of temperature, pressure and material flow states in the injection molding process. The temporal association weight sequence is input into the temperature prediction network, the pressure prediction network and the flow prediction network to establish independent prediction models for different process parameters. The input of each prediction network is the corresponding temporal association weight, and the network structure uses a deep learning model such as a multi-layer perceptron or a convolutional neural network to calculate the final prediction value. During the calculation process, the feature transformation is performed through the fully connected layer, so that the model learns the complex nonlinear relationship between different features and obtains the predicted data of cavity temperature distribution, injection pressure and material flow rate. The predicted data is statistically modeled, and the Gaussian mixture model is used to fit the probability density distribution of each process parameter. The Gaussian mixture model characterizes the complex data distribution with a weighted combination of multiple normal distributions, so as to more accurately describe the uncertainty in the injection molding process. The probability density of the predicted cavity temperature, injection pressure and material flow rate is estimated respectively, and their mean and variance are obtained to construct a multidimensional normal distribution, which contains the central trend of each process parameter and reflects the fluctuation range of the data. The multidimensional normal distribution is substituted into the log-likelihood function, and the gradient descent method is used for parameter optimization. The log-likelihood function is used to measure the goodness of fit of the model. Its optimization goal is to maximize the probability of the observed data under the current model parameters. The parameters of the temperature prediction network, pressure prediction network and flow prediction network are continuously adjusted by the gradient descent method so that they can minimize the loss function, thereby improving the accuracy of the prediction. During the optimization process, an adaptive learning rate optimization algorithm, such as Adam, is combined to accelerate convergence and avoid local optimal solutions. At the same time, regularization technology is used to prevent the model from overfitting, so that it can maintain a high generalization ability under different injection molding conditions. Through the above steps, the headphone shell injection molding process parameter model for predicting mold cavity temperature, injection pressure and material flow rate is obtained.

[0019] Step 300: Based on the earphone shell injection molding process parameter model, the mold cavity temperature and mold cavity pressure are used as state variables, and the heating power and injection pressure are used as control variables to construct an earphone shell injection molding optimization controller;It should be noted that the predicted data of the headphone housing injection molding process parameter model is mapped into the state space to construct a state vector containing the cavity temperature and cavity pressure. The establishment of the state vector is achieved by extracting features from the predicted data, converting the continuous temperature and pressure data into a low-dimensional state representation for subsequent control optimization. At the same time, the value ranges of the heating power and injection pressure are discretized to form a set of discrete control variables. A state transition function is established based on the state vector and control variables to describe the evolution relationship between different states. The establishment of the state transition function depends on the prediction ability of the headphone housing injection molding process parameter model, that is, given the current state and control variables, it predicts the state at the next moment. By inputting the current cavity temperature and cavity pressure and the corresponding control variables (heating power and injection pressure) into the process parameter model, the predicted values of the temperature, pressure, and other related parameters at the next moment are obtained, and these predicted values form the basis of the state transition function. Based on the product quality requirements of the headphone housing, a reward calculation function is designed. A loss function is defined, where the weighted sum of the temperature deviation, pressure deviation, and material flow velocity deviation is used as a penalty term to ensure that the ultimate optimization goal is to minimize the deviation of these key parameters. For example, if the target temperature and pressure are within a certain set range, this state should receive a higher reward, while if the deviation of a certain parameter is large, a larger penalty is imposed to prompt the optimization controller to optimize in the direction of more reasonable process parameter adjustment. The design of the reward calculation function uses a Gaussian distribution function, so that the situation of deviating from the target parameter range is more severely punished, thereby promoting the optimization convergence of the control strategy. Based on the constructed state transition function and reward calculation function, a Markov decision process model is generated. The Markov decision process is the basis of reinforcement learning optimization control, and it describes the entire decision-making process through the quadruple of state-action-reward-next state. In this model, the state vector represents the current process state of the headphone mold, the control variable represents the current heating power and injection pressure settings, the reward calculation function determines the quality of each decision, and the state transition function is responsible for predicting the state at the next moment. To make the optimization process more stable and efficient, an experience replay buffer is constructed to store and sample historical state transition data. During the reinforcement learning training process, the role of the experience replay buffer is to prevent the model from falling into local optima, while improving the diversity of training samples, thereby accelerating the learning speed and enhancing the generalization ability of the model. In the specific training process of the optimization control, trajectory sampling is performed on the state data and control data in the headphone housing injection molding control environment, and a double Q-network is used for reinforcement learning training. The double Q-network is an improved reinforcement learning method that reduces the bias of Q-value estimation through two independent Q-value networks, thereby improving the stability of learning.During the training process, the control trajectory is continuously sampled, the corresponding rewards are calculated, and the model is optimized based on the update rules of Q-learning, so that the finally trained injection molding optimization controller for the headphone housing can adaptively adjust the heating power and injection pressure under different process conditions to optimize the injection molding quality of the headphone housing.

[0020] Execute a random control strategy in the constructed injection molding control environment of the headphone housing to explore different state-action pairs, collect state transition sequences, and form initial trajectory data. The role of the random control strategy is to ensure the diversity of the sampled data, enabling the optimization controller to fully learn different state transition patterns during the training process and avoiding affecting the final optimization effect due to premature convergence to a suboptimal strategy. During this process, record the state data at each step, including the cavity temperature, cavity pressure, and the corresponding control variables, namely the heating power and injection pressure, to form a state transition trajectory. Based on the initial trajectory data, construct two deep neural networks with the same structure but independent parameters, namely Q1 and Q2. The double Q-network structure effectively reduces the overestimation bias problem in traditional Q-learning and improves the stability of training. Input each state-action pair into the Q1 and Q2 networks and calculate the Q-values respectively, which are used as the basis for evaluating the quality of the current control strategy. The core idea of the double Q-network is to use two different Q-networks to alternately update the target value, thus avoiding the over-optimistic estimation of certain state-action pairs by a single network during the training process. In each training iteration, one Q-network is used to select actions, while the other Q-network is used to calculate the target Q-value. The alternating update method can effectively suppress policy overfitting and improve the generalization ability of the final optimization controller. Calculate the target Q-value based on the double Q-network structure and generate a temporal difference objective function. The calculation of the target Q-value depends on the Bellman expectation equation, that is, optimize the current strategy by maximizing the future cumulative reward. To enhance the stability of training, adopt a soft update strategy to make the update process of the target Q-network smoother, thereby reducing gradient oscillations and improving the model convergence speed. Calculate the temporal difference error through the target Q-value. This error measures the deviation between the current Q-network estimated value and the target value and is used to update the network parameters, enabling the Q-network to more accurately approximate the optimal state value function. On this basis, construct an actor network and a critic network to optimize the action strategy and update the parameters through policy gradients. The actor network is used to generate control variables, that is, predict the optimal setting values of the heating power and injection pressure based on the current state, while the critic network is used to evaluate the quality of the actions output by the actor network and calculate the corresponding Q-values. During the training process, the goal of the actor network is to maximize the Q-value so that each decision can be optimally optimized from the perspective of long-term rewards, while the task of the critic network is to evaluate the actions selected by the actor and guide the actor network to continuously adjust the control strategy. To ensure the learnability of the strategy, adopt the deterministic policy gradient method to optimize the actor network and update the critic network in combination with the target Q-value, enabling the two to cooperate and optimize to improve the decision-making ability of the final controller. Perform backpropagation operations on the policy gradient vector and use the cross-entropy loss function to update the network weights, thereby optimizing the parameters of the double Q-network.The cross-entropy loss function can measure the gap between the policy output and the target Q-value, and continuously optimize the control policy by minimizing this loss function. During the backpropagation process, an adaptive gradient optimization algorithm (such as Adam or RMSprop) is combined to accelerate the convergence speed and ensure that problems such as gradient vanishing or gradient explosion can be avoided during the training process. To improve the stability of the model, an experience replay mechanism is adopted, that is, randomly sampling past trajectory data for learning in each training instead of directly using the latest sampled trajectory data, effectively reducing data correlation and enhancing the generalization ability of the model. After completing all training steps, the target double Q-network is encapsulated as an optimized controller for headphone housing injection molding. Based on the cavity temperature and cavity pressure data collected in real time, this optimized controller calculates the optimal heating power and injection pressure set values and generates corresponding adjustment instructions.

[0021] Step 400: Connect the optimized controller for headphone housing injection molding to the injection molding machine control system, adjust the heating power and injection pressure of the headphone mold in real time, and solve the optimal process parameters of the headphone mold.

[0022] Specifically, convert the cavity temperature and injection pressure adjustment instructions in the headphone housing injection optimization controller into standardized control instructions recognizable by the injection molding machine. Since there are differences in the control protocols adopted by different models of injection molding machines, design a general instruction mapping module. This module formats the adjustment data output by the optimization controller and converts it into the standard communication protocols supported by the injection molding machine, such as Modbus, OPC-UA, or the control signal format based on the CAN bus, to ensure that the control instructions can be accurately recognized and executed by the PLC (programmable logic controller) or industrial computer of the injection molding machine. Real-time collect the temperature distribution data and cavity pressure data in the headphone mold cavity to obtain the actual operating status of the current injection molding process, and perform digital filtering processing to remove high-frequency noise and outliers, obtaining process parameter feedback data. Execute the heating power adjustment amount and injection pressure adjustment amount in the standardized control instructions based on the process parameter feedback data. The heating power adjustment amount is used to control the electric heating system or the circulating water temperature control system of the cavity, while the injection pressure adjustment amount is used to adjust the pressure setting value of the injection molding machine screw or hydraulic system to optimize the filling process of the molten plastic. After executing these adjustment instructions, obtain the adjustment results of the injection molding process parameters, reflecting the actual temperature distribution, pressure status, and material flow under the current control strategy. Conduct parameter optimization analysis on the adjustment results of the injection molding process parameters, compare the current injection molding process status with the expected target value, and calculate the process parameter optimization direction through error analysis and trend prediction. For example, if the actually measured cavity temperature is lower than the target value, increase the heating power, and if the fluctuation amplitude of the cavity pressure is too large, adjust the injection pressure curve to improve stability. The determination of the process parameter optimization direction is based on various optimization methods, including gradient-based optimization methods (such as Newton's method or stochastic gradient descent) and reinforcement learning-based adaptive adjustment strategies, enabling the controller to automatically learn and optimize the parameter adjustment strategy. According to the calculated process parameter optimization direction, fine-tune the standardized control instructions and update the control strategy of the headphone housing injection optimization controller to ensure that the controller can continuously optimize its decision-making logic, making the process parameters tend to the optimal state. The optimization process is achieved through the policy gradient method in reinforcement learning, enabling the controller to continuously adjust the control strategy based on historical data to maximize product quality and minimize production fluctuations. When the optimization controller undergoes multiple rounds of adaptive adjustment, finally solve the optimal process parameters of the headphone mold. These optimal parameters include the cavity temperature target value and the injection pressure target value. The optimization controller outputs the optimal heating power target value and injection pressure target value according to the optimal process parameters of the headphone mold and sends these target values to the control system of the injection molding machine, enabling the injection molding machine to produce according to the optimal parameters.

[0023] In the embodiments of the present application, by establishing the material flow curve and topological feature analysis of the earphone housing, the accurate description of the dynamic characteristics of the injection molding process is realized, overcoming the limitations of traditional physical models in dealing with complex geometric structures. The feature extraction method based on topological data analysis is adopted to effectively capture the internal laws of process parameter changes and improve the modeling accuracy of the non-linear dynamic process. By constructing an optimization controller combining a double Q network and an actor-critic network, the adaptive adjustment of injection molding parameters is realized, reducing the uncertainty of manual empirical parameter adjustment. The introduction of the Markov decision process and the experience replay mechanism enables the control strategy to be continuously optimized and learned, ensuring the stability of the control performance. The real-time feedback and parameter fine-tuning mechanism are adopted to enable the control system to quickly respond to process fluctuations and ensure the consistency of product quality.

[0024] In a specific embodiment, the process of executing step 100 may specifically include the following steps: Perform three-dimensional spatial interpolation calculation on the temperature distribution data and cavity pressure data in the earphone mold cavity to obtain the cavity temperature field function and the cavity pressure field function; Perform gradient analysis on the cavity temperature field function to obtain the temperature gradient field function, and perform linear regression analysis on the temperature gradient field function and the cavity pressure field function to obtain the material flow coefficient function; Establish a heat energy transfer equation according to the material flow coefficient function to obtain the energy conservation equation of the injection molding process, and transform the energy conservation equation of the injection molding process into a differential equation system to solve the fluid velocity components to obtain the material flow velocity field; Calculate the cavity filling state according to the material flow velocity field. At the same time, combined with the geometric constraint conditions of the mold cavity, obtain the material flow curve of the earphone housing.

[0025] Specifically, high-precision temperature sensors and pressure sensors are arranged inside the mold cavity to collect the temperature and pressure data at each position in the mold cavity. The three-dimensional interpolation method is used to expand the data into a continuous distribution field of the entire mold cavity. The interpolation methods include the inverse distance weighted method, Kriging interpolation, and cubic spline interpolation. Let the temperature distribution data points in the mold cavity be , where is the coordinate of the measurement point, is the temperature value at this point, and the cavity temperature field function is constructed by the three-dimensional interpolation method:

[0026] Among them, is the interpolation weight function, which satisfies , and this function calculates the influence weight of each measurement point on the target position according to the spatial position. Similarly, the cavity pressure field function Interpolation calculations are performed by the same method to obtain a continuous cavity pressure distribution. For the cavity temperature field function Gradient analysis is carried out to calculate the temperature gradient field function. The temperature gradient describes the rate and direction of temperature change with space, and its mathematical expression is:

[0027] where is the material density, is the specific heat capacity, is the thermal conductivity, is the internal heat source term, such as the heat provided by an external heating system. This equation describes the change of temperature with time and space, and it is numerically solved by the finite element method or the finite difference method. The flow of molten plastic also needs to satisfy the conservation of momentum, that is, the Navier - Stokes equation:

[0028] where is the material flow velocity field, is the dynamic viscosity, represents the external force, such as gravity or shear force. Combining the energy conservation equation and the material flow coefficient function, the physical equations of the injection molding process are transformed into a system of differential equations, and the finite element method is used to solve the fluid velocity components to obtain the material flow velocity field:

[0029] This velocity field characterizes the movement trajectory of the molten plastic in the cavity and is used to simulate the filling process. The cavity filling state is calculated based on the material flow velocity field, that is, to determine the filling process and distribution of the molten plastic in the cavity. For example, in the injection molding process of a headphone housing, the molten plastic needs to fill the cavity evenly to avoid flow dead zones or unfilled areas. The filling state is obtained by solving the position function of the flow front where:

[0030] This equation describes how the flow front evolves with time. Combining the geometric constraint conditions of the mold cavity, such as the boundary conditions of the cavity wall and the runner design, the flow curve of the headphone housing material is finally obtained. By analyzing the flow curve, the injection molding parameters are optimized, such as adjusting the injection speed, mold temperature or pressure distribution, to ensure that the material can fill the cavity evenly and reduce defects such as weld lines, sink marks or air bubbles.

[0031] In this embodiment, when obtaining the material flow curve of the earphone housing and performing unified modeling of the mixed variables for the material flow curve of the earphone housing, it includes: classifying the variables of the material flow curve of the earphone housing, taking the mold cavity temperature field and pressure field as continuous variables, and taking the mold filling state and injection molding stage identifier as binary variables to obtain the mixed variable set of the injection molding process; constructing a low-dimensional mapping function of the probabilistic latent variable model, mapping the mixed variable set to a unified continuous latent space to obtain the initial distribution of the latent variables; constructing a Gaussian approximation function based on the initial distribution of the latent variables to parametrically represent the posterior distribution of the mixed variables and obtain the Gaussian approximation model of the latent variables; substituting the Gaussian approximation model of the latent variables into the expectation-maximization algorithm, iteratively optimizing the Gaussian distribution parameters and model parameters to obtain the unified representation of the mixed variables; calculating the conditional probability distributions of the continuous variables and binary variables according to the unified representation of the mixed variables to obtain the probability evaluation index of the injection molding state; performing anomaly detection and state evaluation on the probability evaluation index of the injection molding state, constructing the monitoring statistic of the injection molding process to obtain the real-time monitoring result of the injection molding state; correcting the material flow state based on the real-time monitoring result of the injection molding state, updating the dynamic characteristics of the material flow curve of the earphone housing to obtain the corrected material flow curve; inputting the corrected material flow curve into the topological feature analysis module for subsequent feature extraction and model construction.

[0032] In a specific embodiment, the process of executing step 200 may specifically include the following steps: Performing sliding time window sampling on the material flow curve of the earphone housing to obtain the topological feature sequence of the injection molding process; Calculating the zero-order Betti number and the first-order Betti number at each time point in the topological feature sequence to obtain the set of topological invariants of the injection molding process; Calculating the cosine similarity between the features in the set of topological invariants to obtain the topological feature distance matrix, and performing singular value decomposition on the topological feature distance matrix to obtain the reduced-dimensional feature vector group; Performing spatial orthogonal transformation on the reduced-dimensional feature vector group to obtain the standardized eigenbasis, and reconstructing the standardized eigenbasis into a state matrix according to the time sequence to obtain the injection molding state feature matrix of the earphone housing; Constructing an injection molding process parameter model for the earphone housing based on the injection molding state feature matrix of the earphone housing.

[0033] Specifically, the flow curve of the injection molding process is processed in a time series manner to facilitate the extraction of the topological features of the flow process. The material flow curve of the earphone housing is a three-dimensional curve, defined as , where respectively represent the three-dimensional position coordinates of the molten plastic in the mold cavity changing with time. In order to capture the topological evolution characteristics of the flow curve within different time windows, sliding time window sampling is performed on the curve, that is, a window size is selected on the time axis and slide along the time axis, intercepting the flow data within a time window each time, so that the time interval of the sampling points is defined as , obtaining flow sub-curves for multiple time periods:

[0034] Thus, it is ensured that the curve structure relied on for topological analysis has sufficient time resolution and can capture the material flow characteristics in different stages. Calculate the topological characteristics for the material flow pattern corresponding to each time window, that is, calculate the topological invariant Betti number. Topological invariants include the zero-order Betti number and the first-order Betti number , where represents the number of connected components of the flow curve within the current time window, and reflects the loop structure in the flow path. For example, if the material flow curve within a certain time window has multiple independent melting regions, then is larger, and if the molten plastic flow forms a closed loop, then will be greater than zero. The calculation of the Betti number is completed by the persistent homology method, that is, using the simplified Vietoris-Rips complex to construct the topological complexity of the flow curve and calculating the topological invariants at different scales. After obtaining the topological invariants, analyze their evolution patterns during the entire injection molding process, and calculate the cosine similarity between the features in the set of topological invariants to measure the similarity of the flow topological structures at different times. The cosine similarity is defined as follows:

[0035] where and represent the values of the topological invariants at time windows and respectively. By calculating the cosine similarity between all time windows, construct the topological feature distance matrix , where

[0036] Sim represents the topological distance between time windows and . Perform singular value decomposition on the topological feature distance matrix to extract the key dimensionality-reduced eigenvectors. The mathematical expression of singular value decomposition is:

[0037] where and are orthogonal matrices, is a diagonal matrix, and its diagonal elements are singular values. By selecting the eigenvectors corresponding to the larger singular values, the main topological feature patterns are extracted to form a reduced-dimensional feature vector group:

[0038] where and are the reduced-dimensional matrices after retaining the first singular values. Perform a spatial orthogonal transformation on the reduced-dimensional feature vector group to eliminate redundant information and ensure the independence between feature variables. The orthogonal transformation is completed by the Gram-Schmidt orthogonalization method, that is, for a set of eigenvectors , define a new set of orthogonal basis vectors such that:

[0039] where represents the inner product of the vectors and . Through the orthogonalization method, a set of standardized eigenbases is obtained. After obtaining the standardized eigenbases, rearrange the eigenvectors according to the temporal information to construct an injection molding state feature matrix of the earphone housing. This state feature matrix has time windows as rows and standardized eigenvectors as columns, and is expressed as follows:

[0040] where represents the th standardized topological feature of the th time window. This state feature matrix describes the topological evolution pattern of the earphone housing during the injection molding process. Based on the injection molding state feature matrix of the earphone housing, use machine learning methods to construct an injection molding process parameter model. For example, use a support vector machine (SVM) or a neural network for fitting so that the process parameters can be optimized and predicted. For example, train a regression model:

[0041] where represents the injection molding process parameters, such as cavity temperature, injection pressure, etc., is the learned non-linear mapping relationship, is the error term. Under the new injection molding process conditions, predict the optimal process parameters through the feature matrix to achieve intelligent optimization and stable control of the injection molding process.

[0042] In a specific embodiment, the process of constructing an injection molding process parameter model of the earphone housing based on the injection molding state feature matrix of the earphone housing may specifically include the following steps: Segment the injection molding state feature matrix of the earphone housing to obtain the target input sequence, and perform temporal feature extraction and multi-head attention calculation on the target input sequence to obtain the temporal correlation weight sequence of the injection molding process; Input the temporal correlation weight sequence into the temperature prediction network, pressure prediction network, and flow prediction network respectively, and calculate the independent prediction values of each process parameter through the fully connected layer to obtain the prediction data of the cavity temperature distribution, injection pressure, and material flow velocity; According to the prediction data and the Gaussian mixture model, fit the probability density of each process parameter to obtain a multi-dimensional normal distribution including the cavity temperature mean, injection pressure mean, material flow velocity mean, and their variances; Substitute the multi-dimensional normal distribution into the log-likelihood function, and optimize the network parameters of the temperature prediction network, pressure prediction network, and flow prediction network through the gradient descent method to obtain the earphone housing injection molding process parameter model for predicting the cavity temperature, injection pressure, and material flow velocity.

[0043] Specifically, perform temporal processing on the injection molding state feature matrix to capture the time evolution law of material flow. The injection molding state feature matrix of the earphone housing is represented with time windows as rows and different feature variables as columns as follows:

[0044] where, represents the th feature variable of the th time window. To enhance the temporal continuity of the data and capture long-term dependence relationships, segment the feature matrix, that is, take consecutive time windows on the time axis as an input sequence to form the target input sequence:

[0045] This target input sequence is used to characterize the dynamic evolution of the injection molding process in the time dimension and is input into the temporal feature extraction module. During the temporal feature extraction process, a long short-term memory network (LSTM) or gated recurrent unit (GRU) is used to extract the time series features. Let be the hidden state of the LSTM, be the current input feature, then the LSTM calculation is as follows:

[0046]

[0047]

[0048]

[0049]

[0050]

[0051] Among them, are the weight matrices of the forget gate, input gate, candidate memory unit, and output gate respectively, is the corresponding bias term, represents the sigmoid activation function, represents the hyperbolic tangent function, represents element-wise multiplication. To enhance the model's attention to key time steps, a multi-head attention mechanism is adopted, and its calculation formula is as follows:

[0052] Among them, are the query matrix, key matrix, and value matrix respectively, is the dimension of the key, and softmax normalization ensures the stability of the attention weights. The multi-head attention calculates a sequence of temporal correlation weights, which is used to measure the importance of different time windows for the current prediction. The sequence of temporal correlation weights is input into the temperature prediction network, pressure prediction network, and flow prediction network respectively to calculate the independent prediction values of each process parameter. Let be the parameters of the temperature, pressure, and flow prediction networks respectively, then the output of each network is calculated as follows:

[0053]

[0054]

[0055] Among them, represent the predicted mold cavity temperature distribution, injection pressure, and material flow velocity respectively. These prediction values are used for statistical modeling to describe the probability distribution of process parameters. To improve the robustness of the prediction, probability density modeling is performed on the prediction data, and a Gaussian mixture model is used to fit the distribution of process parameters. Let be any process parameter, then the probability density function of the Gaussian mixture model is expressed as follows:

[0056] Among them, is the weight of the th Gaussian component, is a Gaussian distribution with a mean of and a variance of , is the number of components of the Gaussian mixture model. The Gaussian mixture model is separately fitted for different process parameters to obtain the mold cavity temperature mean Sum of variances , mean injection pressure Sum of variances , and mean material flow rate Sum of variances , form a multi-dimensional normal distribution:

[0057] To optimize the parameters of the temperature prediction network, pressure prediction network, and flow prediction network, substitute this multi-dimensional normal distribution into the log-likelihood function and use the gradient descent method for optimization. The definition of the log-likelihood function is as follows:

[0058] where is the number of training samples, are the model parameters. The optimization process updates the network weights through the gradient descent algorithm:

[0059] where is the learning rate, is the gradient of the loss function with respect to the network parameters. Through continuous optimization, finally obtain the headphone housing injection molding process parameter model for predicting the cavity temperature, injection pressure, and material flow rate.

[0060] In this embodiment, the multi-dimensional normal distribution is substituted into the logarithmic likelihood function, and the network parameters of the temperature prediction network, the pressure prediction network, and the flow prediction network are optimized by the gradient descent method to obtain an injection molding process parameter model for predicting the cavity temperature, injection pressure, and material flow velocity of the earphone housing, including: establishing a fractional differential equation model for the temperature field function and pressure field function of the injection molding process, and introducing a fractional operator to describe the material flow characteristics to obtain a fractional state equation of the injection molding process; constructing a fractional extended Kalman filter based on the fractional state equation to perform online state estimation of the process parameters to obtain a fractional filter matrix; performing deep ensemble learning on the fractional filter matrix, extracting state features through multiple deep neural networks to obtain a deep feature vector of the process parameters; inputting the deep feature vector of the process parameters into a genetic algorithm, optimizing the parameters with the minimum prediction error as the objective function to obtain a fractional coefficient and a filtering gain; constructing an adaptive exponentially weighted function according to the fractional coefficient and the filtering gain to dynamically weight the prediction results to obtain an adaptive predicted value of the process parameters; performing residual analysis on the adaptive predicted value of the process parameters, constructing a prediction error compensation model to obtain a compensated predicted value of the process parameters; substituting the compensated predicted value of the process parameters into the temperature prediction network, the pressure prediction network, and the flow prediction network to update the network parameters to obtain an optimized process parameter prediction model; performing online parameter prediction based on the optimized process parameter prediction model to achieve dynamic tracking of the cavity temperature, injection pressure, and material flow velocity, and obtaining an injection molding process parameter model of the earphone housing.

[0061] In a specific embodiment, the process of executing step 300 may specifically include the following steps: Map the prediction data of the injection molding process parameter model of the earphone housing to the state space, construct a state vector including the cavity temperature and the cavity pressure, and discretize the value ranges of the heating power and the injection pressure to construct a control variable including the heating power and the injection pressure; Establish a state transition function according to the state vector and the control variable, input the current state and the control action into the injection molding process parameter model of the earphone housing, and obtain a predicted value of the next moment state; Based on the product quality requirements of the earphone housing, use the weighted sum of the temperature deviation, the pressure deviation, and the material flow velocity deviation as a penalty term to obtain a reward calculation function; Generate a Markov decision process model according to the state transition function and the reward calculation function, and construct an experience replay buffer according to the Markov decision process model to store and sample the historical state transition data to obtain an injection molding control environment for the earphone housing; Perform trajectory sampling and double Q-network training on the state data and control data in the injection molding control environment for the earphone housing to obtain an optimized controller for injection molding of the earphone housing.

[0062] Specifically, the predicted data of the process parameter model is mapped to the state space to construct a decision-making system for reinforcement learning optimization. The cavity temperature and cavity pressure of the headphone mold are the most critical state variables, directly affecting the flow behavior of the plastic melt and the final product quality. Let represent the cavity temperature, and represent the cavity pressure. Then the state vector at time

[0063] is defined as:

[0064] where and are the maximum allowable values of the heating power and injection pressure respectively. By this discretization method, the computational burden of the continuous control space is reduced, enabling the reinforcement learning algorithm to learn the optimal policy more efficiently. According to the state vector and control variables, a state transition function is established to describe how the cavity state of the headphone housing changes under different control actions. The state transition function is calculated through the headphone housing injection process parameter model, that is, given the current state and control action , the state at the next moment is predicted:

[0065] where is the state prediction function based on the injection process parameter model, is the prediction error, modeled as Gaussian noise . After the state transition function, a reward calculation function is constructed to measure the optimization objective under different process parameter combinations. The product quality of the headphone housing is mainly affected by the temperature deviation, pressure deviation, and material flow velocity deviation. Therefore, a comprehensive penalty term is defined:

[0066] where are the target temperature, target pressure, and target flow velocity respectively, is a hyperparameter used to control the weights of different error terms. The reward function is designed such that the model can minimize the deviation of process parameters and converge to an optimal combination of process parameters. Based on the state transition function and the reward calculation function, a Markov decision process model is generated and defined as , where is the state space, i.e., all possible combinations of mold cavity temperature and pressure; is the action space, i.e., all possible combinations of heating power and injection pressure; is the state transition probability, which describes the probability distribution of the next state given the current state and the control variable ; is the reward function, i.e., the weighted sum of the aforementioned temperature, pressure, and flow velocity deviations. To optimize this Markov decision process, historical experience is stored and utilized, and an experience replay buffer is constructed to store past state transition data. Whenever a control action is executed, an experience segment like is stored in the buffer for sampling during subsequent training processes. The role of experience replay is to break temporal correlations, enabling the reinforcement learning algorithm to learn from multiple different historical experiences rather than relying solely on the latest data, thereby improving the stability and generalization ability of the model. During the training phase of reinforcement learning, trajectory sampling is performed on the state data and control data in the headphone housing injection molding control environment, and a double Q-network is used for optimization. The double Q-network is an improved Q-learning method that uses two Q-networks and to update alternately to reduce the estimation bias. The calculation formula is as follows:

[0067] where is the discount factor, which is used to measure the contribution of future rewards. During the training process, the mean squared error loss function is used to optimize the network:

[0068] where is the target Q-value, which is calculated by the target network and updated regularly to improve the stability of training. After multiple training rounds, the headphone housing injection molding optimization controller learns the optimal heating power and injection pressure set values, keeping the mold cavity temperature and pressure stable within the optimal range.

[0069] Before performing trajectory sampling and Double Q-network training on the state data and control data in the headphone housing injection molding control environment, it further includes: taking the cavity temperature disturbance and pressure fluctuation in the headphone housing injection molding control environment as adversarial control inputs, constructing a zero-sum differential game model, and obtaining the game state equation of the injection molding process; constructing an adaptive dynamic programming network based on the game state equation, performing mapping transformation on the state vector and control variables, and obtaining an approximate optimal value function; performing online learning and training on the approximate optimal value function, evaluating the state value function based on the critic network, and obtaining the optimal control strategy for the injection molding process; setting control trigger conditions, constructing an event trigger function based on the cavity temperature deviation and pressure deviation, and obtaining an adaptive control trigger threshold; using the adaptive control trigger threshold to screen the control signal, and only updating the control instruction when the trigger condition is satisfied, to obtain a downsampled control sequence; constructing a self-triggered control mechanism based on the downsampled control sequence, dynamically adjusting the sampling period, and obtaining an optimized control resource allocation strategy; performing online estimation of the critic network weights according to the optimized control resource allocation strategy, using the Lyapunov stability analysis method, and obtaining the upper limit of the network weight estimation error; using the upper limit of the network weight estimation error as a constraint condition to correct the optimal control strategy for the injection molding process, and obtaining a robust injection molding parameter optimization strategy.

[0070] In a specific embodiment, the process of performing step of performing trajectory sampling and Double Q-network training on the state data and control data in the headphone housing injection molding control environment to obtain the headphone housing injection molding optimization controller may specifically include the following steps: Execute a random control strategy based on the headphone housing injection molding control environment, sample the state transition sequence, and obtain the initial trajectory data of the injection molding process; Construct two deep neural networks Q1 and Q2 with the same structure according to the initial trajectory data, calculate the Q value for each state-action pair, and obtain the Double Q-network structure; Calculate the target Q value based on the Double Q-network structure and generate a temporal difference objective function; Construct an actor network and a critic network according to the temporal difference objective function, update the parameters of the action strategy, and obtain a policy gradient vector; Perform backpropagation operation on the policy gradient vector, update the network weights through the cross-entropy loss function, and obtain the target Double Q-network; Package the target Double Q-network as a headphone housing injection molding optimization controller, and the headphone housing injection molding optimization controller is used to output adjustment instructions for the cavity temperature and injection pressure.

[0071] Specifically, an environment capable of performing experiments under different control strategies is constructed to collect transfer data of different state-action pairs. The core of this environment is the injection molding process model of the headphone housing, which calculates the changes in cavity temperature and cavity pressure based on the input heating power and injection pressure. To ensure the diversity of initial data, a random control strategy is adopted, that is, the heating power is randomly selected during the injection molding process and the injection pressure , and observe their effects on the cavity state. At each control step , randomly execute the action and record the state transition , where:

[0072] represents the current cavity temperature and cavity pressure state, is the output value of the reward function, is the state at the next moment. By repeatedly executing the random control strategy, a large amount of initial trajectory data is collected, and these data are used to train the double Q-network. Based on the initial trajectory data, two deep neural networks and with the same structure but independent parameters are constructed to calculate the Q-values of different state-action pairs. In the Q-learning method, the Q-value represents the future cumulative reward that can be obtained after performing a specific action in a certain state, and is defined as:

[0073] where, is the discount factor, which is used to measure the importance of future rewards. Since a single Q-network will produce overestimation bias, a double Q-network structure is adopted. By separately calculating and , and using the smaller Q-value for update, the risk of overestimation is reduced. Its calculation formula is as follows:

[0074] Through this step, each Q-network is alternately updated at different time steps to ensure that the Q-value estimation is more stable. After calculating the target Q-value, a temporal difference target function is constructed to optimize the Q-network parameters. The basic form of the temporal difference target function is the mean square error loss function:

[0075] where, are the parameters of the Q-network, is the target Q-value, is the predicted value of the current Q-network. By minimizing the loss function, the Q-network is optimized to more accurately estimate the value of different state-action pairs. To optimize the control strategy, a policy gradient method is introduced, and an actor network and a critic network are constructed. The actor network is used to generate the optimal control action, that is, based on the current state predict the optimal heating power and injection pressure set values, while the critic network is used to evaluate the quality of the actions output by the actor network and calculate the Q-value. In the policy gradient method, the goal of the actor network is to maximize the Q-value:

[0076] where is the policy function of the actor network, indicating the probability of selecting action under state . The critic network uses the Q-value provided by the double Q-network to optimize the policy of the actor network, so that the control actions output by it can maximize the reward and obtain the policy gradient vector. Perform backpropagation on the policy gradient vector and update the parameters of the actor network and the critic network through the cross-entropy loss function. The cross-entropy loss function is used to measure the gap between the policy distribution and the optimal policy distribution, and its definition is as follows:

[0077] where is the optimal policy distribution, is the policy distribution of the current actor network. By minimizing this loss function, the policy of the actor network is optimized so that the control actions output by it are more in line with the optimal policy distribution. The backpropagation process updates the network parameters through stochastic gradient descent or the Adam optimizer:

[0078] where is the learning rate. After multiple training rounds, the optimized double Q-network is encapsulated as an earphone housing injection molding optimization controller. Based on the cavity temperature and cavity pressure data collected in real time, this controller predicts the optimal heating power and injection pressure set values and generates corresponding adjustment instructions.

[0079] In a specific embodiment, the process of executing step 400 may specifically include the following steps: Convert the adjustment instructions of the cavity temperature and injection pressure in the earphone housing injection molding optimization controller into standardized control instructions recognizable by the injection molding machine; Collect the temperature distribution data and cavity pressure data in the earphone mold cavity in real time, and perform digital filtering to obtain process parameter feedback data; Execute the heating power adjustment amount and injection pressure adjustment amount in the standardized control instruction based on the process parameter feedback data, obtain the injection molding process parameter adjustment result, and perform parameter optimization analysis on the injection molding process parameter adjustment result to obtain the process parameter optimization direction; Fine-tune the standardized control instruction according to the process parameter optimization direction, update the control strategy of the earphone housing injection molding optimization controller, obtain the optimal process parameters of the earphone mold, and output the heating power target value and injection pressure target value of the earphone mold according to the optimal process parameters of the earphone mold.

[0080] Specifically, establish an instruction mapping module to ensure that the adjustment parameters generated by the optimization controller are adapted to the injection molding machine control systems of different models. Let the heating power adjustment instruction output by the optimization controller be and the injection pressure adjustment instruction be while the standardized control variables of the injection molding machine are respectively and , then the instruction mapping relationship is realized by means of linear transformation or look-up table, that is:

[0081] where and are normalization coefficients used to match the output range of the optimization controller and the input range of the injection molding machine, and are offsets to compensate for the zero-point errors of different devices. This mapping relationship is obtained through experimental measurement during the initial system calibration, so that the adjustment values output by the controller can be losslessly converted into control instructions recognizable by the injection molding machine and transmitted to the PLC or industrial computer of the injection molding machine through the communication protocol to achieve precise control. After successfully sending the control instruction, collect the temperature distribution data and cavity pressure data in the earphone mold cavity in real time to monitor the current process state. Let the temperature measurement data be , where represents the spatial coordinates inside the mold cavity, is the time dimension, and similarly, the mold cavity pressure data also changes with time. Since the data collected by the sensor is affected by noise interference, digital filtering is performed to obtain stable process parameter feedback data. The filtering methods include moving average filtering, low-pass filtering, and Kalman filtering. Let the noise data be and , then the stable temperature and pressure obtained after filtering are expressed as:

[0082] Among them, is the smoothing factor, taking , and is used to control the data smoothness. The implementation of the Kalman filter can improve the accuracy of the signal, and its state estimation update formula is:

[0083]

[0084] Among them, and are the Kalman gains, dynamically adjusting the weights of the data to optimize the filtering effect. Based on the filtered process parameter feedback data, execute the heating power adjustment amount and the injection pressure adjustment amount in the standardized control instruction to obtain the injection molding process parameter adjustment result. Let the adjusted actual mold cavity temperature and pressure be and , then calculate the deviation of the current process parameters:

[0085] If or exceeds the set tolerance range, then perform parameter optimization analysis to determine the process parameter optimization direction. The process optimization direction is calculated by the gradient descent method, that is:

[0086] Among them, is the optimization objective function, representing the product quality error, is the weight coefficient, used to adjust the influence of different parameters on the final quality. The negative gradient direction is the optimization direction:

[0087] Among them, is the learning rate, controlling the optimization step size. Through iterative update, the optimization controller gradually adjusts the heating power and injection pressure to make them tend to the optimal set value. According to the calculated process parameter optimization direction, fine-tune the standardized control instruction and update the control strategy of the headphone housing injection molding optimization controller to ensure that the system can dynamically adjust the process parameters so that the injection molding process always maintains the optimal state. This update process is realized by the reinforcement learning algorithm. Let the optimization control strategy be , then update the control strategy by the policy gradient method:

[0088] Among them, is the policy update rate. Through multiple rounds of iterative optimization, the final controller can stably output the optimal control policy. After the optimization process converges, the optimal process parameters of the headphone mold are determined, and the controller outputs the target value of the heating power of the headphone mold according to the optimal process parameters and the target value of the injection pressure , and sends them as the final set values to the injection molding machine for actual production. The final optimized controller can dynamically adjust the heating power and injection pressure to ensure that the mold cavity temperature and pressure are maintained within the optimal range, thereby improving the injection molding quality of the headphone housing, reducing the defect rate, and enhancing the production efficiency.

[0089] The above describes the injection molding parameter optimization method for the headphone mold in the embodiments of the present application. Next, the injection molding parameter optimization device 10 for the headphone mold in the embodiments of the present application will be described. Please refer to Figure 2 , an embodiment of the injection molding parameter optimization device 10 for the headphone mold in the embodiments of the present application includes: A dynamic analysis module 11, configured to collect the temperature distribution data and mold cavity pressure data in the headphone mold cavity, and perform dynamic analysis of the headphone housing injection molding to obtain the headphone housing material flow curve; A feature analysis module 12, configured to perform topological feature analysis on the headphone housing material flow curve to construct a headphone housing injection molding process parameter model; A construction module 13, configured to construct a headphone housing injection molding optimization controller based on the headphone housing injection molding process parameter model, with the mold cavity temperature and mold cavity pressure as state variables and the heating power and injection pressure as control variables; A solution module 14, configured to connect the headphone housing injection molding optimization controller to the injection molding machine control system, adjust the heating power and injection pressure of the headphone mold in real time, and solve the optimal process parameters of the headphone mold.

[0090] Through the collaborative cooperation of the above-mentioned various components, by establishing the headphone housing material flow curve and topological feature analysis, an accurate description of the dynamic characteristics of the injection molding process is achieved, overcoming the limitations of traditional physical models in dealing with complex geometric structures. By using the feature extraction method based on topological data analysis, the internal laws of the process parameter changes are effectively captured, and the modeling accuracy of the non-linear dynamic process is improved. By constructing an optimization controller combining a double Q network and an actor-critic network, the adaptive adjustment of the injection molding parameters is realized, and the uncertainty of the manual experience parameter adjustment is reduced. By introducing the Markov decision process and the experience replay mechanism, the control strategy can be continuously optimized and learned, ensuring the stability of the control performance. By adopting the real-time feedback and parameter fine-tuning mechanism, the control system can quickly respond to the process fluctuations, ensuring the consistency of the product quality.

[0091] Please refer to Figure 3 ,Figure 3 It is a schematic block diagram of the structure of the electronic device 300 provided by an embodiment of the present application. The electronic device 300 includes a processor 301 and a memory 302. The processor 301 and the memory 302 are connected through a device bus 303. Among them, the memory 302 may include a non-volatile storage medium and an internal memory.

[0092] The non-volatile storage medium can store a computer program. The computer program includes program instructions. When the program instructions are executed by the processor 301, the processor 301 can be made to execute any of the above-mentioned injection parameter optimization methods for headphone molds.

[0093] The processor 301 is used to provide computing and control capabilities to support the operation of the entire electronic device 300.

[0094] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor 301, the processor 301 can be made to execute any of the above-mentioned injection parameter optimization methods for headphone molds.

[0095] Those skilled in the art can understand that Figure 3 the structure shown in is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the electronic device 300 involved in the solution of the present application. The specific electronic device 300 may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0096] It should be understood that the processor 301 may be a central processing unit (CPU), and the processor 301 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0097] It should be noted that those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the above-described electronic device 300 can refer to the corresponding process of the above-mentioned injection parameter optimization method for headphone molds, and will not be described in detail here.

[0098] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0099] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing an electronic device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: various media that can store program codes such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.

[0100] As described above, the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present application.

Claims

1. A method for optimizing injection molding parameters of an earphone mold, characterized in that: The method comprises: Collect temperature distribution data and cavity pressure data in the earphone mold cavity, and perform dynamic analysis of earphone shell injection molding to obtain the earphone shell material flow curve; Performing topological feature analysis on the flow curve of the earphone shell material and constructing an earphone shell injection molding process parameter model; Based on the earphone shell injection molding process parameter model, the mold cavity temperature and mold cavity pressure are used as state variables, and the heating power and injection pressure are used as control variables to construct an earphone shell injection molding optimization controller; The earphone shell injection molding optimization controller is connected to the injection molding machine control system to adjust the heating power and injection pressure of the earphone mold in real time, and solve the optimal process parameters of the earphone mold.

2. The method for optimizing injection molding parameters of an earphone mold according to claim 1, characterized in that: The collecting of temperature distribution data and cavity pressure data in the earphone mold cavity and the dynamic analysis of earphone shell injection molding to obtain the earphone shell material flow curve includes: Perform three-dimensional spatial interpolation calculation on the temperature distribution data and cavity pressure data in the earphone mold cavity to obtain the cavity temperature field function and cavity pressure field function; Performing a gradient analysis on the mold cavity temperature field function to obtain a temperature gradient field function, and performing a linear regression analysis on the temperature gradient field function and the mold cavity pressure field function to obtain a material flow coefficient function; Establishing a heat energy transfer equation according to the material flow coefficient function to obtain an energy conservation equation for the injection molding process, and converting the energy conservation equation for the injection molding process into a differential equation group to solve the fluid velocity component to obtain a material flow velocity field; The mold cavity filling state is calculated according to the material flow velocity field, and at the same time, the material flow curve of the earphone shell is obtained in combination with the geometric constraint conditions of the mold cavity.

3. The method for optimizing injection molding parameters of an earphone mold according to claim 1, characterized in that: The topological feature analysis of the headphone housing material flow curve is performed to construct a headphone housing injection molding process parameter model, including: Sampling the flow curve of the earphone shell material in a sliding time window to obtain a topological feature sequence of the injection molding process; Calculating the zero-order Betti number and the first-order Betti number at each time point in the topological feature sequence to obtain a set of topological invariants of the injection molding process; Calculating the cosine similarity between the features in the topological invariant set to obtain a topological feature distance matrix, and performing singular value decomposition on the topological feature distance matrix to obtain a reduced-dimensional feature vector group; Performing a spatial orthogonal transformation on the dimension-reduced feature vector group to obtain a standardized feature basis, and reconstructing the standardized feature basis into a state matrix according to a time sequence to obtain an earphone shell injection molding state feature matrix; A headphone shell injection molding process parameter model is constructed based on the headphone shell injection molding state characteristic matrix.

4. The method for optimizing injection molding parameters of an earphone mold according to claim 3, characterized in that: The step of constructing an earphone shell injection molding process parameter model based on the earphone shell injection molding state characteristic matrix includes: Segmenting the injection molding state feature matrix of the earphone shell to obtain a target input sequence, and performing temporal feature extraction and multi-head attention calculation on the target input sequence to obtain a temporal association weight sequence of the injection molding process; The time-series association weight sequence is input into the temperature prediction network, the pressure prediction network and the flow prediction network respectively, and the independent prediction value of each process parameter is calculated through the fully connected layer to obtain the prediction data of the mold cavity temperature distribution, the injection pressure and the material flow velocity; Fitting the probability density of each process parameter according to the predicted data and the Gaussian mixture model to obtain a multidimensional normal distribution including the mean value of the cavity temperature, the mean value of the injection pressure, the mean value of the material flow velocity and their variances; The multidimensional normal distribution is substituted into the log-likelihood function, and the network parameters of the temperature prediction network, the pressure prediction network and the flow prediction network are optimized by the gradient descent method to obtain a headphone shell injection molding process parameter model for predicting the mold cavity temperature, injection pressure and material flow rate.

5. The method for optimizing injection molding parameters of an earphone mold according to claim 1, characterized in that: The earphone housing injection molding optimization controller is constructed based on the earphone housing injection molding process parameter model, with the mold cavity temperature and the mold cavity pressure as state variables, and the heating power and the injection pressure as control variables, including: The predicted data of the earphone shell injection molding process parameter model is mapped to the state space, a state vector including the mold cavity temperature and the mold cavity pressure is constructed, and the value range of the heating power and the injection pressure is discretized to construct the control variables including the heating power and the injection pressure; Establishing a state transfer function according to the state vector and the control variable, inputting the current state and the control action into the earphone shell injection molding process parameter model, and obtaining a predicted value of the state at the next moment; Based on the product quality requirements of the earphone shell, the weighted sum of temperature deviation, pressure deviation and material flow speed deviation is used as a penalty item to obtain a reward calculation function; Generate a Markov decision process model according to the state transfer function and the reward calculation function, and construct an experience playback buffer according to the Markov decision process model to store and sample historical state transfer data to obtain an earphone shell injection molding control environment; Trajectory sampling and dual-Q network training are performed on the state data and control data in the earphone shell injection molding control environment to obtain an earphone shell injection molding optimization controller.

6. The method for optimizing injection molding parameters of an earphone mold according to claim 5, characterized in that: The performing trajectory sampling and dual-Q network training on the state data and control data in the earphone shell injection molding control environment to obtain an earphone shell injection molding optimization controller includes: Executing a random control strategy based on the earphone shell injection molding control environment, sampling a state transition sequence, and obtaining initial trajectory data of the injection molding process; Construct two deep neural networks Q1 and Q2 with the same structure according to the initial trajectory data, calculate the Q value for each state-action pair, and obtain a dual Q network structure; Calculating a target Q value based on the dual-Q network structure and generating a time difference objective function; According to the temporal difference objective function, an actor network and a critic network are constructed, and parameters of the action strategy are updated to obtain a policy gradient vector; Performing back propagation operation on the policy gradient vector, updating the network weights through the cross entropy loss function, and obtaining the target double Q network; The target dual-Q network is encapsulated as an earphone shell injection molding optimization controller, and the earphone shell injection molding optimization controller is used to output adjustment instructions for the mold cavity temperature and the injection pressure.

7. The method for optimizing injection molding parameters of an earphone mold according to claim 1, characterized in that: The earphone housing injection molding optimization controller is connected to the injection molding machine control system, the heating power and injection pressure of the earphone mold are adjusted in real time, and the optimal process parameters of the earphone mold are solved, including: Converting the adjustment instructions of the mold cavity temperature and the injection pressure in the earphone housing injection molding optimization controller into standardized control instructions recognizable by the injection molding machine; Real-time acquisition of temperature distribution data and cavity pressure data in the earphone mold cavity, and digital filtering processing to obtain process parameter feedback data; Based on the process parameter feedback data, the heating power adjustment amount and the injection pressure adjustment amount in the standardized control instruction are executed to obtain the injection molding process parameter adjustment result, and the injection molding process parameter adjustment result is subjected to parameter optimization analysis to obtain the process parameter optimization direction; The standardized control instructions are fine-tuned according to the process parameter optimization direction, the control strategy of the earphone shell injection molding optimization controller is updated, the optimal process parameters of the earphone mold are obtained, and the heating power target value and injection pressure target value of the earphone mold are output according to the optimal process parameters of the earphone mold.

8. An injection molding parameter optimization device for an earphone mold, characterized in that: The device is used to perform the method for optimizing injection molding parameters of an earphone mold according to any one of claims 1 to 7, the device comprising: The dynamic analysis module is used to collect temperature distribution data and cavity pressure data in the earphone mold cavity, and to perform dynamic analysis of the earphone shell injection molding to obtain the earphone shell material flow curve; A feature analysis module, used to perform topological feature analysis on the flow curve of the earphone shell material and construct an earphone shell injection molding process parameter model; A construction module is used to construct an earphone shell injection molding optimization controller based on the earphone shell injection molding process parameter model, with the mold cavity temperature and the mold cavity pressure as state variables, and with the heating power and the injection pressure as control variables; The solution module is used to connect the earphone shell injection molding optimization controller to the injection molding machine control system, adjust the heating power and injection pressure of the earphone mold in real time, and solve the optimal process parameters of the earphone mold.

9. An electronic device, characterized in that: The electronic device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory so that the electronic device executes the injection molding parameter optimization method for the earphone mold according to any one of claims 1-7.

Citation Information

Cited By

  • Automobile door handle accessory manufacturing analysis system of intelligent automobile

    CN120792071A

  • Automobile injection molding part production process control system and method

    CN120802858A

  • Intelligent control system and method for sintering temperature of powder metallurgy green body

    CN120848643A

  • Method and system for collecting and monitoring production data of automotive trim injection molding equipment

    CN120985893A

  • Wear-resistant material powder metallurgy sintering process monitoring and optimizing method and system

    CN121091828A