Text task processing method, system and device, medium and computer program product

Through text data-assisted methods, effective information is mined from gene expression data and accurate gene expression text data are generated, which solves the analysis accuracy and efficiency problems caused by artificial participation in the existing technology, and realizes efficient and accurate gene expression analysis .

CN119495359AActive Publication Date: 2025-02-21INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202510068250.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-16
Publication Date
2025-02-21
Estimated Expiration
2045-01-16

AI Technical Summary

Technical Problem

The prior art requires manual participation in the selection and optimization of characteristic parameters when analyzing gene expression data, resulting in low accuracy, high cost and low efficiency of the analysis results.

Method used

With text data assistance, more effective gene expression information is mined from gene expression data and text data containing more accurate gene expression information is generated. The specific method includes obtaining text data and gene expression data of the to-process text task, encoding the gene expression data into gene global vector data, and fusing it with the text data, and generating text data containing gene information through decoding processing.

Benefits of technology

It realizes efficient and accurate analysis of the gene expression matrix without relying on manual participation in feature parameter selection and optimization, and generates text data containing accurate gene expression information, reducing analysis costs and improving efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119495359A_ABST
    Figure CN119495359A_ABST
Patent Text Reader

Abstract

The invention discloses a text task processing method, system and device, a medium and a computer program product, and is applied to the technical field of artificial intelligence. The method comprises the following steps: respectively encoding text data and gene expression data corresponding to a to-be-processed text task to obtain gene global vector data, text vector data and global text vector data; fusing the existing preamble sequence and the gene global vector data during the current decoding, and decoding the text gene fusion data to obtain the text data containing the gene information corresponding to the current decoding step; and determining an execution result of the to-be-processed text task according to the text data output in each decoding step. According to the method, the problem that manual intervention analysis is based on expression data in related technologies can be solved, more effective gene expression information can be mined from the gene expression data under the assistance of the text data, and the text data containing more accurate gene expression information can be generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a text task processing method, system, device, medium and computer program product. Background Art

[0002] With the development of high-throughput sequencing technology, large-scale gene expression data can be obtained. The gene expression level analysis results of gene expression data are widely used in bioinformatics and molecular biology, such as constructing a gene regulatory network model for describing the regulatory relationship between genes through gene expression data.

[0003] When analyzing gene expression data, related technologies need to rely on manual participation in the selection and optimization of feature parameters, such as the selection and optimization of feature parameters in the process of mining gene regulatory relationships from gene expression matrices. Manual intervention methods can neither guarantee the accuracy of the final gene analysis results nor capture all effective information, and lead to high costs and low efficiency in the entire gene analysis process.

[0004] In view of this, how to analyze the gene expression matrix more efficiently and accurately without relying on manual participation in the selection and optimization of feature parameters is a technical problem that technicians in this field need to solve.

[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0006] The present invention provides a text task processing method, system, electronic device, non-volatile storage medium and computer program product, which can mine more effective gene expression information from gene expression data with the assistance of text data and generate text data containing more accurate gene expression information.

[0007] In order to solve the above technical problems, the present invention provides the following technical solutions: The present invention provides a text task processing method, comprising: Obtain text data and gene expression data corresponding to a text task to be processed; the text task to be processed is a text task for generating text containing gene information; encode the gene expression data with added position learning parameters and global learning parameters into gene global vector data; encode the text data into text vector data and / or encode the fusion data of the gene global vector data and the text data into global text vector data according to the text task to be processed; fuse the preamble text sequence already existing in the current decoding with the gene global vector data, and decode the text gene fusion data to obtain the text data containing gene information corresponding to the current decoding step; determine the execution result of the text task to be processed according to the text data outputted by each decoding step; wherein the position learning parameters are used to learn the sequential feature information of the gene expression data, and the global learning parameters are used to learn the global features of the gene expression data.

[0008] In a first exemplary embodiment, the gene expression data is a gene expression matrix, and the gene expression data with added positional learning parameters and global learning parameters is encoded into gene global vector data, including: dividing the gene expression data into multiple sub-gene expression matrices, and adding positional learning parameters to each sub-gene expression matrix; adding global learning parameters as gene expression matrix features before the gene vector sequence data corresponding to each sub-gene expression matrix with added positional learning parameters; inputting the gene expression matrix features into a gene expression matrix encoding module, so as to encode the gene expression matrix features using the gene expression matrix encoding module; the input position of the gene expression matrix encoding module includes a classification label; and using the output corresponding to the classification label of the gene expression matrix encoding module as gene global vector data.

[0009] In a second exemplary embodiment, the text data is encoded into text vector data, including: performing word segmentation processing on the text data to obtain multiple text words; inputting each text word into a text encoding module to perform encoding processing using the text encoding module; the input position of the text encoding module includes a classification mark; and using the output corresponding to the classification mark of the text encoding module as text vector data.

[0010] In a third exemplary embodiment, the fusion data of the gene global vector data and the text data are encoded into global text vector data, including: performing word segmentation processing on the text data to obtain an initial text embedding sequence; splicing the gene global vector data before the initial text embedding sequence to obtain fused vector data; inputting the fused vector data into a gene-aware text encoding module to encode the fused vector data using the gene-aware text encoding module; and using the output of the gene-aware text encoding module as global text vector data.

[0011] In a fourth exemplary embodiment, the fusion data of the gene global vector data and the text data are encoded into global text vector data, including: performing word segmentation processing on the text data to obtain an initial text embedding sequence; inputting the initial text embedding sequence and the gene global vector data into a gene-aware text encoding module, so as to use the gene-aware text encoding module to interactively calculate the query matrix of each text word in the initial text embedding sequence with the key matrix and value matrix of the gene global vector data, and encode the interactive calculation result as the fusion vector data; and use the output of the gene-aware text encoding module as the global text vector data.

[0012] In a fifth exemplary embodiment, the existing preceding text sequence and the gene global vector data at the time of current decoding are fused, and the text gene fusion data is decoded to obtain text data containing gene information corresponding to the current decoding step, including: splicing the gene global vector data to the preceding text sequence to obtain text gene fusion data; using the converter network model as a gene-aware text decoding module, and inputting the text gene fusion data into the gene-aware text decoding module for decoding processing by the gene-aware text decoding module.

[0013] In a sixth exemplary embodiment, the fusion of the preamble text sequence already existing during the current decoding and the gene global vector data includes: creating an upper triangular matrix with the same length as the preamble text sequence, and setting the value on the right side of the diagonal of the upper triangular matrix to infinity as mask information; performing a mask operation on each text word of the preamble text sequence using the mask information; determining an attention weight based on a query matrix, a key matrix and a value matrix of the preamble text sequence, and determining a context vector of each text word of the preamble text sequence based on the attention weight; generating a text segment of the preamble text sequence based on the context vector of each text word, and fusion of the text segment and the gene global vector data.

[0014] In a seventh exemplary embodiment, it also includes: pre-constructing a text task processing model; the text task processing model includes an input layer, an encoding layer, a decoding layer and an output layer; obtaining a text training sample set matching the text task to be processed, the text training sample set includes multiple groups of text-gene training samples, and the text-gene training samples include text samples and corresponding gene expression samples; using the text training sample set, training the text task processing model until the model training stop condition is reached, and obtaining a text task processing model for executing the text task to be processed; wherein the input layer inputs the text sample and the gene expression sample; the The encoding layer includes a gene expression matrix encoder, a text encoder and a gene-aware text encoder; the gene expression matrix encoder encodes the gene expression sample with added position learning parameters and global learning parameters into a gene global vector sample, the text encoder encodes the text sample into a text vector sample, and the gene-aware text encoder encodes the text sample spliced ​​with the gene global vector sample into a global text vector sample; the decoding layer fuses the preamble text sequence sample and the gene global vector sample that already exist during the current decoding, and decodes the text-gene fusion sample to obtain the text sample data containing gene information corresponding to the current decoding.

[0015] In an eighth exemplary embodiment, after obtaining the text data and gene expression data corresponding to the text task to be processed, it also includes: inputting the text data and the gene expression data into the text task processing model; the input layer of the text task processing model receives the text data and the gene expression data; the gene expression matrix encoder encodes the gene expression data with added position learning parameters and global learning parameters into gene global vector data, the text encoder encodes the text data into text vector data, and the gene-aware text encoder encodes the fusion data of the gene global vector data and the text data into global text vector data; the decoding layer fuses the preamble text sequence that already exists during the current decoding with the gene global vector data, and decodes the text-gene fusion data to obtain the text data containing gene information corresponding to the current decoding step; the output layer determines the execution result of the text task to be processed according to the text data output by each decoding step, and outputs it.

[0016] In a ninth exemplary embodiment, the method of training the text task processing model using the text training sample set includes: pre-constructing an initial loss function of the text task processing model; the initial loss function includes gene text retrieval loss, gene-aware text encoding loss and gene-aware text generation loss; generating weight factors of the gene text retrieval loss, the gene-aware text encoding loss and the gene-aware text generation loss according to the task type to which the text task to be processed belongs; adjusting the initial loss function according to the respective weight factors of the gene text retrieval loss, the gene-aware text encoding loss and the gene-aware text generation loss to obtain a loss function; using the text training sample set to train the text task processing model based on the loss function; wherein the gene text retrieval loss is used to maximize the similarity between the text sample and its corresponding gene expression sample while minimizing the similarity between the text sample and other gene expression samples; the gene-aware text encoding loss is used to evaluate the degree of matching of the text task processing model between the input text sample and the gene expression sample; and the gene-aware text generation loss is used to evaluate the ability of the text task processing model to generate text under the condition of gene expression context.

