An automated polishing system and apparatus based on hard capsules

By employing techniques such as data acquisition, random forest regression analysis, genetic algorithm optimization, and particle swarm optimization, the problem of parameter mismatch during hard capsule polishing was solved, enabling precise polishing and efficient production, and ensuring the quality and safety of hard capsules.

CN121374303BActive Publication Date: 2026-03-13HENGHE PHARMA GUIZHOU
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing hard capsule polishing technology cannot be precisely adjusted according to the differences in surface characteristics between different batches, resulting in over-polishing or under-polishing. Furthermore, it lacks a real-time feedback and adjustment mechanism, which affects production efficiency and quality.

Method used

A data acquisition module is used to comprehensively collect surface characteristic data of hard capsules. The polishing controller parameters are optimized by random forest regression analysis and genetic algorithm. Fuzzy logic calculation is performed by combining particle swarm optimization. The polishing amount is automatically adjusted by the proximal gradient method and branch and bound method. Bayesian filtering is used for detection feedback to form a closed-loop control.

Benefits of technology

This technology enables real-time adjustment of polishing strategies based on the surface characteristics of hard capsules, improving the consistency of polishing quality and production efficiency, reducing labor costs and rework probability, and ensuring the appearance quality and safety of hard capsules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121374303B_ABST
    Figure CN121374303B_ABST
Patent Text Reader

Abstract

This invention relates to the field of hard capsule polishing technology, and discloses an automatic polishing system and apparatus based on hard capsules. The system's data acquisition module collects surface characteristic data such as surface roughness, stain distribution, and capsule size of the hard capsules; the data analysis module receives the data and obtains polishing demand analysis results through random forest regression analysis; the optimization module optimizes the parameters and rules of the polishing controller using a genetic algorithm based on these results; the control module performs fuzzy logic calculation of the polishing amount using particle swarm optimization based on the optimized parameters and rules, and converts it into a polishing control signal; the execution module receives the signal, adjusts the polishing amount constraints using the proximal gradient method, and performs integer programming on the polishing process using the branch and bound method to automatically adjust the polishing amount; the detection module detects the surface characteristic data after polishing using Bayesian filtering and feeds the processed data back to the control, data analysis, and optimization modules to adjust the polishing strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hard capsule polishing technology, specifically to an automatic hard capsule polishing system and apparatus. Background Technology

[0002] In the production of hard capsules, polishing is a crucial step in ensuring the appearance quality and safety of the capsules for subsequent use. The surface of hard capsules is prone to stains, roughness, or dimensional deviations due to dust adhesion, mold residue, and material particle adhesion from the production environment. If these problems are not effectively addressed, they will not only affect the visual appearance of the capsules but may also lead to surface damage during subsequent storage and transportation, thereby affecting the stability of the medication inside.

[0003] Currently, the most common hard capsule polishing methods in the industry rely on fixed parameter control. This means that parameters such as polishing speed, time, and intensity are set based on past production experience, and the same parameters are used for polishing the entire production batch. This method has significant limitations: Firstly, different batches of hard capsules will have variations in surface roughness, contamination distribution, and actual dimensions due to slight differences in raw material formulations, variations in production environment temperature and humidity, and different degrees of mold wear. Using fixed parameters makes it difficult to adapt to the actual characteristics of each batch of capsules, potentially leading to over-polishing of some capsules, resulting in surface wear and excessive dimensional deviations, or under-polishing of others, leaving surface contaminants uncleaned and failing to meet roughness standards. Secondly, existing polishing systems lack effective real-time feedback and adjustment mechanisms. Typically, after polishing is completed, manual sampling is used to assess the polishing effect. If the polishing effect is found to be substandard, parameters must be readjusted and rework performed, increasing labor and time costs and potentially damaging capsules during rework, thus reducing production efficiency.

[0004] While some polishing equipment attempts to introduce simple automatic control logic, they often employ a single threshold judgment method. For example, they adjust the polishing intensity solely based on whether the detected surface roughness value exceeds a set threshold. This control method fails to comprehensively consider multiple dimensions of surface characteristics (such as the uniformity of dirt distribution, the correlation between dimensional deviations and surface roughness), resulting in low control accuracy and difficulty in achieving stable and consistent polishing effects. Furthermore, existing technologies rely heavily on trial and error to optimize polishing parameters, lacking scientific algorithmic support. This hinders the rapid identification of optimal parameter combinations suitable for different capsule characteristics, further limiting improvements in polishing quality and production efficiency. With the pharmaceutical industry's increasing demands for hard capsule quality and the growing need for automation and intelligentization in production processes, traditional polishing techniques are insufficient to meet actual production needs. There is an urgent need for an automated polishing system capable of adjusting polishing strategies in real time based on the surface characteristics of hard capsules to achieve precise polishing. Summary of the Invention

[0005] The purpose of this invention is to provide an automatic polishing system based on hard capsules to solve the problems mentioned in the background art.

[0006] To achieve the above objectives, the present invention provides an automated polishing system based on hard capsules, the system comprising:

[0007] The data acquisition module collects surface characteristic data of the hard capsules, including surface roughness, stain distribution, and capsule size.

[0008] The data analysis module is used to receive the surface characteristic data and perform random forest regression analysis to obtain polishing requirement analysis results;

[0009] The optimization module is used to optimize the parameters and rules of the polishing controller using a genetic algorithm based on the polishing requirements analysis results, so as to obtain the optimized parameters and rules;

