Intelligent self-adaptive chemical preparation batching method and batching system
By using multi-sensor real-time monitoring and DQN network dynamic adjustment, the limitations of static formulation and detection lag in chemical preparation ingredient systems have been solved, achieving batch consistency control and improved product quality stability.
Patent Information
- Application Number
- CN202511145961.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-15
- Publication Date
- 2025-11-28
AI Technical Summary
Existing chemical formulation dispensing systems suffer from limitations such as static formulation, detection lag, and sensor simplification, resulting in large batch variations, poor data reliability, and an inability to respond in real time to fluctuations in raw material properties.
The raw material properties are monitored in real time using multiple sensors. Spatiotemporal alignment is achieved through Kalman filtering and wavelet transform. The comprehensive raw material property parameters are fused and output using a BP neural network. A corrected mix ratio is dynamically generated using a DQN network, and online quality detection is integrated.
It achieves batch consistency control, reduces batch differences, improves product quality stability, shortens the detection response time from hours to seconds, and significantly improves data reliability and formula adjustment speed.
Smart Images

Figure CN121034475A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of chemical preparation production, in particular to an intelligent self-adaptive chemical preparation batching method and a batching system. BACKGROUND
[0002] Chemical preparation batching refers to a process of mixing various chemical raw materials (active ingredients, solvents, additives, etc.) according to accurate proportions and process conditions to prepare a final product with specific functions.
[0003] However, the existing chemical preparation batching system still has at least the following defects:
[0004] 1. Static formula limitation: relying on preset proportions, unable to respond to fluctuations in raw material properties (such as humidity and purity changes), resulting in large batch differences;
[0005] 2. Detection lag: offline sampling detection is inefficient and cannot provide real-time feedback for adjustment;
[0006] 3. Single sensor: single sensor (such as only using a humidity meter) has insufficient monitoring dimensions and poor data reliability;
[0007] Therefore, there is an urgent need for an intelligent batching solution that integrates AI algorithms, multi-sensor fusion, and adaptive feedback. SUMMARY
[0008] The present application provides an intelligent self-adaptive chemical preparation batching method and a batching system to address the problems of the prior art.
[0009] To achieve the above-mentioned purposes, the technical solutions adopted by the present application are as follows:
[0010] An intelligent self-adaptive chemical preparation batching method, comprising the following steps:
[0011] S1, real-time monitoring of the properties of multiple raw materials and generating multi-source data with labeled timestamps;
[0012] S2, using Kalman filtering and wavelet transform to align the multi-source data generated in S1 in time and space, and outputting raw material comprehensive property parameters through BP neural network fusion;
[0013] S3, based on the DQN network, taking the raw material property parameters as the state space and the flow adjustment amount as the action space, dynamically generating a corrected proportion;
[0014] The process of S3 is as follows:
[0015] S31, initializing the learning environment;
[0016] S32, based on S31, training the DQN network model;
[0017] S33, converting the trained DQN network model into actual control instructions, and outputting the matching instructions in real time;
[0018] S4: executing the matching instructions to detect the product quality online and generating a quality report.
[0019] Based on the above technical solution, further, the process of S1 is:
[0020] S11, starting the near-infrared spectrometer to scan the raw material A at a set frequency, obtaining the absorption spectrum data of the raw material A, and inversing the moisture content of the raw material A through the PLS model;
[0021] S12, synchronously triggering the Raman spectrometer to collect the characteristic peak shift of the raw material B, and calculating the purity after filtering by the Savitzky-Golay filter;
[0022] S13, using a humidity sensor to sample the environmental humidity of the raw material C, and using a purity sensor to detect the ion concentration of the raw material C by the conductivity method;
[0023] S14, generating multi-source data based on data labeling time stamp.
[0024] Based on the above technical solution, further, in S11, the set frequency range is 5Hz-15Hz.
[0025] Based on the above technical solution, further, in S12, the purity is calculated by the direct comparison method based on the characteristic peak shift.
[0026] Based on the above technical solution, further, the process of S2 is:
[0027] S21, performing time-space alignment operation by combining Kalman filtering and wavelet transform;
[0028] S22, based on S21, outputting the comprehensive property parameters of the raw material by combining the BP neural network.
[0029] Based on the above technical solution, further, in S21, the time-space alignment is: taking the humidity sensor as the reference, aligning the spectrum data time axis by linear interpolation.
[0030] Based on the above technical solution, further, in S22, the network architecture of the BP neural network consists of an input layer, a hidden layer and an output layer; the number of nodes of the input layer is 6, the number of nodes of the hidden layer is 12, and the number of nodes of the output layer is 4.
[0031] Based on the above technical solution, further, in S31, the learning environment includes:
[0032] State space S: {H1, H2, P, A1, historical batch error}.
[0033] Action space A2: {raw material A: flow value ± Δa, raw material B: flow value ± Δb, raw material C: flow value ± Δc};
[0034] Reward function R: R = -w1|actual concentration-target concentration|-w2|viscosity deviation|; wherein, w1 is a concentration error coefficient, w2 is a viscosity error coefficient, and the value range of the two is (0, 1].
[0035] Based on the above technical scheme, further, in S32, the DQN network structure is: input layer 5 nodes, hidden layer [64, 32], and output layer 8 nodes.
[0036] An intelligent self-adaptive chemical preparation system includes a raw material monitoring module, a data fusion processing unit, a dynamic formula engine module, an execution control module and an online quality detection module; the raw material monitoring module transmits data to the data fusion processing unit, the data fusion processing unit transmits processed data to the dynamic formula engine module, the dynamic formula engine module transmits processed data to the execution control module, and the execution control module transmits processed data to the online quality detection module.
[0037] Compared with the prior art, the present application has the following beneficial effects:
[0038] The present application realizes batch consistency control by real-time monitoring of raw material properties, dynamic correction of the ratio and integration of online quality detection; reduces batch differences and improves product quality stability. And by replacing offline analysis with online detection, the response time is shortened from hours to seconds, and the detection efficiency is improved; at the same time, the fusion of multiple sensors improves the reliability of data, and dynamic optimization makes the formula adjustment faster. BRIEF DESCRIPTION OF DRAWINGS
[0039] Figure 1 The present application is a method flowchart. DETAILED DESCRIPTION
[0040] The present application will be further described and explained in conjunction with the drawings and specific embodiments. The technical features of each embodiment in the present application can be combined accordingly without conflict.
[0041] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below. Technical features in the various embodiments of the present invention can be combined accordingly without mutual conflict.
[0042] Example
[0043] Reference Figure 1 As shown, this embodiment provides an intelligent adaptive chemical preparation dispensing method, including the following steps:
[0044] S1. Real-time monitoring of the properties of various raw materials and generation of multi-source data with timestamp annotations;
[0045] In this embodiment, process S1 is as follows:
[0046] S11. Start the near-infrared spectrometer and scan raw material A at a frequency of 5Hz-15Hz to obtain the absorption spectrum data of raw material A, and invert its moisture content through the PLS model; wherein, the frequency is preferably 10Hz; it should be noted that, depending on actual needs, the activity value corresponding to raw material A can also be predicted by the obtained moisture content, and the activity value can be used as the raw material property for monitoring and subsequent steps. Only the moisture content parameter needs to be replaced, and other parameters do not need to be replaced; the activity value can be predicted by a BP neural network, which is an existing method and will not be described in detail here.
[0047] S12. Simultaneously trigger the Raman spectrometer to collect the characteristic peak shifts of raw material B (e.g., CH bonds at 2900 cm⁻¹). -1 The data is processed by a Savitzky-Golay filter, and the purity is calculated after filtering. The core principle of the Savitzky-Golay filter is to perform local polynomial least squares fitting within a sliding window and replace the original data points with the values of the fitting results at the center point of the window. Its advantage is that it can effectively smooth noise while preserving the peak shape, peak height, peak width, and peak position of the original signal very well, and it is computationally efficient (it can be converted into convolution). More accurate data is obtained through this filtering process, providing more valuable data reference for subsequent steps. However, this filtering process is an existing method and will not be described in detail here.
[0048] Furthermore, purity can be calculated using a direct comparison method based on the characteristic peak shift. The specific process is as follows:
[0049] The sample spectrum was tested under the same conditions as the high-purity standard, and the positions of the characteristic peaks were directly compared.
[0050] The judgment criteria are as follows: when the displacement is greater than the instrument resolution, it is considered that impurities may be present. The instrument resolution is typically ±2cm. -1 The preferred instrument is a Fourier transform infrared spectrometer (FTIR); or, when the peak shape changes (such as broadening or splitting), the purity is considered to be low.
[0051] S13. A humidity sensor is used to sample the ambient humidity of raw material C at a frequency of 5Hz-10Hz, and a purity sensor is used to detect the ion concentration of raw material C by conductivity method; wherein, the frequency is preferably 5Hz; it should be noted that a purity sensor is a device used to detect, measure or monitor the purity of a substance. It generally evaluates the purity or impurity content by analyzing the physical or chemical properties of the substance (such as concentration, composition, refractive index, conductivity, etc.); common types include gas purity sensors, liquid purity sensors and solid impurity detectors.
[0052] S14. Generate multi-source data based on the data annotation timestamp. That is, the data annotation timestamp adds a precise timestamp to each data packet (such as sensor readings, image frames, event records) to record the time when the data was generated; and transmits the recorded data to the data fusion processing unit.
[0053] S2. The multi-source data generated in S1 is spatiotemporally aligned using Kalman filtering and wavelet transform, and then fused and output as the comprehensive property parameters of the raw materials via a BP neural network.
[0054] In this embodiment, the specific process of S2 is as follows:
[0055] S21. A combination of Kalman filtering and wavelet transform is used for spatiotemporal alignment. The specific operation process is as follows:
[0056] Spatiotemporal alignment: Using a humidity sensor as a reference, the time axis of the spectral data is aligned through linear interpolation;
[0057] Feature fusion: Extract principal components of the spectrum (e.g., reduce dimensionality to a cumulative contribution rate of no less than 90%), and combine them with humidity and purity data to form a feature vector; Principal component analysis (PCA) can be used to extract the principal components of the spectrum; specifically, the process of this analysis is as follows:
[0058] The original spectral data are projected onto an orthogonal principal component space through a linear transformation and then sorted according to the direction of variance maximization.
[0059] Y = XW, where X is the original data matrix (sample × wavelength), W is the loading matrix (principal component direction), and Y is the score matrix (principal component coordinates).
[0060] S22. Based on S21, the comprehensive property parameters of the raw materials are output using a BP neural network.
[0061] Furthermore, in step S22, the core function of the BP neural network is to train a multilayer perceptron through the backpropagation algorithm to model and predict complex nonlinear relationships.
[0062] The network architecture of a BP neural network consists of an input layer, hidden layers (single or multiple layers), and an output layer;
[0063] Specifically, the input layer has 6 nodes, which means that the model's input feature dimension is 6. That is, each sample data contains 6 variables. These 6 variables are selected and set according to the actual situation, such as temperature and pressure, to ensure that the environmental conditions are consistent during operation. Each node receives a feature value, which is linearly weighted and passed to the hidden layer.
[0064] The hidden layer has 12 nodes and is used for non-linear transformation of features. The number of nodes affects the learning ability of the model. Activation functions (such as ReLU and Sigmoid) are usually used to introduce non-linearity to enhance the ability of the BP neural network model to fit complex relationships.
[0065] The output layer has 4 nodes, corresponding to the output dimensions of the task. In this embodiment, the output raw material comprehensive property parameters include four dimensions: humidity H1, purity P, ion concentration H2, and moisture content A1.
[0066] S3. Based on the DQN network, the corrected mix ratio is dynamically generated with the raw material property parameters as the state space and the flow rate adjustment as the action space.
[0067] The specific process is as follows:
[0068] S31. Initialize the reinforcement learning environment, provide training rules for S32, and provide the execution basis for S33:
[0069] The state space S is defined as {H1, H2, P, A1, historical batch error}. This state space defines the environmental information that the agent can observe and forms the basis for decision-making. Each state variable represents a key feature at a given moment. It should be noted that the historical batch error can be retrieved from the original database, and H1, H2, P, and A1 can be output via a backpropagation (BP) neural network. If activity values are needed, the moisture content can be replaced with the activity values, and the corresponding activity value data can be retrieved from the original database. Furthermore, this original database stores a large amount of data, which can be retrieved as needed.
[0070] Action space A2: {Raw material A: flow rate ± Δa, Raw material B: flow rate ± Δb, Raw material C: flow rate ± Δc}; where the action space defines the control operations that the agent can perform, which are the means to influence the environment. It should be explained that Δa, Δb, and Δc are set to increase or decrease values according to the actual situation.
[0071] Reward function R: R = -w1|actual concentration - target concentration| - w2|viscosity deviation|; where the reward function defines how to evaluate the quality of the agent's actions and is a mathematical expression of the optimization objective. It should be noted that w1 is the concentration error coefficient and w2 is the viscosity error coefficient, both ranging from (0, 1].
[0072] For example, taking raw material B as an example (where the numbers are for illustrative purposes):
[0073] Initial state: Concentration = 85% (target 90%), viscosity = 120 cP (target 100 cP);
[0074] Intelligent agent action: Increase the flow rate of raw material B (+Δb), corresponding to a concentration increase to 88% and a viscosity increase to 125 cP;
[0075] Reward calculation: R = -1 × |88-90| -0.5 × |125-100| = -2 - 12.5 = -14.5;
[0076] Optimization objective: To make R as close to 0 as possible (minimize error) by adjusting actions (such as simultaneously increasing raw materials B and C); where adjusting the amount of raw materials is based on the actual situation.
[0077] S32. Based on S31, train the DQN network model to provide a decision model for S33;
[0078] Specifically, the training conditions are as follows:
[0079] DQN network structure: Input layer 5 nodes (spatial dimension of matching states), hidden layer [64,32] (stepwise feature extraction, 64 nodes learn state combinations, 32 nodes learn action associations), output layer 8 nodes (Q values corresponding to 8 discrete actions, [+Δa, -Δa, +Δb, -Δb, +Δc, -Δc, 0, 0]);
[0080] The experience replay pool stores 10. 4(S, A, R, S'), where S corresponds to the state space in S31; A corresponds to the action space in S31; R corresponds to the reward function in S31; S' represents the next state, that is, the environment transitions to a new state after the agent performs action A (for example, the state will change after the raw material flow rate changes), and like S, it is also a 5-dimensional vector: S' = {H1', H2', P', A1', historical batch error'};
[0081] In addition, an ε-greedy strategy can be used to explore actions. Preferably, ε = 0.1. Through 10% random exploration, the agent has the opportunity to escape local optima and discover hidden better control strategies.
[0082] Furthermore, the relationship between S31 and S32 is as follows:
[0083] The state space S serves as the perceptual input defining the agent, corresponding to the DQN input layer in step S32. The five state variables in the state space S correspond to the five input nodes of the DQN network.
[0084] Action space A2 serves as the operation options for defining the agent, corresponding to the DQN output layer of step S32: 3 raw materials × 2 directions (±) + 2 zero actions = 6 actions + 2 zero actions = 8 output nodes;
[0085] The reward function R serves as the evaluation criterion for defining actions, and its corresponding DQN training objective in step S32 is to adjust the network weights through the reward signal to maximize R (minimize the error).
[0086] S33. The trained DQN network model is converted into actual control commands, and the proportioning commands are output in real time. At the same time, new states can be fed back to S31 to achieve closed-loop production optimization.
[0087] S4: Execute the mixing instructions, detect product quality online, and generate a quality report;
[0088] The process is as follows:
[0089] S41. Adjust the opening degree according to the ratio instruction received by the execution control module (control cycle 100ms);
[0090] S42. Real-time acquisition of the mixture is achieved through an online quality detection module; specifically, a near-infrared spectrometer is used to monitor the concentration of key components (detection limit 0.01%); and a dynamic light scattering instrument is used to detect the particle size distribution (measurement range 0.1-1000μm).
[0091] S43. Generate a quality report within a set time. This quality report can include parameters such as ion concentration and humidity, and can be generated according to actual needs.
[0092] For example, consider pesticide emulsifier formulations:
[0093] Raw materials: xylene (humidity monitoring, ion concentration monitoring), surfactant (purity monitoring), water (moisture content monitoring);
[0094] Sensor configuration:
[0095] Near-infrared spectroscopy: scanning the characteristic peak of moisture in xylene (absorption peak at 1450 nm);
[0096] Raman spectroscopy: Monitoring the sulfonic acid peak of surfactants (1040 cm⁻¹) -1 );
[0097] AI training: Collect 500 sets of historical data to train DQN, with reward function weights w1=0.7 and w2=0.3;
[0098] Results: The emulsification stability of the product was improved, and the viscosity variation coefficient between batches decreased.
[0099] In other embodiments, an intelligent adaptive chemical formulation dispensing system is provided, comprising:
[0100] Raw material monitoring module: integrates a near-infrared spectrometer, a Raman spectrometer, a humidity sensor, and a purity sensor (error ≤ 0.1%); it can perform S1 operation; and transmits the S1 processed data to the data fusion processing unit. The transmission method can be through industrial Ethernet (Profinet protocol), using UDP real-time broadcast mode to ensure low latency (<10ms); the wavelength range of the near-infrared spectrometer is 900-1700nm, the excitation wavelength of the Raman spectrometer is 785nm, the accuracy error of the humidity sensor is ≤ 0.5%, and the accuracy error of the purity sensor is ≤ 0.1%.
[0101] Data fusion processing unit: Equipped with a spatiotemporal alignment algorithm, it performs S2 operations and transmits the S2-processed data to the dynamic recipe engine module;
[0102] Dynamic formulation engine module: Based on reinforcement learning (DQN algorithm), the proportion optimizer performs S3 operations; its state space includes {H, P, D, A, historical batch error}, and its action space includes the adjustment amount of each raw material flow rate; and it transmits the data processed by S3 to the execution control module;
[0103] The execution control module is a high-precision metering pump (flow accuracy ±0.2%) equipped with a pneumatic valve for adjusting the opening degree; it performs S4 operation and transmits data to the online quality detection module.
[0104] Online quality inspection module: for real-time spectrometer and particle size analyzer; performs S4 operation.
[0105] Finally, it should be noted that the above content is only used to illustrate the technical solution of the present invention, and is not intended to limit the scope of protection of the present invention. Simple modifications or equivalent substitutions made by those skilled in the art to the technical solution of the present invention do not depart from the essence and scope of the technical solution of the present invention.
Claims
1. A smart adaptive chemical preparation dispensing method, characterized in that, Includes the following steps: S1. Real-time monitoring of the properties of various raw materials and generation of multi-source data with timestamp annotations; S2. The multi-source data generated in S1 is spatiotemporally aligned using Kalman filtering and wavelet transform, and then fused and output as the comprehensive property parameters of the raw materials via a BP neural network. S3. Based on the DQN network, the corrected mix ratio is dynamically generated with the raw material property parameters as the state space and the flow rate adjustment as the action space. The process of S3 is as follows: S31. Initialize the learning environment; S32. Based on S31, train the DQN network model; S33. Convert the trained DQN network model into actual control commands and output the ratio commands in real time. S4: Execute the mixing instructions to detect product quality online and generate a quality report.
2. The intelligent adaptive chemical preparation dispensing method according to claim 1, characterized in that, The S1 process is as follows: S11. Start the near-infrared spectrometer, scan raw material A at the set frequency, obtain the absorption spectrum data of raw material A, and invert the moisture content of raw material A through the PLS model; S12. Simultaneously trigger the Raman spectrometer to collect the characteristic peak shifts of raw material B, and calculate the purity after filtering by the Savitzky-Golay filter. S13. A humidity sensor is used to sample the ambient humidity of raw material C, and a purity sensor is used to detect the ion concentration of raw material C by conductivity method. S14. Generate multi-source data based on data annotation timestamps.
3. The intelligent adaptive chemical preparation dispensing method according to claim 2, characterized in that, The frequency range set in S11 is 5Hz-15Hz.
4. The intelligent adaptive chemical preparation dispensing method according to claim 2, characterized in that, In S12, purity is calculated using the direct comparison method based on the characteristic peak displacement.
5. The intelligent adaptive chemical preparation dispensing method according to claim 1, characterized in that, The process of S2 is as follows: S21. A combination of Kalman filtering and wavelet transform is used for spatiotemporal alignment. S22. Based on S21, the comprehensive property parameters of the raw materials are output using a BP neural network.
6. The intelligent adaptive chemical preparation dispensing method according to claim 5, characterized in that, In S21, spatiotemporal alignment: using the humidity sensor as a reference, the time axis of the spectral data is aligned through linear interpolation.
7. The intelligent adaptive chemical preparation dispensing method according to claim 5, characterized in that, In S22, the network architecture of the BP neural network consists of an input layer, a hidden layer, and an output layer; the input layer has 6 nodes, the hidden layer has 12 nodes, and the output layer has 4 nodes.
8. The intelligent adaptive chemical preparation dispensing method according to claim 1, characterized in that, In S31, the learning environment includes: State space S: {H1, H2, P, A1, historical batch error}; Action space A2: {Raw material A: flow rate ± Δa, Raw material B: flow rate ± Δb, Raw material C: flow rate ± Δc}; Reward function R: R = -w1|actual concentration - target concentration| - w2|viscosity deviation|; where w1 is the concentration error coefficient and w2 is the viscosity error coefficient, and their values range from (0, 1).
9. The intelligent adaptive chemical preparation dispensing method according to claim 1, characterized in that, In S32, the DQN network structure is: 5 nodes in the input layer, [64,32] in the hidden layer, and 8 nodes in the output layer.
10. An intelligent adaptive chemical preparation dispensing system, characterized in that, The intelligent adaptive chemical preparation dispensing method according to any one of claims 1-9 includes a raw material monitoring module, a data fusion processing unit, a dynamic formulation engine module, an execution control module, and an online quality detection module; The raw material monitoring module transmits data to the data fusion processing unit, which then transmits the processed data to the dynamic formula engine module. The dynamic formula engine module transmits the processed data to the execution control module, which in turn transmits the processed data to the online quality detection module.
Citation Information
Cited By
Method and system for intelligently proportioning regenerated fiber raw materials based on deep learning technology
CN122194858A