Heparin impurity detection method and system based on Raman spectrum

Through Raman spectroscopy technology and density clustering algorithm, the complexity and real-time problems of traditional heparin impurity detection methods are solved, and the efficient and precise quality control and production process optimization of heparin products are achieved, ensuring the safety and consistency of the products.

CN120507333APending Publication Date: 2025-08-19SHENZHEN NEST IND CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510571797.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

The existing heparin impurity detection methods rely on traditional technology, have complex operations, long detection time, high cost, and are difficult to achieve real-time online monitoring and process optimization, which cannot meet the needs of modern drug production for efficient and real-time quality control.

Method used

Raman spectroscopy technology is adopted to obtain original Raman spectroscopy data, perform data acquisition quality analysis and parameter optimization, build a three-dimensional feature matrix, use density clustering algorithm to identify abnormal spectral features, and optimize production process parameters in combination with production timestamp data to achieve efficient impurity detection and process optimization.

Benefits of technology

Real-time, accurate detection and dynamic process optimization of heparin product quality are achieved, the accuracy and production efficiency of impurity detection are improved, and the quality and safety of heparin products are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120507333A_ABST
    Figure CN120507333A_ABST
Patent Text Reader

Abstract

The invention discloses a heparin impurity detection method and system based on a Raman spectrum. Impurities in heparin production are efficiently detected through a Raman spectrum technology, and a production process is optimized. The method comprises the following steps: firstly, obtaining original Raman spectrum data of a heparin production sample, performing quality analysis, and optimizing data to obtain parameters; extracting spectral data features, and generating a three-dimensional feature matrix; detecting abnormal spectral characteristics by using a density clustering algorithm, identifying impurities, and obtaining impurity detection data; and the impurity change trend is analyzed in combination with production timestamp data, and production process parameters are optimized. According to the method, the impurities can be accurately detected in real time, the production process is dynamically optimized, and the quality and safety of a heparin product are ensured. The system realizes efficient quality control, and has a wide application prospect, especially in the field of biological pharmacy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of impurity detection, and in particular to a heparin impurity detection method and system based on Raman spectroscopy. Background Art

[0002] Heparin is a polysaccharide drug commonly used in anticoagulant therapy and is widely used in clinical practice. However, during the heparin production process, various factors, including raw materials, processes, and equipment, can lead to the presence of impurities in heparin products. Therefore, ensuring the purity and safety of heparin products is a critical task in the pharmaceutical industry.

[0003] Currently, heparin impurity detection typically relies on traditional detection technologies such as high-performance liquid chromatography, mass spectrometry, and infrared spectroscopy. However, these methods have drawbacks such as complex operation, long detection times, and high costs. Furthermore, traditional detection methods are limited in their capabilities for real-time online monitoring and process optimization, making them unable to meet the demand for efficient, real-time quality control in modern pharmaceutical production processes.

[0004] Raman spectroscopy, a non-destructive, rapid, and convenient detection technique, has been widely used in pharmaceutical quality control in recent years. Raman spectroscopy can provide information about the molecular vibrations of a sample, offering significant advantages for structural analysis of biomacromolecules such as heparin. However, existing Raman spectroscopy-based methods for detecting heparin impurities still face challenges in data acquisition quality, spectral analysis, and process optimization. A new method and system is urgently needed to improve the accuracy and efficiency of impurity detection and enable dynamic optimization of the production process.

[0005] The present invention aims to address the deficiencies in the prior art and proposes a heparin impurity detection method and system based on Raman spectroscopy, which can improve the efficiency of production process optimization while ensuring detection accuracy, thereby ensuring the quality and safety of heparin products. Summary of the Invention

[0006] In order to solve at least one of the above technical problems, the present invention proposes a method and system for detecting heparin impurities based on Raman spectroscopy.

[0007] A first aspect of the present invention provides a method for detecting heparin impurities based on Raman spectroscopy, comprising: Acquiring original Raman spectral data of a target heparin production sample of a preset production batch, performing data acquisition quality analysis on the original Raman spectral data, and obtaining data acquisition quality information; Optimizing acquisition parameters of the original Raman spectral data according to the data acquisition quality information, and constructing an acquisition parameter optimization scheme; Acquire Raman spectral data of a preset number of heparin production samples of a preset production batch according to the acquisition parameter optimization scheme, perform feature extraction on the Raman spectral data, and generate a three-dimensional feature matrix; performing abnormal feature detection on the three-dimensional feature matrix based on a density clustering algorithm, identifying abnormal spectral features, and performing heparin impurity detection based on the abnormal spectral features to obtain impurity detection data of the heparin production sample; Obtain production timestamp data of the preset number of heparin production samples, determine heparin production impurity change data of the preset production batch based on the production timestamp data and the impurity detection data, optimize production process parameters based on the heparin production impurity change data, and obtain a production process parameter optimization plan.

[0008] In this solution, the raw Raman spectral data of the target heparin production sample of the preset production batch is obtained, and the data acquisition quality analysis is performed on the raw Raman spectral data to obtain data acquisition quality information, specifically: Obtaining raw Raman spectral data of a target heparin production sample of a preset production batch, performing wavelet transform decomposition on the raw Raman spectral data, extracting high-frequency components of the raw Raman spectral data, and calculating a signal-to-noise ratio of the raw Raman spectral data based on the high-frequency components; Constructing a sliding window of a preset size, setting a moving step of the sliding window, calculating a spectral fluctuation standard deviation of the original Raman spectral data in each moving step of the sliding window based on the sliding window, and evaluating the spectral fluctuation of the original Raman spectral data based on the spectral fluctuation standard deviation; Obtaining a spectral characteristic peak change region of a historical Raman spectrum of a target heparin production sample, freezing the spectral characteristic peak change region in the original Raman spectrum data, performing baseline fitting on the original Raman spectrum data after the characteristic peak region is frozen according to the least squares method, extracting baseline data of the original Raman spectrum data, and calculating a baseline curvature change index of the baseline data; extracting the spectral characteristic peak intensity of the target heparin production sample from the original Raman spectral data, determining the spectral characteristic peak intensity attenuation rate, and calculating the spectral characteristic peak attenuation rate constant based on the attenuation rate; The raw Raman spectral data is scored for data acquisition quality according to the signal-to-noise ratio, spectral fluctuation, baseline curvature change index, and spectral characteristic peak decay rate constant to obtain data acquisition quality information.