[0010] The control module is used to perform fuzzy logic calculation of polishing amount through particle swarm optimization based on the optimized parameters and rules, and convert it into polishing control signal;

[0011] The execution module is used to receive the polishing control signal, adjust the constraints of the polishing amount through the proximal gradient method, and perform integer programming on the polishing process in combination with the branch and bound method to achieve automatic adjustment of the polishing amount;

[0012] The detection module is used to detect the surface characteristic data of the polished hard capsule through Bayesian filtering, and feed the processed surface characteristic data back to the control module, the data analysis module and the optimization module to adjust the polishing strategy.

[0013] Preferably, the data acquisition module acquires surface characteristic data of the hard capsule, including surface roughness, stain distribution, and capsule size, including:

[0014] Based on historical data and the changing trends of surface characteristics, determine the frequency, cycle, and strategy of data collection;

[0015] Based on the acquisition frequency, period, and strategy, surface characteristic data is acquired, and the surface characteristic data is preprocessed to obtain preprocessed data.

[0016] Preferably, the data analysis module receives the surface characteristic data and performs random forest regression analysis to obtain polishing requirement analysis results, including:

[0017] The preprocessed surface characteristic data is divided into multiple data subsets;

[0018] Initialize the learning rate and number of iterations;

[0019] For each subset of data, calculate the average error between the predicted and actual values;

[0020] Based on the average error, adjust the gradient of the weights and the gradient of the bias to minimize the difference between the predicted and actual values ​​to obtain the final solution.

[0021] Based on the final solution, obtain the optimized parameters;

[0022] The polishing amount is predicted based on the optimized parameters to obtain the polishing amount prediction result.

[0023] Preferably, the optimization module optimizes the parameters and rules of the polishing controller using a genetic algorithm based on the polishing demand analysis results to obtain optimized parameters and rules, including:

[0024] Based on the predicted polishing amount, the optimization objective is determined;

[0025] Initialize the population and generate a set of random polishing controller parameters and rules as initial candidate solutions;

[0026] The parameters and rules in the population are combined and applied to the polishing controller, and the fitness of the controller is evaluated based on the polishing amount prediction results.

[0027] Mutation, crossover, and selection operations are performed on individuals in the population to generate new candidate solutions. Based on the fitness value, the corresponding individuals are selected to form a new population. The iteration continues until a preset number of iterations is reached, at which point the iteration stops. After the iteration ends, the final individuals in the current population are obtained as the optimized parameters and rules.

[0028] Preferably, the control module performs fuzzy logic calculation of the polishing amount through particle swarm optimization based on the optimized parameters and rules, and converts it into a polishing control signal, including:

[0029] Acquire surface characteristic data and optimized rules;

[0030] Initialize the particle swarm optimization algorithm parameters;

[0031] Based on the optimized rules, a fuzzy logic system is constructed to convert surface characteristic data into a fuzzy set. Reasoning is then performed according to the fuzzy logic rules to arrive at a fuzzy polishing amount decision.

[0032] Initialize the particle swarm optimization algorithm parameters, execute the particle swarm optimization process, and in each iteration, generate a new polishing amount decision based on the current state and use a fuzzy logic system to evaluate its merits in order to obtain the final solution;

[0033] When the particle swarm optimization algorithm reaches the termination condition, the current final polishing amount is obtained;

[0034] The polishing amount obtained through particle swarm optimization and fuzzy logic calculation is converted into a specific polishing control signal.

[0035] Preferably, the execution module receives the polishing control signal, adjusts the constraints on the polishing amount using the proximal gradient method, and performs integer programming on the polishing process using the branch and bound method to achieve automatic adjustment of the polishing amount, including:

[0036] Receive polishing control signals and preset constraints on the amount of polishing;

[0037] Based on the preset polishing amount constraints and the current control signal, the polishing amount is optimized using the proximal gradient method to obtain a polishing amount that satisfies all constraints.

[0038] Under the premise of satisfying all constraints, find the corresponding polishing amount scheme and automatically adjust the polishing amount.

[0039] Preferably, the execution module optimizes the polishing amount using a proximal gradient method based on the preset polishing amount constraints and the current control signal to obtain a polishing amount that satisfies all constraints, including:

[0040] Set the relevant parameters, including the learning rate sequence, stopping conditions, and constraint set;

[0041] Calculate the subgradient of the objective function based on the current polishing amount scheme;

[0042] The updated polishing amount scheme is projected onto the constraint set using the projection operation to obtain a new polishing amount scheme;

[0043] Set the new polishing amount scheme as the current polishing amount scheme, and prepare for the next iteration;

[0044] If the improvement in the objective function value is less than a preset threshold, the iteration stops, and the optimized polishing amount scheme is obtained.

[0045] Preferably, the detection module detects the surface characteristic data of the polished hard capsule using Bayesian filtering, and feeds back the processed surface characteristic data to the control module, the data analysis module, and the optimization module to adjust the polishing strategy, including:

[0046] Collect surface property data of the polished hard capsules;

[0047] The collected surface characteristic data is processed by Bayesian filtering to obtain the processed surface characteristic data;

[0048] The surface characteristic data after Bayesian filtering is transmitted to the control module, the data analysis module, and the optimization module.

[0049] Identify the changing trends and periodic fluctuations of surface properties to obtain the range of surface properties;