[0017] In a tenth exemplary embodiment, the text task to be processed is a gene-text matching task, and the text task processing model is trained using the text training sample set, including: performing initial training on the text task processing model using the text training sample set, obtaining text sample-gene expression sample pairs and corresponding similarity scores generated by the text task processing model during the initial training process, and using the similarity scores as confidence scores for the text sample-gene expression sample pairs; selecting target text sample-gene expression sample pairs that meet preset similarity conditions from each text sample-gene expression sample pair; obtaining variant text sample-gene expression sample pairs of each target text sample-gene expression sample pair by adding fluctuation conditions and / or replacing similar text descriptions for each target text sample-gene expression sample pair; and training the text task processing model obtained by the initial training again using each target text sample-gene expression sample pair and each variant text sample-gene expression sample pair.

[0018] The present invention also provides an electronic device, comprising a processor, wherein the processor is used to implement the steps of any of the above-mentioned text task processing methods when executing a computer program stored in a memory.

[0019] Finally, the present invention also provides a non-volatile storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the text task processing method as described in any of the above are implemented.

[0020] The present invention also provides a computer program product, comprising a computer program / instruction, which implements the steps of the text task processing method as described in any of the preceding ones when executed by a processor.

[0021] The present invention also provides a text task processing system, including a user interface and a text task processor; the user interface includes at least a task trigger area, a task processing result display area, a data input area and / or a file import area, so that a user can describe a text task to be processed through the data input area, input text data and gene expression data through the data input area or the file import area, and send the text task to be processed, the text data and the gene expression data to the text task processor through the task trigger area; the text task processor, based on the text task to be processed, processes the text data and the gene expression data using the steps of any of the previous text task processing methods, generates a text task processing result, and sends the text task processing result to the task processing result display area of ​​the user interface.

[0022] The technical solution provided by the present invention has the advantages that gene expression data and text data are encoded respectively to construct a multimodal potential space. By encoding the gene expression data, the nonlinear characteristics of gene expression can be extracted, and the deep nonlinear relationship between the gene expression data and the text information can be captured, and the implicit biological information can be extracted. By using the combination of gene expression embedding and text embedding for encoding processing, it is ensured that the content in the text can reflect the characteristics of gene expression and strengthen the understanding of gene expression by the text. In the text generation process, by introducing gene expression information, it is ensured that the generated text is highly correlated with the gene data, the sparsity of gene expression data and the context dependency of text data can be effectively processed, and the effective combination of gene expression and text is realized. Through the text, the deep expression relationship of genes can be efficiently and accurately mined from the gene expression data, and the whole process does not require manual participation in the selection and optimization of feature parameters, and finally generates text data containing more accurate gene expression information. In addition, the present invention also provides a corresponding implementation system, an electronic device, a non-volatile storage medium and a computer program product for the text task processing method, which further makes the method more practical, and the system, the electronic device, the non-volatile storage medium and the computer program product have corresponding advantages.

[0023] The technical features mentioned above, the technical features to be mentioned below, and the technical features shown separately in the drawings can be arbitrarily combined with each other, as long as the combined technical features are not contradictory. All feasible feature combinations are technical contents clearly recorded in this article. Any of the multiple sub-features contained in the same sentence can be applied independently, and does not have to be applied together with other sub-features. It should be understood that the above general description and the detailed description below are only exemplary and cannot limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the present invention or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0025] Figure 1 A flowchart of a text task processing method provided by the present invention; Figure 2 A schematic diagram of the encoding process of the gene expression data provided by the present invention; Figure 3 A schematic diagram of a framework of a text task processing model provided by the present invention in an exemplary application scenario; Figure 4 A schematic diagram of a structural framework of an exemplary implementation of the text task processing device provided by the present invention; Figure 5 A schematic diagram of a structural framework of an exemplary implementation of an electronic device provided by the present invention; Figure 6 A schematic diagram of the structural framework of an exemplary implementation of the text task processing system provided by the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Among them, the terms "first", "second", "third", "fourth", etc. in the specification and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations of the two are intended to cover non-exclusive inclusions. The term "exemplary" means "used as an example, embodiment or illustrative". Any embodiment described here as "exemplary" is not necessarily interpreted as being superior or better than other embodiments.

[0027] Gene expression data includes gene expression levels under different conditions. As the scale of gene expression data being legally obtained increases, the analysis results of gene expression data are widely used in biological related fields, such as predicting gene regulatory networks based on gene expression matrices, and then constructing gene regulatory network models. Through this model, the regulatory relationship between genes can be obtained, the role of genes in cell and tissue functions can be clarified, and whether a certain type of gene has an important influence on the expression of other genes can be inferred. Key regulatory factors and regulatory pathways can be identified, which is conducive to a deep understanding of the complexity of biological systems and the occurrence mechanism of biological processes, thereby supporting gene function annotation, gene expression pattern analysis and biomarker discovery. Predicting gene regulatory networks usually uses gene expression matrices as input features, and applies machine learning and statistical models such as correlation analysis, linear models, cluster analysis, factor analysis and Bayesian networks for analysis, which can discover potential regulatory relationships from large-scale gene expression data.

[0028] As mentioned above, when analyzing gene expression data, related technologies rely on traditional machine learning and rely on manual selection and optimization of feature parameters based on professional knowledge and experience. Different feature parameter selections will result in different gene analysis results, and manually selected feature parameters cannot capture all information. This results in the inability to obtain accurate results in the analysis of gene expression data in related technologies, and requires a lot of manpower and time costs. Taking the construction of gene regulatory network models as an example, the performance of the model is highly dependent on the selection and optimization of feature parameters, which will lead to limitations in model performance, and the inability to capture deeper relationships and patterns. It will also limit the expressiveness of shallow models, and the ability and interpretability of predicting gene regulatory networks cannot meet user needs. Related technologies improve the analysis process of gene expression data through methods such as feature extraction modules, co-expressed gene classification, and boundary recognition. However, this method usually requires a large number of manually labeled samples for each biological process category to be trained. Obtaining a large amount of high-quality labeled data is a time-consuming and costly process, and the quality and quantity of training samples will also affect the accuracy and reliability of the final results. In addition, there are related technologies that analyze gene expression data through the interaction between gene expression matrix and text, but they cannot finely distinguish functional co-expression modules from background noise, so they cannot identify their functions in finer-grained co-expression modules. To solve this problem, related technologies also propose an analysis method for optimizing gene expression matrix, and transfer learning learns semantic associations between meaningful biological process categories from noise, such as using descriptions or attributes of biological processes to identify categories that have never been seen in the training phase. However, the essence of these two methods is to align biological expression data with text data, and they do not make full use of text data in the process of gene expression data analysis. In addition, there is a related technology that proposes to use discretization and autoregressive modeling to process gene expression data. This method maps high-dimensional and complex gene expression data to a low-dimensional, discretized latent space through a quantization and encoding process. On the basis of retaining the key biological information in the original data, it can reduce the representation complexity of gene expression data and improve the modeling efficiency of gene expression patterns. However, this method also does not make full use of text data and cannot deeply explore the relationship between gene expression data and text data. In view of this, the present invention encodes gene expression data and text data separately, constructs a multimodal latent space, and uses a combination of gene expression embedding and text embedding for encoding processing to ensure that the content in the text can reflect the characteristics of gene expression and strengthen the text's understanding of gene expression. In the text generation process, by introducing gene expression information, it is ensured that the generated text is highly correlated with the gene data, and ultimately text data containing more accurate gene expression information is generated. After introducing the technical solution of the present invention, various non-limiting embodiments of the present invention are described in detail below.In order to better illustrate the present invention, numerous specific details are provided in the following specific embodiments. It should be understood by those skilled in the art that the present invention can be implemented without these specific details. In other examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present invention.

[0029] First see Figure 1 , Figure 1 A flowchart of a text task processing method provided in this embodiment may include the following contents: S101: Obtain text data and gene expression data corresponding to the text task to be processed.

[0030] The text task to be processed in this step is a task to generate text containing gene information, including but not limited to text-gene matching tasks, gene annotation tasks, gene function prediction tasks, gene expression pattern analysis, and text generation tasks. The text generation task can be, for example, the generation of the results of the correlation analysis between gene expression and disease symptoms, and the text data containing the gene information required to be included in the text task to be processed is finally output by analyzing the gene expression data and related text data. The text data can be, for example, medical reports, symptom descriptions, or disease progression related to the gene expression matrix. The gene expression data can be a gene expression matrix, where rows represent the expression of a gene under different environmental conditions or at different time points, and columns represent the expression of all genes under different conditions or samples, such as tissues, experimental conditions, treatment factors, etc. The data of each grid represents the expression level of a specific gene in a specific sample.

[0031] S102: Encode the gene expression data with added positional learning parameters and global learning parameters into gene global vector data, encode the text data into text vector data according to the text task to be processed, and / or encode the fusion data of the gene global vector data and the text data into global text vector data.

[0032] It is understandable that gene expression data is usually represented by a gene expression matrix, which has high-dimensional sparsity, and text data has contextual dependence. The deep relationship between the two is usually difficult to model directly. In order to establish effective nonlinear modeling between the gene expression matrix and text data and capture their complex interactive relationship, this step encodes the gene expression data and text data separately to construct a multimodal latent space to capture their deep interactions. It is understandable that for some text tasks to be processed, there is little demand for the deep relationship between text data and gene expression data. In order to improve the execution efficiency of the text tasks to be processed, the text data can only be encoded into text vector data. Some text tasks to be processed need to capture the semantic associations within the text and generate contextual representations related to the embedding of the gene expression matrix, such as gene-text matching tasks, so it is also necessary to encode the fusion data of the gene global vector data and the text data.

