A method for controlling the forming shape in a cellulose acetate production process based on machine vision

By combining machine vision and convolutional neural networks to improve the particle swarm optimization algorithm, the stability and consistency of cellulose acetate molding morphology are enhanced, solving the problem of lack of quantitative judgment in process parameter adjustment in existing technologies and meeting the needs of high-precision industrial production.

CN122134672APending Publication Date: 2026-06-02SHANDONG SANWEI LONGBANG NEW MATERIAL TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG SANWEI LONGBANG NEW MATERIAL TECH CO LTD
Filing Date
2026-02-25
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In existing technologies, the adjustment of cellulose acetate process parameters relies on empirically preset mapping relationships and lacks quantitative characteristic comparison and judgment standards, resulting in poor molding quality stability and failing to meet the requirements of high-precision industrial production for the consistency of cellulose acetate molding morphology.

Method used

A machine vision-based imaging module is used to acquire real-time image data of cellulose acetate particles. Through image denoising, convolutional neural network feature extraction, and improved particle swarm optimization algorithm, the process parameters are quantitatively and adaptively adjusted. Combined with targeted noise filtering, multi-scale convolution, and cross-layer attention fusion, the optimal process parameters are output.

Benefits of technology

This significantly improves the stability and consistency of cellulose acetate molding morphology, meeting the needs of high-precision industrial production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122134672A_ABST
    Figure CN122134672A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of production control technology, and particularly relates to a machine vision-based method for controlling the molding morphology during the production of cellulose acetate. The method involves an imaging module at the sedimentation outlet to acquire particle images, followed by targeted filtering, improved filtering, and layered weighted fusion to denoise the images. Image features are extracted using a convolutional neural network combining multi-scale convolution and cross-layer attention fusion, and cosine similarity is compared with standard features. Based on the comparison results, a range for adjusting process parameters is generated. An improved particle swarm optimization algorithm incorporating trajectory entropy and a memory backtracking mechanism outputs the optimal parameters, achieving dynamic adjustment of the sedimentation process parameters. This invention realizes quantitative adaptive adjustment of process parameters, effectively improving the stability and consistency of the molding morphology of cellulose acetate, meeting the requirements of industrial production.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of production control technology, and in particular relates to a method for controlling the molding shape in the production process of cellulose acetate based on machine vision. Background Technology

[0002] Cellulose acetate is widely used in membrane separation, drug delivery, and fiber products due to its good biocompatibility, biodegradability, and ease of processing. Its molding morphology directly determines product performance and effectiveness. In industrial production, machine vision inspection combined with intelligent algorithms is often used to optimize process parameters to achieve precise control of molding quality. However, in existing technologies, the adjustment of cellulose acetate process parameters often relies on empirically preset mapping relationships, lacking quantitative characteristic comparison and judgment standards. This results in poor molding quality stability and fails to meet the requirements of high-precision industrial production for consistent cellulose acetate molding morphology. Summary of the Invention

[0003] In view of the technical problems existing in the background art, the present invention proposes a method for controlling the molding shape in the production process of cellulose acetate based on machine vision.

[0004] To achieve the above objectives, the technical solution adopted by the present invention includes the following steps:

[0005] S1. An imaging module is installed at the outlet of the reaction vessel in the cellulose acetate precipitation process. The imaging module collects image data of cellulose acetate particles in the slurry in real time.

[0006] S2. Perform image denoising processing on the acquired image data;

[0007] S3. Then, the image features are extracted using a convolutional neural network algorithm and compared with the features of a standard image to obtain the feature comparison analysis results;

[0008] S4. Based on the feature comparison analysis results, generate the range of process parameter adjustment amounts, obtain each possible combination of process parameter values ​​in the range, and output the optimal combination of process parameter values ​​through the improved particle swarm algorithm to adjust the precipitation process parameters and maintain the stability of the cellulose acetate molding morphology.

[0009] The image denoising specifically includes the following steps:

[0010] S21. First, extract the gray-scale distribution baseline range of cellulose acetate particles in the image. Based on this range, set a gray-scale anomaly judgment threshold. For isolated pixels in the image that exceed the threshold, use a weighted average method based on the effective pixels in their neighborhood to repair them, thereby achieving targeted noise filtering.

[0011] S22. An improved nonlocal mean filter is used to initially suppress Gaussian noise in the image. The improvement method is to use the minimum pixel size of cellulose acetate particles as the basis for adaptive adjustment of the filter window to avoid excessive smoothing of particle micro-details. Then, combined with the prior information of the spherical contour of cellulose acetate particles, an adaptive Wiener filter kernel function with contour constraints is constructed to sharpen and denoise the motion blur region of the filtered image.

