A method and system for detecting process-related imaging impurities in pharmaceutical production
By employing a correlation imaging impurity detection method, utilizing binary mask matrix projection and multilayer compressed sensing technologies, the problems of low efficiency and insufficient accuracy in impurity detection during drug production have been solved, achieving efficient and accurate online impurity detection in the drug production process.
Patent Information
- Application Number
- CN202511497013.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2045-10-20
AI Technical Summary
The current drug manufacturing process suffers from low efficiency and insufficient accuracy in impurity detection, making it difficult to identify the risks of impurities generated during production in a timely manner, which can easily lead to batch delays or product scrapping.
The correlation imaging impurity detection method is adopted. By loading a binary mask matrix for projection and single-pixel detection, combined with multi-round iteration and multi-layer compressed sensing reconstruction, multi-level segmentation labels and detection feature sequence labels with entropy value as the attention target are generated. Finally, the impurity detection result is determined by matching in the impurity feature library.
It enables efficient and accurate online impurity detection in the drug manufacturing process, and can identify and provide feedback on impurity information in real time, avoiding delays in the production process and product quality problems.
Smart Images

Figure CN120971448B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of drug impurity detection, and particularly relates to a drug production correlation imaging impurity detection method and system. BACKGROUND
[0002] In modern drug production processes, drug purity and impurity levels are directly related to the safety, effectiveness and compliance of the drug. If the drug impurities exceed the limit, not only the stability and efficacy of the drug may be affected, but also potential side effects may be caused. Existing drug impurity detection mainly relies on laboratory offline analysis methods, such as high performance liquid chromatography, gas chromatography, mass spectrometry or nuclear magnetic resonance, etc. Such methods have certain advantages in detection accuracy, but often have problems of complex operation, tedious sample pretreatment steps and long detection period. Since the detection results can only be fed back after production is completed, it is difficult to identify the impurity risk generated in the production process in a timely manner, and batch delay or even product scrapping may occur. SUMMARY
[0003] The present application provides a drug production correlation imaging impurity detection method and system, which solves the technical problems of low impurity detection efficiency and insufficient detection accuracy in the prior art.
[0004] In a first aspect, the present application provides a drug production correlation imaging impurity detection method, which comprises:
[0005] loading a first binary mask matrix, projecting a target product area, controlling a single-pixel detector to detect, determining a first measurement value and light-weight reconstruction into a first preview image; through pre-checking the first preview image, generating a second binary mask matrix and performing projection and detection reconstruction, through multiple iterations until the Nth preview image is determined; retrieving the first preview image to the Nth preview image from the temporary database of the online detection platform, performing multi-layer compressed sensing and reconstruction, and determining a reconstruction result, wherein the reconstruction result has multi-level segmentation labels and identification feature sequence labels with entropy value as attention targets; for the reconstruction result, matching in an impurity feature library to determine an impurity identification result.
[0006] In a second aspect, the present application provides a drug production correlation imaging impurity detection system, which comprises:
[0007] The projection unit loads a first binary mask matrix, projects the target product area, controls the single-pixel detector to detect, determines a first measurement value, and lightly reconstructs a first preview image; the iteration unit generates a second binary mask matrix by pre-checking the first preview image, and performs projection and detection reconstruction, and iterates multiple rounds until an Nth preview image is determined; the reconstruction unit retrieves the first preview image to the Nth preview image from a temporary database of an online detection platform, performs multi-layer compressed sensing and reconstruction, and determines a reconstruction result, wherein the reconstruction result includes multi-level segmentation labels and identification characteristic sequence labels with entropy values as attention targets; and the matching unit matches the reconstruction result in an impurity characteristic library to determine an impurity identification result.
[0008] One or more technical solutions provided in the present application have at least the following technical effects or advantages:
[0009] First, a first binary mask matrix is loaded to project the target product area, control the single-pixel detector to detect, determine a first measurement value, and lightly reconstruct a first preview image. Then, the first preview image is pre-checked to generate a second binary mask matrix, and projection and detection reconstruction are performed, and multiple rounds of iteration are performed until an Nth preview image is determined. Then, the first preview image to the Nth preview image is retrieved from a temporary database of an online detection platform, multi-layer compressed sensing and reconstruction are performed, and a reconstruction result is determined, wherein the reconstruction result includes multi-level segmentation labels and identification characteristic sequence labels with entropy values as attention targets. Finally, the reconstruction result is matched in an impurity characteristic library to determine an impurity identification result. The technical problem of low impurity detection efficiency and insufficient detection accuracy in the production process of the prior art is solved, and the technical effect of high-efficiency and accurate online detection of drug impurities in the production process is achieved. BRIEF DESCRIPTION OF DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0011] Figure 1 A drug production related imaging impurity detection method flowchart is provided for the embodiments of the present application.
[0012] Figure 2 A drug production related imaging impurity detection system structure diagram is provided for the embodiments of the present application.
[0013] Legend of the drawings: projection unit 11, iteration unit 12, reconstruction unit 13, and matching unit 14. DETAILED DESCRIPTION
[0014] The application provides a method and system for detecting impurities in drug production by correlation imaging, which solves the technical problems of low efficiency and insufficient accuracy in impurity detection in the prior art.
[0015] The technical solutions in the embodiments of the application will be clearly and completely described below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, rather than all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the application.
[0016] It should be noted that the terms "comprising" and "having" are intended to cover non-exclusive inclusion, for example, a process, method, system, product or server comprising a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or modules not clearly listed or inherent to the process, method, product or device.
[0017] Embodiment one, as shown in the application provides a method for detecting impurities in drug production by correlation imaging, wherein the method comprises: Figure 1 Loading the first binary mask matrix, projecting the target product area, controlling the single-pixel detector to detect, determining the first measurement value and lightweight reconstruction into the first preview image.
[0018] In the embodiments of the application, the wide-spectrum light source is turned on to globally irradiate the target product area; then the first binary mask matrix is loaded on the light modulator, wherein the binary mask matrix is a random initial mask, and the matrix elements only take two states of 0 and 1, which are used to control the on-off of the projected light. Through the modulation effect of the light modulator, the wide-spectrum light is spatially modulated and projected in the target product area, so that different spatial regions are selectively transmitted or blocked according to the distribution of the mask matrix. The modulated light signal enters the single-pixel detector, and the single-pixel detector collects the spectral response of the projected target product area, and outputs the corresponding first measurement value, which is a sequence of spectral signal intensities. The first measurement value is returned to the temporary database of the online detection platform, and then processed by the lightweight reconstructor. The lightweight reconstructor inputs the first measurement value and the first binary mask matrix, generates a low-resolution preview image based on a sparse reconstruction algorithm, obtains a first preview image, and stores it in the temporary database, providing a data basis for subsequent pre-inspection and multiple iterations.
[0019] Further, before projecting the target product area, an online detection module is constructed, comprising:
[0020]
[0021] The sample measurement value and the sample mask are matched as sample input, and the sample sparse preview image is taken as sample output to train the lightweight reconstructor; by setting the pre-check condition, the adversarial network training is performed to construct the lightweight generator, wherein the pre-check condition at least contains the information amount of the spatial region, the spectral band, and the uncertainty; the network layer is deployed according to the multi-level compressed sensing to construct the image reconstructor, the lightweight reconstructor, the lightweight generator and the image reconstructor are integrated to generate the online detection module, and the online detection module is embedded and deployed on the online detection platform to establish the path interaction between the online detection module and the temporary database.
[0022] Before projecting on the target product area, the online detection module for impurity detection is constructed. Specifically, a plurality of sets of sample data are collected, each set of sample data containing a sample measurement value and a corresponding sample mask, both of which are taken as input, and a sample sparse preview image is taken as output. The lightweight reconstructor is trained using a supervised training method to enable it to quickly generate a preview image under low sampling conditions. On this basis, the pre-check condition is set in advance, which at least includes the information amount threshold of the spatial region, the information amount threshold of the spectral band, and the uncertainty index. By introducing an adversarial network structure during training, the lightweight generator is constructed, so that the generator can dynamically output a new mask matrix under different detection conditions. Then, according to the principle of multi-level compressed sensing, the network layer is deployed in layers to construct the image reconstructor, which can perform layer-by-layer perception and reconstruction on the sparse collected multi-round measurement data to improve the accuracy and stability of the final image reconstruction. The lightweight reconstructor, the lightweight generator and the image reconstructor are integrated to form a complete online detection module. The online detection module is embedded and deployed on the online detection platform, and the data interface is set up to establish the path interaction with the temporary database, so that the measurement value, the mask matrix and the reconstructed preview image can be transferred between the module and the database in real time to realize closed-loop interaction during detection.
[0023] Further, the first binary mask matrix is a random initial mask; the wide spectrum light source is turned on, the first binary mask matrix is loaded, the target product area is projected based on the light modulator, the single-pixel detector is activated, and the first measurement value is determined, wherein the first measurement value is a spectral signal state; the first measurement value is returned to the temporary database of the online detection platform.
[0024] The first binary mask matrix is set as a random initial mask, and its matrix elements only take two states of 0 and 1, which is used to realize the on-off control of the light signal in the light modulator.
[0025] In the detection process, first, turn on the wide spectrum light source to provide full spectrum illumination to the target product area; then load the first binary mask matrix to the light modulator, and the light modulator modulates the incident light in space according to the binary distribution of the matrix, so that the light in different spatial regions is selectively transmitted or blocked. The modulated light beam is projected to the target product area, and the spectral signal is collected by the single-pixel detector. After the single-pixel detector is activated, the modulated light intensity of the target product area is converted into an electrical signal, and a first measurement value is output, wherein the first measurement value is a spectral signal state data reflecting the spectral intensity distribution of the target product area. The obtained first measurement value is transmitted in real time to the temporary database of the online detection platform through the communication interface, so that the measurement value is paired with the first binary mask matrix by the lightweight reconstructor in the subsequent process, and preliminary preview reconstruction of the target product area is realized.
[0026] Further, determining the first measurement value and lightweight reconstruction into the first preview image comprises:
[0027] With the detection of the single-pixel detector, the online detection module is activated; the lightweight reconstructor calls the first measurement value, pairs it with the first binary mask matrix as input, performs lightweight reconstruction, determines the first preview image, and adds it to the temporary database.
[0028] After the single-pixel detector completes the spectral detection of the target product area, the detection platform synchronously activates the online detection module to ensure that the measurement data can be called immediately. The lightweight reconstructor in the online detection module receives the first measurement value output by the detector, and calls the corresponding first binary mask matrix from the temporary database, and processes them as paired input. The lightweight reconstructor performs fast calculation on the input data based on the sparse reconstruction and low-rank constraint algorithm, reduces the calculation complexity while retaining the main spatial and spectral feature information, and generates a low-resolution preview image, i.e. the first preview image. The first preview image can intuitively reflect the spectral imaging characteristics of the target product area under the initial mask condition. After the reconstruction is completed, the first preview image is automatically stored in the temporary database of the online detection platform.
[0029] By previewing the first preview image, a second binary mask matrix is generated and projection and detection reconstruction are performed, and through multiple iterations, the Nth preview image is determined.
[0030] The first preview image is pre-inspected, and spatial features and spectral features thereof are scanned and analyzed pixel by pixel, to identify a region in a spatial area whose information amount is higher than a set threshold and has uncertainty, and a wave band in a spectral wave band whose information amount is higher than a set threshold and has fluctuation. Based on the above identification result, corresponding spatial scanning threads and spectral scanning threads are determined, and the two are fused to perform mask reconstruction operation, to generate a second binary mask matrix. The second binary mask matrix can intensify sampling for key regions of the target product area, thereby improving the effectiveness and resolution of subsequent detection. The generated second binary mask matrix is loaded to a light modulator, and the target product area is projected and collected by a single-pixel detector again, to obtain corresponding second measurement values, and a second preview image is generated by a lightweight reconstructor. The second preview image is stored in a temporary database and then enters the pre-inspection process again. Through multiple rounds of iteration of the above "pre-inspection-mask generation-projection collection-reconstruction" steps, the sampling area and spectral wave band are gradually optimized, until the Nth preview image is obtained, which can maximize the target impurity feature information while maintaining sampling efficiency.
[0031] Further, the first preview image is pre-inspected to generate a second binary mask matrix, including:
[0032] The first preview image and the first measurement value are transferred to the lightweight generator; by scanning the first preview image, a spatial phase greater than a first information amount threshold and a first uncertainty threshold in a spatial area is located, and a first scanning thread is determined; by scanning the first measurement value, a spectral measurement greater than a second information amount threshold and a second uncertainty threshold in a spectral wave band is located, and a second scanning thread is determined; the first scanning thread and the second scanning thread are fused, mask reconstruction is performed, and a second binary mask matrix is generated.
[0033] The first preview image and the corresponding first measurement value are input to the lightweight generator in the online detection module as an input data source for mask generation. After receiving the input, the lightweight generator performs joint analysis in the spatial dimension and the spectral dimension. Specifically, in the spatial dimension, the first preview image is scanned pixel by pixel, the signal-to-noise ratio and the feature information amount of each pixel region are extracted, and the uncertainty index is combined for judgment. When the feature information amount of a certain spatial region exceeds the preset first information amount threshold, and its uncertainty is higher than the first uncertainty threshold, the spatial phase corresponding to the region is marked as a key sampling region, thereby forming a first scanning thread. At the same time, in the spectral dimension, each spectral wave band of the first measurement value is traversed, and the energy distribution and characteristic fluctuation of each wave band are compared. When the spectral measurement of a certain wave band is greater than the second information amount threshold and the uncertainty is higher than the second uncertainty threshold, the wave band is marked as a key sampling wave band, thereby forming a second scanning thread.
[0034] After obtaining the first scanning thread of the spatial dimension and the second scanning thread of the spectral dimension, fusion calculation is performed on the two, and a mask reconstruction process is performed according to the fusion result, so that the generated mask can cover the key spatial region and spectral band at the same time. The final output reconstruction result is a second binary mask matrix, which is more concentrated and optimized in information distribution than the initial random mask, and can improve the prominence of impurity features and the reconstruction quality in the subsequent light modulation projection and detection process.
[0035] The first preview image to the Nth preview image are retrieved from the temporary database of the online detection platform, multi-layer compressed sensing and reconstruction are performed, and the reconstruction result is determined, wherein the reconstruction result includes multi-level segmentation identification and detection feature sequence identification with entropy value as the attention target.
[0036] The first preview image to the Nth preview image are retrieved from the temporary database of the online detection platform, and all the preview images obtained through multiple iterations are used as the reconstruction input data set. First, data alignment is performed between the preview images, including spatial scale normalization and time sequence correction, to ensure the consistency of different preview images in pixel position and time dimension; then, the preview images and the corresponding measurement values and mask vectors are subjected to secondary data alignment and normalized to spectral source data. For the spectral source data, an image reconstructor is called to perform multi-layer compressed sensing and reconstruction, specifically: the input data is sent to different modes of compressed sensing network layer by layer, each layer uses different sampling rate and sensing operator, respectively extracts low-frequency structural features and high-frequency detail features, and finally forms a complete multi-layer sensing result through cross-layer fusion.
[0037] In the reconstruction process, an entropy-based attention mechanism is introduced to weight the layered sensing results, wherein the entropy value is used to measure the information amount and uncertainty of different regions or bands. When the entropy value of a region or band is high, the system gives it a higher attention weight, so that it can get a clearer feature expression in the reconstructed image. The final reconstruction result not only contains the overall spectral image of the target product area, but also carries two types of identification information: one is the multi-level segmentation identification with entropy value as the attention target, which is used to distinguish the region boundaries with different information intensity and uncertainty; the other is the detection feature sequence identification, which is used to mark the feature sequence information related to impurities in each segmentation area.
[0038] Further, the multi-layer compressed sensing and reconstruction are performed to determine the reconstruction result, including:
[0039] According to the image reconstructor, the first preview image to the Nth preview image are retrieved, the first data alignment between the preview images is performed, the second data alignment between the preview images, measurement values and mask vectors is performed, and the normalization to spectral source data is performed; for the spectral source data, multi-layer compressed sensing and reconstruction are performed to determine the reconstruction result.
[0040] According to the calling instruction of the image reconstructor, the first preview image to the Nth preview image are sequentially called from the temporary database to form a preview image set of multi-round iterative acquisition. The first data alignment processing between the preview images is performed on the preview image set, including the uniformity of spatial resolution, the normalization of pixel matrix and the synchronous correction of time sequence, to ensure the consistency of each preview image in spatial scale and time dimension. Subsequently, the preview image set is matched with the corresponding measurement value data and the mask vector, and the second data alignment operation is performed, so as to establish the corresponding relationship between the preview image, the measurement value and the mask in the same reference system, and obtain the spectral source data in a unified format through normalization processing.
[0041] After obtaining the spectral source data, the spectral source data is input into the image reconstructor, and the compression sensing and reconstruction operation is performed layer by layer. Specifically, the image reconstructor adopts different compression sensing modes and sensing operators in each network layer, so as to capture the global low-frequency structural features in the low sampling rate layer and extract the local high-frequency detail features in the high sampling rate layer; the reconstruction results of each layer are fused and superimposed through cross-layer fusion and weighted superposition to form the final multi-layer perception reconstruction result.
[0042] Further, the multi-layer compression sensing and reconstruction are performed on the spectral source data, including:
[0043] Each network layer receives the spectral source data, performs hierarchical directional processing, and determines a multi-layer perception result, wherein the compression sensing modes of each network layer are different; based on the multi-layer perception result, an attention mechanism based on entropy value is introduced for reconstruction to determine the reconstruction result, wherein the entropy value is defined by information amount and uncertainty.
[0044] Specifically, the normalized spectral source data is sequentially input into the multiple network layers of the image reconstructor, and each network layer independently adopts different compression sensing modes, including a low-sampling-rate global feature sensing mode, a medium-sampling-rate regional feature sensing mode and a high-sampling-rate detail feature sensing mode. After completing the corresponding hierarchical directional processing, each network layer outputs a local reconstruction result to form a multi-layer perception result, wherein the multi-layer perception result can capture the spectral features of the target product area from different levels to realize layer-by-layer reconstruction from coarse to fine.
[0045] Based on the multi-layer perception result, an attention mechanism based on entropy value is introduced to weight and fuse the multi-layer perception result. Specifically, the entropy values of each spatial region and spectral band are calculated to measure the information amount and uncertainty thereof, and when the entropy value of a certain region or band is high, it indicates that the information amount is large and the volatility is significant, and higher attention weight should be given in the reconstruction process; on the contrary, the region with lower entropy value is given lower weight in the fusion. Through the attention mechanism, the regions and bands related to the potential impurity features can be highlighted in the final reconstruction result.
[0046] Further, after determining the reconstruction result, the method comprises:
[0047] Taking the attention level based on the attention target as the segmentation basis, a segmentation boundary mark is identified; based on the segmentation boundary mark, fitting based on the multi-layer perception result is performed on each segmentation area to determine a group of detection characteristic sequences, wherein each segmentation area corresponds to a detection characteristic sequence; and based on the segmentation boundary mark and the group of detection characteristic sequences, the reconstruction result is marked.
[0048] The entropy value should remain relatively consistent in an equilibrium state. When there is a significant difference in the entropy values at different positions in the reconstruction result, it indicates that the spectral or spatial characteristics of the region are different, which may be due to different defects or impurities causing an increase in signal complexity. The higher the entropy value of a region, the more mixed the information and the stronger the uncertainty, and the higher the attention level, that is, the greater the possibility of the presence of potential defects or impurities in the region. Therefore, different attention levels are assigned to each region according to the difference in entropy values, and regions with different information amounts and uncertainty levels are divided into several hierarchical blocks, and each attention level is taken as the segmentation basis to generate a corresponding segmentation boundary mark, wherein the segmentation boundary mark is used to indicate the spatial range of regions with different information intensities in the reconstruction result.
[0049] In each segmentation area, the multi-layer perception result is called to perform fitting processing. By weighting and integrating the multi-layer reconstruction characteristics of the segmentation area, the spectral and spatial characteristic parameters related to impurities are extracted to form a detection characteristic sequence. Each segmentation area corresponds to an independent group of detection characteristic sequences, and the characteristic sequences can reflect the spectral fingerprint characteristics and spatial distribution rules of potential impurities in the region. Finally, based on the segmentation boundary mark and the group of detection characteristic sequences, the reconstruction result is marked again, that is, the segmentation boundary and the characteristic sequence label are superimposed on the reconstruction image, so that each segmentation area not only has a clear spatial division, but also has a characteristic annotation that can be used for impurity identification.
[0050] For the reconstruction result, matching is performed in the impurity characteristic library to determine an impurity detection result.
[0051] The impurity characteristic library is constructed by collecting spectral characteristics, spatial distribution patterns and corresponding characteristic sequence information of different types of drug impurities, forming a mapping relationship between impurity spectral and spatial characteristics.
[0052] In the detection process, the identified test feature sequence group in the reconstruction result is compared with the known impurity features in the feature library one by one, and the similarity calculation, feature weight matching and entropy value weighting method are used to determine the target impurity type existing in the reconstruction result. For the matched impurities, further spatial phase integration processing is performed to combine the distribution information of the impurities in different segmentation zones to generate a complete impurity distribution result. The final output impurity test result includes the type, feature position and content level of the impurities, and is visually displayed and alarm prompted in the terminal interface of the online detection platform, realizing real-time impurity monitoring and feedback in the drug production process.
[0053] Further, in the impurity feature library matching, the impurity test result is determined, including:
[0054] For the target product, the mapping relationship between the spectrum feature and the impurity feature is mined to construct an impurity feature library; the impurity feature library is traversed, and the feature matching based on the test feature sequence is performed on the reconstruction result to determine the test impurity; the spatial phase integration is performed on the test impurity as the impurity test result, which is displayed and alarmed in the terminal interface of the online detection platform.
[0055] For the target product, the data of the possible impurity types is collected in the system training and initialization stage, the performance features of different impurities in the spectral domain and the spatial domain are mined, the mapping relationship between the spectrum feature and the impurity type is established, and thus the impurity feature library is constructed, wherein the impurity feature library contains feature templates of multiple impurity categories, and each template records typical spectral fingerprint information, spatial distribution features and corresponding test feature sequences.
[0056] In the detection running process, the test feature sequence extracted from the reconstruction result is compared with the feature templates in the feature library one by one, and through the steps of feature similarity calculation, weight matching and threshold determination, the test impurity existing in the reconstruction result is determined. Specifically, the cosine similarity or Euclidean distance is used to compare the spectral fingerprint vectors of the test feature sequence and the feature template to obtain a similarity score; for different spectral bands and spatial parameters, the weight coefficients are set in advance to weight and correct the similarity score to highlight the bands and regions where the key impurity features are located; the weighted and corrected similarity score is compared with the preset matching threshold, and when the similarity is greater than the threshold (such as 0.85 or 90%), it is determined that the test feature sequence and the corresponding impurity template are matched successfully.
[0057] After the impurity feature matching is completed and the test impurity is identified, the detection results of the test impurity in different segmentation areas are further processed in spatial phase integration. Specifically, the information of the impurity that is successfully matched in each segmentation area is obtained, including the spatial coordinate position of the impurity in the segmentation area, the spectral intensity value, and the local distribution feature; then, the results belonging to the same impurity category in different segmentation areas are registered according to the spatial coordinates, the spatial phase is aligned, and the overlap or loss caused by the segmentation boundary is eliminated; after the registration is completed, the spectral intensity of each segmentation area is weighted and superimposed, and the weighting coefficient is set according to the attention level or information amount of the segmentation area, so as to ensure that the information-rich area occupies a higher weight in the integration result; then, the interpolation and smoothing algorithm is used to process the boundary transition area to generate a continuous impurity distribution map; finally, the complete impurity test result is output, including the global distribution range of the impurity, the relative intensity level of different areas, and the overall spatial distribution feature.
[0058] The integrated impurity test result is uniformly presented in the terminal interface of the online detection platform and can be visually displayed in the form of color identification, heat map or contour map, and at the same time, the alarm module is triggered to prompt the abnormal impurity distribution.
[0059] In summary, the embodiments of the present application have at least the following technical effects:
[0060] First, a first binary mask matrix is loaded to project the target product area, control the single-pixel detector to detect, determine the first measurement value, and lightly reconstruct the first preview image. Then, the first preview image is pre-inspected to generate a second binary mask matrix and perform projection and detection reconstruction, and multiple iterations are performed until the Nth preview image is determined. Then, the first preview image to the Nth preview image is retrieved from the temporary database of the online detection platform, and multi-layer compressed sensing and reconstruction are performed to determine the reconstruction result, wherein the reconstruction result has a multi-level segmentation identifier and a test feature sequence identifier with entropy value as the attention target. Finally, the reconstruction result is matched in the impurity feature library to determine the impurity test result. The technical problems of low impurity detection efficiency and insufficient detection accuracy in the production process of the prior art are solved, and the technical effect of realizing high-efficiency and accurate online detection of drug impurities in the production link is achieved.
[0061] Embodiment two, based on the same inventive concept as the impurity detection method of the above-mentioned embodiment of the drug production, as shown in Figure 2 The present application provides an impurity detection system for drug production, wherein the system comprises:
[0062] The projection unit 11 loads the first binary mask matrix, projects the target product area, controls the single-pixel detector to detect, determines the first measurement value and lightweight reconstruction into the first preview image; the iteration unit 12 generates the second binary mask matrix by pre-checking the first preview image, and performs projection and detection reconstruction, and through multiple iterations until the Nth preview image is determined; the reconstruction unit 13 retrieves the first preview image to the Nth preview image from the temporary database of the online detection platform, performs multi-layer compressed sensing and reconstruction, and determines the reconstruction result, wherein the reconstruction result exists multi-level segmentation mark and identification feature sequence mark with entropy value as attention target; the matching unit 14 matches the reconstruction result in the impurity feature library to determine the impurity identification result.
[0063] Further, the projection unit 11 is used to execute the following method:
[0064] The sample measurement value and the sample mask are paired as sample input, and the sample sparse preview image is taken as sample output, and the lightweight reconstructor is trained; the pre-checking condition is set to perform adversarial network training, and the lightweight generator is constructed, wherein the pre-checking condition at least contains the information amount of the spatial region, the spectral band and the uncertainty; the network layer is deployed according to the multi-level compressed sensing, the image reconstructor is constructed, the lightweight reconstructor, the lightweight generator and the image reconstructor are integrated, the online detection module is generated, the online detection module is embedded and deployed in the online detection platform, and the path interaction between the online detection module and the temporary database is established.
[0065] Further, the projection unit 11 is used to execute the following method:
[0066] The first binary mask matrix is a random initial mask; the wide spectrum light source is turned on, the target product area is projected based on the light modulator by loading the first binary mask matrix, the single-pixel detector is activated, and the first measurement value is determined, wherein the first measurement value is a spectral signal state; the first measurement value is returned to the temporary database of the online detection platform.
[0067] Further, the projection unit 11 is used to execute the following method:
[0068] With the detection of the single-pixel detector, the online detection module is activated; the lightweight reconstructor retrieves the first measurement value, pairs the first binary mask matrix as input, performs lightweight reconstruction, determines the first preview image, and adds it to the temporary database.
[0069] Further, the iteration unit 12 is used to execute the following method:
[0070] The first preview image and the first measurement value stream are sent to the lightweight generator; a first scanning thread is determined by scanning the first preview image to locate a spatial phase that is greater than a first information amount threshold and a first uncertainty threshold in a spatial region; a second scanning thread is determined by scanning the first measurement value to locate a spectral measurement amount that is greater than a second information amount threshold and a second uncertainty threshold in a spectral band; the first scanning thread and the second scanning thread are fused to perform mask reconstruction to generate a second binary mask matrix.
[0071] Further, the reconstruction unit 13 is configured to perform the following method:
[0072] According to the image reconstructor, the first preview image to the Nth preview image are called, the first data alignment between the preview images is performed, the second data alignment of the preview images and the measurement values and the mask vector is performed, and the spectral source data is normalized; for the spectral source data, multi-layer compressed sensing and reconstruction are performed to determine the reconstruction result.
[0073] Further, the reconstruction unit 13 is configured to perform the following method:
[0074] Each network layer receives the spectral source data, performs hierarchical directional processing, and determines a multi-layer perception result, wherein the compressed sensing modes of each network layer are different; according to the multi-layer perception result, an attention mechanism based on entropy value is introduced for reconstruction to determine the reconstruction result, wherein the entropy value is defined based on information amount and uncertainty.
[0075] Further, the reconstruction unit 13 is configured to perform the following method:
[0076] The attention level based on the attention target is taken as the segmentation basis and as the segmentation boundary identifier; according to the segmentation boundary identifier, fitting based on the multi-layer perception result is performed on each segmentation area to determine a group of detection characteristic sequences, wherein each segmentation area corresponds to one detection characteristic sequence; according to the segmentation boundary identifier and the group of detection characteristic sequences, the reconstruction result is identified.
[0077] Further, the matching unit 14 is configured to perform the following method:
[0078] For the target product, the mapping relationship between the spectral features and the impurity features is mined to construct an impurity feature library; the impurity feature library is traversed to perform feature matching based on the detection characteristic sequence on the reconstruction result to determine a detection impurity; the detection impurity is integrated in the spatial phase as an impurity detection result, which is displayed and alarmed on the terminal interface of the online detection platform.
[0079] It should be noted that the above-mentioned embodiment sequences of the present application are merely for description only, but not for representing the advantages and disadvantages of the embodiments. And the above-mentioned embodiments of the present specification are described. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are also possible or can be advantageous.
[0080] The above only describes the preferred embodiments of the present application, and does not limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0081] The specification and drawings are merely exemplary of the present application, and any and all modifications, variations, combinations or equivalents that are within the scope of the present application should be considered. Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application belong to the scope of the present application and its equivalents, the present application is intended to include these modifications and variations.
Claims
1. A method for detecting associated imaging impurities in pharmaceutical production, characterized by, The method comprises: loading a first binary mask matrix, projecting a target product area, controlling a single-pixel detector to detect, determining a first measurement value and lightweight reconstruction into a first preview image; Through pre-checking the first preview image, a second binary mask matrix is generated and projected and detected to be reconstructed, and through multiple rounds of iteration until the Nth preview image is determined; From the temporary database of the online detection platform, the first preview image to the Nth preview image is called, multi-layer compressed sensing and reconstruction are performed, and a reconstruction result is determined, wherein the reconstruction result exists multi-level segmentation identification and identification characteristic sequence identification with entropy value as attention target; For the reconstruction result, matching is performed in the impurity characteristic library to determine the impurity identification result; After determining the reconstruction result, it comprises: According to the difference of entropy value, different attention levels are given to each region, regions with different information amount and uncertainty level are divided into several hierarchical blocks, and each attention level is taken as a segmentation basis to generate a corresponding segmentation boundary identification, wherein the segmentation boundary identification is used to indicate the spatial range of the regions with different information intensity in the reconstruction result; By weighting and integrating the multi-layer reconstruction characteristics of the segmented regions, the spectral and spatial characteristic parameters related to the impurities are extracted to form an identification characteristic sequence, and each segmented region corresponds to generate an independent identification characteristic sequence group; According to the segmentation boundary identification and the identification characteristic sequence group, the reconstruction result is identified again, and the segmentation boundary and the characteristic sequence label are superimposed on the reconstruction image; Wherein, in the impurity characteristic library, matching is performed to determine the impurity identification result, which comprises: For the target product, the mapping relationship between the spectral characteristics and the impurity characteristics is mined to construct an impurity characteristic library; Iterate through the impurity characteristic library to perform feature matching on the reconstruction result based on the identification characteristic sequence to determine the identification impurity; The spatial phase integration of the identification impurity is taken as the impurity identification result, which is displayed and alarmed on the terminal interface of the online detection platform.
2. A method for detecting process-related impurities in pharmaceutical production by correlation imaging as claimed in claim 1, characterized in that Before projecting the target product area, an online detection module is constructed, comprising: Taking the sample measurement value and the sample mask pairing as the sample input and the sample sparse preview image as the sample output, a lightweight reconstructor is trained; By setting the pre-checking condition, the adversarial network training is performed to construct a lightweight generator, wherein the pre-checking condition at least contains the information amount and uncertainty of the spatial region and the spectral band; According to the multi-level compressed sensing, the network layer is deployed to construct an image reconstructor, The lightweight reconstructor, the lightweight generator and the image reconstructor are integrated to generate an online detection module, and the online detection module is embedded and deployed in the online detection platform to establish the path interaction between the online detection module and the temporary database.
3. A method for detecting process-related impurities in pharmaceutical production by correlation imaging as claimed in claim 2, characterized in that The first binary mask matrix is a random initial mask; Turn on the wide spectrum light source, load the first binary mask matrix, project the target product area based on the light modulator, activate the single-pixel detector, and determine the first measurement value, wherein the first measurement value is the spectral signal state; The first measurement value is returned to the temporary database of the online detection platform.
4. A method for detecting process-related impurities in pharmaceutical production by correlation imaging according to claim 3, characterized in that Determine the first measurement value and lightweight reconstruction into the first preview image, comprising: The online detection module is activated by detection of the single-pixel detector; The lightweight reconstructor retrieves the first measurement value, pairs the first binary mask matrix as input, performs lightweight reconstruction, determines the first preview image, and adds it to the temporary database.
5. A method for detecting process-related impurities in pharmaceutical production by correlation imaging as claimed in claim 2, characterized in that The second binary mask matrix is generated by pre-checking the first preview image, including: The first preview image and the first measurement value are transferred to the lightweight generator; The first scanning thread is determined by scanning the first preview image to locate spatial phases greater than the first information threshold and the first uncertainty threshold in the spatial region; The second scanning thread is determined by scanning the first measurement value to locate spectral measurement quantities greater than the second information threshold and the second uncertainty threshold in the spectral band; The first scanning thread and the second scanning thread are fused to perform mask reconstruction and generate a second binary mask matrix.
6. A method for detecting process-related impurities in pharmaceutical production by correlation imaging according to claim 2, characterized in that Multi-layer compressed sensing and reconstruction are performed to determine the reconstruction result, including: According to the image reconstructor, the first preview image is retrieved until the Nth preview image, the first data alignment between the preview images is performed, the second data alignment of the preview images and the measurement values and the mask vectors is performed, and the spectral source data is normalized; For the spectral source data, multi-layer compressed sensing and reconstruction are performed to determine the reconstruction result.
7. A method for detecting process-related impurities in pharmaceutical production by correlation imaging according to claim 6, characterized in that For the spectral source data, multi-layer compressed sensing and reconstruction are performed, including: Each network layer receives the spectral source data, performs hierarchical directional processing, and determines the multi-layer sensing result, wherein the compressed sensing modes of each network layer are different; According to the multi-layer sensing result, an attention mechanism based on entropy value is introduced for reconstruction to determine the reconstruction result, wherein the entropy value is defined by information quantity and uncertainty.
8. A system for detecting associated imaging impurities in pharmaceutical production, characterized by A method for detecting impurities in a pharmaceutical production system according to any one of claims 1-7, the system comprising: A projection unit: loads the first binary mask matrix, projects the target product area, controls the single-pixel detector to detect, determines the first measurement value, and lightweight reconstructs the first preview image; An iteration unit: generates a second binary mask matrix by pre-checking the first preview image and performs projection and detection reconstruction, and through multiple iterations until the Nth preview image is determined; A reconstruction unit: retrieves the first preview image from the temporary database of the online detection platform until the Nth preview image, performs multi-layer compressed sensing and reconstruction, and determines the reconstruction result, wherein the reconstruction result has multi-level segmentation identifiers and identification feature sequence identifiers with entropy value as attention targets; A matching unit: matches the reconstruction result in the impurity feature library to determine the impurity identification result.
Citation Information
Patent Citations
Slurry quality real-time detection and analysis method based on ultrasonic image
CN118362635A
High-sensitivity drug impurity analysis and detection method and system
CN118967668A