A crop genome analysis method and system based on a multi-modal large model
Patent Information
- Application Number
- CN202611213507.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-10-30
AI Technical Summary
然而在执行 BLAST(基本局部比对搜索工具,生物信息学核心序列相似性比对算法)序列比对或复杂基因功能检索任务时,平台输出结果多为原始文本与繁杂参数列表,缺少直观、智能化解析手段,非生物信息学专业科研人员很难快速从中挖掘有价值的生物学信息
本发明依据基因分析调度策略自适应调取多类型生物数据并按需执行各类生物信息运算,将序列比对量化数值、SSR基因组位点、基因表达趋势统计指标统一转化为标准化结构化特征数据,实现不同类型异构计算结果规整化。依托结构化特征作为事实锚点检索相关学术文献,能够实现文献精准匹配,随后融合用户查询、实测特征数据与文献资料构建完整推理上下文,依托真实运算结果约束模型推理,将原始参数、序列数据转化为带有文献支撑的完整推理素材,可供多模态大模型开展智能化解读,降低使用门槛,便于非生物信息专业研究者快速获取具备事实依据、生物学意义明确的分析结论。
Smart Images

Figure CN123017155A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of artificial intelligence and agricultural information technology, specifically relating to a method and system for crop genome analysis based on a multimodal large model. Background Technology
[0002] Crops, as a crucial component of agricultural production, play a vital role in ensuring food security, promoting agricultural economic development, and meeting human nutritional needs. In recent years, with the rapid development of sequencing technology, crop genomics research has entered the era of big data. Conducting crop genomics research aims to elucidate the molecular mechanisms of key traits such as crop growth and development, stress resistance, yield, and quality at the gene level, decipher the genetic code of germplasm, and discover superior gene resources. This will overcome the shortcomings of traditional breeding methods, support molecular design breeding, and enable the targeted cultivation of high-yield, high-quality, and stress-resistant crops. Simultaneously, it will help reduce the use of chemical fertilizers and pesticides, promote green and sustainable agricultural development, and provide important theoretical and technical support for ensuring national food security and promoting high-quality development of modern agriculture.
[0003] Currently, researchers both domestically and internationally have accumulated a wealth of biological data, including crop genome sequences, transcriptome expression data, simple repeat sequences (SSRs), and transcription factors (TFs). Conducting crop genomics research typically requires retrieving these various types of data, and researchers mostly rely on traditional web-based search systems to complete crop gene data queries. However, when performing BLAST (Basic Local Alignment Search Tool, a core sequence similarity comparison algorithm in bioinformatics) sequence alignment or complex gene function retrieval tasks, the platform outputs mostly raw text and complex parameter lists, lacking intuitive and intelligent analysis methods. This makes it difficult for researchers without bioinformatics expertise to quickly extract valuable biological information from these data. Summary of the Invention
[0004] To address the aforementioned problems, this invention provides a method and system for crop genome analysis based on a multimodal large model.
[0005] To achieve the above objectives, the present invention provides the following technical solution: A crop genome analysis method based on a multimodal large model includes the following steps: The system receives natural language query requests from users regarding the functional analysis of crop genomes, inputs these requests into a multimodal large model, and obtains a set of atomic tasks, target gene IDs, and gene analysis task types. Each atomic task is the smallest bioinformatics operation unit obtained by decomposing the user's genome analysis requirements into the multimodal large model. A directed acyclic graph (DAG) is constructed based on the atomic task set, target gene ID, and analysis task type. A gene analysis scheduling strategy is generated based on the DAG that can schedule different bioinformatics algorithm modules according to the execution order of atomic tasks. Each node in the DAG corresponds to each indivisible basic analysis operation in the atomic task set, and directed edges are used to constrain the execution order of various genome analysis tasks. The target gene ID serves as a global parameter for all nodes in the DAG, providing a unified gene entity retrieval index. Based on the aforementioned analysis and scheduling strategy, the corresponding FASTA gene sequences, whole genome sequences, and HDF5 format gene expression matrices are adaptively extracted from the local system's built-in database. BLAST sequence similarity comparison, SSR site scanning, gene expression extraction, and trend correlation analysis are performed as needed. The sequence alignment quantification values, SSR genomic sites, and gene expression trend statistical indicators obtained from each process are uniformly converted into structured feature data. The structured feature data is used as fact anchors to retrieve related academic literature within the knowledge base. The natural language query request, structured feature data, and retrieved literature content are concatenated to obtain a complete reasoning context. Input the complete inference context into the multimodal large model and output the crop genome graph analysis results.
[0006] Preferably, the step of inputting the complete inference context into the multimodal large model and outputting crop genome graph analysis results specifically includes: Input the complete inference context into a multimodal large model and output gene-specific functional natural language interpretation text, standardized statistical structured data, and an executable Python visualization plotting script; Run Python visualization and plotting scripts in a sandbox environment to generate various gene visualization charts. Combine professional gene function interpretation texts, standardized statistical structured data, and various gene visualization charts to generate comprehensive crop genome analysis reports.
[0007] Preferably, the multimodal large model is a large model in the field of crop genome, which is based on the Transformer framework and includes a three-modal encoder and an autoregressive decoder; the three-modal encoder includes a text encoding channel, a code encoding channel and a gene sequence encoding channel set in parallel; The text encoding channel, code encoding channel, and gene sequence encoding channel of the trimodal encoder are used to extract features and semantically represent natural language text, bioinformatics analysis code, and gene sequence data in the field of crop genome, respectively, to obtain text features, code features, and gene sequence features; and the text features, code features, and gene sequence features are fused through a cross-modal alignment mechanism to obtain a unified multimodal hidden state matrix; The cross-modal alignment mechanism is used to contrast learning constraints and establish a semantic mapping relationship between gene sequence features and gene function descriptions or phenotypic descriptions; The autoregressive decoder employs a causal masking attention mechanism and uses the multimodal hidden state matrix as a conditional context input to progressively generate gene function analysis reports, analysis strategy parameters, or control code for calling external analysis modules in sequence.
[0008] Preferably, the input layer of the trimodal encoder maps data from different modalities into embedding vectors of a uniform dimension; For the crop gene sequence data, the k-mer segmentation strategy is used to convert it into discrete token sequences, and position encoding is introduced to preserve the biological directional characteristics of the sequence. For the natural language text, gene function annotations, phenotypic descriptions, literature summaries, or user task instructions are converted into text token sequences, and text semantic embedding representations are obtained through a text embedding layer. For the bioinformatics analysis code, the code structure features are extracted by parsing an abstract syntax tree; the output of the encoder is represented as a hidden state matrix H, which is used as context information input to the autoregressive decoder.
[0009] Preferably, it also includes training a large model in the field of crop genomes using multi-source heterogeneous genomic data, including the following steps: Collect multi-source heterogeneous data related to crop genomes, including genome sequences, functional annotation texts, plotting codes, and gene expression data of various crops; convert the functional annotation texts and plotting codes into token sequences and perform structural analysis; segment the gene sequences using k-mer and add positional encoding; the processed data constitute the training set. The large model in the field of crop genomes is trained using a training set.
[0010] Preferably, the acquisition of the sequence alignment quantification value, SSR genomic locus, and gene expression trend statistical indicators specifically includes the following steps; Read the gene analysis scheduling strategy, extract the unique ID of the target gene and the atomic task identifier to be executed, classify the data types to be read in this operation according to the atomic task identifier, and mark one or more of the following: FASTA gene sequence, whole genome sequence and HDF5 format gene expression matrix; If the marker includes a BLAST alignment task, the database is searched and the matching FASTA gene sequence is read using the target gene ID as the search key; if the marker includes an SSR scanning task, the complete whole genome sequence file stored in the database is retrieved; if the marker includes an expression analysis task, the row containing the target gene is located using the built-in B-Tree index, and the complete expression matrix of the gene is extracted from the HDF5 hierarchical storage file. Read the topological execution order of the directed acyclic graph within the scheduling strategy, transfer the FASTA gene sequence to the BLAST operation module, transfer the whole genome sequence to the SSR site scanning module, and transfer the extracted expression matrix to the expression analysis module. The BLAST module loads the crop reference genome sequence library, imports the received FASTA gene sequence to start the sequence similarity comparison operation, and outputs a unified output of all sequence alignment quantification values, including bit score, total number of matching bases, sequence consistency percentage, and E-value. The SSR module loads a preset set of microsatellite motifs and a minimum repeat count threshold. It uses a sliding window mechanism to traverse the input whole genome sequence, identify repeat fragments that meet the threshold conditions, and output the SSR genomic locus corresponding to each SSR locus, which includes chromosome number, genome start and end coordinates, repeat motif, and repeat count. The expression analysis module loads the system's built-in standard expression trend template, imports the extracted gene expression matrix, calculates the Pearson correlation coefficient between gene expression vectors and each template vector for each group, and outputs all gene expression trend statistical indicators for each tissue and developmental stage, including RPKM abundance, correlation coefficient, and expression extreme values.
[0011] Preferably, the gene analysis scheduling strategy based on the directed acyclic graph specifically includes the following steps: Read all stored information of the constructed directed acyclic graph, extract all task nodes, node binding parameters, and directed edge association data between nodes. Each task node is associated with the corresponding atomic task identifier, target gene ID, and gene analysis task type. Use the topological sorting algorithm to traverse all nodes and directed edges, eliminate cyclic branches based on the task dependencies represented by the directed edges, and generate an ordered sequence of task execution. Traverse each task node after topological sorting, and retrieve the corresponding algorithm module's calling interface, input data format, and operation threshold configuration parameters from the system parameter library based on the atomic task identifier bound to the node. Then bind and store the parameters with the corresponding node. Extract the target gene ID, database storage path, and file reading index rules shared by all nodes, integrate them into a global data retrieval parameter block, and append it to the head of the ordered task sequence; encapsulate the topologically sorted task execution sequence, the algorithm module parameters bound to each node, and the global data retrieval parameters in a unified manner to generate a standardized structured data package; According to the system's preset scheduling instruction format, the encapsulated structured data packets are serialized, and the gene analysis scheduling strategy is output.
[0012] This invention also proposes a crop genome analysis system based on a multimodal large model, comprising: The request receiving module is used to receive natural language query requests from users for functional analysis related to crop genomes, input the natural language query requests into the multimodal large model, and obtain the atomic task set, target gene ID, and gene analysis task type; the atomic task is the smallest bioinformatics operation unit obtained by the multimodal large model from decomposing the user's genome analysis requirements; The strategy generation module is used to construct a directed acyclic graph (DAG) based on the atomic task set, target gene ID, and analysis task type. Based on the DAG, it generates a gene analysis scheduling strategy that can schedule different bioinformatics algorithm modules according to the execution order of the atomic tasks. Each node in the DAG corresponds to each indivisible basic analysis operation within the atomic task set, and directed edges are used to constrain the execution order of various genome analysis tasks. The target gene ID serves as a global parameter for all nodes in the DAG, providing a unified gene entity retrieval index. The context building module is used to adaptively extract the corresponding FASTA gene sequences, whole genome sequences, and HDF5 format gene expression matrices from the local system's built-in database based on the analysis scheduling strategy. It performs BLAST sequence similarity comparison, SSR site scanning, gene expression extraction, and trend correlation analysis as needed. The module converts the sequence alignment quantification values, SSR genomic sites, and gene expression trend statistical indicators obtained from each process into structured feature data. This structured feature data is used as a fact anchor to retrieve related academic literature within the knowledge base. The module then combines the natural language query request, structured feature data, and retrieved literature content to obtain a complete reasoning context. The analysis module is used to input the complete inference context into the multimodal large model and output the crop genome graphic analysis results.
[0013] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the steps in the crop genome analysis method based on a multimodal large model.
[0014] The present invention also provides a computer-readable storage medium storing a computer program that, when loaded by a processor, can execute any of the steps in the crop genome analysis method based on a multimodal large model.
[0015] The crop genome analysis method based on a multimodal large model provided by this invention has the following beneficial effects: This invention adaptively retrieves multiple types of biological data based on a gene analysis scheduling strategy and performs various bioinformatics operations as needed. It unifies sequence alignment quantification values, SSR genomic loci, and gene expression trend statistical indicators into standardized structured feature data, achieving normalization of heterogeneous computation results. Using structured features as factual anchors, it retrieves relevant academic literature, enabling precise literature matching. Subsequently, it integrates user queries, measured feature data, and literature to construct a complete reasoning context. Relying on real computational results to constrain model reasoning, it transforms raw parameters and sequence data into complete reasoning material supported by literature. This allows for intelligent interpretation by multimodal large-scale models, lowering the barrier to entry and facilitating non-bioinformatics researchers to quickly obtain analytical conclusions with factual basis and clear biological significance. Attached Figure Description
[0016] To more clearly illustrate the embodiments and design schemes of the present invention, the accompanying drawings required for this embodiment will be briefly described below. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart of the crop genome analysis method based on a multimodal large model according to Embodiment 1 of the present invention; Figure 2 A schematic diagram of the framework for constructing the integrated crop genome information management and analysis system provided in Embodiment 2 of the present invention; Figure 3 This is a data processing flowchart of the crop genome integrated information management and analysis system provided in Embodiment 2 of the present invention; Figure 4 This is a visualization of the crop genome integrated information management and analysis system provided in Embodiment 2 of the present invention; Figure 5 Flowchart of Example 4 for querying the Crop Genome Integrated Information Management and Analysis System.
[0018] Figure 6 Example 4 of the Crop Genome Integrated Information Management and Analysis System demonstrates the specific effects of its query function. Detailed Implementation
[0019] To enable those skilled in the art to better understand and implement the technical solutions of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.
[0020] Gene function analysis typically requires the integration of genomic sequence information, transcriptome expression data, BLAST alignment scores, and homologous gene annotation information. Existing general-purpose models often lack effective coordination mechanisms with bioinformatics analysis workflows, making it difficult to support the specialized application needs of comprehensive crop genome analysis.
[0021] Based on this, this invention proposes a crop genome analysis method based on a multimodal large-scale model. By constructing a multimodal large-scale model for the crop genome domain, it unifies and jointly pre-trains textual information related to crop gene function, gene sequence information, and bioinformatics analysis and visualization code. Combined with cross-modal alignment and analysis strategy generation mechanisms, it achieves collaborative processing of tasks such as crop gene function analysis, sequence similarity analysis, simple repetitive sequence identification, and gene expression pattern analysis. Through domain-specific instruction fine-tuning, the model acquires professional reasoning and result generation capabilities for comprehensive crop genome analysis tasks, thereby overcoming the shortcomings of existing general-purpose models in understanding and applying molecular-level information of crop genes.
[0022] This invention provides a crop genome analysis method based on a multimodal large model, specifically as follows: Figure 1 As shown, it includes the following steps: Step 1: Receive the user's natural language query request for crop genome-related functional analysis, input the natural language query request into the multimodal large model, and obtain the atomic task set, target gene ID, and gene analysis task type; the atomic task is the smallest bioinformatics operation unit obtained by the multimodal large model from the user's genome analysis requirements.
[0023] In this embodiment, the multimodal large model is a large model in the field of crop genome. The large model in the field of crop genome is based on the Transformer framework and includes a three-modal encoder and an autoregressive decoder. The three-modal encoder includes a text encoding channel, a code encoding channel and a gene sequence encoding channel set in parallel.
[0024] Furthermore, the text encoding channel, code encoding channel, and gene sequence encoding channel of the trimodal encoder are used to extract features and semantically represent natural language text, bioinformatics analysis code, and gene sequence data in the field of crop genomics, respectively, to obtain text features, code features, and gene sequence features. These features are then fused through a cross-modal alignment mechanism to obtain a unified multimodal hidden state matrix. The cross-modal alignment mechanism is used for contrastive learning constraints to establish a semantic mapping relationship between gene sequence features and gene function descriptions or phenotypic descriptions. The autoregressive decoder employs a causal masked attention mechanism and uses the multimodal hidden state matrix as a conditional context input, progressively generating gene function analysis reports, analysis strategy parameters, or control codes for calling external analysis modules in sequence.
[0025] Specifically, the input layer of the trimodal encoder maps data from different modalities into embedding vectors of a unified dimension. For crop gene sequence data, a k-mer segmentation strategy is used to convert it into discrete token sequences, and positional encoding is introduced to preserve the biological directional features of the sequences. For natural language text, gene function annotations, phenotypic descriptions, literature summaries, or user task instructions are converted into text token sequences, and a text semantic embedding representation is obtained through a text embedding layer. For bioinformatics analysis code, code structural features are extracted through abstract syntax tree parsing. The encoder's output is represented as a hidden state matrix H, which is used as contextual information input to the autoregressive decoder.
[0026] Step 2: Construct a directed acyclic graph (DAG) based on the atomic task set, target gene ID, and analysis task type. Gene analysis scheduling strategy is generated based on the DAG to schedule different bioinformatics algorithm modules according to the execution order of atomic tasks. Each node in the DAG corresponds to each indivisible basic analysis operation in the atomic task set. Directed edges are used to constrain the execution order of various genome analysis tasks. The target gene ID serves as a global parameter for all nodes in the DAG, providing a unified gene entity retrieval index.
[0027] Specifically, the gene analysis scheduling strategy based on directed acyclic graphs includes the following steps: Read all stored information of the constructed directed acyclic graph, extract all task nodes, node binding parameters, and directed edge association data between nodes. Each task node is associated with a corresponding atomic task identifier, target gene ID, and gene analysis task type. Use a topological sorting algorithm to traverse all nodes and directed edges, and based on the task dependencies represented by the directed edges, eliminate cyclic branches to generate an ordered sequence of task execution.
[0028] Traverse each task node after topological sorting, and retrieve the corresponding algorithm module's calling interface, input data format, and operation threshold configuration parameters from the system parameter library based on the atomic task identifier bound to the node. Then bind and store the parameters with the corresponding node.
[0029] Extract the target gene ID, database storage path, and file reading index rules shared by all nodes, integrate them into a global data retrieval parameter block, and append it to the head of the ordered task sequence; encapsulate the topologically sorted task execution sequence, the algorithm module parameters bound to each node, and the global data retrieval parameters in a unified manner to generate a standardized structured data package.
[0030] Following the system's preset scheduling instruction format, the encapsulated structured data packets are serialized, and a gene analysis scheduling strategy is output. This strategy is a standardized execution plan that uses the topological order of a directed acyclic graph (DAG) and carries the target gene ID parameter. It adaptively calls bioinformatics algorithm modules such as BLAST, SSR, and expression level analysis to sequentially complete the corresponding bioinformatics computations.
[0031] Step 3: Based on the analysis and scheduling strategy, adaptively extract the corresponding FASTA gene sequences, whole genome sequences and HDF5 format gene expression matrices from the local system's built-in database, and perform BLAST sequence similarity comparison, SSR site scanning, gene expression extraction and trend correlation analysis as needed; convert the sequence alignment quantification values, SSR genomic sites and gene expression trend statistical indicators obtained from each process into structured feature data.
[0032] Specifically, the acquisition of sequence alignment quantification values, SSR genomic loci, and gene expression trend statistical indicators includes the following steps; Read the gene analysis scheduling strategy, extract the unique ID of the target gene and the atomic task identifier to be executed, classify the data types to be read in this operation according to the atomic task identifier, and mark one or more of the following: FASTA gene sequence, whole genome sequence and HDF5 format gene expression matrix.
[0033] If the marker includes a BLAST alignment task, the database is searched and the matching FASTA gene sequence is read using the target gene ID as the search key; if the marker includes an SSR scanning task, the complete whole genome sequence file stored in the database is retrieved; if the marker includes an expression analysis task, the row containing the target gene is located using the built-in B-Tree index, and the complete expression matrix of the gene is extracted from the HDF5 hierarchical storage file.
[0034] The topological execution order of the directed acyclic graph within the scheduling strategy is read, the FASTA gene sequence is transferred to the BLAST operation module, the whole genome sequence is transferred to the SSR site scanning module, and the extracted expression matrix is transferred to the expression analysis module.
[0035] The BLAST module loads the crop reference genome sequence library, imports the received FASTA gene sequence to start the sequence similarity comparison operation, and outputs a unified set of sequence alignment quantification values including bit score, total number of matching bases, sequence consistency percentage, and E-value after the operation is completed.
[0036] The SSR module loads a preset set of microsatellite motifs and a minimum repeat count threshold. It uses a sliding window mechanism to traverse the input whole genome sequence, identifies repeat fragments that meet the threshold conditions, and outputs the SSR genomic locus corresponding to each SSR locus, which includes the chromosome number, genome start and end coordinates, repeat motif, and repeat count.
[0037] The expression analysis module loads the system's built-in standard expression trend template, imports the extracted gene expression matrix, calculates the Pearson correlation coefficient between gene expression vectors and each template vector for each group, and outputs all gene expression trend statistical indicators for each tissue and developmental stage, including RPKM abundance, correlation coefficient, and expression extreme values.
[0038] Step 4: Use structured feature data as fact anchors to retrieve related academic literature within the knowledge base, and combine the natural language query request, structured feature data, and retrieved literature content to obtain a complete reasoning context.
[0039] Step 5: Input the complete inference context into the multimodal large model and output the crop genome analysis results. Specifically, the crop genome analysis results include natural language interpretation text of specific gene functions, standardized statistical structured data, and an executable Python visualization script. Run the Python visualization script in the sandbox environment to generate various gene visualization charts. Combine the professional gene function interpretation text, standardized statistical structured data, and various gene visualization charts to generate a comprehensive crop genome analysis report.
[0040] The technical solution of the present invention will be further explained below through specific examples.
[0041] Example 1 This invention provides a crop genome analysis method based on a multimodal large model, comprising the following steps: S1. Acquisition and vectorization preprocessing of multi-source heterogeneous data.
[0042] This invention first establishes a multimodal data acquisition channel to obtain four types of basic data related to crop genome research, and then performs unified vectorization preprocessing on the four types of basic data to construct the input for the multimodal model.
[0043] Step S1 specifically includes the following steps: S11. Collect data from books related to crop genes (such as "Chinese Crop Trees"), crop genomics literature published on PubMed, and gene function annotation libraries (GO, KEGG, IneterPro, Homology). Use a tokenizer to convert the cleaned text into token sequences and add positional encoding.
[0044] S12. Targeted crawling of Python-based bioinformatics plotting code (such as matplotlib, seaborn, ggplot2 scripts) from GitHub. Using an Abstract Syntax Tree (AST) parser, extract the function call paths and parameter structures of the code, linearizing them into a structured code sequence.
[0045] S13. Obtain the whole genome sequence and transcriptome sequence of crops.
[0046] Among them, gene sequence data processing requires k-mer segmentation and vector embedding. Step S13 includes: S131. Using the sliding window algorithm, long DNA sequences are divided into overlapping k-mer fragments.
[0047] S132, Regarding the first k-mer segments, whose input embedding vectors The calculation formula is: ; in, For word embedding layer, Relative position encoding based on sine / cosine functions to preserve the biological directionality of the sequence (5' to 3' end).
[0048] Since text tokens, code AST structures, and gene sequence k-mers have different data dimensionality distributions, this interface performs dynamic batching and modality alignment operations. Specifically, this interface constructs a unified tensor container. Input data from different modalities is mapped to a shared GPU memory space. For gene sequences of varying lengths, the interface automatically applies a padding mask to padded short sequences to the maximum context length and generates a corresponding Attention Mask matrix, ensuring that subsequent Transformer computations focus only on regions with valid biological information. The output of this module is a normalized tensor stream.
[0049] S2. Construct a large-scale asymmetric encoding-decoding model framework based on an improved Transformer. In this stage, the system does not aim to generate answers, but rather uses unsupervised learning tasks to enable the model to learn the base arrangement patterns, functional fragment combination rules, and semantic relationships of gene functions in crop gene sequences.
[0050] Step S2 includes the following steps: S21. The system constructs a large-scale model in the field of crop genome based on multimodal data. The large-scale model adopts an encoder-decoder architecture, in which the three-modal encoder includes a text encoding channel, a code encoding channel, and a gene sequence encoding channel.
[0051] Let the first The input of each modality is represented as The hidden state obtained after passing through the corresponding encoding channel is represented as follows: ; The system aligns and fuses the hidden states of each modality through a cross-modal attention fusion mechanism to obtain a unified multimodal hidden state matrix. : ; in The hidden state matrix represents the cross-modal attention fusion function. It is used to characterize the semantics of crop gene function, gene sequence features and semantics of analysis tasks, and serves as the input for subsequent decoders to perform mask fragment reconstruction, cross-modal prediction and downstream task adaptation.
[0052] S22. To address the constraints of variable-length sequences in the input data and the temporal causal constraints during decoding and generation, this invention constructs an Attention Mask matrix in the core attention layer of the encoder and decoder. Participate in the calculation.
[0053] In the crop genome analysis scenario of this invention, the input data has two special constraints: Variable-length sequence constraint: Different gene sequences or code fragments have varying lengths and need to be padded to a fixed length, but the padded portion should not be used in the calculation. Temporal causality constraint: When the decoder generates plotting code or analysis reports, the current time step... Only able to rely on Information about the present and the past cannot be used to "peek" into future information.
[0054] Among them, the Attention Mask, as a bias matrix with the same dimension as the attention score matrix, participates in the calculation of Scaled Dot-Product Attention.
[0055] The system's attention calculation unit executes the following formula: ; in: These are matrices representing queries, keys, and values, respectively. Let be the dimension of the key vector. The Attention Mask matrix constructed in this embodiment is used as a bias matrix with the same dimension as the attention score matrix in the calculation.
[0056] S23. In order to handle batch input crop gene sequence data, for the first... Number of samples (actual length) ), construct matrix When index season This ensures that the model is computationally accurate. At the same time, meaningless characters added for alignment are completely ignored to avoid noise interfering with gene feature extraction.
[0057] S24. To preserve autoregressive properties, the system constructs a lower triangular causal mask. .when season This physically blocks the flow of information from future moments.
[0058] S25. The decoder is based on a masked attention mechanism and a hidden state matrix. Gene function analysis text or analysis strategy parameters are generated through an autoregressive approach. The objective function for this generation is expressed as:
[0059] ; in, This represents the multimodal fusion hidden state output by the encoder. Indicates the first The decomposition method shows that when the decoder predicts the token at the current position, it relies not only on the context representation provided by the encoder, but also on the preceding output token, thereby achieving the stepwise generation of the sequence and the modeling of context dependencies.
[0060] The pre-trained model generated through the above steps has general biological understanding capabilities. In order to transform it into specific analysis actions, a semantic intent parsing and task orchestration middleware is needed. The middleware is responsible for listening to the user's natural language input stream.
[0061] When a user instruction is received (such as "analyze the homology of Pbr00001.1"), the middleware does not directly call the analysis algorithm. Instead, it first uses the high-dimensional semantic space of the pre-trained model to perform zero-shot classification, mapping the natural language to a predefined set of atomic tasks. The orchestrator then checks the dependencies required by the task (e.g., execution). You must obtain it first. (Spatiotemporal data). If dependencies are missing, the middleware automatically generates follow-up instructions or background retrieval requests, constructs a complete directed acyclic graph (DAG) for task execution, and passes this graph to the step data analysis layer for specific module scheduling. That is, based on the DAG, a gene analysis scheduling strategy is generated that can schedule different bioinformatics algorithm modules according to the execution order of atomic tasks. In this embodiment, the gene analysis scheduling strategy is used to carry target gene IDs according to task dependencies, adaptively schedule bioinformatics algorithm modules such as BLAST, SSR, and expression analysis to perform calculations and produce structured factual data.
[0062] S3. When the system calls the BLAST module to perform homology comparison, define the query sequence set. } and the target database set D= For any comparison result, the system calculates the expected value (E-value) to assess its statistical significance. The E-value is calculated using the Karlin-Altschul statistical formula:
[0063] ; in: The valid length of the query sequence; This represents the total effective length of the database. The original scores for comparison; and is a natural constant based on the scoring matrix BLOSUM62 and the sequence components.
[0064] System preset threshold Only when When the alignment result is determined to be valid homology, and the result is set as follows: The text prompts are then converted into textual suggestions and fed back to the larger model.
[0065] S4 and SSR recognition uses a regular expression engine, sliding to match sequences that satisfy... A cascaded repeating sequence of patterns.
[0066] Set the window size using a sliding scan mechanism. In the genome sequence Move the window up to calculate the autocorrelation coefficient within the window or directly perform string comparison.
[0067] Once a seed region is found to satisfy the repetition characteristic, the algorithm extends to the left and right until the repetition pattern breaks. Finally, the quadruple information is recorded.
[0068] .
[0069] S5. To handle the massive expression data of the entire crop genome in dozens of tissue samples, the system pre-constructs a hierarchical data format. The system constructs an expression matrix using the hierarchical data format (HDF5). .
[0070] in, ,in The total number of genes. This represents the total number of samples. Data is stored using a chunking strategy, with a block size set to [value missing]. To optimize the reading speed of specific gene row vectors. The system receives gene IDs parsed from a large model and indexes them using a B-Tree index. Locate row address and extract original representation vector within time complexity .
[0071] For continuous time-point data such as crop fruit development, the system uses the Pearson Correlation Coefficient (PCC) for trend matching: The system has built-in standard trend templates and expression quantity templates, such as: a continuously rising pattern. First rise then fall mode , By calculating gene expression vectors With template vector The correlation coefficient r between them: ; In the formula, This represents the arithmetic mean of the system's preset standard trend template vector for each corresponding period; It represents the arithmetic mean of the expression level of a specific gene in samples tested at different times.
[0072] when At that time, the system labels the gene with a corresponding specific developmental pattern (e.g., "developmental stage-specific induced expression"). After the above calculations, the system converts the numerical results into structured natural language descriptors for the large model to generate the final report.
[0073] The analysis results output above are typically discrete numerical values (such as E-values) or unstructured text (such as SSR lists), making them difficult to present directly as high-quality reports. The system runs a "heterogeneous results context enhancer": this module performs multi-source information fusion. It treats the BLAST statistical indicators, SSR site coordinates, and gene expression matrices output from previous steps as fact anchors. The enhancer utilizes Retrieval Enhancement Generation (RAG) technology, using these anchors as indexes to retrieve relevant literature descriptions from a constructed knowledge base. For example, based on the homologous gene ID in the BLAST results, the system extracts the functional annotation text of that homologous gene in crops. Subsequently, the module concatenates the original user question, calculation results, and RAG supplementary knowledge into a very long context window, serving as a fine-tuning model for rich-semantic prompt input, thus ensuring that the final generated report is supported by both data and literature.
[0074] During the interaction process at the application service layer, the system is configured with intent recognition and entity extraction units. When the user asks multiple follow-up questions (such as 'What is its expression level?'), the system uses Named Entity Recognition (NER) technology to extract core gene entities (such as Pbr000001.1) and analysis status from the history of the previous dialogue. The extracted entities will be used as implicit parameters of the current query and automatically filled into the slots of the analysis task, realizing continuous and deep logical reasoning.
[0075] S6. A structured context template is constructed, and LoRA fine-tuning technology is used to efficiently fine-tune the parameters of the pre-trained model. The specific implementation process is as follows:
[0076] To enable large models to accurately understand the heterogeneous output data, the system designed a structured prompt template based on XML tags. The feature fusion module assembles the signals from each channel into the following standard input stream. System-level instructions: Inject role setting: You are a bioinformatics assistant proficient in crop genomics; Dynamic context window: BLAST slot: Fill in the semantic conclusions of the output; SSR slot: Fill in the metadata of the identified sites; Expression slot: Fill in the semantic expression trends; User instructions: The user's original natural language questions.
[0077] The core idea of LoRA fine-tuning is to freeze the weights of the pre-trained model and train only the side-path decomposition matrix.
[0078] The weight matrix of a certain linear layer in the pre-trained model is LoRA does not update directly. Instead, it introduces two trainable low-rank matrices. To simulate weight increment :
[0079] ; in: Initialize the matrix to zero; Initialize the matrix randomly with a Gaussian distribution; For rank; This is a scaling factor used to adjust the influence of low-rank branches; it is typically set to [value missing]. 2 times.
[0080] To maximize the adaptation effect in the crop genome domain, the system injects the LoRA module into the following key components of the Transformer layer: Attention weight matrix: , Injecting this model allows us to understand the correlation between "gene sequences" and "functional descriptions".
[0081] Example 2 This embodiment provides a crop genome analysis system based on a multimodal large model. The following is a detailed description in conjunction with the appendix. Figures 2 to 4 This section elaborates on the specific structure and operating mechanism of the system.
[0082] The system adopts a layered and decoupled design in its logical architecture, divided from bottom to top into: a data layer, an analysis and processing layer, a model layer (core layer), and an application service layer. Each layer communicates with the others through standardized data interfaces and a control bus, forming a closed-loop intelligent analysis ecosystem. Figure 2 As shown, the specific descriptions of each layer are as follows.
[0083] 1. Data Layer The data layer, located at the bottom of the system, serves as the knowledge foundation and data source for the entire system. This layer is responsible not only for the physical storage of data but also for the cleaning, standardization, and vectorization preprocessing of multi-source heterogeneous data. For example... Figure 2 As shown, the data layer mainly consists of the following four data units:
[0084] 1.1. Text Data Unit This unit stores unstructured textual knowledge in the field of crop genomics. Specifically, it includes abstracts and full texts of academic literature crawled from databases such as PubMed, as well as gene function annotation texts in GFF3 format (including GO entries, KEGG pathway descriptions, etc.).
[0085] This unit is equipped with a natural language preprocessing module for denoising, tokenization, and stop word removal of the text. The processed text is then converted into high-dimensional word vectors by a BERT pre-trained model and stored in a vector database for semantic retrieval and augmentation generation by the model layer.
[0086] 1.2. Gene sequence units This unit stores the crop's whole genome sequence file (FASTA format), CDS sequence, protein sequence, and transcription factor binding site sequence.
[0087] Processing Logic: Considering the biological characteristics of gene sequences, this unit incorporates a built-in k-mer segmenter. The system sets a sliding window size k to segment long DNA sequences into overlapping k-mer fragment sequences. Furthermore, this unit is responsible for generating positional codes, explicitly marking the 5' to 3' direction of the sequence to preserve biological directional characteristics for the model layer to understand the sequence structure.
[0088] 1.3. Expression Quantification Data Unit This unit stores transcriptome expression matrices (RPKM values) for different crop varieties, different tissues (roots, stems, leaves, fruits), and different developmental stages (T1: fruit setting, T2: physiological fruit dropping, T3: fruit rapid enlargement, T4: a month after fruit enlargement, T5: pre-mature, T6: mature, T7: fruit senescence stage after harvesting).
[0089] For expression matrix data with large volume (usually 1000-10000 sq.m.) (Given its sparse nature), this invention employs HDF5 format for chunking storage. Simultaneously, a B-Tree index is constructed, enabling the system to store data based on gene IDs. It can quickly locate and extract the corresponding representation row vector within a time complexity, greatly improving I / O efficiency.
[0090] 1.4. Code Data Unit This repository stores Python plotting code (based on Matplotlib, Seaborn, and Plotly libraries) for bioinformatics visualization, as well as commonly used biostatistical analysis scripts. This code primarily originates from the GitHub open-source community and standard workflow scripts accumulated within the laboratory.
[0091] The built-in Abstract Syntax Tree (AST) parser parses code text into structured tree nodes (function definitions, parameter lists, control flow), helping the model layer learn programming logic and API calling conventions.
[0092] 2. Analysis and Processing Layer The analysis and processing layer sits above the data layer and is the execution backend of the system. It contains several independent bioinformatics algorithm modules. These modules do not interact directly with the user, but instead receive control commands and parameters from the model layer decoder through a standard API interface, and feed back the calculated structured features and statistical results to the model layer.
[0093] 2.1. BLAST Module This module encapsulates the NCBIBLAST+ core algorithm and receives query sequences and alignment parameters (such as e-value threshold and gap open penalty) from the model layer. The module performs the alignment task in the background, calculating the bit score, identity percentage, and expected value (E-value). When the E-value is below a preset threshold, the module converts the alignment results into a structured JSON object (containing homologous gene IDs, alignment length, and mismatch count), reporting it as a factual feature to the model layer.
[0094] 2.2. SSR Module The SSR module, built on MISA and Python scripts, receives scan instructions generated by the model layer. These instructions include a set of core motifs (e.g., A, AT, ATG) and a minimum repeat threshold. The module uses a sliding window mechanism to scan the genome sequence. It outputs a list of identified SSR sites, including motif type, repeat count, start position, and end position. This structured data is then passed to the model layer to evaluate the potential for molecular marker development.
[0095] 2.3. Expression Analysis and Plotting Module The expression analysis and plotting module receives the target gene ID specified by the model layer, extracts the expression vector from the data layer, calculates the Pearson correlation coefficient between it and the system's built-in standard trend template, and feeds back the correlation coefficient and judgment result to the model.
[0096] This module contains a controlled code execution sandbox that integrates the Pandas data processing library and the Matplotlib plotting engine. It directly receives the Python plotting script generated by the model layer decoder, executes the script in the sandbox, generates heatmaps, bar charts, or violin plots, and passes the generated image objects to the application service layer.
[0097] 3. Model Layer (Core Layer) 3.1. Three-mode Transformer encoder This layer is responsible for semantic fusion, intent understanding, task orchestration, and final content generation of multimodal data. The encoder is not a single input; instead, it employs three parallel feature extraction channels, corresponding to text, sequence, and code respectively. The text channel extracts semantic feature vectors from user natural language queries and literature summaries. The sequence channel, specifically designed for gene data, combines k-mer embedding and biological location encoding to extract structural features of gene sequences. The code channel extracts the syntactic structure and logical dependencies of the plotting code.
[0098] The outputs of each channel are not simply concatenated, but interact through a cross-modal attention layer. This layer calculates the cross-correlation matrix between feature vectors of different modalities, minimizes the semantic distance between homologous gene sequences and functional annotation text through a contrastive learning loss function, and finally generates a unified multimodal hidden state matrix H. This matrix H integrates the gene's "sequence features" and "textual descriptions" and forms the basis for subsequent inference.
[0099] 3.2. Autoregressive Transformer Decoder The decoder receives the matrix H output by the encoder and operates in an autoregressive manner (generating tokens one by one). To prevent the structure from being known later, the decoder integrates a causal mask to ensure that the generation at the current moment depends only on historical information.
[0100] In the Transformer layer of the decoder, specifically in the Query ( ) and Value( LoRA bypass modules are injected into the attention weight matrix of the decoder. These LoRA modules are fine-tuned and trained using crop genome data (instruction-response pairs), enabling the decoder to follow the professional standards of bioinformatics, output grammatically correct API instructions and code, and possess extremely strong intent recognition capabilities.
[0101] 4. Application Service Layer 4.1. Web Interactive Terminal The web-based interactive platform provides a human-computer dialogue-style interface. For example... Figure 3As shown, users can enter natural language queries here. It has session management capabilities, recording the historical state of multiple rounds of dialogue. When a user asks a follow-up question, the interactive interface automatically extracts the gene entity from the previous round as context from the history and sends it to the model layer.
[0102] 4.2. Report Generation Unit The report generation unit receives natural language interpretation text from the model layer, structured tables (such as BLAST result tables) from the analysis and processing layer, and visualizations (such as RPKM expression graphs). This unit also integrates a search-enhanced generation interface. It uses the analysis results as keywords to retrieve relevant supporting literature from the data layer's literature database.
[0103] like Figure 4 As shown, the above text, charts, and literature citations are mixed and formatted to generate a complete "Comprehensive Analysis Report of Crop Genome" in HTML or PDF format, which is presented on the web for users to download or view.
[0104] To more clearly illustrate how the different layers of the system work together, the following are two typical user queries as examples: Example 3 In query case 1, the user request Q: "Please analyze the expression level of the crop gene Pbr000009.1 at different stages of fruit development and draw RPKM bar charts and line graphs."
[0105] Users input natural language text at the web interface of the application service layer. "Please analyze the expression level of the crop gene Pbr000009.1 at different stages of fruit development and draw RPKM bar charts and line graphs." The application layer transmits this text to the model layer in real time via a WebSocket long connection.
[0106] The encoder in the model layer first performs tokenizer segmentation and embedding encoding on the text. Subsequently, the decoder, fine-tuned by LoRA, is activated. Because the LoRA module incorporates instruction knowledge from the field of bioinformatics, the model can accurately identify complex intentions.
[0107] The gene ID Pbr000009.1 was extracted, identified as belonging to the pear gene, and verified to conform to the crop genome ID naming convention.
[0108] The query is mapped to two atomic tasks: T_Expression_Analysis and T_Visualization. Based on the above parsing, the model layer generates an internal intermediate representation, namely a structured instruction package.
[0109] The model layer sends the first task instruction {Task:"Expression_Fetch",ID:"Pbr000009.1"} to the analysis and processing layer.
[0110] The expression analysis module of the analysis and processing layer receives instructions. Given the extremely large expression matrix, the module does not perform a full table scan, but instead uses a B-Tree index to directly locate the row address containing Pbr000009.1. Reading only this row from the HDF5 data file takes only milliseconds. The acquired data consists of RPKM numerical vectors of fruits from five different tissues at different time stages. The analysis and processing layer retrieves a preset "standard trend template library". Module calculation. Pearson correlation coefficient between each template vector The calculation results (taking the T6 mature stage as an example) showed a correlation coefficient between this gene and "five different tissues with fruit ripening-specific expression templates". (Statistically significant).
[0111] The analysis and processing layer encapsulates the calculation results into structured features and feeds them back to the model layer as "fact anchors" for subsequent reasoning.
[0112] The model layer decoder receives the structured feedback described above. At this point, the decoder's input context includes: the user's original question, numerical values of expression levels, and trend analysis conclusions.
[0113] The model layer, based on context, activates the "LoRA code generation module." The decoder generates an executable Python script. During this process, the constraint decoding mechanism forces the model to use pandas to process the data and Matplotlib for plotting, while ensuring that dangerous operations such as file deletion are avoided in the code.
[0114] The code is sent to a controlled sandbox environment in the analysis and processing layer for execution. The sandbox environment comes pre-installed with the necessary bioinformatics drawing libraries and isolates network access. Upon successful execution, the code generates downloadable vector-format image files.
[0115] The model layer utilizes Retrieval Enhanced Generation (RAG) technology, using "Pbr000009.1" and "fruit specificity" as keywords to retrieve relevant literature from the knowledge base. The decoder combines the literature knowledge with calculated fact anchors to generate the final natural language description:
[0116] "Analysis showed that Pbr000009.1 was significantly increased in the T3:fruit rapid enlargement stage of Yali fruit (RPKM peak reached 14.41), consistent with the function of its homologous gene in the genome. It is a typical fruit-specific expression gene, and it is speculated that it may be involved in the process of fruit sugar accumulation..."
[0117] The report generation unit in the application service layer receives two signals: the natural language interpretation text from the model layer and the SVG heatmap file path from the analysis and processing layer. The front-end engine dynamically renders both, presenting them to the user on the web in a "text above image" format.
[0118] The system caches the context state of this analysis. If the user subsequently asks, "What about its CDS sequence?", the system can automatically retrieve the CDS sequence information of Pbr000009.1 from the data layer without requiring the user to specify the gene ID again.
[0119] Example 4 In query case two, the user request Q is: "SNVPSAKSLCAICLDPLSYHSKGSHFSCISSNVRHGSVTCPICRAHWTQLPRNLNPPWGSLSSCNRADPIFQILDDSIAT Alignment information by protein".
[0120] This embodiment demonstrates how the system processes an unknown protein amino acid sequence, compares it with a crop genome database using the built-in BLASTP module, and performs deep functional mining using a domain large model (LLM).
[0121] like Figure 5 and Figure 6 As shown, the user inputs a sequence into the system's interactive interface, which is then converted into a sequence alignment input format. The web client encapsulates the request as standard JSON and sends it to the backend. The model layer first performs a feature scan on the input string, identifying that the sequence consists of standard amino acid single-letter codes (E, T, M, I...) and does not contain DNA base characteristics (the A, T, C, G ratio does not conform to nucleic acid characteristics), thus determining it to be a protein sequence. This sequence is then compared with the "Crop Genome Protein Database" stored in the backend.
[0122] After receiving the BLAST analysis command from the model layer, the analysis and processing layer calls the protein sequence similarity alignment module to perform a BLASTP alignment operation on the protein sequence. In this embodiment, the BLAST module compares the protein sequence with a preset reference protein database and calculates the following alignment feature indicators, including but not limited to: bit score, number of matching amino acids, sequence identity percentage, query coverage, and expected value (E-value). When the alignment result meets a preset significance threshold (e.g., E-value is less than a set threshold), the BLAST module organizes the corresponding homologous protein entries and their statistical characteristics into a structured result and returns it to the model layer.
[0123] The model layer breaks down the overall analysis process into several atomic task nodes and constructs corresponding directed acyclic graphs (DAGs). The DAGs include at least the following task nodes: Node N1: Sequence preprocessing task, used to complete the format verification, token encoding and embedding representation of protein sequences.
[0124] Node N2: BLAST parameter generation task, used to determine the alignment type, reference database range, and significance threshold.
[0125] Node N3: BLAST homology alignment task, used to perform protein sequence similarity comparison calculations; Node N4: The task of structuring the alignment results, used to extract and normalize bit scores, number of matching amino acids, consistency percentage and expected value.
[0126] Node N5: Homologous protein functional semantic interpretation task, used to generate natural language analysis descriptions by combining alignment results.
[0127] The task nodes mentioned above are connected by directed edges based on data dependencies. The execution of node N3 depends on the completion of nodes N1 and N2, and the execution of node N5 depends on the output of node N4, thus ensuring that there are no circular dependencies in the overall process.
[0128] After the DAG is constructed, the model layer schedules and executes each task node according to the topology sorting result.
[0129] When the DAG is scheduled to node N3, the model layer sends a BLAST execution command to the analysis and processing layer, along with the alignment parameters generated by node N2. The BLAST module in the analysis and processing layer performs a BLASTP alignment operation on the input protein sequence based on the principle of protein sequence similarity alignment, and calculates the following alignment feature indicators.
[0130] When the comparison results meet the preset significance threshold, the BLAST module returns the comparison results to the model layer in the form of structured data as input to node N4.
[0131] When the model layer schedules the DAG to node N5, it uses the structured comparison results output by node N4 as fact anchors and inputs them into the autoregressive Transformer decoder for comprehensive inference.
[0132] In this node, the decoder combines the hidden representation features of the protein sequence, BLAST alignment statistics, and the system's built-in protein function annotation text to semantically summarize the potential functions of the target protein.
[0133] By using DAG constraints, the model can only generate analysis content based on the actual calculation results generated by the completed nodes, thereby avoiding the generation of inferences that are inconsistent with the actual comparison results.
[0134] After the model layer completes the execution of all nodes in the DAG, it sends the generated analysis text, structured tables, and related information to the application service layer.
[0135] The report generation unit in the application service layer integrates the analysis text, structured tables, and related information to generate a comprehensive analysis report that includes protein homology analysis conclusions and functional inferences, and presents it to the user through a web interface.
[0136] By introducing a DAG-based task orchestration and scheduling mechanism in this embodiment, the system of the present invention can decompose the protein sequence analysis process into controllable and traceable atomic task nodes, and ensure that each analysis step is executed strictly in accordance with the data dependency order.
[0137] This mechanism not only improves the stability and interpretability of the system execution process, but also effectively avoids logical conflicts in the analysis process, providing a reliable intelligent scheduling basis for complex bioinformatics analysis tasks.
[0138] Based on the same inventive concept, this invention also proposes a crop genome analysis system based on a multimodal large model, comprising: The request receiving module is used to receive natural language query requests from users for functional analysis related to crop genomes. The natural language query requests are input into the multimodal large model to obtain the set of atomic tasks, the target gene ID, and the gene analysis task type. The atomic task is the smallest bioinformatics operation unit obtained by decomposing the user's genome analysis requirements into the multimodal large model.
[0139] The strategy generation module is used to construct a directed acyclic graph (DAG) based on the atomic task set, target gene ID, and analysis task type. Based on the DAG, it generates gene analysis scheduling strategies that can schedule different bioinformatics algorithm modules according to the execution order of atomic tasks. Each node in the DAG corresponds to each indivisible basic analysis operation in the atomic task set, and directed edges are used to constrain the execution order of various genome analysis tasks. The target gene ID serves as a global parameter for all nodes in the DAG, providing a unified gene entity retrieval index.
[0140] The context building module is used to adaptively extract the corresponding FASTA gene sequences, whole genome sequences, and HDF5 format gene expression matrices from the local system's built-in database based on the analysis scheduling strategy. It performs BLAST sequence similarity comparison, SSR site scanning, gene expression extraction, and trend correlation analysis as needed. It converts the sequence alignment quantification values, SSR genomic sites, and gene expression trend statistical indicators obtained from each process into structured feature data. The structured feature data is used as fact anchors to retrieve related academic literature within the knowledge base. The natural language query request, structured feature data, and retrieved literature content are concatenated to obtain a complete reasoning context.
[0141] The analysis module is used to input the complete inference context into the multimodal large model and output the crop genome graphic analysis results.
[0142] The modules in the aforementioned crop genome analysis system based on a multimodal large model can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.
[0143] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the steps in the embodiments of the crop genome analysis method based on a multimodal large model. Specific implementation methods can be found in the method embodiments, and will not be repeated here.
[0144] Furthermore, the present invention also provides a non-transitory computer-readable storage medium containing instructions, on which a computer program is stored. When executed by a processor, this computer program is able to implement the steps in the embodiments of the crop genome analysis method based on a multimodal large model. Specific implementation methods can be found in the method embodiments, and will not be repeated here.
[0145] Those skilled in the art will understand that embodiments of the present invention can provide methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0146] It should be noted that the specific embodiments described above enable those skilled in the art to more fully understand the present invention, but do not limit the present invention in any way. Therefore, although the present invention has been described in detail in this specification and embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the present invention; and all technical solutions and improvements that do not depart from the spirit and scope of the present invention are covered within the protection scope of the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims. Any simple variations or equivalent substitutions of technical solutions that can be readily obtained by those skilled in the art within the scope of the technology disclosed in the present invention are within the protection scope of the present invention.
Claims
1. A method for crop genome analysis based on a multimodal large model, characterized in that, Includes the following steps: Receive natural language query requests from users regarding the functional analysis of crop genomes, input the natural language query requests into a multimodal large model, and obtain the set of atomic tasks, target gene ID, and gene analysis task type; The atomic task is the smallest bioinformatics operation unit obtained by decomposing a multimodal large model into user genome analysis requirements; A directed acyclic graph (DAG) is constructed based on the atomic task set, target gene ID, and analysis task type. A gene analysis scheduling strategy is generated based on the DAG that can schedule different bioinformatics algorithm modules according to the execution order of atomic tasks. Each node in the DAG corresponds to each indivisible basic analysis operation in the atomic task set, and directed edges are used to constrain the execution order of various genome analysis tasks. The target gene ID serves as a global parameter for all nodes in the DAG, providing a unified gene entity retrieval index. Based on the aforementioned analysis and scheduling strategy, the corresponding FASTA gene sequences, whole genome sequences, and HDF5 format gene expression matrices are adaptively extracted from the local system's built-in database. BLAST sequence similarity comparison, SSR site scanning, gene expression extraction, and trend correlation analysis are performed as needed. The sequence alignment quantification values, SSR genomic sites, and gene expression trend statistical indicators obtained from each process are uniformly converted into structured feature data. Structured feature data is used as fact anchors to retrieve related academic literature within the knowledge base. Natural language query requests, structured feature data, and retrieved literature content are combined to obtain a complete reasoning context. Input the complete inference context into the multimodal large model and output the crop genome graph analysis results.
2. The crop genome analysis method based on a multimodal large model according to claim 1, characterized in that, The process of inputting the complete inference context into a multimodal large model and outputting crop genome graph analysis results specifically involves: Input the complete inference context into a multimodal large model and output gene-specific functional natural language interpretation text, standardized statistical structured data, and an executable Python visualization plotting script; Run Python visualization and plotting scripts in a sandbox environment to generate various gene visualization charts. Combine professional gene function interpretation texts, standardized statistical structured data, and various gene visualization charts to generate comprehensive crop genome analysis reports.
3. The crop genome analysis method based on a multimodal large model according to claim 1, characterized in that, The multimodal large model is a large model in the field of crop genome. The large model in the field of crop genome is based on the Transformer framework and includes a three-modal encoder and an autoregressive decoder. The three-modal encoder includes a text encoding channel, a code encoding channel and a gene sequence encoding channel set in parallel. The text encoding channel, code encoding channel, and gene sequence encoding channel of the three-modal encoder are used to extract features and semantically represent natural language text, bioinformatics analysis code, and gene sequence data in the field of crop genome, respectively, to obtain text features, code features, and gene sequence features; Furthermore, a unified multimodal hidden state matrix is obtained by fusing text features, code features, and gene sequence features through a cross-modal alignment mechanism. The cross-modal alignment mechanism is used to contrast learning constraints and establish a semantic mapping relationship between gene sequence features and gene function descriptions or phenotypic descriptions; The autoregressive decoder employs a causal masking attention mechanism and uses the multimodal hidden state matrix as a conditional context input to progressively generate gene function analysis reports, analysis strategy parameters, or control code for calling external analysis modules in sequence.
4. The crop genome analysis method based on a multimodal large model according to claim 3, characterized in that, The input layer of the trimodal encoder maps data from different modalities into embedding vectors of a uniform dimension. For the crop gene sequence data, the k-mer segmentation strategy is used to convert it into discrete token sequences, and position encoding is introduced to preserve the biological directional characteristics of the sequence. For the natural language text, gene function annotations, phenotypic descriptions, literature summaries, or user task instructions are converted into text token sequences, and text semantic embedding representations are obtained through a text embedding layer. For the bioinformatics analysis code, the code structure features are extracted by parsing an abstract syntax tree; the output of the encoder is represented as a hidden state matrix H, which is used as context information input to the autoregressive decoder.
5. The crop genome analysis method based on a multimodal large model according to claim 4, characterized in that, This also includes training large-scale models in the field of crop genomes using multi-source heterogeneous genomic data, including the following steps: Collect multi-source heterogeneous data related to crop genomes, including genome sequences, functional annotation texts, plotting codes, and gene expression data of various crops; convert the functional annotation texts and plotting codes into token sequences and perform structural analysis; segment the gene sequences using k-mer and add positional encoding; the processed data constitute the training set. The large model in the field of crop genomes is trained using a training set.
6. The crop genome analysis method based on a multimodal large model according to claim 3, characterized in that, The acquisition of sequence alignment quantification values, SSR genomic loci, and gene expression trend statistical indicators specifically includes the following steps; Read the gene analysis scheduling strategy, extract the unique ID of the target gene and the atomic task identifier to be executed, classify the data types to be read in this operation according to the atomic task identifier, and mark one or more of the following: FASTA gene sequence, whole genome sequence and HDF5 format gene expression matrix; If the marker includes a BLAST alignment task, the database is searched and the matching FASTA gene sequence is read using the target gene ID as the search key; if the marker includes an SSR scanning task, the complete whole genome sequence file stored in the database is retrieved; if the marker includes an expression analysis task, the row containing the target gene is located using the built-in B-Tree index, and the complete expression matrix of the gene is extracted from the HDF5 hierarchical storage file. Read the topological execution order of the directed acyclic graph within the scheduling strategy, transfer the FASTA gene sequence to the BLAST operation module, transfer the whole genome sequence to the SSR site scanning module, and transfer the extracted expression matrix to the expression analysis module. The BLAST module loads the crop reference genome sequence library, imports the received FASTA gene sequence to start the sequence similarity comparison operation, and outputs a unified output of all sequence alignment quantification values, including bit score, total number of matching bases, sequence consistency percentage, and E-value. The SSR module loads a preset set of microsatellite motifs and a minimum repeat count threshold. It uses a sliding window mechanism to traverse the input whole genome sequence, identify repeat fragments that meet the threshold conditions, and output the SSR genomic locus corresponding to each SSR locus, which includes chromosome number, genome start and end coordinates, repeat motif, and repeat count. The expression analysis module loads the system's built-in standard expression trend template, imports the extracted gene expression matrix, calculates the Pearson correlation coefficient between gene expression vectors and each template vector for each group, and outputs all gene expression trend statistical indicators for each tissue and developmental stage, including RPKM abundance, correlation coefficient, and expression extreme values.
7. The crop genome analysis method based on a multimodal large model according to claim 1, characterized in that, The gene analysis scheduling strategy based on directed acyclic graphs specifically includes the following steps: Read all stored information of the constructed directed acyclic graph, extract all task nodes, node binding parameters, and directed edge association data between nodes. Each task node is associated with the corresponding atomic task identifier, target gene ID, and gene analysis task type. Use the topological sorting algorithm to traverse all nodes and directed edges, eliminate cyclic branches based on the task dependencies represented by the directed edges, and generate an ordered sequence of task execution. Traverse each task node after topological sorting, and retrieve the corresponding algorithm module's calling interface, input data format, and operation threshold configuration parameters from the system parameter library based on the atomic task identifier bound to the node. Then bind and store the parameters with the corresponding node. Extract the target gene ID, database storage path, and file reading index rules shared by all nodes, integrate them into a global data retrieval parameter block, and append it to the head of the ordered task sequence; encapsulate the topologically sorted task execution sequence, the algorithm module parameters bound to each node, and the global data retrieval parameters in a unified manner to generate a standardized structured data package; According to the system's preset scheduling instruction format, the encapsulated structured data packets are serialized, and the gene analysis scheduling strategy is output.
8. A crop genome analysis system based on a multimodal large model, characterized in that, include: The request receiving module is used to receive natural language query requests from users for functional analysis related to crop genomes, input the natural language query requests into the multimodal large model, and obtain the atomic task set, target gene ID and gene analysis task type; The atomic task is the smallest bioinformatics operation unit obtained by decomposing a multimodal large model into user genome analysis requirements; The strategy generation module is used to construct a directed acyclic graph (DAG) based on the atomic task set, target gene ID, and analysis task type. Based on the DAG, it generates a gene analysis scheduling strategy that can schedule different bioinformatics algorithm modules according to the execution order of the atomic tasks. Each node in the DAG corresponds to each indivisible basic analysis operation within the atomic task set, and directed edges are used to constrain the execution order of various genome analysis tasks. The target gene ID serves as a global parameter for all nodes in the DAG, providing a unified gene entity retrieval index. The context building module is used to adaptively extract the corresponding FASTA gene sequences, whole genome sequences, and HDF5 format gene expression matrices from the local system's built-in database based on the analysis scheduling strategy, and perform BLAST sequence similarity comparison, SSR site scanning, gene expression extraction, and trend correlation analysis as needed; and uniformly convert the sequence alignment quantification values, SSR genomic sites, and gene expression trend statistical indicators obtained from each process into structured feature data. Structured feature data is used as fact anchors to retrieve related academic literature within the knowledge base. Natural language query requests, structured feature data, and retrieved literature content are combined to obtain a complete reasoning context. The analysis module is used to input the complete inference context into the multimodal large model and output the crop genome graphic analysis results.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, 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.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is loaded by the processor, it is able to perform the steps of the method according to any one of claims 1 to 7.