[0012] S23. Layered image weighted fusion: Calculate the noise residue and particle detail retention of the images after processing in steps S21 and S22 respectively. Use the comprehensive evaluation result of the two as a dynamic weight coefficient to perform pixel-level weighted fusion on the two images to obtain the denoised cellulose acetate particle image, thus completing the overall image denoising process.

[0013] Preferably, step S21 first extracts the grayscale distribution baseline range of the cellulose acetate particle image, sets a grayscale anomaly judgment threshold based on this range, and repairs isolated pixels in the image that exceed the threshold using a weighted average method based on their effective neighboring pixels. The specific implementation of targeted noise filtering is as follows:

[0014] S211. Extract the gray-scale distribution reference interval of cellulose acetate particles from the particle images. Collect at least 50 standard images of cellulose acetate particles without obvious noise interference, count the gray-scale values ​​of all pixels in the particle region, calculate the gray-scale mean and standard deviation, and set the gray-scale distribution reference interval based on the particle gray-scale distribution characteristics.

[0015] S212. Set a gray-scale anomaly detection threshold. Use the upper and lower limits of the gray-scale distribution reference range as the gray-scale anomaly detection threshold to determine whether the pixel is a suspected noise pixel.

[0016] S213. For the identified suspected noise pixels, count the number of valid pixels in their neighborhood, and use a weighted average method for repair. The repaired pixel grayscale values ​​are then used to obtain the repaired image. .

[0017] Preferably, step S22 employs an improved nonlocal mean filter to initially suppress Gaussian noise in the image. This improvement involves using the minimum pixel size of the cellulose acetate particles as the basis for adaptive adjustment of the filtering window, avoiding excessive smoothing of particle details. Furthermore, by combining prior information about the spherical contours of the cellulose acetate particles, an adaptive Wiener filter kernel function with contour constraints is constructed. The specific implementation of sharpening and denoising the motion-blurred regions of the filtered image is as follows:

[0018] S221. Improved nonlocal mean filtering suppresses Gaussian noise. The minimum pixel size of cellulose acetate particles is used as the adaptive adjustment basis for the filtering window. An improved nonlocal mean filter is applied to the image. Perform filtering to obtain the filtered image. ;

[0019] S222. Based on the prior information of the spherical contour of cellulose acetate particles, a contour constraint factor is constructed, a filtering kernel function is constructed, and the filtering intensity is adaptively adjusted through the contour constraint factor.

[0020] S223. The filtered image is sharpened and denoised using the above-mentioned filtering kernel function to obtain the filtered image. .

[0021] Preferably, step S23 involves layered image weighted fusion, calculating the noise residue and particle detail retention of the images processed in steps S21 and S22 respectively, and using the combined evaluation result as a dynamic weight coefficient to perform pixel-level weighted fusion on the two images to obtain a denoised cellulose acetate particle image. The specific implementation of the overall image denoising process is as follows:

[0022] S231, calculate separately and Noise residue and particle detail retention;

[0023] S232. Construct a comprehensive evaluation function based on noise residual amount and particle detail retention;

[0024] S233. Calculate the dynamic weight coefficients of the two images based on the comprehensive evaluation function;

[0025] S234. Perform pixel-level weighted fusion on the two images based on dynamic weight coefficients to obtain the final denoised image.

[0026] Preferably, the specific implementation of the convolutional neural network algorithm for extracting image features in step S3 is as follows:

[0027] S31. Perform local gradient calculation on the feature map after image denoising to obtain the texture complexity matrix;

[0028] S32. Preset the set of convolution kernel scales, and calculate the weight coefficients of each scale convolution kernel based on the texture complexity matrix;

[0029] S33. Perform convolution operations on the feature map using weighted multi-scale convolution kernels to obtain a multi-scale fused feature map;

[0030] S34. Input the multi-scale fused feature map into different convolutional layers of the convolutional neural network to extract shallow, medium and deep features, and construct a cross-layer attention fusion module to adaptively fuse the three types of features.

[0031] S35. An adaptive batch normalization operation is introduced into the cross-layer fusion feature map and input into the global average pooling layer to obtain the image feature vector.

[0032] Preferably, step S34 inputs the multi-scale fused feature map into different convolutional layers of the convolutional neural network to extract shallow, mid-level, and deep features, and constructs a cross-layer attention fusion module to adaptively fuse the three types of features, including:

[0033] S341. Perform global average pooling on the shallow features, mid-level features and deep features respectively to obtain the feature vector;

[0034] S342. Map the feature vectors to the same dimension through a fully connected layer and calculate the attention weights;

[0035] S343. After upsampling the three types of features to the same size, they are weighted and fused according to attention weights to obtain a cross-layer fused feature map.

[0036] Preferably, the feature comparison analysis result obtained in step S3 by comparing with standard image features is achieved through cosine similarity.

