Automatic feeding control methods, devices, equipment, and storage media for pharmaceutical production lines

By acquiring and processing data from multiple sensors, calculating the similarity of material feature vectors, and adjusting feeding parameters, the inaccuracy caused by changes in material characteristics in traditional feeding control methods is solved, achieving precise feeding control and improving the automation level and efficiency of pharmaceutical production.

CN118907869BActive Publication Date: 2026-11-10GUANGDONG SOPHON INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411211782.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2026-11-10
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

Traditional pharmaceutical manufacturing methods for controlling material feeding lack adaptability and struggle to cope with changes in material properties, leading to inaccurate feeding, impacting production quality, increasing resource waste and production costs, and reducing production efficiency.

Method used

By acquiring real-time material sensing data from multiple sensors, extracting real-time material feature vectors, calculating similarity, and inputting the data into a pre-trained prediction model, the feeding parameters are adjusted to achieve precise control.

Benefits of technology

It enables adaptive responses to changes in material properties, improves automation, reduces resource waste, increases production efficiency, and ensures the stability of processing quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118907869B_ABST
    Figure CN118907869B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of automatic control technology and discloses an automatic feeding control method, device, equipment, and storage medium for a pharmaceutical production line. It acquires material sensing data collected in real time from multiple sensors, extracts real-time material feature vectors, calculates the first similarity between the real-time material feature vector and a standard feature vector to determine the current processing completion degree of the material, and calculates the second similarity between the real-time material feature vector and the expected feature vector corresponding to the current processing completion degree. If the second similarity does not reach a specified proportion after a specified duration, the real-time material feature vector is input into a prediction model to obtain target feeding parameters. The current feeding parameters of the pharmaceutical production line are then adjusted to the target feeding parameters. This allows for real-time detection of material characteristics, adaptive response to changes in material properties, more precise material feeding control, improved automation, reduced resource waste, increased production efficiency, and more stable processing quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of automatic control technology, specifically relating to an automatic feeding control method, device, equipment, and storage medium for a pharmaceutical production line. Background Technology

[0002] In modern pharmaceutical manufacturing, material delivery and preparation are crucial steps. Traditional feeding control methods rely primarily on pre-set formulas and fixed feeding rates. While this approach meets basic production needs, it has limitations in practical applications. For example, differences in the source, storage conditions, and processing methods of raw materials from different batches can lead to variations in their physical and chemical properties. Traditional fixed feeding methods lack adaptability and struggle to precisely adjust to changes in material characteristics, resulting in inaccurate feeding amounts and timing, which negatively impacts production quality.

[0003] To reduce instability and unpredictability during processing, current methods require manual intervention to adjust the feeding rate and quantity when dealing with changes in material properties. This increases downtime and reduces overall production efficiency. Furthermore, inaccurate feeding can lead to waste of raw materials or overuse of processed materials, increasing production costs and potentially causing equipment wear and energy consumption, resulting in resource waste.

[0004] Therefore, traditional feeding control methods lack adaptability, making it difficult to accurately adjust to changes in material characteristics. They also have a low degree of automation, which can easily lead to resource waste, low production efficiency, and even unstable processing quality in pharmaceutical production lines. Summary of the Invention

[0005] The purpose of this invention is to provide an automatic feeding control method, device, equipment, and storage medium for pharmaceutical production lines. This method can adaptively respond to changes in material characteristics to achieve more precise material feeding control, improve automation, reduce resource waste in pharmaceutical production lines, increase production efficiency, and make processing quality more stable.

[0006] The first aspect of this invention discloses an automatic feeding control method for a pharmaceutical production line, comprising:

[0007] Acquire material sensing data collected in real time from multiple sensors;

[0008] Based on the material sensing data, a real-time material feature vector is extracted;

[0009] Calculate the first similarity between the real-time material feature vector and the standard feature vector, and determine the current processing completion degree of the material based on the first similarity.

[0010] Obtain the expected feature vector corresponding to the current processing completion degree, and calculate the second similarity between the real-time material feature vector and the expected feature vector;

[0011] If the second similarity is maintained for a specified period of time without reaching a specified proportion, the real-time material feature vector is input into the pre-trained prediction model to obtain the first target feeding parameters;

[0012] Adjust the current feeding parameters of the pharmaceutical production line to the first target feeding parameters.

[0013] In some embodiments, a real-time material feature vector is extracted based on the material sensing data, including:

[0014] The material sensing data is preprocessed;

[0015] Feature extraction is performed on the preprocessed material sensing data to obtain real-time material feature vectors.

[0016] In some embodiments, the material sensing data is preprocessed, including:

[0017] The material sensing data is filtered using a Kalman filter;

[0018] After filtering, the material sensing data from all sensors are time-aligned using the timestamp synchronization method.

[0019] After time alignment, the moving average method is used to fill in the missing values ​​in the material sensing data;

[0020] After filling in the missing values, the material sensing data from different sensors are normalized.

