A clinical pain efficacy analysis method and system based on an adaptive dictionary and a hierarchical interpretable model, and a storage medium
Patent Information
- Application Number
- CN202611168433.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-10-30
AI Technical Summary
然而,该方案仍存在技术缺陷:其一,其依赖的通用情感词典是静态、非领域化的
首先,在分析精度方面,通过数据驱动的词典构建方法,本发明使词典具备了描述疼痛“连续强度”的能力,其强度赋值与患者自评VAS、NRS、BPI等 评分具有显著相关性;而三层异构模型的动态融合,使得系统在处理含否定、转折、口语化及多症状并存的复杂句式时,分类性能获得显著提升。
Smart Images

Figure CN123017532A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the interdisciplinary field of medical informatics and natural language processing. Specifically, it relates to a method, system, and computer storage medium for automatically mining and analyzing therapeutic information from subjective descriptions of clinical pain, such as text, language, or images, by constructing an adaptive sentiment dictionary in the pain domain using a data-driven approach and fusing it through multi-level interpretable models. Background Technology
[0002] In clinical trials and new drug development, the value of patient-reported outcome (PRO) data is increasingly prominent. Pain, as one of the most common subjective symptoms, is typically evaluated using structured tools such as the Visual Analogue Scale (VAS), Numerical Rating Scale (NRS), or Brief Pain Inventory (BPI). However, these scales have inherent limitations: first, scale scores are susceptible to recall bias and boundary effects, with individual differences in how patients define "4" and "5"; second, the scales cannot capture dynamic changes in the nature of pain (such as "sharp pain turning into dull pain") or improvements in accompanying symptoms, which are crucial for assessing the overall benefit of treatment. Patients' open-ended textual descriptions of pain symptoms, such as "the pain has changed from a persistent, sharp, stabbing pain to an occasional, stabbing, dull pain," or "although it still hurts, it's bearable, and I can sleep through the night," contain far more therapeutic information than numerical rating scales can reflect. How to accurately, interpretably, and auditably extract subjective efficacy information from unstructured texts full of colloquial and individualized expressions has become a key technical bottleneck restricting the in-depth utilization of PRO data.
[0003] For the automatic analysis of emotion and semantics in text, language, or images, there are various existing solutions, but none of them can meet the stringent requirements of clinical efficacy evaluation.
[0004] Chinese patent application CN111104515A discloses a "Comment Sentiment Analysis Method Based on Fusion of Sentiment Dictionary and Machine Learning". This method constructs a general sentiment dictionary, extracts sentiment words from the text as features, concatenates them with term frequency-inverse document frequency (TF-IDF) statistical features, and inputs them into a support vector machine (SVM) classifier to determine the sentiment polarity of the text. However, this approach still has technical shortcomings: First, the general sentiment dictionary it relies on is static and non-domain-specific. This dictionary cannot distinguish the continuous magnitude differences in pain intensity between clinical terms such as "severe pain", "dull pain", and "tenderness", nor can it associate words such as "relief" and "alleviation" with the medical evaluation dimension of "improved therapeutic effect", resulting in weak clinical significance of the analysis results. Second, its fusion mechanism is a simple feature vector concatenation. For complex sentences containing contrastive relationships, such as "the pain has stopped, but the nausea hasn't changed at all," the model cannot understand the semantic focus, is prone to misjudgment, and completely lacks the ability to interpret the analysis results.
[0005] Furthermore, Chinese patent application CN112632283A discloses a "medical text sentiment classification method based on a pre-trained model." This approach directly uses the BERT model to fine-tune on medical text corpora for end-to-end sentiment classification. While this method captures deep semantics to some extent, the opacity of its model decision-making process leads to two application bottlenecks: First, insufficient interpretability. The model only outputs classification labels, and researchers cannot know which words or logic in the text led to the conclusions. When the model malfunctions, the source of the error cannot be located. Second, it fails to meet compliance audit requirements. Good Clinical Practice (GCP) requires that all data processing procedures affecting clinical conclusions be traceable and auditable. An algorithm model that cannot explain its reasoning process cannot directly serve as reliable evidence to support drug registration applications.
[0006] Furthermore, existing technologies lack systematic validation protocols for using AI models to evaluate the efficacy of clinical trials. Specifically: there is a lack of mechanisms for validating model performance using external data independent of the training set; a lack of assessment of bias regarding the existence of systematic misjudgments in different subgroups of people (such as different ages, genders, and baseline pain levels); a lack of stability testing to ensure the consistency of model outputs with minor changes in input; and a lack of version management and result comparability assurance mechanisms for model updates and iterations during long-term clinical trials.
[0007] In terms of clinical operability, existing technologies also have shortcomings: they lack a systematic strategy for handling missing input data; and they are limited to plain text input, without considering the collection and processing of multimodal PRO data such as audio recordings, images, and pictures.
[0008] In summary, how to maintain high-precision semantic understanding capabilities while endowing the analysis model with high interpretability and end-to-end auditing capabilities, along with a complete model validation and version management mechanism, has become a technical bottleneck that urgently needs to be overcome in the field of clinical PRO text analysis. Summary of the Invention
[0009] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method and system for pain efficacy analysis in clinical trials based on an adaptive dictionary and a hierarchical interpretable model. This invention constructs an adaptive sentiment dictionary for the pain domain through a data-driven approach and creatively designs a three-layer fusion interpretable analysis framework of "rules-statistics-semantics." It also embeds an audit trail mechanism compliant with GCP ALCOA+ standards, a system model validation and version management scheme, and multimodal data support capabilities, ultimately achieving an end-to-end automated analysis solution that meets clinical trial compliance requirements.
[0010] To achieve the above objectives, this invention first provides a method for analyzing the subjective efficacy of pain in clinical trials based on a hierarchical fusion model. This method begins by acquiring the subjective description of clinical pain, such as text, language, or images, to be analyzed. Subsequently, the method utilizes a pre-constructed adaptive sentiment dictionary for the pain domain to extract rule features from the text, generating a sentiment rule feature vector containing information on pain intensity and efficacy tendency. Simultaneously, the method inputs the text into a machine learning classification model, which outputs a first efficacy prediction vector based on shallow statistical features. The text is then input into a deep learning semantic understanding model, which outputs a second efficacy prediction vector based on deep contextual semantics. Following this, the method inputs the sentiment rule feature vector, the first efficacy prediction vector, and the second efficacy prediction vector into a pre-defined gated fusion network. The gated fusion network dynamically generates fusion weights, which are then integrated to obtain a fusion feature vector. Finally, based on the fusion feature vector, the method generates a subjective efficacy classification result corresponding to the text. The efficacy classification result includes at least three tendency categories: relief / improvement, aggravation, and no change. Simultaneously, an audit record containing operator identification, fusion weights, review status, and full lifecycle tracking information is constructed.
[0011] As a crucial preliminary step in the entire methodology, the construction of the adaptive affective lexicon for the pain domain begins with a terminology normalization step: seed words are collected from pain-related clinical trial guidelines and standard scales, and then normalized using the systematic medical nomenclature-clinical terminology (SNOMED) system. The text is normalized to form a standard list of pain terms. Based on this, an automatic intensity assignment step is performed: a training dataset is acquired, containing paired samples of multiple patient pain text descriptions and corresponding patient subjective efficacy anchor scores at different times. These patient subjective efficacy anchor scores include visual analog scale (VAS) scores or numerical rating scale (NRS) scores. Using these paired samples, a text-intensity mapping model is trained to automatically assign a continuous emotional intensity value to each term in the standard pain term list. Subsequently, an intensity interpolation and expansion step is performed: for derived pain words not appearing in the training dataset, word embeddings are generated using a pre-trained language model. By calculating the similarity between these embeddings and the assigned terms, intensity values are interpolated to automatically expand the dictionary. Finally, an efficacy tendency association step is performed: based on dependency parsing, predicate-object and head-modifier rule templates are defined to automatically label the terms in the dictionary with their association tendency with three efficacy states: relief / improvement, aggravation, and no change.
[0012] In a preferred embodiment of this method, the extraction process of the emotional rule feature vector is further refined. Specifically, the system performs negative word and transition word window detection on the text. When a pain word is located within the negative word window, its therapeutic tendency is reversed. When a transition word is detected, the clause following the transition, determined based on syntactic analysis, is taken as the semantic focus, and only the therapeutic tendency of that clause is retained as the main tendency, thereby generating the corrected rule feature vector. This mechanism fundamentally solves the problem of inaccurate judgment of complex clinical sentence structures such as "not always painful" and "although painful, it is tolerable" by traditional methods.
[0013] In another preferred embodiment of this method, the gated fusion network specifically consists of a fully connected layer and a Softmax activation function, used to dynamically output the weight values of each input. The audit log, in addition to recording and associating the weight values output by the network in this analysis, also includes the identity of the operator performing the analysis. After the final classification result is generated, its initial state is marked as "pending review," and it must be confirmed by the electronic signature of a designated reviewer before it can be used to assist in the efficacy analysis of clinical trials. Furthermore, the audit trail module supports full lifecycle tracking of operations such as modification, review, and rejection of generated conclusions. All key data modifications are automatically retained with pre- and post-modification values, and the reasons for the changes are forcibly noted. The logs cannot be deleted, overwritten, or tampered with. This allows any efficacy classification result to be back-analyzed, showing the contribution ratio of its dependent dictionary rules, statistical features, and deep semantic components, and completely reproducing the entire decision-making chain from generation to confirmation.
[0014] In another preferred embodiment of this method, to meet the stringent requirements of AI decision-making credibility in clinical research, this invention incorporates a system-wide model validation and version management framework. Before formal deployment of the model, validation must be performed using external data independent of the training set, from different clinical trials or centers, and performance metrics of the model in various subgroups (e.g., different ages, genders, baseline pain levels) must be calculated to identify and quantify potential biases. Simultaneously, by adding minor perturbations such as synonym replacements and word order tweaks to the input text, the degree of change in the model's output is monitored to assess the model's robustness. The system assigns a unique version number to each model update (including dictionary expansion, parameter adjustments, or architecture changes) and records the effective date. When a new version is released, the system can automatically run both the old and new versions simultaneously on the same input text, generating a detailed version comparison report to ensure the comparability of analytical results in long-term clinical trials.
[0015] In another preferred embodiment of this method, the step of acquiring the subjective description text of pain from the clinical trial to be analyzed supports multimodal data sources. Data is acquired from electronic patient reporting outcome systems, electronic data acquisition systems, recording devices, and image acquisition devices via a multimodal data adapter; for recorded data, it is transcribed into text using an automatic speech recognition engine; for image data, the textual descriptive information contained therein is extracted through video keyframe extraction and optical character recognition.
[0016] Correspondingly, the present invention also provides a system for analyzing the subjective efficacy of pain in clinical trials based on a hierarchical fusion model. The system mainly includes a multi-source data acquisition module, a dictionary storage and retrieval module, a multi-level analysis engine result output module, and an audit trail module. Among them, the multi-source data acquisition module is used to acquire subjective descriptions of pain from clinical trials to be analyzed; A dictionary storage and retrieval module is used to provide a pre-built adaptive sentiment dictionary for the pain domain; A multi-level analysis engine, which includes: The rule feature extraction unit is used to extract the sentiment rule feature vector of the input text using the dictionary; A machine learning prediction unit is used to output a first efficacy prediction vector based on the text; A deep learning prediction unit is used to output a second efficacy prediction vector based on the text; The gated fusion unit is used to dynamically generate fusion weights for each input feature and integrate them to generate a fusion feature vector. The result output module is used to generate subjective efficacy classification results based on the fused feature vector. The audit trail module, coupled to the multi-level analysis engine, is used to capture and record in real time the fusion weights generated by the gated fusion unit and the intermediate processing results of each unit, and generate audit logs that are bound to the subjective efficacy classification results and conform to the ALCOA+ standard. The audit trail module has a built-in audit workflow engine to realize the full lifecycle tracking of the submission, review, rejection and modification of the classification results, and record the identity and electronic signature of the operator who performed the corresponding operation.
[0017] In a preferred embodiment of this system, the system further includes a model verification and version management module, coupled to the multi-level analysis engine, for storing performance evaluation reports, bias analysis results and stability test data of each version of the model, and triggering a version comparison process when the model is updated.
[0018] In another preferred embodiment of this system, the multi-source data acquisition module includes a multimodal data adapter, which supports data acquisition from electronic patient reporting outcome systems, electronic data acquisition systems, recording devices, and image acquisition devices; for recorded data, it is transcribed into text using an automatic speech recognition engine; for image data, it is extracted from the text description information contained therein through video keyframe extraction and optical character recognition.
[0019] In addition, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements all the steps of the above-described method.
[0020] Compared with the prior art, the technical solution proposed in this invention has the following beneficial effects: First, in terms of analytical accuracy, through a data-driven dictionary construction method, this invention enables the dictionary to describe the "continuous intensity" of pain, and its intensity assignment is significantly correlated with patient self-rating scores such as VAS, NRS, and BPI. Furthermore, the dynamic fusion of the three-layer heterogeneous model significantly improves the classification performance of the system when dealing with complex sentences containing negation, transition, colloquialism, and multiple symptoms.
[0021] Secondly, regarding interpretability and compliance, this invention endows the model's decision-making process with interpretability and transparency through dynamic weight recording and backtracking mechanisms. The system not only provides efficacy conclusions but also clearly demonstrates the decision-making basis for those conclusions. Combined with operator identification, electronic signature verification, and a full lifecycle tracking mechanism, the analysis process possesses complete transparency, auditability, and accountability, making AI-driven PRO text analysis conclusions potentially serve as clinical evidence compliant with GCP requirements.
[0022] Furthermore, regarding the clinical reliability of AI models, this invention provides a systematic quantitative evaluation system for the reliability of algorithmic decisions through mandatory external validation, subgroup bias analysis, stability testing, and version comparison mechanisms, effectively eliminating the concerns of regulators and clinical researchers about the reliability of algorithmic models.
[0023] Finally, in terms of adaptability, the dictionary's self-expanding mechanism enables it to automatically adapt to new expressions from different patient groups, greatly reducing manual maintenance costs; its multimodal data support capabilities allow the system to adapt to richer clinical data collection scenarios; and the entire construction and training process can serve as a template for low-cost migration to the analysis of other core clinical trial subjective symptoms such as fatigue, nausea, and anxiety. Attached Figure Description
[0024] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0025] Figure 1 This is a flowchart illustrating the subjective pain efficacy analysis method in clinical trials based on a hierarchical fusion model, as described in this invention.
[0026] Figure 2 This is a schematic diagram illustrating the automated construction process of the adaptive emotion dictionary for the pain domain in this invention.
[0027] Figure 3 This is a detailed schematic diagram of the processing logic for multi-level fusion analysis in this invention.
[0028] Figure 4 This is a schematic diagram of the modular architecture of the pain subjective efficacy analysis system in clinical trials based on the hierarchical fusion model in this invention. Detailed Implementation
[0029] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below with reference to specific illustrations.
[0030] This invention constructs an adaptive dictionary construction and self-expansion mechanism based on supervisory signals such as VAS, NRS, and BPI. This approach abandons the traditional manual compilation and coarse-grained classification model of sentiment dictionaries. For the first time, it proposes and implements the use of naturally occurring paired data from clinical trials—"patient text description - objective VAS, NRS, BPI, etc. scores"—as supervisory signals to train a regression model to assign precise and continuous intensity values to medical terms (e.g., "knife-like pain" intensity 8.7, "dull pain" 2.1). Furthermore, this approach constructs an intensity interpolation propagation algorithm based on pre-trained language model word embeddings, enabling the dictionary to automatically estimate the intensity of unseen terms such as "jumping pain," possessing self-expansion and continuous updating capabilities. This results in the construction of a highly specialized, quantifiable, and self-expanding clinically specific dictionary.
[0031] This invention further constructs a rule-statistic-semantic three-layer gating dynamic fusion architecture for interpretability. This solution builds an innovative three-layer fusion analysis model, which is not a simple integration of existing models, but a system that allows rules (lexical logic), statistics (machine learning), and semantics (deep learning) to each perform their respective functions and work collaboratively. This three-layer fusion analysis model introduces a gating fusion network, which dynamically assigns decision weights among the three information sources for each specific sentence of text through learnable attention weights. For the resulting therapeutic conclusion, the dynamic weights generated by this gating network can be obtained and analyzed to accurately trace and explain the decision source of the conclusion, for example, "85% of the decision weight of this sentence comes from the explicit logic of 'not as painful as yesterday' captured by the rule layer." This fundamentally solves the pain point of the inability to interpret complex AI models in clinical applications.
[0032] Based on the above technical concept, this invention provides a method for analyzing pain efficacy in clinical trials based on an adaptive dictionary and a hierarchical interpretable model. The overall process is as follows: Figure 1 As shown, it consists of six main steps.
[0033] Step S1: Acquisition and preprocessing of multi-source heterogeneous data; Step S1, as the data acquisition stage, provides raw, unprocessed material for the entire analysis process. Its role is to aggregate and standardize subjective descriptive texts of different formats from various information systems such as electronic patient reported outcomes (ePRO) and electronic data collection systems (EDC), as well as multimodal data such as audio recordings and video images, into a unified format that can be processed by subsequent modules.
[0034] In specific implementation, step S1 can be implemented based on the following sub-steps: S1-1: Through the configured HL7 FHIR interface adapter, unstructured pain description texts are pulled at regular intervals or received in real time from systems such as ePRO applications, hospital HIS, and EDC modules. Meanwhile, the adapter also supports connecting to audio recording devices and image acquisition devices to obtain the patient's oral recordings and image materials containing text information. For audio recording data, the system calls an Automatic Speech Recognition (ASR) engine to transcribe it into standardized text; for image data, the system extracts and parses the text description information contained in the patient's handwritten records or charts through video key frame extraction and Optical Character Recognition (OCR) technology. The image data includes but is not limited to photos of the patient's handwritten pain diaries, pain location annotation diagrams, screenshots of electronic medical records containing text information, etc. After the above processing, the system uniformly converts data from all sources into a standardized text format, and retains the hash value of the original data for subsequent traceability verification.
[0035] S1-2: Perform privacy desensitization processing on the acquired text to remove identity identifiers such as names and IDs. The system adopts a desensitization algorithm based on Named Entity Recognition (NER) to automatically identify and replace personal sensitive information such as the patient's name, ID number, and contact information in the text, while retaining a desensitization mapping table to restore the data after strict authorization.
[0036] S1-3: Perform data cleaning and preprocessing. This step has a built-in clinical colloquial expression error correction and conversion sub-module. This sub-module is based on a predefined common error mapping table (such as correcting the typo in "今早又(有)点疼") and a sequence labeling-based abbreviation / colloquial conversion model (such as converting "松快点了" to "身体轻松一点了"), to convert non-standard patient colloquialisms into more standardized description texts, while retaining the hash value of the original text for verification. The training data of the colloquial conversion model is derived from patient diary texts collected in historical clinical trials and their corresponding manually labeled standard versions. The technical effect of this processing is: significantly improving the quality of the input text, reducing the learning burden of downstream models on the diverse colloquial "noise", which is the basis for improving the accuracy of the entire analysis chain.
[0037] S1-4: Perform missing data processing. When the input text is empty or its length is lower than a preset threshold (for example, less than 5 valid characters), the system determines that the data is missing. At this time, the system does not simply discard the sample, but performs classified processing according to the cause of the missing data: S1-4a: Identification of missing data causes. The system checks the data acquisition context: if it is an occasional missing data (such as a single ePRO submission being empty), it is determined to be an occasional missing data; if the same patient fails to submit valid data multiple times consecutively, it is determined to be a continuous missing data.
[0038] S1-4b: Handling occasional missing data. The system generates a placeholder result stating "Insufficient data, unable to analyze," and marks the analysis as pending manual review. This placeholder result is also included in the audit trail, recording the reason for the missing data and the basis for the judgment.
[0039] S1-4c: Handling of continuity issues. The system triggers an alert notification, alerting the clinical site coordinator via email or system message to pay attention to the patient's adherence problems and recommending follow-up interventions.
[0040] Step S2: Rule feature extraction based on domain-adaptive dictionary; Step S2 uses a pre-built pain dictionary to perform the first round of interpretation on the text of S1. Its function is to extract all pain-related structured medical features in the text, especially to complete logical judgments such as negation and transition, and generate a rule feature vector with clear medical meaning, providing a medical prior knowledge basis for subsequent analysis.
[0041] The execution of step S2 relies entirely on a pre-built "pain domain adaptive sentiment lexicon".
[0042] The dictionary's construction process is as follows: Figure 2 As shown, the main steps include the following: The first step (S2-A) is terminology normalization. Seed words such as "pain," "ache," and "severe pain" are collected from clinical guidelines and descriptive anchors in the Brief Pain Inventory (BPI) for cancer pain, neuropathic pain, and other fields. Then, using the SNOMED CT international standard terminology database, synonym merging and standardized mapping are performed to unify various patient-speaker variations to standard pain concept nodes. The specific method for terminology normalization is as follows: each candidate term is mapped to a corresponding unique concept identifier (ConceptID) in SNOMED CT, and all variant terms under the same Concept ID are merged into the same entry.
[0043] The second step (S2-B) is automatic intensity assignment. In a number of clinical trials for pain control, open-text pain descriptions from patients and concurrent scores such as VAS, NRS, and BPI are collected to form a paired sample training set. As an illustrative example, this training set contains at least 3000 paired samples. On this basis, a BioBERT regression model is fine-tuned, such that its input is a piece of text, and its output is a continuous predicted pain intensity value (on a 0-10 scale). After training is completed, for each standard term in the lexicon (such as "knife-cutting pain") and its variants, a fixed representation vector under the isolated input condition is calculated — that is, the term is encoded using the BioBERT model, and the output vector at the <[BOS_never_used_51bce0c785ca2f68081bfa7d91973934]> position is taken as the fixed representation of the term — which is then input into the regression model, so as to assign an accurate, quantitative sentiment intensity value to the entry. For example, the model can automatically assign a value of 8.7 to "knife-cutting pain" and a value of 2.1 to "dull pain".
[0044] This step completely eliminates the arbitrariness and inconsistency of manual experience-based assignment, endowing the sentiment lexicon with the ability to express "continuous magnitude differences" of pain, and its intensity values are highly consistent with the real feelings of patients. In this step, the training objective of the regression model is to minimize the mean squared error (MSE) between the predicted intensity values and the real scores such as VAS, NRS, and BPI, and the Adam optimizer is used for parameter updating.
[0045] The third step (S2-C) is intensity interpolation expansion, which is used to solve the weight assignment problem for derived words that have not appeared in the paired data, such as "throbbing pain". Using the pre-trained BioBERT model, the cosine similarity between the word embedding vector of the derived word and the word embedding vectors of all known intensity entries is calculated, K known entries with the highest similarity are selected (K is a preset value, ranging from 5 to 10), and the weighted average of their intensity values by similarity is taken as the estimated intensity of the derived word. The calculation formula of cosine similarity is: sim(d, t_i) = (v_d · v_{t_i}) / (||v_d|| * ||v_{t_i}||); where v_d is the word embedding of the derived word, and v_{t_i} is the word embedding of the i-th known entry. The calculation formula for the estimated intensity is: intensity(d) = sum_{i=1 to K} ( sim(d, t_i) * intensity(t_i) ) / sum_{i=1 to K} sim(d, t_i); This step endows the dictionary with self-expansion capabilities, enabling it to automatically cover more non-standard expressions and greatly reducing the cost of manually updating the dictionary. Preferably, when the cosine similarity between a derived word and all known entries is below a preset threshold (e.g., 0.3), it indicates that the derived word lacks sufficiently reliable semantic neighbors within the existing dictionary coverage. In this case, the word is not automatically assigned a strength value, but is instead marked as "awaiting manual annotation" and included in the dictionary update queue for subsequent version iterations.
[0046] Step four (S2-D) involves efficacy bias association. Using dependency parsing tools (such as Stanford Parser or spaCy), a series of patterns are defined to automatically label efficacy bias. Specific patterns include: Pattern 1 (Relief / Improvement): [Verb: Reduce / Relieve / Improve / Get Better / Reduced / Relieved] -> [Direct Object / Subject: Pain Entry], mark this entry as "Relief / Improvement (Positive Tendency)"; Pattern 2 (Aggravation): [Verb: aggravated / worsened / became heavier / aggravated] -> [Direct object / subject: pain entry], mark this entry as "aggravated (negative tendency)"; Pattern 3 (No Change): [Verb: Same / Unchanged / Almost the same] -> [Direct Object / Subject: Pain Entry], mark the entry as "No Change (Neutral Tendency)".
[0047] After the above processing, the final form of the dictionary is that each record contains the following fields: term ID, standard term, intensity value (0-10 consecutive values), efficacy bias label (positive bias / negative bias / neutral bias), and a list of variants.
[0048] After the dictionary is constructed and put into real-time analysis, step S2-E performs rule feature extraction and logical processing. The text is scanned and matched against the dictionary; at this point, an adaptive tendency reversal and focus determination mechanism for negation and transition is implemented. Negation Window Detection: Establish a set of negation words (including "no", "without", "no longer", "never", "not", "not", etc.), and check whether there are any negation words within the range of 3 words before and after each pain word. If they exist, reverse the therapeutic tendency of the pain word (positive tendency → negative tendency, negative tendency → positive tendency, neutral tendency remains unchanged).
[0049] Transition word window detection: A set of transition words is established (including "but", "however", "however", "but", "yet", etc.). When a sentence contains a transition word, the clause following the transition is determined as the semantic focus based on the syntactic dependency tree. The therapeutic tendency of pain words in the focus clause is extracted and retained as the feature of the whole sentence. If no pain words are matched in the focus clause, the system reverts to the weighted voting result of all pain words in the whole sentence, and the majority tendency is used as the therapeutic tendency feature of the sentence. For example, when faced with the sentence "Although it still hurts, it's not as excruciating as yesterday", the system first detects the transition word "but". Through the syntactic dependency tree, "not as excruciating as yesterday" is determined as the semantic focus clause. In this clause, "excruciating" is modified by the negative word "not as", and the tendency is flipped from "negative tendency" to "positive tendency". Therefore, the whole sentence is correctly judged as having a "relief / improvement" trend.
[0050] Steps S3 and S4: Parallel heterogeneous model prediction; Steps S3 and S4 are executed in parallel with step S2, and each represents a different semantic understanding path.
[0051] Step S3 uses a machine learning model to find patterns from statistical patterns such as word frequency, part of speech, and syntax, and outputs the first efficacy prediction vector in a robust and efficient manner.
[0052] In the specific implementation of step S3, XGBoost (Extreme Gradient Boosting Algorithm) is selected as the machine learning classifier. Its input features include: TF-IDF features: A bag-of-words model is built based on the training set, and the TF-IDF value of each word is calculated; Character-level N-gram features: Extract character-level 2-gram and 3-gram features to capture spelling variations and affix information; Word-level N-gram features: Extract word-level 1-gram and 2-gram features; Syntactic dependency features: Extract the triple "(verb, dependency relation, object)" such as "(relief, direct object, pain)" and convert it into discrete features.
[0053] The model training uses multi-class log loss as the objective function, and hyperparameters are tuned through five-fold cross-validation.
[0054] Step S4 uses a deep learning model to understand the long-distance dependencies between words and the overall context, and outputs a second efficacy prediction vector.
[0055] In step S4, ClinicalBERT is used as the base model, and a domain-adaptation fine-tuning strategy is employed for conversational clinical texts. Specifically: Continue pre-training: Collect a large number of open-ended diary texts filled out by patients in real clinical trials (the specific number depends on the actual situation) and continue pre-training the language model task on the ClinicalBERT base model, using two pre-training tasks: masked language modeling (MLM) and next sentence prediction (NSP). Task fine-tuning: Add a fully connected classification layer on top of the pre-trained model and perform supervised fine-tuning using training samples labeled with efficacy categories (relief / improvement, aggravation, no change); Data augmentation: By using techniques such as synonym replacement and back-translation (translating Chinese into English and then back into Chinese), more diverse spoken expression samples are generated to enhance the model's generalization ability.
[0056] This allows the model to deeply understand the implicit semantics of highly colloquial expressions such as "it hurts so much" and "I feel so much better today".
[0057] Step S5: Gating fusion and dynamic weight generation; Combination Figure 3 As shown, step S5 is the central decision-making stage of the entire method. It receives three heterogeneous information sources from S2, S3, and S4, but instead of simply averaging or concatenating them, it uses a learnable gated fusion network to dynamically evaluate which information source is more reliable and critical in the current text to be analyzed. This step dynamically assigns different decision weights to the three heterogeneous information sources, ultimately forming an optimal fusion feature that integrates logic, statistics, and semantics, thereby achieving deep fusion of knowledge and data.
[0058] The specific implementation of step S5 is as follows: First, the regular feature vector V_rule (dimension d_rule) output by S2, the first prediction vector V_ml (dimension d_ml, equal to the number of classes 3) output by S3, and the second prediction vector V_dl (dimension d_dl, equal to the number of classes 3) output by S4 undergo a uniform dimensionality transformation. Specifically, each vector is mapped to the same dimension D (D is 128 or 256) through three independent linear projection layers. The transformation formula is as follows: V_rule_tilde = W_rule * V_rule + b_rule; V_ml_tilde = W_ml * V_ml + b_ml; V_dl_tilde = W_dl * V_dl + b_dl; Where W_rule, W_ml, and W_dl are trainable weight matrices, and b_rule, b_ml, and b_dl are bias terms.
[0059] Then, the three projected vectors are concatenated into a joint representation: V_concat = [V_rule_tilde; V_ml_tilde; V_dl_tilde]; Inputting V_concat into a two-layer fully connected gated network, for example, the hidden layer dimension of this network is 128 (preferably, it can also be set to the same value as the projection dimension D), and the output layer dimension is 3. After the network output is normalized by the Softmax function, a three-dimensional weight vector W = [w_rule, w_ml, w_dl] is obtained, which satisfies the constraint w_rule + w_ml + w_dl = 1.
[0060] The final fusion feature is obtained by weighted summation: F_fused = w_rule * V_rule + w_ml * V_ml + w_dl * V_dl; This step enables the dynamic generation and capture of decision weights. This weight vector W represents the system's allocation of decision weights for each specific input. During the training phase, the gated fusion network and the three sub-models are jointly trained end-to-end to minimize the cross-entropy loss of the final classification result. During the inference phase, this weight vector is recorded in real time, becoming the key to unlocking the transparency of the model's decision-making process.
[0061] Step S6: Result generation, compliance audit, and full lifecycle tracking; Step S6 is the output and consolidation stage, which makes the final efficacy classification judgment based on the fusion features generated in S5; at the same time, the entire process of one analysis is recorded and packaged together to form a traceable and non-repudiable audit information package, which is output together with the final conclusion.
[0062] In its actual implementation, step S6 is divided into two closely connected sub-steps.
[0063] In sub-step S6-1, the fused feature F_fused is input into a classifier consisting of a fully connected layer and a softmax function, outputting the final efficacy category and its confidence score. The classifier's output dimension is 3, corresponding to three categories: "relief / improvement (positive tendency)," "worsening (negative tendency)," and "no change (neutral tendency)." After the result is generated, its status is initially marked as "Pending Review."
[0064] Next, in sub-step S6-2, audit logs are constructed, which is key to achieving end-to-end traceability and GCP compliance.
[0065] This generates a JSON-formatted audit log object containing the following fields: (a) Identity and Operation Tracing Fields: Analysis ID (Globally Unique Identifier, using the UUID v4 standard); Operator ID (a unique identifier for the system account or human operator calling the API); Operation timestamp (Unix timestamp accurate to milliseconds); The IP address and device fingerprint of the API call (the device fingerprint is generated by concatenating the MAC address and hard drive serial number and then performing a SHA-256 hash). (ii) Input and context fields: Source text hash value (the hash of the original text is calculated using the SHA-256 algorithm); Text collection timestamp; The dictionary version number used; (iii) Snapshot field of the reasoning process: S2 extracts a summary of regular features (feature vectors are reduced to a 32-dimensional compressed representation using PCA while retaining the hash value of the original feature vectors). The first prediction vector (three-dimensional probability distribution) output by S3; The second prediction vector (three-dimensional probability distribution) output by S4; The weight vector W = [w_rule, w_ml, w_dl] is dynamically generated by S5. Causal analysis summary; this field is initially empty. The patient's historical trajectory index (points to the patient's historical record ID in the trajectory database), which is initially empty; (iv) Result and Status Fields: Final efficacy classification results and confidence levels; Record the current status ("Pending review" / "Approved" / "Rejected" / "Modified"); (v) Review and Signature Fields: Reviewer ID; Review timestamp; Electronic signature value based on PKI (Public Key Infrastructure) (using the auditor's private key to digitally sign the conclusion ID + timestamp); Review comments and remarks; (vi) Full lifecycle tracking fields: If the conclusion is subsequently modified, a change record will be automatically added, including the modification time, the person who modified it, the value before modification, the value after modification, and the reason for the change. Each review or rejection operation is also recorded, including the operation type, operator, timestamp, and operation notes.
[0066] The records are written to a secure database in read-only mode, and a Merkle tree structure is used to chain the batch of records together in a hash chain—meaning each record contains the hash value of the previous record. Any modification to the historical records will break the consistency of the hash chain, thus ensuring that the log cannot be deleted, overwritten, or tampered with. All records are fully retained for the retention period required by regulations (such as at least 15 years as required by ICHE6 R2), supporting regulatory agencies' access and auditing at any time.
[0067] Based on the pain efficacy analysis methodology (steps S1 to S6) implemented in the aforementioned clinical trials, this invention also provides the following optional optimized implementation methods to further enhance the clinical attribution interpretability of the analysis results. This supplementary method is built upon the core output data of the aforementioned basic method and can be selected for activation based on actual clinical needs during implementation.
[0068] As one of the optimization solutions, the present invention further provides an attribution enhancement implementation method based on causal semantic analysis of therapeutic effects.
[0069] In this optimized implementation, after step S5 (dynamically generating fusion weights via the gated fusion network) of the basic scheme is completed, and before step S6 (generating the final efficacy classification results and audit records) is solidified, the present invention further introduces an efficacy causal semantic parsing enhancement sub-process. This sub-process serves as a supplementary explanation to the basic classification results, used to trace "why this change in efficacy occurred," and its output is independent of the efficacy classification conclusion and does not participate in the determination of the final classification result.
[0070] As a specific example of an implementable method, this sub-process is configured to be implemented according to the following logical scheme: (1) Anchor point location of therapeutic effect change: Simultaneously acquire the "semantic core clauses and core pain terms" determined by the rule layer in step S2, and the top 3 text fragments (Token level) ranked by the attention mechanism weight of the deep learning model in step S4. Taking the confidence weighted voting results of the above two sources as an example, we can weight the confidence of the output of the rule layer and the deep learning layer, select the candidate fragments ranked by the comprehensive score of K, where K is a preset value, usually 3~5, and locate the "set of anchor points of therapeutic effect change" A that triggers this therapeutic effect judgment.
[0071] (2) Five-dimensional causal framework soft classification: For each anchor segment, a pre-built lightweight classifier for medical text causality is invoked to classify it into one of the following five causal frameworks designed specifically for clinical trials: C1 - Direct pain intensity change: Anchor points describe changes in the intensity, frequency, or nature of the pain itself, such as "the pain has dropped from 8 points to 3 points", "what used to be persistent pain is now only occasional pain", "sharp pain has become dull pain", which is attributed to the direct effect of treatment on pain receptors. C2 - Improved Functional Status: Anchor points describe the functional recovery resulting from pain relief, such as "able to get out of bed and walk around", "able to sleep through the night", "able to eat by himself", which are attributed to the functional benefits brought about by treatment; C3 - Improvement of accompanying symptoms: The anchor point describes the improvement of other symptoms that accompany the pain, such as "the feeling of nausea is also less" or "I am less irritable". This is attributed to the fact that the improvement of the comorbid symptoms by the treatment indirectly affects the pain experience. C4 - Psychological adaptation and cognitive reassessment: Anchor points describe changes in the patient's subjective attitude or cognition toward pain, such as "It still hurts but I can bear it," "I'm not so afraid of this pain anymore," "I've gotten used to it," which are attributed to psychological adaptation or the placebo effect. C5 - External Confounding Factors: Anchor points mention influencing factors outside of treatment, such as "It's getting cold today," "I didn't sleep well last night," or "I'm in a good mood today," and are marked as confounding factors.
[0072] As a supplementary explanation, the lightweight classifier for causal relationships in medical texts here is based on the BioBERT architecture and fine-tuned on clinical narrative corpora containing "cause-effect" annotations. The classifier's judgment criteria include: the syntactic dependency structure of the anchor segment (whether the subject is "pain" itself, and whether the predicate is a perceptual verb or an evaluative verb), semantic role annotation (agent, patient, instrument, etc.), and modal verbs and evaluative adverbs in the sentence containing the anchor.
[0073] (3) Causal Chain Construction and Confidence Assessment: When multiple anchor fragments exist in the same text, a causal chain is constructed. For example, the text "The pain is not so bad, I can sleep through the night, and I feel much better overall" contains three anchors: C1 (reduced pain intensity) → C2 (restoration of sleep function) → C3 (improved mental state). A causal chain with a directed acyclic graph structure is generated by detecting the temporal order (sentence order) and semantic implication relationship between anchors. Preferably, when sentence order conflicts with semantic implication relationship (e.g., the result is stated before the cause), the semantic implication relationship is used as the final basis for determining the causal direction. Based on this, the transit confidence of each causal edge is calculated, i.e., based on the semantic similarity and co-occurrence frequency between anchors.
[0074] (4) Generation of efficacy attribution summary: Based on the above causal framework classification results and causal chain, a structured efficacy attribution summary is generated, including: The primary attribution category for this change in efficacy is, for example, the causal frame type with the highest confidence level and which is not lower than a preset threshold such as 0.6. If the confidence level of all categories is lower than this threshold, the output "Attribution unclear, manual review recommended" is output as the attribution result. If multiple causal paths exist, output the top 3 paths in order of confidence. If external interference is detected, output a "Confounding factors exist" flag and a description of the specific interfering factors.
[0075] As a further explanation, this attribution summary does not participate in the determination of "efficacy classification result (relief / worsening / no change)" in the basic step S6. Instead, it is added as an independent structured data point to the "inference process snapshot" extended field (i.e. the aforementioned "causal analysis summary" field) in the audit record described in step S6, so that clinical researchers can use it as a mechanistic reference when reviewing the conclusions.
[0076] As a second optimization scheme, the present invention further provides an enhanced implementation method for dynamic time series analysis based on individualized patient trajectories.
[0077] In this optimized implementation, after the single-analysis audit and solidification are completed in step S6 of the basic protocol, the present invention further introduces a supplementary implementation scheme for individualized efficacy trajectory analysis, specifically for clinical trial scenarios requiring long-term follow-up. This supplementary optimized scheme is also built upon the core output data of the basic protocol, based on the historical sequence of fused feature vectors accumulated by the same patient through steps S1 to S6 of the basic protocol during each visit. It does not change the judgment logic of the original steps in the basic protocol, and users can choose whether to enable it based on the actual follow-up period of the clinical trial.
[0078] As a specific example of an implementation method, this enhanced implementation method based on dynamic time series analysis of individualized patient trajectories is configured to be implemented according to the following logical scheme: (1) Construction of historical semantic feature sequence: For each patient, maintain a time-varying fusion feature vector queue F_seq(patient) = [F_fused(t1), F_fused(t2), ..., F_fused(t3)]. n [)], and synchronously record the timestamp of each evaluation. Where F_fused(t n This refers to the fusion feature vector generated in step S5 of the basic scheme.
[0079] (2) Non-uniform time interval sensing encoding: Given the inconsistent intervals of patient diary submissions in clinical trials (e.g., 1 day, 3 days or 7 days), a time encoder based on a Transformer decoder is used for state updates.
[0080] The encoder will calculate the time interval ΔT = t between two consecutive evaluations. k -t k ₋1 is transformed into a time interval embedding vector ΔT_embed = W_Δt·ΔT + b_Δt through a learnable linear layer, and then updated in state by a gated recurrent unit (GRU) based time encoder. The update mechanism is expressed as: H(t k = GRU( F_fused(t k ), H(t k ₋1), ΔT_embed ); Where H(t) k ₋1) represents the hidden state at the previous time step, and ΔT_embed is the time interval embedding vector. This mechanism enables the model to perceive the non-uniformity of evaluation frequency and achieve continuous transmission of therapeutic status.
[0081] (3) Multidimensional therapeutic trajectory feature extraction: based on continuous hidden state sequence H(t1) to H(t) n The system automatically calculates the following derived indicators: First-order difference trend vector: ΔH(t) k )=H(t k )-H(t k ₋1), reflecting the speed and direction of changes in therapeutic efficacy; Second-order difference acceleration vector: Δ 2 H(t k )=ΔH(t k )-ΔH(t k ₋1), reflecting the increasing or decreasing trend of the rate of change in therapeutic efficacy; Sliding window statistics: The mean and standard deviation are calculated on the latent state of the most recent W assessments (W is the preset window size, taken as 3-5) to assess the central tendency and variability of recent efficacy.
[0082] (4) Fine-grained trajectory classification and clinical early warning: Input the above trend features into a lightweight classifier, and the following extended conclusions are output: Trajectory types: further subdivided into fine-grained trajectory types such as "continuous improvement", "slowing improvement", "efficacy plateau", "efficacy rebound", "continuous aggravation", and "slowing aggravation". Early efficacy signal determination: If the patient's ΔH sequence shows a statistically significant monotonically increasing trend in the early stage of treatment (such as within the first 2 weeks), and the p-value is calculated using the Mann-Kendall trend test and the exact distribution method applicable to small samples (n≥6), and p<0.05 is considered statistically significant, then it is marked as "positive early efficacy signal". Treatment rebound warning: If a patient's ΔH changes from positive to negative and the absolute value exceeds the preset threshold after two consecutive improvements, the "treatment rebound warning" will be triggered. Trajectory inference under missing data: When text data is missing at a certain point in time, the time encoder generates the predicted hidden state for that point in time based on the historical hidden state and the known time interval, thus maintaining the continuity of the trajectory.
[0083] (5) Trajectory clustering at the group level: Unsupervised clustering of the efficacy trajectory of all patients can be performed. For example, the K-Medoids clustering algorithm based on dynamic time regularization distance can be used to perform clustering to identify different efficacy response subtypes, such as "rapid response", "delayed response", "fluctuation" and "no response", providing a new hierarchical dimension for subgroup analysis of clinical trials.
[0084] As a further explanation, the trajectory analysis results generated in this preferred embodiment do not retroactively modify the historical single conclusions generated in step S6. Instead, they are stored as independent "patient follow-up trend dashboard" data in the extended storage area of the audit trail module. They can be associated through the "patient historical trajectory index" field in the aforementioned audit records and can be retrieved and visualized by patient, by time interval, and by trajectory type.
[0085] To ensure the credibility of AI models used in clinical trial efficacy analysis, the present invention incorporates the following key mechanisms during system deployment and maintenance: External Validation: Before the model is officially launched, it must be validated using at least one independent dataset from different clinical trials or medical centers in different geographic regions. The external validation dataset should have no patient overlap with the training set, and there should be differences in collection time, location, and trial protocol. The system automatically calculates and reports the model's overall performance metrics (precision, recall, F1 score, AUC) on the external validation set.
[0086] Bias Assessment: During external validation, the system automatically calculates the model's performance metrics in each predefined subgroup. Subgroup classification dimensions include, but are not limited to: gender (male / female), age (e.g., <40 years / 40-60 years / 60 years), baseline VAS score (e.g., <4 points / 4-7 points / 7 points), and pain type (neuropathic pain / nociceptive pain / mixed pain). If the F1 score of a subgroup is significantly lower than the overall level (difference exceeding a preset threshold, e.g., 0.15), the system will issue a bias warning, generate a detailed bias analysis report, and prevent model deployment until the bias is corrected or a reasonable explanation is provided.
[0087] Stability test: Samples are randomly selected from the test set through adversarial verification, and the specific quantity is determined according to the actual situation. As a preferred embodiment, the quantity is generally no less than 500 samples. The following perturbations are applied to each sample: (1) Synonym replacement — replacing pain descriptors in the text with synonyms (e.g., "teng" → "tong", both meaning pain); (2) Minor word order adjustment — adjusting the order of some modifiers; (3) Irrelevant short sentence insertion — inserting filler phrases that do not affect the semantics. The system calculates the consistency rate of the output categories of the model on the original text and the perturbed text as the stability coefficient. This coefficient shall not be lower than a preset threshold (e.g., 95%), otherwise the model will not be released online.
[0088] Version management: The system assigns a globally unique version number (e.g., V1.0, V1.1, V2.0) to each model update (including but not limited to dictionary expansion, retraining, fine-tuning, and architecture modification), and records the version effective time and update description (update type, update reason, and influence scope). During the transition period of version switching (at least 30 days), the system supports running the old and new versions of the model in parallel for the same input text, and automatically generates a result difference report. If the macro-average F1 value of the new version on the external verification set drops by more than 2 percentage points compared with the old version, the version update will be automatically blocked, and the system administrator will be notified for review.
[0089] Dictionary version management: As the core component of the system knowledge base, each update of the sentiment dictionary (e.g., adding new terms, adjusting intensity values, and modifying tendency labels) is also assigned an independent version number (e.g., Dict-V1.0, Dict-V1.1), which is recorded in association with the model version number. The dictionary version number called for each efficacy analysis is recorded in the audit record, ensuring that the analysis result can be accurately traced back to the knowledge version it depends on.
[0090] Specific implementation of multimodal data processing When the input is recording data, the ASR engine converts the audio signal into text. An end-to-end speech recognition model based on Transformer is adopted to map the Mel-Frequency Cepstral Coefficients (MFCC) feature sequence of the audio into a character sequence. The transcribed text goes through the processes from S1-2 to S1-3 and then enters the subsequent analysis flow.
[0091] When the input is image data, the system first extracts keyframes at a density of 1 frame per second using a video decoder; for static images, they are processed directly as single frames. Subsequently, a text detection model based on a convolutional neural network (CNN) is used to locate text regions in the image, and an OCR engine (such as an encoder-decoder architecture based on an attention mechanism) converts the detected text regions into text. The extracted text is then processed through steps S1-2 to S1-3 before entering the subsequent analysis process. If the image contains graphic information indicating the location of pain (such as a patient marking the location of pain on a human body contour map), the system further identifies the marked regions using an image segmentation model, converting the location information into structured data (such as "left knee" or "lower back"), which is then included in the analysis along with the text description.
[0092] The method for analyzing pain efficacy in clinical trials based on an adaptive dictionary and a hierarchical interpretable model, as presented in this invention, can be specifically applied as a software program, forming a corresponding system for analyzing pain efficacy in clinical trials based on an adaptive dictionary and a hierarchical interpretable model. When running, this software program executes the aforementioned method for analyzing pain efficacy in clinical trials based on an adaptive dictionary and a hierarchical interpretable model, and stores the results in a corresponding storage medium for the processor to retrieve and execute.
[0093] See Figure 4 This clinical trial pain efficacy analysis system based on an adaptive dictionary and a hierarchical interpretable model consists of five core modules: a multi-source data acquisition module 10, a dictionary storage and retrieval module 20, a multi-level analysis engine 30, an audit trail and output module 40, and a model validation and version management module 50, forming a loosely coupled, highly cohesive pipeline architecture.
[0094] The multi-source data acquisition module 10 serves as the system's data entry point, responsible for securely and compliantly acquiring raw data (including unstructured text, audio recordings, and video recordings) from external heterogeneous systems and completing preliminary cleaning.
[0095] This module contains a multimodal data adapter that supports data acquisition from electronic patient reporting systems, electronic data acquisition systems, recording devices, and image acquisition devices. For audio data, it transcribes the data into text using an automatic speech recognition engine. For image data, it extracts the textual description information contained therein through video keyframe extraction and optical character recognition.
[0096] The multi-source data acquisition module 10 also includes a secure data adapter based on the FHIR standard and a conversational text cleansing submodule. The adapter, through a configurable connector, supports secure data acquisition from FHIR-compliant ePRO cloud, hospital intranet EDC systems, etc. The specific implementation of the conversational text cleansing submodule has been described in detail in step S1 of the method embodiment and will not be elaborated here.
[0097] The dictionary storage and retrieval module 20 serves as the system's knowledge base, storing a pre-built adaptive sentiment dictionary for the pain domain and providing efficient online query and matching services. Its data structure and generation method have been fully explained in steps S2-A to S2-D of the method embodiment. To meet the demands of high-concurrency analysis, this module is built on an in-memory database, enabling microsecond-level word matching and feature extraction. This module also maintains a dictionary version number; each dictionary update generates a new version and records its effective time.
[0098] The multi-level analysis engine 30 serves as the core of the system, combined with... Figure 3 As shown, it integrates a rule feature extraction unit 31, a machine learning prediction unit 32, a deep learning prediction unit 33, and a gating fusion unit 34.
[0099] The rule feature extraction unit 31 is configured to extract the sentiment rule feature vector of the input text using the dictionary, as described in step S2. The machine learning prediction unit 32 is configured to output a first efficacy prediction vector based on the text, as described in step S3. The deep learning prediction unit 33 is configured to output a second efficacy prediction vector based on the text, as described in step S4. The gated fusion unit 34 is configured to dynamically generate fusion weights for each input feature and integrate them to generate a fusion feature vector, as described in step S5.
[0100] The gated fusion unit 34 is a key carrier for demonstrating interpretable innovation. Its specific design includes a "weight transfer interface" that sends the dynamically generated fusion weight vector W to the audit trail and output module 40 in real time and asynchronously while it is being sent to the next unit for fusion calculation, ensuring that the decision basis is not tampered with or lost.
[0101] Optionally, the multi-level analysis engine 30 also includes a causal semantic parsing unit 35, which is configured to be connected after the gated fusion unit 34 and before the audit trail and output module 40, and is configured to perform an attribution enhancement implementation based on efficacy causal semantic parsing.
[0102] The causal semantic parsing unit 35, configured in this way, can receive the fused feature vector F_fused output by the gated fusion unit 34 and the intermediate results of the rule layer and deep learning layer, and output a structured efficacy attribution summary to the audit trail and output module 40.
[0103] Optionally, the multi-level analysis engine 30 also includes a therapeutic trajectory analysis unit 36, which is configured to be connected to the audit trail and output module 40 or deployed as an independent module. It is configured to perform enhanced implementation of dynamic time series analysis based on individual patient trajectories, maintain the historical fusion feature vector sequence of each patient, generate trajectory classification and early warning through a time encoder, and store and visualize the output results through the extended data interface of the audit trail and output module 40.
[0104] The audit trail and output module 40 serves as the system's "chain of evidence" and output outlet. It is responsible for executing step S6 in the aforementioned method, generating and solidifying audit records, and providing researchers or auditors with visualized efficacy conclusions and their reasoning basis.
[0105] Specifically, the audit trail and output module 40 is configured with an immutable audit log generator. This generator is set to accept intermediate results and final weight vectors from each unit of the analysis engine 30, assemble them into audit records according to a predefined template containing complete metadata, and use a Merkle tree structure to chain the batch records in a hash-based manner before writing them to a read-only database, ensuring that any modification to the historical records can be detected.
[0106] Furthermore, the audit trail and output module 40 has a built-in audit workflow engine that supports pushing the initial "pending audit" result to the designated auditor. After the auditor confirms the result with an electronic signature, the result status is updated to "approved". If rejected, the reason for rejection must be filled in, and the system records a complete rejection operation log.
[0107] In addition, the audit trail and output module 40 also provides a visual audit dashboard, which allows auditors to intuitively see a complete reasoning path diagram containing "original text - dictionary hit status - judgment tendency of each model - fusion decision weight - audit signature chain" by querying a conclusion ID.
[0108] Based on this, the audit trail and output module 40 further provides an extended data interface, which is configured to connect with the causal semantic parsing unit 35 and the efficacy trajectory analysis unit 36 to receive and store the "causal parsing summary" output by the causal semantic parsing unit 35, as well as the "patient historical trajectory index" and trajectory analysis results output by the efficacy trajectory analysis unit 36. This expands the audit record from a two-layer "conclusion-basis" system to a four-layer traceable system of "conclusion-basis-attribution-trend".
[0109] The model validation and version management module 50 is coupled to the multi-level analysis engine 30. It is used to store the performance evaluation reports, bias analysis results and stability test data of each version of the model, and automatically triggers the version comparison process when the model is updated, generating a comparison report for researchers to approve.
[0110] As a further optional configuration, the model validation and version management module 50 can be further configured to be coupled to the causal semantic parsing unit 35 and the efficacy trajectory analysis unit 36, providing independent version management, performance validation and stability testing services for the models (including causal classifiers and time encoders) of the above two optional units, ensuring that the newly added enhancement units also meet the traceability requirements of the clinical trial quality management specifications.
[0111] Based on this, a pain efficacy analysis system for clinical trials, using an adaptive dictionary and a hierarchical interpretable model, is developed. For a patient's pain diary submitted through the ePRO application, the multi-source data acquisition module 10 first retrieves the text via API, performs desensitization and colloquialization correction, and temporarily saves the hash value of the original text. Subsequently, the cleaned text is simultaneously fed into three parallel units within the multi-level analysis engine 30: a rule feature extraction unit 31, a machine learning prediction unit 32, and a deep learning prediction unit 33. Unit 31 synchronously calls the dictionary storage and retrieval module 20 for rule feature extraction. After independent calculations by the three units, their outputs converge to a gated fusion unit 34, which calculates dynamic weights and generates fusion features. Finally, the fusion features are fed into the classifier of the audit trail and output module 40. At this point, the audit log generator intercepts and aggregates information from all upstream units and the original data, assembles the audit record, and writes it to a secure database. Simultaneously, the final efficacy conclusion is pushed to the researcher's dashboard, marked as "pending review." This process achieves a fully automated closed loop from original text to compliant evidence.
[0112] To enable those skilled in the art to more intuitively understand the application value of the present invention, a complete example is provided below using a simulated clinical trial scenario of morphine for cancer pain treatment.
[0113] During the system deployment and preparation phase, the research institution deployed the analysis system of this invention in a containerized manner on the private cloud of its clinical data center. The system establishes connections with the hospital's EDC system (which stores structured data such as VAS scores) and the ePRO application on the patient's mobile phone (which collects daily pain diaries) through a secure HL7 FHIR interface.
[0114] As an example, 3000 patient diaries with VAS scores were extracted from a previous cancer pain trial as a dictionary construction dataset. Following steps S2-A to S2-D, the system automatically constructed the "Cancer Pain V1.0" sentiment dictionary. During the construction process, the model automatically assigned a score of 6.2 to "like being pricked by needles" and a score of 9.8 to "heart-wrenching pain." After the dictionary was constructed, it was loaded into the system's dictionary storage and retrieval module 20. Subsequently, the three-layer fusion model was trained and validated using 45,000 unrated diary entries from 500 patients in the same trial. Before model deployment, external validation was performed using 2000 independent data from another neuropathic pain trial, according to the validation process specified in this invention. The results showed that the F1 score for each subgroup was higher than 0.85, the stability test was passed, and the model was approved for deployment, with the version number set to "V1.0". The model ultimately achieved a macro-average F1 score of 0.88 on the test set, significantly outperforming the single deep learning baseline model (F1=0.73). This verifies the significant performance advantages of the three-layer converged architecture proposed in this invention.
[0115] In the real-time analysis process after the trial officially started, a male subject entered the following diary entry via ePROApp on the 7th day after taking the medication: "I woke up this morning feeling much better. The pain isn't as continuous and excruciating as it was the previous days; now it's just occasional pricking sensations that pass quickly. Although I'm still a little nauseous, I'm generally satisfied with the pain relief." As the first step in the analysis, the multi-source data acquisition module 10 pulls the text, performs privacy removal and colloquial conversion (such as retaining "much better," which has become a standard emotional expression), and generates a clean text to be analyzed.
[0116] In the second step, the multi-level analysis engine 30 begins operation: the rule extraction unit 31 calls the "Cancer Pain V1.0" dictionary for matching. It identifies "heart-wrenching pain" (intensity 9.8, negative tendency) as falling within the window of the negative word "unlike," and its tendency is flipped to "positive tendency." It identifies "stab-like pain" (intensity 6.2, negative tendency) as falling within the window of "occasionally," and its intensity contribution is attenuated (attenuation coefficient is 0.5). It identifies "basically satisfied" as triggering a positive tendency efficacy rule. At the same time, the processing mechanism of the transition word "although...but" is triggered, and the system identifies "I am basically satisfied with the pain" as the semantic focus, generating a rule feature vector with a strong positive tendency. In parallel, machine learning unit 32 captures the association between "(satisfaction, pain)" based on syntactic features and outputs a prediction vector favoring "relief / improvement" (probability distribution [0.85, 0.05, 0.10]). Deep learning unit 33 understands the overall context and, from the contrast of "unlike the past few days..." and the satisfied tone at the end, also outputs a prediction of "relief / improvement" (probability distribution [0.78, 0.12, 0.10]). After all three paths have been computed, gated fusion unit 34 receives the three pieces of information. Its internal network evaluation considers the explicit negation and transition logic captured by the rule layer in the text to be the most critical. Therefore, it dynamically generates weights W = [0.7, 0.1, 0.2], and after weighted fusion, obtains the fused features, which are finally judged as "relief / improvement" with a high confidence of 0.97.
[0117] In the third step, the audit trail and output module 40 packages all information, including the analysis ID ("ANALYSIS-2026-001"), operator ID ("SYS-BATCH-001"), original text hash ("a3f5c9..."), dictionary version "Dict-V1.0", three intermediate outputs, weight vector [0.7, 0.1, 0.2], and final conclusion, into an immutable audit log, initially marked as "Pending Audit". Simultaneously, the conclusion of "relief / improvement" is marked on the pain trend graph of the subject's electronic case report form, and an audit pending notification is automatically sent to the Clinical Research Coordinator (CRC). After verifying the original log, the CRC confirms the analysis conclusion is correct, logs into the system via two-factor authentication, clicks "Approval", and enters an electronic signature based on a hardware token. The system records this audit operation (auditor ID, audit time, electronic signature value), and the conclusion status is updated to "Approved". Weeks later, when a Clinical Research Assistant (CTA) conducted a remote review of the source data, he clicked the "Audit" button next to the "Relief / Improvement" conclusion. The system immediately popped up a details window, clearly showing every step of the reasoning from the original text to the final conclusion, as well as the complete chain of audit signatures. 70% of the system's decision was based on the clear improvement logic expressed in the statement, "It's not as excruciatingly painful as it was a few days ago," which he, as a professional, also acknowledged. The auditor confirmed the reliability of the conclusion without requiring manual review of the original log.
[0118] As can be seen from the above examples, the present invention effectively integrates the deep analysis capabilities of artificial intelligence with the rigor, interpretability, and compliance required by clinical evidence.
[0119] Based on the above-mentioned pain efficacy analysis scheme in clinical trials based on adaptive dictionary and hierarchical interpretable model, this embodiment of the invention also provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements the steps of the above-mentioned pain efficacy analysis method in clinical trials.
[0120] This invention also provides a processor for running a program, wherein the program executes the steps of the pain efficacy analysis method described above in the clinical trial.
[0121] This invention also provides a terminal device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. The program code is loaded and executed by the processor to implement the steps of the pain efficacy analysis method in the above-mentioned clinical trial.
[0122] The present invention also provides a computer program product, which, when executed on a data processing device, is adapted to perform the steps of the pain efficacy analysis method described above in clinical trials.
[0123] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0124] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0125] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0126] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A method for analyzing the subjective efficacy of clinical pain based on a hierarchical fusion model, characterized in that, include: Obtain the subjective description of clinical pain, such as text, language, or images, to be analyzed; Using a pre-built pain domain adaptive sentiment dictionary, rule features are extracted from the text, language, or images to generate sentiment rule feature vectors; The text, language, or image is input into a machine learning classification model to obtain a first efficacy prediction vector. The text, language, or image is input into a deep learning semantic understanding model to obtain a second efficacy prediction vector. The emotional rule feature vector, the first efficacy prediction vector, and the second efficacy prediction vector are input into a preset gated fusion network. The fusion weights of each input are dynamically generated through the gated fusion network, and a fusion feature vector is generated based on the weights. Based on the fused feature vector, a subjective efficacy classification result corresponding to the text, language or image is generated. The efficacy classification result includes at least three tendency categories: relief / improvement, aggravation, and no change. Specifically, an audit record is generated that is associated with the subjective efficacy classification result. The audit record includes at least the operator's identity identifier, the fusion weight dynamically generated by the gating fusion network, and the audit status of the classification result.
2. The method according to claim 1, characterized in that, The steps for constructing the pain domain adaptive sentiment lexicon include: Standard terms in the field of pain are collected to construct a seed dictionary, and terminology is normalized using a medical terminology standard library; Obtain a training dataset containing multiple paired samples of pain descriptions (text, language, or images) and corresponding patient subjective efficacy anchor values at different times. The patient subjective efficacy anchor values include visual analog scale scores or numerical rating scale scores. A text, language, or image intensity mapping model is trained using the paired samples to automatically assign sentiment intensity values to terms in the seed dictionary. For derivative words that do not appear in the training dataset, the strength values are interpolated by calculating the similarity between the word embeddings generated by the pre-trained language model and the word embeddings of the terms that have been assigned strength values. Based on dependency parsing, the dictionary terms are labeled with their association tendencies with three therapeutic states: relief / improvement, aggravation, and no change.
3. The method according to claim 1, characterized in that, The step of extracting rule features from the text, language, or image, etc., and generating sentiment rule feature vectors, further includes: Negation word window detection is performed on the text, language, or image, and when an emotion word is located within the negation word window, its therapeutic tendency is reversed. The text, language, or image is subjected to transition word detection. When a transition word is detected, the semantic focus clause is determined based on the syntactic dependency relationship, and a modified rule feature vector is generated based on the therapeutic tendency of the semantic focus clause.
4. The method according to claim 1, characterized in that, The gated fusion network consists of a fully connected layer and a Softmax activation function, used to output the fusion weights; The audit log also includes full lifecycle tracking information of the classification results. The full lifecycle tracking information includes: initial generation status, electronic signature and audit comments of designated reviewers, modification operation records, review operation records, rejection operation records, timestamps of each operation and operator identity, and automatically retains the values before and after the modification and forcibly annotates the reason for the change when key data is modified. The audit records are stored in an immutable format, supporting complete retention and retrieval at any time within the retention period required by regulations.
5. The method according to claim 1, characterized in that, It also includes model validation and version management steps: Before model deployment, performance is validated using external clinical trial data independent of the training set. The classification performance metrics of the model in predefined subgroups are calculated and recorded to assess bias. Model stability is tested by adding small perturbations to the input text, language, or images and monitoring the output changes. Assign a unique version number to each model update, record the effective time of the version, and run the model before and after the update simultaneously on the same input text, language, or image to generate a version comparison report to ensure the comparability of the analysis results.
6. The method according to claim 1, characterized in that, The step of obtaining the subjective description of clinical pain, such as text, language, or images, to be analyzed further includes: Data is acquired from electronic patient reporting outcome systems, electronic data acquisition systems, recording devices, and image acquisition devices using a multimodal data adapter; For audio recordings, an automatic speech recognition engine transcribes them into text. For video data, textual description information is extracted through video keyframe extraction and optical character recognition.
7. The method according to claim 1, characterized in that, The deep learning semantic understanding model is a pre-trained language model based on the Transformer architecture, and the model is fine-tuned for domain adaptation using a dataset containing clinical colloquial expressions.
8. A clinical pain subjective efficacy analysis system based on a hierarchical fusion model, characterized in that, include: The multi-source data acquisition module is used to acquire subjective descriptions of clinical pain, such as text, language, or images, to be analyzed. A dictionary storage and retrieval module is used to provide a pre-built adaptive sentiment dictionary for the pain domain; A multi-level analysis engine, which includes: The rule feature extraction unit is used to extract the sentiment rule feature vector of the input text using the dictionary; A machine learning prediction unit is used to output a first efficacy prediction vector based on the text; A deep learning prediction unit is used to output a second efficacy prediction vector based on the text; The gated fusion unit is used to dynamically generate fusion weights for each input feature and integrate them to generate a fusion feature vector. The result output module is used to generate subjective efficacy classification results based on the fused feature vector. The audit trail module, coupled to the multi-level analysis engine, is used to capture and record in real time the fusion weights generated by the gated fusion unit and the intermediate processing results of each unit, and generate audit logs that are bound to the subjective efficacy classification results and conform to the ALCOA+ standard. The audit trail module has a built-in audit workflow engine to realize the full lifecycle tracking of the submission, review, rejection and modification of the classification results, and record the identity and electronic signature of the operator who performed the corresponding operation.
9. The system according to claim 8, characterized in that, The system also includes a model verification and version management module, which is coupled to the multi-level analysis engine. This module stores performance evaluation reports, bias analysis results, and stability test data for each version of the model and triggers a version comparison process when the model is updated.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Emotion word text information classification method
CN111104515A
Model generation method and device, text classification method and device, equipment and medium
CN112632283A