[0037] Preferably, in step S4, the range of process parameter adjustment amounts is generated based on the feature comparison analysis results by pre-setting a mapping table between the feature comparison analysis results and the process parameter adjustment amounts, and the range of each process parameter adjustment amount is generated by looking up the mapping table.

[0038] Preferably, the specific implementation of the improved particle swarm optimization algorithm outputting the optimal combination of process parameters in step S4 is as follows:

[0039] S41. Initialize the running parameters of the particle swarm algorithm. Each particle represents a set of numerical combinations of cellulose acetate precipitation process parameters.

[0040] S42. In each iteration, for each particle, extract the continuous historical position trajectory stored in its sliding window; perform spatial dimensionality reduction processing on the trajectory data through principal component analysis, divide the dimensionality-reduced space into uniform grids, count the distribution frequency of trajectory points in each grid, calculate the trajectory entropy of the particle based on the principle of information entropy, and calculate the arithmetic mean of this index for all particles to obtain the trajectory entropy value that represents the overall exploration activity of the population.

[0041] S43. Based on the preset decay coefficient and the current iteration round, dynamically decay and update the entropy threshold; compare the current population trajectory entropy value with the updated entropy threshold. If the trajectory entropy value is lower than the entropy threshold and this state is maintained for two consecutive generations, then activate the memory backtracking mechanism: select a preset number of particles with the lowest trajectory entropy value; for each selected particle, traverse all position points in its historical trajectory, and retain only position points that simultaneously meet the following two conditions to form a backtracking point set, including that the fitness of the position point at the time of generation is better than the average fitness of the population at that time, and is determined to be a sparse region point by spatial neighborhood density analysis; select a single backtracking point from the backtracking point set; reset the current position of the particle to the backtracking point superimposed with a random perturbation that follows a normal distribution.

[0042] S44. Perform a difference operation between the current population trajectory entropy value and the preset baseline entropy value, and convert the difference into an exploration weight value in the range of 0 to 1 through a mapping function. The development weight value is obtained by subtracting the exploration weight value from 1.

[0043] S45. Perform particle velocity update, retaining the basic component of the original particle velocity scaled by the inertia coefficient; multiply the vector difference between the individual particle's historical best position and current position by the first random coefficient and the exploration weight value to form an enhanced individual cognitive component; multiply the vector difference between the global best position and current position by the second random coefficient and the development weight value to form an enhanced global guidance component; superimpose the basic component, the individual cognitive component, and the global guidance component to generate the updated particle velocity;

[0044] S46. Calculate the new position of the particle based on the updated velocity, and dynamically refresh the historical best position of the individual particle and the global best position of the population based on the fitness evaluation results of the new position.

[0045] S47. Detect whether the preset termination condition has been met. The termination condition includes the maximum number of iterations or the change in population trajectory entropy over multiple generations being lower than the stable threshold. If the termination condition is met, output the current global optimal position as the optimal solution of the algorithm; otherwise, recalculate the iteration.

[0046] Compared with existing technologies, the advantages and positive effects of this invention are as follows: For image acquisition noise problems, a three-step denoising method is designed, which combines targeted filtering, improved filtering, and hierarchical weighted fusion, balancing denoising effectiveness with preservation of grain detail; feature extraction employs a convolutional neural network with multi-scale convolution and cross-layer attention fusion, combined with cosine similarity comparison, to achieve feature quantification and judgment; process optimization solves the local optimum problem and accurately outputs optimal process parameters by improving the particle swarm optimization algorithm and introducing dynamic trajectory entropy monitoring and memory backtracking mechanisms. Compared with traditional empirical mapping control methods, this invention achieves quantitative adaptive adjustment of process parameters, significantly improving the stability and consistency of the molding shape and meeting the needs of high-precision industrial production. Attached Figure Description

[0047] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 This is a flowchart illustrating a method for controlling the molding shape during the production of cellulose acetate based on machine vision. Detailed Implementation

[0049] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0050] Numerous specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways than those described herein, and therefore the invention is not limited to the specific embodiments disclosed in the following specification.

[0051] This invention discloses a machine vision-based method for controlling the molding shape during the production of cellulose acetate, as described in the following embodiment. Figure 1 .

[0052] Firstly, an imaging module is installed at the outlet of the reaction vessel in the cellulose acetate precipitation process. This module acquires image data of cellulose acetate particles in the slurry in real time. Specifically, a sealed imaging detection station is constructed at the outlet of the reaction vessel in the cellulose acetate precipitation process, on a straight section of the slurry conveying channel. The imaging module uses an industrial high-speed area array camera paired with a telecentric optical lens. The acquired image data is transmitted in real time to the back-end processing terminal via industrial Ethernet, and a data caching module ensures that image data is retained in the event of transmission interruption.