[0033] Among them, since the order and position of the expression of each gene in the gene expression matrix under different conditions have biological significance, in order to obtain a more accurate gene expression relationship, this step introduces position encoding when encoding the gene expression matrix, that is, the sequential feature information of the gene expression data is learned during the model training process through the learnable position learning parameters, so as to capture the local and global sequential information of the gene expression matrix. In order to obtain a global representation of the entire gene expression data, another learnable parameter, that is, a global learning parameter, can be added to summarize the characteristics of the entire gene expression data.

[0034] S103: Fuse the existing preceding text sequence and gene global vector data during the current decoding, and decode the text-gene fusion data to obtain text data containing gene information corresponding to the current decoding step; determine the execution result of the text task to be processed based on the text data output by each decoding step.

[0035] Based on the encoding of text data and gene expression data in the previous step, in order to effectively handle the sparsity of gene expression data and the context dependency of text data, and to achieve the effective combination of gene expression and text, this step combines gene expression data in each decoding step during the process of generating or translating text, so that the generated text data can contain important content related to the gene expression matrix. By introducing gene expression embedding, vocabulary or sentence structures related to gene information can be adaptively selected during text generation, improving the accuracy and interpretability of gene-related text generation tasks.

[0036] In the technical solution provided in the present embodiment, gene expression data and text data are encoded respectively to construct a multimodal potential space. By encoding the gene expression data, it is possible to extract the nonlinear characteristics of gene expression, and then it is possible to capture the deep nonlinear relationship between the gene expression data and the text information, and extract implicit biological information. By utilizing the combination of gene expression embedding and text embedding for encoding, it is ensured that the content in the text can reflect the characteristics of gene expression, and the understanding of gene expression by the text is strengthened. In the text generation process, by introducing gene expression information, it is ensured that the generated text is highly correlated with the gene data, the sparsity of gene expression data and the context dependency of text data can be effectively processed, and the effective combination of gene expression and text is realized. Through the text, the deep expression relationship of genes can be efficiently and accurately mined from the gene expression data, and the whole process does not need to be manually involved in the selection and optimization of feature parameters, and finally generates text data containing more accurate gene expression information.

[0037] It should be noted that there is no strict order of execution between the steps in the present invention. As long as they comply with the logical order, these steps can be executed simultaneously or in a certain preset order. Figure 1 This is just a schematic and does not mean that this is the only execution order.

[0038] In the above embodiment, there is no limitation on how to encode gene expression data to generate gene global vector data. Based on the above embodiment, the present invention also provides an exemplary generation process of gene global vector data, which may include the following contents: The gene expression data is a gene expression matrix, which is divided into multiple sub-gene expression matrices, and position learning parameters are added to each sub-gene expression matrix; before the gene vector sequence data corresponding to each sub-gene expression matrix to which the position learning parameters are added, global learning parameters are added as gene expression matrix features; the gene expression matrix features are input into a gene expression matrix encoding module, so that the gene expression matrix features are encoded using the gene expression matrix encoding module; the output corresponding to the classification mark of the gene expression matrix encoding module is used as gene global vector data.

[0039] In this embodiment, the input gene expression data can be first divided into sub-matrices, and then these divided parts are embedded into a vector space. For example, G represents the number of genes, C represents the number of experimental conditions or samples, and R represents the matrix. Each submatrix can be divided into N submatrices according to the expression data of g genes under c conditions. For the convenience of description, the divided submatrices are defined as subgene expression matrices. Correspondingly, the size of each subgene expression matrix is ​​g×c. For the convenience of subsequent processing, each subgene expression matrix can be flattened into a one-dimensional vector. Correspondingly, the i-th subgene expression matrix It can be expressed as In order to facilitate subsequent data processing, the flattened sub-gene expression matrix can be projected into a higher-dimensional space through a learnable linear transformation matrix E, where E represents the embedding dimension. Correspondingly, the i-th sub-gene expression matrix can represent an embedding vector , the vector representation set of all sub-gene expression matrices is the gene vector sequence data. Similarly, considering that the order and position of the expression of each gene in the gene expression matrix under different conditions have biological significance, each sub-gene expression matrix of the gene expression matrix has position sensitivity, so this embodiment introduces position encoding for each gene expression matrix to provide position information. Position encoding allocates a specific vector to the gene position and conditional position of each sub-matrix, so that the model can capture the local and global order information of the gene expression matrix. Accordingly, a learnable position information is added to the embedding vector of the i-th sub-gene expression matrix, that is: . is a learnable positional encoding associated with the relative position of the ith sub-gene expression matrix, is the i-th sub-gene expression matrix with positional learning parameters added. In order to obtain a global representation, after obtaining the gene vector sequence data with positional learning parameters added, a label [CLS] (classification) can be added before it. For ease of description, the present invention defines it as a global learning parameter. The global learning parameter is used to represent the global representation of the entire gene expression matrix. The output embedding after being processed by the subsequent gene expression matrix encoding module will be used to summarize the characteristics of the entire gene expression matrix. The global learning parameter is a learnable parameter and can be expressed as , the gene expression matrix characteristics obtained at this time can be expressed as .

[0040] In this embodiment, the gene expression matrix encoding module can use any network model structure that can encode matrix data or image data. The input position of the gene expression matrix encoding module may include classification tags corresponding to global learning parameters. The output of the classification tags will be used as the global representation of the entire gene expression matrix and used to capture the overall correlation information between gene expression and text during the text processing task. For example, the gene expression matrix encoding module can use a Transformer encoder, such as Figure 2 As shown, the gene expression matrix encoding module includes multiple Transformer blocks, each Transformer block is a layer, and the Transformer block may include a multi-head attention layer based on the MHSA (Multi-Head Self-Attention) mechanism, a residual connection and a normalization layer, and a FFN (Feed-Forward Network) layer. The output of each layer is passed to the next layer through the residual connection and the normalization layer. Accordingly, the gene expression matrix features are input into the gene expression matrix encoding module, and the Transformer block of each layer of the gene expression matrix encoding module processes the gene expression matrix features, and the output of the gene expression matrix encoding module It can be expressed as: Among them, MHSA represents the multi-head self-attention layer, FFN represents the feedforward network layer, and L is the number of Transformer layers. After encoding by all L layers of Transformers, the final output of the classification label represents the global embedding of the entire gene expression matrix, that is, the global gene vector data It can be expressed as: , D represents the dimension, that is, the dimension after each sub-gene expression matrix is ​​flattened and projected into the high-dimensional space.

[0041] Furthermore, in order to improve the processing efficiency of the gene expression matrix encoding module, a variational autoencoder (VAE) or a graph neural network (GNN) can be used to process the high-dimensional and sparse gene expression matrix.

[0042] Furthermore, in order to improve the efficient encoding of gene expression data, the present embodiment can also pre-construct a gene expression matrix encoder, encode the input gene expression data through the gene expression matrix encoder, and output the gene global vector data. Wherein, the gene expression matrix encoder includes an input layer, a gene expression matrix representation layer, a position information adding layer, a classification mark adding layer, a gene expression matrix encoding module and an output layer, wherein the input layer is used to receive gene expression data, the gene expression matrix representation layer divides the gene expression data into multiple sub-gene expression matrices, the position information adding layer adds position learning parameters to each sub-gene expression matrix; the classification mark adding layer adds global learning parameters before the gene vector sequence data corresponding to each sub-gene expression matrix to which the position learning parameters are added, as gene expression matrix features; the gene expression matrix features are input to the gene expression matrix encoding module, and the gene expression matrix encoding module encodes the gene expression matrix features; the output layer is used to output the classification mark corresponding to the gene expression matrix encoding module as gene global vector data.

[0043] From the above, it can be seen that this embodiment can capture the deep nonlinear relationship between gene expression data and text information and extract implicit biological information by extracting the nonlinear features of gene expression data based on Transformer, thereby improving the analysis effect of gene expression data.

[0044] The above embodiment does not limit how to encode text data. Based on the above embodiment, the present invention also provides an exemplary method for generating text vector data, which may include the following contents: The text data is segmented to obtain a plurality of text words; each text word is input into a text encoding module to be encoded by the text encoding module; and the output corresponding to the classification mark of the text encoding module is used as text vector data.

[0045] In this embodiment, the text encoding module can use any network model structure that can encode text data, and the present invention does not impose any limitation on this. Similarly, the input position of the text encoding module includes a classification tag. After encoding the input text data, the output of [CLS] token (classification tag) is obtained as the global embedding of the entire text, that is, the text vector data is obtained. The text vector data can be expressed as , D represents the dimension of the matrix R. Text vector data can be used for alignment with global gene vector data or other downstream tasks. The so-called alignment means that the information contained in the text description and the gene expression matrix is ​​consistent, that is, the text vector data can accurately describe the meaning of the gene expression matrix.

[0046] Furthermore, in order to improve the efficient encoding of text data, a text encoder can be pre-built. For example, a text encoder can be built based on the BERT (Bidirectional Encoder Representations from Transformers, a pre-trained language model using bidirectional encoding) architecture. The text data is input into the text encoder, and the text data is first segmented and embedded into the vector space. After L layers of BERT Transformer encoding, the text vector data is obtained according to the [CLS] token output.

[0047] The above embodiment does not limit how to encode the fusion data of the gene global vector data and the text data. Based on the above embodiment, the present invention also provides two parallel global text vector data generation methods according to different fusion methods of the gene global vector data and the text data, which may include the following contents: In one exemplary implementation, the text data is segmented to obtain an initial text embedding sequence; the gene global vector data is spliced ​​before the initial text embedding sequence to obtain fused vector data; the fused vector data is input into the gene-aware text encoding module, so that the fused vector data is encoded by the gene-aware text encoding module; and the output of the gene-aware text encoding module is used as the global text vector data. In another exemplary implementation, the text data is segmented to obtain an initial text embedding sequence; the initial text embedding sequence and the gene global vector data are input into the gene-aware text encoding module, so that the gene-aware text encoding module is used to interactively calculate the query matrix of each text word in the initial text embedding sequence with the key matrix and value matrix of the gene global vector data, and the interactive calculation result is encoded as the fused vector data; and the output of the gene-aware text encoding module is used as the global text vector data.