[0050] The surface characteristic range is compared with the expected range, and the polishing strategy is adjusted based on the comparison results, including changing the type, amount and time of polishing material.

[0051] Preferably, the system further includes a safety response module, used to determine abnormal polishing behavior based on the behavioral feature analysis results, adjust polishing parameters, allocate polishing intensity ratios, update polishing verification methods, and generate safety protection measures;

[0052] Based on the data fed back by the detection module, the safety response module analyzes the frequency of abnormal behavior, calculates the impact range of parameter changes, and reconfigures the polishing parameters.

[0053] Preferably, the present invention also includes an automatic polishing device based on hard capsules, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, when the processor executes the computer program, it implements the functions of each module in the above-mentioned automatic polishing system based on hard capsules.

[0054] Compared with the prior art, the beneficial effects of the present invention are:

[0055] In terms of the adaptability of polishing strategies, the system comprehensively collects multi-dimensional surface characteristic data of hard capsules, such as surface roughness, stain distribution, and capsule size, through the data acquisition module. This avoids the limitations of traditional technologies that rely on only a single indicator or empirical parameter, and can accurately capture the differences in surface characteristics between different batches and individual capsules. Then, the data analysis module processes the collected data using random forest regression analysis, which can comprehensively consider the correlation between multiple surface characteristic parameters and accurately identify the actual polishing needs of each batch or even each capsule. This provides a scientific basis for the subsequent adjustment of polishing parameters, changing the status quo that traditional fixed-parameter polishing cannot adapt to capsules with different characteristics. This allows the polishing operation to better match the actual characteristics of the capsules and reduces the problem of over- or under-polishing caused by parameter mismatch.

[0056] Regarding polishing parameter optimization and control accuracy, the optimization module introduces a genetic algorithm to optimize the parameters and rules of the polishing controller. The genetic algorithm has global search capabilities and can quickly select the optimal parameters and rules that suit the current polishing requirements from many possible parameter combinations. Compared with the traditional parameter adjustment method that relies on experience and trial and error, it significantly shortens the parameter optimization time, and the optimization results are more scientific and reasonable. Based on the optimized parameters and rules, the control module performs fuzzy logic calculation of the polishing amount through particle swarm optimization. The particle swarm optimization algorithm can effectively improve the convergence speed and calculation accuracy of fuzzy logic calculation, ensuring that the polishing amount calculation result can accurately match the actual polishing requirements. The calculation result is then converted into a polishing control signal to achieve precise control of the polishing process, avoiding the problem of low accuracy in the traditional single threshold control method and improving the stability and consistency of the polishing process.

[0057] From the perspective of dynamic adjustment capability of the polishing process, the execution module adopts the proximal gradient method to adjust the constraints of the polishing amount. Under the premise of meeting the polishing quality requirements, it can reasonably control the adjustment range of the polishing amount and avoid the fluctuation of the polishing effect due to excessive adjustment range. At the same time, combined with the branch and bound method to perform integer programming on the polishing process, the discrete variables in the polishing process (such as the order of polishing steps, the priority of different polishing areas, etc.) can be scientifically planned to ensure that the polishing process is orderly and efficient, realize the automatic and dynamic adjustment of the polishing amount, reduce manual intervention, and reduce labor costs.

[0058] The detection module uses Bayesian filtering to analyze the surface characteristics of the polished hard capsules. Bayesian filtering has excellent noise suppression capabilities, effectively improving the accuracy of the detection data and preventing incorrect adjustments to the polishing strategy due to detection errors. Simultaneously, the processed surface characteristic data is fed back to the control module, data analysis module, and optimization module, forming a closed-loop control system. This allows the system to adjust subsequent polishing strategies in real time based on the actual polishing effect, including re-optimizing polishing parameters and correcting the polishing amount calculation logic, achieving continuous optimization of the polishing process. This closed-loop control mechanism changes the traditional "one-time polishing + post-inspection" model of polishing technology, enabling timely detection and correction of deviations during the polishing process, reducing the probability of rework, improving production efficiency, and ensuring that the polishing quality of each hard capsule meets the standard requirements, guaranteeing the appearance quality and subsequent safety of the hard capsules. Attached Figure Description

[0059] Figure 1 This is a timing diagram of the automatic polishing system based on hard capsules described in this invention;

[0060] Figure 2 This is a flowchart illustrating the working principle of the data acquisition module.

[0061] Figure 3To optimize the working principle flowchart of the module;

[0062] Figure 4 This is a flowchart illustrating the working principle of the execution module. Detailed Implementation

[0063] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0064] Please see Figure 1 The present invention provides an automatic polishing system and apparatus based on hard capsules. The system includes: a data acquisition module, a data analysis module, an optimization module, a control module, an execution module, and a detection module.

[0065] The data acquisition module collects surface characteristic data of the hard capsules, including surface roughness, stain distribution, and capsule size. The data analysis module receives the surface characteristic data and performs random forest regression analysis to obtain polishing requirement analysis results. Based on the polishing requirement analysis results, the optimization module optimizes the parameters and rules of the polishing controller using a genetic algorithm to obtain optimized parameters and rules. Based on the optimized parameters and rules, the control module performs fuzzy logic calculation of the polishing amount using particle swarm optimization and converts it into a polishing control signal. The execution module receives the polishing control signal and adjusts the constraints of the polishing amount using the proximal gradient method, and combines the branch and bound method to perform integer programming on the polishing process to achieve automatic adjustment of the polishing amount. The detection module detects the surface characteristic data of the polished hard capsules using Bayesian filtering and feeds the processed surface characteristic data back to the control module, data analysis module, and optimization module to adjust the polishing strategy.