[0021] In some embodiments, the material sensing data includes temperature data, humidity data, pressure data, viscosity data, hardness data, water content data, solubility data, and material appearance images; feature extraction is performed based on the preprocessed material sensing data to obtain a real-time material feature vector, including:

[0022] The material appearance image is input into the feature extraction model to obtain the image feature vector;

[0023] The temperature data, humidity data, pressure data, viscosity data, hardness data, water content data, and solubility data are concatenated onto the image feature vector to form a real-time material feature vector.

[0024] In some embodiments, after determining the current processing completion degree of the material based on the first similarity, the method further includes:

[0025] If the current processing completion rate reaches the preset upper limit, the real-time material feature vector is input into the pre-trained prediction model to obtain the second target feeding parameters;

[0026] Adjust the current feeding parameters of the pharmaceutical production line to the second target feeding parameters.

[0027] The second aspect of this invention discloses an automatic feeding control device for a pharmaceutical production line, comprising:

[0028] The acquisition unit is used to acquire material sensing data collected in real time by various sensors;

[0029] The extraction unit is used to extract a real-time material feature vector based on the material sensing data.

[0030] The first calculation unit is used to calculate the first similarity between the real-time material feature vector and the standard feature vector;

[0031] A determining unit is used to determine the current processing completion degree of the material based on the first similarity.

[0032] The second calculation unit is used to obtain the expected feature vector corresponding to the current processing completion degree, and to calculate the second similarity between the real-time material feature vector and the expected feature vector.

[0033] The first prediction unit is used to input the real-time material feature vector into the pre-trained prediction model to obtain the first target feeding parameters when the second similarity is maintained for a specified time but does not reach a specified proportion.

[0034] The first adjustment unit is used to adjust the current feeding parameters of the pharmaceutical production line to the first target feeding parameters.

[0035] In some embodiments, the extraction unit includes:

[0036] The preprocessing subunit is used to preprocess the material sensing data;

[0037] The extraction subunit is used to extract features from the preprocessed material sensing data to obtain real-time material feature vectors.

[0038] In some embodiments, the apparatus further includes:

[0039] The second prediction unit is used to input the real-time material feature vector into a pre-trained prediction model to obtain the second target feeding parameters after the determining unit determines the current processing completion degree of the material based on the first similarity.

[0040] The second adjustment unit is used to adjust the current feeding parameters of the pharmaceutical production line to the second target feeding parameters.

[0041] A third aspect of the present invention discloses an electronic device, including a memory storing executable program code and a processor coupled to the memory; the processor calls the executable program code stored in the memory to execute the automatic feeding control method for a pharmaceutical production line disclosed in the first aspect.

[0042] The fourth aspect of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program causes a computer to execute the automatic feeding control method for a pharmaceutical production line disclosed in the first aspect.

[0043] The beneficial effects of this invention are as follows: by acquiring material sensing data collected in real time from multiple sensors, a real-time material feature vector is extracted, and a first similarity between the real-time material feature vector and a standard feature vector is calculated. Based on the first similarity, the current processing completion degree of the material is determined. Then, a second similarity between the real-time material feature vector and the expected feature vector corresponding to the current processing completion degree is calculated. If the second similarity is maintained for a specified time without reaching a specified proportion, the real-time material feature vector is input into a pre-trained prediction model to obtain a first target feeding parameter. The current feeding parameter of the pharmaceutical production line is adjusted to the first target feeding parameter. This allows for real-time detection of material characteristics, adaptive response to changes in material properties, more precise material feeding control, improved automation, reduced resource waste in the pharmaceutical production line, increased production efficiency, and more stable processing quality. Attached Figure Description

[0044] The accompanying drawings illustrate specific examples of the technical solutions described in this invention and, together with the detailed embodiments, form part of the specification, serving to explain the technical solutions, principles, and effects of this invention.

[0045] Unless otherwise specified or defined, the same reference numerals in different figures represent the same or similar technical features, and different reference numerals may be used to represent the same or similar technical features.

[0046] Figure 1 This is a flowchart of an automatic feeding control method for a pharmaceutical production line disclosed in this invention;

[0047] Figure 2 This is a schematic diagram of the structure of an automatic feeding control device for a pharmaceutical production line disclosed in this invention;

[0048] Figure 3 This is a schematic diagram of the structure of an electronic device disclosed in this invention;

[0049] Figure 4This is a schematic diagram of the architecture of an automatic feeding control system for a pharmaceutical production line disclosed in this invention.

[0050] Explanation of reference numerals in the attached figures:

[0051] 201. Acquisition unit; 202. Extraction unit; 203. First calculation unit; 204. Determination unit; 205. Second calculation unit; 206. First prediction unit; 207. First adjustment unit; 301. Memory; 302. Processor. Detailed Implementation

[0052] Unless otherwise specified or defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art. When combined with the technical solutions of the invention in a real-world scenario, all technical and scientific terms used herein may also have meanings corresponding to the purpose of achieving the technical solutions of the invention. The terms "first," "second," etc., used herein are merely for distinguishing names and do not represent a specific number or order. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0053] It should be noted that when a component is considered "fixed" to another component, it can be directly fixed to the other component or there can be an intervening component; when a component is considered "connected" to another component, it can be directly connected to the other component or there can be an intervening component; when a component is considered "mounted" on another component, it can be directly mounted on the other component or there can be an intervening component; when a component is considered "placed" on another component, it can be directly placed on the other component or there can be an intervening component.