[0048] In order to capture the content related to the characteristics of the gene expression matrix in the text, this embodiment not only performs conventional encoding processing on the text data, but also introduces contextual information related to gene expression. For example, additional global information embedding of the gene expression matrix is ​​added on the basis of standard text encoding. That is, in order to have gene perception capabilities, the initial text embedding sequence will be combined with the global embedding from the gene expression matrix. The global embedding of the gene expression matrix comes from the output of the aforementioned gene expression matrix encoder, that is, the gene global vector data is embedded in the text data. In order to achieve the fusion of gene global vector data and text data, the text data can be first segmented and embedded into the vector space to obtain the initial text embedding sequence. The initial text embedding sequence can be expressed as ,in, represents the embedding vector of the i-th word in the text data, and n is the length of the text data. After obtaining the initial text embedding sequence, a simple data fusion method is to use vector splicing, that is, to splice the gene global vector data into the initial text embedding sequence to obtain fused vector data that can provide additional information about the gene context. Exemplarily, the fused vector data can be represented as . Any network model that can encode vector data can be used to build the gene-aware text encoding module. For example, the gene-aware text encoding module can be based on the multi-layer BERT network model structure. BERT includes multiple Transformer blocks. The fused vector data is input into the gene-aware text encoding module. The Transformer of each layer of the gene-aware text encoding module will process the fused vector data through a multi-head self-attention mechanism, and use a feed-forward network (FFN) to further calculate the processed information. After the calculation of L layers of Transformer, a global representation of the text containing the influence of genetic information is obtained. The process can be expressed by the following relationship, , is the output of the gene-aware text encoding module. The [CLS] tag after Transformer encoding will be used as the global embedding representation of the entire text, which not only contains the semantic information in the text, but also combines the contextual information related to gene expression. This paper defines it as global text vector data. For example, it can be expressed as: , The corresponding output is the [CLS] tag. The global text vector data can be used for further alignment and matching with the embedding of the gene expression matrix. In downstream text processing tasks, such as gene-text matching tasks and gene function annotation prediction tasks, the implicit information related to genes in the text can be captured.

[0049] Compared with simply splicing the global embedding of gene expression into the text embedding sequence, in order to further improve the information fusion between the text and the gene expression matrix, the present invention can also realize the information fusion between the text data and the gene expression matrix by introducing a cross attention mechanism. In this embodiment, the gene-aware text encoding module also includes a cross attention layer. When the gene-aware text encoding module encodes the gene global vector data and the text data, the cross attention layer dynamically pays attention to the specific part of the text and the relevant part of the corresponding gene expression matrix. Through the cross attention, in each encoding step, not only the contextual information of the text can be captured, but also different importance weights can be given to different text fragments according to the characteristics of the gene expression matrix.

[0050] Further, in order to improve the efficient encoding of the fusion data of the global gene vector data and the text data, the present embodiment may also pre-construct a gene-aware text encoder, and fuse and encode the text embedding and gene expression embedding obtained by the text encoder and the gene expression matrix encoder respectively through the gene-aware text encoder, and finally output the global text vector data. Exemplarily, the gene-aware text encoder may include a text sequence generation layer, a splicing layer, a gene-aware text encoding module, and an output layer, wherein the text sequence generation layer performs word segmentation processing on the text data to obtain an initial text embedding sequence; the splicing layer splices the global gene vector data to the initial text embedding sequence to obtain fused vector data; the gene-aware text encoding module encodes the fused vector data; and the output layer uses the output of the classification label of the gene-aware text encoding module as the global text vector data. Exemplarily, the gene-aware text encoder may also include a gene-aware text encoding module and an output layer. The gene-aware text encoding module obtains the initial text embedding sequence and the gene global vector data through the text encoder and the gene expression matrix encoder, respectively. In the Transformer layer, the query matrix Q of each text word is interactively calculated with the key matrix K and the value matrix V of the gene expression matrix, thereby generating an attention-weighted text embedding containing the gene expression context, and then the interactive calculation result is encoded as the fusion vector data, and finally the output corresponding to the classification tag of the gene-aware text encoding module is used as the global text vector data through the output layer. It can not only capture the potential relationship of gene information in the text, but also form a more accurate global text embedding representation through adaptive learning of the part closely related to gene expression in the text data.

[0051] As can be seen from the above, this embodiment can obtain text data that perceives the global information of the gene expression matrix through the gene-aware text encoder, encode the text data into a high-dimensional vector representation, and facilitate the combination with the potential representation of the gene expression matrix to achieve the combination of gene expression embedding and text embedding. The representation of text data is dynamically adjusted through the multi-head self-attention mechanism to capture the correlation between words in the text and the relationship between the text and the gene expression potential space, ensuring that the content in the text can reflect the characteristics of gene expression and strengthen the text's understanding of gene expression. The gene-aware text encoder integrates the global embedding information of the gene expression matrix into the text encoding process. While capturing the text semantics during the execution of the text processing task, it fully combines the background information of gene expression and enhances the performance in gene-related tasks.

[0052] The above embodiment does not limit how to perform decoding processing in combination with the information of the gene expression matrix during the process of generating or translating text. Based on the above embodiment, the present invention may also include the following contents: The gene global vector data is spliced ​​before the preceding text sequence to obtain text-gene fusion data; the converter network model is used as a gene-aware text decoding module, and the text-gene fusion data is input into the gene-aware text decoding module for decoding processing through the gene-aware text decoding module.

[0053] In this embodiment, the preamble text sequence is the text data generated by the previous decoding step or part of the text data that has been generated in the process before the text processing task. The text data can be text data input by the user, for example, it can be information that prompts the type of task to be performed by the gene-aware text decoding module. In each decoding step, the global embedding of the gene expression matrix, that is, the gene global vector data, is fused with the preamble text sequence and input into the gene-aware text decoding module, so that the generated text not only depends on the previously generated content, but is also affected by gene expression. The initial input of the gene-aware text decoding module, that is, before the gene global vector data is generated, only includes the existing text data, that is, the preamble text sequence, which can be expressed as , represents the embedding of the mth word in the preceding text sequence, where m represents the text length of the preceding text sequence. In each decoding step, the gene global vector data is dynamically introduced to ensure that the generated text data can refer to the gene expression information at each decoding stage. The gene information is always involved in each step of the decoding process to ensure that the generated text can contain context related to gene expression. Exemplarily, the gene global vector data is fused with the text gene data of the preceding text sequence. It can be expressed as . The gene-aware text decoding module can be pre-built based on the standard Transformer decoder structure. Similarly, the gene-aware text decoding module includes multiple Transforme blocks, each of which contains a multi-head attention layer based on a multi-head self-attention mechanism, a cross-attention layer based on a cross-attention mechanism, and a feedforward network layer. Among them, the multi-head attention layer is used to exchange information in the generated text sequence, and the cross-attention layer is used to interact the gene global vector data with the preceding text sequence during the decoding process, so that the gene-aware text decoding module can dynamically generate appropriate text content according to the characteristics of gene expression. Exemplarily, when the gene-aware text decoding module decodes in the i-th step, the word embedding data generated by multi-layer Transformer calculation is It can be expressed as According to the further decoding of the word embedding data generated in each decoding step of the gene-aware text decoding module, text data containing not only the semantic information of the text but also the contextual information in the gene expression matrix is ​​generated, which is more biologically meaningful.

[0054] Furthermore, in order to improve the order and context consistency of the final generated text, the preceding text sequence may be processed to generate text fragments, which may include the following: An upper triangular matrix with the same length as the preceding text sequence is created, and the value on the right side of the diagonal of the upper triangular matrix is ​​set to infinity as mask information; the mask information is used to perform a mask operation on each text word of the preceding text sequence; the attention weight is determined according to the query matrix, key matrix and value matrix of the preceding text sequence, and the context vector of each text word of the preceding text sequence is determined according to the attention weight; a text segment of the preceding text sequence is generated according to the context vector of each text word, and the text segment is merged with the gene global vector data.

[0055] In this embodiment, if the preceding text sequence is not a vector that maps words to a high-dimensional space, the preceding text sequence can be first converted into an embedding, that is, each word in the sentence is mapped to a vector in a high-dimensional space. For example, for the sentence "The sun rises in the east", a dictionary can be created to map each word to a unique integer index, and then these indexes can be converted into vector form using an embedding layer. In order to consider only all the words before it when generating each word, without relying on future information, the future words of each processed word in the input text can be masked, so that only the previous context is considered when predicting each new word. In order to achieve causal self-attention, this embodiment can use an upper triangular matrix to mask future information. For example, a matrix of the same size as the length of the sequence can be created, and the values ​​on the right side of the diagonal are set to infinity or a very large negative number, so that before applying the softmax (activation function name) function, the attention scores of these positions will become very small, almost zero. After the masking operation, the attention score can be calculated first, and then the softmax function is used to normalize the attention score to obtain the final attention weight. The attention weight is used to determine the influence of each word in the previous text sequence in generating the next word. The context vector of each word is calculated using the attention weight. This vector is the weighted sum of all word vectors, and the weight is determined by the attention weight. This context vector will be used to predict the next word.

[0056] Finally, the context vector is used to generate the text snippet. At each step, only the information available before the current step is used to generate the next word, thus ensuring that the generated text is coherent and fits the context.