[0009] In this solution, the acquisition parameters of the original Raman spectral data are optimized according to the data acquisition quality information, and an acquisition parameter optimization solution is constructed, specifically: Obtaining impurity detection accuracy information for a target heparin production sample, and determining a data acquisition quality threshold for Raman spectroscopy data based on the detection accuracy information; If the data acquisition quality is less than the data acquisition quality threshold, determining an abnormal factor affecting the Raman spectroscopy data acquisition quality according to the data acquisition quality information; If the signal-to-noise ratio is lower than the preset signal-to-noise ratio threshold and the spectral characteristic peak attenuation rate constant is higher than the preset attenuation rate threshold, it is calibrated as an equipment abnormality factor; if the baseline curvature change index exceeds the preset curvature threshold and the spectral characteristic peak intensity attenuation rate is higher than the preset attenuation rate threshold, it is calibrated as a raw material abnormality factor; If the abnormal factor is an equipment abnormality, a mapping relationship between the spectral characteristic peak attenuation rate constant and the spot energy distribution uniformity is established through calibration experiments. Combined with the axial response characteristics of the optical system point spread function, a calculation model for the spectral acquisition angle compensation and the focus depth compensation is constructed. Importing the signal-to-noise ratio and the spectral characteristic peak decay rate constant into the calculation model to determine the angle adjustment parameter and the focus depth adjustment parameter for the Raman spectrometer to acquire Raman spectral data of the target heparin production sample, to obtain first optimized acquisition parameters; If the abnormal factor is a raw material abnormality factor, obtain a multi-wavelength Raman spectrum of the target heparin production sample, obtain the baseline curvature change index of each wavelength Raman spectrum, and determine the fusion weight of each wavelength Raman spectrum according to the baseline curvature change index; Calculating the second-order derivative spectrum of each wavelength Raman spectrum, performing weighted superposition on each second-order derivative spectrum according to the fusion weight, generating a multi-wavelength fused Raman spectrum, and obtaining a second optimized acquisition parameter; The acquisition parameters of the original Raman spectrum data are optimized according to the first optimized acquisition parameters and the second optimized acquisition parameters, and an acquisition parameter optimization scheme is constructed.

[0010] In this solution, the Raman spectral data of a preset number of heparin production samples of a preset production batch are obtained according to the acquisition parameter optimization solution, and the Raman spectral data are subjected to feature extraction to generate a three-dimensional feature matrix, specifically: Optimizing the Raman spectrum acquisition parameters of the target heparin production samples of a preset production batch according to the acquisition parameter optimization scheme to obtain Raman spectrum data of a preset number of target heparin production samples; Performing principal component analysis on the Raman spectral data to extract principal component load vectors reflecting differences in overall spectral morphological distribution, calculating projection coefficients of the Raman spectral data on a preset number of principal components, and generating first characteristic dimension data representing spectral morphological characteristics; Performing local characteristic peak identification on the Raman spectral data within a preset wavenumber range, extracting characteristic peak positions, peak widths, and peak area parameters corresponding to the chemical bond vibration modes of the heparin molecules, constructing a characteristic peak relative intensity ratio matrix based on the coupling relationship of different chemical bond vibration characteristics, and generating second characteristic dimension data representing the chemical bond vibration characteristics; Performing a second-order derivative transformation on the Raman spectral data, extracting the extreme point distribution and curvature change parameters between preset micro-intervals in the second-order derivative spectrum, constructing a microstructure distortion index based on the curvature integral relationship between the extreme points, and generating third characteristic dimension data representing the spectral microstructure characteristics; The first feature dimension data, the second feature dimension data and the third feature dimension data are spatially aligned according to the sample number, and the three-dimensional feature data is mapped to a preset spatial coordinate system by superposition of feature tensors to generate a three-dimensional feature matrix containing the sample spectral morphology, chemical bond vibration and microstructure characteristics.

[0011] In this solution, the density-based clustering algorithm is used to perform abnormal feature detection on the three-dimensional feature matrix, identify abnormal spectral features, and perform heparin impurity detection based on the abnormal spectral features to obtain impurity detection data of heparin production samples, specifically: Performing feature space normalization processing on the three-dimensional feature matrix, constructing an adaptive neighborhood radius calculation model based on the sample feature distribution density, and determining the local density threshold of clustered data points in the density clustering algorithm by using a kernel density estimation method; Based on the spatial distribution distance relationship between each sample point in the three-dimensional feature matrix, a multi-scale density reachability relationship network is established, and the density reachability path length and density transition gradient of each sample point in its neighborhood are calculated. Combined with the morphological feature dimension data extracted by principal component analysis, a density outlier factor reflecting the difference between the local density and the global distribution of the sample is generated; A density clustering algorithm is used to perform cluster analysis on the standardized three-dimensional feature matrix. Cluster boundary conditions are set according to the density outlier factor. Sample points with a density lower than a preset threshold and a distance from the main cluster center exceeding a dynamic threshold are identified as abnormal spectral features. The spectral morphological distortion parameters, chemical bond vibration offset, and microstructure distortion index corresponding to the abnormal features are extracted. A mapping relationship model between abnormal spectral features and heparin impurity components was established. By analyzing the frequency band distribution of chemical bond vibration offsets and the spatial correlation of microstructure distortion indices in the abnormal features, the characteristic response intensity of the impurity components in the Raman spectrum was calculated. The impurity type and concentration were determined based on the matching degree between the characteristic response intensity and the preset impurity standard spectrum. Based on the spatial distribution density of abnormal features in the three-dimensional feature matrix and the calculation results of impurity concentration, an impurity detection confidence evaluation function is constructed. Combined with the number ratio and spatial aggregation of abnormal features in the production batch, impurity detection data is generated. The impurity detection data includes impurity type, concentration and detection confidence index.

[0012] In this solution, the production timestamp data of the preset number of heparin production samples are obtained, the heparin production impurity change data of the preset production batch is determined based on the production timestamp data and the impurity detection data, and the production process parameters are optimized based on the heparin production impurity change data to obtain a production process parameter optimization solution, specifically: Obtaining production timestamp data of the preset number of heparin production samples, performing time series alignment on the impurity detection data according to the production timestamp data, constructing an impurity change trend curve with production time as the horizontal axis and impurity concentration as the vertical axis, and extracting the fluctuation period, peak position, and change gradient of the impurity concentration in the curve; Based on the morphological characteristics of the impurity change trend curve, a correlation model between impurity concentration and production timestamp is established. By analyzing the temporal distribution of the peak position in the curve and the cumulative effect of the change gradient, the change pattern of impurity concentration over production time is determined, and impurity change data reflecting the dynamic changes in impurity concentration within the preset production batch is generated; Obtaining historical records of production process parameters for a preset production batch, constructing a multidimensional mapping matrix between impurity concentration and production process parameters based on the correspondence between the impurity change data and the production process parameters, and determining the key process parameters that cause abnormal changes in impurity concentration by analyzing the influence weights of the production process parameters on the impurity concentration in the mapping matrix; Establish a regression model between key process parameters and impurity concentration changes. Calculate the sensitivity coefficient of process parameter adjustment to impurity concentration changes based on the regression model. Combined with the time series characteristics of concentration fluctuations in impurity change data, generate the process parameter optimization objective function. According to the process parameter optimization objective function, a process parameter optimization search space is constructed, and the optimal solution of the optimization objective function is iteratively solved by the gradient descent method to generate a production process parameter optimization scheme, which includes the adjustment range, adjustment timing and adjustment gradient of key process parameters.