[0054] Unless otherwise specified or defined, the terms "described" or "the" as used herein refer to the technical features or technical content mentioned or described prior to the relevant section, which may be the same as or similar to the technical features or technical content mentioned herein. Furthermore, the terms "comprising" and "having," and any variations thereof, as used herein, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or apparatus.

[0055] This invention discloses an automatic feeding control method for a pharmaceutical production line, which can be implemented through computer programming. The execution subject of this method can be an electronic device such as a computer, laptop, or tablet, or an automatic feeding control device for a pharmaceutical production line embedded in an electronic device; this invention does not limit this to any particular type. To facilitate understanding of this invention, specific embodiments will be described in more detail below with reference to the accompanying drawings.

[0056] like Figure 1 As shown, the method includes the following steps 110-160:

[0057] 110. Acquire material sensing data collected in real time from multiple sensors.

[0058] In this embodiment of the invention, various sensors can be installed on the pharmaceutical production line to detect and obtain material sensing data in real time. The material sensing data includes at least temperature data, humidity data, pressure data, viscosity data, hardness data, water content data, solubility data, and material appearance images. The various sensors include temperature sensors, humidity sensors, pressure sensors, viscosity sensors, hardness sensors, infrared moisture sensors, solubility sensors, and image sensors.

[0059] Among them, the temperature sensor is used to collect temperature data of the material inside the processing equipment; the humidity sensor is used to collect humidity data of the material inside the processing equipment; the pressure sensor is used to collect pressure data of the material inside the processing equipment; the viscosity sensor is used to collect viscosity data of the material; the hardness sensor is used to collect hardness data of the material; the infrared moisture sensor is used to collect moisture content data of the material; the solubility sensor is used to collect solubility data of the material; and the image sensor is used to collect images of the material's appearance.

[0060] Preferably, the image sensor is a 5-megapixel polarization camera, which can capture the polarization information of the light reflected from the material surface. In scenes with complex lighting or insufficient contrast, the polarization camera can enhance the contrast of the material surface features and provide a clearer image of the material appearance.

[0061] 120. Based on the material sensing data, extract the real-time material feature vector.

[0062] In step 120, the material sensing data can be preprocessed first, and then feature extraction can be performed based on the preprocessed material sensing data to obtain the real-time material feature vector.

[0063] Specifically, the implementation method for preprocessing material sensing data may include steps S11 to S14 (not shown):

[0064] S11. Use a Kalman filter to filter the material sensing data.

[0065] Using a Kalman filter can remove high-frequency noise and transient interference during data acquisition. Especially for viscosity and hardness data, the filter can smooth short-term fluctuations to obtain more stable values.

[0066] S12. After filtering, the material sensing data from all sensors are time-aligned using a timestamp synchronization method. Time alignment ensures data synchronization.

[0067] S13. After time alignment, the moving average method is used to fill in the missing values ​​in the material sensing data.

[0068] For example, if temperature data is missing at a certain sampling time, the missing value can be linearly interpolated using temperature data from previous and subsequent sampling times.

[0069] S14. After filling in the missing values, normalize the material sensing data from different sensors.

[0070] Mapping material sensing data from different sensors to the same range (e.g., 0 to 1) allows parameters with different dimensions such as temperature, humidity, viscosity, and hardness to be analyzed on the same scale.

[0071] Furthermore, the material sensing data includes at least temperature data, humidity data, pressure data, viscosity data, hardness data, water content data, solubility data, and material appearance images. In step 120, feature extraction is performed based on the preprocessed material sensing data to obtain a real-time material feature vector, which may include steps S21-S22 (not shown):

[0072] S21. Input the material appearance image into the feature extraction model to obtain the image feature vector.

[0073] The feature extraction model can be trained using Convolutional Neural Networks (CNNs). The CNN architecture consists of a sequentially connected input layer, a first convolutional layer, a second convolutional layer, a third convolutional layer, a fourth convolutional layer, a first pooling layer, a second pooling layer, a third pooling layer, a fourth pooling layer, and a fully connected layer.

[0074] Input layer: The input image size is H×W×C, where H=W=1024 (image resolution) and C=3 (number of RGB image channels).

[0075] First convolutional layer: 64 filters, 7×7 filter size, stride 2, padding set to "same" to keep the output size constant.

[0076] Output size calculation formula Where H and W are the height and width of the input image, F is the filter size, S is the stride, P is the padding amount, and K is the number of filters. Applying the current convolutional layer parameter values, the output size is calculated to be 512×512×64.

[0077] Second convolutional layer: 128 filters, 5×5 filter size, stride 2, output size 128×128×128.

[0078] Third convolutional layer: 256 filters, 3×3 filter size, stride 2, output size 32×32×256.