[0057] Furthermore, after obtaining the text data output by each decoding step, the global embedding information of the gene expression matrix can be further combined through the cross-attention mechanism. Exemplarily, each text data is dynamically adjusted again according to the global gene vector data, so that the final generated text not only conforms to the semantic context, but also effectively reflects the influence of gene-related information, and can adaptively process the relationship between text and gene expression, thereby more accurately capturing the potential correlation between text and gene expression in the generation process, and improving the biological relevance of the generated results.

[0058] Further, in order to improve decoding efficiency, the present embodiment can also pre-construct a gene-aware text decoder. In the text generation process, the gene-aware text decoder introduces gene expression embedding information, adaptively combines the gene expression matrix, and dynamically selects key information in the text generation process through a cross-attention mechanism, so that the generated text can contain important content related to the gene expression matrix. The gene-aware text decoder may include a causal attention layer, a text gene fusion layer, a gene-aware text decoding module, a cross-attention layer, and an output layer; wherein the causal attention layer processes the preceding text sequence to generate a text segment, the text gene fusion layer splices the gene global vector data to the front of the text segment to obtain the text gene fusion data, the gene-aware text decoding module decodes the text gene fusion data, the cross-attention layer adjusts the output of each decoding step of the gene-aware text decoding module again according to the gene global vector data, and the output layer is used to output the text data adjusted by the cross-attention layer as the execution result of the text task to be processed.

[0059] As can be seen from the above, this embodiment can adaptively select vocabulary or sentence structures related to gene information during text generation through the gene-aware text decoder, ensuring that the generated text is highly relevant to the gene data, and improving the accuracy, interpretability and biological relevance of gene-related text generation tasks. Furthermore, based on the causal self-attention mechanism, the previous order is effectively processed to generate text fragments that meet the context, ensuring that each newly generated word is inferred only based on the previously generated content, thereby maintaining the order and contextual consistency of the generated text.

[0060] Related technologies usually use linear methods when analyzing gene expression data, but traditional linear methods cannot fully express the nonlinear relationship between text data and gene expression matrix, resulting in inaccurate gene expression analysis results. In addition, this linear method cannot build a robust model in the face of data scarcity and noise interference when facing the differences between high-dimensional gene expression data and natural language text. Based on the above embodiments, the present invention also provides a text task processing model for processing gene expression data and text data, which may include the following contents: like Figure 3As shown, a text task processing model is pre-built; a text training sample set matching the text task to be processed is obtained, and the text task processing model is trained using the text training sample set until the model training stop condition is reached, thereby obtaining a text task processing model for executing the text task to be processed. Accordingly, the process of executing the text task to be processed using the text task processing model can be as follows: inputting text data and gene expression data into the text task processing model; the input layer of the text task processing model receives the text data and gene expression data; the gene expression matrix encoder encodes the gene expression data with added position learning parameters and global learning parameters into gene global vector data, the text encoder encodes the text data into text vector data, and the gene-aware text encoder encodes the fusion data of the gene global vector data and the text data into global text vector data; the decoding layer fuses the pre-order text sequence and the gene global vector data that already exist during the current decoding, and decodes the text gene fusion data to obtain the text data containing gene information corresponding to the current decoding step; the output layer determines the execution result of the text task to be processed according to the text data output by each decoding step, and outputs it.

[0061] Wherein, the text training sample set includes multiple groups of text-gene training samples, and the text-gene training samples include text samples and corresponding gene expression samples; for example, if the text task to be processed is a gene-text matching task, the text-gene training sample is a set of samples in which the text and the gene expression matrix are already matched; if the text task to be processed is a gene annotation task, the text data in the text-gene training sample is the annotation information of the gene expression matrix, and the gene expression sample is the gene expression matrix. The model training stop condition can be, for example, the number of iterations reaching a preset number of iterations, or the model accuracy exceeding a preset accuracy threshold, which does not affect the implementation of the present invention. The text task processing model includes an input layer, an encoding layer, a decoding layer and an output layer; the input layer inputs text samples and gene expression samples; the encoding layer includes a gene expression matrix encoder, a text encoder and a gene-aware text encoder; the gene expression matrix encoder encodes the gene expression samples with added position learning parameters and global learning parameters into gene global vector samples, the text encoder encodes the text samples into text vector samples, and the gene-aware text encoder encodes the text samples concatenated with the gene global vector samples into global text vector samples; the decoding layer fuses the pre-order text sequence samples and the gene global vector samples that already exist during the current decoding, and decodes the text-gene fusion samples to obtain the text sample data containing gene information corresponding to the current decoding. Based on this, the training of the text task processing model can be: According to the preset batch size, a corresponding number of text-gene training samples are obtained from the text training sample set, and the obtained text-gene training samples are input into the text task processing model. Gene expression samples and text samples are encoded by their respective encoders to obtain gene global embedding and text global embedding. In the gene-aware text generation task, the text decoder receives gene embedding as context information. Gene-text retrieval loss, gene-aware text encoding loss and gene-aware text generation loss are calculated respectively, and combined into a joint loss function according to weights. The gradient of the model parameters of the text task processing model is calculated by the back propagation algorithm, and the model parameters of the text task processing model are updated by the optimizer. The corresponding scale of text-gene training samples are continuously obtained from the text training sample set and input into the text task processing model to execute the above process. In the process of training the text task processing model, the training effect of the model can be evaluated by the change of the loss value on the validation set. By evaluating the performance of different tasks separately, it can be judged whether the performance of the model on each subtask meets expectations, and the model structure or training parameters of the text task processing model can be adjusted accordingly. The performance of each task is continuously optimized through multiple iterations until the loss function converges and the text task processing model reaches the best performance.

[0062] The above embodiment does not impose any limitation on the loss function of the text task processing model. In order to improve the performance of the text task processing model and enhance the accuracy of task execution, based on the above embodiment, the present invention also provides a method for determining the loss function, which may include the following contents: Pre-construct an initial loss function of the text task processing model, and generate weight factors of gene text retrieval loss, gene-aware text encoding loss, and gene-aware text generation loss according to the task type of the text task to be processed; adjust the initial loss function according to the respective weight factors of gene text retrieval loss, gene-aware text encoding loss, and gene-aware text generation loss to obtain a loss function; use a text training sample set to train the text task processing model based on the loss function.

[0063] In this embodiment, the initial loss function includes gene text retrieval loss, gene-aware text encoding loss, and gene-aware text generation loss. Gene text retrieval loss is used to maximize the similarity between a text sample and its corresponding gene expression sample, while minimizing the similarity between a text sample and other gene expression samples, thereby maximizing the similarity of each correct pairing in the process of training a text task processing model based on gene text retrieval loss, while making the similarity of irrelevant pairs as low as possible, which is suitable for gene-text retrieval tasks. Exemplarily, gene text retrieval loss can be expressed by the following relationship: ; In the formula, Represents gene text retrieval loss, Ei is the i-th gene expression sample, Ti is the text sample corresponding to the i-th gene expression sample, Tj is the j-th text sample that does not correspond to the i-th gene expression sample, N represents the total number of text-gene training samples, f represents the similarity calculation function, and e represents the logarithm. Gene text retrieval loss can maximize the similarity between the gene expression matrix Ei and its corresponding text description Ti through contrastive learning, while minimizing the similarity with irrelevant text Tj, so that it is more suitable for gene-text retrieval tasks. Exemplarily, gene text retrieval loss strengthens the correct gene-text pairing by calculating the similarity f(Ei, Ti) between the gene expression matrix Ei and its corresponding text description Ti. At the same time, the similarity f(Ei, Tj) of the wrong pairing Ei and Tj is suppressed. Further, the gene text retrieval loss uses logarithms to weight the similarity of positive samples, while reducing the contribution of negative samples, so that the text task processing model learns the significance of the correct pairing, and optimizes the sample pairs in the entire training batch to ensure that the text task processing model can effectively distinguish the correct gene-text relationship.

[0064] Among them, the gene-aware text encoding loss is used to evaluate the degree of matching between the input text sample and the gene expression sample of the text task processing model. In the process of training the text task processing model based on the gene-aware text encoding loss, the text task processing model is optimized by minimization, so that it can better predict the matching relationship between the gene expression matrix and the text, and can accurately predict whether the gene expression matrix matches the text, ensuring that the model can accurately associate the gene expression data with the text description related to the disease, and has a high accuracy for disease prediction. For example, in the task of predicting brain diseases, it can improve the accuracy of understanding the disease mechanism and diagnostic prediction. Exemplarily, the gene-aware text encoding loss function adopts the form of binary cross entropy to calculate the model's prediction accuracy for whether the gene expression matrix Ei matches the text Ti. The gene-aware text encoding loss can be expressed by the following relationship: ; In the formula, represents the gene-aware text encoding loss, N represents the total number of text-gene training samples, and yi represents the actual matching label, that is, the label of whether the gene expression matrix Ei matches the text Ti. For example, yi=1 means that Ei and Ti are correctly matched, and yi=0 means that Ei and Ti do not match. Pi is the matching probability of Ei and Ti predicted by the text task processing model, which can represent the confidence of the text task processing model in predicting the match. When yi=1, the loss function encourages pi to approach 1, indicating that Ei and Ti are correctly predicted to match; when yi=0, the loss function encourages pi to approach 0, indicating that the model correctly predicts that Ei and Ti do not match.