[0013] A second aspect of the present invention further provides a heparin impurity detection system based on Raman spectroscopy, the system comprising: a memory and a processor, wherein the memory includes a heparin impurity detection method program based on Raman spectroscopy, and when the heparin impurity detection method program based on Raman spectroscopy is executed by the processor, the following steps are implemented: Acquiring original Raman spectral data of a target heparin production sample of a preset production batch, performing data acquisition quality analysis on the original Raman spectral data, and obtaining data acquisition quality information; Optimizing acquisition parameters of the original Raman spectral data according to the data acquisition quality information, and constructing an acquisition parameter optimization scheme; Acquire Raman spectral data of a preset number of heparin production samples of a preset production batch according to the acquisition parameter optimization scheme, perform feature extraction on the Raman spectral data, and generate a three-dimensional feature matrix; performing abnormal feature detection on the three-dimensional feature matrix based on a density clustering algorithm, identifying abnormal spectral features, and performing heparin impurity detection based on the abnormal spectral features to obtain impurity detection data of the heparin production sample; Obtain production timestamp data of the preset number of heparin production samples, determine heparin production impurity change data of the preset production batch based on the production timestamp data and the impurity detection data, optimize production process parameters based on the heparin production impurity change data, and obtain a production process parameter optimization plan.

[0014] The present invention discloses a method and system for detecting heparin impurities based on Raman spectroscopy. Raman spectroscopy technology is used to efficiently detect impurities in heparin production and optimize the production process. The method comprises: first, obtaining raw Raman spectral data of heparin production samples, performing quality analysis, and optimizing data acquisition parameters; then, extracting spectral data features to generate a three-dimensional feature matrix; utilizing a density clustering algorithm to detect abnormal spectral features, identify impurities, and obtain impurity detection data; and analyzing impurity variation trends in combination with production timestamp data to optimize production process parameters. This method enables real-time and accurate impurity detection, dynamically optimizes the production process, and ensures the quality and safety of heparin products. The system achieves efficient quality control and has broad application prospects, particularly in the biopharmaceutical field. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A flow chart of a method for detecting heparin impurities based on Raman spectroscopy according to the present invention is shown; Figure 2 A flow chart showing the method of obtaining impurity detection data of heparin production samples according to the present invention is shown; Figure 3 The flowchart of the present invention for obtaining the production process parameter optimization scheme is shown; Figure 4 The block diagram of a heparin impurity detection system based on Raman spectroscopy of the present invention is shown. DETAILED DESCRIPTION

[0016] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present application and the features therein can be combined with each other.

[0017] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present invention is not limited to the specific embodiments disclosed below.

[0018] Figure 1 The flowchart of the method for detecting heparin impurities based on Raman spectroscopy of the present invention is shown.

[0019] like Figure 1 As shown, the first aspect of the present invention provides a method for detecting heparin impurities based on Raman spectroscopy, comprising: S102, obtaining raw Raman spectral data of a target heparin production sample of a preset production batch, performing data acquisition quality analysis on the raw Raman spectral data, and obtaining data acquisition quality information; S104, optimizing acquisition parameters of the original Raman spectrum data according to the data acquisition quality information, and constructing an acquisition parameter optimization scheme; S106, acquiring Raman spectral data of a preset number of heparin production samples of a preset production batch according to the acquisition parameter optimization scheme, performing feature extraction on the Raman spectral data, and generating a three-dimensional feature matrix; S108, performing abnormal feature detection on the three-dimensional feature matrix based on a density clustering algorithm, identifying abnormal spectral features, performing heparin impurity detection based on the abnormal spectral features, and obtaining impurity detection data of the heparin production sample; S110, obtaining production timestamp data of the preset number of heparin production samples, determining heparin production impurity change data of the preset production batch based on the production timestamp data and the impurity detection data, optimizing production process parameters based on the heparin production impurity change data, and obtaining a production process parameter optimization plan.

[0020] It should be noted that by performing data acquisition quality analysis on the acquired raw Raman spectral data, optimizing the acquisition parameters based on the data acquisition quality, identifying and resolving the impact of equipment or raw material abnormalities on data quality, optimizing the spectral acquisition angle, focusing depth and multi-wavelength fusion strategy, the acquisition accuracy and stability of the spectral data are significantly improved, and the accuracy of heparin impurity detection through Raman spectroscopy is improved; after implementing the acquisition parameter optimization scheme, Raman spectral data of a preset batch and a preset number of heparin production samples are obtained for extraction of feature space, which can fully reflect the chemical and structural information of the samples and greatly improve the accuracy of impurity detection; by analyzing the spatial distribution characteristics of the sample points, dynamically determining the local density threshold of the density clustering algorithm, accurately identifying abnormal spectral features, and determining the impurity type and concentration based on the characteristic response intensity of the impurity components, high-sensitivity and high-accuracy impurity detection is achieved, effectively avoiding the problems of false detection and missed detection caused by insufficient feature extraction or inaccurate anomaly detection in traditional methods; by establishing a correlation model between impurity concentration and production timestamp, analyzing the temporal characteristics of impurity changes, and combining the influence weights of process parameters on impurity concentration, a process parameter optimization scheme is generated, which effectively reduces impurity concentration and improves product quality and production efficiency.

[0021] According to an embodiment of the present invention, the raw Raman spectral data of a target heparin production sample of a preset production batch is obtained, and data acquisition quality analysis is performed on the raw Raman spectral data to obtain data acquisition quality information, specifically: Obtaining raw Raman spectral data of a target heparin production sample of a preset production batch, performing wavelet transform decomposition on the raw Raman spectral data, extracting high-frequency components of the raw Raman spectral data, and calculating a signal-to-noise ratio of the raw Raman spectral data based on the high-frequency components; Constructing a sliding window of a preset size, setting a moving step of the sliding window, calculating a spectral fluctuation standard deviation of the original Raman spectral data in each moving step of the sliding window based on the sliding window, and evaluating the spectral fluctuation of the original Raman spectral data based on the spectral fluctuation standard deviation; Obtaining a spectral characteristic peak change region of a historical Raman spectrum of a target heparin production sample, freezing the spectral characteristic peak change region in the original Raman spectrum data, performing baseline fitting on the original Raman spectrum data after the characteristic peak region is frozen according to the least squares method, extracting baseline data of the original Raman spectrum data, and calculating a baseline curvature change index of the baseline data; extracting the spectral characteristic peak intensity of the target heparin production sample from the original Raman spectral data, determining the spectral characteristic peak intensity attenuation rate, and calculating the spectral characteristic peak attenuation rate constant based on the attenuation rate; The raw Raman spectral data is scored for data acquisition quality according to the signal-to-noise ratio, spectral fluctuation, baseline curvature change index, and spectral characteristic peak decay rate constant to obtain data acquisition quality information.