[0079] Fourth convolutional layer: 512 filters, 3×3 filter size, stride 2, output size 8×8×512.

[0080] First pooling layer: max pooling type, pooling window size 2×2, step size 2.

[0081] Output size calculation formula Where Hp and Wp are the height and width of the pooling layer input, Fp is the size of the pooling window, Sp is the stride, and Cp is the number of input channels, the calculated output size is 256×256×64.

[0082] Second pooling layer: max pooling type, pooling window size 2×2, stride 2, output size 64×64×128.

[0083] Third pooling layer: max pooling type, pooling window size 2×2, stride 2, output size 16×16×256.

[0084] Fourth pooling layer: max pooling type, pooling window size 2×2, stride 2, output size 4×4×512.

[0085] Fully connected layer: The output of the last pooling layer is flattened into a one-dimensional vector, with a size of 4×4×512=8192. Considering the complexity of the current input and the capacity requirements of the model, two smaller fully connected layers are used, with ReLU as the activation function. The first fully connected layer has 1024 neurons and outputs a 1024-dimensional vector; the second fully connected layer has 512 neurons and finally outputs a 512-dimensional image feature vector, including material color distribution, shape parameters (such as aspect ratio, area, etc.), particle size, and other feature values.

[0086] S22. The temperature data, humidity data, pressure data, viscosity data, hardness data, water content data, and solubility data are stitched together to the image feature vector to form a real-time material feature vector.

[0087] In this process, each of the sensors other than the image sensor outputs a scalar, for a total of 7 scalars. Thus, the dimension of the final real-time material feature vector is 512 + 7 = 519.

[0088] 130. Calculate the first similarity between the real-time material feature vector and the standard feature vector, and determine the current processing completion degree of the material based on the first similarity.

[0089] The standard feature vector in the database is used to characterize the state of materials upon completion of processing. By calculating the first similarity between the real-time material feature vector and the standard feature vector, the current processing completion level of the material can be determined. If the real-time material feature vector and the standard feature vector are highly similar, it can be determined that the current processing completion level of the material is close to completion; otherwise, processing continues. For example, if the first similarity is 60%, then the current processing completion level of the material is determined to be 60%.

[0090] Cosine similarity is used to measure the first similarity between the real-time material feature vector and the standard feature vector, as shown in equation (1) below:

[0091]

[0092] Wherein, cos(f current,i ·f database,i ) represents the first similarity, f current,i and f database,i Let i be the i-th eigenvalue of the real-time material feature vector and the standard feature vector in the database, respectively, and n be the total number of features. The numerator of the formula is the sum of the products of the real-time material feature vector and the standard feature vector in the database along each feature dimension, and the denominator is the product of the magnitudes of the real-time material feature vector and the standard feature vector. Cosine similarity is between [-1, 1]. Since feature vectors are usually positive, the actual value range is [0, 1]. A value close to 1 indicates that the real-time material feature vector and the standard feature vector are very similar, while a value far less than 1 indicates a large difference.

[0093] 140. Obtain the expected feature vector corresponding to the current processing completion degree, and calculate the second similarity between the real-time material feature vector and the expected feature vector.

[0094] The expected feature vector is used to characterize the anticipated production process requirements given the current level of processing completion. By calculating the second similarity between the real-time material feature vector and the expected feature vector, it can be determined whether the material processing is progressing normally. If the second similarity reaches a specified percentage (e.g., 90%, 96%, or 98%), it indicates that the current characteristics and processing status of the material are consistent with the expected production process requirements, showing that the material processing is progressing normally, the current material feeding control is appropriate, and the production process is operating normally. If the second similarity does not reach the specified percentage, it indicates that the current characteristics and processing status of the material are inconsistent with the expected production process requirements, showing that the material processing is not progressing normally.

[0095] 150. If the second similarity is maintained for a specified period of time without reaching the specified proportion, the real-time material feature vector is input into the pre-trained prediction model to obtain the first target feeding parameters.

[0096] During normal production, occasional brief fluctuations in processing level may occur, but if these fluctuations quickly return to normal, no adjustment of feeding parameters is necessary. Therefore, feeding parameter adjustment is only determined when the second similarity fails to reach a specified proportion after a specified duration. In this case, the real-time material feature vector is input into a pre-trained prediction model to predict the feeding parameters.

[0097] Furthermore, step 150 may include: if the second similarity is maintained for a specified duration but does not reach a specified proportion, and the gap between the current processing completion degree and the expected completion degree reaches a specified gap, the real-time material feature vector is input into the pre-trained prediction model to obtain the first target feeding parameters.

[0098] Specifically, if the gap between the current processing completion rate and the expected completion rate reaches a specified threshold, it indicates that the current processing completion rate is not meeting expectations (e.g., too fast or too slow). In this case, the current process parameters may be inappropriate, and continuing the current material feeding control may lead to defective products. Combining the second similarity score with the gap between the current processing completion rate and the expected completion rate can further improve the accuracy of the judgment.

[0099] 160. Adjust the current feeding parameters of the pharmaceutical production line to the first target feeding parameters.