[0053] Then, image denoising processing is performed on the acquired image data. The image denoising specifically includes the following steps: First, extract the gray-level distribution baseline interval of the cellulose acetate particle image; based on this interval, set a gray-level anomaly judgment threshold; for isolated pixels in the image exceeding the threshold, use a weighted average method based on the effective pixels in their neighborhood for repair, achieving targeted noise filtering. Specifically, extract the gray-level distribution baseline interval of the cellulose acetate particle image, acquire at least 50 frames of standard cellulose acetate images, statistically analyze the gray-level values ​​of pixels in all particle regions, and calculate the gray-level average. and standard deviation Based on the inherent characteristics of the grayscale distribution of cellulose acetate particles, the grayscale distribution reference range is set as follows: Where k is the grayscale range adjustment coefficient, with a value ranging from 1.2 to 1.8; the upper and lower limits of the grayscale distribution baseline range are used as the grayscale anomaly judgment thresholds. When the grayscale value of any pixel in the image to be processed exceeds the grayscale anomaly judgment threshold, the pixel is judged as a suspected noise pixel; for suspected noise pixels, the number of effective pixels in its 3×3 neighborhood is counted. The effective pixels are pixels whose grayscale values ​​are within the grayscale distribution baseline range. If the number of effective pixels is ≥5, the pixel is judged as a real noise pixel, and a weighted average method is used for repair. The repaired pixel grayscale value The calculation method is as follows: ,in, This is the set of valid pixels within a 3×3 neighborhood of a suspected noisy pixel. The coordinates of the valid pixels, The grayscale value of the effective pixel. The weighting coefficients for effective pixels. Representing pixels The value at that location is combined with the grayscale value of the restored pixel to obtain the restored image. The weighting coefficient is negatively correlated with the degree to which the grayscale value of the effective pixel deviates from the average grayscale value of the grain. If the number of effective pixels is less than 5, the pixel is determined to be a detail pixel at the edge of the grain and is not repaired.

[0054] Next, an improved nonlocal mean filter is used to initially suppress Gaussian noise in the image. This improvement uses the minimum pixel size of cellulose acetate particles as the basis for adaptive adjustment of the filtering window to avoid excessive smoothing of particle details. Then, combined with prior information about the spherical contours of cellulose acetate particles, an adaptive Wiener filter kernel function with contour constraints is constructed to sharpen and denoise the motion-blurred regions of the filtered image. Specifically, the minimum pixel size of the cellulose acetate particles is used as the basis for this adjustment. The formula for calculating the filter window size s, which serves as the basis for the adaptive adjustment of the filter window, is as follows: ,in, The rounding function ensures that the filter window size matches the minimum particle size, avoiding excessive smoothing that could lead to loss of particle details; an improved nonlocal mean filter is used to adjust the pixel grayscale values ​​of the processed image. After filtering, the formula for calculating the pixel grayscale value is: ,in, The set of pixels within the filtering window. Let be the pixel coordinates within the filtering window, and h be the filtering smoothing coefficient. The method adaptively matches the dispersion of the gray-level distribution of cellulose acetate particles, effectively suppressing Gaussian noise while reducing interference with the particle gray-level features; based on the prior information of the quasi-spherical contour of cellulose acetate particles, a contour constraint factor is constructed. Used to accurately distinguish between granular regions and background regions in an image, contour constraint factor ,in For the pixels in the filtered image Edge gradient values, These are the maximum and minimum edge gradient values ​​for all pixels in the image, respectively. The value range is from 0 to 1; an adaptive Wiener filter kernel function for contour constraints is constructed based on the contour constraint factor: ,in, For the standard Wiener filter kernel function, These are the filtering weights for the granular region, with values ​​ranging from 1.1 to 1.3. The background region filtering weights range from 0.7 to 0.9. The filtering intensity of different regions is adaptively adjusted by the contour constraint factor. The granular region is weakly filtered to preserve contour details, while the background region is strongly filtered to effectively suppress blur noise. Representing the coordinates of the image in the frequency domain after Fourier transform, u and v correspond to the frequency components in the horizontal and vertical directions, respectively, and are abstract coordinates describing the rate of change of image grayscale. The filtering kernel function described above is used. The filtered image Sharpening and denoising are performed to obtain the filtered result. Point , combined to obtain .