[0022] It should be noted that the characteristic peak change area in the original Raman spectral data is frozen to prevent the real signal from being misjudged as the baseline; the data acquisition quality information includes each data acquisition quality assessment characteristic value and the data acquisition quality score, and the data acquisition quality assessment characteristics include signal-to-noise ratio, spectral fluctuation, baseline curvature change index, and spectral characteristic peak decay rate constant. Scoring based on multiple indicators such as signal-to-noise ratio, spectral fluctuation, baseline curvature change index, and decay rate constant helps to comprehensively assess data quality and ensure that the acquired data is more accurate and reliable. This can effectively avoid potential problems that may be overlooked in single indicator evaluation, improve the credibility of the overall test results, and based on the scoring results, timely feedback on data quality issues can be provided to provide a basis for optimizing acquisition parameters. When it is found that the data quality does not meet the standards, the parameters in the acquisition process can be adjusted.

[0023] According to an embodiment of the present invention, the acquisition parameters of the original Raman spectrum data are optimized according to the data acquisition quality information to construct an acquisition parameter optimization scheme, specifically: Obtaining impurity detection accuracy information for a target heparin production sample, and determining a data acquisition quality threshold for Raman spectroscopy data based on the detection accuracy information; If the data acquisition quality is less than the data acquisition quality threshold, determining an abnormal factor affecting the Raman spectroscopy data acquisition quality according to the data acquisition quality information; If the signal-to-noise ratio is lower than the preset signal-to-noise ratio threshold and the spectral characteristic peak attenuation rate constant is higher than the preset attenuation rate threshold, it is calibrated as an equipment abnormality factor; if the baseline curvature change index exceeds the preset curvature threshold and the spectral characteristic peak intensity attenuation rate is higher than the preset attenuation rate threshold, it is calibrated as a raw material abnormality factor; It should be noted that when the data acquisition quality is less than the data acquisition quality threshold, it is considered that the accuracy of heparin impurity detection obtained by the Raman spectrum based on the current acquisition parameters cannot meet the detection requirements. Therefore, it is necessary to optimize the Raman spectrum acquisition parameters to determine the abnormal factors affecting the quality of Raman spectrum data acquisition; when the signal-to-noise ratio is insufficient, it indicates that the signal acquisition system has light source intensity attenuation or optical component misalignment (such as objective lens contamination or laser power reduction), and the abnormal characteristic peak decay rate indicates that the focus depth offset leads to uneven energy distribution of the excitation spot. At this time, it can be considered that the quality of Raman spectrum data acquisition is reduced due to abnormal factors of the equipment; the sudden change of baseline curvature reflects the presence of fluorescence background interference or impurity adsorption in the sample, and the abnormal characteristic peak decay rate indicates that the uneven composition of the raw material leads to changes in the Raman scattering cross section. At this time, it can be considered that the abnormality of the raw material causes the quality of Raman spectrum data acquisition to decline.

[0024] If the abnormal factor is an equipment abnormality, a mapping relationship between the spectral characteristic peak attenuation rate constant and the spot energy distribution uniformity is established through calibration experiments. Combined with the axial response characteristics of the optical system point spread function, a calculation model for the spectral acquisition angle compensation and the focus depth compensation is constructed. Importing the signal-to-noise ratio and the spectral characteristic peak decay rate constant into the calculation model to determine the angle adjustment parameter and the focus depth adjustment parameter for the Raman spectrometer to acquire Raman spectral data of the target heparin production sample, to obtain first optimized acquisition parameters; It's important to note that in Raman spectroscopy data acquisition, the uniformity and intensity distribution of the laser spot directly impact the clarity and attenuation of the spectral characteristic peaks. When the spot energy distribution is uneven, the characteristic peaks in the spectrum may experience variations in their decay rate, resulting in peak signal attenuation or distortion. Therefore, calibration experiments are conducted to determine the relationship between the spot energy distribution and the decay rate of the spectral characteristic peaks. The point spread function (PSF) is the response function of an optical system to the imaging of an ideal point light source. It represents the intensity distribution of the point light source on the image plane after passing through the optical system. The axial response characteristic refers to the variation of the PSF along the optical axis (i.e., the focal depth), reflecting the imaging quality of the optical system at different focal depths. The PSF of an optical system will vary at different acquisition angles and focal depths, thus affecting the quality of spectral acquisition. By analyzing the axial response characteristics of an optical system, we can understand how the PSF varies at different focal depths. By combining the uniformity of the spot energy distribution with the axial response characteristics of the optical system's PSF, we can construct a comprehensive compensation model for spectral acquisition angles and focal depths. Based on experimental calibration data, this model uses mathematical relationships to derive how to adjust the spot distribution and spectral signal during acquisition under specific angles and focal depths. This compensation model can help optimize spectrometer acquisition parameters, maximize data quality, and reduce data errors caused by device anomalies. Calibration experiments use a controlled variable method to simulate device offsets (such as angular tilt, focal depth offset, and laser power attenuation) or environmental disturbances under known device conditions (such as a standard light source, a contaminant-free mirror, and an ideal temperature and humidity environment) to collect Raman spectral data under different parameter combinations.

[0025] If the abnormal factor is a raw material abnormality factor, obtain a multi-wavelength Raman spectrum of the target heparin production sample, obtain the baseline curvature change index of each wavelength Raman spectrum, and determine the fusion weight of each wavelength Raman spectrum according to the baseline curvature change index; Calculating the second-order derivative spectrum of each wavelength Raman spectrum, performing weighted superposition on each second-order derivative spectrum according to the fusion weight, generating a multi-wavelength fused Raman spectrum, and obtaining a second optimized acquisition parameter; The acquisition parameters of the original Raman spectrum data are optimized according to the first optimized acquisition parameters and the second optimized acquisition parameters, and an acquisition parameter optimization scheme is constructed.

[0026] It should be noted that raw materials (e.g., different batches of heparin production samples) may vary due to composition, impurities, or physicochemical properties, leading to variations in the baseline curvature and characteristic peaks of the Raman spectrum. These variations may manifest as signal attenuation, peak shifts, or other irregular spectral features. A single-wavelength Raman spectrum may not fully capture these variations, resulting in reduced detection accuracy. Therefore, acquiring Raman spectra at multiple wavelengths allows for the observation of the impact of raw material anomalies on the spectrum from multiple perspectives. During the fusion process, the fusion weight is determined based on the baseline curvature variation index of each wavelength spectrum. This allows for weighted superposition of the spectral characteristic variations at different wavelengths to generate a multi-wavelength fused Raman spectrum. This fusion method overcomes the limitations of single-wavelength data and enables more accurate identification of anomalies. By calculating the second-order derivative spectrum of each wavelength spectrum and performing weighted superposition, the spectral resolution can be improved, further revealing subtle variations caused by raw material anomalies. The multiple wavelengths described are pre-set wavelengths.