[0100] The first target feeding parameters include the first target feeding rate, the first target feeding amount, and the first target feeding ratio. These parameters are used to optimize feeding control during the production process, including accelerating or slowing down the feeding process to ensure that material production proceeds as expected.

[0101] In some embodiments, after performing step 130, the following steps 171-172 (not shown) may also be performed:

[0102] 171. If the current processing completion rate reaches the preset upper limit, the real-time material feature vector is input into the pre-trained prediction model to obtain the second target feeding parameters.

[0103] The current processing completion rate has reached the preset upper limit (such as 95% or 97%), which means that the processing of materials is close to completion. Continuing to feed materials at the current rate and amount may lead to overprocessing or waste.

[0104] 172. Adjust the current feeding parameters of the pharmaceutical production line to the second target feeding parameters.

[0105] The second target feeding parameters include the second target feeding rate, the second target feeding amount, and the second target feeding ratio. These parameters are used to slow down the feeding process to avoid over-processing and resource waste.

[0106] In this embodiment of the invention, the first target feeding parameter and the second target feeding parameter are both predicted by a pre-trained prediction model. This prediction model is trained based on a machine learning model and is constructed using a reinforcement learning (Q-Learning) model according to the characteristics of the pharmaceutical production line.

[0107] Specifically, the action space, state representation, and reward function design of Q-Learning are as follows:

[0108] (1) Action space: Defines all actions that can be executed. The action space includes: Feed rate: controls the speed at which materials are fed; Feed quantity: controls the amount of material fed each time; Feed proportion: controls the feeding proportion between different materials in the case of multiple materials (if there is only one material, the feeding proportion is 100% by default).

[0109] The action space is discretized, and the specific value range is as follows:

[0110] Feeding rates: r1, r2, ..., r n Examples include 0.1, 0.2, 0.3, ..., 1.0 (unit: mass per unit time).

[0111] Feed amounts: q1, q2, ..., q m For example, 10kg, 20kg, 30kg, ..., 100kg.

[0112] Feeding ratio: {p1, p2, ..., p k}, such as {(0.2, 0.8), (0.5, 0.5), (0.7, 0.3)} (the ratio of the two materials can be adjusted according to actual production).

[0113] Thus, the total number of actions in the action space is the Cartesian product of the action types: total number of actions = n*m*k; where n, m, and k are the number of discretized options for feeding rate, feeding amount, and feeding ratio, respectively.

[0114] (2) State Space: Represents the current state of the system, typically composed of environmental information. In this invention, the state space consists of real-time material feature vectors, including image feature vectors and scalars from other sensor outputs (temperature data, humidity data, pressure data, viscosity data, hardness data, water content data, and solubility data). From the CNN architecture, this invention proposes that the image feature vector output be... The scalar output of other sensors is Where d is the number of other sensor types, d = 7. Therefore, the state space can be represented as s = [fCNN, fsens], where This means that the image features output by the CNN are fused together with the scalars output by other sensors through splicing.

[0115] (3) Reward Function: The reward function plays a crucial role in reinforcement learning, indicating the immediate reward brought by each action. The reward function designed in this invention considers the following factors: material input error (i.e., the deviation between the input material and the target input material), process yield (i.e., the product qualification rate after material processing), and resource consumption rate (i.e., the proportion of waste or defective products).

[0116] Therefore, the reward function can be set as: R(s, a)=-α|∈ q |+β y -γ w Where α is the penalty factor (penalizing material input error), β is the reward factor (encouraging high process yield), and γ is the penalty factor (penalizing high resource consumption), ∈ q y represents the material feeding error, w represents the process yield, and w represents the resource consumption rate.

[0117] Once the system executes a feeding action a, the action will affect the state of the material and generate a new state s′. The system continuously monitors the new state changes and calculates the immediate reward R(s, a) based on the new state s′ and the previous feeding action a.

[0118] After completing the above preparations, the action value (Q value) of the learning state-action pair is determined.

[0119] To guide strategy selection, the specific steps are as follows:

[0120] The formula for updating the Q value is defined as follows:

[0121]

[0122] Here, Q(s, a) is the Q-value function for choosing action a in state s; α is the learning rate, used to control the step size of Q-value updates; γ is the discount factor, used to control the weight of future rewards; R(s, a) is the immediate reward for performing action a in state s; s′ represents the new state the system enters after performing action a in the current state s; a′ represents one of all possible actions that can be performed in state s′, and the largest Q-value is selected by comparing the Q-values ​​of these possible actions. This part calculates the maximum expected reward that can be obtained by taking the optimal action in the next state.

[0123] Since traditional Q-tables are difficult to process, in this embodiment of the invention, a Deep Q-learning Network (DQN) is used instead of a Q-table to approximate the Q-value function. The Q-value function of DQN is expressed as: Q(s, a; θ) ≈ Q(s, a). The input of DQN is state s and action a, and the output is the Q-value of the corresponding action. The network parameters θ of DQN are continuously optimized through backpropagation and gradient descent algorithms.