[0055] Finally, layered image weighted fusion is performed. The noise residue and particle detail retention of the images processed in the previous two steps are calculated separately. The combined evaluation result of these two factors is used as a dynamic weighting coefficient to perform pixel-level weighted fusion on the two images, resulting in a denoised cellulose acetate particle image, thus completing the overall image denoising process. Specifically, layered image weighted fusion performs pixel-level fusion on the image after targeted noise filtering and the image after joint suppression of Gaussian motion blur coupled noise, balancing the overall denoising effect with the preservation of cellulose acetate particle details. The comprehensive evaluation index of the two layered processed images is calculated separately: [The text then repeats the calculation of the processed image, which is redundant and can be omitted.] Noise residual amount and grain detail retention ,as well as Noise residual amount and grain detail retention The residual noise level ,in, The total number of pixels in the image to be evaluated. The grayscale value of the corresponding pixel in a noise-free cellulose acetate particle standard image, the particle detail retention ,in, The image to be evaluated is the edge gradient image. The edge gradient image is a standard image of cellulose acetate particles without noise. The closer the D value is to 1, the more complete the particle details are preserved. The dynamic weighting coefficients of the two layered images are calculated: a comprehensive evaluation function F is constructed using the noise residue N and the particle detail preservation degree D. Considering the technical requirements of cellulose acetate particle morphology recognition, the priority of detail preservation is set higher than that of noise suppression. The formula for calculating the comprehensive evaluation function F is: The images were calculated based on the comprehensive evaluation function. Comprehensive evaluation function value ,image Comprehensive evaluation function value Furthermore, the dynamic weight coefficients of the two images are calculated, where the image... The weight is , The weight is Using this weight to and The final denoised cellulose acetate image is obtained by performing a weighted summation.

[0056] Image features are extracted using a convolutional neural network (CNN) algorithm, and the results are compared with standard image features to obtain feature comparison analysis results. The specific implementation of the CNN algorithm for extracting image features is as follows: Local gradient calculation is performed on the feature map after image denoising to obtain a texture complexity matrix. A predefined set of convolutional kernel scales is used, and the weight coefficients of each scale convolutional kernel are calculated based on the texture complexity matrix. The weighted multi-scale convolutional kernels are then used to perform convolution operations on the feature map to obtain a multi-scale fused feature map. This multi-scale fused feature map is input into different convolutional layers of the CNN to extract shallow, mid-level, and deep features, and a cross-layer attention fusion module is constructed to adaptively fuse the three types of features. Finally, an adaptive batch normalization operation is introduced into the cross-layer fused feature map, and it is input into a global average pooling layer to obtain the image feature vector.

[0057] Specifically, local gradient calculation is performed on the standardized feature map to obtain the texture complexity matrix P, where... The feature map is represented by the first... The texture complexity of a location is calculated as follows: ,in, These are the gradient operators for the horizontal and vertical directions, respectively. For the standardized feature map The pixel value at the location. Preset set of convolutional kernel sizes. The weight coefficients of the convolution kernels at each scale are calculated based on the texture complexity matrix P. ,in, correspond The calculation method is as follows: (Three different scales) ,in, For the first The average texture complexity of all pixels within a local image region covered by a convolution kernel of a certain scale.

[0058] The standardized feature map is convolved using a weighted multi-scale convolution kernel to obtain a multi-scale fused feature map. ,in, For the first Convolution operations at various scales.

[0059] Multi-scale fusion feature maps Input is fed into different convolutional layers of a convolutional neural network to extract shallow features. Mid-layer characteristics and deep features , respectively , and Perform global average pooling to obtain the feature vector. , and The feature vectors are mapped to the same dimension through a fully connected layer, and attention weights are calculated. , and And satisfy The calculation method is as follows: Where W is a learnable weight matrix; after upsampling the three types of features to the same size, they are then fused according to attention weights to obtain a cross-layer fused feature map. .

[0060] Finally, the cross-layer fusion feature map was analyzed. Adaptive batch normalization is introduced, which dynamically adjusts the normalization parameters based on the distribution of the feature maps: ,in, To prevent the minimum value where the denominator is 0, These are the mean and variance of the features within the batch, respectively, and will ultimately be... Inputting the global average pooling layer yields a fixed-dimensional image feature vector, thus completing feature extraction.

[0061] Next, the extracted features are compared with standard image features, and the feature calculation is performed using cosine similarity to obtain the comparison analysis results. Based on experience, a mapping table between the feature comparison analysis results and the process parameter adjustment amounts is pre-defined using these results. The range of each process parameter adjustment amount is then retrieved by looking up the mapping table.

[0062] Based on the feature comparison analysis results, a range of process parameter adjustment amounts is generated. Each possible combination of process parameter values ​​within the range is obtained, and the optimal combination of process parameter values ​​is output through an improved particle swarm optimization algorithm. The precipitation process parameters are adjusted to maintain the stability of the cellulose acetate molding morphology.

[0063] Specifically, the range of process parameter adjustment is first obtained, and the running parameters of the particle swarm algorithm are initialized. Each particle represents a set of numerical combinations of cellulose acetate precipitation process parameters.