[0065] Among them, the gene-aware text generation loss is used to evaluate the ability of the text task processing model to generate text under the condition of gene expression context. In the process of training the text task processing model based on the gene-aware text generation loss, the probability of the text task processing model predicting the next word when given the previous generated words and the gene expression matrix is ​​measured to ensure that the text task processing model can comprehensively utilize gene expression information in the process of generating text and provide more accurate and targeted text output. For example, the gene-aware text generation loss can represent the log-likelihood loss of the text task processing model at each step of generating words. By summing the words of the entire generated sequence and minimizing the prediction error of each word in the generation process, it can be expressed by the following relationship: ; In the formula, represents the gene-aware text generation loss, is the pre-order generated word, that is, each word in the pre-order text sequence, E is the gene expression sample, T represents the length of the pre-order text sequence, and t is the tth word in the pre-order text sequence. This loss function can be based on the generative task. and the probability of predicting the next word based on the gene expression sample E. The formula represents the log-likelihood loss of the model at each step to generate a word. The gene-aware text generation loss emphasizes that the text task processing model should not only generate the next word based on the previous text, but also combine the global information of the gene expression matrix so that the generated text content can accurately reflect the characteristics and context of gene expression. For disease-related text generation tasks, since the text finally generated by the text task processing model can accurately capture the potential relationship between gene expression and disease progression, it is beneficial to improve the accuracy of such text generation tasks and generate text data containing more accurate disease-related information. In the process of training the text task processing model, by minimizing the gene-aware text generation loss, the text task processing model will learn how to generate coherent and meaningful text related to the gene expression background. Especially in the fields of medicine and bioinformatics, this generation task can assist medical researchers in automatically generating reports or diagnostic descriptions related to gene expression.

[0066] In order to ensure that the text processing model can simultaneously handle gene-text retrieval, gene-text matching, and text generation tasks under gene conditions, the loss function of the text processing model can adopt a joint loss function that comprehensively considers the loss functions of each task. The generalization ability of each task can be improved through shared representation. For example, while the model is performing gene-text retrieval, it is also learning how to better encode the matching relationship between gene expression and text, which is conducive to improving the overall performance of the text task processing model. In the actual text processing model training process, these loss functions will work together to optimize the overall performance of the model. Exemplarily, the loss function L of the text processing model can be expressed as: ; Among them, λ1 is the weight factor of gene text retrieval loss, λ2 is the weight factor of gene-aware text encoding loss, and λ3 is the weight factor of gene-aware text generation loss. The weight coefficient in front of each loss function can weight the loss according to the importance of the task, ensuring that the performance of the text task processing model on different tasks is balanced. The joint loss function converts the model training process into a multi-task learning problem. The model learns multiple tasks simultaneously and shares the global embedding information of the gene expression matrix. In the early stage of text task processing model training, uniform weights can be used, that is, λ1=λ2=λ3=1. With the continuous training of the text task processing model, the weights can be dynamically adjusted according to the needs and performance of different tasks. For example, if the text task processing model performs poorly in the generation task, the weight of λ3 can be appropriately increased to focus on optimizing the generation task. In the study of brain diseases, the gene-text matching task may be more practical than the text generation task. Accordingly, the weight λ1 of the gene text retrieval loss can be increased. The distribution of weights should reflect the priority of the task to ensure that the text task processing model can meet the needs of different tasks.

[0067] As can be seen from the above, this embodiment combines transfer learning with background noise processing, so that the text task processing task can still have good performance in the face of scarce or unlabeled data. Furthermore, the gene-text retrieval loss, gene-aware text encoding loss, and gene-aware text generation loss are jointly optimized to ensure that the text task processing model can simultaneously achieve excellent performance in multiple gene-aware tasks such as gene-text matching, text generation, and gene conditional generation, improve the understanding, matching, and generation capabilities of gene expression matrices and texts, and improve the overall learning efficiency and generalization capabilities between tasks.

[0068] In order to further improve the execution accuracy of the text task processing model for the gene-text matching task and more accurately identify whether the input gene expression data matches the text data, based on the above embodiment, the present invention can also perform dynamic data enhancement processing on the gene expression samples and text samples included in the text training sample set to ensure the diversity of training data and the effectiveness of model training, which may include the following contents: The text task processing model is initially trained using a text training sample set to obtain text sample-gene expression sample pairs and corresponding similarity scores generated by the text task processing model during the initial training process, and the similarity scores are used as confidence scores for the text sample-gene expression sample pairs; a target text sample-gene expression sample pair that meets a preset similarity condition is selected from each text sample-gene expression sample pair; a variant text sample-gene expression sample pair of each target text sample-gene expression sample pair is obtained by adding fluctuation conditions and / or replacing similar text descriptions for each target text sample-gene expression sample pair; and the text task processing model obtained by the initial training is trained again using each target text sample-gene expression sample pair and each variant text sample-gene expression sample pair.

[0069] In the present embodiment, the text task processing model is preliminarily trained using the gene-text matching in the text training sample set, so that it learns the corresponding relationship between the gene expression matrix and the text description. In this process, the text task processing model generates a large number of gene-text pairing samples and corresponding similarity scores, and the similarity score of each gene-text pairing can be used as the corresponding confidence score. After completing the preliminary training, high-quality gene-text pairing samples can be screened out by the similarity score, and the preset similarity condition can be a pre-set similarity screening condition. The higher the similarity, the more reliable the pairing of the sample. For each pair of gene expression matrix and text description, the following relationship can be used to calculate the similarity value between the two, and a similarity threshold is set. The similarity threshold can, for example, take a numerical value between 0.7 and 0.9. If the gene expression matrix and text description Similarity value If the similarity is greater than the threshold, it is considered to meet the preset similarity condition. Only gene-text pairs with similarity higher than the threshold are retained, and paired samples with low similarity are removed to ensure that only high-quality training data is used in the data enhancement process. The calculation of the similarity value can be implemented by calling the following relationship: .

[0070] After screening out high-quality gene-text paired samples, for ease of description, these samples are defined as target text sample-gene expression sample pairs. For each target text sample-gene expression sample pair, a new gene expression matrix sample can be generated by simulating gene expression under different experimental conditions, by random perturbation or by adding noise. For example, the target text sample-gene expression sample pair can be generated according to Perform a slight perturbation by randomly adding noise Or other small transformations, such as scaling, translation, etc., to generate multiple variant samples, thereby obtaining more similar but slightly different gene expression matrices. , is the standard deviation of the noise, which is usually set small to maintain the biological plausibility of gene expression.

[0071] On this basis, the target text sample-gene expression sample pair can also be used to increase data diversity by replacing synonyms in the text. For the text description that matches the gene expression matrix, multiple different text versions can be generated, for example, by using synonym replacement, changing sentence structure, adjusting word order, etc., to ensure that the enhanced text still accurately expresses gene-related content, but has a certain degree of language diversity. For example, the target text sample of the target text sample-gene expression sample is: The gene is highly expressed under condition X, which can be replaced with: Under condition X, the gene shows a high expression level to generate a new text sample. After generating new samples through the above data enhancement, the enhanced gene-text pairing samples are combined with the original training data to form a richer data set. These high-quality enhanced data are re-input into the text task processing model for training, further improving the performance of the model in the gene expression matrix and text pairing task, ensuring that it performs more robustly when facing complex gene-text matching tasks.

[0072] As can be seen from the above, this embodiment performs data enhancement processing on high-quality gene-text pairing samples selected from the text training sample set, generates different gene expression matrices and diversified text samples from the disturbance of the gene expression matrix and the diversification of the text data, repeatedly trains the text task processing model, and improves the robustness of the text task processing model. Through multiple iterative optimizations, it is ensured that the text task processing model can still show high robustness under conditions of data scarcity and high noise, and achieve better generalization performance in complex bioinformatics tasks.

[0073] The present invention also provides a corresponding device for the text task processing method, which further makes the method more practical. Among them, the device can be described from the perspective of functional modules and hardware. The text task processing device provided by the present invention is introduced below. The device is used to implement the text task processing method provided by the present invention. In this embodiment, the text task processing device may include or be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to complete the text task processing method disclosed in Example 1. The program module referred to in this embodiment refers to a series of computer program instruction segments that can complete specific functions, which is more suitable for describing the execution process of the text task processing device in the storage medium than the program itself. The following description will specifically introduce the functions of each program module of this embodiment. The text task processing device described below and the text task processing method described above can be referenced to each other.

[0074] From the perspective of functional modules, see Figure 4 , Figure 4 The structural diagram of the text task processing device provided in this embodiment under a specific implementation mode, the device may include: The data acquisition module 401 is used to acquire text data and gene expression data corresponding to the text task to be processed; the text task to be processed is a task of generating a text containing gene information.

[0075] The encoding module 402 is used to encode the gene expression data with the position learning parameters and the global learning parameters added into the gene global vector data. According to the text task to be processed, the text data is encoded into the text vector data and / or the fusion data of the gene global vector data and the text data is encoded into the global text vector data. Among them, the position learning parameters are used to learn the sequential feature information of the gene expression data, and the global learning parameters are used to learn the global features of the gene expression data.

[0076] The decoding module 403 is used to fuse the preamble text sequence and the gene global vector data that already exist during the current decoding, and decode the text-gene fusion data to obtain the text data containing gene information corresponding to the current decoding step.

[0077] The result output module 404 is used to determine the execution result of the text task to be processed according to the text data output by each decoding step.

[0078] Illustratively, in some implementations of the present embodiment, the above-mentioned encoding module 402 may also be used for: dividing the gene expression data into a plurality of sub-gene expression matrices, and adding positional learning parameters to each sub-gene expression matrix; adding global learning parameters as gene expression matrix features before the gene vector sequence data corresponding to each sub-gene expression matrix to which the positional learning parameters are added; inputting the gene expression matrix features into the gene expression matrix encoding module, so as to encode the gene expression matrix features using the gene expression matrix encoding module; the input position of the gene expression matrix encoding module includes classification labels; and using the output corresponding to the classification labels of the gene expression matrix encoding module as gene global vector data.