[0124] Finally, in the actual feeding control process, the ∈-greedy strategy is adopted to achieve a balance between exploration and utilization, helping the system find the optimal feeding strategy. The specific steps are as follows:

[0125] Initially, a high ∈ value is set, such as 0.9. This means that 90% of the time the system will randomly select actions, exploring and trying different combinations of feed parameters to obtain a wider range of data. This data is used to train the DQN, helping it to better approximate the optimal Q-value function.

[0126] As the system continues to learn, the ∈ value gradually decreases (e.g., from 0.9 to 0.1), and the system chooses the action with the largest current Q value more often. This means that the system has begun to rely more on the optimal policy it has learned.

[0127] By dynamically adjusting the ∈ value, the system can quickly accumulate rich experience in the early stages and gradually converge to the optimal strategy in the later stages. This strategy ensures that the system can both explore possible optimal feeding parameters and operate stably after learning the optimal strategy.

[0128] By combining deep Q-networks with ∈-greedy strategies, the following objectives can be achieved in complex production environments: First, through continuous learning and optimization, the system can adjust the feeding strategy in real time based on the characteristics of the current materials and environmental conditions, ensuring a high degree of matching between the feeding quantity and actual demand, thus achieving precise feeding. Second, by optimizing feeding control, resource waste and time loss in the production process can be reduced, thereby improving overall production efficiency. Third, precise feeding control directly affects the quality of the final product; by adjusting feeding parameters, the consistency and high quality of the finished product can be ensured, thereby improving product quality.

[0129] In some embodiments, after adjusting the current feeding parameters of the pharmaceutical production line to the first target feeding parameters or the second target feeding parameters, the feeding data of the current production of the pharmaceutical production line can be obtained when production is completed, and the analysis results can be obtained based on the preset analysis method corresponding to the feeding data. The third target feeding parameters are determined according to the analysis results, and the current feeding parameters of the pharmaceutical production line are adjusted to the third target feeding parameters. The third target feeding parameters are used for feeding control in the next production.

[0130] The preset analysis method varies depending on the material input data, which includes, but is not limited to, sensor data, material input control parameters, and different environmental conditions. When the material input data includes data from a single sensor (such as material viscosity), the corresponding preset analysis method is distribution analysis; when the material input data includes data from multiple sensors (such as material temperature, humidity, viscosity, etc.), the corresponding preset analysis method is principal component analysis; when the material input data includes multiple material input control parameters, the corresponding preset analysis method is correlation analysis; and when the material input data includes different environmental conditions, the corresponding preset analysis method is cluster analysis.

[0131] Analyzing the material input data from this production run based on its actual output allows for better material input control settings for the next run, thus optimizing the material input plan. The aforementioned pre-defined analysis methods primarily include any one of the following approaches:

[0132] (1) Distribution Analysis: In material feeding control, different material characteristics will be presented in different distribution forms. Assuming that the focus is on the viscosity distribution of materials during the feeding process for the actual finished product of this production, the probability density function (PDF) is used to represent the viscosity: Among them, V iLet denoted as viscosity value, i as the data acquisition time point, N as the sample size, and δ as the Dirac delta function. By analyzing the shape of the function, such as skewness and kurtosis, it can be determined whether the viscosity is concentrated within a certain range or whether there are extreme values ​​(abnormal situations). During production, if a large skewness in the viscosity distribution is found, it may indicate uneven feeding or fluctuations in equipment status. The system needs to adjust the feeding rate or feeding ratio for the next production run in a timely manner to correct this viscosity distribution instability.

[0133] (2) Correlation Analysis: During the material feeding control process, multiple material feeding control parameters may jointly affect the production results. Correlation analysis aims to identify the linear or nonlinear relationships between these material feeding control parameters to help understand their combined impact on the production results. For example, the Pearson correlation coefficient ρ between the material feeding rate Ri and the finished product moisture content Wi is calculated as follows: in, and ρ and Wi are the mean values ​​of feeding rate and finished product moisture content, respectively. Ri and Wi are the feeding rate and finished product moisture content of the i-th sample, respectively, and N is the sample size. ρ is calculated... RW The results are between [-1, 1]. When the result is close to 1, it shows a positive correlation (i.e., as the feeding rate increases, the moisture content of the finished product also increases), and when the result is close to -1, it shows a negative correlation (i.e., as the feeding rate increases, the moisture content of the finished product decreases). The system can quantify the impact of the feeding rate on the moisture content of the finished product and adjust the feeding rate for the next production run, thereby ensuring that the moisture content of the actual finished product is controlled within the ideal range.

[0134] (3) Cluster analysis: Through cluster analysis, the system can identify the optimal feeding operation mode under different environmental conditions. For example, given the feature vector x i =[T i H i R i ], where T i For temperature, H i For humidity, R i To determine the feeding rate, the K-means clustering algorithm was used to divide these data points into (K) clusters: Where C k For the Kth cluster, μ kCluster centers are defined by cluster analysis. Each cluster center represents the optimal combination of feeding parameters under specific production conditions (such as different temperature and humidity conditions). For example, a cluster center might represent the optimal feeding rate and ratio under high temperature and high humidity conditions. Each data point (i.e., each production record) is assigned a cluster label indicating the category of feeding strategy applicable under the environmental conditions of that data point. For example, the label might indicate that the data point belongs to a "high temperature and low humidity" environment or a "low temperature and high humidity" environment. The system can identify which feeding rate is most suitable under a specific environmental condition (e.g., a high temperature and high humidity environment) and then automatically select this strategy under the corresponding conditions to optimize production efficiency and product quality.