[0027] According to an embodiment of the present invention, the Raman spectral data of a preset number of heparin production samples of a preset production batch are obtained according to the acquisition parameter optimization scheme, and feature extraction is performed on the Raman spectral data to generate a three-dimensional feature matrix, specifically: Optimizing the Raman spectrum acquisition parameters of the target heparin production samples of a preset production batch according to the acquisition parameter optimization scheme to obtain Raman spectrum data of a preset number of target heparin production samples; Performing principal component analysis on the Raman spectral data to extract principal component load vectors reflecting differences in overall spectral morphological distribution, calculating projection coefficients of the Raman spectral data on a preset number of principal components, and generating first characteristic dimension data representing spectral morphological characteristics; Performing local characteristic peak identification on the Raman spectral data within a preset wavenumber range, extracting characteristic peak positions, peak widths, and peak area parameters corresponding to the chemical bond vibration modes of the heparin molecules, constructing a characteristic peak relative intensity ratio matrix based on the coupling relationship of different chemical bond vibration characteristics, and generating second characteristic dimension data representing the chemical bond vibration characteristics; Performing a second-order derivative transformation on the Raman spectral data, extracting the extreme point distribution and curvature change parameters between preset micro-intervals in the second-order derivative spectrum, constructing a microstructure distortion index based on the curvature integral relationship between the extreme points, and generating third characteristic dimension data representing the spectral microstructure characteristics; The first feature dimension data, the second feature dimension data and the third feature dimension data are spatially aligned according to the sample number, and the three-dimensional feature data is mapped to a preset spatial coordinate system by superposition of feature tensors to generate a three-dimensional feature matrix containing the sample spectral morphology, chemical bond vibration and microstructure characteristics.

[0028] It should be noted that principal component analysis (PCA) extracts the overall spectral morphology, effectively capturing differences in macroscopic spectral distributions between samples. Local characteristic peak identification extracts chemical bond vibrational features, combining characteristic peak position, peak width, and peak area parameters to construct a relative intensity ratio matrix, accurately reflecting the vibrational modes of the heparin molecule's chemical bonds and their interactions. Second-order derivative transformation eliminates baseline drift and enhances spectral microstructure resolution. Combining extreme point distribution and curvature integral constructs a microstructure distortion index, enabling the detection of subtle structural distortions in the spectrum and improving the ability to identify microstructural anomalies caused by impurities. Finally, a three-dimensional characteristic matrix integrates spectral morphology, chemical bond vibration, and microstructure features in a spatial coordinate system, constructing a multidimensional, multiscale feature expression system that significantly improves the coverage and accuracy of impurity detection. Spectral morphology refers to the shape, distribution, and variation of the Raman spectrum within the overall wavenumber range. Chemical bond vibrational features include characteristic peak position, intensity, width, and shape. Microstructure features include the subtle peak-to-valley distribution, curvature variation, micro-area resolution, and distortion index of the spectrum.

[0029] Figure 2 The flowchart of the present invention for obtaining impurity detection data of heparin production samples is shown.

[0030] According to an embodiment of the present invention, the density-based clustering algorithm performs abnormal feature detection on the three-dimensional feature matrix, identifies abnormal spectral features, and performs heparin impurity detection based on the abnormal spectral features to obtain impurity detection data of heparin production samples, specifically: S202, performing feature space normalization processing on the three-dimensional feature matrix, constructing an adaptive neighborhood radius calculation model based on sample feature distribution density, and determining a local density threshold of clustered data points in a density clustering algorithm by a kernel density estimation method; S204: Based on the spatial distribution distance relationship between each sample point in the three-dimensional feature matrix, a multi-scale density reachability relationship network is established, and the density reachability path length and density transition gradient of each sample point in its neighborhood are calculated. Combined with the morphological feature dimension data extracted by principal component analysis, a density outlier factor is generated to reflect the difference between the local density and the global distribution of the sample; S206, performing cluster analysis on the standardized three-dimensional feature matrix using a density clustering algorithm, setting cluster boundary conditions based on a density outlier factor, identifying sample points whose density is lower than a preset threshold and whose distance from the main cluster center exceeds a dynamic threshold as abnormal spectral features, and extracting spectral morphological distortion parameters, chemical bond vibration offsets, and microstructure distortion indices corresponding to the abnormal features; S208, establishing a mapping relationship model between abnormal spectral features and heparin impurity components, calculating the characteristic response intensity of the impurity component in the Raman spectrum by analyzing the frequency band distribution of the chemical bond vibration offset and the spatial correlation of the microstructure distortion index in the abnormal features, and determining the impurity type and concentration based on the matching degree of the characteristic response intensity with the preset impurity standard spectrum; S210, based on the spatial distribution density of abnormal features in the three-dimensional feature matrix and the calculation results of impurity concentration, construct an impurity detection confidence evaluation function, and generate impurity detection data in combination with the number ratio and spatial aggregation of abnormal features in the production batch. The impurity detection data includes impurity type, concentration and detection confidence index.

[0031] It should be noted that the density clustering algorithm combined with the adaptive neighborhood radius and kernel density estimation method can dynamically adapt to the characteristic distribution differences of samples from different batches, effectively distinguish normal spectral features from abnormal spectral features caused by impurities, and significantly improve the sensitivity and anti-interference ability of anomaly detection; through multi-scale density reachable relationship network and density outlier factor analysis, the local density and global distribution differences of sample points are accurately quantified, and the multi-dimensional data of spectral morphology, chemical bond vibration and microstructure characteristics are combined to enhance the recognition ability of complex impurity features; through dynamic threshold setting and main cluster center distance constraint, abnormal samples in low-density areas are accurately located; through the confidence evaluation function, the spatial distribution density of abnormal features and the degree of aggregation within the production batch are quantified to generate detection data containing impurity type, concentration and confidence index; feature space normalization processing refers to the unified normalization processing of the feature data of each dimension in the three-dimensional feature matrix to eliminate the dimensional differences and numerical range differences between different feature dimensions. The sample feature is each feature data point in the three-dimensional feature matrix.

[0032] Figure 3 The flowchart of the present invention for obtaining the production process parameter optimization solution is shown.

[0033] According to an embodiment of the present invention, obtaining the production timestamp data of the preset number of heparin production samples, determining the heparin production impurity change data of the preset production batch based on the production timestamp data and the impurity detection data, and optimizing the production process parameters based on the heparin production impurity change data to obtain a production process parameter optimization plan, specifically: S302, obtaining production timestamp data of the preset number of heparin production samples, performing time series alignment on the impurity detection data based on the production timestamp data, constructing an impurity change trend curve with production time as the horizontal axis and impurity concentration as the vertical axis, and extracting the fluctuation period, peak position, and change gradient of the impurity concentration in the curve; S304: Based on the morphological characteristics of the impurity change trend curve, a correlation model between impurity concentration and production timestamp is established. By analyzing the temporal distribution of the peak position in the curve and the cumulative effect of the change gradient, the change pattern of the impurity concentration over the production time is determined, and impurity change data reflecting the dynamic changes in impurity concentration within the preset production batch is generated; S306, obtaining historical records of production process parameters for a preset production batch, constructing a multidimensional mapping matrix between impurity concentration and production process parameters based on the correspondence between the impurity change data and the production process parameters, and determining the key process parameters that cause abnormal changes in impurity concentration by analyzing the influence weights of the production process parameters on the impurity concentration in the mapping matrix; S308, establishing a regression model between key process parameters and impurity concentration changes, calculating the sensitivity coefficient of process parameter adjustment to impurity concentration changes based on the regression model, and generating a process parameter optimization objective function based on the time series characteristics of concentration fluctuations in the impurity change data; S310, constructing a process parameter optimization search space based on the process parameter optimization objective function, iteratively solving the optimal solution of the optimization objective function through the gradient descent method, and generating a production process parameter optimization plan, the plan including the adjustment range, adjustment timing and adjustment gradient of the key process parameters.