[0064] In each iteration, for each particle, the continuous historical position trajectory stored within its sliding window is extracted. The trajectory data is then spatially reduced using principal component analysis (PCA). The reduced space is then uniformly gridded, and the distribution frequency of trajectory points within each grid is statistically analyzed. Based on the principle of information entropy, the trajectory entropy of the particle is calculated, and the arithmetic mean of this index for all particles is taken to obtain the trajectory entropy value, which characterizes the overall exploration activity of the population. Specifically, a sliding window of length C is created for each particle to store its position trajectory in subsequent iterations. Initially, the window is filled with the particle's initial position. For the historical trajectories of all particles after each iteration (the combination of process parameters within the sliding window), the dimensionality is reduced to a two-dimensional principal component space using PCA. This two-dimensional principal component space is then uniformly divided into wg grid cells. The number of trajectory points of each particle falling into each grid cell is statistically analyzed, and the probability of each grid cell is calculated. The trajectory entropy of a single particle is calculated using the Shannon entropy formula: ,in Index for the number of grid cells. Let be the number of iterations. Calculate the trajectory entropy for the entire population. As a global optimization status indicator.

[0065] Based on the preset decay coefficient and the current iteration round, the entropy threshold is dynamically decayed and updated. The current population trajectory entropy value is compared with the updated entropy threshold. If the trajectory entropy value is lower than the entropy threshold and this state is maintained for two consecutive generations, the memory backtracking mechanism is activated: a preset number of particles with the lowest trajectory entropy value are selected; for each selected particle, all position points in its historical trajectory are traversed, and only position points that simultaneously meet the following two conditions are retained to form a backtracking point set, including that the fitness of the position point at the time of generation is better than the average fitness of the population at that time, and it is determined to be a sparse region point by spatial neighborhood density analysis; a single backtracking point is selected from the backtracking point set; the current position of the particle is reset to the backtracking point plus a random perturbation that follows a normal distribution. Specifically, the preset initial threshold for trajectory entropy is... The threshold decreases adaptively with the number of iterations: ,in, This is the attenuation coefficient. If... Furthermore, when the trajectory entropy decreases for two consecutive generations of the population, it is determined that the search for process parameters has entered a local optimum, triggering a memory backtracking mechanism. This memory backtracking mechanism includes selecting the Top-K particles with the lowest trajectory entropy in the population as the particles to be backtracked; then, high-potential backtracking points are screened. For each particle to be backtracked, a set of backtracking points that meet the following conditions is selected from its historical trajectory: the fitness of the point at the time of generation is better than the average fitness of the population at that time, and it is determined to be a sparse region point by spatial neighborhood density analysis. The fitness function is the reciprocal of the root mean square error between the actual value and the target value. A single backtracking point with high fitness and low density is selected from the set of backtracking points through a weighted operation. The weighting operation is as follows: fitness weight × fitness + density weight × (1 - density). The particle position is reset, specifically as follows: ,in, With a mean of 0 and a standard deviation of Gaussian distributed random numbers, The value range is from 0.1 to 0.3. This represents the current global optimal value for the population.

[0066] The difference between the current population trajectory entropy value and the preset baseline entropy value is calculated, and the difference is converted into an exploration weight value in the range of 0 to 1 using a mapping function. Develop weight values The value is obtained by subtracting the exploration weight from 1.

[0067] Perform particle velocity updates, retaining the basic component of the original particle velocity scaled by the inertia coefficient; multiply the vector difference between the particle's historical best position and its current position by a first random coefficient and an exploration weight value to form an enhanced individual cognitive component; multiply the vector difference between the global best position and the current position by a second random coefficient and an development weight value to form an enhanced global guidance component; superimpose the basic component, the individual cognitive component, and the global guidance component to generate the updated particle velocity, the specific formula of which is shown below:

[0068] ,in, As a learning factor, A random number between 0 and 1. For particles The best historical location For the best position globally, This is the inertial weight. The new position of the particle is calculated based on the updated velocity, and the individual particle's historical best position and the global best position of the population are dynamically updated based on the fitness evaluation results of the new position.

[0069] Finally, it is checked whether the preset termination condition has been met. The termination condition includes the maximum number of iterations or the change in population trajectory entropy over multiple generations being lower than the stability threshold. If the termination condition is met, the current global optimal position is output as the optimal solution of the algorithm. Otherwise, the calculation is re-iterated, the optimal combination of process parameters is output, the precipitation process parameters are adjusted, and the stable morphology of cellulose acetate is maintained.