[0135] (4) Principal Component Analysis (PCA): When processing multidimensional data, PCA can help simplify model input, focus on the most important features, and reduce computational burden. That is, through PCA, the system can simplify multiple sensor data (such as temperature, humidity, viscosity, etc.) into a few main components, which can explain most of the variability in the production process, thereby simplifying model design and improving the efficiency of real-time control.

[0136] By combining these statistical analysis and pattern recognition techniques, we can gain a deeper understanding of the complex relationships in the material feeding control process and apply these findings to optimize control strategies (material feeding actions) in real time. This not only improves production efficiency and product quality but also maintains system stability and reliability in complex and ever-changing production environments.

[0137] In summary, by implementing the embodiments of the present invention, the characteristics of materials can be detected in real time, and more precise material delivery control can be achieved by adaptively responding to changes in material properties, thereby improving the degree of automation, reducing resource waste in pharmaceutical production lines, improving production efficiency, and making the processing quality more stable.

[0138] like Figure 2 As shown in the figure, an embodiment of the present invention discloses an automatic feeding control device for a pharmaceutical production line, including an acquisition unit 201, an extraction unit 202, a first calculation unit 203, a determination unit 204, a second calculation unit 205, a first prediction unit 206, and a first adjustment unit 207, wherein...

[0139] The acquisition unit 201 is used to acquire material sensing data collected in real time by various sensors;

[0140] Extraction unit 202 is used to extract real-time material feature vectors based on material sensing data;

[0141] The first calculation unit 203 is used to calculate the first similarity between the real-time material feature vector and the standard feature vector;

[0142] Determining unit 204 is used to determine the current processing completion degree of the material based on the first similarity.

[0143] The second calculation unit 205 is used to obtain the expected feature vector corresponding to the current processing completion degree and calculate the second similarity between the real-time material feature vector and the expected feature vector.

[0144] The first prediction unit 206 is used to input the real-time material feature vector into the pre-trained prediction model to obtain the first target feeding parameters when the second similarity is maintained for a specified time but does not reach a specified proportion.

[0145] The first adjustment unit 207 is used to adjust the current feeding parameters of the pharmaceutical production line to the first target feeding parameters.

[0146] As an optional implementation, the extraction unit 202 includes the following sub-units (not shown):

[0147] The preprocessing subunit is used to preprocess the material sensing data;

[0148] The extraction subunit is used to extract features from the preprocessed material sensing data to obtain real-time material feature vectors.

[0149] Optionally, the aforementioned preprocessing subunit is specifically used to filter the material sensing data using a Kalman filter; after filtering, the material sensing data from all sensors are time-aligned using a timestamp synchronization method; after time alignment, the missing values ​​in the material sensing data are filled using a moving average method; and after filling the missing values, the material sensing data from different sensors are normalized.

[0150] Optionally, the material sensing data includes temperature data, humidity data, pressure data, viscosity data, hardness data, water content data, solubility data, and material appearance images. Correspondingly, the above-mentioned extraction subunit is specifically used to input the material appearance image into the feature extraction model to obtain an image feature vector; and to concatenate the temperature data, humidity data, pressure data, viscosity data, hardness data, water content data, and solubility data onto the image feature vector to form a real-time material feature vector.

[0151] As an optional implementation, the device further includes the following units (not shown):

[0152] The second prediction unit is used to input the real-time material feature vector into the pre-trained prediction model to obtain the second target feeding parameters after the determination unit 204 determines the current processing completion degree of the material based on the first similarity.

[0153] The second adjustment unit is used to adjust the current feeding parameters of the pharmaceutical production line to the second target feeding parameters.

[0154] like Figure 3 As shown, an embodiment of the present invention discloses an electronic device, including a memory 301 storing executable program code and a processor 302 coupled to the memory 301;

[0155] The processor 302 calls the executable program code stored in the memory 301 to execute the automatic feeding control method for the pharmaceutical production line described in the above embodiments.

[0156] like Figure 4 As shown in the illustration, this invention also discloses an automatic feeding control system for a pharmaceutical production line. The overall architecture of this automatic feeding control system includes a hardware component, a business component, a machine learning component, a database, and a runtime environment. The hardware component includes a sensor module and a camera module, and is connected to the business component via a communication data bus. The business component includes a data processing unit, a data display unit, and a feeding control unit. The machine learning component includes a deep learning model (CNN) and a reinforcement learning model (Q-learning). The database includes MS SQL, MongoDB, and Oracle. The runtime environment is set to a dedicated server. Through the coordinated operation of the various modules of the automatic feeding control system, the automatic feeding control method for the pharmaceutical production line described in the above embodiments is realized.