[0066] Example 1: See Figure 2After the system starts, the data acquisition module begins operation. The module's built-in high-precision optical sensor and laser rangefinder scan the hard capsules on the conveyor belt along a predetermined trajectory. The scanning process is not continuous but follows a pre-set strategy. This strategy relies on the analysis of a large amount of historical data, which records the changes in the surface characteristics of different batches of capsules over time, ambient temperature, humidity, and other factors. For example, data analysis shows that during periods of high humidity, tiny water stains are more likely to condense on the capsule surface, altering the distribution characteristics of the stains. Therefore, the system dynamically adjusts the acquisition frequency based on real-time environmental monitoring data, increasing the scanning sampling frequency when humidity exceeds a specific threshold to capture more detailed changes in surface condition. Each scan acquires a surface image, three-dimensional morphology data, and precise dimensional information of the capsule. This raw data is then sent to a preprocessing unit. The preprocessing unit first performs data cleaning, identifying and removing invalid data points caused by conveyor belt vibration or momentary light interference. Next, the image data, point cloud data, and dimensional data are aligned and fused in terms of timestamps and spatial location to form a unified, standardized data packet. This data packet is the preprocessed data mentioned above. It fully contains the surface roughness quantification of a single capsule, the coordinates and area information of the stained area, and the precise geometric dimensions.

[0067] The preprocessed data is transmitted in real time to the data analysis module, whose core task is to predict the required polishing amount for the current capsule from this surface characteristic data using random forest regression analysis. To achieve this, the module first divides the continuously delivered preprocessed data stream by individual capsule, with each capsule's data forming an independent data subset. The system initializes the model's learning rate and maximum number of iterations; these hyperparameters are set based on empirical values ​​from previous extensive offline training, aiming to balance the model's convergence speed and final prediction accuracy. Each data subset is input into a pre-built random forest model. This model consists of multiple regression trees, each trained based on different bootstrap samples and random feature subsets from the data subset. During model execution, each independent tree outputs a predicted polishing amount for the capsule.

[0068] The system calculates the average of the predicted values ​​from all trees as the final predicted value for that data subset. Simultaneously, the system compares this predicted value with a theoretical target value set based on an ideal surface state, calculating an average error. This error value is used to guide model updates. Using a gradient descent algorithm, the model automatically adjusts the weight parameters of each decision node and the model's bias terms, aiming to gradually narrow the gap between the predicted and target values. This adjustment process is repeated iteratively, with each iteration using a new data subset to fine-tune the model parameters, allowing the model's ability to predict polishing amount to continuously adapt to changes in online data. After a preset number of iterations, the model's parameter updates tend to stabilize, and the resulting model state is considered the final solution usable for the current batch of predictions.

[0069] Based on these optimized model parameters, the system makes real-time predictions for each new subset of capsule data. The model comprehensively considers the capsule's surface roughness, the severity and location of contaminant distribution, and its dimensional deviations, outputting a specific, quantified polishing quantity prediction. This result is not a simple on / off signal, but a continuous value that precisely indicates the polishing intensity and time required to restore the capsule's surface condition to the ideal range. This polishing quantity prediction constitutes the core of the polishing requirements analysis, providing clear execution targets for downstream optimization and control modules. The entire process, from data acquisition to analysis completion, is completed within milliseconds, ensuring the system can handle the pace of high-speed production lines and achieve true online real-time analysis and decision-making.

[0070] Example 2: See Figure 3 The process begins with the optimization module receiving the polishing quantity prediction result from the data analysis module. This prediction result quantifies the ideal polishing intensity of a single capsule, but its realization depends on the specific parameter settings and control rules of the polishing controller. The task of the optimization module is to find the optimal combination of parameters and rules. Based on the received polishing quantity prediction result, the optimization module first clarifies the core objective of this optimization: to find a set of controller parameters and rules that allow the actual polishing output of the execution module to infinitely approach the predicted value. The system initializes a population composed of numerous individuals, each representing a possible combination of random polishing controller parameters and rules. These parameters may include a reference value for motor speed, the pressure coefficient of the polishing arm, the flow rate adjustment factor of the abrasive, etc., while the rules are expressed as a series of fuzzy "IF-THEN" conditional statements, such as "IF high surface roughness and large stain area, THEN increase polishing intensity".

[0071] Each set of parameters and rules (i.e., each individual) is temporarily loaded into a simulated polishing controller. This controller operates in a high-fidelity digital twin environment, taking as input the actual surface characteristics of the current capsule and outputting the simulated polishing amount calculated based on that parameter and rule combination. The system evaluates the quality of each individual using a fitness function, the core of which is calculating the difference between the simulated polishing amount and the target predicted value; the smaller the difference, the higher the fitness score. The system mimics biological evolution, performing selection, crossover, and mutation operations on individuals in the population. Individuals with high fitness have a higher probability of being selected as parents for the next generation. Crossover allows two parent individuals to exchange some parameters or rule fragments, resulting in new individuals that combine the characteristics of both. Mutation randomly changes a parameter value or rule condition in an individual with a low probability, introducing new possibilities to the population and avoiding getting trapped in local optima. This process iterates repeatedly, with each generation of the population gradually evolving and its overall fitness continuously improving. The evolutionary process terminates after a preset number of iterations. At this point, the individual with the highest fitness in the population is selected, and the parameters and rules contained therein are determined as the final optimized solution and transmitted to the control module.