[0070] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments for application in other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for controlling the molding shape during the production of cellulose acetate based on machine vision, characterized in that, Includes the following steps: S1. An imaging module is installed at the outlet of the reaction vessel in the cellulose acetate precipitation process. The imaging module collects image data of cellulose acetate particles in the slurry in real time. S2. Perform image denoising processing on the acquired image data; S3. Then, the image features are extracted using a convolutional neural network algorithm and compared with the features of a standard image to obtain the feature comparison analysis results; S4. Based on the feature comparison analysis results, generate the range of process parameter adjustment amounts, obtain each possible combination of process parameter values ​​in the range, and output the optimal combination of process parameter values ​​through the improved particle swarm algorithm to adjust the precipitation process parameters and maintain the stability of the cellulose acetate molding morphology. The image denoising specifically includes the following steps: S21. First, extract the gray-scale distribution baseline range of cellulose acetate particles in the image. Based on this range, set a gray-scale anomaly judgment threshold. For isolated pixels in the image that exceed the threshold, use a weighted average method based on the effective pixels in their neighborhood to repair them, thereby achieving targeted noise filtering. S22. An improved nonlocal mean filter is used to initially suppress Gaussian noise in the image. The improvement method is to use the minimum pixel size of cellulose acetate particles as the basis for adaptive adjustment of the filter window to avoid excessive smoothing of particle micro-details. Then, combined with the prior information of the spherical contour of cellulose acetate particles, an adaptive Wiener filter kernel function with contour constraints is constructed to sharpen and denoise the motion blur region of the filtered image. S23. Layered image weighted fusion: Calculate the noise residue and particle detail retention of the images after processing in steps S21 and S22 respectively. Use the comprehensive evaluation result of the two as a dynamic weight coefficient to perform pixel-level weighted fusion on the two images to obtain the denoised cellulose acetate particle image, thus completing the overall image denoising process.

2. The method for controlling the molding morphology in the production process of cellulose acetate based on machine vision according to claim 1, characterized in that, Step S21 first extracts the grayscale distribution baseline range of the cellulose acetate particle image, sets a grayscale anomaly judgment threshold based on this range, and repairs isolated pixels in the image that exceed the threshold using a weighted average method based on their effective neighboring pixels. The specific implementation of targeted noise filtering is as follows: S211. Extract the gray-scale distribution reference interval of cellulose acetate particles from the particle images. Collect at least 50 standard images of cellulose acetate particles without obvious noise interference, count the gray-scale values ​​of all pixels in the particle region, calculate the gray-scale mean and standard deviation, and set the gray-scale distribution reference interval based on the particle gray-scale distribution characteristics. S212. Set a gray-scale anomaly detection threshold. Use the upper and lower limits of the gray-scale distribution reference range as the gray-scale anomaly detection threshold to determine whether the pixel is a suspected noise pixel. S213. For the identified suspected noise pixels, count the number of valid pixels in their neighborhood, and use a weighted average method for repair. The repaired pixel grayscale values ​​are then used to obtain the repaired image. .

3. The method for controlling the molding morphology in the production process of cellulose acetate based on machine vision according to claim 1, characterized in that, Step S22 employs an improved nonlocal mean filter to initially suppress Gaussian noise in the image. This improvement uses the minimum pixel size of cellulose acetate particles as the basis for adaptive adjustment of the filter window, avoiding excessive smoothing of particle details. Furthermore, combining prior information about the spherical contours of cellulose acetate particles, an adaptive Wiener filter kernel function with contour constraints is constructed. The specific implementation for sharpening and denoising the motion-blurred regions of the filtered image is as follows: S221. Improved nonlocal mean filtering suppresses Gaussian noise. The minimum pixel size of cellulose acetate particles is used as the adaptive adjustment basis for the filtering window. An improved nonlocal mean filter is applied to the image. Perform filtering to obtain the filtered image. ; S222. Based on the prior information of the spherical contour of cellulose acetate particles, a contour constraint factor is constructed, a filtering kernel function is constructed, and the filtering intensity is adaptively adjusted through the contour constraint factor. S223. The filtered image is sharpened and denoised using the above-mentioned filtering kernel function to obtain the filtered image. .

4. The method for controlling the molding morphology in the production process of cellulose acetate based on machine vision according to claim 1, characterized in that, Step S23, layered image weighted fusion, involves calculating the noise residue and particle detail retention of the images processed in steps S21 and S22, respectively. The combined evaluation result of these two factors is used as a dynamic weighting coefficient to perform pixel-level weighted fusion of the two images, resulting in a denoised cellulose acetate particle image. The specific implementation of the overall image denoising process is as follows: S231, calculate separately and Noise residue and particle detail retention; S232. Construct a comprehensive evaluation function based on noise residual amount and particle detail retention; S233. Calculate the dynamic weight coefficients of the two images based on the comprehensive evaluation function; S234. Perform pixel-level weighted fusion on the two images based on dynamic weight coefficients to obtain the final denoised image.