[0157] This invention also discloses a computer-readable storage medium storing a computer program that causes a computer to execute the automatic feeding control method for a pharmaceutical production line described in the above embodiments.

[0158] The purpose of the above embodiments is to reproduce and derive the technical solution of the present invention by way of example, and to fully describe the technical solution, purpose and effect of the present invention. The purpose is to enable the public to have a more thorough and comprehensive understanding of the disclosure of the present invention, and not to limit the scope of protection of the present invention.

[0159] The above embodiments are not an exhaustive list based on the present invention, and there may be many other embodiments not listed. Any substitutions and improvements made without departing from the concept of the present invention are within the protection scope of the present invention.

Claims

1. An automatic feeding control method for a pharmaceutical production line, characterized in that, include: Acquire material sensing data collected in real time from multiple sensors; Based on the material sensing data, a real-time material feature vector is extracted; Calculate the first similarity between the real-time material feature vector and the standard feature vector, and determine the current processing completion degree of the material based on the first similarity. Obtain the expected feature vector corresponding to the current processing completion degree, and calculate the second similarity between the real-time material feature vector and the expected feature vector; both the first similarity and the second similarity are cosine similarity. If the second similarity is maintained for a specified period of time without reaching a specified proportion, the real-time material feature vector is input into the pre-trained prediction model to obtain the first target feeding parameters; Adjust the current feeding parameters of the pharmaceutical production line to the first target feeding parameters.

2. The automatic feeding control method for a pharmaceutical production line as described in claim 1, characterized in that, Based on the material sensing data, a real-time material feature vector is extracted, including: The material sensing data is preprocessed; Feature extraction is performed on the preprocessed material sensing data to obtain real-time material feature vectors.

3. The automatic feeding control method for a pharmaceutical production line as described in claim 2, characterized in that, Preprocessing the material sensing data includes: The material sensing data is filtered using a Kalman filter; After filtering, the material sensing data from all sensors are time-aligned using the timestamp synchronization method. After time alignment, the moving average method is used to fill in the missing values ​​in the material sensing data; After filling in the missing values, the material sensing data from different sensors are normalized.

4. The automatic feeding control method for a pharmaceutical production line as described in claim 2, characterized in that, The material sensing data includes temperature data, humidity data, pressure data, viscosity data, material hardness data, water content data, solubility data, and material appearance images; Feature extraction is performed on the preprocessed material sensing data to obtain a real-time material feature vector, including: The material appearance image is input into the feature extraction model to obtain the image feature vector; The temperature data, humidity data, pressure data, viscosity data, material hardness data, water content data, and solubility data are concatenated onto the image feature vector to form a real-time material feature vector.

5. The automatic feeding control method for a pharmaceutical production line as described in any one of claims 1 to 4, characterized in that, After determining the current processing completion rate of the material based on the first similarity, the method further includes: If the current processing completion rate reaches the preset upper limit, the real-time material feature vector is input into the pre-trained prediction model to obtain the second target feeding parameters; Adjust the current feeding parameters of the pharmaceutical production line to the second target feeding parameters.

6. An automatic feeding control device for a pharmaceutical production line, characterized in that, include: The acquisition unit is used to acquire material sensing data collected in real time by various sensors; The extraction unit is used to extract a real-time material feature vector based on the material sensing data. The first calculation unit is used to calculate the first similarity between the real-time material feature vector and the standard feature vector; A determining unit is used to determine the current processing completion degree of the material based on the first similarity. The second calculation unit is used to obtain the expected feature vector corresponding to the current processing completion degree, and calculate the second similarity between the real-time material feature vector and the expected feature vector; both the first similarity and the second similarity are cosine similarity. The first prediction unit is used to input the real-time material feature vector into the pre-trained prediction model to obtain the first target feeding parameters when the second similarity is maintained for a specified time but does not reach a specified proportion. The first adjustment unit is used to adjust the current feeding parameters of the pharmaceutical production line to the first target feeding parameters.

7. The automatic feeding control device for a pharmaceutical production line as described in claim 6, characterized in that, The extraction unit includes: The preprocessing subunit is used to preprocess the material sensing data; The extraction subunit is used to extract features from the preprocessed material sensing data to obtain real-time material feature vectors.

8. The automatic feeding control device for a pharmaceutical production line as described in claim 6, characterized in that, The device further includes: The second prediction unit is used to input the real-time material feature vector into a pre-trained prediction model to obtain the second target feeding parameters after the determining unit determines the current processing completion degree of the material based on the first similarity. The second adjustment unit is used to adjust the current feeding parameters of the pharmaceutical production line to the second target feeding parameters.

9. An electronic device, characterized in that, It includes a memory storing executable program code and a processor coupled to the memory; the processor calls the executable program code stored in the memory to execute the automatic feeding control method for a pharmaceutical production line according to any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program causes a computer to execute the automatic feeding control method for a pharmaceutical production line according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Object name matching method based on information entropy

    CN104899189A

  • Screw type material proportioning machine controller based on machine learning

    CN110697448A