[0072] The control module receives the optimized parameters and rules, and then acquires the real-time surface characteristic data of the capsule again. Its task is to transform these inputs into precise polishing control signals. This process first initializes a particle swarm optimization algorithm. Each "particle" in the algorithm represents a possible polishing amount decision scheme. Based on the optimized rules, the system constructs a fuzzy logic system. This system transforms precise input data such as surface roughness and stain distribution into fuzzy linguistic values ​​such as "high," "medium," and "low," and then performs inference based on the optimized "IF-THEN" rule base to output a fuzzy polishing amount decision, such as "medium to high intensity."

[0073] This fuzzy decision-making process forms the starting point and evaluation benchmark for particle swarm optimization (PSO). Each particle flies in the solution space, and its position represents a specific polishing amount scheme. In each algorithm iteration, each particle adjusts its flight direction and speed based on its historical best position and the global best position of the population, thereby generating a new polishing amount decision scheme. Each newly generated scheme is immediately fed into the fuzzy logic system for evaluation, calculating its degree of matching with the ideal result of fuzzy inference. This degree of matching is used as the fitness value of the particle. The particle swarm continuously gathers towards regions with higher fitness during iterations. When the algorithm converges or reaches the maximum number of iterations, the scheme represented by the globally best particle is determined as the final, accurate polishing amount.

[0074] The control module converts the polishing amount, calculated through complex optimization, into a physical signal that the actuator can directly understand. For example, a polishing amount might be converted into an instruction containing the target rotational speed of the polishing brush motor, the running duration, and the percentage opening of the abrasive spray valve. This instruction is encapsulated as a polishing control signal and sent to the actuator module, thus completing the closed loop from data analysis to specific control.

[0075] Example 3: See Figure 4 This describes the specific process by which the execution module receives control signals and automatically adjusts the polishing amount. As the final execution unit of the system, this module's core task is to transform the theoretical polishing control signals calculated upstream into an action plan that can be precisely executed under physical constraints. Upon startup, the execution module first receives a polishing control signal from the control module, which includes a suggested initial polishing amount for the current capsule. Simultaneously, the module internally presets a series of constraints regarding the polishing amount. These constraints form a multi-dimensional set, comprehensively considering equipment physical limits, process quality requirements, and economic factors, such as the maximum torque output of the polishing motor, the wear life limit of the polishing pad, the maximum allowable processing time for a single capsule, and the maximum consumption of abrasive per unit time. These constraints collectively define a feasible polishing amount operation space.

[0076] The execution module faces the challenge of finding a polishing quantity execution scheme within this complex feasible domain that faithfully reflects the intent of the control signals while satisfying all constraints. This is a typical constrained optimization problem. To address this issue, the module employs the proximal gradient method as its core optimization tool. This method is suitable for optimization scenarios where the objective function may be non-smooth but decomposable. In this context, the objective function aims to minimize the deviation between the executed polishing quantity and the theoretical polishing quantity given by the control signals, while the constraints are defined by the aforementioned multidimensional set.

[0077] The iterative process of the proximal gradient method is as follows: The system sets an initial learning rate sequence and a threshold condition for stopping iterations. Starting from the current polishing amount scheme (initially the value given by the control signal), the subgradient of the objective function at that point is calculated. The subgradient provides information about the direction of the fastest descent of the function value. Then, the algorithm tentatively updates along this direction with a step size determined by the learning rate. This updated scheme may be outside the constraint set. Therefore, a crucial projection operation is introduced, which maps the updated scheme back into the constraint set, finding the closest point within the constraint set. This projection operation ensures that the solution generated in each iteration is feasible. The new polishing amount scheme obtained after projection is set as the current scheme, and the next iteration begins. This process is repeated, with each iteration bringing the scheme closer to the theoretical optimum while satisfying the constraints. When the improvement in the objective function value between two consecutive iterations is less than a preset threshold, the algorithm stops and outputs the final optimized polishing amount scheme.

[0078] Some decision variables in the polishing process are inherently discrete, such as which set of polishing brushes to use or whether to activate auxiliary cleaning nozzles. This necessitates that the solution must include integer decisions. Therefore, the continuous solutions obtained by the proximal gradient method need to be further processed by the branch and bound method for integer programming. The branch and bound method decomposes the problem into multiple subproblems (branches), each corresponding to a case where certain variables are fixed to specific integer values. It calculates a bound for each subproblem, representing the optimal solution achievable under that branch. By systematically exploring these branches and using the bounds to prune those branches that are unlikely to produce better solutions, the algorithm eventually finds a globally optimal or near-optimal solution that satisfies all integer constraints. The mathematical objective of the entire optimization process can be expressed as minimizing the following function:

[0079]

[0080] in: This represents the overall objective function value, which is the sum of two terms. It is a smooth, differentiable function used to measure the amount of polishing performed. The deviation between the control signal and the theoretical value It is a vector representing the values ​​of all adjustable polishing operation parameters (such as time, pressure, speed, etc.). The term is a model of non-smooth properties, where It is a set of indices that refer to decision variables that require special constraints or have non-smooth costs. It is applied to each variable Non-smooth functions on the x-axis are used to accurately represent complex situations such as integer constraints, absolute value penalties, or interval constraints. The core of the proximal gradient method lies in handling the smooth parts separately. gradient information and non-smooth parts The proximal operator approximates the function iteratively. The minimum value.