[0034] It should be noted that by aligning time series and constructing impurity trend curves, the dynamic fluctuation patterns of impurity concentrations within production batches can be accurately captured, revealing the correlation between impurity concentrations and production time, and quickly locating key time points during the production process where impurity abnormalities accumulate. By establishing a multidimensional mapping matrix between impurity concentrations and process parameters, key parameters (such as reaction temperature and stirring speed) that lead to abnormal impurity concentrations can be identified. A regression model is used to calculate the sensitivity coefficients of process parameter adjustments, and an optimization objective function is generated based on time series characteristics. This allows for quantitative evaluation of the effectiveness of different parameter adjustment strategies in suppressing impurity concentration changes. An optimization solution is iteratively solved using the gradient descent method, combined with the operating constraints of production equipment, to ensure that the generated optimization solution is operational in actual production, enabling dynamic adjustment of key process parameters (such as staged adjustment of temperature gradients or stirring rates), thereby effectively reducing impurity concentrations and improving product quality stability and batch consistency. The production process parameters include reaction temperature, reaction time, reaction pressure, reaction pH, raw material concentration, additive dosage, stirring speed, mixing uniformity, separation temperature, purification time, filtration pressure, production environment temperature, and production environment humidity.

[0035] According to an embodiment of the present invention, the further embodiment includes: Obtain the Raman spectrum signal of the residual sample in the detection window after the heparin impurity detection device switches to the heparin impurity detection production line, and match it with the specific spectrum fingerprint of heparin from the previous impurity detection production line; The specific spectral fingerprint is generated by analyzing the weak characteristic peaks of the principal components of at least three non-heparin Raman spectral data in historical pure samples and their relative intensity ratios. The matching degree is calculated using a normalized residual square sum algorithm. When the matching degree exceeds a first threshold, it is determined that there is a risk of cross contamination. If there is a risk of cross-contamination, a low-power laser is used to scan the detection window to obtain a residual spectrum. The deviation between the residual spectrum and the heparin Raman spectral signal fingerprint of the cross-contamination risk impurity detection production line is calculated. The cleaning intensity and duration of the high-pressure nitrogen pulse are then adjusted based on the deviation. After cleaning, the verification is repeated until the residual spectrum match is lower than the second threshold. When extracting features from Raman spectral data from impurity testing batches, a production line compliance verification dimension is added. This dimension is assigned a value based on the degree of match between the heparin Raman spectrum of the current testing line and the fingerprint of the target line. After constructing a three-dimensional feature matrix, it is expanded into a four-dimensional matrix containing the production line compliance identifier. By modifying the distance metric function of the density clustering algorithm, a distance penalty term is applied to cross-production line samples to block the density propagation path between samples from different production lines. Density clustering analysis is performed based on the reconstructed four-dimensional feature matrix, retaining only sample clusters with consistent production line compliance identification. The spectral morphological distortion, chemical bond vibration offset, and microstructure distortion index of the samples within the cluster are calculated, and the true impurity characteristics are identified in combination with the preset impurity standard spectral library.

[0036] It's important to note that in pharmaceutical companies operating multiple production lines, heparin products from different lines can share the same Raman detection equipment, leading to cross-contamination. For example, when the equipment switches from testing low-molecular-weight heparin from Line A to standard heparin from Line B, trace amounts of residual sample from Line A can adhere to the detection window surface, and its Raman signal (such as the characteristic peak at 1680 cm⁻¹) may be mistakenly identified as an impurity peak from Line B. Traditional methods, lacking dynamic contamination identification mechanisms and cross-line feature isolation strategies, result in a high rate of false positives. This solution solves this problem through dynamic production line fingerprint matching and closed-loop cleaning verification: First, a unique spectral fingerprint is generated based on the weak characteristic peaks of non-heparin main components in historical pure samples (such as the 750cm⁻¹, 1120cm⁻¹ and 1550cm⁻¹ peaks of excipients) and their relative intensity ratios. When the equipment switches batches, the residual signal is immediately acquired by scanning the detection window with a low-power laser. The normalized residual square sum algorithm is used to calculate its matching degree with the fingerprint of the previous production line. If the threshold is exceeded, the graded cleaning process is triggered - the intensity and duration of the high-pressure nitrogen pulse are dynamically adjusted according to the deviation value, and the verification is repeated until the residual signal matching degree drops below the safety threshold; then the current production line is cleaned. When extracting features from sample spectral data, a production line compliance verification dimension is added. This dimension is dynamically assigned a value based on the degree of match between the spectrum and the target production line fingerprint. A four-dimensional feature matrix containing this dimension is constructed. The density propagation of contamination signals is blocked by modifying the distance metric function of the density clustering algorithm (sampling cross-production line distances by a factor of 1.5). Finally, only sample clusters with consistent compliance identification are analyzed for spectral morphological distortion (principal component projection offset), chemical bond vibration shifts (wavenumber differences), and microstructural distortion (second-order derivative curvature anomalies). True impurities are identified by combining with a pre-set impurity spectral library. Traceability data, such as contamination match degree and number of cleanings, is embedded in the test report to ensure traceability of the results. This method significantly reduces the false detection rate of cross-contamination and enables precise quality control of collaborative testing across multiple production lines.

[0037] Figure 4 The block diagram of a heparin impurity detection system based on Raman spectroscopy of the present invention is shown.

[0038] A second aspect of the present invention further provides a heparin impurity detection system 4 based on Raman spectroscopy, the system comprising: a memory 41 and a processor 42, wherein the memory includes a heparin impurity detection method program based on Raman spectroscopy, and when the heparin impurity detection method program based on Raman spectroscopy is executed by the processor, the following steps are implemented: Acquiring original Raman spectral data of a target heparin production sample of a preset production batch, performing data acquisition quality analysis on the original Raman spectral data, and obtaining data acquisition quality information; Optimizing acquisition parameters of the original Raman spectral data according to the data acquisition quality information, and constructing an acquisition parameter optimization scheme; Acquire Raman spectral data of a preset number of heparin production samples of a preset production batch according to the acquisition parameter optimization scheme, perform feature extraction on the Raman spectral data, and generate a three-dimensional feature matrix; performing abnormal feature detection on the three-dimensional feature matrix based on a density clustering algorithm, identifying abnormal spectral features, and performing heparin impurity detection based on the abnormal spectral features to obtain impurity detection data of the heparin production sample; Obtain production timestamp data of the preset number of heparin production samples, determine heparin production impurity change data of the preset production batch based on the production timestamp data and the impurity detection data, optimize production process parameters based on the heparin production impurity change data, and obtain a production process parameter optimization plan.

