Method and system for detecting release effect of sustained-release drug based on AI
By using multi-scale concurrent convolutional modules and a temporal feature decoding model, the problems of low sampling frequency and insufficient feature extraction in the detection of sustained-release drug release are solved, achieving efficient and accurate monitoring of the drug release process and prediction that conforms to physical laws.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-03
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies suffer from low sampling frequency and insufficient feature extraction in the detection of sustained-release drugs, and the prediction results violate physical laws, making it impossible to achieve non-invasive continuous monitoring and real-time feedback.
A multi-scale concurrent convolutional module combined with a temporal feature decoding model is used to extract drug concentration and excipient state information through narrowband and broadband feature extraction paths, respectively. The drug release curve is generated by decoding using a physical constraint attention mechanism and trained using a physical constraint loss function.
It enables efficient and continuous monitoring of the drug release process, accurately extracts chemical and physical characteristics, ensures that the prediction results conform to physical laws, and improves the accuracy and sensitivity of detection.
Smart Images

Figure CN121768697A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pharmaceutical testing, and in particular to an AI-based method and system for detecting the release effect of sustained-release drugs. Background Technology
[0002] Sustained-release formulations play an important role in modern drug therapy due to their advantages such as reducing the frequency of administration, maintaining stable blood drug concentrations, and reducing toxic side effects. Drug dissolution is a key indicator for evaluating the quality of sustained-release formulations, as it simulates the drug release process in the digestive tract environment of the body.
[0003] Traditional methods for drug dissolution testing typically rely on high-performance liquid chromatography (HPLC) or ultraviolet spectrophotometry (UV). While accurate, these methods have significant technical limitations: 1. Information loss due to scattered sampling: Traditional methods usually only sample at a few preset time points (e.g., 1h, 4h, 8h). This discrete sampling method easily misses key kinetic events occurring between sampling points, such as dose bursts or abnormal fluctuations in release rates. 2. Lag: Sampling requires cumbersome operations such as filtration, dilution, and injection analysis, making real-time feedback impossible and unsuitable for online quality control (PAT) in the production process. 3. Limited data dimensions: Traditional analysis focuses only on absorbance or chromatographic peak area at a single wavelength, ignoring rich physical background information contained in the spectrum, such as excipient swelling and changes in medium turbidity. This information is crucial for understanding sustained-release mechanisms (e.g., skeleton dissolution, diffusion control).
[0004] In recent years, artificial intelligence technology has begun to be applied to spectral analysis. However, existing general-purpose deep learning models face unique challenges when applied to drug release scenarios: 1. Signal coupling problem: Drug release spectra are a complex superposition of sharp chemical absorption peaks and broad physical backgrounds (such as baseline drift caused by excipient hydration). Existing convolutional neural networks (CNNs) typically use single-scale convolutional kernels, making it difficult to efficiently extract features from both different frequency domains simultaneously. 2. Lack of physical consistency: General-purpose time-series prediction models (such as standard LSTM or Transformer) lack an understanding of physicochemical laws. Under noise interference, the model may predict a decrease in cumulative release over time, violating physical common sense (i.e., violating monotonicity), leading to unreliable predictions. 3. Insensitivity to key inflection points: In the early stages of drug release (burst release) or at the point of change in release mechanism, the release rate changes drastically. Traditional attention mechanisms, which are usually weighted based on feature similarity, often fail to capture these abrupt changes in kinetic behavior in a timely manner.
[0005] Therefore, there is an urgent need for an intelligent detection method that can achieve non-invasive continuous monitoring, effectively decouple chemical and physical characteristics, and follow the laws of physicochemical processes. Summary of the Invention
[0006] One of the objectives of this invention is to provide an AI-based method for detecting the release effect of sustained-release drugs, in order to solve the problems of low sampling frequency, insufficient feature extraction, and prediction results that violate physical laws in the prior art.
[0007] This invention is achieved through the following technical solution: an AI-based method for detecting the release effect of sustained-release drugs, comprising the following steps: acquiring time-series spectral data of the sustained-release drug to be tested within a continuous time period; inputting the time-series spectral data into a multi-scale concurrent convolution module, extracting narrow-band feature vectors related to drug molecule concentration and broadband feature vectors related to the state of formulation excipients through parallel narrow-band feature extraction paths and broadband feature extraction paths, respectively, and fusing them to obtain a fused feature vector sequence; inputting the fused feature vector sequence into a time-series feature decoding model, wherein the time-series feature decoding model utilizes a recursive structure with state memory function to simulate the cumulative effect of drug release, and combines a physical constraint attention mechanism to focus on the kinetic inflection points in the release process, decoding and generating drug release curve data.
[0008] Furthermore, time-series spectral data is a data sequence obtained by continuously acquiring data with extremely high temporal resolution through a spectral acquisition device within a preset continuous time period that can cover the main release phase of the drug. This data sequence forms a two-dimensional data matrix or tensor, with one dimension being the time axis and the other dimension being the spectral axis, such as wavelength or wavenumber.
[0009] Furthermore, after acquiring the time-series spectral data, the method further includes: performing baseline calibration on the time-series spectral data to estimate and subtract the dynamic baseline caused by background fluctuations using asymmetric least squares or polynomial fitting; smoothing the time-series spectral data to filter out random high-frequency noise; and scaling the time-series spectral data to eliminate intensity differences caused by optical path or light source fluctuations.
[0010] Furthermore, the multi-scale concurrent convolution module extracts features in the following ways: it uses a small-sized one-dimensional convolution kernel in the narrow-band feature extraction path to capture chemical feature signals in the time-series spectral data, wherein the size of the small-sized one-dimensional convolution kernel is on the same order of magnitude as the full width at half maximum (FWHM) of the characteristic absorption peak of the drug to be tested; and it uses a large-sized one-dimensional convolution kernel in the broadband feature extraction path to capture physical background signals in the time-series spectral data, wherein the size of the large-sized one-dimensional convolution kernel is significantly larger than the FWHM of the characteristic absorption peak of the drug to be tested.
[0011] Furthermore, the narrowband feature extraction path is configured to perform matched filtering or high-pass filtering to extract chemical fingerprints related to drug concentration; the broadband feature extraction path is configured to perform low-pass filtering to extract physical environmental features characterizing excipient swelling, dissolution, or media scattering.
[0012] Furthermore, the multi-scale concurrent convolution module can be constructed through the following steps:
[0013] 1) First, based on the physical frequency domain characteristics of spectral signals, a multi-scale parallel convolutional neural network architecture is constructed. For drug signals, the choice of convolutional kernel size should strictly refer to the full width at half maximum (FWHM) of the drug's characteristic peaks. When the convolutional kernel size is approximately equal to the feature width of the target signal, the signal-to-noise ratio reaches its maximum, and narrowband feature extraction can be expressed by the following formula: ,
[0014] ,in, For a moment Time Vectors extracted by narrow-band convolution kernels; It is a non-linear activation function. This represents the index of an element within a narrowband convolution kernel. The value of the narrowband convolution kernel should satisfy the following range: The full width at half maximum (FWHM) of the characteristic absorption peak of the drug to be tested can usually be set as follows: or indivual; For the first The weight matrix of a narrowband convolution kernel. For time points The input spectral vector is typically processed before the convolution operation. Perform edge padding to maintain dimensional consistency; This is the center index position of the convolution sliding window; For the first The bias moment of a narrow-band convolution kernel; This represents the number of convolution kernels in the narrowband channel; 1) The matrix composed of all extracted narrowband feature vectors, where ⊤ is the transpose of the matrix; 2) Then, for the environmental background signal, the convolution kernel size should cover a wide wavelength range, which is equivalent to a low-pass filter in the frequency domain. Its function is to suppress high-frequency drug signals and instrument noise, and extract low-frequency trend terms that reflect changes in the physical state of excipients. Broadband feature extraction can be expressed by the following formula: ,
[0015] ,in, For a moment Time Vectors extracted by a wideband convolution kernel; This represents the index of an element within the wide convolution kernel. The width of the convolution kernel; For the first A wideband convolutional kernel weight matrix; For the first The bias matrix of a wideband convolution kernel; This represents the number of convolution kernels in the wideband channel; 3) Finally, the calculated narrowband feature vector matrix and wideband feature vector matrix are fused. By computing narrowband and wideband features in parallel and performing deep fusion, it can be expressed by the following formula: ,in, Let be the fused feature vector at time t. This indicates a vector concatenation operation.
[0016] Furthermore, the temporal feature decoding model includes: a cascaded Long Short-Term Memory (LSTM) network layer and a physically constrained attention mechanism layer; wherein, the internal cell state of the LSTM layer is configured to simulate the drug concentration accumulation state or concentration gradient history in the dissolution medium; the physically constrained attention mechanism layer is configured to receive the hidden state sequence from the LSTM layer, focusing computational resources and attention on key time points that determine drug quality.
[0017] Furthermore, the physical constraint attention mechanism layer performs calculations through an autoregressive feedback loop: obtaining the instantaneous release rate predicted by the temporal feature decoding model at the previous time step; calculating the attention energy score at the current time step based on the hidden state at the current time step and the instantaneous release rate predicted at the previous time step; and generating a context vector by weighted summation of the hidden state sequence according to the attention energy score.
[0018] Furthermore, the calculation logic for the attention energy score includes: if the instantaneous release rate predicted at the previous moment exceeds a preset threshold, the weight of the energy score at the current moment is increased so that the model focuses on the dynamically active region.
[0019] Furthermore, the computation process of the LSTM layer and the physical constraint attention mechanism layer can be described by the following formula: First, the physical state memory is updated through the LSTM layer: ,in, For a moment The fusion characteristics; The cell state represents the moment in the simulation. The cumulative concentration environment; The hidden state represents the time. The underlying dynamic characteristics are represented; subsequently, the energy score and attention weights incorporating physics rate feedback are calculated: ,
[0020] Finally, a context vector incorporating physical concerns is generated: ,in, For LSTM at time points The hidden state vector; As a key physical feedback item, These are the learnable weight matrices for the hidden state and the physics rate, respectively. The magnitude of the value determines the model's sensitivity to the rate of physical change; The weights are used to project high-dimensional features into scalar energy values. For a moment The attention coefficient at that moment represents the importance weight of the spectral data at that moment in the final release curve shape; This is the final context vector.
[0021] Furthermore, the instantaneous release rate at each time point is calculated based on the first derivative of the drug release curve data; if the instantaneous release rate exceeds the preset safe release rate threshold for multiple consecutive time steps, a dose burst release warning signal is triggered.
[0022] Furthermore, the detection method also includes: extracting key kinetic parameters from the drug release curve data, the parameters including characteristic release time points and release rate constants; wherein the release rate constants are obtained by fitting the drug release curve data with a preset kinetic mathematical model.
[0023] Furthermore, the decoding and generation of drug release curve data can be achieved using the following formula:
[0024] ,in, For the cumulative release rate vector of the entire predicted time series, each element Represents the moment The percentage of drug dissolved relative to the labeled amount; The context vector output by the preceding steps; This is the weight matrix of the output layer; This is the bias vector.
[0025] Furthermore, the feature release time point can be calculated using the following formula:
[0026] , ,in, Defined as the time required for 50% of the cumulative drug release, this parameter is typically used to characterize the half-life or average release rate of a drug. Defined as the time required for 90% of the cumulative drug release, this parameter is generally regarded in pharmaceutical terms as the endpoint indicator for complete drug release.
[0027] Furthermore, the temporal feature decoding model is trained end-to-end using a composite loss function, which includes a mean squared error loss term and a monotonic physical constraint loss term.
[0028] The monotonic physical constraint loss term is used to apply gradient penalties to predicted values in the drug release curve data that violate the monotonic non-decreasing law.
[0029] Furthermore, the monotonic physical constraint loss term can be calculated as follows: calculate the difference between the predicted cumulative release rates at adjacent time points; process the difference using the ReLU activation function, and generate a non-zero loss value when the difference shows that the release amount decreases over time.
[0030] Furthermore, the composite loss function can be expressed by the following equation:
[0031] ,in, This is the final composite loss function; This is the mean squared error loss term; For physical weighting coefficients, This is a monotonic physical constraint loss term.
[0032] Furthermore, the mean squared error loss term can be expressed by the following formula:
[0033] ,
[0034] The monotonic physical constraint loss term can be expressed by the following formula:
[0035] ,in, This represents the total number of samples in the training batch. The length of the time series for each sample; For the first Each sample at time point The actual cumulative release rate The model predicts the first Each sample at time point The predicted cumulative release rate; This acts as a penalty activation function.
[0036] Another aspect of the present invention provides an AI-based detection system for the sustained-release drug release effect, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements any of the AI-based detection methods for the sustained-release drug release effect described above.
[0037] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0038] 1. This invention employs a multi-scale concurrent feature extraction mechanism, utilizing small-scale (narrowband) convolutional kernels as high-pass filters to accurately capture sharp absorption peaks of drug molecules; and large-scale (wideband) convolutional kernels as low-pass filters to specifically extract broad and gentle background signals caused by excipient swelling and medium changes. This not only eliminates the interference of background noise on drug quantification, but more importantly, it preserves the physical information of excipient state changes (such as the degree of skeleton erosion). This allows the model to make comprehensive inferences by combining the dual dimensions of drug concentration and release environment, achieving deep decoupling of chemical fingerprints and physical environment, significantly improving the robustness of feature extraction, and greatly enhancing the accuracy in complex formulation analysis.
[0039] 2. This invention introduces an autoregressive physical feedback loop, giving the model dynamic sensitivity. The system then uses the release rate predicted at the previous moment. As prior knowledge, the attention module is fed back to the current moment; if the drug was being released violently in the previous moment (such as in the burst release phase), based on physical continuity, it is highly likely that the drug is still in an active phase at the current moment. Based on this, the model automatically increases the attention weight of the features at the current moment. This mechanism enables the present invention to have a reaction speed and sensitivity far exceeding that of traditional models when detecting key safety risks such as burst release of drugs, thus overcoming the problem of detecting burst release and inflection points of drugs.
[0040] 3. This invention incorporates monotonic physical constraints into the loss function. By imposing a large gradient penalty on any prediction behavior that violates the irreversible law of drug release during the training phase, the model is forced to learn not only the statistical correlation between data, but also the potential physical causal relationship. This allows the model to still output a smooth and monotonically non-decreasing release curve that conforms to physical logic when faced with high-noise data or unknown samples, greatly enhancing the credibility of industrial applications and ensuring that the prediction results conform to the laws of physicochemical processes. Attached Figure Description
[0041] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings:
[0042] Figure 1 The above is a flowchart of the overall method provided in Embodiment 1 of the present invention.
[0043] Figure 2 This is a schematic diagram of the three-dimensional evolution of time-series spectral data provided in Embodiment 1 of the present invention.
[0044] Figure 3 This is a two-dimensional schematic diagram of the time-series spectral data provided in Embodiment 1 of the present invention.
[0045] Figure 4 This is a schematic diagram of the spectral evolution at four key time points provided in Embodiment 1 of the present invention.
[0046] Figure 5 This is a schematic diagram illustrating the principle of multi-scale concurrent feature fusion provided in Embodiment 1 of the present invention.
[0047] Figure 6 This is a schematic diagram of narrowband and broadband feature fusion provided in Embodiment 1 of the present invention.
[0048] Figure 7 This is a schematic diagram of the physical constraint attention mechanism provided in Embodiment 1 of the present invention.
[0049] Figure 8 The correlation analysis diagram between release rate and attention weight provided in Embodiment 1 of the present invention.
[0050] Figure 9 This is a schematic diagram of the final obtained curve provided in Embodiment 1 of the present invention. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0052] Example 1
[0053] This embodiment discloses an AI-based method for detecting the effect of sustained-release drug delivery. Figure 1 The overall method flowchart of this embodiment is shown. As can be seen from the figure, this embodiment includes the following steps:
[0054] Step 1: Acquire time-series spectral data of the sustained-release drug under test over a continuous time period. The purpose of this step is to capture high-dimensional, high-density information carriers that can fully characterize the entire process of sustained-release drug release through a non-invasive real-time monitoring method, thereby overcoming the shortcomings of existing technologies that rely on discrete, low-dimensional sampling, resulting in information loss and poor real-time performance.
[0055] The sustained-release drug to be tested refers to any pharmaceutical formulation designed through a special formulation process to prolong the drug release rate in vivo and achieve long-term therapeutic effect. Examples include hydrophilic gel matrix tablets, osmotic pump tablets, or microsphere injections. The release behavior of these formulations typically involves complex physicochemical processes, such as media penetration, polymer excipient swelling, drug diffusion, and matrix erosion. Subtle changes in these drug release processes are the targets of this invention's method for capturing and analyzing.
[0056] Temporal spectral data refers to a data sequence acquired continuously with extremely high temporal resolution by a spectral acquisition device within a predetermined continuous time period covering the main stages of drug release. This data sequence forms a two-dimensional data matrix or tensor, with one dimension being the time axis and the other the spectral axis, such as wavelength or wavenumber. This data not only contains absorption peak information directly related to drug molecule concentration at specific wavelengths, but more importantly, it also contains global spectral characteristics such as broadband absorption, baseline drift, and scattering effects caused by changes in excipient states (e.g., polymer chain extension, alterations in hydration levels) and changes in the physical properties of the release medium (e.g., turbidity, refractive index). This temporal spectral data can be viewed as a dynamic fingerprint reflecting the chemical-physical dual-state evolution of the drug release system. Figure 2 This embodiment illustrates a three-dimensional evolution diagram of time-series spectral data. Figure 3 A two-dimensional schematic diagram of the time-series spectral data in this embodiment is shown. Figure 4 The diagrams show the spectral evolution at four key time points: T=1h, T=5h, T=12h, and T=24h. The three-dimensional spectral data includes time, wavelength, and absorbance, with color intensity representing absorbance strength. These two figures demonstrate that the input data contains not only peak information in the spectral dimension but also evolutionary information in the temporal dimension. Figure 3 The spectra at T=1h (initial release time), T=5h (burst release time), T=12h (stationary release time), and T=24h (final release time) are shown in the figures. Figure 3 As can be seen, the characteristic peak (drug signal) gradually increases over time, while the baseline (background noise) also shifts overall.
[0057] Spectral acquisition devices refer to analytical instruments used to perform non-invasive real-time measurements. Their selection can be determined based on the spectral activity of the drug molecule and excipients being measured. For example, in this embodiment, a near-infrared (NIR) spectrometer can be used, which is highly sensitive to organic molecules containing hydrogen bonds such as OH, NH, and CH, and can simultaneously capture information such as drug concentration, water penetration, and excipient hydration; alternatively, a Raman spectrometer can be used, which provides sharp molecular vibrational characteristic peaks, is highly specific, and is less affected by moisture; or a UV-Vis spectrophotometer can be used, suitable for drug molecules with UV or visible light absorption. The core commonality of these devices is their ability to continuously snapshot the system in the release medium without interfering with the drug release process or consuming the sample, thereby ensuring the real-time nature and completeness of data acquisition.
[0058] In this embodiment, to ensure the quality of the original time-series spectral data and to provide a stable and information-pure input for subsequent deep learning models, a series of data preprocessing steps may be included after obtaining the original spectral sequence. Specifically, these may include:
[0059] 1) Spectral baseline calibration: This operation is used to eliminate or reduce baseline drift that is unrelated to drug concentration, caused by instrument background, temperature fluctuations, or excipient swelling. It is understood that the true drug absorption peak is superimposed on a changing background signal. If this background is not removed, subsequent deep learning models may incorrectly interpret baseline elevation or depression as changes in drug concentration, leading to inaccurate predictions. Specifically, algorithms such as asymmetric least squares or polynomial fitting can be applied to intelligently estimate and subtract this dynamically changing baseline, thereby highlighting the true signal related to drug concentration.
[0060] 2) Spectral smoothing: This operation improves the signal-to-noise ratio and eliminates random high-frequency noise in the original spectrum. It's understood that effective chemical information in a spectrum (such as absorption peaks) typically manifests as a smooth curve with a certain width, while instrument-generated white noise appears as rapid, irregular fluctuations. Specifically, smoothing algorithms such as the Savitzky-Gore filter can be used to effectively filter out noise interference while preserving key information such as the shape and position of absorption peaks. This allows subsequent feature extraction modules to more stably and accurately identify effective features.
[0061] 3) Data scale normalization: This operation eliminates overall intensity differences between spectra caused by physical factors such as changes in optical path length and fluctuations in light source intensity. Understandably, for deep learning, the shape of the spectrum is more important than its absolute height, as the shape reflects the relative composition of the matter. Specifically, methods such as Standard Normal Variable Transform (SNV) or Max-Min Normalization can be used to adjust the spectral data at each time point to a uniform scale. This ensures that the model focuses on identifying spectral shape changes caused by changes in chemical and physical states during the learning process, rather than being misled by irrelevant intensity fluctuations, thereby improving the model's robustness and generalization ability.
[0062] Specifically, in this embodiment, the raw time-series spectral data collected by the spectrometer can be transformed into a unified and standardized time-series input tensor through a time-series spectral decoding network, thereby providing a stable input for subsequent deep learning models.
[0063] By performing baseline calibration and normalization on the spectral signals acquired at continuous time points, the light intensity signals in the physical world are mapped into numerical vectors that can be processed by computers. For each sampling time point, the spectral intensity of the entire band is used as an independent feature vector, and all time point vectors in the entire release process are stacked in time order to construct a two-dimensional data tensor that contains both spectral dimension (wavelength) and time dimension (process).
[0064] This construction method not only preserves the spectral fingerprint information, but also provides a data foundation for subsequent models to capture transient changes.
[0065] For example, in this embodiment, the input tensor can be constructed using the following formula:
[0066]
[0067] in, For the complete input time-series spectral sequence tensor; For time step index, This represents the total number of sampling time points; For at a certain point in time The single spectral measurement vector has been normalized. This represents the total number of wavelength points collected by the spectrometer. For at wavelength point The absorbance value at that location.
[0068] Step 2: Input the original spectral sequence into a multi-scale concurrent convolution module to perform deep feature extraction and fusion to obtain a fused feature vector sequence.
[0069] In the time-series spectrum of drug dissolution and release, the signal is composed of superimposed waveforms from different physical sources. Specifically, the characteristic absorption peaks of drug molecules typically appear as sharp, narrow peaks in the spectrum, corresponding to high-frequency components in the frequency domain, and their physical scale is usually determined by the vibrational modes of the chemical bonds in the molecules. Baseline drift caused by excipient swelling, erosion, and particle light scattering, on the other hand, appears as broad, smooth background fluctuations, corresponding to low-frequency components in the frequency domain. Existing technologies typically treat the spectrum as a single information source, utilizing only absorbance information at isolated wavelengths, resulting in a single data dimension and insufficient information utilization. This step deconstructs the time-series spectral data during the sustained-release drug process into a superposition of two sub-signals with different physical sources and signal characteristics:
[0070] The first type is a sharp chemical characteristic signal directly related to drug molecule concentration; the second type is a smooth physical background signal related to changes in macroscopic physical states such as swelling of formulation excipients and dissolution of the matrix. By constructing a parallel, multi-scale feature extraction architecture, these two types of signals are specifically and concurrently captured and quantified, and finally fused into a deep feature sequence with rich information dimensions that can comprehensively characterize the dynamic evolution of the release system.
[0071] Understandably, if only a single-scale conventional convolution kernel is used to process spectral data, an irreconcilable contradiction will inevitably arise:
[0072] If a small-sized convolution kernel is used, its receptive field is narrow. Although it can capture the fine structure of drug absorption peaks well, its output is easily affected by spectral baseline drift and broadband scattering noise due to the lack of perception of global information, resulting in low signal-to-noise ratio and poor robustness of the extracted features.
[0073] However, while using large-size convolutional kernels can effectively suppress noise and baseline effects through smoothing, it inevitably blurs or even completely erases sharp drug characteristic absorption peaks, causing permanent loss of key chemical information and ultimately preventing the model from accurately inferring drug concentration. Therefore, a single-scale feature extraction paradigm cannot simultaneously and effectively separate and extract these two types of signals.
[0074] To overcome the aforementioned limitations, this embodiment designs a multi-scale concurrent convolution module, which inputs the preprocessed spectral vector at each time point into the following two specially designed feature extraction paths in parallel:
[0075] The narrowband feature extraction path (high-pass filtering path) is specifically designed for the precise and sensitive capture of chemical characteristic signals directly corresponding to drug molecule concentrations. In spectral signals, the characteristic absorption peaks of drug molecules typically exhibit high-frequency signals with a small full width at half maximum (FWHM) in the spectral dimension, meaning the characteristic peak is narrow at half its height. Therefore, this path employs a set of small-sized one-dimensional convolutional kernels. The term "small-sized" in principle means that the size of the convolutional kernel (the number of wavelength points it covers) should be on the same order of magnitude as the FWHM of the main characteristic peak of the drug being measured. This design makes the convolutional kernel functionally equivalent to a matched filter or high-pass filter. When it slides through the spectral data, it can generate maximum response to drug absorption peaks with matching morphology and width. Simultaneously, due to its small size, it can effectively ignore and penetrate baseline drift that is gentle and belongs to low-frequency signals. Specifically, this approach learns and automatically identifies a set of key absorption peak modes in the spectrum that best indicate changes in drug concentration through multiple small-sized convolutional kernels with different weights. Each dimension of the output narrowband feature vector can be understood as a highly sensitive virtual chemical sensor, and its value is proportional to the intensity of specific chemical information, thereby achieving precise decoupling and quantification of drug concentration signals.
[0076] The broadband feature extraction path (low-pass filtering path) is specifically designed to stably and robustly characterize physical background signals driven by changes in the physical state of excipients. In contrast to sharp chemical absorption peaks, spectral changes caused by physical processes such as excipient swelling, skeleton dissolution, or medium scattering typically manifest as large-scale, smooth low-frequency signals, such as an overall rise or tilt of the entire baseline. To effectively capture these signals, this path employs a set of large-size one-dimensional convolutional kernels. "Large-size" in principle means that the size of the convolutional kernel should be significantly larger than the FWHW of the drug characteristic peaks, sufficient to span a relatively wide spectral range. This design makes the convolutional kernel functionally equivalent to a low-pass filter, which, through local weighted averaging, effectively smooths out sharp, high-frequency drug absorption peak signals and random noise as it slides through the spectral data, thereby extracting the underlying, slowly changing macroscopic trends in the spectral data. Specifically, each dimension of the broadband feature vector output by this path quantifies a certain macroscopic feature of the spectral background, such as overall intensity, tilt, or curvature. This broadband feature vector does not directly reflect drug concentration, but rather provides the model with key contextual information about the drug release environment, such as whether the current formulation skeleton is in a rapid swelling phase or whether the release medium has become turbid.
[0077] Finally, at the output of this step, the narrowband and wideband feature vectors generated at each time point by the two paths described above are fused. This fusion can be accomplished through vector concatenation, simply by linking the two vectors end-to-end to form a higher-dimensional, more comprehensive fused feature vector. In other words, by seamlessly integrating the chemical fingerprint represented by the narrowband feature vector and the physical environment fingerprint represented by the wideband feature vector, a rich perspective is provided for subsequent time-series analysis modules. This allows the model to not only know the drug concentration but also, by incorporating the crucial background information of the physical conditions under which the drug is released, learn more complex and precise release kinetics. For example, through this operation, the model can learn the deep coupling relationship between the rapid swelling of the skeleton (drastic changes in wideband features) and the burst release behavior (drastic changes in narrowband features) of the drug release, which is something no single feature extraction method can achieve. Figure 5 The diagram illustrates the principle of multi-scale concurrent feature fusion in this embodiment. As can be seen from the diagram, the output of the small kernel convolution corresponds to high-pass filtering, which extracts only sharp feature peaks and completely filters out the background; while the output of the large kernel convolution corresponds to low-pass filtering, which ignores sharp peaks and extracts only the smooth background baseline. By using both wide and narrow convolution kernels simultaneously, feature decoupling between drug signals and environmental background is achieved.
[0078] Specifically, in this embodiment, the multi-scale concurrent convolution module can be constructed through the following steps:
[0079] 1) First, based on the physical frequency domain characteristics of the spectral signal, a multi-scale parallel convolutional neural network architecture is constructed. For drug signals, the choice of convolutional kernel size should strictly refer to the full width at half maximum (FWHM) of the drug's characteristic peaks. According to matched filter theory, the signal-to-noise ratio (SNR) reaches its maximum when the convolutional kernel size is approximately the same as the characteristic width of the target signal. Therefore, the narrowband convolutional kernel is essentially a bandpass filter or high-pass filter, designed to strip away the background and respond to drastic changes in the spectrum through a differentiation-like operation.
[0080] For example, in this embodiment, narrowband feature extraction can be represented by the following formula:
[0081]
[0082]
[0083] in, For a moment Time Vectors extracted by narrow-band convolution kernels; For nonlinear activation functions, in this embodiment, ReLU (RectifiedLinearUnit) can be selected as the nonlinear activation function to introduce nonlinear mapping, and through The operation filters out negative responses, simulating the non-negative physical properties of spectral signals. Although the derivative spectrum may have negative values, ReLU helps to sparse the expression in the deep feature space. This represents the index of an element within a narrowband convolution kernel. The narrow-band convolution kernel size is a crucial parameter for capturing drug signals, and its value should meet certain requirements. , The full width at half maximum (FWHM) of the characteristic absorption peak of the drug being tested refers to the width of the spectral band (usually expressed in terms of wavelength points or frequency) corresponding to the point where the absorption peak height is half of its maximum value in the drug's spectrum. It can typically be set as... or At a wavelength point, at this scale, the convolution kernel simulates the characteristics of the second derivative spectrum, which can effectively remove linear baselines and enhance the resolution of overlapping peaks; For the first The weight matrix of a narrow-band convolutional kernel is automatically learned to form a wavelet basis-like shape during model training to match the specific absorption fingerprint of the drug. For time points The input spectral vector is typically processed before the convolution operation. Perform edge padding to maintain dimensional consistency; This is the center index position of the convolution sliding window; For the first The bias moment of a narrow-band convolution kernel; Increasing the number of channels allows the model to focus on features of different wavelengths (such as the ultraviolet and visible light regions) simultaneously, thus reducing the number of convolutional kernels for narrowband channels. is a matrix composed of all extracted narrowband feature vectors, and ⊤ is the transpose of the matrix.
[0084] Subsequently, for the environmental background signal, the convolution kernel size should cover a wide wavelength range, which is equivalent to a low-pass filter in the frequency domain. Its function is to suppress high-frequency drug signals and instrument noise, and extract low-frequency trend terms that reflect changes in the physical state of excipients.
[0085] For example, in this embodiment, broadband feature extraction can be represented by the following formula:
[0086]
[0087]
[0088] in, For a moment Time Vectors extracted by a wideband convolution kernel; This represents the index of an element within the wide convolution kernel. The width of the broadband convolution kernel is used to capture changes in the physical environment. Its value should be significantly larger than the drug peak width, and it is typically set to [value missing]. of At this scale, the convolution operation produces an integral smoothing effect, reflecting the broad-spectrum light attenuation caused by changes in turbidity and refractive index. For the first A wideband convolutional kernel weight matrix; For the first The bias matrix of a wideband convolution kernel; The number of convolutional kernels for broadband channels allows the model to focus on features of different bands (such as the ultraviolet and visible light regions) simultaneously by increasing the number of channels. It is a matrix composed of all extracted broadband feature vectors.
[0089] 2) Finally, the calculated narrowband feature vector matrix and wideband feature vector matrix are fused. For example, in this embodiment, by parallel computing of narrowband and wideband features and performing deep fusion, it can be expressed by the following formula:
[0090]
[0091] in, Let be the fused feature vector at time t. This indicates a vector concatenation operation. Instead of a simple addition, this operation preserves the independence of the two frequency domain dimensions, separating the feature dimensions from... and Expand to This allows subsequent time series models to simultaneously learn drug release kinetics (from narrowband) and excipient disintegration kinetics (from broadband). Figure 6 A schematic diagram of narrowband and broadband feature fusion in this embodiment is shown.
[0092] It should be noted that by constructing the above multi-scale features, the original spectral signal was successfully decoupled into two sets of orthogonal vector representations: chemical features and physical features. This design enables the subsequent time series model (LSTM) to distinguish which signal changes are caused by an increase in drug concentration (corresponding to narrow band changes) and which are caused by solution turbidity due to tablet disintegration (corresponding to broadband changes). Without this multi-scale fusion strategy, the model is very likely to misjudge the enhanced light scattering in the early stage of disintegration as a rapid increase in drug concentration, resulting in a significant deviation in release prediction (i.e., false positive burst release). Through the processing of this module, a clean and information-rich feature input is provided for the subsequent accurate physical constraint attention mechanism.
[0093] Step 3: Input the fused feature vector sequence into a time-series feature decoding model to decode and generate drug release curve data. This step aims to decode an accurate, continuous, and physically consistent drug release curve by performing deep modeling of the time dimension of the sequence.
[0094] After obtaining the fused features containing drug signals and background environmental information, these features must be mapped to a continuous physical release process. Since drug dissolution is not an isolated, discrete event, but a cumulative process with strong historical dependence, the current release state depends not only on the current feature input but also on the previously established concentration environment in the dissolution vessel. Therefore, a recursive network with state memory capabilities needs to be constructed, and the memory units in the computer domain need to be physically mapped to the cumulative effects in the drug release process. This model must not only be able to handle the nonlinear dependencies of time series but also intelligently identify and focus on key turning points (such as burst release, plateau phase, and decay phase) throughout the release process, thereby solving the technical challenges of poor generalization ability and inability to capture abrupt changes in key release behaviors in existing models.
[0095] The temporal feature decoding model used in this embodiment is structurally composed of two carefully designed and deeply coupled sub-modules cascaded together:
[0096] A Long Short-Term Memory (LSTM) network layer whose function is to act as a physical process state accumulator; and a physically constrained attention mechanism layer whose function is to act as a dynamic critical event detector.
[0097] The Long Short-Term Memory (LSTM) layer is responsible for processing the time series of fused feature vectors. This LSTM layer does not simply search for time patterns, but rather constructs a state memory mechanism within the network that can simulate real physicochemical processes. During the release of a sustained-release drug, at any given time... The state of the drug (such as drug concentration in the medium and degree of hydration of excipients) is strongly dependent on its condition in the medium. The historical state at any given moment is a typical physical process with cumulative effects.
[0098] Specifically, the core of the LSTM layer lies in its internal cellular state. In this model, No longer merely an abstract information carrier, it has been explicitly endowed with physical meaning: it simulates the concentration accumulation state or concentration gradient history in the dissolution medium, just as the drug concentration in the dissolution vessel accumulates over time, the cell state of LSTM at time step... Bearing from arrive By adjusting the forget gate and input gate, the model can simulate concentration maintenance under leaky conditions or saturation effects under non-leaky conditions by using all dissolution history information at all times.
[0099] In this embodiment, the operating mechanism of the LSTM layer is designed as a mathematical simulation of the cumulative history of drug concentration and excipient state in the dissolution medium. That is, at each time step, when a new fused feature vector (representing the observation snapshot at the current moment) is input:
[0100] First, the forget gate in the LSTM layer evaluates the memory cells from the previous time step. This allows us to determine which historical information is losing importance, for example, due to drug degradation or reaching solubility limits leading to a slowdown in the rate of concentration accumulation and partial forgetting.
[0101] The input gate then analyzes the current feature vector. The system determines what new information, such as a strong drug absorption peak signal, is contained within the memory cell and decides on the intensity at which it is written into the memory cell. Through this dynamic balance between forgetting and writing, the memory cell is updated. It is no longer just a cold mathematical vector, but a model's representation of the situation up to the current moment. A high-dimensional, nonlinear quantitative description of the cumulative state of the entire release system.
[0102] Finally, the output gate will be based on the updated cumulative state. Generate a hidden state vector This hidden state can be understood as the accumulated state at the current moment. An observable external representation of the LSTM layer will be used for subsequent attention calculations and final concentration prediction. In this way, the LSTM layer goes beyond the scope of traditional time series models and constructs an internal dynamic system that can simulate the laws of state accumulation and evolution in the physical world.
[0103] Building upon this, to address the shortcomings of traditional models in being insensitive to key dynamic behaviors such as sudden release or lag time, this embodiment does not employ the standard point-to-point attention mechanism. Instead, it designs a physically constrained attention mechanism layer. It is understood that traditional attention mechanisms often only weight features based on similarity, easily overlooking turning points with drastic numerical changes. In this embodiment, by introducing an autoregressive feedback loop into the physically constrained attention mechanism layer, the model is updated to reflect changes in the previous time step. Predicted instantaneous release rate As prior knowledge, it is directly injected into the current moment. In the attention calculation, the continuity of dynamics is simulated. If a violent release (high release rate) occurred in the previous moment, then the current moment is very likely in the dynamic active region, and the model should give it higher attention.
[0104] Specifically, this physically constrained attention mechanism layer is configured to receive a sequence of hidden states from the LSTM layer. Its core purpose is to address the limitation of standard time-series models that treat all time points equally. Understandably, certain moments in the drug release process are far more important than others, such as the initial dose burst or the inflection point where the release mechanism changes. By introducing an autoregressive, physically dynamic feedback mechanism, the model can, like an expert, focus computational resources and attention on these critical time points that determine drug quality. The construction logic and specific feedback structure are as follows:
[0105] Unlike standard attention mechanisms that calculate all weights at once, this module employs a special structure of sequential decoding and recursive feedback, decoding (i.e., predicting) the current time step. When determining the release rate, the model not only utilizes the hidden state at the current time step. It also provides feedback that utilizes the model's own performance in the previous time step. The predicted results, especially the predicted release rate at the previous moment. The specific implementation logic of this feedback loop is as follows: when calculating the current time... Attention energy score At that time, its functional relationship is constructed as a comprehensive consideration of two types of information:
[0106] 1) The importance of the current state is demonstrated by applying a learnable transformation to the current hidden state. This part is used to assess the current moment. Does the system state itself contain significant features, such as an abnormally high drug signal?
[0107] 2) The importance of historical dynamics (physical constraint feedback), through another learnable transformation applied to the predicted release rate at the previous moment. (This rate can be achieved through a model in) and (Calculated by the difference between the predicted cumulative release rates at different times). If the model just predicted a very high release rate (i.e., the system dynamics were volatile) at the previous time step, this information will be fed back, significantly improving the prediction at the current time step. Energy score.
[0108] This design creates a dynamic sensitivity adjustment mechanism in the structure: during the steady release phase, the rate feedback term is small and the attention is distributed relatively evenly; however, once a sudden increase in the release rate (such as a sudden release) is detected, the rate feedback term will immediately alert the attention module, causing it to devote extremely high attention to the next few time points, thereby enabling it to capture and characterize the full picture of this key event and its subsequent impact with higher precision.
[0109] Finally, the energy scores at all time points are normalized into attention weights using the Softmax function. These weights are then used to sum the hidden state sequences, forming a context vector that is highly focused on key dynamic events. This vector is then used to decode the final, high-precision drug release curve.
[0110] For example, in this embodiment, the computation process of the LSTM layer and the physically constrained attention mechanism layer can be described by the following formula:
[0111] First, the physical state memory is updated through the LSTM layer:
[0112] ,
[0113] in, For a moment The fusion characteristics; The cell state represents the moment in the simulation. The cumulative concentration environment; The hidden state represents the time. The potential dynamic characteristics are represented.
[0114] Subsequently, the energy score and attention weights incorporating the physics rate feedback are calculated:
[0115] ,
[0116] ,
[0117] Finally, a context vector incorporating physical concerns is generated:
[0118] ,
[0119] in, For LSTM at time points The hidden state vector encodes the spectral features at the current moment and their historical context; This is the key physics feedback term, used to represent the instantaneous release rate predicted at the previous time step, and it is calculated as follows: (i.e., the first-order difference of the predicted cumulative release at the previous time step), this is a recursive feedback connection, at the decoding time point At that time, the model reviewed the... The judgment of time, if The absolute value is very large (meaning it is in a rapid release phase). The item will significantly increase the energy score. This leads to the corresponding attention weights. The increase in elevation allows the model to adaptively focus on the region with the steepest release curve, solving the problem of loss of the release point caused by excessive smoothing. These are the learnable weight matrices for the hidden state and the physics rate, respectively. The magnitude of the value determines the model's sensitivity to the rate of physical change; The weights are used to project high-dimensional features into scalar energy values. For a moment The attention coefficient at that moment represents the importance weight of the spectral data at that moment in the final release curve shape; The final context vector is not a simple feature average, but a high-level feature representation that is weighted by physical rules and highlights key release events (such as capsule rupture or the instant of tablet disintegration).
[0120] Figure 7 A schematic diagram of the physical constraint attention mechanism in this embodiment is shown. As can be seen from the figure, when the release rate changes drastically (such as a sudden release), the attention weight automatically increases sharply, indicating that the physical constraint attention mechanism in this embodiment has a good ability to dynamically capture key events. Figure 8 The graph shows the correlation analysis between release rate and attention weight in this embodiment. It can be seen from the graph that the faster the release rate, the higher the attention weight.
[0121] Step 4: The context vector containing physical constraints and temporal dependencies is reconstructed into a complete cumulative release curve through the output layer, and the drug release curve data is output. As needed, key drug release kinetic parameters are extracted through numerical analysis.
[0122] By utilizing the high-precision, continuous data decoded in step 3, quantitative indicators that are crucial for drug quality evaluation and prescription screening are automatically extracted. This transforms the discrete, point-like information that can only be obtained in traditional methods into continuous, streaming intelligence, thus achieving a leap from post-inspection to real-time process analysis technology.
[0123] Among them, the drug release curve data refers to the output of step 3, covering the period from the start of release. To the finish line The complete time series vector of cumulative release rate at each sampling time Unlike traditional HPLC methods, which typically contain only 6-12 sparse data points, the curve data output in this embodiment usually contains hundreds or even thousands of data points (depending on the sampling frequency, for example, one point every 30 seconds). This extremely high data density makes the curve mathematically comparable to a continuously differentiable function, thus providing a solid foundation for accurate kinetic analysis.
[0124] A highly condensed context vector was obtained through LSTM and attention mechanisms. Then, how can the model accurately project this vector, located in the abstract high-dimensional feature space, back into the physically meaningful time domain space, thereby reconstructing a vector of length [missing information]? The cumulative release sequence. In this embodiment, a fully connected layer can be used as the decoder. The weight matrix of the fully connected layer essentially learns a set of basis functions, which can, based on the feature fingerprints in the context vector (such as burst release intensity and sustained release rate), determine the cumulative release rate sequence over the entire time axis. Each release point is generated at once. This global generation strategy better ensures the overall smoothness of the release curve and implicitly utilizes the autocorrelation between time points, avoiding the jitter noise caused by point-by-point prediction.
[0125] For example, in this embodiment, the decoding calculation of the cumulative release curve can be achieved by the following formula:
[0126]
[0127] in, For the cumulative release rate vector of the entire predicted time series, each element Represents the moment The percentage of drug dissolved relative to the labeled amount (%), where ⊤ is the transpose of the matrix; The context vector output by the preceding steps; The weight matrix of the output layer defines the mapping relationship from the hidden feature dimension to the physical time dimension; This is the bias vector used to correct the base intercept of the release curve. Figure 9 The diagram shows the final curve obtained in this embodiment. As can be seen from the figure, compared with traditional discrete sampling points, the final output in this embodiment is a continuous and smooth curve. This means that researchers no longer need to guess what happened between two sampling points. The model completely fills the time gap, allowing researchers to clearly see the details of the entire drug release process.
[0128] After obtaining the predicted curve, in order to meet the actual needs of pharmaceutical evaluation, it is necessary to extract key quality attributes (CQAs) from the curve. That is, through numerical inversion methods, the precise time required to reach a specific release percentage (such as 50% or 90%) is calculated. These parameters directly reflect the release rate and bioavailability potential of the drug formulation.
[0129] In this embodiment, the output module is typically connected to a visualization terminal (such as a workstation monitor or mobile monitoring device) to graphically plot the cumulative drug release curve in real time. This allows operators to intuitively monitor every subtle dynamic of drug release, such as whether there is excessively rapid initial release (burst release), whether the mid-term release is constant (zero-order release characteristic), or whether there is drug residue in the final stage. To transform massive amounts of curve data into decision-making data that directly guides production and R&D, this step also includes automatically calculating and outputting the following key drug release kinetic parameters based on the drug release curve data:
[0130] Feature release time point This refers to the cumulative release of a drug reaching a specific percentage. The time required (Half-life) refers to the time it takes for 50% of the drug to be released, reflecting the overall rate of drug release; (Complete release period) refers to the time it takes for 90% of the drug to be released, and is usually regarded as the end of drug release.
[0131] For example, in this embodiment, based on the obtained complete curve Key dynamic time points can be extracted using numerical interpolation or search algorithms and calculated using the following formula:
[0132]
[0133]
[0134] in, Defined as the time required for 50% of the cumulative drug release, this parameter is typically used to characterize the half-life or average release rate of a drug. Defined as the time required for 90% of the cumulative drug release, this parameter is generally regarded in pharmaceutical terms as the endpoint indicator for complete drug release.
[0135] It should be noted that the above formula uses a minimum distance search at discrete time points. In practical high-precision applications, if There is no exact match between this value and the target value (e.g., 50%), and it is usually found in... and Linear interpolation techniques are used to obtain a finer temporal resolution than the sampling interval, thereby ensuring the physical accuracy of the dynamic parameters.
[0136] Understandably, in traditional methods, due to the sparse sampling points, accuracy is limited. or Often, estimation requires linear interpolation between two widely separated measurement points, resulting in significant errors. However, in this embodiment, a high-resolution prediction curve is available. The system can accurately locate [the target area] through direct search or interpolation within a small neighborhood. or The exact moment.
[0137] Release rate constant This refers to the kinetic constant that describes the decay of the drug release rate. The system incorporates various classic drug release kinetic models, such as the zero-order kinetic model. First-order dynamic model Higuchi equation Or the Korsmeyer-Peppas model The system will automatically perform nonlinear least squares fitting between the generated prediction curve and the above model, and compare the goodness of fit. It automatically selects the most suitable model and calculates the corresponding rate constant. and release index This not only quantifies the release rate but also reveals the drug release mechanism (whether it is diffusion-dominated, dissolution-dominated, or a mixed mechanism).
[0138] In addition to routine parameter calculations, this step can also include a crucial safety monitoring function—dose burst warning. Dose burst refers to the uncontrolled, large-volume release of a sustained-release formulation within a short period due to formulation defects or environmental factors (e.g., the influence of alcohol), which may trigger toxic reactions. The system utilizes the differentiability of high-resolution curve data to calculate the first derivative of the drug release curve (i.e., the instantaneous release rate) in real time. The system has a preset safe release rate threshold. During monitoring, once the calculated instantaneous release rate is reached... If the safety threshold is exceeded for multiple preset time steps consecutively, the system will immediately determine that there is a risk of dose release and trigger an audible and visual alarm or send an abnormality report to the control center. This function is completely impossible to achieve in traditional discrete sampling methods because discrete points cannot capture the instantaneous rate spikes that occur between two points.
[0139] In summary, step 5 transforms the continuous spectral information decoded by the deep learning model into visualized curves and quantifiable key quality attributes (CQA), which not only enables accurate evaluation of the release effect of sustained-release drugs, but also provides a real-time digital defense for monitoring drug quality risks.
[0140] Step 5: In addition, in this embodiment, in order to ensure that the model prediction results are not only numerically accurate, but also physically and logically consistent, a composite loss function containing data-driven terms and physical constraint terms is designed to guide the end-to-end training of the model.
[0141] Understandably, after constructing a complete link from spectral input to release curve output, the model training process is essentially an optimization problem of finding the optimal solution in the parameter space. However, traditional deep learning training only relies on minimizing the error between the predicted value and the true value (such as mean square error). This can lead to the model generating prediction curves that violate physical common sense in order to overfit high-frequency noise in the training data. For example, the predicted cumulative release rate may suddenly drop at a certain moment. To solve this problem, the fundamental physicochemical law of irreversible drug release must be transformed into a mathematical constraint and embedded into the loss function. Specifically, the cumulative release rate of a drug is a monotonically non-decreasing function because once the drug dissolves in the medium, its cumulative amount cannot be reduced under normal dissolution test conditions (ignoring extreme cases such as recrystallization).
[0142] Therefore, in this embodiment, a composite loss function with dual objectives is adopted, including:
[0143] Mean squared error loss, as a data fidelity term, is responsible for narrowing the Euclidean distance between the predicted curve and the true curve measured by the gold standard method such as HPLC (high performance liquid chromatography), ensuring numerical accuracy; monotonicity physical constraint loss, as a physical regularization term, is specifically used to detect and penalize segments in the predicted curve that violate monotonicity (i.e., have a negative slope).
[0144] For example, in this embodiment, the composite loss function can be expressed by the following formula:
[0145]
[0146] in, This is the final composite loss function; Let the mean squared error loss function be used. This is the physical weighting coefficient, a key hyperparameter used to adjust the proportion of physical constraints in the total loss; if If the value is too small, the model may produce oscillating curves due to noise; if... If the value is too large, the model may sacrifice local fitting accuracy to satisfy monotonicity. In this embodiment, it can be... Set it to a positive number (such as 0.1 or 1.0) to balance fitting accuracy and physical compliance; It is a monotonic physical constraint loss function.
[0147] The mean squared error loss function can be expressed by the following formula:
[0148]
[0149] The monotonic physical constraint loss function can be expressed by the following formula:
[0150]
[0151] in, This represents the total number of samples in the training batch. The length of the time series for each sample; For the first Each sample at time point The true cumulative release rate, determined by standard analytical methods, represents the learning target; The model predicts the first Each sample at time point The predicted cumulative release rate; This acts as a penalty activation function.
[0152] It should be noted that it is necessary to examine the prediction difference between adjacent time points. ,if (That is, whether the release amount increases or remains constant over time), then ,at this time This indicates that the moment conforms to the laws of physics and there is no penalty for loss; if (i.e., a non-physical negative release occurs), then ,at this time The loss function will produce a positive value proportional to the magnitude of the violation, which will generate a large gradient signal, forcing the model to correct this downward trend in the next iteration.
[0153] Example 2
[0154] This embodiment discloses an AI-based detection system for the release effect of sustained-release drugs. The system includes a high-performance processor and a memory. The memory stores a computer program that executes the method described in Embodiment 1. When the processor runs the program, it can achieve a fully automated process from spectral data acquisition to release curve generation.
[0155] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for detecting the release effect of sustained-release drugs based on AI, characterized in that, The detection method includes: Acquire time-series spectral data of the sustained-release drug under test over a continuous time period; The time-series spectral data is input into a multi-scale concurrent convolution module. Through parallel narrow-band feature extraction paths and broadband feature extraction paths, narrow-band feature vectors related to drug molecule concentration and broadband feature vectors related to formulation excipient state are extracted respectively, and then fused to obtain a fused feature vector sequence. The fused feature vector sequence is input into the temporal feature decoding model, which uses a recursive structure with state memory to simulate the cumulative effect of drug release and combines a physical constraint attention mechanism to focus on the dynamic inflection points in the release process to decode and generate drug release curve data.
2. The method for detecting the sustained-release drug release effect based on AI according to claim 1, characterized in that, After acquiring the time-series spectral data, the process further includes: Baseline calibration is performed on the time-series spectral data to estimate and subtract the dynamic baseline caused by background fluctuations using asymmetric least squares or polynomial fitting. The time-series spectral data is smoothed to filter out random high-frequency noise; The time-series spectral data are scaled to eliminate intensity differences caused by optical path or light source fluctuations.
3. The method for detecting the sustained-release drug release effect based on AI according to claim 1, characterized in that, The multi-scale concurrent convolutional module extracts features in the following way: The chemical feature signals in the time-series spectral data are captured using small-sized one-dimensional convolutional kernels in the narrow-band feature extraction path, wherein, The size of the small-sized one-dimensional convolution kernel is on the same order of magnitude as the half-width at half-maximum (WHM) of the characteristic absorption peak of the drug to be tested. The physical background signal in the time-series spectral data is captured using a large-size one-dimensional convolutional kernel in the broadband feature extraction path, wherein, The size of the large-size one-dimensional convolution kernel is significantly larger than the full width at half maximum (FWHM) of the characteristic absorption peak of the drug to be tested.
4. The method for detecting the effect of sustained-release drug delivery based on AI according to claim 3, characterized in that, The narrowband feature extraction path is configured to perform matched filtering or high-pass filtering to extract drug concentration-related chemical fingerprints; The broadband feature extraction path is configured to perform low-pass filtering to extract physical environmental features characterizing the swelling, dissolution, or scattering of the excipient.
5. The method for detecting the effect of sustained-release drug delivery based on AI according to claim 1, characterized in that, The temporal feature decoding model includes: Cascaded Long Short-Term Memory (LSTM) network layers and physically constrained attention mechanism layers; The internal cell state of the LSTM layer is configured to simulate the drug concentration accumulation state or concentration gradient history in the dissolution medium. The physical constraint attention mechanism layer is configured to receive a sequence of hidden states from the LSTM layer, focusing computational resources and attention on key time points that determine drug quality.
6. The method for detecting the sustained-release drug release effect based on AI according to claim 5, characterized in that, The physical constraint attention mechanism layer is calculated through an autoregressive feedback loop: Obtain the instantaneous release rate predicted by the temporal feature decoding model at the previous time step; Calculate the attention energy score at the current moment based on the hidden state at the current moment and the instantaneous release rate predicted at the previous moment; The hidden state sequence is weighted and summed based on the attention energy score to generate a context vector.
7. The method for detecting the sustained-release drug release effect based on AI according to claim 1, characterized in that, The instantaneous release rate at each time point is calculated based on the first derivative of the drug release curve data. If the instantaneous release rate exceeds the preset safe release rate threshold for multiple consecutive time steps, a dose burst release warning signal is triggered.
8. The method for detecting the effect of sustained-release drug delivery based on AI according to claim 1, characterized in that, The detection method further includes: Key kinetic parameters of the drug release curve data are extracted, including characteristic release time points and release rate constants; The release rate constant is obtained by fitting the drug release curve data with a preset kinetic mathematical model.
9. The method for detecting the effect of sustained-release drug delivery based on AI according to any one of claims 1 to 8, characterized in that, The temporal feature decoding model is trained end-to-end using a composite loss function, which includes a mean squared error loss term and a monotonic physical constraint loss term. The monotonic physical constraint loss term is used to apply gradient penalties to predicted values in the drug release curve data that violate the monotonic non-decreasing law.
10. A detection system for the release effect of sustained-release drugs based on AI, characterized in that, The detection system includes: processor; A memory storing a computer program, which, when executed by a processor, implements the AI-based method for detecting the effect of sustained-release drug release as described in any one of claims 1 to 9.
Citation Information
Patent Citations
On-line quality detection method for nerve-calming and brain-nourishing liquid based on multispectral detection technology
CN120446023A
Nano-drug release kinetics prediction method and device based on multi-modal data fusion, equipment and medium
CN121171647A
Crop fertilizer efficiency regulation and control method and device based on time sequence spectrum and medium
CN121189574A