[0081] By employing a combined approach of proximal gradient method and branch-and-bound method, the execution module outputs a detailed, feasible final polishing execution plan that incorporates discrete decision-making. This plan automatically adjusts the parameters in the initial control signal to fully adapt to the actual physical and process constraints. Subsequently, this plan is converted into a series of low-level instructions that directly drive actuators such as motors, pumps, and valves to complete the polishing operation on the current hard capsule. The entire calculation and adjustment process is completed in a very short time, ensuring the real-time requirements of the production line.

[0082] Example 4: Focusing on how the inspection module dynamically optimizes the polishing strategy through a closed-loop feedback mechanism. This module is located at the end of the production line. After the hard capsules complete the polishing process and leave the polishing work area, they immediately enter the inspection station. The inspection station is equipped with multiple high-resolution sensors: a set of confocal microscopes scans the capsule surface morphology with micron-level precision, generating a 3D height map for calculating surface roughness; a high-speed industrial camera array captures images of the capsule's appearance from different angles, combining machine vision algorithms to identify and quantify the distribution location, area ratio, and color characteristics of stains; and several laser displacement sensors accurately measure key dimensions such as the capsule's length and diameter. These sensors work synchronously, completing comprehensive data acquisition of the polished surface characteristics within the short time it takes for the capsule to pass through the inspection station.

[0083] The collected raw data contains significant environmental noise and inherent measurement errors from the equipment. To extract accurate and valid surface state information, the detection module employs Bayesian filtering for data processing. The system establishes an independent state-space model for each surface characteristic (such as the roughness of the central region and the stain coverage at the top). This model contains two core equations: the state equation describes the variation of surface characteristics with time or process parameters (e.g., an increase in polishing intensity may lead to a decrease in roughness), and the observation equation describes the relationship between sensor measurements and the true state (e.g., the roughness value measured by a microscope fluctuates around the true value). Based on newly acquired observation data and combined with the state estimate (prior probability) from the previous moment, the Bayesian filtering algorithm calculates the optimal estimate (posterior probability) of the current state using Bayes' theorem. This process iterates continuously, effectively filtering out random noise and significantly improving the reliability and accuracy of the data. The surface characteristic data processed by Bayesian filtering forms a clear and stable characterization of the surface state of the polished capsule.

[0084] The processed data is transmitted in real time to three key modules: the control module, the data analysis module, and the optimization module. Data sent to the control module is primarily used for immediate fine-tuning. The control module compares this data with the currently set expected surface target value. If a significant deviation is found (e.g., the actual roughness is higher than the target value), the polishing intensity may be temporarily increased slightly in the next capsule treatment. Data sent to the data analysis module is used for model updates. The data analysis module uses these new, high-quality data points to continuously supplement its random forest regression model's training set, enabling the model's predictive ability for polishing requirements to adapt to slow changes in production conditions or material properties. Data sent to the optimization module is used for strategy evaluation. The optimization module analyzes the long-term effects of using the current parameter and rule combination. If surface characteristics consistently deviate from expectations, a new round of genetic algorithm optimization may be triggered to search for better control parameters and rules.

[0085] The detection module also performs deeper data analysis tasks, namely identifying trends and periodic fluctuations in surface properties. The system maintains a time-series database storing various surface property indicators after polishing each capsule. By applying techniques such as sliding window averaging and exponential smoothing, the system analyzes the changes in specific indicators (e.g., the average roughness of a batch of capsules) over time or batch sequences. It may identify a slow upward trend (e.g., roughness values ​​gradually increasing over 50 consecutive capsules) or a recurring periodic fluctuation (e.g., a small peak in stain area every 20 capsules). Based on these analyses, the system dynamically calculates and updates the "surface property range." This range is not a fixed value, but rather an acceptable upper and lower limit under current process conditions, adaptively adjusting based on the actual detected population distribution characteristics. See Table 1 for examples of typical surface property ranges derived from the detection module's analysis.

[0086] Table 1: Adaptive Surface Property Range

[0087] Feature type Standard expected range The actual acceptable range of detection calculations Center roughness (μm) 0.8-1.2 0.85-1.18 Top stain coverage <0.5% <0.55% Length deviation (mm) ±0.05 -0.04-+0.06 Diameter deviation (mm) ±0.03 -0.025-+0.035

[0088] The core decision-making logic of the detection module lies in comparing the calculated actual surface characteristic range with the preset standard expected range. This comparison is not a simple numerical comparison, but rather an analysis of the differences between the two in terms of boundaries, distribution concentration, and dispersion. If the comparison results show that the actual range is significantly wider than the standard range (e.g., the upper limit of roughness is relaxed from 1.2 to 1.18, and the lower limit is relaxed from 0.8 to 0.85), or the actual range deviates overall (e.g., the stain coverage tolerance increases from 0.5% to 0.55%), or the periodic fluctuation amplitude exceeds expectations, it indicates that the current polishing strategy is insufficient or excessive.