[0079] Exemplarily, in some other implementations of this embodiment, the above-mentioned encoding module 402 can also be used for: performing word segmentation processing on text data to obtain multiple text words; inputting each text word into a text encoding module to perform encoding processing using the text encoding module; the input position of the text encoding module includes a classification mark; and using the output corresponding to the classification mark of the text encoding module as text vector data.

[0080] Exemplarily, in some other implementations of this embodiment, the above-mentioned encoding module 402 can also be used for: performing word segmentation processing on text data to obtain an initial text embedding sequence; splicing the gene global vector data before the initial text embedding sequence to obtain fused vector data; inputting the fused vector data into the gene-aware text encoding module to encode the fused vector data using the gene-aware text encoding module; and using the output of the gene-aware text encoding module as global text vector data.

[0081] Exemplarily, in some other implementations of the present embodiment, the above-mentioned encoding module 402 can also be used to: encode the fusion data of gene global vector data and text data into global text vector data, including: performing word segmentation processing on the text data to obtain an initial text embedding sequence; inputting the initial text embedding sequence and the gene global vector data into the gene-aware text encoding module, so as to use the gene-aware text encoding module to interactively calculate the query matrix of each text word in the initial text embedding sequence with the key matrix and value matrix of the gene global vector data, and encode the interactive calculation result as the fusion vector data; and use the output of the gene-aware text encoding module as the global text vector data.

[0082] Exemplarily, in some other implementations of this embodiment, the above-mentioned decoding module 403 can also be used to: splice the gene global vector data before the preceding text sequence to obtain text gene fusion data; use the converter network model as a gene-aware text decoding module, and input the text gene fusion data into the gene-aware text decoding module for decoding processing through the gene-aware text decoding module.

[0083] As an exemplary implementation of the above embodiment, the above decoding module 403 can also be further used to: create an upper triangular matrix with the same length as the previous text sequence, and set the value on the right side of the diagonal of the upper triangular matrix to infinity as mask information; use the mask information to perform a mask operation on each text word of the previous text sequence; determine the attention weight according to the query matrix, key matrix and value matrix of the previous text sequence, and determine the context vector of each text word of the previous text sequence according to the attention weight; generate a text fragment of the previous text sequence according to the context vector of each text word, and fuse the text fragment with the gene global vector data.

[0084] Exemplarily, in some other implementations of the present embodiment, the above-mentioned device may also include a model training module for pre-building a text task processing model; the text task processing model includes an input layer, an encoding layer, a decoding layer and an output layer; a text training sample set matching the text task to be processed is obtained, the text training sample set includes multiple groups of text-gene training samples, and the text-gene training samples include text samples and corresponding gene expression samples; the text training sample set is used to train the text task processing model until the model training stop condition is reached, and a text task processing model for executing the text task to be processed is obtained; wherein, the input layer inputs text samples and gene expression samples, and the encoding layer includes a gene expression matrix encoder, a text encoder and a gene-aware text encoder; the gene expression matrix encoder encodes the gene expression samples with added position learning parameters and global learning parameters into gene global vector samples, the text encoder encodes the text samples into text vector samples, and the gene-aware text encoder encodes the text samples of the spliced ​​gene global vector samples into global text vector samples; the decoding layer fuses the pre-order text sequence samples and the gene global vector samples that already exist during the current decoding, and decodes the text gene fusion samples to obtain the text sample data containing gene information corresponding to the current decoding.

[0085] As an exemplary implementation of the above embodiment, the above device may also include a task execution module, which can be used to input text data and gene expression data into a text task processing model; the input layer of the text task processing model receives text data and gene expression data; the gene expression matrix encoder encodes the gene expression data with added position learning parameters and global learning parameters into gene global vector data, the text encoder encodes the text data into text vector data, and the gene-aware text encoder encodes the fusion data of the gene global vector data and the text data into global text vector data; the decoding layer fuses the preamble text sequence and the gene global vector data that already exist during the current decoding, and decodes the text-gene fusion data to obtain the text data containing gene information corresponding to the current decoding step; the output layer determines the execution result of the text task to be processed based on the text data output by each decoding step, and outputs it.

[0086] As an exemplary implementation of the above embodiment, the above model training module can also be used to: pre-construct an initial loss function of the text task processing model; the initial loss function includes gene text retrieval loss, gene-aware text encoding loss and gene-aware text generation loss; generate weight factors of gene text retrieval loss, gene-aware text encoding loss and gene-aware text generation loss according to the task type to which the text task to be processed belongs; adjust the initial loss function according to the respective weight factors of gene text retrieval loss, gene-aware text encoding loss and gene-aware text generation loss to obtain a loss function; use a text training sample set to train the text task processing model based on the loss function; wherein, the gene text retrieval loss is used to maximize the similarity between the text sample and its corresponding gene expression sample while minimizing the similarity between the text sample and other gene expression samples; the gene-aware text encoding loss is used to evaluate the degree of matching between the input text sample and the gene expression sample by the text task processing model; the gene-aware text generation loss is used to evaluate the ability of the text task processing model to generate text under the condition of gene expression context.

[0087] As an exemplary implementation method of the above embodiment, the above model training module can also be used for: using the text training sample set to perform initial training on the text task processing model, obtaining the text sample-gene expression sample pairs and corresponding similarity scores generated by the text task processing model during the initial training process, and the similarity scores are used as the confidence scores of the text sample-gene expression sample pairs; selecting target text sample-gene expression sample pairs that meet preset similarity conditions from each text sample-gene expression sample pair; obtaining variant text sample-gene expression sample pairs of each target text sample-gene expression sample pair by adding fluctuation conditions and / or replacing similar text descriptions to each target text sample-gene expression sample pair; and retraining the text task processing model obtained by the initial training using each target text sample-gene expression sample pair and each variant text sample-gene expression sample pair.

[0088] The text task processing device mentioned above is described from the perspective of functional modules. Furthermore, the present invention also provides an electronic device, which is described from the perspective of hardware. Figure 5 The following is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention in one implementation manner. Figure 5 As shown, the electronic device includes a memory 50 for storing computer programs; a processor 51 for implementing the steps of the text task processing method mentioned in any of the above embodiments when executing the computer program.

[0089] Among them, the processor 51 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the processor 51 may also be a controller, a microcontroller, a microprocessor or other data processing chip. The processor 51 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 51 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 51 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 51 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0090] The memory 50 may include one or more computer non-volatile storage media, which may be non-transitory. The memory 50 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the memory 50 may be an internal storage unit of an electronic device, such as a hard disk of a server. In other embodiments, the memory 50 may also be an external storage device of an electronic device, such as a plug-in hard disk equipped on a server, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the memory 50 may also include both an internal storage unit of an electronic device and an external storage device. The memory 50 may not only be used to store application software and various types of data installed in the electronic device, such as: the code of the program in the process of executing the text task processing method, but also be used to temporarily store data that has been output or is to be output. In this embodiment, the memory 50 is at least used to store the following computer program 501, wherein, after the computer program is loaded and executed by the processor 51, the relevant steps of the text task processing method disclosed in any of the aforementioned embodiments can be implemented. In addition, the resources stored in the memory 50 may also include an operating system 502 and data 503, etc., and the storage method may be temporary storage or permanent storage. The operating system 502 may include Windows, Unix, Linux, etc. The data 503 may include but is not limited to data corresponding to the text task processing result, etc.

[0091] In some embodiments, the electronic device may further include a display screen 52, an input / output interface 53, a communication interface 54 or a network interface, a power supply 55 and a communication bus 56. Among them, the display screen 52 and the input / output interface 53, such as a keyboard, belong to the user interface, and exemplary user interfaces may also include standard wired interfaces, wireless interfaces, etc. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface. The communication interface 54 may exemplarily include a wired interface and / or a wireless interface, such as a WI-FI interface, a Bluetooth interface, etc., which are generally used to establish a communication connection between the electronic device and other electronic devices. The communication bus 56 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0092] Those skilled in the art will understand that Figure 5 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than those shown in the figure, for example, it may also include a sensor 57 for realizing various functions.

[0093] It is understandable that if the text task processing method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes but is not limited to: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electrically erasable programmable ROM, register, hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, removable disk, CD-ROM, magnetic disk or optical disk, etc. Various media that can store program codes. Based on this, the present invention also provides a non-volatile storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the text task processing method recorded in any of the above embodiments are executed.

[0094] It is understandable that if the text task processing method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, the computer software product does not need to be stored in a physical storage medium. For example, it can be directly transmitted to a computer or other device with information processing capabilities through a wired network or a wireless network to perform all or part of the steps of the methods of each embodiment of the present invention. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product. Based on this, the present invention also provides a computer program product that stores a computer program. When the computer program is executed by a processor, the steps of the text task processing method recorded in any of the above embodiments are performed.

[0095] Finally, the present invention also provides a text task processing system, see Figure 6, the text task processing system may include a user interface 601 located at the front end and a text task processor 602 located at the back end, the user interface 601 may include at least a task triggering area, a task processing result display area, a data input area and / or a file importing area so that the user can describe the text task to be processed through the data input area, input text data and gene expression data through the data input area or the file importing area, and send the text task to be processed, the text data and the gene expression data to the text task processor through the task triggering area; the text task processor 602 processes the text data and the gene expression data based on the text task to be processed using the steps of the text task processing method described in any of the above embodiments, generates a text task processing result, and sends the text task processing result to the task processing result display area of ​​the user interface, the text task processing result can be directly displayed in text or image, or can be a file, and the identification information for the user to download is displayed at the same time. The file importing area can import the corresponding data by uploading a file, and the data input area may include a text input area and a voice input area, for example, and the user can choose to input the corresponding data in text or voice form.