[0039] The present invention discloses a method and system for detecting heparin impurities based on Raman spectroscopy. Raman spectroscopy technology is used to efficiently detect impurities in heparin production and optimize the production process. The method comprises: first, obtaining raw Raman spectral data of heparin production samples, performing quality analysis, and optimizing data acquisition parameters; then, extracting spectral data features to generate a three-dimensional feature matrix; utilizing a density clustering algorithm to detect abnormal spectral features, identify impurities, and obtain impurity detection data; and analyzing impurity variation trends in combination with production timestamp data to optimize production process parameters. This method enables real-time and accurate impurity detection, dynamically optimizes the production process, and ensures the quality and safety of heparin products. The system achieves efficient quality control and has broad application prospects, particularly in the biopharmaceutical field.

[0040] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0041] Alternatively, if the integrated units described above are implemented as software modules and sold or used as standalone products, they can also be stored on a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present invention, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product, stored on a storage medium, includes instructions for enabling a computer device (such as a personal computer, server, or network device) to execute all or part of the methods described in various embodiments of the present invention. The aforementioned storage media include various media capable of storing program code, such as removable storage devices, ROM, RAM, magnetic disks, or optical disks.

[0042] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A method for detecting heparin impurities based on Raman spectroscopy, characterized in that: The following steps are involved: Acquiring original Raman spectral data of a target heparin production sample of a preset production batch, performing data acquisition quality analysis on the original Raman spectral data, and obtaining data acquisition quality information; Optimizing acquisition parameters of the original Raman spectral data according to the data acquisition quality information, and constructing an acquisition parameter optimization scheme; Acquire Raman spectral data of a preset number of heparin production samples of a preset production batch according to the acquisition parameter optimization scheme, perform feature extraction on the Raman spectral data, and generate a three-dimensional feature matrix; performing abnormal feature detection on the three-dimensional feature matrix based on a density clustering algorithm, identifying abnormal spectral features, and performing heparin impurity detection based on the abnormal spectral features to obtain impurity detection data of the heparin production sample; Obtain production timestamp data of the preset number of heparin production samples, determine heparin production impurity change data of the preset production batch based on the production timestamp data and the impurity detection data, optimize production process parameters based on the heparin production impurity change data, and obtain a production process parameter optimization plan.

2. The method for detecting heparin impurities based on Raman spectroscopy according to claim 1, wherein: The original Raman spectral data of the target heparin production sample of the preset production batch is obtained, and data acquisition quality analysis is performed on the original Raman spectral data to obtain data acquisition quality information, specifically: Obtaining raw Raman spectral data of a target heparin production sample of a preset production batch, performing wavelet transform decomposition on the raw Raman spectral data, extracting high-frequency components of the raw Raman spectral data, and calculating a signal-to-noise ratio of the raw Raman spectral data based on the high-frequency components; Constructing a sliding window of a preset size, setting a moving step of the sliding window, calculating a spectral fluctuation standard deviation of the original Raman spectral data in each moving step of the sliding window based on the sliding window, and evaluating the spectral fluctuation of the original Raman spectral data based on the spectral fluctuation standard deviation; Obtaining a spectral characteristic peak change region of a historical Raman spectrum of a target heparin production sample, freezing the spectral characteristic peak change region in the original Raman spectrum data, performing baseline fitting on the original Raman spectrum data after the characteristic peak region is frozen according to the least squares method, extracting baseline data of the original Raman spectrum data, and calculating a baseline curvature change index of the baseline data; extracting the spectral characteristic peak intensity of the target heparin production sample from the original Raman spectral data, determining the spectral characteristic peak intensity attenuation rate, and calculating the spectral characteristic peak attenuation rate constant based on the attenuation rate; The raw Raman spectral data is scored for data acquisition quality according to the signal-to-noise ratio, spectral fluctuation, baseline curvature change index, and spectral characteristic peak decay rate constant to obtain data acquisition quality information.

3. The method for detecting heparin impurities based on Raman spectroscopy according to claim 2, wherein: The acquisition parameters of the original Raman spectrum data are optimized according to the data acquisition quality information, and an acquisition parameter optimization scheme is constructed, specifically: Obtaining impurity detection accuracy information for a target heparin production sample, and determining a data acquisition quality threshold for Raman spectroscopy data based on the detection accuracy information; If the data acquisition quality is less than the data acquisition quality threshold, determining an abnormal factor affecting the Raman spectroscopy data acquisition quality according to the data acquisition quality information; If the signal-to-noise ratio is lower than the preset signal-to-noise ratio threshold and the spectral characteristic peak attenuation rate constant is higher than the preset attenuation rate threshold, it is calibrated as an equipment abnormality factor; if the baseline curvature change index exceeds the preset curvature threshold and the spectral characteristic peak intensity attenuation rate is higher than the preset attenuation rate threshold, it is calibrated as a raw material abnormality factor; If the abnormal factor is an equipment abnormality, a mapping relationship between the spectral characteristic peak attenuation rate constant and the spot energy distribution uniformity is established through calibration experiments. Combined with the axial response characteristics of the optical system point spread function, a calculation model for the spectral acquisition angle compensation and the focus depth compensation is constructed. Importing the signal-to-noise ratio and the spectral characteristic peak decay rate constant into the calculation model to determine the angle adjustment parameter and the focus depth adjustment parameter for the Raman spectrometer to acquire Raman spectral data of the target heparin production sample, to obtain first optimized acquisition parameters; If the abnormal factor is a raw material abnormality factor, obtain a multi-wavelength Raman spectrum of the target heparin production sample, obtain the baseline curvature change index of each wavelength Raman spectrum, and determine the fusion weight of each wavelength Raman spectrum according to the baseline curvature change index; Calculating the second-order derivative spectrum of each wavelength Raman spectrum, performing weighted superposition on each second-order derivative spectrum according to the fusion weight, generating a multi-wavelength fused Raman spectrum, and obtaining a second optimized acquisition parameter; The acquisition parameters of the original Raman spectrum data are optimized according to the first optimized acquisition parameters and the second optimized acquisition parameters, and an acquisition parameter optimization scheme is constructed.