[0089] Based on these comparison results, the system automatically adjusts the polishing strategy, with specific and targeted adjustments. For example, if the system detects that the residual dirt on the capsule tip is consistently high and the acceptable range has to be widened, the system may determine that the currently used polishing material is insufficient to remove this type of dirt. In this case, the strategy adjustment instructions may include changing the type of polishing material, switching from a standard abrasive to a powerful cleaning abrasive containing specific active ingredients. Simultaneously, to address the overall trend of high roughness, the adjustment instructions may require increasing the amount of polishing material applied, such as increasing the abrasive flow rate by 10%. If the system detects increased fluctuations in capsule quality during peak production line speed periods (periodic fluctuations), the adjustment instructions may involve changing the application time, initiating polishing material spraying earlier during high-speed periods to compensate for the shortened application time. These adjustment instructions are generated and sent to the corresponding execution units and upstream modules, forming a continuously learning, dynamically optimized closed-loop control system to ensure that the polishing effect is always maintained at the desired level.

[0090] Example 5: The safety response module, as an independent yet crucial component of the system, monitors abnormal behavior throughout the polishing process and implements corresponding safety measures. This module continuously receives feedback data streams from the detection module, containing detailed reports on the surface characteristics of each capsule after polishing. The safety response module does not directly focus on whether the polishing quality is acceptable; instead, it concentrates on analyzing the pattern characteristics of the polishing behavior itself. It incorporates a complex behavioral feature analysis algorithm that, through machine learning technology, has learned and defined the normal behavioral patterns of the polishing process from massive amounts of historical operational data. These patterns are reflected in a series of continuous operating parameter sequences, the coordinated changes between parameters, and the statistical distribution of the final surface characteristic results.

[0091] The safety response module compares current operational data with learned normal behavior patterns in real time. Judgment of abnormal polishing behavior is based on multi-dimensional deviation calculations. For example, a sudden abnormal behavior might involve the polishing motor exhibiting abnormal high-frequency oscillations in its speed command sequence during the polishing of a capsule—an oscillation pattern never seen in historical normal data. Another example might be a breakdown in the correlation between the amount of polishing material applied and the severity of surface contamination on the capsule, with the system applying excessive amounts of abrasive to a capsule with only minor contamination. These deviations from normal characteristic patterns are captured by the behavioral feature analysis algorithm and marked as potential abnormal behaviors.

[0092] Once an abnormal behavior is identified, the module immediately initiates an analysis process to assess the severity and scope of the anomaly. First, it counts the frequency of this type of anomaly in recent times. An isolated, low-amplitude anomaly may be recorded but not immediately trigger a strong response. However, if the same anomaly occurs repeatedly within a short period, or its amplitude far exceeds a threshold, it indicates a potential risk of system failure or loss of control. Next, the module calculates the impact of parameter changes. It uses an internal simulation model to extrapolate how much of the capsule production, which key equipment components, and the final overall product quality will be affected if the current abnormal parameter pattern continues or spreads to other workstations. This calculation process integrates equipment linkages, process flow diagrams, and material flow information.

[0093] Based on the analysis of the frequency and scope of anomalies, the safety response module generates and executes a multi-tiered set of safety protection measures. The most direct action is to reconfigure the polishing parameters. The module sends instructions to the control module to override the currently erroneous parameter settings. For example, in response to abnormal motor speed oscillations, the safety response module may force the speed to be set within a known safe and stable range, bypassing the original optimization algorithm output. Simultaneously, it may adjust the distribution ratio of polishing intensity, redistributing workload among multiple polishing units. For instance, it may reduce the load on suspected faulty units, allocating some of their polishing intensity to other normal units to maintain the stability of the overall polishing effect.

[0094] The module instructs the detection module to increase the detection frequency of subsequent capsules or add additional detection items to more rigorously verify the polishing effect. This is equivalent to adding a safety net in addition to automatic detection. In extreme cases, if the analysis indicates that the abnormal behavior is highly risky and cannot be immediately suppressed by parameter adjustment, the module will generate the highest level of safety protection measures, such as sending a request to the production line control system to initiate orderly shutdown, triggering a clear alarm signal on the human-machine interface, and notifying maintenance personnel to intervene. All identified abnormal behaviors, the response measures taken, and the subsequent status of the system are recorded in detail in the safety log. These logs are used for subsequent fault diagnosis and system maintenance, and may be used to further optimize the behavioral feature analysis model itself, enabling the system to continuously learn new abnormal patterns, thereby forming an increasingly intelligent safety protection closed loop.

