Blockchain-based clindamycin phosphate crystallization traceability method and system
By combining multimodal data acquisition and spatiotemporal graph neural networks with blockchain evidence storage, the unreliability of polymorphic transformation during the crystallization process of clindamycin phosphate was solved, realizing reliable traceability of drug quality and automated process control.
Patent Information
- Application Number
- CN202511251213.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-03
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-09-03
AI Technical Summary
Existing technologies cannot integrate multimodal process data in real time and intelligently, and lack high-fidelity, reliable and tamper-proof records and verifications of key events in the crystallization process of clindamycin phosphate, resulting in unreliable polymorphic transformation processes and difficulty in ensuring drug quality.
By employing multimodal process data acquisition, dynamic spatiotemporal graph construction, spatiotemporal graph neural network model analysis, and digital certificates generated by AI oracles, combined with blockchain notarization, real-time monitoring and tamper-proof recording of key crystallization events can be achieved.
This system enables high-fidelity and reliable traceability of the clindamycin phosphate crystallization process, ensuring the verifiability of drug quality and the immutability of the process, and constructing an automated quality assurance closed-loop system.
Smart Images

Figure CN120766816B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information transmission in the pharmaceutical manufacturing process, and more specifically, to a blockchain-based method and system for tracing the crystallization of clindamycin phosphate. Background Technology
[0002] Clindamycin phosphate is an important broad-spectrum antibiotic widely used in clinical practice. In its production process, crystallization is a key unit operation for achieving separation, purification, and obtaining specific physicochemical properties (such as purity, particle size, and crystal form). Existing clindamycin phosphate crystallization methods typically rely on pre-defined process formulations. For example, the crude product is dissolved in a specific solvent system, and crystallization is induced through a series of fixed steps such as decolorization, concentration, and stepwise cooling to optimize macroscopic indicators such as crystallization yield and product purity.
[0003] However, clindamycin phosphate exhibits polymorphism, with at least three known polymorphs, including polymorph I, polymorph II, and polymorph III, each with different physical properties and stability. For example, polymorph I is generally considered thermodynamically stable, while the metastable polymorph II tends to transform into polymorph I over time. This polymorphism renders process control relying solely on static formulations unreliable. Any minute fluctuations in conditions during production, such as localized supersaturation changes, differences in impurity levels, or slight deviations in cooling rates, can lead to unwanted nucleation of metastable polymorphs or unexpected polymorphic transformations. Although the final product may pass pre-shipment quality control tests, such as final X-ray powder diffraction (XRPD) analysis, which can only confirm the final polymorph, it cannot prove whether an unstable polymorph was briefly generated during crystallization, nor can it prove whether the polymorphic transformation left minor defects within the crystal lattice that affect the long-term stability of the drug. Therefore, existing technologies lack a mechanism to generate high-fidelity, reliable, and tamper-proof records to prove that a specific batch of products strictly follows the expected crystal form path and crystallization kinetic trajectory. Under the framework of Quality by Design (QbD), the verifiability of the process is insufficient.
[0004] To address this challenge, Process Analytical Technology (PAT) has been introduced into pharmaceutical processes to enable real-time online monitoring. Commonly used PAT tools include Focused Beam Reflectance Measurement (FBRM) for online monitoring of particle number and chord length distribution, Particle Vision and Measurement (PVM) for real-time acquisition of crystal morphology images, and Raman spectroscopy for in-situ measurement of solute concentration and crystal structure. However, these PAT tools generate massive, high-dimensional, multimodal data streams, making it difficult for human operators to fully integrate and understand their complex interrelationships in real time. This results in a large amount of data being collected, but it is difficult to extract effective information for process control.
[0005] In recent years, artificial intelligence (AI) technologies, such as recurrent neural networks (RNNs), have been used to analyze complex PAT data to achieve process modeling and control. Meanwhile, blockchain technology, due to its decentralized, tamper-proof, and traceable characteristics, has been applied in pharmaceutical supply chain management, primarily for tracking finished products from manufacturer to patient to prevent counterfeiting and ensure logistical transparency.
[0006] Despite the progress made by each of the aforementioned technologies, significant technical limitations remain. First, there is a lack of an integrated system capable of real-time, intelligently fusing multimodal data from various PAT sensors, such as FBRM, PVM, and Raman spectroscopy, to gain a deep and dynamic understanding of the crystallization process state (especially the dynamic evolution of polymorphs). Second, existing AI applications typically store their analysis and judgment results in modifiable, centralized databases within enterprises, lacking a cryptographic guarantee mechanism to ensure the permanence, integrity, and non-repudiation of these critical findings, raising trust issues when facing stringent regulatory audits. Finally, existing blockchain applications are limited to macro-level logistics traceability after drug production, failing to penetrate the core stages of active pharmaceutical ingredient production and unable to provide reliable traceability records for micro-level critical events occurring during the crystallization process that directly determine the quality of the final product. Summary of the Invention
[0007] One aspect of this invention is to provide a blockchain-based method and system for tracing the crystallization of clindamycin phosphate, aiming to solve the technical problem that existing technologies cannot record and verify dynamic micro-events in the critical production process of drug crystallization with high fidelity, reliability, and immutability. This invention addresses the technical challenge of lacking a method to intelligently interpret real-time process data and create immutable, auditable, and cryptographically secured digital evidence for critical crystallization events (CCEs) during the crystallization process of materials like clindamycin phosphate, which undergo complex polymorphic transformations.
[0008] To achieve the above objectives, this invention provides a blockchain-based method for tracing the crystallization of clindamycin phosphate, which includes the following steps:
[0009] Step a), Multimodal process data acquisition. During the crystallization of clindamycin phosphate, multimodal process data is acquired in real time and synchronously using multiple process analysis technology (PAT) sensors deployed on the crystallization reactor. The PAT sensors include at least a Raman spectrometer for acquiring crystal chemistry and crystal form information, a focused beam reflectance measurement (FBRM) probe for acquiring particle chord length distribution and quantity information, and an online particle image analyzer (PVM) for acquiring particle images and morphology information.
[0010] Step b) Construction of a dynamic spatiotemporal map. The multimodal process data collected in step a) are preprocessed and time-aligned, and a dynamic spatiotemporal map is constructed based on this to characterize the instantaneous state of the crystallization process. In this map, the nodes correspond to each PAT sensor and other process parameters (such as temperature and stirring rate), and the features of the nodes are composed of normalized data (such as Raman spectral vectors, FBRM chord length distribution histograms, and PVM image feature vectors) collected by the corresponding sensors at specific time points.
[0011] Step c), AI model state analysis. The dynamic spatiotemporal map is used as input and fed into a pre-trained Spatio-Temporal Graph Neural Network (ST-GNN) model. The ST-GNN model analyzes the input map data in real time to learn and capture the complex dependencies between different sensor data in the spatial (inter-sensor correlation) and temporal (dynamic process evolution) dimensions, thereby generating in-depth analysis results of the current crystallization process state.
[0012] The contribution of this invention lies in the fact that the spatiotemporal graph neural network model abstracts PAT sensors and process parameters with different physical locations and functions as nodes in a graph, uses graph convolutional networks to capture the spatial correlation of variables at the same time, and uses recurrent neural network units to process the evolution of each node in the time series. Thus, it can understand the complex dynamics of the crystallization process caused by the synergistic effect of multiple variables more profoundly than traditional time series models.
[0013] Step d), Critical Crystallization Event Identification. Based on the deep analysis results of step c), the ST-GNN model monitors and identifies the occurrence of predefined Critical Crystallization Events (CCEs) in real time. A CCE refers to a process event with specific multimodal data signature characteristics that has a decisive impact on the quality of the final product, such as the start of primary nucleation, crystal form transformation, end of crystal growth, or abnormal deviation from the process.
[0014] Step e) Critical Crystallization Event Certificate Generation. Once a CCE is identified and its confidence level is higher than a preset threshold, an AI Oracle module automatically generates a digital Critical Crystallization Event Certificate (CCE Certificate) containing detailed information about the event. The CCE certificate is structured data and includes at least the event's unique identifier, drug batch number, event timestamp, event type, event-related parameters, confidence score determined by the AI model, key feature values used for the determination, cryptographic hash values of the original PAT data slice used for the determination, and the AI oracle's digital signature.
[0015] Step f), blockchain-based notation. The CCE certificate generated in step e) is cryptographically signed and submitted as a transaction to a blockchain network. The blockchain network verifies the validity of the transaction through a consensus mechanism and permanently and immutably records it on a distributed ledger, thereby establishing a verifiable event chain for this batch of clindamycin phosphate crystallization process.
[0016] The invention also makes a groundbreaking contribution by proposing an AI oracle module as a bridge connecting the crystallization process in the physical world with the blockchain ledger in the digital world. This AI oracle is not only an artificial intelligence model but also an automated and trusted event notarization unit. It cryptographically encapsulates the results of intelligent parsing and submits them to the blockchain, thereby solving the data integrity and non-repudiation problems faced when storing process analysis results in traditional centralized databases.
[0017] Preferably, to protect trade secrets while ensuring process verifiability, step f) can be further improved. After the AI oracle generates the CCE certificate, instead of directly submitting the complete certificate content containing specific process feature values (such as the Evidentiary_Features field) to the blockchain, a cryptographic proof is generated using a Zero-Knowledge Proof (ZKP) protocol, such as zk-SNARKs (zero-knowledge succinct non-interactive arguments of knowledge). This proof can demonstrate to the smart contract or validator on the blockchain that "the AI oracle has indeed identified a specific CCE with a confidence level higher than a threshold based on a set of PAT raw data conforming to preset specifications, through its valid ST-GNN model," without disclosing any specific process parameters or model judgment basis. Subsequently, this cryptographic proof, rather than the complete CCE certificate, is submitted to the blockchain network as a transaction for verification and recording. In this way, the compliance of the process can be verified without disclosing trade secrets, thereby ensuring both process transparency and trade secrets.
[0018] Furthermore, the method of this invention also includes adaptive process intervention using smart contracts deployed on a blockchain network. The smart contracts pre-encode process control rules. When a CCE indicating a process deviation (such as an undesirable crystal form change) is received and recorded, the smart contract's state is automatically updated, and an off-chain operation can be triggered. For example, if the smart contract records a CCE indicating an unexpected crystal form change, it will automatically enter a "pending correction" state and start a timer. If a CCE indicating successful corrective action is not received from an AI oracle within a preset time window, the smart contract can automatically trigger an off-chain action via the oracle or application programming interface gateway, such as sending a high-priority alarm to the quality control system or automatically locking the status of the production batch. This constructs an automated quality assurance closed-loop system based on blockchain consensus, elevating quality control from post-event traceability to proactive intervention during the process.
[0019] Another aspect of the present invention is to provide a blockchain-based traceability system for clindamycin phosphate crystallization that implements the above-described method. The system includes: a crystallization reactor for performing the crystallization operation of clindamycin phosphate; a PAT data acquisition module coupled to the crystallization reactor, including sensors such as a Raman spectrometer, an FBRM probe, and a PVM probe, for performing step a); an AI oracle server communicatively connected to the PAT data acquisition module, wherein when computer-executable instructions stored within the server are executed, the server is driven to perform steps b) to e); and a blockchain network composed of multiple distributed nodes configured to receive transactions from the AI oracle server and perform step f). Attached Figure Description
[0020] Figure 1 This is a schematic flowchart of the blockchain-based traceability method for clindamycin phosphate crystallization provided in this embodiment of the invention.
[0021] Figure 2 This is a schematic diagram of the structure of the dynamic spatiotemporal map in an embodiment of the present invention.
[0022] Figure 3 This is a schematic diagram of the structure of the spatiotemporal graph neural network (ST-GNN) model in an embodiment of the present invention.
[0023] Figure 4 This is a schematic diagram of the system hardware deployment in an embodiment of the present invention.
[0024] Figure 5 This is a schematic diagram of the overall layered architecture of the system in an embodiment of the present invention.
[0025] Figure 6 This is an example diagram of multimodal PAT data in an embodiment of the present invention, wherein... Figure 6 A is the Raman spectrum. Figure 6 B is the chord length distribution diagram of FBRM. Figure 6 C is the PVM crystal image. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0027] Example 1
[0028] This embodiment provides a blockchain-based method for tracing the crystallization of clindamycin phosphate. (Refer to...) Figure 1This method demonstrates the complete information flow and value chain from the crystallization process in the physical world to the blockchain ledger in the digital world. Specifically, the method may include the following steps:
[0029] Step S1, Multimodal Process Data Acquisition. During the crystallization process of clindamycin phosphate, multimodal process data is acquired in real time and synchronously using multiple Process Analysis Technology (PAT) sensors deployed on a 500L crystallization reactor.
[0030] Specifically, the PAT sensor includes at least: an in-situ Raman spectrometer, whose probe extends below the liquid surface in the crystallization vessel via a flange interface, employs a 785nm excitation source, and acquires Raman spectral data every 60 seconds, with a spectral range covering 200-2000 nm. To capture the molecular vibrational information of clindamycin phosphate and the characteristic peak differences of different crystal forms, a focused beam reflectance measurement (FBRM) probe, installed on the side wall of the crystallizer, measures the chord length distribution and particle number of crystal particles in the solution in real time, with a data acquisition frequency of once every 10 seconds. An online particle image analyzer (PVM), with its probe installed adjacent to the FBRM probe, captures a high-resolution microscopic image of the crystal morphology every 30 seconds. In addition, other key process parameters are simultaneously acquired, such as the internal temperature of the vessel (accurate to 0.1℃) acquired by a Pt100 temperature sensor, the stirring rate (accurate to 1 RPM) obtained through the frequency converter feedback signal, and pH meter readings. These multimodal data streams together constitute a comprehensive description of the crystallization process. This step, through the acquisition of multi-source heterogeneous data, provides a rich and three-dimensional raw data foundation for subsequent in-depth analysis, solving the problem of insufficient information dimensions in traditional single-parameter monitoring, and is a prerequisite for achieving accurate traceability.
[0031] Step S2, dynamic spatiotemporal map construction. The multimodal process data collected in step S1 is preprocessed and time-aligned, and a dynamic spatiotemporal map is constructed based on this to characterize the instantaneous state of the crystallization process.
[0032] Reference Figure 2The graph can be represented as G_t = (V, E, X_t) at each time point t. Here, the set of nodes V represents different information sources, V = {v_raman, v_fbrm, v_pvm, v_temp, v_stir}, corresponding to the Raman spectrometer, FBRM, PVM, temperature sensor, and stirrer, respectively. The feature matrix X_t of each node is composed of normalized data collected by the corresponding sensor at time point t. For example, Raman spectral data, after baseline correction and normalization, forms a feature vector; FBRM chord length distribution data is divided into 100 intervals, forming a 100-dimensional histogram vector; PVM images have their crystal morphology features extracted using a pre-trained convolutional neural network (such as ResNet-18), generating a fixed-dimensional feature vector. The feature vectors of all nodes are aligned at time stamp t to form X_t. The set of edges E represents the physical or logical connections between nodes, and its adjacency matrix A is predefined. For example, there is a strong correlation between temperature and Raman spectroscopy (affecting solubility), and between stirring rate and FBRM (affecting crystal fragmentation and aggregation), thus edges exist between their corresponding nodes. This step integrates discrete, multi-source data streams into a unified mathematical object rich in structural information, namely, a spatiotemporal graph. This representation not only preserves the information of each data source itself, but more importantly, it explicitly defines the interaction relationships between different process variables, laying the foundation for subsequent model learning of complex synergistic effects.
[0033] Step S3, AI model state analysis. The dynamic spatiotemporal graph sequence is used as input and fed into a pre-trained Spatio-Temporal Graph Neural Network (ST-GNN) model.
[0034] Reference Figure 3The ST-GNN model performs real-time analysis of the input spectral data to learn and capture the complex dependencies between different sensor data in the spatial (inter-sensor correlation) and temporal (dynamic process evolution) dimensions, thereby generating in-depth analysis results of the current crystallization process state. Structurally, the model comprises alternating stacked spatial convolutional modules and temporal convolutional modules. Specifically, the spatial convolutional module can employ a Graph Convolutional Network (GCN) layer, and its operation can be formalized as H_t' = GCN(A, X_t) = ReLU(A_hat X_t W_gcn), where A_hat is the normalized adjacency matrix and W_gcn is a learnable weight matrix. This operation aggregates information within the neighborhood of each node at each time step t, thereby capturing the instantaneous spatial correlations between variables. The temporal convolutional module, employing a gated recurrent unit (GRU) or a long short-term memory (LSTM) network, processes the node representation sequence {H_1', H_2', ..., H_t'} output by the spatial convolutional module to capture the evolution and long-term dependencies of each node's state over time. This ST-GNN model is trained using supervised learning on a large amount of historical batch production data, including key crystallization events manually labeled by process experts. The model is optimized by minimizing the cross-entropy loss between the predicted results and the true labels. This model architecture deeply understands the complex dynamics of the crystallization process driven by the synergistic effects of multiple variables. For example, it learns how a small decrease in temperature first triggers a supersaturation signal in Raman spectra, then manifests as a nucleation burst in FBRM data, and finally observes crystal growth in PVM images. This ability to capture causal chains far surpasses traditional independent time-series analysis models. As an alternative, the spatial convolutional module can also employ a graph attention network (GAT), enabling it to dynamically learn the importance of different neighboring nodes, giving the model better interpretability and adaptability.
[0035] Step S4, Critical Crystallization Event Identification. Based on the deep analysis results of step S3, the ST-GNN model monitors and identifies the occurrence of predefined critical crystallization events (CCEs) in real time.
[0036] The CCE refers to a process event with specific multimodal data signatures that has a decisive impact on the quality of the final product. In this embodiment, the predefined CCEs include at least: CCE-01: Initial nucleation begins, characterized by a rapid increase in the number of small-diameter (<20μm) particles monitored by FBRM exceeding a preset slope threshold within a short period (e.g., within 1 minute), while the intensity of the solute characteristic peak in the Raman spectrum begins to decrease. CCE-02: Unexpected transition from crystal form I to crystal form II, characterized by characteristic peaks belonging to crystal form I in the Raman spectrum (e.g., 850°). The intensity decreases, while the characteristic peaks belonging to crystal form II (such as 875) also decrease. The intensity increases, and the transition rate exceeds the allowable range. CCE-03: Significant secondary nucleation or aggregation, characterized by a large number of fine crystals attached to the surface of large crystals or a significantly increased proportion of crystal aggregates observed in the PVM image, along with an abnormally increased count at the long end of the FBRM. The final output layer of the ST-GNN model is a Softmax classifier, which outputs the probability of each type of CCE occurring at the current time based on the learned high-level features. When the output probability of a certain type of CCE is higher than a preset confidence threshold (e.g., 0.95), the CCE is determined to have occurred. This step transforms the black-box analysis of the model into key events with clear guiding significance for the production process, providing specific and actionable anchors for subsequent tracing and intervention.
[0037] Step S5: Critical Crystallization Event Certificate Generation. Once a CCE is identified as occurring and its confidence level is higher than a preset threshold, an AI Oracle module automatically generates a digital Critical Crystallization Event Certificate (CCE Certificate) containing detailed information about the event.
[0038] The AI oracle is a trusted software service deployed on an edge computing server or a central server. It is responsible for performing the calculations of steps S2 to S5 and acts as a bridge connecting the physical process and the blockchain. The generated CCE certificate is a structured data file in JSON format. Its content is as follows: { "eventID": "evt_..._xyz", "batchID": "CP-20230510-01", "timestamp": "2023-05-10T10:30:15Z", "eventType": "CCE-02:Unwanted Polymorph Transition", "eventDescription": "Transition from Form I to Form II detected.", "confidenceScore": 0.98, "evidentiaryFeatures": {"raman_peak_ratio_875_850": 1.2, "fbrm_fine_particle_slope": 150}, "rawDataSource": {"type": "slice", "start_ts": "...", "end_ts": "..."}, "rawDataHash": "0xabc...def", "oracleSignature": "0x123...789"}. Here, rawDataHash is the hash value obtained by performing a SHA-256 operation on the original PAT data slices used for this judgment (e.g., data from 2 minutes before and after the event), while oracleSignature is the digital signature of the entire certificate content (excluding the signature itself) performed by the AI oracle using its own private key. This step solidifies a fleeting event into a verifiable and complete digital credential, locking the original evidence through hashing and ensuring the identity of the issuer and the integrity of the credential through digital signing.
[0039] Step S6: Blockchain-based certificate storage. The CCE certificate generated in step S5 is cryptographically signed and submitted as a transaction to a blockchain network.
[0040] In this embodiment, a Permissioned Blockchain (PCB), such as a network built on the Hyperledger Fabric framework, can be used. Its nodes are jointly maintained by the manufacturing company, quality assurance department, and potential regulatory agencies. The AI oracle server, acting as a client node, uses the serialized CCE certificate as the transaction payload, invoking specific functions of the chaincode (i.e., smart contract) (such as `createCCECertificate`) to initiate the transaction. After the transaction is verified and signed by the endorsing nodes and simulated for execution, it is submitted to the sorting service, ultimately packaged into blocks and distributed to all nodes, permanently and immutably recorded on the distributed ledger. Thus, the crystallization process of this batch of clindamycin phosphate establishes an event chain composed of multiple CCE certificates, which can be jointly audited by multiple parties. Compared to traditional manual recording or centralized database storage methods, the method of this invention significantly improves the verifiability of the process and the integrity of the data, providing cryptographic-level protection for the "process evidence" of drug quality.
[0041] Preferably, to protect trade secrets while ensuring process verifiability, step S6 can be further improved. After the AI oracle generates the CCE certificate, instead of directly submitting the complete certificate content containing specific process feature values (such as the `evidentiaryFeatures` field) to the blockchain, a zero-knowledge proof (ZKP) protocol, such as zk-SNARKs, is used. The AI oracle uses the model's inference process and input features as private inputs, and the fact that the event type and confidence level are above a threshold as public outputs, generating a concise zero-knowledge proof. This proof can prove to the smart contract on the blockchain that "the AI oracle has indeed identified a specific CCE with a confidence level above a threshold based on a set of PAT raw data conforming to preset specifications, through its legitimate ST-GNN model." Subsequently, only this cryptographic proof and some metadata (such as event ID, timestamp, event type, and data hash) are submitted to the blockchain as a transaction. This achieves trusted verification of process compliance while effectively protecting the company's core process secrets.
[0042] Furthermore, the method of this invention also includes adaptive process intervention using smart contracts deployed on a blockchain network. The smart contracts pre-encode process control rules. For example, a smart contract stipulates that upon receiving and recording a CCE-02 indicating an unexpected crystal form transformation, the contract automatically marks the corresponding batch's status as "pending correction" and triggers an event. An off-chain worker, upon detecting this event, immediately sends a high-priority alert to the Production Execution System (MES) or operator interface. If, within a preset time window (e.g., 15 minutes), the smart contract fails to receive a new CCE submitted by an AI oracle indicating successful corrective action (e.g., the crystal form has reverted to the target crystal form I), the smart contract automatically updates the batch's status to "quality anomaly, locked," prohibiting it from entering the next production stage. This constructs an automated quality assurance closed-loop system based on blockchain consensus, realizing a shift from passive traceability to proactive, real-time intervention.
[0043] Example 2
[0044] This embodiment provides a blockchain-based traceability system for clindamycin phosphate crystallization, which is the physical carrier of the method described in Embodiment 1. The system includes:
[0045] A crystallization reactor is used to perform the crystallization operation of clindamycin phosphate.
[0046] The PAT data acquisition module, coupled to the crystallization reactor, includes, but is not limited to, a Raman spectrometer, an FBRM probe, a PVM probe, and a temperature sensor, and is used to execute step S1 in Example 1 to acquire multimodal process data in real time.
[0047] An AI oracle server is one or more high-performance computing servers that communicate with the PAT data acquisition module via wired or wireless networks. The server houses an operating system, a database, and specific applications. When the computer-executable instructions contained in these applications are executed by the server's processor, the server performs steps S2 to S5 in Embodiment 1, namely, dynamic spatiotemporal graph construction, ST-GNN model parsing, CCE identification, and CCE certificate generation and signing. The server possesses sufficient computing power (e.g., configured with a GPU for AI model inference) and a secure key storage mechanism.
[0048] A blockchain network consists of multiple geographically or logically distributed computing nodes that collectively maintain a distributed ledger. An AI oracle server, acting as a client of this network, communicates with it. The network is configured with a consensus mechanism (such as PBFT) and a smart contract execution environment to receive transaction requests from the AI oracle server, verify transaction validity, and execute step S6 in Example 1, recording the CCE certificate or its zero-knowledge proof on the chain. It can also perform automated state changes or trigger off-chain operations according to preset rules.
[0049] Example 3
[0050] This embodiment will use a specific production batch as an example to illustrate in detail the application of the method of the present invention in a real production scenario, especially how to use blockchain notarization and smart contracts that integrate zero-knowledge proofs to achieve closed-loop quality assurance and process intervention. Assume a pharmaceutical company uses the system described in this invention to crystallize clindamycin phosphate batch number "CLP-20240315-B02". In the initial stage of production, the crystallization process runs smoothly according to preset process parameters. The AI oracle continuously analyzes real-time data streams from the Raman spectrometer, FBRM, and PVM. The CCE probabilities output by the ST-GNN model are all below the alarm threshold, and the system monitors silently.
[0051] At 15:15 Beijing time on March 15, 2024, a momentary voltage instability in the external power supply network caused a minor fluctuation in the refrigerant flow rate of the cooling jacket controlling the temperature of the crystallizer, lasting approximately 90 seconds. This resulted in a slightly faster cooling rate in a localized area within the crystallizer than the set value. This minor process deviation led to a momentary increase in localized supersaturation, inducing the nucleation of a small number of thermodynamically metastable clindamycin phosphate crystals of form II. This event is completely invisible to traditional processes that rely on endpoint detection. However, the system of this invention captured its multimodal signature immediately after the event occurred. Specifically, at 15:16:30, the ST-GNN model within the AI oracle server comprehensively analyzed the changes in the dynamic spatiotemporal spectrum: First, data from the Raman spectrometer node showed that at 850, representing the target crystal form I... The intensity of the characteristic peak at 875 begins to weaken, while... The characteristic peak representing crystal form II begins to appear weakly but clearly; almost simultaneously, data from the FBRM node shows a steep increase in the count of fine particles in the 10-30 μm range, which is inconsistent with the normal growth curve. The ST-GNN model, through the learned complex spatiotemporal correlations, accurately attributes these two seemingly isolated phenomena to the same root cause and identifies the "CCE-02: Unexpected Crystal Form Transition" event with a confidence level as high as 99.2%.
[0052] Following this, within milliseconds of event recognition, the AI oracle module automatically executed optimized versions of steps e) and f). It first generated a CCE certificate containing complete event details, but to protect core trade secrets such as the "precise correlation model between crystal transformation rate and temperature fluctuations," it did not upload the certificate in plaintext to the blockchain. Instead, it used the zk-SNARKs protocol to generate a concise zero-knowledge proof of only a few hundred bytes in size for the assertion that "the AI oracle identifies a specific CCE based on its acquired raw PAT data and through a valid ST-GNN model." This proof was encapsulated in a transaction, along with non-sensitive metadata such as the event ID, batch number, timestamp, event type (CCE-02), and the original data hash value, and submitted to the enterprise's internal Hyperledger Fabric consortium blockchain network.
[0053] Upon receiving the transaction, the batch management smart contract deployed on the blockchain first verified the validity of the zk-SNARK proof. After successful verification, the smart contract's pre-defined logic was automatically triggered: the contract detected that CCE-02 was a serious deviation event requiring immediate intervention, and thus automatically updated the on-chain status of batch "CLP-20240315-B02" from "in normal production" to "pending correction," and started a 30-minute correction countdown. Simultaneously, the smart contract, through an on-chain event mechanism, was captured by an off-chain listening service and immediately sent a high-priority alert via the application programming interface to the Production Execution System (MES) and the quality manager's mobile terminal. The alert stated: "Unexpected form II generation was detected in batch CLP-20240315-B02 at 15:16."
[0054] The on-site operator received an alarm at 3:22 PM and immediately executed the preset corrective procedure as instructed: briefly raising the reactor temperature by 2°C to dissolve the unstable crystal form II, maintaining this temperature for 10 minutes, and then restarting the cooling process at a gentler rate (70% of the original rate). During this period, the system of this invention continuously monitored the process. At 3:45 PM, the AI oracle analysis of the latest PAT data revealed that 875... The characteristic peak of crystal form II has completely disappeared, 850 The intensity of the characteristic peak of crystal form I recovered and steadily increased, and FBRM and PVM data also showed that crystal growth had returned to normal. Based on this, the ST-GNN model identified a new event "CCE-07: Process Correction Successful" with a confidence level of 99.8%. The AI oracle generated a zero-knowledge proof for this event again and uploaded it to the blockchain.
[0055] After the smart contract receives and successfully verifies a new CCE-07 transaction, it updates the batch's status from "Pending Correction" to "Corrected_Process Normal" and stops the correction countdown. Ultimately, the batch of products successfully crystallized, and its blockchain traceability record fully and immutably demonstrates the entire process from process deviation, intelligent early warning, manual intervention to successful correction. When this batch of drugs faces regulatory audits or quality investigations in the future, the company can present this on-chain record containing two cryptographically verified key events as reliable evidence of the rigor of its process control and the intrinsic quality of the product, embodying the philosophy that "quality stems from design and process control."
[0056] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A blockchain-based method for tracing the crystallization of clindamycin phosphate, characterized in that, Includes the following steps: Step a) During the crystallization of clindamycin phosphate, multimodal process data is collected in real time and synchronously using multiple process analysis technology (PAT) sensors deployed on the crystallization reactor. Step b) preprocesses and aligns the multimodal process data with time, and constructs a dynamic spatiotemporal graph to characterize the instantaneous state of the crystallization process. The nodes of the graph correspond to each PAT sensor and other process parameters, and the features of the nodes are composed of data collected by the corresponding sensors at specific time points. Step c) The dynamic spatiotemporal map is used as input and fed into a pre-trained spatiotemporal graph neural network ST-GNN model. The ST-GNN model performs real-time analysis on the input map data to learn and capture the spatial and temporal dependencies between different sensor data and generate analysis results on the current crystallization process state. Step d), the ST-GNN model monitors and identifies the occurrence of predefined key crystallization events (CCEs) in real time based on the analysis results. The key crystallization events are events that characterize the changes in the microstate of the clindamycin phosphate crystallization process, and include at least one of primary nucleation, crystal form transformation, secondary nucleation, aggregation, or abnormal deviation of the process. Step e) When a critical crystallization event (CCE) is identified, the AI oracle module automatically generates a digital CCE certificate containing information about the event. The CCE certificate contains at least the event type, the cryptographic hash value of the original PAT data slice used for judgment, and the digital signature of the AI oracle. Step f) submits the CCE certificate of the key crystallization event as a transaction to the blockchain network and records it on the distributed ledger.
2. The method according to claim 1, characterized in that, The multiple PAT sensors in step a) include at least: a Raman spectrometer for acquiring crystal chemistry and crystal form information, a focused beam reflectance measurement (FBRM) probe for acquiring particle chord length distribution and quantity information, and an online particle image analyzer (PVM) for acquiring particle images and morphology information.
3. The method according to claim 1, characterized in that, In step b), the set of edges in the dynamic spatiotemporal graph represents the physical or logical relationship between nodes. The spatiotemporal graph neural network ST-GNN model uses the graph structure defined by the set of edges to capture the spatial relationship between each PAT sensor and process parameter at the same time.
4. The method according to claim 1, characterized in that, The spatiotemporal graph neural network (ST-GNN) model in step c) structurally includes alternating stacked spatial convolutional modules and temporal convolutional modules. The spatial convolutional module is used to aggregate information within the neighborhood of each node to capture the instantaneous spatial correlation between variables, while the temporal convolutional module is used to process the node representation sequence to capture the evolution of each node's state over time.
5. The method according to claim 1, characterized in that, The CCE certificate for the key crystallization event generated in step e) is structured data and also includes a unique event identifier, drug batch number, event timestamp, confidence score of AI model judgment, and key feature values used for judgment.
6. The method according to claim 1, characterized in that, The critical crystallization event (CCE) in step d) refers to a process event that has a decisive impact on the quality of the final product, including at least one of primary nucleation, crystal transformation, secondary nucleation, agglomeration, or abnormal deviation from the process.
7. The method according to claim 1, characterized in that, Step f) further includes: Before submitting the CCE certificate to the blockchain network, a cryptographic proof is generated based on the CCE certificate for the key crystallization event using a zero-knowledge proof protocol. The cryptographic proof, rather than the complete Critical Crystallization Event (CCE) certificate, is submitted as a transaction to the blockchain network for verification and recording, in order to prove the occurrence of the CCE without disclosing the specific process parameters contained in the certificate.
8. The method according to claim 1, characterized in that, The method also includes: Adaptive process intervention is achieved by utilizing smart contracts deployed on the blockchain network. The smart contracts pre-encode process control rules, and when a critical crystallization event (CCE) indicating a process deviation is received and recorded, the smart contract automatically triggers an off-chain operation.
9. The method according to claim 1, characterized in that, The blockchain network in step f) is a consortium blockchain, whose nodes are jointly maintained by the manufacturing enterprise, quality assurance department or regulatory agency.
10. A blockchain-based traceability system for clindamycin phosphate crystallization, characterized in that, include: The PAT data acquisition module, coupled to the crystallization reactor, is used to acquire multimodal process data in real time and synchronously during the crystallization of clindamycin phosphate. The AI oracle server is communicatively connected to the PAT data acquisition module and is used to perform the following operations: constructing the multimodal process data into a dynamic spatiotemporal map; and using the spatiotemporal graph neural network ST-GNN model to analyze the dynamic spatiotemporal map to identify key crystallization events (CCEs) including at least one of primary nucleation, crystal transformation, secondary nucleation, or aggregation. And after identifying the Critical Crystallization Event (CCE), generate a CCE certificate containing the cryptographic hash of the original PAT data slice and its own digital signature; In addition, a blockchain network, consisting of multiple distributed nodes, is used to receive transactions containing the Critical Crystallization Event (CCE) certificate from the AI oracle server and record the transactions on a distributed ledger.
Citation Information
Patent Citations
Crystal form I of curcumin derivative as well as preparation method and application thereof
CN110615733A
Ceramic supply chain quality traceability data management system based on block chain
CN120047053A