A method for designing biochemical experiments based on artificial intelligence and a human-computer interaction system
By constructing a database and knowledge map of compounds and biological macromolecules, combining ComplEx algorithm and user feedback optimization experimental design, the complexity and noise impact problems in biochemical experimental design are solved, and efficient and personalized experimental solution generation is achieved.
Patent Information
- Application Number
- CN202411164244.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2044-08-23
AI Technical Summary
There are complex operational and interdisciplinary fusion problems in biochemical experimental design, and the lack of consistency and standardization of scientific literature, resulting in complex experimental design, repeated attempts and waste of resources. The results of artificial intelligence analysis are susceptible to noise and errors, resulting in incorrect design.
A database based on compounds and biological macromolecules is constructed, and experimental design is optimized using knowledge graphs and ComplEx algorithms, combined with user feedback and historical data to optimize experimental plans, and reinforcement learning and semantic understanding technologies are used to improve the accuracy of intention recognition.
It improves the efficiency and quality of biochemical experimental design, generates scientific and personalized experimental methods, and reduces the possibility of resource waste and incorrect design.
Smart Images

Figure CN119127986B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of information data processing, and in particular relates to a method for designing biochemical experiments based on artificial intelligence and a human-computer interaction system. Background Art
[0002] Biological and chemical experiments are crucial for advancing scientific progress. Especially in emerging fields such as molecular biology and chemical biology, the quality of experimental design is directly related to the success of research. With the rapid advancement of science and technology, researchers need to conduct carefully designed experiments to deeply explore life processes, uncover underlying biological mechanisms, and discover new biomarkers and drug targets. However, the design and implementation of these experiments face numerous challenges.
[0003] During the experimental process, researchers often struggle to cope with complex operations, interdisciplinary integration, rapid technological iteration, and diverse terminology and standards. The lack of consistency and standardization in scientific literature further complicates experimental design, leading to the common practice of repeated attempts and failures. This situation not only wastes precious time and resources, but also hinders scientific research progress and increases the difficulty and cost of exploring new areas.
[0004] In recent years, with the rapid development of artificial intelligence, it is gradually penetrating into all aspects of biochemical experiment design, which can help improve efficiency, optimize experimental plans, promote innovation, and show huge application potential.
[0005] Although AI has made some progress in biochemical experimental design, it is still in its early stages and requires further technical maturity. Furthermore, AI in biochemical experimental design is highly dependent on data quality. If the input data contains noise, errors, or flaws, the AI analysis results will be affected, potentially leading to incorrect experimental designs.
[0006] Therefore, although the development prospects of artificial intelligence in biochemical experiment design are broad, there are also many problems and challenges that need to be solved urgently. Summary of the Invention
[0007] The purpose of the present invention is to provide a human-computer interaction system for designing biochemical experiments based on artificial intelligence.
[0008] To achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is: a method for designing biological and chemical experiments, comprising the following steps:
[0009] S1. Build a database; specifically include:
[0010] (1-1) Basic data collection and organization: With compounds and biomacromolecules as the core, and the transformation relationship between compounds and / or biomacromolecules as the connection, a database is constructed;
[0011] (1-2) Basic data verification and supplement;
[0012] (1-3) Construct the data in the database into a knowledge graph, create nodes and edges, each node represents an entity (knowledge point), and each edge represents the relationship between nodes;
[0013] S2: User inputs a command, identifies user intent, and outputs a preliminary solution; specifically, it includes:
[0014] (2-1) Delete the emotional and personal descriptions in the instructions, perform semantic understanding on the remaining instructions after deletion, retrieve the closest matching results from the database built in S1, and generate an experimental process, named Plan A;
[0015] (2-2) Perform semantic understanding on the remaining content of the instruction after removing the emotional connotation and personal inclination, conduct an online search, and retrieve the result with the highest matching degree from the search results with similar time, to obtain Plan B; match Plan A and Plan B, mark and analyze the differences between the two plans, and determine the frequency of occurrence of the difference content. If the frequency of occurrence of the difference is greater than a set value, replace the corresponding content in Plan A with the difference content; otherwise, retain the difference content in Plan A; after the comparison and replacement are completed, generate Plan C;
[0016] (2-3) Combine the database and complEx algorithm to adjust the experimental steps and parameters of plan C to generate plan D;
[0017] (2-4) Identify the emotional and personal descriptions in the instructions and understand the user's personalized needs for the solution; match and optimize Solution D with the personalized needs to obtain Solution E and output it;
[0018] S3. Prompt the user to provide feedback on Solution E. If the user refuses to provide feedback or does not provide feedback, the user's instructions and data are recorded, and Solution E is used as the final output solution.
[0019] If there is user feedback, optimize the solution based on the user feedback and output the solution again.
[0020] Preferably, in step (1-1), when collecting and arranging basic data, first retrieve and obtain disclosed compounds and biological macromolecules. For organic compounds, retrieve and obtain the group change process from the existing technology. According to the directionality of the chemical reaction, infer all organic substances with the group by vector mapping, and further obtain the data information of all the group change processes corresponding to this type of organic substances. For inorganic compounds, retrieve and obtain the covalent bond change process. By vector mapping, obtain all inorganic compounds with the covalent bond, and further obtain the data information of all such reactions corresponding to this type of compound. For biological macromolecules, respectively retrieve the physical changes, chemical changes and biological change processes of the biological macromolecules. After retrieving a certain type of change process of a certain type of substance, obtain the data of all possible changes of the biological macromolecules disclosed in the existing technology by vector mapping.
[0021] Preferably, step S1 also includes steps (1-4) of knowledge graph optimization, specifically including:
[0022] (1-4-1) Establish a relationship model:
[0023] Collect triples of entities and relationships to form the basis of the knowledge graph and input them into the ComplEx model. The model generates complex vector representations for each entity and relationship. The complex vector representations help the model capture the complex relationship characteristics between entities.
[0024] Use known relationships as positive samples and simulate positive samples to generate non-existent relationships as negative samples to train the model and obtain a preliminary relationship model;
[0025] Verify the obtained relationship model, compare the potential relationships generated by the model simulation positive samples with the known relationships in the validation dataset, and remove the relationships that are not in the validation dataset;
[0026] (1-4-2) Expand the knowledge graph by filling in attributes:
[0027] Through the ComplEx embedding method, knowledge points and their relevance are embedded into the same vector space. The geometric distance and direction between vectors reflect the relationship between knowledge points, thereby calculating and predicting knowledge points and their potential relevance.
[0028] By using neural network methods, the scores of potential knowledge points and relationships are calculated, thereby predicting knowledge points and relationships that may exist but have not been recorded;
[0029] Through online documents and other external data, use named entity recognition technology to identify entities (knowledge points) in online documents and other external data;
[0030] Use contextual embedding models to calculate the semantic similarity between entities identified in online documents and other external data and existing knowledge points in the knowledge graph;
[0031] The cosine similarity method is used to calculate the similarity between entities identified in online documents and other external data and existing knowledge points in the knowledge graph. If the similarity is higher than the set value, it will be integrated into the knowledge graph. The cosine similarity calculation formula is as follows:
[0032]
[0033] Among them: A i and B i Represents the i-th dimension of vectors A and B respectively, n is the total dimension of the vector, w i is the weight of the i-th dimension, α ranges from 0.1 to 3.0, and Texis(A,B) is the semantic similarity calculated using the context embedding model.
[0034] Preferably, step S1 further includes model training of steps (1-5), using the knowledge graph optimized in step (1-4) to train the relationship model constructed in step (1-4), specifically including:
[0035] (1-5-1) Based on the text understanding task in the literature, a long short-term memory network is used to take the embedding vector in the knowledge graph as part of the input layer, and then concatenate it with the text features as the input of the model;
[0036] (1-5-2) During the training process, the back propagation algorithm Adam optimizer is used to adjust the weight and bias parameters of the model, and the dynamic learning rate α t In the embedded model, the learning rate α t formula:
[0037]
[0038] Where: α max and α min are the maximum and minimum learning rates, t is the current step number, T is the total number of adjustment steps, L i is the loss of the i-th validation, L min and L max are the minimum and maximum values of the loss, N is the number of recent validations, and γ is the parameter that controls the polynomial decay;
[0039] (1-5-3) After training is completed, the performance of the model is evaluated using the confusion matrix, and the calculated indicators include accuracy, recall, F1 score, and AUC. For models that do not meet the standards, by analyzing the model's indicator parameters, backtracking to the model training steps, adjusting γ and T in the learning rate formula, repeating the model training and performance evaluation steps to retrain the model and obtain a model that meets the standards.
[0040] Preferably, step S2 further includes step (2-0), establishing a reinforcement learning method for action recognition to perform semantic understanding of instructions, and the establishment method includes:
[0041] (2-0-1) Match the user instruction with the content in the database constructed in step S1, and retrieve the result with the highest matching degree as the original solution;
[0042] (2-0-2) Based on semantic extraction technology, the entire experimental process of the original plan is decomposed into steps or stages;
[0043] (2-0-3) Feature extraction and clustering of high-dimensional state and action data for each step or stage to form a simplified abstract space;
[0044] (2-0-4) In the abstract space formed in step (2-0-3), set each step as a sub-strategy, train the sub-strategy for each step separately, and use the DQN algorithm for training calculations;
[0045] (2-0-5) While training the sub-strategies, train the high-level strategy to select and manage the execution order of each sub-strategy, and use the policy gradient algorithm to train to obtain a more efficient execution order simulation list;
[0046] (2-0-6) Integrate sub-strategies and high-level strategies for overall testing and optimization.
[0047] Preferably, the method of adjusting the experimental steps and parameters of Scheme C to generate Scheme D in step (2-3) includes:
[0048] (2-3-1) Obtain historical data and knowledge about the experiment to be designed from the database constructed in step S1, clean up redundant information in the data through statement comparison technology, and format the data into a unified standard;
[0049] (2-3-2) Use the ComplEx algorithm to extract the potential relationship features between the experimental objects and methods from the data obtained in step (2-3-1), and use the ComplEx training relationship data to learn the complex relationship between experimental conditions and results; the ComplEx algorithm formula used is:
[0050] f(s,r,t)=Re(<es+ws·φ(t),er+wr·Φ(t)> )
[0051] Among them, s is the subject, r is the relationship, t is the timestamp,
[0052] The timing ComplEx (TComplEx) scoring function is defined as follows:
[0053] f(s,r,t)=Re(<es(t),er(t)> )
[0054] is a time-dependent complex vector; <·,·,·> represents a trilinear product; Re(·) represents the real part,
[0055] The above function is defined by the following formula:
[0056] es(t)=es+ws·Φ(t); er(t)=er+wr·Φ(t)
[0057] is a static complex vector embedding; is the time weight vector, Φ(t) is the time encoding function, φ(t) = [sin(ωt), cos(ωt), sin(2ωt), cos(2ωt), ..., sin(kωt), cos(kωt)], where ω is the frequency parameter and k is the encoding dimension;
[0058] (2-3-3) Based on the prediction results of the ComplEx model, identify the experimental steps and parameters that can be improved in Plan C, and generate Plan D by combining the best practices in the database and the optimization suggestions of the model.
[0059] Preferably, in step S3, the step of optimizing the solution based on user feedback includes:
[0060] Use the large language model to analyze user feedback, identify the content that needs to be modified in Plan E, collect and record users' historical instructions and historical feedback data, and adjust Plan E based on the database and user historical data; analyze user historical data through the centralized function S,
[0061]
[0062] Among them, x i and x j Indicates different eigenvalues, c i and c j Represents feature x i and x j The corresponding context information, w ij (c i ,c j ) represents the context-aware weight,
[0063] Calculate feature x i and x j , in the given context c i and c j The attention scores in are then normalized by the softmax function:
[0064]
[0065] Among them, f(c i ,c j ) is the similarity measure of the context feature vector, d k is the scaling factor.
[0066] Accordingly, a computer device / equipment / system includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any one of the methods.
[0067] Accordingly, a computer-readable storage medium stores a computer program / instruction thereon, which implements the steps of the method when the computer program / instruction is executed by a processor.
[0068] Accordingly, a computer program product comprises a computer program / instructions, which implement the steps of the method when executed by a processor.
[0069] The present invention has the following beneficial effects: It provides a novel human-computer interaction system for designing biochemical experiments using artificial intelligence. In database construction, basic data is constructed using the fundamental laws of biochemical substance change, improving data integrity and reliability. Method optimization is performed in knowledge graph design, increasing the density of the knowledge graph and thereby improving the efficiency and quality of human-computer interaction. A specialized algorithm is also designed to improve the accuracy of user intent recognition. The generated experimental method is optimized based on user feedback and historical data, ultimately resulting in a scientifically designed and highly personalized experimental method. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 It is a schematic diagram of the operation process of the present invention;
[0071] Figure 2 A schematic diagram of the process of constructing a database for the present invention;
[0072] Figure 3 A schematic diagram of the process flow for generating a solution for the present invention. DETAILED DESCRIPTION
[0073] The present invention provides a human-computer interaction system that can output specific biological and chemical experimental processes according to user instructions. The overall process is as follows Figure 1As shown, the specific steps include:
[0074] S1. Database construction. The purpose of this step is to build a database containing known chemicals and biological macromolecules, as well as the mutual transformation relationships between them, and further build a knowledge graph based on the database as the underlying computing data source for human-computer interaction. The process of database construction is as follows: Figure 2 As shown, the following steps are included:
[0075] (1-1) Basic data collection and organization.
[0076] A molecular database is constructed with compounds and biomacromolecules at its core, and the transformation relationships between compounds and / or biomacromolecules as its connection. Specific data sources include: collecting all publicly available and searchable compounds and biomacromolecules from publicly available prior art (academic journals, textbooks, research papers, and patents). MySQL can be used as a database. It should be noted that the term "all" in this invention refers to all substances and corresponding reactions that can be obtained based on public literature, vector mapping, and logical reasoning, and does not imply the availability of all objectively existing substances and reactions.
[0077] The following basic principles are generally recognized in the field of chemistry: (1) The essence of compound reactions is the breaking and forming of chemical bonds; (2) The transformation between organic compounds is mainly manifested in changes in groups (functional groups); (3) The transformation between inorganic compounds is mainly manifested in changes in covalent bonds.
[0078] Based on the above principles, for organic compounds, we retrieve the change process of a certain type of group from the existing technology (for example, the reaction of -OH and -COOH to form ester), and then, based on the directionality of the chemical reaction, we infer all organic compounds with this group through vector mapping, and further obtain the data information of all reactions of this type corresponding to this type of organic compound. Similarly, for inorganic compounds, we retrieve the change process of a certain type of covalent bond (for example, H + and OH - An acid-base reaction occurs, and in the generated H2O, a covalent bond is formed between the H atom and the O atom). Then, through vector mapping, all inorganic compounds with this covalent bond are obtained, and further data information on all reactions of this type corresponding to such compounds is obtained. In this way, data on all possible reactions of all compounds disclosed in the prior art are obtained and included in the database. The chemical reaction data included in the database can optionally include: reaction ID (a unique number for easy retrieval), reactants and products, reaction conditions, reaction type, reaction energetics (endothermic, exothermic, activation energy change, etc.), reaction path, and references.
[0079] For biomacromolecules, with polysaccharides (starch, cellulose, etc.), proteins and nucleic acids (DNA and RNA) as the core, the physical changes, chemical changes and biological change processes that may occur in these biomacromolecules are retrieved and summarized respectively. After retrieving a certain type of change process of a certain type of substance, the data information of all such changes of this type of biomacromolecule is obtained through vector mapping. In this way, the data of all possible changes of biomacromolecules that have been disclosed in the prior art are obtained and included in the database. The biological reaction data included in the database can optionally include: reaction ID, enzyme / catalyst, substrate and product, reaction conditions, metabolic pathway, organism information, and references.
[0080] (1-2) Data cleaning: basic data verification and supplementation.
[0081] In this step, the data collected in step (1-1) will be verified, increased or decreased to avoid further amplification of errors in the basic data during the subsequent construction of the knowledge graph, which would cause obvious errors in the calculation basis of human-computer interaction.
[0082] (1-2-1) Use existing technology to verify, add missing data, and delete data that is not available with existing technology.
[0083] The changes / reactions that can theoretically occur in compounds and biomacromolecules are affected by many other factors and may not necessarily occur in reality. At the same time, in addition to the data obtained in step (1-1), there may be individual special reactions. Therefore, in order to improve the accuracy and completeness of the data in the database, natural language processing tools such as SciBERT are used to extract information on chemical reactions and biological reactions from existing scientific literature, patents, and databases (such as PubChem, ChEBI, KEGG, Reactome, etc.). The information from public sources is compared with the information collected in step (1-1), and reaction data that are not disclosed in the prior art are deleted. At the same time, the reaction data missing from the database established in step (1-1) are supplemented from the prior art.
[0084] (1-2-2) Use existing technologies to verify, delete, and merge duplicate data.
[0085] Then, based on the public information on the Internet and the public information of existing technologies, the data in the database is compared one by one, and duplicate data is deleted and merged. The operations of deleting and merging duplicate data include:
[0086] (1-2-2-1) For the same reaction of the same substance, two or more sets of data may exist due to slight variations in descriptions in different literature or simultaneous searches and collection of data for both compounds and biomacromolecules. For these data sets, only the set with the most publicly available information is retained, and the remaining data is deleted. For example, chitosan may have been classified and searched separately as an organic compound and a biomacromolecule, resulting in separate reaction data, leading to data duplication.
[0087] (1-2-2-2) For different names and expressions of the same substance, we searched and collected data separately. For example, chitobiose and (1,4)-2-amino-2-deoxy-β-D-glucose. For this type of duplicate data, if common knowledge (such as textbooks and reference books) clearly states that they are the same substance, they will be directly merged and deleted in the database. The specific method is: retain the terms and expressions that appear more frequently in the existing technology, and use different terms for the same substance as notes for the data. If there is no common knowledge that clearly states that different terms are the same substance, all these data will be retained.
[0088] When performing steps (1-2-2-1) and (1-2-2-2) to delete and merge redundant data, multiple groups of identical data are compared between groups, and the difference information between the groups of data is extracted, and the difference information is used as the annotation information of the retained data.
[0089] (1-3) Build a knowledge graph.
[0090] In order to improve the efficiency and quality of human-computer interaction, the database obtained in steps (1-2) is constructed into a knowledge graph. The main advantages include: the knowledge graph organizes information in the form of entities and relationships, making it easier for computers to understand and process complex knowledge structures; based on the graph structure, the system can perform logical reasoning, discover implicit relationships and knowledge, and complete more complex problems in human-computer interaction; by constructing a user knowledge graph, the system can provide a more personalized interactive experience, which is conducive to meeting different user needs.
[0091] Neo4j can be used to construct the reaction data in the database into a knowledge graph. This involves creating nodes and edges and adding attribute information to each node and edge. Each node represents an entity (a compound or biomacromolecule), and each edge represents the relationship between nodes (a chemical or biological reaction), such as the conversion relationship from reactants to products or the sequence of experimental steps. Other information and annotation information about each node in the database (including different names for the same substance, molecular structures, reaction conditions, operating parameters, etc.) are used as attribute information for nodes and edges. A graph database (such as Neo4j) is then used to store and manage the knowledge graph for easy subsequent calls and queries.
[0092] (1-4) Knowledge graph optimization.
[0093] Although the prior art has disclosed a large amount of chemical reaction and biological reaction knowledge, the knowledge graph directly constructed using this knowledge is too sparse and cannot meet the requirements of high-quality and efficient human-computer interaction. In order to solve this problem, the present invention also includes preferred solution steps (1-4) to optimize the knowledge graph. Specifically, it includes: combining relationship prediction and attribute filling, through deep learning and embedding technology, introducing generative adversarial networks to perform entity relationship generation, multi-source data fusion, adaptive weighting mechanism and interactive learning, thereby effectively solving the sparsity problem of the knowledge graph and improving the dynamic adaptability and self-optimization ability of the knowledge graph.
[0094] Embedding models are a technique for mapping discrete objects (such as words, entities, or relationships) into a continuous vector space. In knowledge graphs, embedding models are used to represent entities and relationships in the graph as vectors, capturing the semantic information between them. The ComplEx algorithm is a specialized algorithm for knowledge graph embedding. It uses complex vectors to represent entities and relationships and can better handle asymmetric relationships. Knowledge graph optimization methods specifically include the following steps:
[0095] (1-4-1) Establishment of the Relationship Model
[0096] The complEx algorithm captures the relationships and attributes between entities by training a recurrent neural network. The trained model can capture entities (compounds and biomacromolecules), identify potential relationships (reactions) between knowledge points (entities), and predict previously unseen relationships based on these relationships. The specific steps are as follows:
[0097] (1-4-1-1) Collect triples of entity and relationship data (e.g., entity 1, relationship, entity 2). This data forms the foundation of the knowledge graph. This data is fed into the ComplEx model, which generates complex vector representations for each entity and relationship. These vector representations help the model capture the complex relationships between entities.
[0098] (1-4-1-2) Using the entity and relationship vectors from step (1-4-1-1), we train the model using known relationships as positive samples and generating non-existent relationships as negative samples by simulating positive samples. We obtain a preliminary relationship model.
[0099] (1-4-1-3) Validate the obtained relational model. Introduce additional validation datasets from public databases (such as PubChem, ChEBI, KEGG, etc.) or literature. Use natural language processing tools such as SciBERT to compare the potential relationships generated by the model's simulated positive samples with the known relationships in the validation dataset, and remove relationships that are not in the validation dataset. SciBERT evaluates the authenticity of relationships by using the cosine similarity formula to calculate the similarity between two semantic vectors and output a normalized value ranging from 0 to 1.
[0100] (1-4-1-4) The quality of the model is evaluated by the scoring function. The principle is to calculate the strength of the relationship between entities and relationships based on the complex vectors of entities and relationships. The scoring function is as follows: score(h,r,t)=Re(<h,r,t> ). Where h is the complex vector representation of the entity and relationship, r is the relationship vector, t is the conjugate complex vector of the tail entity vector, and Re represents the real part operation. The scoring function is normalized using the Softmax function so that the sum of all output probabilities is 1. Models with a normalized score greater than a set value, such as greater than 0.85, are considered reasonable relationship prediction models.
[0101] (1-4-2) Expanding the knowledge graph through attribute filling
[0102] The purpose of this step is to fill in the missing knowledge points of entities in the knowledge graph and the correlation between them through reasoning and prediction, making the knowledge graph denser and improving the efficiency and quality of human-computer interaction. Specific methods include:
[0103] (1-4-2-1) Through the ComplEx embedding method, knowledge points and their associations are embedded into the same vector space. The geometric distance and direction between vectors reflect the relationship between knowledge points, thereby calculating and predicting knowledge points and their potential associations.
[0104] (1-4-2-2) Using a neural network approach, we calculate the scores of potential knowledge points and relationships, thereby predicting potential but undocumented knowledge points and relationships. This step uses metrics such as cosine similarity to calculate scores and assess the strength of potential relationships between knowledge points. Relationships with a cosine similarity above a set value, such as 0.75, are selected as potential relationships to be supplemented.
[0105] (1-4-2-3) To enrich the knowledge graph, named entity recognition (NER) technology is used to identify entities in text using online literature and other external data. Using tools such as BioBERT, the identified entities are classified into different types of knowledge points, such as inorganic matter, organic matter, protein, enzyme, fat, and cellulose. Accurate entity classification facilitates more precise relationship extraction and verification.
[0106] (1-4-2-4) SpaCy’s dependency parsing module allows us to determine which knowledge points are subjects, objects, or modifiers, as well as the logical or functional relationships between them. These relationships help us more comprehensively understand and represent the interactions between knowledge points.
[0107] (1-4-2-5) Use a context-sensitive model (such as BERT) to perform a similarity calculation method. By using the cosine similarity method, the knowledge points identified from the text are matched with the existing knowledge points in the knowledge graph. If the similarity is higher than a set value, such as 0.75, it will be incorporated into the knowledge graph. The preferred solution is to improve the cosine similarity calculation formula by introducing weights, such as introducing w i As the weight of the i-th dimension, it can better reflect the importance of different features and avoid the excessive influence of some unimportant features on the similarity; combined with context-related models, such as introducing the balance coefficient α, it can better capture complex semantic information, especially in sentences or short texts. This method can improve the perception of semantic similarity; using a combination of multiple word vector models, such as introducing BERT (A, B), using BERT to calculate the semantic similarity score of the context, capturing semantic information at different levels, and thus more comprehensively evaluating the cosine similarity.
[0108] The improved cosine similarity calculation formula is as follows:
[0109]
[0110] Among them: A i and B i w represents the i-th dimension of vector A and B respectively, and n is the total dimension of the vector. i is the weight of the i-th dimension, which can be set based on the number of knowledge points and reflects the importance of that dimension to similarity. α is an adjustment coefficient used to balance the impact between traditional cosine similarity and contextual similarity, with a value range of 0.1-3.0, preferably 1.2-2.0. Texis(A,B) is a semantic similarity score calculated using contextual embeddings (such as BERT) to enhance the ability to capture complex semantic relationships.
[0111] (1-4-2-6) Use tools like Neo4j to manage and store knowledge graph data, structuring the knowledge graph data to ensure it can be quickly accessed and queried during human-computer interaction. Track changes and updates to the knowledge graph through version control and logging for auditing and tracking purposes. Repeat this process regularly to continuously extract and update the knowledge graph from new text data, maintaining its dynamism and timeliness, thereby continuously enhancing the comprehensiveness and accuracy of the knowledge graph.
[0112] (1-5) Model training. Utilize the (preferably optimized) complEx algorithm and knowledge graph to train the AI model so that it can accurately understand and apply the information in the knowledge base to improve the intelligence level of the system. Training methods include:
[0113] (1-5-1) Based on the text comprehension task in the literature, a long short-term memory network (LSTM) was used. The embedding vectors in the knowledge graph were used as part of the input layer and concatenated with the text features as the input of the model. This combination effectively integrates the text information and the background knowledge in the knowledge graph, enhancing the model's semantic understanding capabilities.
[0114] (1-5-2) During the training process, the back propagation algorithm Adam optimizer is used to adjust the weight and bias parameters of the model. In order to improve the quality of the model, the dynamic learning rate α t Embedded in the model, it is used to help the model more accurately capture the complex patterns between entities and relationships, thereby building a high-quality knowledge graph. Learning rate α t Adaptive cosine annealing formula:
[0115]
[0116] Where: α t is the learning rate. max and α min are the maximum and minimum learning rates (α max Preferably 0.001, α min Preferably 0.00001). t is the current step number, T is the total number of adjustment steps. i is the loss (or other performance indicator) of the i-th validation, L min and L max are the minimum and maximum values of the loss, respectively. N is the number of recent validations, which can be set as needed, preferably 100-150. γ is the parameter that controls the polynomial decay (preferably 0.85). Continuously iterate until the loss function changes by less than 5%, then stop iterating.
[0117] The new training mechanism has the following advantages: (a) When the loss is large, the learning rate is increased to accelerate convergence; when the loss is small, the learning rate is reduced to stabilize training. (b) Polynomial decay is introduced to normalize the validation loss and perform a weighted average, with its influence controlled by the parameter γ (γ ranges from 0.5 to 3.0, with 1.9 being preferred). This allows the learning rate to dynamically adapt to different training stages, further optimizing the training process.
[0118] (1-5-3) After training is complete, the model's performance is evaluated using the confusion matrix. Metrics include accuracy, recall, F1 score, and AUC. These metrics provide insights into the model's performance in different areas, helping to identify the quality of the model. Set the values for accuracy, recall, F1 score, and AUC. For example, set accuracy to above 80%, recall and F1 score to above 70%, and AUC to above 70%. For models that do not meet the standards, based on the analysis results, analyze the model's four metrics (accuracy, recall, F1 score, and AUC), go back to the model training steps, adjust γ and T in the dynamic learning rate formula, and repeat the model training and performance evaluation steps to retrain the model. Repeat until a model meets the standards.
[0119] S2, input instructions, intention recognition and preliminary solution generation.
[0120] The user inputs the instruction of designing a certain experimental process into the system. After the system receives the instruction, it recognizes the intention of the user's instruction. The process is as follows Figure 3 As shown, specifically including:
[0121] (2-1) Delete emotional and personal descriptions from the instructions. These descriptions are specifically reflected in the adjectives and adverbs in the instructions. Perform semantic understanding on the remaining instructions after deletion, retrieve the closest matching results from the database, and generate a preliminary experimental process, named Plan A.
[0122] (2-2) After removing the emotional connotation and personal inclination, the remaining content of the instruction is semantically understood, and an online search is performed. The closest matching result is retrieved from the research results with a close time (the time limit for online search can be set in advance or manually set by the user as needed) to obtain Plan B. Plan A and Plan B are matched and compared, and the differences between the two plans are marked. The online search results are analyzed to obtain the frequency of the difference content appearing in the online search documents (for example, if 10 documents are retrieved and the difference content appears in 6 documents at the same time, the frequency is 60%). If the frequency of the difference is greater than the set value, the difference content in the online search results is judged to be correct, and the content is replaced with the corresponding content in Plan A; otherwise, the corresponding content of Plan A is retained. After the comparison and replacement are completed, Plan C is generated.
[0123] Since the states (such as experimental conditions, reactant states) and actions (such as experimental steps, parameter adjustments) involved in biochemical experiments are very large and complex, directly identifying the overall instructions requires exploration and decision-making in a huge space of possibilities, resulting in high computational complexity and slow convergence. Therefore, the preferred solution includes: before performing step (2-1) and / or step (2-2) to identify user instructions, semantic understanding and recognition, it also includes step (2-0) to establish a reinforcement learning method for action recognition to optimize the processing steps of complex tasks and improve semantic and intention recognition capabilities. Specifically including:
[0124] (2-0-1) First, simply match the user instructions with the content in the database, and retrieve the result with the highest matching degree as the original solution.
[0125] (2-0-2) Based on semantic extraction technology, the system breaks down the entire experimental process of the original plan into several steps or stages, such as sample preparation, reaction condition setting, experimental operation, data recording, etc.
[0126] (2-0-3) Feature extraction and clustering are performed on the high-dimensional state and action data for each step to form a simplified abstract space. The high-dimensional state refers to the overall system state at each step of the experimental process, described by multiple variables or features. This is comprehensive information about the experiment at a specific moment; these variables or features may include temperature, pressure, chemical concentration, time point, equipment parameters, etc. Action data refers to the specific actions or decisions taken during the experiment based on the current state; these actions may include adjusting temperature, adjusting pressure, adding reagents, changing equipment settings, etc.
[0127] (2-0-3-1) Feature extraction steps, specifically including:
[0128] Data collection. Collect all data and parameters that occurred during the experiment. This data may include temperature, time, reactant concentrations, stirring speed, instrument settings, etc.
[0129] Data preprocessing: Use filters or smoothing algorithms to remove noise from the data; fill in or delete missing data to ensure data integrity; and normalize data of different dimensions to the same range (such as 0 to 1) to facilitate comparison and analysis.
[0130] Feature extraction methods. Calculate statistics such as mean, variance, standard deviation, maximum, and minimum values; extract the frequency components of the signal through Fourier transform; and use PCA (principal component analysis) to project high-dimensional data into a low-dimensional space.
[0131] (2-0-3-2) Clustering methods, specifically including:
[0132] Select a clustering algorithm. Select the K-means clustering algorithm based on the data characteristics.
[0133] Set parameters. Set the number of clusters K.
[0134] Clustering analysis: Analyze the center point of each cluster to determine the typical characteristics of that type of data; and evaluate the similarity and consistency of the data within the cluster.
[0135] Forming an abstract space. Map the cluster labels in the clustering results to the original data to form a simplified abstract space; train sub-strategies within each cluster and use the DQN algorithm for reinforcement learning.
[0136] (2-0-4) In the abstract space formed in step (2-0-3), each step is set as a sub-strategy, and a sub-strategy is trained for each step. The DQN (Deep Q-Network) algorithm is used for training calculations. Specifically, it includes:
[0137] Each step in the human-computer interaction process is defined as a reinforcement learning environment. The state is the data extracted from the features, and the action is the possible response of the system. A reward function is defined to evaluate the effectiveness of each response. The reward function can be based on indicators such as user satisfaction and task completion. The DQN network structure consists of an input layer, several hidden layers, and an output layer. The input layer receives the state data, and the output layer provides the Q value for each possible response. The hidden layers use nonlinear activation functions to capture the complex state-action relationship.
[0138] Training process: The DQN network's weight parameters are randomly initialized, and the exploration rate and discount factor are set to control the probability of exploring new actions and the weight of future rewards, respectively. After each human-machine interaction, the state, action, reward, and next state are stored in an experience replay buffer. Mini-batches of samples are periodically drawn from this buffer and used to train the DQN network. A target network is used to stabilize the training process. The target network has the same structure as the main network, but its parameters are updated more slowly to prevent oscillations during training.
[0139] (2-0-5) While training the sub-strategies, train a high-level strategy to select and manage the execution order of these sub-strategies, and use the policy gradient algorithm to train to obtain a more efficient execution order simulation list. The method of training the high-level strategy includes the following steps:
[0140] (2-0-5-1) Data Collection and Strategy Execution
[0141] During actual human-computer interaction, the system continuously records detailed information about each interaction. This information includes the current state (such as environmental characteristics, user input, etc.), the selected sub-strategy (such as specific operation steps or decisions), the execution results (such as success or failure, task completion status), and the feedback obtained (such as user satisfaction ratings and system logs). This data can provide realistic interaction scenarios and results, thereby helping high-level strategies learn how to select the optimal sub-strategy in different situations. To improve the representativeness and coverage of the data, data should be collected under as diverse environmental and task conditions as possible. The collected data should include not only normal operating scenarios, but also edge cases and abnormal situations to ensure that the strategy can handle various possible interaction scenarios.
[0142] (2-0-5-2) Policy Gradient Calculation and Parameter Update
[0143] Using the REINFORCE algorithm in the policy gradient method, the effectiveness of the current policy is evaluated by calculating the policy's gradient. After each interaction, the policy's gradient is calculated based on the sub-policies selected by the policy and the rewards obtained. The gradient reflects the direction and magnitude of the expected reward for selecting a particular sub-policy.
[0144] Use gradient ascent to update the weight parameters of the high-level policy network: Define the loss function as the negative cumulative reward (or use another appropriate reward function), and then calculate the gradient using gradient descent / ascent. Adjust the policy network's weight parameters and discount factor to make the policy more likely to choose sub-policies with higher rewards in future interactions. The weight parameter refers to the learning rate, which determines the step size of each update; the discount factor is the weight that affects future rewards.
[0145] Since there is less real data on human-computer interaction and there is a large amount of low-quality data, it is not enough to meet the needs of artificial intelligence learning samples. In order to solve this problem, the preferred solution is to introduce virtual environment simulation and adopt the data enhancement method in DeepMind technology to generate a large amount of high-quality interaction data to help train the human-computer interaction system. However, virtual environment simulation technology may not be able to fully reflect the real situation due to the low-fidelity virtual environment. If a high-fidelity environment is to be created or maintained, a large amount of manpower and material resources will be consumed. Therefore, a more preferred solution is to introduce an intelligent agent system (such as AnyLogic tool) to simulate user behavior to overcome these shortcomings in virtual environment simulation and improve human-computer interaction capabilities.
[0146] Intelligent agent systems simulate real-world user behaviors and decision-making processes to generate rich and diverse interaction data, improving the fidelity and data quality of virtual environments. Intelligent agent systems can adaptively adjust their behavior to simulate interactions across different user groups and contexts. The working process of an intelligent agent system is as follows:
[0147] A. Intelligent Agent System Training
[0148] Collect actual user interaction data, perform data labeling and cleaning, and ensure data quality and accuracy. Divide the data into training, validation, and test sets for training and evaluating intelligent agent models. Use supervised learning methods to train the intelligent agent model, simulating user decision-making and behavior processes. Improve the model's generalization and performance through cross-validation and hyperparameter optimization.
[0149] B. Virtual environment integration
[0150] Embed trained intelligent agent systems into virtual environments to replace or supplement user behavior. Based on the state and feedback within the virtual environment, intelligent agents adaptively adjust their behavior, generating high-quality interaction data. Introducing multiple intelligent agents simulates interactions across different user groups and contexts, increasing data diversity and coverage.
[0151] C. Data Generation and Strategy Training
[0152] Intelligent agents automatically perform interactive tasks in a virtual environment, recording state, actions, and feedback data during the interaction. By simulating the agent's behavior, a large amount of high-quality, representative interaction data is generated. Policy training is performed in the virtual environment using the reinforcement learning algorithm DQN, accelerating the training process using data generated by the intelligent agents.
[0153] (2-0-6) Integrate all abstract sub-strategies and high-level strategies together for overall testing and optimization.
[0154] (2-0-6-1) Feature Extraction and Conversion
[0155] Detailed feature extraction is performed for each stage of the experimental process, including key features such as experimental conditions, user behavior, and feedback. These features represent important information throughout the entire experimental process, such as temperature, time, and operation steps. The high-dimensional raw data is then simplified and transformed into a more manageable state representation. This process can utilize dimensionality reduction techniques such as PCA (Principal Component Analysis) to ensure that the extracted state features are representative and concise.
[0156] (2-0-6-2) Sub-strategies and high-level strategies are trained in parallel
[0157] While training sub-policies, the high-level policy is used for scheduling and management. The high-level policy selects the appropriate sub-policy to execute based on the current state and context. Sub-policies are trained using the DQN algorithm, with each sub-policy independently optimizing its operational steps. The high-level policy is trained using a policy gradient algorithm to optimize the execution order of sub-policies to ensure overall system efficiency.
[0158] (2-0-6-3) Feedback Mechanism and Dynamic Adjustment
[0159] A real-time feedback mechanism dynamically adjusts the parameters of sub-strategies and higher-level strategies. For example, if a sub-strategy performs poorly in a specific situation, the higher-level strategy can adjust its execution order or select a different sub-strategy based on this feedback. This feedback mechanism ensures synergy between sub-strategies and the higher-level strategy, improving the system's adaptability and flexibility. Simultaneously, strategy performance is regularly evaluated and fine-tuned using small amounts of real-world data to further optimize the strategy.
[0160] (2-3) Combining the database with the optimized complEx algorithm, the system automatically adjusts the experimental steps and parameters of Plan C to optimize the experimental results, generating Plan D. Plan D includes detailed information such as the specific steps, required equipment and reagents, and reaction conditions. Each step lists the required materials, operating methods, and expected results, so that users can follow the instructions and conduct the experiment.
[0161] The specific operation process of this step includes:
[0162] (2-3-1) Obtain historical data and knowledge about experimental subjects, experimental methods, reaction conditions, etc. from the database constructed in step S1. Then, through statement comparison technology, remove redundant information from the data and format the data to a unified standard.
[0163] (2-3-2) Use the ComplEx algorithm to extract the potential relationship features between the experimental objects and methods from the data obtained in step (2-3-1), including extracting the associations between various experimental parameters (such as temperature, time, concentration, etc.) and experimental results. Then use ComplEx to train the relationship data to learn the complex relationship between experimental conditions and results.
[0164] During the experiment, there is a strict sequence between the experimental steps, but the existing ComplEx algorithm is static and cannot accurately reflect this feature. In order for the ComplEx algorithm to better capture the temporal relationship and more accurately extract the potential relationship characteristics between the experimental objects and methods, the following new algorithm is preferably used:
[0165] f(s,r,t)=Re(<es+ws·φ(t),er+wr·φ(t)> )
[0166] Among them, s is the subject, r is the relation, and t is the timestamp.
[0167] The timing ComplEx (TComplEx) scoring function is defined as follows:
[0168] f(s,r,t)=Re(<es(t),er(t)> )
[0169] in: is a time-dependent complex vector; <·,·,·> represents a trilinear product; Re(·) represents the real part.
[0170] Calculate f(s,r,t) for each experimental step. Set a threshold θ. If f(s,r,t) ≥ θ, the step is considered to have a significant relationship with the designed experiment and is included in the experiment to be designed. If f(s,r,t) < θ, the step is considered to have a weak relationship with the designed experiment and is deleted. Calculate and compare f(s1,r,t) and f(s2,r,t) for any two experimental steps s1 and s2. The one with the larger value belongs to the preceding step. For example, if f(s1,r,t) > f(s2,r,t), step s1 is considered to come before step s2.
[0171] The above function can be defined using the following formula:
[0172] es(t)=es+ws·φ(t); er(t)=er+wr·φ(t)
[0173] in: is a static complex vector embedding; is the time weight vector. φ(t) is the time encoding function, φ(t) = [sin(ωt), cos(ωt), sin(2ωt), cos(2ωt), ..., sin(kωt), cos(kωt)] where ω is the frequency parameter and k is the encoding dimension.
[0174] The advantages of the above formula include: the introduction of time information through φ(t) enables the model to capture time-related patterns; the use of trigonometric functions can naturally represent periodic relationships and expand the application field; by adjusting ω and k, the accuracy and complexity of time encoding can be controlled; the time weight vectors ws and wr can be interpreted as the degree to which entities and relationships change over time.
[0175] (2-3-3) Based on the predictions and calculations from the ComplEx model, determine whether each experimental step is significantly related to the experiment being designed and whether the order of the steps is correct. This allows the design of Plan C to be modified and Plan D to be generated. Plan D includes detailed information such as the optimized steps, required equipment and reagents, and reaction conditions. Plan D is output as a detailed experimental manual containing all necessary information for the experimenter's reference.
[0176] (2-4) Identify emotional and personal descriptions in the instructions to understand the user's personalized needs for the solution. Match Solution D with the user's intent (personalized needs) and perform targeted optimization to obtain Solution E.
[0177] For example, the user instruction is "generate an XXX method that can quickly complete the reaction", and add the description, "only qualitative results are needed, and the accuracy requirements are not high." Extract personal preference keywords, "fast", "qualitative results", and "low accuracy requirements." Based on the keywords, search the database for related operations that can increase the reaction rate and add them to Scheme D (such as adding catalysts, increasing reaction temperature / pressure, etc.), and delete the relevant operations in Scheme D for improving accuracy accordingly (for example, if the attribute information of the database records that adding a substance dropwise can reduce impurity formation and improve product accuracy, then delete this step accordingly). If there is no preference description in the user instruction, the default selection and optimization will be the scheme with the highest match and the most complete details.
[0178] Specific operations for user intent matching include:
[0179] (2-4-1) Extraction of trending keywords
[0180] User instructions are parsed through natural language processing technology to extract keywords that represent experimental needs and preferences. For example, if the user instruction is "generate a method that can quickly complete the reaction, only requires qualitative results, and does not require high precision", then "fast", "qualitative results" and "not high precision requirements" are extracted as keywords. The natural language model BERT and the sentiment analysis tool VADER are used to identify and classify these keywords to ensure an accurate understanding of user needs. The extracted keywords are preferably classified into different experimental needs and preference categories. The classification criteria can be set according to actual needs based on various aspects of the experiment, such as reaction speed, result type, precision requirements, etc. By classifying keywords, matching and retrieval in the experimental database can be performed more efficiently. For example, "fast" may correspond to the addition of an accelerator or increasing the temperature in the experimental steps, and "qualitative results" corresponds to the type of experimental results and the analysis method.
[0181] (2-4-2) Matching and Optimization
[0182] Based on the extracted keywords, the database built in step S1 is searched for operations and parameters that match the user's needs. By matching the keywords with the operations and parameters in the database, the experimental steps and conditions that best suit the user's needs are found. For example, the keyword "fast" will trigger a database search for all operations related to the designed experiment that can accelerate the reaction, such as adding catalysts or increasing the reaction temperature. Based on the search results, the experimental plan is optimized, and operation steps are added or deleted to meet user needs. For example, if the user emphasizes a fast reaction, a catalyst step can be added to the experimental plan to increase the reaction temperature or pressure; if the user emphasizes qualitative results, the experimental steps can be simplified to reduce unnecessary precision operations.
[0183] The preferred solution is: when extracting trend keywords in (2-4-1), optimize the complEx algorithm to better identify and understand user preferences and tendencies, thereby optimizing the solution. The complEx algorithm optimization method includes: introducing a self-attention layer in the middle layer of the ComplEx model. The specific method is to introduce the classic self-attention mechanism model Transformer, automatically pay attention to important features and relationships, capture long-distance dependencies in the human-computer interaction process, and enable the model to perform better when processing complex user instructions and emotional understanding. Through adaptive feature capture, the model can dynamically adjust feature capture according to changes in input data, enhancing the emotional understanding and preference response capabilities of user needs. The complEx algorithm optimization method specifically includes:
[0184] During the self-attention calculation process, for each embedding vector x i , calculate its value with other vectors x j The dot product of ij Next, these weights are normalized using the Softmax function to ensure that their sum is 1, obtaining the normalized attention weights. These attention weights are then used to perform a weighted summation of the embedding vectors to generate a new feature representation z i In addition, through the multi-head self-attention mechanism, multiple attention weights are calculated in parallel, and the outputs of each head are spliced together to form the final feature representation, thereby enhancing the model's ability to capture features.
[0185] The feature representations generated by the self-attention mechanism are used as input to the ComplEx model, which then proceeds to perform triple scoring and prediction. The ComplEx model utilizes these new feature representations to score triplets and optimizes the model using the cross-entropy loss function. Core parameters (such as the number of heads, hidden layer dimensions, and learning rate) are tuned to improve model performance and robustness, enabling more accurate sentiment prediction and more efficient interaction.
[0186] S3. User feedback and solution optimization.
[0187] Based on the results of step S2, the experimental process plan E is output and a prompt is given, prompting the user to review plan E and provide feedback. Feedback can be provided by selecting a fixed option, entering feedback, or a combination of the two. Feedback content includes: whether the plan has obvious logical loopholes, what is the optimization preference for the plan (whether a simplified or detailed plan is desired, or other personalized requirements).
[0188] If the user refuses feedback or there is no feedback, the user instructions and related data are recorded, and plan E is used as the final output plan.
[0189] If the user provides feedback, the system uses a large language model to analyze the user feedback, identify the parts of Plan E that the user is dissatisfied with and need to be modified, and at the same time collect and record the user's historical instructions and historical feedback data, and adjust Plan E in combination with the database and user historical data (if any).
[0190] The specific adjustment process includes: for the identified content that needs to be modified, a supplementary search is performed in the database, and at the same time, a supplementary search and comparison is performed in combination with online data on the Internet, and the content with the highest frequency in the database and online data search results is extracted. If there are multiple contents with high frequency of occurrence and the frequency difference is not significant, then the content closest to the time of the search is selected to replace this part of the content of Plan E, and Plan F is obtained.
[0191] The preferred solution is: based on Solution E or F, according to the optimization tendency of user feedback and the tendency data recorded in the historical data (the tendency of this user feedback is given priority; if the user does not provide clear feedback, refer to the tendency in the historical data), optimize Solution E or F in the manner of steps (2-4) and output Solution G.
[0192] Among them, user historical data and past tendencies are analyzed using the user history weighted function algorithm, specifically including: the user history weighted function algorithm analyzes user preferences by weighted processing of user historical interaction data. First, the system collects user interaction records, cleans and extracts features from the data, and extracts key features such as user instructions and operation frequency. Then, based on the timestamp and feedback nature of the data, a weight is set for each feature point, and a high weight is given to recent and positive feedback data. Then, these weights are used to perform a weighted average on the features to generate the user's personalized feature vector, and a new weighting function S is designed to integrate the weighted features into a user preference score. The formula for the weighting function S is as follows:
[0193]
[0194] Among them, x i and x j Represents different feature values (user personalized tendency keywords), uses the BERT embedding model to convert the extracted user personalized tendency keywords into vectors, and then enters the formula here. i and c j Represents feature x i and x j Corresponding context information. wi j (c i ,c j ) represents the context-aware weight, which is dynamically calculated based on the context information.
[0195]
[0196] γ is a positive constant ranging from 1 to 100, preferably 30 to 45. i -x j ∥ 2 is the eigenvector x i and x j The square of the Euclidean distance between them.
[0197] Use the attention mechanism to calculate the context-aware weights. Specifically, calculate the feature x i and x j , in the given context c i and c j The attention scores in are then normalized by the softmax function:
[0198]
[0199] f(c i , c j )=c i c j
[0200] Among them, f(c i ,c j ) is the dot product or other similarity measure of the context feature vector, d k is the scaling factor (the dimension of the input data processed by each head in the multi-head attention mechanism). For example: for a Transformer model with a hidden layer dimension of 512 and a multi-head attention mechanism with 8 heads, then dk = 512 / 8 = 64.
[0201] Split solution E or F into several sub-parts (including experimental parameter settings, operation steps, and equipment selection), and use the centralized weighting function S to calculate and score each sub-part. If the centralized weighting function S score calculated for a sub-part is lower than the set value, it is judged that there is a problem with the sub-part. A low score indicates that the content it represents (including unreasonable parameter settings, insufficient experimental conditions, unreasonable experimental steps, etc.) is unreasonable and should be adjusted accordingly. For example, if a certain experimental solution scores low when the temperature is set at 20°C, adjust the temperature parameters accordingly, try different temperature values within other appropriate ranges, and recalculate the S value. Adjust until the calculated S value is higher than the set value, and output the optimized solution G. Generally speaking, for exploratory experiments, the set value of S is 0.65, and for standard experiments or verification experiments, the set value of S is 0.75.
[0202] The weighting function S has the following advantages: (a) Traditional weighting functions usually use linear weighting methods to linearly combine features. However, user behavior and preferences often exhibit complex, nonlinear relationships. Therefore, the present invention helps the weighting function better capture these complex relationships by introducing nonlinear combinations (such as polynomials); (b) Traditional models may ignore the impact of contextual information on user behavior. The present invention dynamically adjusts weights based on the user's contextual information to help the model adapt to different user states more flexibly; (c) The weighting function S also introduces an attention mechanism (dot product attention) to dynamically adjust the similarity between contextual features and target features, so that it can automatically focus on important features and relationships to improve the accuracy of understanding complex user instructions and emotions, and predict user needs and intentions in future interactions.
[0203] The system outputs solution F or G and submits it again for user review. If the user approves, the operation is complete. If not, step S3 is repeated, and the solution is further modified and optimized based on user feedback until it is approved. Each user feedback is recorded. This cyclical user feedback and optimization mechanism continuously improves the accuracy and practicality of the output solutions, gradually forming a system that can meet the personalized needs of users.
[0204] The embodiments described above are merely descriptions of preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the spirit of the present invention, various deformations, modifications, and substitutions made to the technical solutions of the present invention by ordinary technicians in this field should fall within the scope of protection determined by the claims of the present invention.
Claims
1. A method for designing biological and chemical experiments, characterized in that: The steps include: S1. Build a database; specifically include: (1-1) Basic data collection and organization: Build a database with compounds and biomacromolecules as the core and the transformation relationships between compounds and / or biomacromolecules as the connection; (1-2) Data cleaning: basic data verification and supplementation; (1-3) Construct the data in the database into a knowledge graph, create nodes and edges, each node represents an entity, and each edge represents the relationship between nodes; S2: User inputs a command, identifies user intent, and outputs a preliminary solution; specifically, it includes: (2-1) Delete the emotional and personal descriptions in the instructions, perform semantic understanding on the remaining instructions after deletion, retrieve the closest matching results from the database built in S1, and generate an experimental process, named Plan A; (2-2) Semantically understand the remaining content of the instruction after removing the emotional connotation and personal inclination, conduct an online search, and retrieve the result with the highest matching degree from the search results to obtain Solution B; Plan A and Plan B are matched and compared, and the differences between the two plans are marked and analyzed to determine the frequency of occurrence of the difference content. If the frequency of occurrence of the difference content is greater than a set value, the difference content is replaced with the corresponding content in Plan A; otherwise, the difference content of Plan A is retained. After the comparison and replacement are completed, Plan C is generated; (2-3) Combining the database constructed in step S1 with the complEx algorithm, adjusting the experimental steps and parameters of plan C to generate plan D; (2-4) Identify the emotional and personal descriptions in the instructions and understand the user's personalized needs for the solution; match and optimize Solution D with the personalized needs to obtain Solution E and output it; S3. Prompt the user to provide feedback on Solution E. If the user refuses to provide feedback or does not provide feedback, the user's instructions and data are recorded, and Solution E is used as the final output solution. If there is user feedback, optimize the solution based on the user feedback and output the solution again.
2. The method according to claim 1, wherein: In step (1-1), when collecting and organizing basic data, first search and collect published compounds and biomacromolecules; For organic compounds, the change processes of the groups are retrieved and collected from the existing technology. According to the directionality of the chemical reaction, all organic substances with the group are inferred through vector mapping, and then the data information of all the change processes of the group corresponding to this type of organic substance is further obtained; for inorganic compounds, the change processes of covalent bonds are retrieved and collected. All inorganic compounds with the covalent bond are obtained through vector mapping, and then the data information of all the reactions of this type corresponding to this type of compound is further obtained; for biological macromolecules, the physical changes, chemical changes and biological changes of biological macromolecules are retrieved separately. After retrieving a certain type of change process of a certain type of substance, the data of all possible changes of biological macromolecules that have been disclosed in the existing technology are obtained through vector mapping.
3. The method according to claim 1, wherein: Step S1 also includes steps (1-4) of knowledge graph optimization, which specifically includes the following steps: (1-4-1) Establish a relationship model: Collect triples of entities and relationships to form the basis of the knowledge graph and input them into the ComplEx model. The model generates complex vector representations for each entity and relationship. The complex vector representations help the model capture the complex relationship characteristics between entities. Use known relationships as positive samples and simulate positive samples to generate non-existent relationships as negative samples to train the model and obtain a preliminary relationship model; Validate the resulting relationship model by comparing the potential relationships generated by the model's simulated positive samples with known relationships in a validation dataset, and remove relationships that are not in the validation dataset; the validation dataset is obtained from a public database or public literature. (1-4-2) Expand the knowledge graph by filling in attributes: Through the ComplEx embedding method, knowledge points and their relevance are embedded into the same vector space. The geometric distance and direction between vectors reflect the relationship between knowledge points, thereby calculating and predicting knowledge points and their potential relevance. By using neural network methods, the scores of potential knowledge points and relationships are calculated, thereby predicting knowledge points and relationships that may exist but have not been recorded; Use named entity recognition technology to identify knowledge points in online documents and other external data; Use contextual embedding models to calculate the semantic similarity between knowledge points identified in online literature and other external data and existing knowledge points in the knowledge graph; The cosine similarity method is used to calculate the similarity between the knowledge points identified in online documents and other external data and the existing knowledge points in the knowledge graph. If the similarity is higher than the set value, it will be integrated into the knowledge graph. The cosine similarity calculation formula is as follows: Among them: A i and B i Represents the i-th dimension of vectors A and B respectively, n is the total dimension of the vector, w i is the weight of the i-th dimension, α ranges from 0.1 to 3.0, and Texis(A,B) is the semantic similarity calculated using the context embedding model.
4. The method according to claim 3, wherein: Step S1 also includes model training in steps (1-5), which uses the knowledge graph optimized in steps (1-4) to train the relationship model constructed in steps (1-4), specifically including the following steps: (1-5-1) Using the long short-term memory network, the embedding vector in the knowledge graph is used as part of the input layer and concatenated with the text features as the input of the model; (1-5-2) During the training process, the back propagation algorithm Adam optimizer is used to adjust the weight and bias parameters of the model, and the dynamic learning rate α t In the embedded model, the learning rate α t formula: Where: α max and α min are the maximum and minimum learning rates, t is the current step number, T is the total number of adjustment steps, L i is the loss of the i-th validation, L min and L max are the minimum and maximum values of the loss, N is the number of recent validations, and γ is the parameter that controls the polynomial decay; (1-5-3) After training is completed, the performance of the model is evaluated through the confusion matrix, and the calculated indicators include accuracy, recall rate, F1 score and AUC; for models whose indicator calculation results do not meet the set values, by analyzing the indicators, backtracking to the model training steps, adjusting γ and T in the learning rate formula, repeating the model training and performance evaluation steps to retrain the model and obtain a model with satisfactory results.
5. The method according to claim 1, wherein: Step S2 also includes step (2-0), establishing a reinforcement learning method for action recognition to semantically understand the instructions, and the establishment method includes: (2-0-1) Match the user instruction with the content in the database constructed in step S1, and retrieve the result with the highest matching degree as the original solution; (2-0-2) Based on semantic extraction technology, the entire experimental process of the original plan is decomposed into steps or stages; (2-0-3) Feature extraction and clustering of high-dimensional state and action data for each step or stage to form a simplified abstract space; (2-0-4) In the abstract space formed in step (2-0-3), set each step as a sub-strategy, train the sub-strategy for each step separately, and use the DQN algorithm for training calculations; (2-0-5) While training the sub-strategies, train the high-level strategy to select and manage the execution order of each sub-strategy, and use the policy gradient algorithm to train to obtain a more efficient execution order simulation list; (2-0-6) Integrate sub-strategies and high-level strategies for overall testing and optimization.
6. The method according to claim 1, wherein: Steps (2-3) of adjusting the experimental steps and parameters of Scheme C to generate Scheme D include: (2-3-1) Obtain historical data and knowledge about the experiment to be designed from the database constructed in step S1, clean up redundant information in the data through statement comparison technology, and format the data into a unified standard; (2-3-2) Use the ComplEx algorithm to extract the potential relationship features between the experimental objects and methods from the data obtained in step (2-3-1), and use the ComplEx training relationship data to learn the complex relationship between experimental conditions and results; the ComplEx algorithm formula used is: f(s,r,t)=Re(<es+ws·φ(t),er+wr·φ(t)> ) Among them, s is the subject, r is the relationship, t is the timestamp, The timing ComplEx (TComplEx) scoring function is defined as follows: f(s,r,t)=Re(<es(t),er(t)> ) is a time-dependent complex vector; <·,·,·> represents a trilinear product; Re(·) represents the real part, The above function is defined by the following formula: es(t)=es+ws·φ(t); er(t)=er+wr·φ(t) is a static complex vector embedding; is the time weight vector, φ(t) is the time encoding function, φ(t) = [sin(ωt), cos(ωt), sin(2ωt), cos(2ωt), ..., sin(kωt), cos(kωt)], where ω is the frequency parameter and k is the encoding dimension; For each experimental step, calculate f(s,r,t); (2-3-3) According to the calculation result of step (2-3-2), set the threshold θ. If f(s,r,t)≥θ, then it is judged that there is a significant relationship between the step and the designed experiment, and it belongs to the step in the experiment to be designed; if f(s,r,t)<θ, then delete the corresponding step; compare the sizes of f(s1,r,t) and f(s2,r,t) of any two experimental steps s1 and s2. If f(s1,r,t)>f(s2,r,t), then it is judged that step s1 comes before s2. Adjust the order of the experimental steps accordingly and generate plan D.
7. The method according to claim 1, wherein: In step S3, the steps of optimizing the solution based on user feedback include: Use the large language model to analyze user feedback, identify the content that needs to be modified in Plan E, collect and record users' historical instructions and historical feedback data, and adjust Plan E based on the database and user historical data; analyze user historical data through the centralized function S, Among them, x i and x j Indicates different eigenvalues, c i and c j Represents feature x i and x j The corresponding context information, w ij (c i ,c j ) represents the context-aware weight, Calculate feature x i and x j , in the given context c i and c j The attention scores in are then normalized by the softmax function: f(c i ,c j )=c i ·c j Among them, f(c i ,c j ) is the similarity measure of the context feature vector, d k is the scaling factor; The solution to be optimized is divided into several sub-parts, and each sub-part is calculated and scored using the centralized weight function S. If the centralized weight function S score calculated for a sub-part is lower than the set value, it is judged that there is a problem with the sub-part and optimization is required.
8. A computer device / apparatus / system comprising a memory, a processor, and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method and system for realizing industrial digital intelligence based on artificial intelligence
CN118228694A
Medical field intention recognition method, apparatus, device and storage medium
WO2022041728A1