4. The method for detecting heparin impurities based on Raman spectroscopy according to claim 1, wherein: The Raman spectral data of a preset number of heparin production samples of a preset production batch are obtained according to the acquisition parameter optimization scheme, and feature extraction is performed on the Raman spectral data to generate a three-dimensional feature matrix, specifically: Optimizing the Raman spectrum acquisition parameters of the target heparin production samples of a preset production batch according to the acquisition parameter optimization scheme to obtain Raman spectrum data of a preset number of target heparin production samples; Performing principal component analysis on the Raman spectral data to extract principal component load vectors reflecting differences in overall spectral morphological distribution, calculating projection coefficients of the Raman spectral data on a preset number of principal components, and generating first characteristic dimension data representing spectral morphological characteristics; Performing local characteristic peak identification on the Raman spectral data within a preset wavenumber range, extracting characteristic peak positions, peak widths, and peak area parameters corresponding to the chemical bond vibration modes of the heparin molecules, constructing a characteristic peak relative intensity ratio matrix based on the coupling relationship of different chemical bond vibration characteristics, and generating second characteristic dimension data representing the chemical bond vibration characteristics; Performing a second-order derivative transformation on the Raman spectral data, extracting the extreme point distribution and curvature change parameters between preset micro-intervals in the second-order derivative spectrum, constructing a microstructure distortion index based on the curvature integral relationship between the extreme points, and generating third characteristic dimension data representing the spectral microstructure characteristics; The first feature dimension data, the second feature dimension data and the third feature dimension data are spatially aligned according to the sample number, and the three-dimensional feature data is mapped to a preset spatial coordinate system by superposition of feature tensors to generate a three-dimensional feature matrix containing the sample spectral morphology, chemical bond vibration and microstructure characteristics.

5. The method for detecting heparin impurities based on Raman spectroscopy according to claim 1, wherein: The density-based clustering algorithm is used to perform abnormal feature detection on the three-dimensional feature matrix, identify abnormal spectral features, and perform heparin impurity detection based on the abnormal spectral features to obtain impurity detection data of heparin production samples, specifically: Performing feature space normalization processing on the three-dimensional feature matrix, constructing an adaptive neighborhood radius calculation model based on the sample feature distribution density, and determining the local density threshold of clustered data points in the density clustering algorithm by using a kernel density estimation method; Based on the spatial distribution distance relationship between each sample point in the three-dimensional feature matrix, a multi-scale density reachability relationship network is established, and the density reachability path length and density transition gradient of each sample point in its neighborhood are calculated. Combined with the morphological feature dimension data extracted by principal component analysis, a density outlier factor reflecting the difference between the local density and the global distribution of the sample is generated; A density clustering algorithm is used to perform cluster analysis on the standardized three-dimensional feature matrix. Cluster boundary conditions are set according to the density outlier factor. Sample points with a density lower than a preset threshold and a distance from the main cluster center exceeding a dynamic threshold are identified as abnormal spectral features. The spectral morphological distortion parameters, chemical bond vibration offset, and microstructure distortion index corresponding to the abnormal features are extracted. A mapping relationship model between abnormal spectral features and heparin impurity components was established. By analyzing the frequency band distribution of chemical bond vibration offsets and the spatial correlation of microstructure distortion indices in the abnormal features, the characteristic response intensity of the impurity components in the Raman spectrum was calculated. The impurity type and concentration were determined based on the matching degree between the characteristic response intensity and the preset impurity standard spectrum. Based on the spatial distribution density of abnormal features in the three-dimensional feature matrix and the calculation results of impurity concentration, an impurity detection confidence evaluation function is constructed. Combined with the number ratio and spatial aggregation of abnormal features in the production batch, impurity detection data is generated. The impurity detection data includes impurity type, concentration and detection confidence index.

6. The method for detecting heparin impurities based on Raman spectroscopy according to claim 1, characterized in that: The obtaining of production timestamp data of the preset number of heparin production samples, determining heparin production impurity change data of the preset production batch based on the production timestamp data and the impurity detection data, and optimizing production process parameters based on the heparin production impurity change data to obtain a production process parameter optimization plan, specifically comprises: Obtaining production timestamp data of the preset number of heparin production samples, performing time series alignment on the impurity detection data according to the production timestamp data, constructing an impurity change trend curve with production time as the horizontal axis and impurity concentration as the vertical axis, and extracting the fluctuation period, peak position, and change gradient of the impurity concentration in the curve; Based on the morphological characteristics of the impurity change trend curve, a correlation model between impurity concentration and production timestamp is established. By analyzing the temporal distribution of the peak position in the curve and the cumulative effect of the change gradient, the change pattern of impurity concentration over production time is determined, and impurity change data reflecting the dynamic changes in impurity concentration within the preset production batch is generated; Obtaining historical records of production process parameters for a preset production batch, constructing a multidimensional mapping matrix between impurity concentration and production process parameters based on the correspondence between the impurity change data and the production process parameters, and determining the key process parameters that cause abnormal changes in impurity concentration by analyzing the influence weights of the production process parameters on the impurity concentration in the mapping matrix; Establish a regression model between key process parameters and impurity concentration changes. Calculate the sensitivity coefficient of process parameter adjustment to impurity concentration changes based on the regression model. Combined with the time series characteristics of concentration fluctuations in impurity change data, generate the process parameter optimization objective function. According to the process parameter optimization objective function, a process parameter optimization search space is constructed, and the optimal solution of the optimization objective function is iteratively solved by the gradient descent method to generate a production process parameter optimization scheme, which includes the adjustment range, adjustment timing and adjustment gradient of key process parameters.

7. A heparin impurity detection system based on Raman spectroscopy, characterized in that: The heparin impurity detection system based on Raman spectroscopy includes a storage device and a processor. The storage device includes a heparin impurity detection method program based on Raman spectroscopy. When the heparin impurity detection method program based on Raman spectroscopy is executed by the processor, the following steps are implemented: Acquiring original Raman spectral data of a target heparin production sample of a preset production batch, performing data acquisition quality analysis on the original Raman spectral data, and obtaining data acquisition quality information; Optimizing acquisition parameters of the original Raman spectral data according to the data acquisition quality information, and constructing an acquisition parameter optimization scheme; Acquire Raman spectral data of a preset number of heparin production samples of a preset production batch according to the acquisition parameter optimization scheme, perform feature extraction on the Raman spectral data, and generate a three-dimensional feature matrix; performing abnormal feature detection on the three-dimensional feature matrix based on a density clustering algorithm, identifying abnormal spectral features, and performing heparin impurity detection based on the abnormal spectral features to obtain impurity detection data of the heparin production sample; Obtain production timestamp data of the preset number of heparin production samples, determine heparin production impurity change data of the preset production batch based on the production timestamp data and the impurity detection data, optimize production process parameters based on the heparin production impurity change data, and obtain a production process parameter optimization plan.

Citation Information

Cited By

  • Activated carbon pore regulation and control method and monitoring equipment

    CN120846948A

  • A method for regulating pores of activated carbon, monitoring device

    CN120846948B

  • Gallium oxide single crystal growth impurity detection and analysis method based on Raman spectrum detection

    CN122045794A

  • Method for detecting and analyzing impurities in gallium oxide single crystal growth based on raman spectrum detection

    CN122045794B