[0095] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0096] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A system for automatic polishing of hard gelatin capsules, characterized in that, The method comprises the following steps: a data acquisition module acquires surface characteristic data of the hard capsule, including surface roughness, stain distribution, and capsule size; a data analysis module receives the surface characteristic data and performs random forest regression analysis to obtain polishing demand analysis results; an optimization module optimizes parameters and rules of a polishing controller based on the polishing demand analysis results to obtain optimized parameters and rules; a control module performs fuzzy logic calculation of polishing amount based on the optimized parameters and rules through particle swarm optimization and converts the calculation result into a polishing control signal; an execution module receives the polishing control signal, adjusts constraint conditions of the polishing amount through a proximal gradient method, and combines a branch and bound method to perform integer programming on the polishing process to automatically adjust the polishing amount; a detection module detects the surface characteristic data of the polished hard capsule through Bayesian filtering and feeds back the processed surface characteristic data to the control module, the data analysis module, and the optimization module to adjust the polishing strategy; the execution module receives the polishing control signal, adjusts constraint conditions of the polishing amount through a proximal gradient method, and combines a branch and bound method to perform integer programming on the polishing process to automatically adjust the polishing amount, comprising: receiving the polishing control signal and presetting constraint conditions of the polishing amount; optimizing the polishing amount through a proximal gradient method based on the preset constraint conditions of the polishing amount and the current control signal to obtain the polishing amount satisfying all constraint conditions; finding a corresponding polishing amount scheme and automatically adjusting the polishing amount under the premise of satisfying all constraint conditions; the execution module optimizes the polishing amount through a proximal gradient method based on the preset constraint conditions of the polishing amount and the current control signal to obtain the polishing amount satisfying all constraint conditions, comprising: setting relevant parameters, including a learning rate sequence, a stop condition, and a constraint condition set; calculating the sub-gradient of the objective function based on the current polishing amount scheme; projecting the updated polishing amount scheme into the constraint set using a projection operation to obtain a new polishing amount scheme; setting the new polishing amount scheme as the current polishing amount scheme to prepare for the next iteration; if the improvement of the objective function value is less than a preset threshold, stopping the iteration to obtain the optimized polishing amount scheme.

2. The automatic polishing system based on hard gelatin capsules according to claim 1, characterized in that, The data acquisition module acquires surface characteristic data of the hard capsule, including surface roughness, stain distribution, and capsule size, comprising: determining the frequency, period, and strategy of acquisition based on historical data and the trend of surface characteristics; acquiring surface characteristic data based on the frequency, period, and strategy of acquisition and preprocessing the surface characteristic data to obtain preprocessed data.

3. The automatic polishing system based on hard gelatin capsules according to claim 1, characterized in that, The data analysis module receives the surface characteristic data and performs random forest regression analysis to obtain polishing demand analysis results, comprising: dividing the preprocessed surface characteristic data into multiple data subsets; initializing the learning rate and the number of iterations; calculating the average error between the predicted value and the actual value based on each data subset; According to the average error, the gradient of the weight and the gradient of the bias are adjusted to minimize the difference between the predicted value and the actual value to obtain a final solution; According to the final solution, an optimized parameter is obtained; According to the optimized parameter, the polishing amount is predicted to obtain a polishing amount prediction result.

4. The automatic polishing system based on hard gelatin capsules according to claim 3, characterized in that, The optimization module optimizes the parameters and rules of the polishing controller through a genetic algorithm according to the polishing demand analysis result to obtain optimized parameters and rules, including: According to the polishing amount prediction result, an optimized target is determined; Initialize the population and generate a set of random polishing controller parameters and rules as initial candidate solutions; The parameters and rules in the population are combined and applied to the polishing controller, and the fitness of the controller is evaluated according to the polishing amount prediction result; Variation, crossover and selection operations are performed on individuals in the population to generate new candidate solutions, and according to the fitness value, the corresponding individuals are selected to form a new population until a preset number of iterations is reached, the iteration is stopped, and after the iteration is completed, the final individual in the current population is obtained as the optimized parameter and rule.

5. The automatic hard gelatin capsule polishing system according to claim 1, wherein, The control module performs fuzzy logic calculation of the polishing amount through particle swarm optimization according to the optimized parameters and rules, and converts it into a polishing control signal, including: Obtain surface property data and optimized rules; Initialize particle swarm optimization algorithm parameters; According to the optimized rules, a fuzzy logic system is constructed to convert surface property data into a fuzzy set, and inference is performed according to fuzzy logic rules to obtain a fuzzy polishing amount decision; Initialize particle swarm optimization algorithm parameters and perform particle swarm optimization process. In each iteration, a new polishing amount decision is generated according to the current state, and its advantages and disadvantages are evaluated using the fuzzy logic system to obtain a final solution; When the particle swarm optimization algorithm reaches the termination condition, the current final polishing amount is obtained; The polishing amount obtained through particle swarm optimization and fuzzy logic calculation is converted into a specific polishing control signal.

6. The automatic hard gelatin capsule polishing system according to claim 1, wherein The detection module detects the surface property data of the polished hard capsule through Bayesian filtering and feeds the processed surface property data back to the control module, the data analysis module and the optimization module to adjust the polishing strategy, including: Collect surface property data of the polished hard capsule; Process the collected surface property data through Bayesian filtering to obtain processed surface property data; The surface property data processed through Bayesian filtering is transmitted to the control module, the data analysis module and the optimization module; Identify the trend and periodic fluctuation data of the surface property to obtain a surface property range; Compare the surface property range with the expected range, and adjust the polishing strategy according to the comparison result, including changing the type, amount and time of polishing material.

7. The automatic hard gelatin capsule polishing system according to claim 1, wherein The system further includes a security response module for judging abnormal polishing behavior based on the behavior characteristic analysis result, adjusting polishing parameters, distributing polishing intensity proportion, updating polishing verification method and generating security protection measures. The security response module analyzes the frequency of abnormal behaviors based on the data fed back by the detection module, calculates the influence range of parameter change, and reconfigures the polishing parameters.

8. An automatic polishing device based on hard capsules, comprising a memory, a processor and a computer program stored in the memory and running on the processor, characterized in that, The processor, when executing the computer program, realizes the functions of the modules in the automatic polishing system for hard capsules according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Injection mold core machining precision control method and system

    CN119369187A