5. The method for controlling the molding morphology in the production process of cellulose acetate based on machine vision according to claim 1, characterized in that, The specific implementation of the convolutional neural network algorithm for extracting image features in step S3 is as follows: S31. Perform local gradient calculation on the feature map after image denoising to obtain the texture complexity matrix; S32. Preset the set of convolution kernel scales, and calculate the weight coefficients of each scale convolution kernel based on the texture complexity matrix; S33. Perform convolution operations on the feature map using weighted multi-scale convolution kernels to obtain a multi-scale fused feature map; S34. Input the multi-scale fused feature map into different convolutional layers of the convolutional neural network to extract shallow, medium and deep features, and construct a cross-layer attention fusion module to adaptively fuse the three types of features. S35. An adaptive batch normalization operation is introduced into the cross-layer fusion feature map and input into the global average pooling layer to obtain the image feature vector.

6. The method for controlling the molding morphology in the production process of cellulose acetate based on machine vision according to claim 5, characterized in that, Step S34 inputs the multi-scale fused feature map into different convolutional layers of the convolutional neural network to extract shallow, mid-level, and deep features, and constructs a cross-layer attention fusion module to adaptively fuse the three types of features, including: S341. Perform global average pooling on the shallow features, mid-level features and deep features respectively to obtain the feature vector; S342. Map the feature vectors to the same dimension through a fully connected layer and calculate the attention weights; S343. After upsampling the three types of features to the same size, they are weighted and fused according to attention weights to obtain a cross-layer fused feature map.

7. The method for controlling the molding morphology in the production process of cellulose acetate based on machine vision according to claim 1, characterized in that, The feature comparison analysis result obtained in step S3 by comparing with standard image features is achieved through cosine similarity.

8. The method for controlling the molding morphology in the production process of cellulose acetate based on machine vision according to claim 1, characterized in that, In step S4, the range of process parameter adjustment amounts is generated based on the feature comparison analysis results. This is achieved by pre-setting a mapping table between the feature comparison analysis results and the process parameter adjustment amounts based on experience, and then querying the mapping table to generate the range of each process parameter adjustment amount.

9. The method for controlling the molding morphology in the production process of cellulose acetate based on machine vision according to claim 1, characterized in that, The specific implementation of the improved particle swarm optimization algorithm outputting the optimal combination of process parameters in step S4 is as follows: S41. Initialize the running parameters of the particle swarm algorithm. Each particle represents a set of numerical combinations of cellulose acetate precipitation process parameters. S42. In each iteration, for each particle, extract the continuous historical position trajectory stored in its sliding window; perform spatial dimensionality reduction processing on the trajectory data through principal component analysis, divide the dimensionality-reduced space into uniform grids, count the distribution frequency of trajectory points in each grid, calculate the trajectory entropy of the particle based on the principle of information entropy, and calculate the arithmetic mean of this index for all particles to obtain the trajectory entropy value that represents the overall exploration activity of the population. S43. Based on the preset decay coefficient and the current iteration round, dynamically decay and update the entropy threshold; compare the current population trajectory entropy value with the updated entropy threshold. If the trajectory entropy value is lower than the entropy threshold and this state is maintained for two consecutive generations, then activate the memory backtracking mechanism: select a preset number of particles with the lowest trajectory entropy value; for each selected particle, traverse all position points in its historical trajectory, and retain only position points that simultaneously meet the following two conditions to form a backtracking point set, including that the fitness of the position point at the time of generation is better than the average fitness of the population at that time, and is determined to be a sparse region point by spatial neighborhood density analysis; select a single backtracking point from the backtracking point set; reset the current position of the particle to the backtracking point superimposed with a random perturbation that follows a normal distribution. S44. Perform a difference operation between the current population trajectory entropy value and the preset baseline entropy value, and convert the difference into an exploration weight value in the range of 0 to 1 through a mapping function. The development weight value is obtained by subtracting the exploration weight value from 1. S45. Perform particle velocity update, retain the basic component of the original particle velocity after scaling by the inertia coefficient; multiply the vector difference between the individual particle's historical best position and the current position by the first random coefficient and the exploration weight value to form the enhanced individual cognitive component; multiply the vector difference between the global best position and the current position by the second random coefficient and the development weight value to form the enhanced global guidance component. The basic component, the individual cognitive component, and the global guidance component are superimposed to generate the updated particle velocity; S46. Calculate the new position of the particle based on the updated velocity, and dynamically refresh the historical best position of the individual particle and the global best position of the population based on the fitness evaluation results of the new position. S47. Detect whether the preset termination condition has been met. The termination condition includes the maximum number of iterations or the change in population trajectory entropy over multiple generations being lower than the stable threshold. If the termination condition is met, output the current global optimal position as the optimal solution of the algorithm; otherwise, recalculate the iteration.