A drug review rule construction method and system based on semantic differential driving and implicit logic locking
By constructing a drug review rule based on semantic difference and implicit logic locking, the problem of ignoring implicit management logic in existing technologies is solved, and the accurate inheritance and safe generation of new drug review rules are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHONGSHAN HOSPITAL FUDAN UNIV
- Filing Date
- 2026-03-04
- Publication Date
- 2026-06-12
AI Technical Summary
Existing new drug review rule generation technology ignores the implicit management logic in the hospital's current review rules, resulting in the generated rules being unable to be effectively implemented in real clinical environments.
A drug review rule construction method based on semantic difference and implicit logic locking is adopted. A homogeneity measurement space is established through Siamese neural network to identify the differences between new drugs and anchor drugs. By using multi-anchor fusion and abstract syntax tree mutation, review rules that conform to implicit management logic are generated.
It enables the passive inheritance of tacit knowledge, improves the certainty and security of rule generation, eliminates the illusionary risk of large language models, and ensures the accuracy and consistency of new drug review rules.
Smart Images

Figure CN122201840A_ABST
Abstract
Description
Technical Field
[0001] This application provides a method and system for constructing drug review rules based on semantic difference driving and implicit logic locking, which relates to the field of biomedical technology. Background Technology
[0002] There are three existing technical approaches to automatically generating new drug review rules:
[0003] Existing technical approach 1: Template filling. The drawback is that it relies on predefined static templates (such as "IF [dosage] > [X] THEN intercept"), cannot handle complex nested logic (such as "intercept only when renal insufficiency is accompanied by diuretics"), and cannot automatically adapt to new logic.
[0004] Existing technical approach 2: Similarity-based rule copying. Drawbacks: Directly copying the review rules of existing drugs. If the new drug has subtle differences (e.g., the new drug removes a certain side effect), direct copying can lead to false positives, lacking adaptability.
[0005] Existing technical route 3: Retrieval Enhancement Generation (RAG + LLM) is currently the mainstream approach. This involves feeding the new drug instruction manual into an LLM (Large Language Model) to generate review rules.
[0006] Current search-enhanced generation technologies suffer from a long-overlooked but critical problem of tacit knowledge loss. This is primarily due to the disconnect between explicit and implicit knowledge: new drug instructions only contain the "explicit medical characteristics" declared by the pharmaceutical company (such as indications and contraindications), while the hospital's existing review rule base contains a large amount of "implicit management logic" beyond the instructions (such as administrative restrictions on specific departments, specific biochemical thresholds set based on clinical experience, and frequency restrictions for medical insurance cost control). For example, an LLM (Limited Medical Professional) might only read the new instructions and be unaware of the hospital's administrative regulation limiting the prescription of this type of drug to a single 3-day supply.
[0007] Therefore, the current mainstream technical approach of retrieval enhancement generation (RAG + LLM) has the drawbacks of generative AI: existing new drug review rule generation schemes based on LLM (large language model) tend to generate rules from scratch according to the new drug instructions. This can lead to the catastrophic forgetting or replacement of the implicit management logic that hospitals have been validated over a long period of time, resulting in the dilemma that new rules, although in line with the instructions, cannot be implemented in the real clinical environment. Summary of the Invention
[0008] The technical problem this application aims to solve is that existing automatic generation technologies for new drug review rules ignore the implicit management logic in the current review rules of hospitals.
[0009] To address the aforementioned technical problems, this application provides a method for constructing drug review rules based on semantic difference-driven and implicit logic locking, comprising the following steps:
[0010] S100 Establish a homogeneous metric space based on the similarity of drug review rules, so that: after drug features are converted into metric vectors, the metric vectors of drugs with similar review rules are closer in the metric space; S200 For new drugs, retrieve the most similar anchor drugs in the metric space, and perform multi-anchor fusion based on the multiple anchor drugs to construct a virtual benchmark, including: a benchmark rule tree Tree_{Base} and a benchmark feature vector Spec_{Base}; S300 Identify the difference between the new drug instruction manual feature vector Spec_{New} and the benchmark feature vector Spec_{Base} to obtain a semantic difference operator; S400 Map the benchmark rule tree Tree_{Base} to an abstract syntax tree (AST), and mutate the AST using the semantic difference operator; S500 Decompile the mutated AST into an executable rule script to obtain the review rules for the new drug.
[0011] Furthermore, in step S100, the conversion of drug features into metric vectors is performed by a Siamese neural network. The input of the Siamese neural network is the drug features, and the output is a metric vector in a homogeneous metric space. The metric space contains the metric vectors corresponding to all drugs with existing review rules.
[0012] Furthermore, the training process of the Siamese neural network includes: S110 Data preparation: Constructing triplet samples <drug A, drug B, label> for drugs with existing review rules. If the logical Jaccard similarity between drug A and drug B is greater than 0.8, the label is positive; otherwise, it is negative. S120 Model training: The Siamese neural network includes two sub-networks with shared weights. Based on the triplet <drug A, drug B, label> obtained in step S110, the features of the two drugs are input into the two sub-networks respectively, and two fixed-length vectors are output. If the label is a positive sample, the sub-network parameters are adjusted to shorten the vector distance between drug A and drug B; if the label is a negative sample, the sub-network parameters are adjusted to widen the vector distance between drug A and drug B. After training, the Siamese neural network maps drugs with similar rules to closer positions in the metric space.
[0013] Furthermore, step S200 includes:
[0014] S210 Obtain the new drug feature F_{new}; S220 Retrieve the three nearest anchor drugs {A_1, A_2, A_3} in the metric space; S230 Construct a virtual baseline, synthesizing a virtual, average, and representative baseline drug from the perspectives of [review rules] and [instruction manual features], to serve as a reference for the new drug; S231 For the review rules, align and prune the rule trees of the three anchor drugs, retaining logical nodes with a frequency greater than 2 / 3, and synthesize the baseline rule tree Tree_{Base}; S232 For the instruction manual features, perform feature averaging on the instruction manual feature vectors of the three anchor drugs to generate the baseline feature vector Spec_{Base}.
[0015] Furthermore, the feature vector of the instruction manual is obtained by extracting semantic vectors through an NLP model.
[0016] Furthermore, in step S300, the semantic difference operator is set as a structured sequence of editing operators, which is obtained through a Siamese difference network; the input of the Siamese difference network is the feature vector Spec_{New} of the new drug instruction manual and the baseline feature vector Spec_{Base}, and the output is the structured sequence of editing operators.
[0017] Furthermore, the twin difference network includes two sub-networks with shared weights. The inputs of the two sub-networks are the new drug instruction manual feature vector Spec_{New} and the baseline feature vector Spec_{Base}, respectively. The outputs of the two sub-networks are processed by the difference module to obtain the difference vector. The difference vector is then input into the sequence encoder to obtain the edit operator sequence.
[0018] Furthermore, step S400 includes:
[0019] S410 Mapping: Parse the base rule tree Tree_{Base} into an abstract syntax tree (AST), retaining only the logical structure, transforming the structured text rules into a network of nodes that can be precisely located by the computer; S420 Mutation Execution: Traverse the sequence of editing operators, modifying only the nodes that are matched on the AST; A locking mechanism is used during mutation execution: other branches existing on the AST are kept frozen, allowing the new drug review rules to automatically inherit the original implicit rules.
[0020] Furthermore, step S500 also includes: generating a visualization report that highlights and distinguishes between inherited logic and logic modified according to the specification.
[0021] This application also provides a drug review rule construction system, including a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program to implement the aforementioned drug review rule construction method based on semantic difference driving and implicit logic locking.
[0022] The drug review rule construction method based on semantic differential driving and implicit logic locking provided in this application adopts differential-driven lazy mutation and utilizes an anchor-based minimally invasive editing mechanism to achieve the following effects:
[0023] Passive inheritance of tacit knowledge: Unless there is clear evidence in the new drug's instructions that modification is required, the implicit rule structure of the anchor drug will be "structured locked" and automatically inherited to the new drug without human intervention;
[0024] Order-of-magnitude improvement in certainty and security: transforming rule-generated open-ended question-and-answer questions into restricted editing questions, eliminating the illusionary risks of large models having free rein;
[0025] Precise mapping after denoising: Through multi-anchor point fusion technology, the specific rule noise of individual drugs is eliminated, ensuring that the greatest common divisor logic of this class of drugs is inherited. Attached Figure Description
[0026] Figure 1 This is a schematic diagram of the twin difference network model structure provided in the embodiments of this application. Detailed Implementation
[0027] To make this application more apparent and understandable, various exemplary embodiments will be described below. These examples are non-limiting and should be understood as illustrating aspects of the broader application of the apparatus, system, and method. These embodiments can be varied and substituted with equivalents without departing from the spirit and scope of this application. Furthermore, various variations can be made to adapt to specific circumstances, materials, material compositions, processing types, processing actions, or steps to suit the purpose, content, or scope of this application. All such variations will be within the protection scope of this application.
[0028] Any materials, dimensions, or quantities described in the overview or detailed description are merely examples and are not intended to limit the subject matter of this application. Furthermore, the various implementations of the embodiments described herein are complementary rather than purely alternating, unless otherwise stated. In other words, implementations from one embodiment can be freely combined with implementations from other embodiments, as will readily be apparent to those skilled in the art, unless these implementations are stated to be used only as substitutions.
[0029] In the description of this application, it should be noted that the terms "inner" and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product is in use. They are used only for the convenience of describing this application and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application. Furthermore, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0030] Example
[0031] This application provides a method for constructing drug review rules based on semantic difference-driven and implicit logic locking. The specific implementation steps include:
[0032] S100 establishes a homogeneous metric space based on the similarity of drug review rules, so that after drug features are transformed into metric vectors, the metric vectors of drugs with similar review rules are closer in the metric space.
[0033] The transformation of drug features into metric vectors is performed by a Siamese neural network. The Siamese neural network takes drug features as input and outputs metric vectors in a homogeneous metric space. By performing this transformation operation on all drugs covered by existing review rules, the metric space is made to contain the metric vectors corresponding to all drugs covered by the existing review rules.
[0034] The training process of a Siamese neural network is as follows:
[0035] S110 Data Preparation: Construct triplet samples <Drug A, Drug B, Label> for drugs with existing review rules. If the logical Jaccard similarity between the review rules of Drug A and Drug B is greater than 0.8, the label is Positive; otherwise, it is Negative.
[0036] For example, the rule set for drug A is {rule 1, rule 2, rule 3}, and the rule set for drug B is {rule 1, rule 2, rule 4}. The intersection is {rule 1, rule 2} (2 rules), and the union is {rule 1, rule 2, rule 3, rule 4} (4 rules). Therefore, the Jaccard similarity = 2 / 4 = 0.5. If the Jaccard similarity is greater than 0.8, it means that drug A and drug B can almost share the same set of review logic at the rule level, and are marked as positive samples, telling the subsequent model that drug A and drug B are considered to be of the same class. If the Jaccard similarity is ≤ 0.8, they are marked as negative samples, telling the subsequent model that the review rules for drug A and drug B are significantly different.
[0037] S120 model training: Training a Siamese network.
[0038] The Siamese neural network consists of two sub-networks (Encoder) sharing weights. Based on the triple <Drug A, Drug B, Tag> obtained in step S110, the features of the two drugs (such as structure, target, indication, physicochemical properties, etc.) are input into the two sub-networks respectively, and two fixed-length vectors (Embeddings) are output.
[0039] Training objective: If the label is a positive sample (label is Positive), adjust the sub-network parameters to shorten the vector distance between drug A and drug B; if the label is a negative sample, adjust the sub-network parameters to increase the vector distance between drug A and drug B. Training result: After training, the Siamese neural network maps drugs with similar rules to closer positions in the metric space.
[0040] The role of Siamese neural networks: After inputting the features of a new drug, the output is the vector of the new drug. This allows anchor drugs to be found in the neighborhood metric space based on the vector distance. Anchor drugs are the objects with the greatest potential for rule reuse (reusing the review rules of anchor drugs to new drugs).
[0041] The drug review rule construction method provided in this application uniquely adopts anchor point positioning under a homogeneous metric space, abandoning the traditional pharmacological structure similarity or text similarity, and trains a dedicated metric learning model (Siamese neural network) with the goal of rule logic homogeneity, so that drugs that are close in distance in the metric space are drugs with consistent management strategies (similar review rules), rather than drugs that are only similar in composition.
[0042] It is understandable that the Siamese neural network is an existing neural network. This application does not improve the structure of the Siamese neural network, but only trains the Siamese neural network specifically to generate metric vectors based on drug characteristics.
[0043] For new drugs, S200 retrieves the most similar anchor drugs in the metric space, performs multi-anchor fusion based on these anchor drugs, and constructs a virtual benchmark. Using several most similar known existing drugs (anchor drugs), a virtual, average, and representative benchmark drug is synthesized from the perspectives of [review rules] and [instruction manual characteristics], respectively, to serve as a reference for the new drug.
[0044] The specific steps include:
[0045] S210 Obtain new drug characteristics F_{new}, which include structure, target, indication, and physicochemical properties.
[0046] S220 retrieves the top-3 anchor drugs {A_1,A_2,A_3} in the metric space.
[0047] S230 constructs a virtual benchmark by synthesizing a virtual, average, and representative benchmark drug from the perspectives of [review rules] and [instruction manual features], which is used as a reference for new drugs.
[0048] S231 aligns and prunes the rule trees of the three anchor drugs according to the review rules, retaining logical nodes that appear more than 2 / 3 of the time, and synthesizes a base rule tree Tree_{Base}.
[0049] Each anchor drug {A_1,A_2,A_3} has a rule tree (e.g., a rule tree containing indication rules, contraindication rules, medication rules, approval rules, etc.). The three rule trees are aligned, that is, rule nodes with the same meaning are matched. Then, voting pruning is performed to retain only the nodes that appear in ≥2 trees, that is, only the general rules that each anchor drug agrees on are retained. Finally, a general, robust, and consensus-based rule tree is obtained, which is the base rule tree Tree_{Base}.
[0050] S232 Based on the characteristics of the instruction manual, the feature vectors of the instruction manuals of the three anchor drugs are averaged to generate a baseline feature vector Spec_{Base}.
[0051] Each anchor drug has an instruction manual text, which contains structured features (e.g., usage, dosage, adverse reactions, pharmacological effects, etc.). The feature vectors of the instruction manuals for anchor drugs {A_1, A_2, A_3} are averaged to obtain an averaged, representative instruction manual feature vector, namely the baseline feature vector Spec_{Base}.
[0052] For example, the feature vector of the instruction manual can be obtained by extracting semantic vectors through an NLP model (Natural Language Processing).
[0053] The drug review rule construction method provided in this application uses several most similar known old drugs (anchor drugs) to construct a virtual benchmark that does not exist in the real world but has statistical representativeness from the two perspectives of [review rules] and [instruction manual characteristics], respectively, by calculating the intersection of the rule set and the union of the instruction manual set, as the origin of the difference calculation; thus solving the overfitting risk caused by a single anchor point.
[0054] S300 identifies the difference between the feature vector Spec_{New} of the new drug instruction manual and the baseline feature vector Spec_{Base}, and obtains the semantic difference operator.
[0055] The semantic difference operator contains a set of structured editing operator sequences, obtained through a Siamese difference network. The new drug instruction manual feature vector Spec_{New} and the baseline feature vector Spec_{Base} are input into the Siamese difference network, and a set of structured editing operator sequences, rather than natural language text, are output.
[0056] An example of editing operator sequences is as follows:
[0057] JSON[
[0058] {"op": "UPDATE", "target": "ICU_WeightGT50_Dosage", "value_old": "10mg", "value_new": "5mg"}
[0059] {"op": "UPDATE", "target": "dosage_limit", "value_old": "10mg", "value_new": "5mg", "reason": "semantic_diff_high"},
[0060] {"op": "DELETE", "target": "pregnancy_contraindication", "reason": "explicit_safety_statement"}].
[0061] For example, see Figure 1 The Siamese Differential Network comprises two subnetworks sharing weights (Siamese Branch 1 and Siamese Branch 2, sharing an encoder). The inputs to the two subnetworks are the new drug instruction manual feature vector Spec_{New} and the baseline feature vector Spec_{Base}, respectively. The outputs of the two subnetworks are processed by a difference module to calculate the vector difference. The difference module performs preset vector subtraction, concatenation, attention mechanisms, or distance metrics to capture the difference between the two. For example, vector subtraction is performed first, followed by a cross-attention mechanism to dynamically align the positions, thereby obtaining the difference vector, which contains information about all editing operations. The difference vector is input to the sequence encoder, which outputs a sequence of editing operators. For example, the sequence encoder may employ an autoregressive decoder.
[0062] For example, the training process of a Siamese difference network is as follows:
[0063] S310 constructs training and validation datasets. Each dataset contains a triplet: a new drug instruction manual feature vector Spec_{New}, a baseline feature vector Spec_{Base}, and a sequence of standard editing operators. Data sources include historical versions of the same drug's instruction manual downloaded from a drug regulatory database, with manual or semi-automatic annotation.
[0064] S320 initialization: Load the weights of the pre-trained language model (such as BERT) to initialize the Siamese branch encoder, and randomly initialize the decoder.
[0065] The S330 forward propagation takes a batch of (Spec_{Base},Spec_{New}) data into the network and outputs a sequence of predicted edit operators.
[0066] S340 loss calculation compares the predicted edit operator sequence with the manually labeled standard edit operator sequence to calculate the total loss (operation type loss + target field loss + value matching loss + sequence loss).
[0067] S350 backpropagation updates network parameters and reduces loss through gradient descent (such as the AdamW optimizer).
[0068] S360 Iteration: Repeat the forward propagation-loss calculation-backpropagation process until the loss no longer decreases (model convergence).
[0069] S370 Validation and Tuning: Test the accuracy of the edit operator sequence output by the model using the validation set (such as "operation type prediction accuracy" and "target field matching rate"), and adjust hyperparameters (such as learning rate and batch size).
[0070] It is understandable that Siamese difference networks belong to existing neural networks. This application does not improve the structure of Siamese difference networks, but only trains the Siamese difference network specifically to generate editing operator sequences based on the difference between the feature vector Spec_{New} of the new drug instruction manual and the baseline feature vector Spec_{Base}.
[0071] S400 uses local mutation and implicit locking based on Abstract Syntax Tree (AST) to map the base rule tree Tree_{Base} to AST, and uses semantic difference operators to mutate the AST while maintaining a locking mechanism during the mutation process.
[0072] S410 Mapping: Parse the baseline rule tree Tree_{Base} obtained in step S231 into an abstract syntax tree (AST).
[0073] The rules and logic are transformed into a tree-like data structure. The mapping process ignores irrelevant details such as spaces and comments, and only retains the logical structure, turning the structured text rules into a network of nodes that can be accurately located by computers.
[0074] For example, rules
[0075] [IF Department == 'ICU' THEN
[0076] IF Weight > 50kg THEN Dosage = 10mg
[0077] ELSE Dosage = 5mg
[0078] IF Department != 'ICU' THEN BLOCK]
[0079] Parsed as an AST:
[0080] [Root: RULE
[0081] Branch 1: IF Dept == 'ICU'
[0082] Sub-Branch 1.1: IF Weight > 50 -> Node A (Dosage = 10mg)
[0083] Sub-Branch 1.2: ELSE -> Node B (Dosage = 5mg)
[0084] Branch 2: ELSE (Department != 'ICU') -> Node C (BLOCK)].
[0085] S420 performs mutation: Iterates through the sequence of edit operators and performs modifications (Update / Delete / Insert) only on nodes that are hit in the Abstract Syntax Tree (AST).
[0086] For the edit operator sequence obtained in step S300 (e.g., {"op": "UPDATE", "target": "ICU_WeightGT50_Dosage", "value_old": "10mg", "value_new": "5mg"}), the edit operator sequence is traversed to find the corresponding node in the Abstract Syntax Tree (AST). Modification (Update / Delete / Insert) is only performed when the target of the edit operator sequence exactly matches a node in the AST (e.g., Node A). This restricts the modification to the matched node and its direct child nodes, preventing it from affecting other parts of the AST. For example, for Node A, Dosage = 10mg is updated to Dosage = 5mg.
[0087] Locking Mechanism: For other branches existing in the Abstract Syntax Tree (AST) (e.g., IF Department != 'ICU' THEN BLOCK), since no differential operator for "Department" was generated in step S300, that branch remains frozen. This allows the new drug review rules to automatically inherit the original implicit rule of ICU restrictions.
[0088] In this application, an original structured locking mechanism for implicit logic is provided, which creatively utilizes the topological structure of the Abstract Syntax Tree (AST) as the carrier of implicit rules, thereby freezing and preserving rule nodes that have not been triggered by differential signals at the method level.
[0089] S500 rule reconstruction and backtracking verification decompiles the mutated Abstract Syntax Tree (AST) into an executable rule script (such as Drools / SQL), which, after running, yields the review rules for the new drug; at the same time, it generates a visual report, highlighting which logic is inherited (Locked) and which logic is modified according to the instruction manual (Mutated).
[0090] The decompilation process is the process of piecing together text according to syntax. By traversing the tree structure of the Abstract Syntax Tree (AST), the nodes are restored to the syntax format of Drools / SQL.
[0091] For Drools scripts:
[0092] Starting from the root node of the AST, first concatenate the rule header, then traverse the child nodes;
[0093] When you encounter a condition node (When), append the when keyword, followed by the specific condition.
[0094] When an action node (Then) is encountered, the then keyword is appended, followed by the specific action;
[0095] Finally, use the "end" command to conclude the sequence.
[0096] For SQL statements, the concatenation logic is the same as Drools, only the concatenation syntax is different. For example, the condition nodes in the AST correspond to the WHERE clause in SQL, and the action nodes correspond to keywords such as SELECT / UPDATE, which are finally concatenated into a complete, executable SQL statement.
[0097] The visualization report uses a visual presentation to display the script content, distinguishing between two logic types using different styles: Locked (inherited) is marked with a gray background and black text; Mutated (modified) is marked with a yellow background and red text, etc. The visualization report also includes statistical information (such as the fact that one rule was adjusted and four rules were inherited in this new drug review), making it convenient for experts and technical personnel to view the changes.
[0098] It is understood that the drug review rule construction method based on semantic differential driving and implicit logic locking provided in the embodiments of this application relies on a computer program to allocate or instruct corresponding hardware such as storage devices and processors to complete all or part of the process. After reading and understanding all or part of the process of the medical record generation method provided in the embodiments of this application, those skilled in the art can easily implement it through a computer program. There are no technical obstacles for those skilled in the art and no creative effort is required.
[0099] In another embodiment, this application also provides a drug review rule construction system, including a processor and a memory. The memory stores a computer program, which is loaded and executed by the processor to implement the aforementioned drug review rule construction method based on semantic difference driving and implicit logic locking.
[0100] The above description is merely a preferred embodiment of this application and does not constitute any limitation on this application in any form or substance. It should be noted that those skilled in the art can make several improvements and additions without departing from this application, and these improvements and additions should also be considered within the scope of protection of this application. Any modifications, alterations, and equivalent variations made by those skilled in the art based on the disclosed technical content without departing from the content and scope of this application are equivalent embodiments of this application. Furthermore, any equivalent changes, alterations, and variations made to the above embodiments based on the essential technology of this application still fall within the scope of the technical solution of this application.
Claims
1. A method for constructing drug review rules based on semantic difference-driven and implicit logic locking, characterized in that, Including the following steps: S100 establishes a homogeneity metric space based on the similarity of drug review rules, so that: after drug features are transformed into metric vectors, in the metric space, the metric vectors of drugs with similar review rules are closer together; For new drugs, S200 retrieves the most closely related anchor drugs in the metric space, performs multi-anchor fusion based on the multiple anchor drugs, and constructs a virtual benchmark, including: a benchmark rule tree Tree_{Base} and a benchmark feature vector Spec_{Base}. S300 identifies the difference between the feature vector Spec_{New} of the new drug instruction manual and the baseline feature vector Spec_{Base} to obtain the semantic difference operator; S400 maps the base rule tree Tree_{Base} to an abstract syntax tree (AST) and uses semantic difference operators to mutate the AST. S500 decompiles the mutated Abstract Syntax Tree (AST) into an executable rule script to obtain the review rules for new drugs.
2. The method for constructing drug review rules based on semantic difference driving and implicit logic locking according to claim 1, characterized in that, In step S100, the conversion of drug features into metric vectors is performed by a Siamese neural network. The input of the Siamese neural network is the drug features, and the output is a metric vector in a homogeneous metric space. The metric space contains the metric vectors corresponding to all drugs with existing review rules.
3. The method for constructing drug review rules based on semantic difference driving and implicit logic locking according to claim 2, characterized in that, The training process of the twin neural network includes: S110 Data Preparation: Construct triplet samples <Drug A, Drug B, Label> for drugs with existing review rules. If the logical Jaccard similarity between the review rules of Drug A and Drug B is greater than 0.8, the label is Positive; otherwise, it is Negative. S120 Model Training: The Siamese neural network consists of two sub-networks sharing weights. Based on the triple <drug A, drug B, label> obtained in step S110, the two drug features are input into the two sub-networks respectively, and two fixed-length vectors are output. If the label is a positive sample, the sub-network parameters are adjusted to shorten the vector distance between drug A and drug B; if the label is a negative sample, the sub-network parameters are adjusted to widen the vector distance between drug A and drug B. After training, the Siamese neural network maps drugs with similar rules to closer positions in the metric space.
4. The method for constructing drug review rules based on semantic difference driving and implicit logic locking according to claim 1, characterized in that, Step S200 includes: S210 Obtain new drug characteristics F_{new}; S220 retrieves the three nearest anchor point drugs {A_1,A_2,A_3} in the metric space; S230 constructs a virtual benchmark, synthesizing a virtual, average, and representative benchmark drug from the perspectives of [review rules] and [instruction manual characteristics], to serve as a reference for new drugs: S231 aligns and prunes the rule trees of the three anchor drugs according to the review rules, retains logical nodes that appear more than 2 / 3 of the time, and synthesizes a base rule tree Tree_{Base}. S232 Based on the characteristics of the instruction manual, the feature vectors of the instruction manuals of the three anchor drugs are averaged to generate a baseline feature vector Spec_{Base}.
5. The method for constructing drug review rules based on semantic difference driving and implicit logic locking according to claim 4, characterized in that, The feature vector of the instruction manual is obtained by extracting semantic vectors using an NLP model.
6. The method for constructing drug review rules based on semantic difference driving and implicit logic locking according to claim 1, characterized in that, In step S300, the semantic difference operator is set as a structured editing operator sequence, which is obtained through a Siamese difference network. The input of the Siamese difference network is the new drug instruction manual feature vector Spec_{New} and the baseline feature vector Spec_{Base}, and the output is the structured editing operator sequence.
7. The method for constructing drug review rules based on semantic difference driving and implicit logic locking according to claim 6, characterized in that, The twin difference network includes two sub-networks with shared weights. The inputs of the two sub-networks are the new drug instruction manual feature vector Spec_{New} and the baseline feature vector Spec_{Base}, respectively. The outputs of the two sub-networks are processed by the difference module to obtain the difference vector. The difference vector is then input into the sequence encoder to obtain the edit operator sequence.
8. The method for constructing drug review rules based on semantic difference driving and implicit logic locking according to claim 6, characterized in that, Step S400 includes: S410 Mapping: Parses the base rule tree Tree_{Base} into an abstract syntax tree (AST), retaining only the logical structure, and transforming the structured text rules into a network of nodes that can be precisely located by a computer; S420 performs mutation: Iterates through the sequence of editing operators and only modifies the nodes that are hit in the Abstract Syntax Tree (AST); a locking mechanism is used during the mutation process: other branches existing in the AST are kept frozen, so that the new drug review rules automatically inherit the original implicit rules.
9. The method for constructing drug review rules based on semantic difference driving and implicit logic locking according to claim 1, characterized in that, Step S500 also includes: generating a visualization report that highlights and distinguishes between inherited logic and logic modified according to the specification.
10. A drug review rule construction system, characterized in that, It includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program to implement the drug review rule construction method based on semantic difference driving and implicit logic locking as described in any one of claims 1-9.