[0096] In this embodiment, the text task processing system can be, for example, a web page or an application package. The user end can pre-deploy the text task processing system and display the user page of the text task processing system with the help of the human-computer interaction page of the user end. The user operates on the user page and the finally generated text data is fed back on the user page.

[0097] The above is a detailed introduction to a text task processing method, device, electronic device, non-volatile storage medium and computer program product provided by the present invention. The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can refer to each other. Whether the units and algorithm steps of each example described in each disclosed embodiment are executed in electronic hardware or computer software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods for each specific application to implement the described functions, and such implementation should not be considered to exceed the scope of the present invention. Without departing from the principles of the present invention, the present invention can also be improved and modified in a number of ways, and these improvements and modifications also fall within the scope of protection of the present invention.

Claims

1. A text task processing method, characterized in that: include: Obtain text data and gene expression data corresponding to the text task to be processed; The text task to be processed is a task of generating a text containing gene information; Encoding the gene expression data with added positional learning parameters and global learning parameters into gene global vector data; Encoding the text data into text vector data according to the text task to be processed, and / or encoding the fusion data of the gene global vector data and the text data into global text vector data; The preamble text sequence already existing in the current decoding is merged with the gene global vector data, and the text gene fusion data is decoded to obtain the text data containing gene information corresponding to the current decoding step; Determining the execution result of the text task to be processed according to the text data outputted by each decoding step; The position learning parameters are used to learn the sequential feature information of the gene expression data, and the global learning parameters are used to learn the global features of the gene expression data.

2. The text task processing method according to claim 1, characterized in that: The gene expression data is a gene expression matrix, and the gene expression data with added position learning parameters and global learning parameters is encoded into gene global vector data, including: Dividing the gene expression data into a plurality of sub-gene expression matrices, and adding position learning parameters to each sub-gene expression matrix; Before the gene vector sequence data corresponding to the sub-gene expression matrix of each added position learning parameter, add the global learning parameter as the gene expression matrix feature; Inputting the gene expression matrix features into a gene expression matrix encoding module, so as to perform encoding processing on the gene expression matrix features using the gene expression matrix encoding module; the input position of the gene expression matrix encoding module includes a classification mark; The output corresponding to the classification label of the gene expression matrix encoding module is used as the gene global vector data.

3. The text task processing method according to claim 1, characterized in that: Encoding the text data into text vector data includes: Performing word segmentation processing on the text data to obtain a plurality of text words; Inputting each text word into a text encoding module to perform encoding processing using the text encoding module; the input position of the text encoding module includes a classification mark; The output corresponding to the classification mark of the text encoding module is used as text vector data.

4. The text task processing method according to claim 1, characterized in that: Encoding the fusion data of the gene global vector data and the text data into global text vector data includes: Performing word segmentation processing on the text data to obtain an initial text embedding sequence; splicing the gene global vector data to the beginning of the initial text embedding sequence to obtain fused vector data; Inputting the fused vector data into a gene-aware text encoding module, so as to encode the fused vector data using the gene-aware text encoding module; The output of the gene-aware text encoding module is used as global text vector data.

5. The text task processing method according to claim 1, characterized in that: Encoding the fusion data of the gene global vector data and the text data into global text vector data includes: Performing word segmentation processing on the text data to obtain an initial text embedding sequence; Inputting the initial text embedding sequence and the gene global vector data into a gene-aware text encoding module, using the gene-aware text encoding module to interactively calculate the query matrix of each text word of the initial text embedding sequence with the key matrix and the value matrix of the gene global vector data, and encoding the interactive calculation result as fused vector data; The output of the gene-aware text encoding module is used as global text vector data.

6. The text task processing method according to claim 1, characterized in that: The preamble text sequence that already exists during the current decoding is merged with the gene global vector data, and the text gene fusion data is decoded to obtain text data containing gene information corresponding to the current decoding step, including: Splicing the gene global vector data to the front of the preceding text sequence to obtain text gene fusion data; The converter network model is used as a gene-aware text decoding module, and the text gene fusion data is input into the gene-aware text decoding module for decoding processing by the gene-aware text decoding module.

7. The text task processing method according to claim 6, characterized in that: The preamble text sequence that already exists during the current decoding is merged with the gene global vector data, including: Create an upper triangular matrix with the same length as the preceding text sequence, and set the value on the right side of the diagonal of the upper triangular matrix to infinity as mask information; Using the mask information, a mask operation is performed on each text word of the preceding text sequence; Determining attention weights according to a query matrix, a key matrix, and a value matrix of the preceding text sequence, and determining a context vector of each text word of the preceding text sequence according to the attention weights; A text segment of the preceding text sequence is generated according to the context vector of each text word, and the text segment is fused with the gene global vector data.

8. The text task processing method according to any one of claims 1 to 7, characterized in that: Also includes: Pre-constructing a text task processing model; the text task processing model includes an input layer, an encoding layer, a decoding layer and an output layer; Acquire a text training sample set that matches the text task to be processed, wherein the text training sample set includes multiple groups of text-gene training samples, and the text-gene training samples include text samples and corresponding gene expression samples; Using the text training sample set, training the text task processing model until a model training stop condition is reached, thereby obtaining a text task processing model for executing the text task to be processed; Wherein, the input layer inputs the text sample and the gene expression sample; The encoding layer includes a gene expression matrix encoder, a text encoder and a gene-aware text encoder; the gene expression matrix encoder encodes the gene expression sample with added position learning parameters and global learning parameters into a gene global vector sample, the text encoder encodes the text sample into a text vector sample, and the gene-aware text encoder encodes the text sample spliced ​​with the gene global vector sample into a global text vector sample; The decoding layer fuses the preamble text sequence sample and the gene global vector sample that already exist during the current decoding, and performs decoding processing on the text gene fusion sample to obtain text sample data containing gene information corresponding to the current decoding.

9. The text task processing method according to claim 8, characterized in that: After obtaining the text data and gene expression data corresponding to the text task to be processed, it also includes: Inputting the text data and the gene expression data into the text task processing model; The input layer of the text task processing model receives the text data and the gene expression data; the gene expression matrix encoder encodes the gene expression data with added position learning parameters and global learning parameters into gene global vector data, the text encoder encodes the text data into text vector data, and the gene-aware text encoder encodes the fusion data of the gene global vector data and the text data into global text vector data; the decoding layer fuses the preamble text sequence that already exists during the current decoding with the gene global vector data, and decodes the text-gene fusion data to obtain the text data containing gene information corresponding to the current decoding step; the output layer determines the execution result of the text task to be processed according to the text data output by each decoding step, and outputs it.

10. The text task processing method according to claim 8, characterized in that: Using the text training sample set to train the text task processing model includes: Pre-constructing an initial loss function of the text task processing model; the initial loss function includes gene text retrieval loss, gene-aware text encoding loss and gene-aware text generation loss; According to the task type to which the to-be-processed text task belongs, generating weight factors of the gene-aware text retrieval loss, the gene-aware text encoding loss, and the gene-aware text generation loss; According to the respective weight factors of the gene-aware word retrieval loss, the gene-aware word encoding loss and the gene-aware word generation loss, the initial loss function is adjusted to obtain a loss function; Using the text training sample set, training the text task processing model based on the loss function; Among them, the gene-text retrieval loss is used to maximize the similarity between the text sample and its corresponding gene expression sample while minimizing the similarity between the text sample and other gene expression samples; the gene-aware text encoding loss is used to evaluate the degree of matching between the input text sample and the gene expression sample by the text task processing model; the gene-aware text generation loss is used to evaluate the ability of the text task processing model to generate text under the condition of gene expression context.

11. The text task processing method according to claim 8, characterized in that: The text task to be processed is a gene-text matching task, and the text task processing model is trained using the text training sample set, including: Performing initial training on the text task processing model using the text training sample set, obtaining text sample-gene expression sample pairs and corresponding similarity scores generated by the text task processing model during the initial training process, and using the similarity scores as confidence scores for the text sample-gene expression sample pairs; Selecting a target text sample-gene expression sample pair that meets a preset similarity condition from each text sample-gene expression sample pair; By adding fluctuation conditions and / or replacing similar text descriptions for each target text sample-gene expression sample pair, a variant text sample-gene expression sample pair of each target text sample-gene expression sample pair is obtained; The text task processing model obtained by the initial training is trained again using each target text sample-gene expression sample pair and each variant text sample-gene expression sample pair.

12. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the processor is used to implement the steps of the text task processing method according to any one of claims 1 to 11 when executing a computer program stored in the memory.

13. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the text task processing method according to any one of claims 1 to 11 are implemented.

14. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the text task processing method described in any one of claims 1 to 11 are implemented.

15. A text task processing system, characterized in that: Includes user interface and text task processor; The user interface at least comprises a task triggering area, a task processing result displaying area, a data input area and / or a file importing area, so that a user can describe a text task to be processed through the data input area, input text data and gene expression data through the data input area or the file importing area, and send the text task to be processed, the text data and the gene expression data to the text task processor through the task triggering area; The text task processor, based on the text task to be processed, processes the text data and the gene expression data using the steps of the text task processing method as described in any one of claims 1 to 11, generates a text task processing result, and sends the text task processing result to the task processing result display area of ​​the user interface.

Citation Information

Patent Citations

  • Text processing method and device

    CN110210032A

  • Text processing method and device, electronic equipment and storage medium

    CN118069814A

  • Gene expression level prediction method based on multi-modal data fusion

    CN118447923A

  • Text task processing method and model training method thereof, equipment, medium and product

    CN118586448A

  • Index sequence generation method and device, electronic equipment and storage medium

    CN119207562A

Cited By

  • Time series data alignment method and device, equipment and medium

    CN119724346A