Data processing method, apparatus, device, and medium

By constructing spatial neighborhood graphs and graph convolutional network models, and combining single-cell and spatial transcriptome data, the problem of low accuracy in cell type prediction in existing technologies has been solved, achieving more efficient cell type identification and gene spatial distribution prediction, which can be applied to biomedicine and anti-cancer treatment.

CN116978464BActive Publication Date: 2026-07-21TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2023-03-17
Publication Date
2026-07-21

Smart Images

  • Figure CN116978464B_ABST
    Figure CN116978464B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data processing method, device and equipment and medium, which are used to improve the prediction accuracy of spatial transcriptome data. The method comprises: obtaining a reference data set and a spatial transcriptome data set, obtaining a first spatial neighborhood graph and a corresponding first gene expression feature, encoding the first gene expression feature into a first gene encoding feature by a first encoder in an initial prediction model, encoding the first gene encoding feature and the first spatial neighborhood graph into a second gene encoding feature by a second encoder, decoding a first joint encoding feature composed of the first gene encoding feature and the second gene encoding feature into a gene expression reconstruction feature and a reconstructed spatial neighborhood graph by a first decoder and a second decoder respectively; training the initial prediction model according to the gene expression reconstruction feature, the first gene expression feature, the reconstructed spatial neighborhood graph, the first joint encoding feature and corresponding label information, to obtain a target prediction model for predicting the spatial transcriptome data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a data processing method, apparatus, device, and medium. Background Technology

[0002] Cells are the basic unit of life. Constructing a unified map of cell types to depict the molecular characteristics of each cell type (e.g., nerve cells, muscle cells, immune cells, etc.) and their location in the body can change people's understanding of biology and disease, and may lead to major breakthroughs in disease diagnosis and treatment.

[0003] Currently, the analysis of gene sequencing data often involves analyzing gene expression profiles within the sequencing data to determine cell types at the molecular level; for example, clustering methods can be used to analyze cellular gene expression profiles and predict the cell type of each cell. However, since cell type is determined by selective gene expression and interactions between multiple cells within a tissue, the accuracy of predictions based solely on cellular gene expression profiles from gene sequencing data is too low. Summary of the Invention

[0004] This application provides a data processing method, apparatus, device, and medium that can improve the prediction accuracy of spatial transcriptome data.

[0005] One embodiment of this application provides a data processing method, including:

[0006] A reference dataset and a spatial transcriptome dataset are obtained. Based on the reference dataset and the spatial transcriptome dataset, a first spatial neighborhood map containing candidate cell sets is obtained. The first spatial neighborhood map is used to characterize the spatial location information of cells in the candidate cell set. The reference dataset includes single-cell transcriptome data carrying label information.

[0007] The first gene expression features of the candidate cell set in the reference dataset and the spatial transcriptome dataset are obtained. The first gene expression features are encoded by the first encoder in the initial prediction model to obtain the first gene encoding features.

[0008] The first gene coding feature and the first spatial neighborhood graph are encoded by the second encoder in the initial prediction model to obtain the second gene coding feature. The first gene coding feature and the second gene coding feature are combined into the first joint coding feature.

[0009] The first joint coding feature is decoded by the first decoder in the initial prediction model to obtain the gene expression reconstruction feature. The first joint coding feature is then decoded by the second decoder in the initial prediction model to obtain the reconstruction spatial neighborhood map.

[0010] Based on gene expression reconstruction features, first gene expression features, reconstructed spatial neighborhood graph, first spatial neighborhood graph, first joint coding features, and the label information of candidate cell sets in the reference dataset, the network parameters of the initial prediction model are corrected to obtain the target prediction model; the target prediction model is used to output the gene spatial distribution prediction results or cell prediction types of the spatial transcriptome data corresponding to the tissue sample.

[0011] One embodiment of this application provides a data processing apparatus, including:

[0012] The neighborhood graph acquisition module is used to acquire a reference dataset and a spatial transcriptome dataset. Based on the reference dataset and the spatial transcriptome dataset, it acquires a first spatial neighborhood graph containing a set of candidate cells. The first spatial neighborhood graph is used to characterize the spatial location information of cells in the set of candidate cells. The reference dataset includes single-cell transcriptome data carrying label information.

[0013] The first encoding module is used to obtain the first gene expression features of the candidate cell set in the reference dataset and the spatial transcriptome dataset. The first gene expression features are encoded by the first encoder in the initial prediction model to obtain the first gene encoding features.

[0014] The second encoding module is used to encode the first gene encoding feature and the first spatial neighborhood graph through the second encoder in the initial prediction model to obtain the second gene encoding feature, and to combine the first gene encoding feature and the second gene encoding feature into the first joint encoding feature.

[0015] The first decoding module is used to decode the first joint coding feature through the first decoder in the initial prediction model to obtain gene expression reconstruction features, and to decode the first joint coding feature through the second decoder in the initial prediction model to obtain a reconstruction spatial neighborhood map.

[0016] The parameter correction module is used to correct the network parameters of the initial prediction model based on gene expression reconstruction features, first gene expression features, reconstruction spatial neighborhood map, first spatial neighborhood map, first joint coding features, and the label information of the candidate cell set in the reference dataset, so as to obtain the target prediction model. The target prediction model is used to output the gene spatial distribution prediction results or cell prediction types of the spatial transcriptome data corresponding to the tissue sample.

[0017] The neighborhood graph acquisition module, based on the reference dataset and the spatial transcriptome dataset, acquires a first spatial neighborhood graph containing the candidate cell set, including:

[0018] Based on the distance between adjacent cells in the reference dataset and the similarity between the gene expression features corresponding to adjacent cells in the reference dataset, a source domain spatial neighborhood graph corresponding to the reference dataset is constructed.

[0019] Based on the distance between adjacent cells in the spatial transcriptome dataset and the similarity between the gene expression features corresponding to adjacent cells in the spatial transcriptome dataset, a spatial neighborhood map of the target domain corresponding to the spatial transcriptome dataset is constructed.

[0020] Select an initial cell subset in the source domain spatial neighborhood graph and the target domain spatial neighborhood graph, obtain the first-order neighbor cells and second-order neighbor cells of the cells in the initial cell subset, and combine the initial cell subset, first-order neighbor cells and second-order neighbor cells into a candidate cell set.

[0021] In the source domain spatial neighborhood graph and the target domain spatial neighborhood graph, the edges between cells contained in the candidate cell set, and the cells contained in the candidate cell set are determined as the first spatial neighborhood graph.

[0022] The first encoding module encodes the first gene expression features using the first encoder in the initial prediction model to obtain the first gene encoded features, including:

[0023] The first gene expression feature is input into the first encoder in the initial prediction model. The first gene expression feature is then processed by the fully connected network layer in the first encoder to obtain the fully connected output feature.

[0024] The fully connected output features are normalized to obtain normalized features. The normalized features are then transformed according to the activation network layer in the first encoder to obtain gene transformation features.

[0025] The gene transformation features are regularized by the regularized network layer in the first encoder to obtain the first gene coding features.

[0026] The second encoding module encodes the first gene coding features and the first spatial neighborhood graph using the second encoder in the initial prediction model to obtain the second gene coding features, including:

[0027] The first gene encoding feature and the first spatial neighborhood graph are input into the second encoder in the initial prediction model. The first gene encoding feature and the first spatial neighborhood graph are downsampled according to the first graph convolutional network layer in the second encoder to obtain graph convolutional features.

[0028] The graph convolution features are convolutionally processed by the second graph convolutional network layer in the second encoder to obtain the mean and variance features corresponding to the candidate cell set.

[0029] The sampling parameters are obtained from the standard Gaussian distribution. The product of the sampling parameters and the variance feature, and the sum of the mean feature are used to determine the second gene coding feature.

[0030] The initial prediction model also includes a first domain classifier and a second domain classifier; the first gene expression features include the common gene expression features of the candidate cell set in the reference dataset and the spatial transcriptome dataset and the initialized target gene expression features; the label information corresponding to the candidate cell set includes the common gene expression features and the target gene expression features in the reference dataset.

[0031] The parameter correction module corrects the network parameters of the initial prediction model based on gene expression reconstruction features, first gene expression features, reconstruction spatial neighborhood graph, first spatial neighborhood graph, first joint coding features, and the label information of the candidate cell set in the reference dataset, to obtain the target prediction model, including:

[0032] The gene expression reconstruction features and the reconstruction spatial neighborhood map are input into the first domain classifier, and the first domain classifier outputs the first classification result.

[0033] The first joint encoded feature is input into the second domain classifier, and the second classification result is output through the second domain classifier.

[0034] Based on the first classification result, the second classification result, gene expression reconstruction features, the first gene expression feature, the reconstructed spatial neighborhood map, the first spatial neighborhood map, and the label information corresponding to the candidate cell set, the network parameters of the initial prediction model are corrected to obtain the target prediction model; the target prediction model is used to output the gene spatial distribution prediction results of the spatial transcriptome data corresponding to the tissue sample.

[0035] The parameter correction module, based on the first classification result, the second classification result, gene expression reconstruction features, the first gene expression feature, the reconstruction spatial neighborhood map, the first spatial neighborhood map, and the label information corresponding to the candidate cell set, corrects the network parameters of the initial prediction model to obtain the target prediction model, including:

[0036] The first classification loss corresponding to the first domain classifier is determined based on the first classification result, and the second classification loss corresponding to the second domain classifier is determined based on the second classification result and the dataset label to which the first gene expression feature belongs.

[0037] If the first gene expression feature belongs to the reference dataset, then the first reconstruction loss of the initial prediction model is determined based on the error between the gene expression reconstruction feature and the label information corresponding to the candidate cell set, as well as the error between the reconstruction spatial neighborhood map and the first spatial neighborhood map.

[0038] If the first gene expression feature belongs to the spatial transcriptome dataset, then the second reconstruction loss of the initial prediction model is determined based on the error between the gene expression reconstruction feature and the first gene expression feature, as well as the error between the reconstruction spatial neighborhood map and the first spatial neighborhood map.

[0039] Based on the first classification loss, the second classification loss, the first reconstruction loss, and the second reconstruction loss, determine the total model loss of the initial prediction model;

[0040] The network parameters in the initial prediction model are iteratively trained based on the total model loss until the total model loss meets the training termination condition. Then, the training stops, and the first encoder, second encoder, and first decoder in the initial prediction model at the end of training are determined as the target prediction model.

[0041] The initial prediction model also includes a second domain classifier and a feature classifier; the first gene expression features include the common gene expression features of the candidate cell set in the reference dataset and the spatial transcriptome dataset; the label information corresponding to the candidate cell set includes cell type labels in the reference dataset.

[0042] The parameter correction module corrects the network parameters of the initial prediction model based on gene expression reconstruction features, first gene expression features, reconstruction spatial neighborhood graph, first spatial neighborhood graph, first joint coding features, and the label information of the candidate cell set in the reference dataset, to obtain the target prediction model, including:

[0043] The first joint coding feature is sequentially input into the second domain classifier and the feature classifier. The second domain classifier outputs the second classification result, and the feature classifier identifies the first joint feature to obtain the cell classification result.

[0044] Based on the second classification result, cell classification result, gene expression reconstruction feature, first gene expression feature, reconstruction spatial neighborhood map, first spatial neighborhood map, and cell type label corresponding to the candidate cell set, the network parameters of the initial prediction model are corrected to obtain the target prediction model; the target prediction model is used to output the cell prediction type of the spatial transcriptome data corresponding to the tissue sample.

[0045] Specifically, based on the second classification result, cell classification result, gene expression reconstruction features, first gene expression features, reconstruction spatial neighborhood map, first spatial neighborhood map, and cell type labels corresponding to the candidate cell set, the network parameters of the initial prediction model are corrected to obtain the target prediction model, including:

[0046] Based on the second classification result and the dataset label to which the first gene expression feature belongs, determine the second classification loss corresponding to the second domain classifier;

[0047] Based on the cell classification results and the cell type labels corresponding to the candidate cell set, determine the feature classification loss corresponding to the feature classifier;

[0048] The second reconstruction loss of the initial prediction model is determined based on the error between the gene expression reconstruction feature and the first gene expression feature, as well as the error between the reconstruction spatial neighborhood graph and the first spatial neighborhood graph.

[0049] The total model loss corresponding to the initial prediction model is determined based on the second classification loss, feature classification loss, and second reconstruction loss.

[0050] The network parameters in the initial prediction model are iteratively trained based on the total model loss until the total model loss meets the training termination condition. Then, the training stops, and the first encoder, second encoder, and feature classifier in the initial prediction model at the end of training are determined as the target prediction model.

[0051] The device also includes:

[0052] The neighborhood graph construction module is used to obtain the spatial transcriptome data corresponding to the tissue sample, and construct the second spatial neighborhood graph corresponding to the cells in the tissue sample based on the spatial location information and second gene expression characteristics contained in the spatial transcriptome data.

[0053] The third encoding module is used to encode the expression features of the second gene through the first encoder in the target prediction model to obtain the third gene encoding features corresponding to the spatial transcriptome data.

[0054] The fourth encoding module is used to encode the second spatial neighborhood map and the third gene encoding features through the second encoder in the target prediction model to obtain the fourth gene encoding features corresponding to the spatial transcriptome data, and to combine the third gene encoding features and the fourth gene encoding features into the second joint encoding features.

[0055] The second decoding module is used to decode the second joint coding feature through the first decoder in the target prediction model to obtain the gene spatial distribution prediction result corresponding to the spatial transcriptome data.

[0056] The device also includes:

[0057] The neighborhood graph construction module is used to obtain the spatial transcriptome data corresponding to the tissue sample, and construct the second spatial neighborhood graph corresponding to the cells in the tissue sample based on the spatial location information and second gene expression characteristics contained in the spatial transcriptome data.

[0058] The third encoding module is used to encode the expression features of the second gene through the first encoder in the target prediction model to obtain the third gene encoding features corresponding to the spatial transcriptome data.

[0059] The fourth encoding module is used to encode the second spatial neighborhood map and the third gene encoding features through the second encoder in the target prediction model to obtain the fourth gene encoding features corresponding to the spatial transcriptome data, and to combine the third gene encoding features and the fourth gene encoding features into the second joint encoding features.

[0060] The feature classification module is used to identify the second joint encoded features through the feature classifier in the target prediction model to obtain the cell prediction type corresponding to the cells in the tissue sample.

[0061] One aspect of this application provides a computer device, including a memory and a processor. The memory is connected to the processor, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method provided in one aspect of this application.

[0062] One aspect of this application provides a computer-readable storage medium storing a computer program adapted to be loaded and executed by a processor, so that a computer device having a processor performs the method provided in one aspect of this application.

[0063] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in the above aspect.

[0064] In this embodiment, a reference dataset and a spatial transcriptome dataset are obtained for training the initial prediction model. A candidate cell set can then be determined from the reference dataset and the spatial transcriptome dataset, and a first spatial neighborhood map and a first gene expression feature corresponding to this candidate cell set can be obtained. The first encoder and the second encoder in the initial prediction model can integrate the features of the first gene expression feature and the first spatial neighborhood map. By introducing the first spatial neighborhood map into the initial prediction model, the potential interaction relationships between adjacent cells in a spatial context can be fully explored, thereby improving the overall performance of the initial prediction model. The first joint coding feature, formed by combining the first gene coding feature output by the first encoder and the second gene coding feature output by the second encoder, can be sequentially input into the first decoder and the second decoder in the initial prediction model. The first decoder outputs gene expression reconstruction features, and the second decoder outputs a reconstructed spatial neighborhood map. Based on the gene expression reconstruction features, the first gene expression features, the reconstructed spatial neighborhood map, the first spatial neighborhood map, and the label information corresponding to the candidate cell set, the network parameters in the initial prediction model are corrected to obtain a target prediction model for predicting and analyzing the spatial transcriptome data corresponding to the tissue sample. In other words, the initial prediction model can be trained using the labeled reference dataset and the unlabeled spatial transcriptome dataset, which means that the gene expression features of cells can be transferred from the reference dataset. The target prediction model trained in this way can improve the prediction accuracy of spatial transcriptome data. Attached Figure Description

[0065] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0066] Figure 1 This is a schematic diagram of a network architecture provided in an embodiment of this application;

[0067] Figure 2 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 1 ;

[0068] Figure 3 This is a schematic diagram illustrating the construction of a spatial neighborhood graph provided in an embodiment of this application;

[0069] Figure 4 This is a schematic diagram of random subgraph training based on graph mining provided in an embodiment of this application;

[0070] Figure 5This is a schematic diagram of the structure of a graph convolutional network model provided in an embodiment of this application;

[0071] Figure 6 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 2 ;

[0072] Figure 7 This is a schematic diagram of training an initial prediction model for achieving the task of predicting the spatial distribution of genes, provided in an embodiment of this application.

[0073] Figure 8a This is a schematic diagram of the gene spatial distribution prediction results based on the target prediction model provided in the embodiments of this application. Figure 1 ;

[0074] Figure 8b This is a schematic diagram of the gene spatial distribution prediction results based on the target prediction model provided in the embodiments of this application. Figure 1 ;

[0075] Figure 8c This is a schematic diagram of the gene spatial distribution prediction results based on the target prediction model provided in the embodiments of this application. Figure 1 ;

[0076] Figure 9 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 3 ;

[0077] Figure 10 This is a schematic diagram illustrating the training of an initial prediction model for implementing a cell type annotation task, provided in an embodiment of this application.

[0078] Figure 11 This is a schematic diagram of cell type annotation results based on a target prediction model provided in an embodiment of this application;

[0079] Figure 12 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 4 ;

[0080] Figure 13 This is a schematic diagram of gene spatial distribution prediction based on a target prediction model provided in an embodiment of this application;

[0081] Figure 14 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 5 ;

[0082] Figure 15 This is a schematic diagram of gene spatial distribution prediction based on a target prediction model provided in an embodiment of this application;

[0083] Figure 16This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;

[0084] Figure 17 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0085] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0086] Machine Learning (ML): As a crucial technology in the field of Artificial Intelligence (AI), machine learning is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, and many other disciplines. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning.

[0087] In this application, embodiments can be trained using machine learning techniques to obtain a gene prediction model that can be used for predictive analysis of genomic sequencing data from tissue samples. The tissue sample, also known as a tissue section, can be considered a thin slice of animal or plant tissue for observation under an optical or electron microscope. The gene prediction model can be used to perform various spatially resolved transcriptomics (SRT) tasks, such as predicting the spatial distribution of genes in cells and cell type annotation (which can be understood as cell type identification), etc., and this application does not limit its application to these tasks. For example, when the gene prediction model is used to perform a gene spatial distribution task, the decoding results of the gene prediction model can be used to predict the spatial distribution of genes in cells within the tissue sample; when the gene prediction model is used to perform a cell type annotation task, the encoding results of the gene prediction model can be used to predict the cell type within the tissue sample. The cell type and gene spatial distribution determined by the gene prediction model can be applied to fields such as biomedicine, cell research, and pathological analysis. For instance, based on the gene spatial distribution and cell type determined by the gene prediction model, cancer cells can be accurately identified, leading to the development of corresponding targeted drugs to improve anti-cancer treatment.

[0088] For ease of understanding, the terminology used in the embodiments of this application will be described below:

[0089] Single-cell transcriptome data (also known as single-cell transcriptome sequencing data): Using high-magnification imaging techniques on tissue samples (e.g., pathological tissue section imaging, confocal fluorescence imaging, etc.), cells are extracted at different time points, and various single-cell transcriptome sequencing technologies are used to analyze the extracted cells. The resulting gene sequencing data (or gene expression characteristics) can be called single-cell transcriptome data. Single-cell transcriptome sequencing can be understood as mRNA (Messenger Ribonucleic Acid) sequencing, i.e., the genes expressed by the cell. In other words, a single-cell transcriptome can be understood as the total expression level of all mRNAs in a single cell at a given time, reflecting the overall characteristics of that cell. Single-cell transcriptome sequencing technologies may include, but are not limited to: microdissection techniques, fluorescence in situ hybridization (FISH), and in situ capture techniques, etc., which can be determined based on the actual application requirements; this application does not impose any limitations on these.

[0090] Spatial transcriptome data (also known as spatial transcriptome sequencing data): Spatial transcriptome data refers to sequencing data collected using existing spatial transcriptome sequencing technologies. This spatial transcriptome data can include gene expression characteristics of all cells in a single tissue sample and spatial location information of gene expression. Specifically, the spatial transcriptome data involved in the embodiments of this application may include, but is not limited to, sequencing data obtained based on technologies such as MERFISH (multiplexed error-corrected fluorescence in situ hybridization), seqFISH (sequential fluorescence in situ hybridization), seqFISH+, osmFISH (ouroboros single-molecule fluorescence in situ hybridization), Slide-seq, Visium, STARmap (spatial resolution transcriptome amplification readout map), HDST (High Definition Spatial Transcriptomics), and Stereo-seq (high-resolution spatiotemporal omics). The specific data can be determined based on the actual application scenario requirements and is not limited here.

[0091] Please see Figure 1 , Figure 1This is a schematic diagram of a network architecture provided in an embodiment of this application. The network architecture may include a server 10d and a terminal cluster. The terminal cluster may include one or more terminal devices; the number of terminal devices included in the terminal cluster is not limited here. Figure 1 As shown, the terminal cluster may specifically include terminal device 10a, terminal device 10b, and terminal device 10c, etc.; all terminal devices in the terminal cluster (for example, may include terminal device 10a, terminal device 10b, and terminal device 10c, etc.) can be connected to server 10d via the network so that each terminal device can interact with server 10d through the network connection.

[0092] The terminal devices in a terminal cluster can include, but are not limited to: smartphones, tablets, laptops, PDAs, mobile internet devices (MIDs), wearable devices (such as smartwatches and smart bracelets), smart voice interaction devices, smart home appliances (such as smart TVs), in-vehicle devices, aircraft, and other electronic devices. This application does not limit the type of terminal device. It is understood that, as Figure 1 Each terminal device in the terminal cluster shown can install an application client (Internet platform). When the application client runs on each terminal device, it can interact with the aforementioned... Figure 1 Data interaction is performed between the servers 10d shown. The application clients running on each terminal device can be independent clients or embedded sub-clients integrated into a client; this application does not limit this. The application clients running on each terminal device can call published gene prediction models (which can be understood as trained gene prediction models) to perform tasks such as spatial distribution prediction of genes in the spatial transcriptome and cell type annotation.

[0093] Among them, server 10d can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. This application does not limit the type of server.

[0094] Figure 1The various terminal devices shown can acquire spatial transcriptome data from tissue samples, and then use trained gene prediction models to analyze and predict the spatial transcriptome data, obtaining prediction results corresponding to the tissue samples; for example, the prediction results for tissue samples can be gene spatial distribution predictions, or cell type predictions, etc. It is understandable that the analysis and prediction of spatial transcriptome data can be performed by... Figure 1 The terminal devices in the network architecture shown can also execute the commands, and this application does not limit this to execution.

[0095] The gene prediction model involved in this application embodiment can be an algorithm model with a graph convolutional network (GCN) model as the baseline network. This GCN model can be composed of an autoencoder and a variational graph autoencoder (VGAE); alternatively, other deep learning network structures can be used, such as convolutional neural networks and graph autoencoders (GAEs); or various variations of the aforementioned autoencoders and variational graph autoencoders can be used, including but not limited to different numbers of network layers and different activation functions. This application embodiment does not limit the network structure of the graph convolutional network model. For ease of understanding, this application embodiment describes an example of a graph convolutional network model composed of an autoencoder and a variational graph autoencoder.

[0096] It is understandable that all cells within a tissue sample share the same genetic DNA (Deoxyribonucleic acid). Single-cell transcriptome sequencing technology can sequence the expressed genes of a single cell. By analyzing the cellular transcriptome sequencing data, selective gene expression can be determined at the molecular level, allowing for cell classification—a process known as cell type annotation. In recent years, with advancements in molecular biology and single-cell sequencing technology, increasing research has shown that selective gene expression is not only related to cell origin but also to the local microenvironment within the tissue sample. This has been best demonstrated in gene expression studies during embryonic development, where spatial coordination and signal transduction determine the dynamic development of the tissue microenvironment, influencing how embryonic cells differentiate into nerve cells, muscle cells, immune cells, and so on. In fact, selective gene expression in space and microenvironment can be applied to any tissue and biological process. For example, in the tumor microenvironment, complex interactions exist between cancer cells, immune cells, and stromal cells. Utilizing selective gene expression by cell type, intercellular interactions, and spatial location information helps identify cancer cells and the genes they express, thereby enabling the development of targeted drugs to improve cancer treatment. In other words, the spatial location information of cells in a tissue sample helps to identify cell types and the spatial distribution of genes in cells.

[0097] The gene prediction model involved in this application embodiment can use domain transfer and graph convolutional network models to complete end-to-end tasks such as spatial distribution prediction of genes and cell type annotation in spatial transcriptomics; that is, this application embodiment can use graph convolutional network models to achieve multiple different spatial transcriptomics tasks. Domain transfer can transfer gene expression features of cells from existing single-cell transcriptomics data (gene expression features in this application embodiment can be in the form of gene expression profiles, such as gene expression matrices), and learn the domain differences between the gene expression features of single-cell transcriptomics data and the gene expression features of spatial transcriptomics data; these domain differences may arise from differences between sequencing technologies, batch effects between samples, or noise during the sequencing process. The implementation process of domain transfer may include: using common genes between single-cell transcriptomics data and spatial transcriptomics data, and aligning the expression features of common genes; during the domain transfer process, the gene expression features of single-cell transcriptomics data and spatial transcriptomics data can be reduced to the same feature space; then, the reduced expression features can be restored to make the gene expression features of single-cell transcriptomics data and spatial transcriptomics data similar.

[0098] It should be noted that the gene prediction model can be understood as the aforementioned graph convolutional network model applied to different spatial transcriptomics tasks (for ease of understanding, this gene prediction model can be abbreviated as the DAGCN method). During the training process of the gene prediction model, additional network structures (e.g., domain classifiers, feature classifiers, etc.) can be added to the graph convolutional network model based on the actual needs of the spatial transcriptomics task. After the gene prediction model is trained, some or all of the network structures in the trained gene prediction model can be selected to implement the spatial transcriptomics data prediction process based on the actual needs of the spatial transcriptomics task; this application does not limit this. The training process and application process (prediction process) of the gene prediction model will be described in detail in the following sections. For ease of understanding, the gene prediction model during the training process can be called the initial prediction model, and the gene prediction model used to complete the training for the spatial transcriptomics task can be called the target prediction model.

[0099] It is understood that the training and application processes of the gene prediction model can be executed by computer equipment; that is, the data processing method proposed in the embodiments of this application can be executed by computer equipment, which can be... Figure 1 The server 10d in the network architecture shown can be any terminal device in the terminal cluster, or it can be a computer program (including program code, such as an application client integrated into the terminal device), etc. This application embodiment does not limit this.

[0100] Please see Figure 2 , Figure 2 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 1 Understandably, this data processing method can be executed by a computer device, which can be a server or a terminal device; this application does not limit this. Figure 2 As shown, the data processing method may include the following steps S101 to S105:

[0101] Step S101: Obtain a reference dataset and a spatial transcriptome dataset. Based on the reference dataset and the spatial transcriptome dataset, obtain a first spatial neighborhood map containing a candidate cell set. The first spatial neighborhood map is used to characterize the spatial location information of cells in the candidate cell set. The reference dataset includes single-cell transcriptome data carrying label information.

[0102] In this embodiment, the end-to-end training process of the initial prediction model (the gene prediction model during training) can be described. During the training of the initial prediction model, the computer device can acquire a reference dataset and a spatial transcriptome dataset for training the initial prediction model. The reference dataset can be a labeled single-cell transcriptome dataset (also called a single-cell sequencing dataset); for example, single-cell transcriptome data (including cell gene expression characteristics) corresponding to each tissue sample can be obtained by sequentially performing single-cell transcriptome sequencing on all collected tissue samples, and the cell types in each tissue sample can be labeled to obtain cell type labels corresponding to each cell in the tissue sample. All single-cell transcriptome data carrying cell type labels can then be used as the reference dataset; alternatively, an existing labeled single-cell transcriptome dataset can be obtained as the reference dataset. This application does not limit the source of the reference dataset.

[0103] Spatial transcriptome datasets can include spatial transcriptome data corresponding to a large number of tissue samples. The spatial transcriptome data for each tissue sample is collected using existing spatial transcriptome sequencing technologies and can include gene expression characteristics and spatial location information of each cell in that tissue sample. Spatial transcriptome datasets do not carry label information. Understandably, during the initial training of the prediction model, the reference dataset can be used as the source domain, and the spatial transcriptome dataset as the target domain. The target domain represents the region where the test sample is located, carrying no label information or only a small amount of label information; the source domain represents a region different from the test sample but carrying rich label information. Utilizing information-rich source domain samples (single-cell transcriptome data) can improve the performance of the target domain model (the model used to process the prediction samples).

[0104] Understandably, due to the advancements in spatial transcriptome sequencing technology, the scale of spatial transcriptome datasets is increasing. Using spatial neighborhood graphs to characterize spatial transcriptome data faces computational and storage challenges related to ultra-large-scale graph structures. Therefore, during the initial prediction model training process, a random subgraph training method for graph structure data can be employed, enabling training and prediction of large-scale graph structure data with limited computational resources. In other words, during the initial prediction model training process, a random subset of cells can be started, and graph mining can be used to generate a subgraph of the source domain spatial neighborhood graph (referencing the spatial neighborhood graph of the dataset). This subgraph can preserve as many edges between cells as possible, and all cells contained in this subgraph can serve as a candidate cell set. This subgraph can be called the first spatial neighborhood graph, which can be used to represent the spatial location information of cells in the candidate cell set. This first spatial neighborhood graph can be used to train the initial prediction model. Through multiple training iterations of random subgraphs, the initial prediction model can be trained on the entire source domain spatial neighborhood graph structure data.

[0105] The process of obtaining the first spatial neighborhood map containing the candidate cell set can include: constructing corresponding spatial neighborhood maps for both the reference dataset and the spatial transcriptome dataset; the spatial neighborhood map corresponding to the single-cell transcriptome data in the reference dataset can be called the source domain spatial neighborhood map; the spatial neighborhood map corresponding to the spatial transcriptome data in the spatial transcriptome dataset can be called the target domain spatial neighborhood map. For example, the source domain spatial neighborhood map corresponding to the reference dataset can be constructed based on the distance between adjacent cells in the reference dataset and the similarity between the gene expression features corresponding to adjacent cells in the reference dataset; the target domain spatial neighborhood map corresponding to the spatial transcriptome data can be constructed based on the distance between adjacent cells in the spatial transcriptome dataset and the similarity between the gene expression features corresponding to adjacent cells in the spatial transcriptome dataset. In the source domain spatial neighborhood graph and the target domain spatial neighborhood graph, an initial cell subset is selected, and the first-order neighbor cells and second-order neighbor cells of the cells in the initial cell subset are obtained. The initial cell subset, the first-order neighbor cells, and the second-order neighbor cells are combined into a candidate cell set. In the source domain spatial neighborhood graph and the target domain spatial neighborhood graph, the edges between the cells contained in the candidate cell set, and the cells contained in the candidate cell set are determined as the first spatial neighborhood graph.

[0106] Understandably, to describe the spatial location information of cells, a spatial neighborhood graph can be constructed to represent the relationships between adjacent cells. Each spatial neighborhood graph consists of nodes and edges, where a node represents a cell and an edge represents a relationship between a pair of adjacent cells. Since the behavior of a single cell in the local tissue microenvironment is mediated by the interaction between ligand-receptor pairs and neighboring cells, the weights of the edges in the spatial neighborhood graph can be determined by calculating the distance between adjacent cells (e.g., Euclidean distance) and the similarity between the gene expression features corresponding to adjacent cells to better describe the relationships between adjacent cells. The closer the distance between adjacent cells, the closer the relationship between them; furthermore, adjacent cells with more similar gene expression features will likely share more common gene expression features, indicating a closer relationship between adjacent cells. In this application, adjacent cells refer to two cells in a tissue sample whose distance is less than a pre-set distance threshold (which can be set according to the specific needs of the actual application scenario, and this application does not limit this). The calculation method for the similarity between the gene expression characteristics of adjacent cells may include, but is not limited to, algorithms such as Pearson Correlation Coefficient, cosine similarity, Tanimoto coefficient, Manhattan distance, and Minkowski distance, and this application does not limit this. For ease of understanding, this application uses cosine similarity as an example for description.

[0107] The source domain spatial neighborhood graph and the target domain spatial neighborhood graph are constructed in the same way. For ease of understanding, please refer to [link to relevant documentation]. Figure 3 , Figure 3 This is a schematic diagram illustrating the construction of a spatial neighborhood graph provided in an embodiment of this application. For example... Figure 3 As shown, it is assumed that the tissue samples in the spatial transcriptome dataset include multiple cells such as cell 0, cell 1, ..., cell 10 (e.g., ...). Figure 3 As shown in region 20a), and cell 0 is adjacent to cell 1, cell 2, ..., and cell 10, then the similarity between the gene expression characteristics of cell 0 and the gene expression characteristics of each adjacent cell can be calculated sequentially. This similarity can be expressed as: sim(u,v)=cos(f u ,f v ), where u and v represent adjacent cells, f u f represents the gene expression characteristics corresponding to cell u. v sim(u,v) represents the gene expression characteristics corresponding to cell v, and sim(u,v) represents the similarity between adjacent cells u and cell v.

[0108] like Figure 3 As shown, by calculating the cosine similarity between the gene expression characteristics of adjacent cells, we can obtain the following similarities: the similarity between the gene expression characteristics of cell 0 and those of cells 1 and 6 is 0.2 (i.e., sim1 = sim6 = 0.2); the similarity between the gene expression characteristics of cell 0 and those of cells 2 and 5 is 1 (i.e., sim2 = sim5 = 1); the similarity between the gene expression characteristics of cell 0 and those of cells 3 and 7 is 0.5 (i.e., sim3 = sim7 = 0.5); the similarity between the gene expression characteristics of cell 0 and those of cell 4 is 0.4 (i.e., sim4 = 0.4); the similarity between the gene expression characteristics of cell 0 and those of cell 8 is 0.4 (i.e., sim8 = 0.8); the similarity between the gene expression characteristics of cell 0 and those of cell 9 is 0.3 (i.e., sim9 = 0.3); and the similarity between the gene expression characteristics of cell 0 and those of cell 10 is 0.6 (i.e., sim10 = 0.6).

[0109] Furthermore, based on the spatial location information of each cell, the Euclidean distance between cell 1 and each of its neighboring cells can be calculated. Then, based on the calculated Euclidean distance and the similarity (cosine similarity) between the gene expression characteristics of neighboring cells, the edge weights between cell 0 and each of its neighboring cells can be obtained. The calculation method for these edge weights can be expressed as follows: Where w(u,v) represents the edge weight between adjacent cells u and v, and d(u,v) represents the edge weight between adjacent cells v. 2 This represents the distance between adjacent cells u and v. For example... Figure 2 As shown, by calculating the edge weights as described above, the edge weight between cell 0 and cell 1 can be w1 = 0.14, the edge weight between cell 0 and cell 2 can be w2 = 0.61, ..., and the edge weight between cell 0 and cell 10 can be w10 = 0.17. After calculating the edge weights between all adjacent cells in the tissue samples of the spatial transcriptome dataset, the target domain spatial neighborhood graph corresponding to the spatial transcriptome dataset can be obtained. The aforementioned cells 0, 1, ..., 10 can all be nodes in the target domain spatial neighborhood graph. Edges exist between adjacent cells, and the edge weights between different adjacent cells may be different.

[0110] based on Figure 2The method shown for constructing the spatial neighborhood graph can build a source domain spatial neighborhood graph corresponding to the reference dataset and a target domain spatial neighborhood graph corresponding to the spatial transcriptome dataset. Then, a first spatial neighborhood graph can be obtained from the source and target domain spatial neighborhood graphs. In other words, the first spatial neighborhood graph can be a subgraph of the source domain spatial neighborhood graph or a subgraph of the target domain spatial neighborhood graph. Please refer to [link to relevant documentation]. Figure 4 , Figure 4 This is a schematic diagram of random subgraph training based on graph mining provided in an embodiment of this application. For example... Figure 4 The spatial neighborhood graph 30a shown can be a source domain spatial neighborhood graph or a target domain spatial neighborhood graph. Assuming that the initial cell subset randomly selected from the spatial neighborhood graph 30a includes cell 1 (cell 1 can be used as the initial node), then the first-stage graph mining can be performed on cell 1 to obtain the first-order neighbor cells of cell 1 in the spatial neighborhood graph 30a, such as cell 2, cell 3, cell 4 and cell 5.

[0111] Furthermore, a second-stage graph mining can be performed on cell 1 to obtain second-order neighbor cells of cell 1 in the spatial neighborhood graph 30a, such as cell 6, cell 7, cell 8, cell 9, cell 10 and cell 11. At this time, cell 1, cell 2, ..., cell 11 can be used as a candidate cell set. Then, the first-order neighbor cells obtained from the first-stage graph mining, the second-order neighbor cells obtained from the second-stage graph mining, the edges between cell 1 and the first-order neighbor cells, and the edges between the first-order neighbor cells and the second-order neighbor cells can be used to construct the first spatial neighborhood graph.

[0112] It should be noted that the first spatial neighborhood graph can be composed of an initial cell subset and first-order and second-order neighbor cells obtained from two-stage graph mining, or it can be composed of an initial cell subset and first-order neighbor cells obtained from one-stage graph mining, or it can be composed of an initial cell subset and first-order, second-order, and third-order neighbor cells obtained from two-stage graph mining, etc. This application does not impose any limitations on this. By adopting a random subgraph training method based on graph structure data mining technology, after selecting a batch of random cells (initial cell subset), a random subgraph (first spatial neighborhood graph) can be obtained by triggering from the cells in the initial cell subset and going through one or more stages of graph mining. This random subgraph can retain the edges between adjacent cells. Using these random subgraphs for training can make full use of the edge information in the graph structure data, thereby saving computational resources.

[0113] Step S102: Obtain the first gene expression features of the candidate cell set in the reference dataset and the spatial transcriptome dataset, and encode the first gene expression features through the first encoder in the initial prediction model to obtain the first gene coding features.

[0114] Specifically, the first gene expression features of cells in the candidate cell set can be obtained from the reference dataset and the spatial transcriptome dataset. The initial prediction model is constructed for spatial transcriptome tasks. Different spatial transcriptome tasks may result in some differences in the first gene expression features input to the initial prediction model, which can be determined based on the specific needs of the actual application scenario and is not limited here. For example, if the initial prediction model is for predicting the spatial distribution of genes, the first gene expression features can include common gene expression features from the reference dataset and the spatial transcriptome dataset, and initialized target gene expression features. Common gene expression features represent the gene expression features corresponding to common genes in the reference dataset and the spatial transcriptome dataset, while target gene expression features represent the gene expression features corresponding to the target gene. The single-cell transcriptome data in the reference dataset includes measurements of common genes and target genes (e.g., gene expression features of common genes and target genes were collected through single-cell transcriptome sequencing technology). The spatial transcriptome dataset includes measurements of common genes but generally does not include measurements of target genes (e.g., gene expression features of common genes were collected through spatial transcriptome sequencing technology, but gene expression features of target genes were not collected). In other words, the target gene can be understood as the gene in the target domain that is to be predicted. If the initial prediction model is designed to achieve cell type annotation tasks, the first gene expression feature can be a common gene expression feature of the reference dataset and the spatial transcriptome dataset, etc.

[0115] It is understood that the initial prediction model is an algorithmic model based on a graph convolutional network model. This graph convolutional network can include at least two encoders and at least two decoders, with one encoder corresponding to one decoder. The following will describe in detail an example of a graph convolutional network model consisting of an autoencoder and a variational graph autoencoder. For ease of understanding, in this embodiment, the encoding part of the autoencoder can be referred to as the first encoder, the decoding part as the first decoder, the encoding part of the variational graph autoencoder as the second encoder, and the decoding part as the second decoder.

[0116] After obtaining the first spatial neighborhood map and the first gene expression features corresponding to the candidate cell set, the first gene expression features can be input into the first encoder in the initial prediction model. The first gene expression features are then processed by the fully connected network layer in the first encoder to obtain the fully connected output features. The fully connected output features are then normalized to obtain the normalized features, which are the features output by the normalized network layer in the first encoder. The normalized features are then transformed by the activation network layer in the first encoder to obtain the gene transformation features. Finally, the gene transformation features are regularized by the regularization network layer in the first encoder to obtain the first gene encoding features.

[0117] The first encoder can downsample (or reduce dimensionality) the input first gene expression features, meaning the dimension of the first gene encoding features output by the first encoder is smaller than the dimension of the first gene expression features. The first gene encoding features can be considered as the feature representation of the first gene expression features after dimensionality reduction. The first encoder may include two or more stacked fully connected layers. Each fully connected layer may sequentially connect a batch normalization layer, an activation layer, and a regularization layer (e.g., a dropout layer). This application does not limit the specific network structure of the first encoder. The activation layer in the first encoder may include, but is not limited to, ELU layers (a non-linear activation function), ReLU layers (a non-linear activation function), and TanH layers (a non-linear activation function), which can be determined according to the specific needs of the actual application scenario and are not limited here.

[0118] Understandably, the feature output by the last network layer in the first encoder can be called the first gene encoding feature. For example, if the first encoder includes two stacked fully connected network layers, then the feature output by the first gene expression feature after passing through the first fully connected network layer, and then through the normalization network layer, activation network layer, and regularization network layer connected to the first fully connected network layer, can continue to be used as the input of the second fully connected network layer. Furthermore, the feature output by the second fully connected network layer, and then through the normalization network layer, activation network layer, and regularization network layer connected to the second fully connected network layer, can be used as the first gene encoding feature.

[0119] Step S103: The first gene coding feature and the first spatial neighborhood map are encoded by the second encoder in the initial prediction model to obtain the second gene coding feature, and the first gene coding feature and the second gene coding feature are combined into the first joint coding feature.

[0120] Specifically, the first gene coding feature and the first spatial neighborhood graph can be input into the second encoder in the initial prediction model. The first gene coding feature and the first spatial neighborhood graph are downsampled by the first graph convolutional network layer in the second encoder to obtain graph convolutional features. The graph convolutional features are convolved by the second graph convolutional network layer in the second encoder to obtain the mean features and variance features corresponding to the candidate cell set. The sampling parameters are obtained in the standard Gaussian distribution, and the product of the sampling parameters and the variance features, as well as the sum of the mean features, are determined as the second gene coding feature.

[0121] The second encoder takes as input the first gene-encoded feature and the first spatial neighborhood map output by the first encoder. The second encoder performs graph encoding embedding on the input first gene-encoded feature and the first spatial neighborhood map to obtain the spatially embedded feature, i.e., the second gene-encoded feature. The second encoder may include two sparse graph convolutional network layers (i.e., the aforementioned first and second graph convolutional network layers), an activation network layer (e.g., a ReLU layer, not limited here), and a regularization network layer (e.g., a dropout layer). Each sparse graph convolutional network layer can be followed by a regularization network layer. The first sparse graph convolutional network layer (the first graph convolutional network layer) can generate a low-dimensional feature matrix, i.e., the aforementioned graph convolutional features; the second sparse graph convolutional network layer (the second graph convolutional network layer) can generate mean features and variance features respectively. These mean and variance features can then be processed to synthesize the final hidden feature representation, i.e., the second gene-encoded feature.

[0122] Understandably, if the mean feature is denoted as μ and the variance feature as σ, then the second gene coding feature can be denoted as S = μ + σ * τ, where τ is a random number conforming to a standard Gaussian distribution (i.e., the sampling parameter mentioned above), meaning τ is a random number selected from a Gaussian distribution (normal distribution) with a mean of 0 and a variance of 1. Furthermore, the first gene coding feature output by the first encoder can be added to the second gene coding feature output by the second encoder to obtain the first joint coding feature.

[0123] Step S104: The first joint coding feature is decoded by the first decoder in the initial prediction model to obtain gene expression reconstruction features. The first joint coding feature is then decoded by the second decoder in the initial prediction model to obtain a reconstruction spatial neighborhood map.

[0124] Specifically, the first joint coding feature can be input into the first decoder and the second decoder respectively. The first decoder decodes the first joint coding feature, that is, it restores the first gene expression feature based on the first joint coding feature to obtain the gene expression reconstruction feature (i.e., the reconstructed first gene expression feature). The second decoder decodes the first joint coding feature, that is, it restores the first spatial neighborhood graph based on the first joint coding feature to obtain the reconstructed spatial neighborhood graph (i.e., the reconstructed first spatial neighborhood graph).

[0125] The first decoder may include a fully connected network layer followed by a normalized network layer, an activation network layer, and a regularization network layer. Of course, the network structure of the first decoder can be determined according to the actual application scenario requirements, such as whether to connect activation and normalized network layers, or whether to increase the number of fully connected network layers, etc., which is not limited here. The second decoder can determine whether two nodes are adjacent by the inner product of the distribution features (e.g., mean and variance features) between nodes (cells), and then output a reconstructed spatial neighborhood graph. The network structure of the second decoder is not limited here.

[0126] It should be noted that the autoencoder composed of the first encoder and the first decoder can maximize the similarity between the gene expression reconstruction features output by the first decoder and the first gene expression features by utilizing the mean squared error (MSE) loss function. The variational graph autoencoder (VGAE) composed of the second encoder and the second decoder can be used to process the spatial neighborhood graph of the embedding. The variational modification of its second encoder-second decoder structure can introduce regularization in the latent space, thereby improving the performance of spatial embedding.

[0127] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a graph convolutional network model provided in an embodiment of this application. For example... Figure 5 The graph convolutional network model 40k shown is the baseline model for the initial prediction model. This graph convolutional network model 40k can be composed of an autoencoder 40a and a variational graph autoencoder 40b. Based on the reference dataset and the spatial transcriptome dataset, a first spatial neighborhood graph 40e and a first gene expression feature 40c can be obtained. After dimensionality reduction processing by the first encoder, the first gene expression feature 40c can be used to obtain the first gene coding feature 40d. Then, the first spatial neighborhood graph 40e and the first gene coding feature 40d can be input into the second encoder. After graph encoding embedding by the second encoder, the first spatial neighborhood graph 40e and the first gene coding feature 40d can output the mean feature 40f and the variance feature 40g. Then, the mean feature 40f and the variance feature 40g can be synthesized into the second gene coding feature 40h.

[0128] The first gene coding feature 40d and the second gene coding feature 40h are added together to obtain the first joint coding feature 40n. This first joint coding feature 40n can be represented as the final embedding feature expression of the first spatial neighborhood graph 40e and the first gene expression feature 40c. The first joint coding feature 40n can be input to the first decoder and the second decoder respectively. After decoding processing by the first decoder, the gene expression reconstruction feature 40i is output. After decoding processing by the second decoder, the reconstruction spatial neighborhood graph 40j is output.

[0129] It should be noted that, for ease of description, the embodiments of this application can be described as follows: Figure 5 The graph convolutional network model 40k shown is abbreviated as graph convolutional network model 40m. The encoding components in graph convolutional network model 40m include a first encoder and a second encoder. The decoding components in graph convolutional network model 40m include a first decoder and a second decoder. The feature Z in graph convolutional network model 40m represents the aforementioned first joint encoding feature 40n.

[0130] Step S105: Based on gene expression reconstruction features, first gene expression features, reconstruction spatial neighborhood map, first spatial neighborhood map, first joint coding features, and label information of candidate cell sets in the reference dataset, the network parameters of the initial prediction model are corrected to obtain the target prediction model; the target prediction model is used to output the gene spatial distribution prediction results or cell prediction types of the spatial transcriptome data corresponding to the tissue sample.

[0131] Specifically, the loss function of the initial prediction model will vary depending on the spatial transcriptomics task it aims to achieve. Therefore, the loss function of the initial prediction model is related to the spatial transcriptomics task it intends to accomplish. Regardless of the spatial transcriptomics task the initial prediction model aims to achieve, its total loss is determined based on gene expression reconstruction features, first gene expression features, reconstructed spatial neighborhood graph, first spatial neighborhood graph, first joint coding features, and the label information of the candidate cell set in the reference dataset. After calculating the total loss of the initial prediction model, the network parameters of the initial prediction model can be iteratively trained based on this total loss until the total loss reaches the training termination condition. At this point, training is stopped, and the initial prediction model at the end of training is saved. The target prediction model is then determined based on the initial prediction model at the end of training.

[0132] The training termination condition can be that the total model loss is less than or equal to a pre-set error threshold, or that the initial prediction model has reached a pre-set maximum number of iterations. The network structure of the target prediction model will differ depending on the spatial transcriptomics task the initial prediction model is designed to perform. For example, if the initial prediction model is designed to predict gene spatial distribution, the resulting target prediction model can be used to output the gene spatial distribution prediction results for the spatial transcriptomics data corresponding to tissue samples. Similarly, if the initial prediction model is designed to annotate cell type, the resulting target prediction model can be used to output the predicted cell type for the spatial transcriptomics data corresponding to tissue samples.

[0133] In this embodiment, compared to the cellular gene expression features established from single-cell transcriptome data, spatial transcriptome data can also include the spatial location information of cells. The spatial arrangement of cells can represent the relationships between cells. The initial prediction model can utilize the spatial location information of cells (presented in the form of a spatial neighborhood graph, such as the first spatial neighborhood graph) and introduce the shared gene expression features between cells and their neighbors. The target prediction model trained in this way can improve the prediction accuracy of spatial transcriptome data. In addition, since the spatial neighborhood graphs corresponding to the reference dataset and spatial transcriptome data are large-scale graph structure data, a random subgraph training strategy can be adopted in the training stage of the initial prediction model, which can save computational resources when training large-scale graph structure data is completed.

[0134] It should be noted that the target prediction model trained in this application embodiment (i.e., the aforementioned DAGCN) can fully utilize the prior knowledge of cell gene expression profiles and cell types established based on single-cell transcriptome sequencing data (also known as single-cell transcriptome data, which can be used as a reference dataset during the training process of DAGCN). This prior knowledge is applied to the gene spatial distribution prediction and cell type annotation process of spatial transcriptome using domain transfer. In addition, compared with single-cell transcriptome, spatial transcriptome can also obtain the spatial location of cells. The spatial arrangement of cells can be used to characterize the relationships between cells. The DAGCN method can use the spatial location information of cells to embed (a spatial neighborhood graph obtained by random subgraph training) to obtain the gene co-expression features between cells and neighboring cells, which can improve the performance of gene spatial distribution prediction and cell type annotation of spatial transcriptome.

[0135] The following will combine Figures 6 to 8c The training process of the initial prediction model used to predict the spatial distribution of genes in spatial transcriptome data is described in detail.

[0136] Please see Figure 6 , Figure 6 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 2 It is understood that this data processing method can be executed by a computer device, which can be a server or a terminal device; this application does not limit this. Figure 6 As shown, the data processing method may include the following steps S201 to S210:

[0137] Step S201: Obtain a reference dataset and a spatial transcriptome dataset. Based on the reference dataset and the spatial transcriptome dataset, obtain a first spatial neighborhood map containing a candidate cell set. The first spatial neighborhood map is used to characterize the spatial location information of cells in the candidate cell set. The reference dataset includes single-cell transcriptome data carrying label information.

[0138] Step S202: Obtain the first gene expression features of the candidate cell set in the reference dataset and the spatial transcriptome dataset, and encode the first gene expression features through the first encoder in the initial prediction model to obtain the first gene coding features.

[0139] Step S203: The first gene coding feature and the first spatial neighborhood map are encoded by the second encoder in the initial prediction model to obtain the second gene coding feature, and the first gene coding feature and the second gene coding feature are combined into the first joint coding feature.

[0140] Step S204: The first joint coding feature is decoded by the first decoder in the initial prediction model to obtain gene expression reconstruction features. The first joint coding feature is then decoded by the second decoder in the initial prediction model to obtain a reconstruction spatial neighborhood map.

[0141] The specific implementation process of steps S201 to S204 can be found in the foregoing. Figure 2 The descriptions of steps S101 to S104 in the corresponding embodiments will not be repeated here.

[0142] Step S205: Input the gene expression reconstruction features and the reconstruction spatial neighborhood map into the first domain classifier, and output the first classification result through the first domain classifier; input the first joint coding features into the second domain classifier, and output the second classification result through the second domain classifier.

[0143] In this embodiment, to achieve the task of predicting the spatial distribution of genes in spatial transcriptome data, two additional domain classifiers can be added to the graph convolutional network model to perform domain transfer training from the reference dataset (source domain) to the spatial transcriptome dataset (target domain). In other words, the initial prediction model at this time, in addition to the aforementioned first encoder, second encoder, first decoder, and second decoder, may also include the first domain classifier D. c Second domain classifier D i Among them, the first domain classifier D c It can be used to assist the graph convolutional network model training on the reference dataset (source domain) in the process of reconstructing the first gene expression features and the first spatial neighborhood graph of the input; the second domain classifier D iThis is used to distinguish datasets from different sources, specifically to differentiate whether the input first gene expression feature and first spatial neighborhood map originate from the reference dataset (source domain) or the spatial transcriptome dataset (target domain). During the training of the initial prediction model, the first gene expression feature input to the initial prediction model includes the gene expression features corresponding to common genes in the reference dataset and the spatial transcriptome dataset for each cell in the candidate cell set (referred to as common gene expression features), and the initialized gene expression features corresponding to the target gene (referred to as initialized target gene expression features). The gene expression features of common genes and target genes in the candidate cell set contained in the reference dataset can serve as supervisory information for training the initial prediction model; that is, the common gene expression features and target gene expression features in the reference dataset can serve as label information for the candidate cell set.

[0144] It should be noted that the training process of the initial prediction model can include three stages: The first stage uses only the reference dataset as input data for the initial prediction model. In this stage, the first gene expression feature input to the initial prediction model can be the common gene expression features corresponding to each cell in the candidate cell set of the reference dataset and the initialized target gene expression features. For example, the initialized target gene expression features can refer to the gene expression matrix obtained by setting the target gene expression features in the reference dataset to zero. The second stage uses only the spatial transcriptome dataset as input data for the initial prediction model. In this stage, the first gene expression feature input to the initial prediction model can be the common gene expression features corresponding to each cell in the candidate cell set of the spatial transcriptome dataset and the initialized target gene expression features. Since the spatial transcriptome dataset does not contain the measurement values ​​of the target gene, i.e., the spatial transcriptome dataset does not contain the gene expression features corresponding to the target gene in the candidate cell set, the initialized target gene expression features can be a gene expression matrix composed of random numbers, or the target gene expression features can be omitted entirely; this application does not impose any limitations on this. The third stage can use both the reference dataset and the spatial transcriptome dataset as input data for the initial prediction model, i.e., both the reference dataset and the spatial transcriptome dataset can be input simultaneously, and a second-domain classifier D can be used. i By distinguishing input data from different datasets, a second-domain classifier D can be trained. i .

[0145] Please see Figure 7 , Figure 7 This is a schematic diagram illustrating the training of an initial prediction model for a gene spatial distribution prediction task, provided in an embodiment of this application. Figure 7Dataset 50a represents the reference dataset, and dataset 50b represents the spatial transcriptome dataset. If a candidate cell set belongs to tissue sample 50c in the reference dataset, then the common gene expression features and target gene expression features of the candidate cell set in tissue sample 50c are used as label information M. s (Supervisory information); the first gene expression characteristic at this time can be denoted as M. a M a This could refer to the tag information M s The gene expression matrix after zeroing out the target gene expression features; the first spatial neighborhood graph at this time can be denoted as A. s A s This represents the spatial location information of the candidate cell set within tissue sample 50c. If the candidate cell set belongs to tissue sample 50d in the spatial transcriptome dataset, this candidate cell set does not carry label information in the spatial transcriptome dataset; in this case, the first gene expression feature can be denoted as M. t M t This can represent the common gene expression characteristics of the candidate cell set in the 50-day tissue sample and the randomly initialized target gene expression characteristics; the first spatial neighborhood graph at this time can be denoted as A. t A t This indicates the spatial location information of the candidate cell set within the tissue sample 50d.

[0146] During the training of the initial prediction model, the first gene expression features and the first spatial neighborhood graph are input into the graph convolutional network model 40m contained in the initial prediction model (the specific structure can be as described above). Figure 5 The encoding component in the graph convolutional network model 40k shown can be used to obtain the first joint encoding feature Z. This first joint encoding feature Z can then be input into the decoding component in the graph convolutional network model 40m, through which gene expression reconstruction features and a reconstruction spatial neighborhood map can be obtained. Furthermore, the gene expression reconstruction features and reconstruction spatial neighborhood map output by the decoding component can be input into the first domain classifier D. c Through the first domain classifier D c The first classification result can be output. Simultaneously, the first joint encoded feature Z can also be input into the second domain classifier D. i Through the second domain classifier D i It can output the second classification result.

[0147] Step S206: Determine the first classification loss corresponding to the first domain classifier based on the first classification result, and determine the second classification loss corresponding to the second domain classifier based on the second classification result and the dataset label to which the first gene expression feature belongs.

[0148] Specifically, such as Figure 7 As shown, it can be determined based on the first domain classifier D. c The first classification result is output, and the classifier D for the first domain is calculated. c The corresponding first classification loss L c Among them, the first classification loss L c It can be used to assist in the process of restoring the first gene expression features and the first spatial neighborhood graph of the initial prediction model in the training reference dataset.

[0149] Optionally, the second domain classifier D can be determined based on the second classification result and the dataset label to which the first gene expression feature belongs. i The corresponding second classification loss L i The dataset label (also called domain label) to which the first gene expression feature belongs can be used to determine whether the first gene expression feature belongs to the reference dataset or the spatial transcriptome dataset; when the first gene expression feature belongs to the reference dataset (the first gene expression feature is M...). a If the dataset label to which the first gene expression feature belongs is the source domain label, then the second domain classifier D... i The dataset labels used during training are source domain labels; when the first gene expression feature belongs to the spatial transcriptome dataset (the first gene expression feature is M) t If the dataset label to which the first gene expression feature belongs is the target domain label, then the second domain classifier D... i During training, use the opposite dataset labels (i.e., source domain labels). The first domain classifier D is backpropagated. c First category loss L c and the second domain classifier D i Second category loss L i It can be used to update the network parameters of a 40m graph convolutional network model.

[0150] Step S207: If the first gene expression feature belongs to the reference dataset, then the first reconstruction loss of the initial prediction model is determined based on the error between the gene expression reconstruction feature and the label information corresponding to the candidate cell set, as well as the error between the reconstruction spatial neighborhood map and the first spatial neighborhood map.

[0151] Specifically, such as Figure 7 As shown, if the expression characteristic of the first gene is M a (Belonging to the reference dataset), the first spatial neighborhood graph input to the initial prediction model is A. s At this point, the gene expression reconstruction feature output by the decoding component is M′ a The reconstructed spatial neighborhood graph is A′ s At this point, feature M′ can be reconstructed based on gene expression. a The tag information M corresponding to the candidate cell sets The error between them, and the reconstruction of the spatial neighborhood graph A′ s And the first spatial neighborhood graph A s The error between them determines the first reconstruction loss of the initial prediction model.

[0152] Step S208: If the first gene expression feature belongs to the spatial transcriptome dataset, then the second reconstruction loss of the initial prediction model is determined based on the error between the gene expression reconstruction feature and the first gene expression feature, and the error between the reconstruction spatial neighborhood map and the first spatial neighborhood map.

[0153] Specifically, such as Figure 7 As shown, if the expression characteristic of the first gene is M t (Belonging to the spatial transcriptome dataset), the first spatial neighborhood graph input to the initial prediction model is A. t At this point, the gene expression reconstruction feature output by the decoding component is M′ t The reconstructed spatial neighborhood graph is A′ t At this point, feature M′ can be reconstructed based on gene expression. t and the first gene expression characteristic M t The error between them, and the reconstruction of the spatial neighborhood graph A′ t And the first spatial neighborhood graph A t The error between them determines the second reconstruction loss of the initial prediction model.

[0154] Optionally, the gene expression remodeling feature M′ can be used. t The reduction value of the shared gene in the input is compared with the expression feature M of the first gene. t The error between them, and the reconstruction of the spatial neighborhood graph A′ t And the first spatial neighborhood graph A t The error between them determines the second reconstruction loss of the initial prediction model. Understandably, this first reconstruction loss Second reconstruction loss All of them can be MSE loss, or they can be other loss function types. This application does not limit the type of reconstruction loss function.

[0155] Step S209: Determine the total model loss of the initial prediction model based on the first classification loss, the second classification loss, the first reconstruction loss, and the second reconstruction loss.

[0156] Specifically, the first classification loss L can be... c Second category loss L i First reconstruction loss and the second reconstruction loss This is combined to form the total model loss of the initial prediction model. For example, the first classification loss L can be... c Second category loss L i First reconstruction loss and the second reconstruction loss Perform a weighted summation or a segmented weighted summation to obtain the total model loss of the initial prediction model.

[0157] Step S210: Iteratively train the network parameters in the initial prediction model based on the total model loss until the total model loss meets the training termination condition. Then stop training and determine the first encoder, second encoder, and first decoder in the initial prediction model at the end of training as the target prediction model. The target prediction model is used to output the gene spatial distribution prediction results of the spatial transcriptome data corresponding to the tissue sample.

[0158] Specifically, after calculating the total loss of the initial prediction model, the network parameters of the initial prediction model can be iteratively trained based on the total loss until the total loss reaches the training termination condition (the total loss is less than or equal to a pre-set error threshold, or the number of training iterations of the initial prediction model reaches a pre-set maximum number of iterations, etc.). At this point, training can be stopped and all network parameters of the initial prediction model at the end of training can be saved. Then, the first encoder, the second encoder, and the first decoder at the end of training can be determined as the target prediction model for outputting the gene spatial distribution prediction results of the spatial transcriptome data corresponding to the tissue sample.

[0159] It is understood that when the target prediction model trained in this application embodiment (which can be referred to as the DAGCN method) is used to achieve the task of predicting the spatial distribution of genes in the spatial transcriptome, the performance of the DAGCN method and various existing gene spatial distribution prediction methods can be quantitatively compared on different datasets. In the specific gene spatial distribution prediction test, taking four spatial transcriptome datasets and seven existing gene spatial distribution prediction methods as examples, the performance of the DAGCN method and existing gene spatial distribution prediction methods is quantitatively compared. Among them, the four spatial transcriptome datasets used in the above gene spatial distribution prediction test can be gene spatial transcriptome datasets of different biological organ specimen slices. The gene spatial transcriptome datasets can include, but are not limited to: HPR dataset (mouse hypothalamus preoptic area dataset, referred to as dataset 1), MOP dataset (mouse primary motor cortex dataset, referred to as dataset 2), VISp (primary visual cortex) dataset (mouse primary visual cortex dataset, referred to as dataset 3), and Testis dataset (mouse seminal vesicle cell dataset, referred to as dataset 4).

[0160] The seven existing gene spatial distribution prediction methods used in gene spatial distribution prediction tests may include, but are not limited to: Tangram (a method using non-convex optimization and deep learning, referred to as Method 1), stPlus (a method to improve the accuracy of spatial transcriptomics, referred to as Method 2), SpaGE (a spatial gene enhancement method based on single-cell RNA sequencing, referred to as Method 3), gimVI (a method using a deep generative model, referred to as Method 4), Seurat (a method using canonical correlation analysis, referred to as Method 5), MNN (a method using a mutual nearest neighbor search algorithm to correct batch effects in single-cell RNA sequencing, referred to as Method 6), and Liger (a method using non-negative matrix factorization and shared factor neighborhood graphs, referred to as Method 7), etc.

[0161] In this embodiment, Spearman correlation coefficients (SCC), root mean square error (RMSE), and model runtime are used to evaluate the performance of different gene spatial distribution prediction methods. Specifically, SCC is used to assess the correlation between the actual and predicted spatial distributions of each gene in the spatial transcriptome data; a higher SCC indicates better performance. RMSE is used to assess the error between the actual and predicted spatial distributions of each gene in the spatial transcriptome data; a lower RMSE indicates better performance.

[0162] Please see Figures 8a to 8c , Figure 8a , Figure 8b , Figure 8c The following are schematic diagrams of gene spatial distribution prediction results based on the target prediction model provided in the embodiments of this application. Figure 1 , indication Figure 2 and indication Figure 3 .pass Figure 8a As shown by the SCC index, in four different spatial transcriptome datasets, the DAGCN method proposed in this application achieves the optimal SCC index compared to the existing seven gene spatial distribution prediction methods. Figure 8b As shown in the RMSE index, in four different spatial transcriptome datasets, the DAGCN method achieved the lowest RMSE index compared to the seven existing gene spatial distribution prediction methods, or was second only to the lowest RMSE index (e.g., method 4 tested in datasets 3 and 4). Figure 8cThe runtime results show that, across four different spatial transcriptome datasets, the DAGCN method exhibits relatively moderate efficiency compared to the seven existing gene spatial distribution prediction methods. In summary, based on SCC and RMSE metrics, the DAGCN method demonstrates better performance in gene spatial distribution prediction tasks compared to the seven commonly used methods, while maintaining relatively moderate efficiency. Furthermore, visualization reveals a very high degree of similarity between the gene spatial distribution predicted by the DAGCN method and the actual gene spatial distribution.

[0163] In this embodiment, during the training of the initial prediction model, prior knowledge of cell gene expression features established from single-cell transcriptome data in the reference dataset can be fully utilized. Domain transfer can be used to apply this prior knowledge to the prediction of gene spatial distribution in spatial transcriptome data. Secondly, compared to the cell gene expression features established from single-cell transcriptome data, spatial transcriptome data can also include cell spatial location information. The spatial arrangement of cells can represent the relationships between cells. The initial prediction model can utilize this spatial location information and introduce shared gene expression features between cells and their neighbors. The resulting target prediction model can improve the performance of gene spatial distribution prediction in spatial transcriptome data. Furthermore, since the spatial neighborhood graphs corresponding to the reference dataset and spatial transcriptome data are large-scale graph-structured data, a random subgraph training strategy can be adopted during the initial prediction model training phase. This saves computational resources when training large-scale graph-structured data.

[0164] The following will combine Figures 9 to 11 The training process of the initial prediction model used to perform cell type annotation tasks for spatial transcriptome data is described in detail.

[0165] Please see Figure 9 , Figure 9 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 3 Understandably, this data processing method can be executed by a computer device, which can be a server or a terminal device; this application does not limit this. Figure 9 As shown, the data processing method may include the following steps S301 to S309:

[0166] Step S301: Obtain a reference dataset and a spatial transcriptome dataset. Based on the reference dataset and the spatial transcriptome dataset, obtain a first spatial neighborhood map containing a candidate cell set. The first spatial neighborhood map is used to characterize the spatial location information of cells in the candidate cell set. The reference dataset includes single-cell transcriptome data carrying label information.

[0167] Step S302: Obtain the first gene expression features of the candidate cell set in the reference dataset and the spatial transcriptome dataset, and encode the first gene expression features through the first encoder in the initial prediction model to obtain the first gene coding features.

[0168] Step S303: The first gene coding feature and the first spatial neighborhood map are encoded by the second encoder in the initial prediction model to obtain the second gene coding feature, and the first gene coding feature and the second gene coding feature are combined into the first joint coding feature.

[0169] Step S304: The first joint coding feature is decoded by the first decoder in the initial prediction model to obtain gene expression reconstruction features. The first joint coding feature is then decoded by the second decoder in the initial prediction model to obtain a reconstruction spatial neighborhood map.

[0170] The specific implementation process of steps S301 to S304 can be found in the foregoing. Figure 2 The descriptions of steps S101 to S104 in the corresponding embodiments will not be repeated here.

[0171] Step S305: The first joint coding feature is sequentially input into the second domain classifier and the feature classifier. The second domain classifier outputs the second classification result, and the feature classifier identifies the first joint feature to obtain the cell classification result.

[0172] In this embodiment of the application, in order to achieve the cell type annotation task of spatial transcriptome data, an additional domain classifier D can be added to the graph convolutional network model. i To perform domain transfer training from the reference dataset (source domain) to the spatial transcriptome dataset (target domain), a feature classifier CLS is added to perform cell type prediction based on the first joint encoded feature Z. In other words, the initial prediction model at this point, in addition to the aforementioned first encoder, second encoder, first decoder, and second decoder, may also include the feature classifier CLS and the second domain classifier D. i At this point, during the training of the initial prediction model, the first gene expression feature input to the initial prediction model includes the gene expression features corresponding to the common genes of each cell in the candidate cell set in the reference dataset and the spatial transcriptome dataset (common gene expression features); the label information corresponding to the candidate cell set can be the cell type label of each cell in the candidate cell set in the reference dataset.

[0173] It should be noted that the training process of the initial prediction model can also include three stages: The first stage uses only the reference dataset as input data for the initial prediction model. In this stage, the first gene expression feature input to the initial prediction model can be the common gene expression features corresponding to each cell in the candidate cell set of the reference dataset. The second stage uses only the spatial transcriptome dataset as input data for the initial prediction model. In this stage, the first gene expression feature input to the initial prediction model can be the common gene expression features corresponding to each cell in the candidate cell set of the spatial transcriptome dataset. The third stage can use both the reference dataset and the spatial transcriptome dataset as input data for the initial prediction model; that is, both the reference dataset and the spatial transcriptome dataset can be input simultaneously, and the second-domain classifier D is used. i By distinguishing input data from different datasets, a second-domain classifier D can be trained. i .

[0174] Please see Figure 10 , Figure 10 This is a schematic diagram illustrating the training of an initial prediction model for a cell type annotation task, as provided in an embodiment of this application. For a description of the dataset to which the candidate cell set belongs, please refer to the foregoing. Figure 7 The relevant descriptions in the corresponding embodiments will not be repeated here. During the training of the initial prediction model, the first joint encoding feature Z can be obtained through the encoding component in the graph convolutional network model 40m, and the gene expression reconstruction features and the reconstruction spatial neighborhood map can be obtained through the decoding component in the graph convolutional network model 40m. Further, the first joint encoding feature Z can be input into the feature classifier CLS, and the cell classification result can be obtained by the feature classifier CLS recognizing and processing the first joint encoding feature Z. This first joint encoding feature Z can also be input into the second domain classifier D. i Through the second domain classifier D i It can output the second classification result.

[0175] Step S306: Based on the second classification result and the dataset label to which the first gene expression feature belongs, determine the second classification loss corresponding to the second domain classifier; based on the cell classification result and the cell type label corresponding to the candidate cell set, determine the feature classification loss corresponding to the feature classifier.

[0176] Specifically, such as Figure 10 As shown, the second domain classifier D can be determined based on the second classification result and the dataset label (domain label) to which the first gene expression feature belongs. i The corresponding second classification loss L i Among them, the second classification loss L iThe calculation method can be found in the relevant description in step S206 above, and will not be repeated here; the second domain classifier D is backpropagated. i Second category loss L i It can be used to update the network parameters of a 40m graph convolutional network model.

[0177] Based on the error between the cell classification results and the cell type labels of the candidate cell set in the reference dataset, the feature classification loss L corresponding to the feature classifier CLS is calculated. FL (Y s Y p ); where Y s Y represents the cell type label corresponding to the candidate cell set. p This represents the cell classification result of each cell in the candidate cell set predicted by the feature classifier CLS, referring to the cell type label Y in the dataset. s It can be used to train the feature classifier CLS.

[0178] Step S307: Determine the second reconstruction loss of the initial prediction model based on the error between the gene expression reconstruction features and the first gene expression features, as well as the error between the reconstruction spatial neighborhood map and the first spatial neighborhood map.

[0179] Specifically, such as Figure 10 As shown, if the expression characteristic of the first gene is M a (Belonging to the reference dataset), the first spatial neighborhood graph input to the initial prediction model is A. s At this point, the gene expression reconstruction feature output by the decoding component is M′ a The reconstructed spatial neighborhood graph is A′ s At this point, feature M′ can be reconstructed based on gene expression. a and the first gene expression characteristic M a The error between them, and the reconstruction of the spatial neighborhood graph A′ s And the first spatial neighborhood graph A s The error between them determines the second reconstruction loss of the initial prediction model.

[0180] Optionally, if the first gene expression characteristic is M t (Belonging to the spatial transcriptome dataset), the first spatial neighborhood graph input to the initial prediction model is A. t At this point, the gene expression reconstruction feature output by the decoding component is M′ t The reconstructed spatial neighborhood graph is A′ t At this point, feature M′ can be reconstructed based on gene expression. t and the first gene expression characteristic M t The error between them, and the reconstruction of the spatial neighborhood graph A′t And the first spatial neighborhood graph A t The error between them determines the second reconstruction loss of the initial prediction model.

[0181] Step S308: Determine the total model loss corresponding to the initial prediction model based on the second classification loss, feature classification loss, and second reconstruction loss.

[0182] Specifically, the second classification loss Li and the feature classification loss L can be... FL (Y s Y p and the second reconstruction loss or This is combined to form the total model loss of the initial prediction model. For example, the second classification loss L can be... i Feature classification loss L FL (Y s Y p and the second reconstruction loss or We perform a weighted summation to obtain the total model loss of the initial prediction model.

[0183] Step S309: Iteratively train the network parameters in the initial prediction model based on the total model loss until the total model loss meets the training termination condition. Then stop training and determine the first encoder, second encoder, and feature classifier in the initial prediction model at the end of training as the target prediction model. The target prediction model is used to output the cell prediction type of the spatial transcriptome data corresponding to the tissue sample.

[0184] Specifically, after calculating the total loss of the initial prediction model, the network parameters of the initial prediction model can be iteratively trained based on the total loss until the total loss reaches the training termination condition (the total loss is less than or equal to a pre-set error threshold, or the number of training iterations of the initial prediction model reaches a pre-set maximum number of iterations, etc.). At this point, training can be stopped and all network parameters of the initial prediction model at the end of training can be saved. Then, the first encoder, the second encoder, and the feature classifier at the end of training can be determined as the target prediction model for outputting the cell prediction type of the spatial transcriptome data corresponding to the tissue sample.

[0185] It is understood that when the target prediction model (DAGCN method) trained in this embodiment of the application is used to achieve the cell type annotation task of spatial transcriptomics, the performance of the DAGCN method can be quantitatively compared with that of various existing cell type annotation methods on different datasets. Specifically, in the cell type annotation test, using three spatial transcriptomics datasets and ten existing cell type annotation methods as examples, the performance of the DAGCN method and existing cell type annotation methods is quantitatively compared. The three spatial transcriptomics datasets used in the cell type annotation test can be the aforementioned dataset 1, dataset 2, and dataset 4. The 10 existing cell type annotation methods used in the cell type annotation test may include, but are not limited to: Tangram (i.e., Method 1 mentioned above), Spatial-ID (a cell type annotation method for spatially high-resolution transcriptome data through transfer learning and spatial embedding, which can be referred to as Method 8), DNN (Deep Neural Networks, which can be referred to as Method 9), Cell-ID (a single-cell level gene feature extraction and cell type annotation method based on cell identifiers, which can be referred to as Method 10), SciBet (a portable and fast single-cell type annotation method, which can be referred to as Method 11), Scmap (a data projection method for single-cell RNA sequencing across datasets, which can be referred to as Method 12), ScNym (a single-cell classification method based on semi-supervised adversarial neural networks, which can be referred to as Method 13), Seurat (i.e., Method 5 mentioned above), SingleR (a single-cell sequencing cell type annotation method, which can be referred to as Method 14), and Cell2location (a method using a Bayesian model, which can be referred to as Method 15), etc.

[0186] In this embodiment, accuracy (ACC) and F1 score are used to evaluate the performance of different cell type annotation methods. ACC represents the accuracy of cell type annotation results, calculated as the number of correctly predicted samples divided by the total number of samples. The F1 score is the harmonic mean of precision and recall, with a maximum value of 1 and a minimum value of 0. Precision refers to the probability of correctly predicting a positive sample among all predicted positive samples, while recall refers to the probability of correctly predicting a positive sample among the original positive samples. Generally, high precision corresponds to low recall, and vice versa. Higher values ​​for both ACC and F1 score indicate better performance. It is understandable that the calculation method of F1 score can be selected according to the actual application scenario in cell type annotation test, such as Micro-F1 score (calculate the overall F1 score of all categories), Macro-F1 score (calculate the average of the F1 scores of each category), Weighted-F1 (weighted average F1 score, calculate the weighted average of the F1 scores of each category). This application embodiment does not limit the calculation method of F1 score.

[0187] Please see Figure 11 , Figure 11 This is a schematic diagram illustrating cell type annotation results based on a target prediction model provided in an embodiment of this application. For example... Figure 11 As shown, the ACC indices of the DAGCN method proposed in this application and the aforementioned 10 existing cell type annotation methods on datasets 1, 2, and 4 are shown in histograms 60a, 60c, and 60e, respectively; the weighted average F1 score indices of the DAGCN method and the aforementioned 10 existing cell type annotation methods on datasets 1, 2, and 4 are shown in histograms 60b, 60d, and 60f, respectively. Figure 11 As shown in the ACC and weighted average F1 scores, in three different spatial transcriptome datasets, the DAGCN method has higher ACC and weighted average F1 scores than the 10 commonly used cell type annotation methods, indicating that the DAGCN method performs better in cell type annotation tasks. Furthermore, visualization reveals that the predicted cell types obtained by the DAGCN method have a very high similarity to the actual cell types.

[0188] In this embodiment, during the training of the initial prediction model, prior knowledge of cell types established from single-cell transcriptome data in the reference dataset can be fully utilized. Domain transfer can be used to apply this prior knowledge to the cell type prediction process of spatial transcriptome data. Secondly, compared to the cell gene expression features established from single-cell transcriptome data, spatial transcriptome data can also include spatial location information of cells. The spatial arrangement of cells can represent the relationships between cells. The initial prediction model can utilize the spatial location information of cells (presented in the form of a spatial neighborhood graph) and introduce shared gene expression features between cells and their neighbors. The target prediction model trained in this way can improve the performance of cell type annotation for spatial transcriptome data. Furthermore, since the spatial neighborhood graphs corresponding to the reference dataset and spatial transcriptome data are large-scale graph structure data, a random subgraph training strategy can be adopted during the training phase of the initial prediction model. This can save computational resources when training large-scale graph structure data.

[0189] The following will combine Figure 12 and Figure 13 Regarding the aforementioned Figures 6 to 8c The application process of the target prediction model trained in the corresponding embodiment in the task of predicting the spatial distribution of genes in the spatial transcriptome is described.

[0190] Please see Figure 12 , Figure 12 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 4 Understandably, this data processing method can be executed by a computer device, which can be a server or a terminal device; this application does not limit this. Figure 12 As shown, the data processing method may include the following steps S401 to S404:

[0191] Step S401: Obtain spatial transcriptome data corresponding to the tissue sample. Based on the spatial location information and second gene expression characteristics contained in the spatial transcriptome data, construct a second spatial neighborhood map corresponding to the cells in the tissue sample.

[0192] Step S402: The second gene expression features are encoded by the first encoder in the target prediction model to obtain the third gene encoding features corresponding to the spatial transcriptome data.

[0193] Step S403: The second spatial neighborhood map and the third gene coding feature are encoded by the second encoder in the target prediction model to obtain the fourth gene coding feature corresponding to the spatial transcriptome data. The third gene coding feature and the fourth gene coding feature are combined into the second joint coding feature.

[0194] Step S404: The second joint coding feature is decoded by the first decoder in the target prediction model to obtain the gene spatial distribution prediction result corresponding to the spatial transcriptome data.

[0195] In this embodiment, the target prediction model may include a trained first encoder, a second encoder, and a first decoder. After obtaining the spatial transcriptome data corresponding to the tissue sample to be processed, a second spatial neighborhood map corresponding to the cells in the tissue sample can be constructed based on the spatial location information and second gene expression features contained in the spatial transcriptome data. This second spatial neighborhood map includes all cells in the tissue sample to be processed. The gene spatial distribution prediction process of the target prediction model based on the spatial transcriptome data can be found in the foregoing. Figure 2 The relevant descriptions of the gene expression reconstruction feature generation process in the corresponding embodiments will not be repeated here.

[0196] Please see Figure 13 , Figure 13 This is a schematic diagram illustrating gene spatial distribution prediction based on a target prediction model, provided in an embodiment of this application. For example... Figure 13 As shown, after obtaining the spatial transcriptome data corresponding to the tissue sample to be processed, a second spatial neighborhood graph 70f corresponding to the spatial transcriptome data can be constructed. The second gene expression feature 70d in the spatial transcriptome data can be input into the first encoder in the target prediction model 70a. After dimensionality reduction processing by the first encoder, the third gene coding feature 70e can be obtained. Then, the second spatial neighborhood graph 70f and the third gene coding feature 70e can be input into the second encoder. After graph encoding embedding by the second encoder, the second spatial neighborhood graph 70f and the third gene coding feature 70e can output the mean feature 70g and the variance feature 70h. Then, the mean feature 70g and the variance feature 70h can be synthesized into the fourth gene coding feature 70i.

[0197] The third gene coding feature 70e and the fourth gene coding feature 70i are added together to obtain the second joint coding feature 70j. This second joint coding feature 70j can be represented as the final embedding feature expression of the second spatial neighborhood graph 70f and the second gene expression feature 70d. The second joint coding feature 70j can be input into the first decoder, and after decoding processing by the first decoder, the gene spatial distribution prediction result is output.

[0198] In this embodiment, compared to the cell gene expression features established by single-cell transcriptome data, spatial transcriptome data may also include the spatial location information of cells. The spatial arrangement of cells can be characterized as the interrelationship between cells. By utilizing the spatial location information of cells and introducing the shared gene expression features between cells and their neighbors, the target prediction model trained in this way can improve the prediction accuracy of gene spatial distribution from spatial transcriptome data.

[0199] The following will combine Figure 14 and Figure 15 Regarding the aforementioned Figures 9 to 11 The application process of the target prediction model trained in the corresponding embodiment in the cell type annotation task of spatial transcriptomics is described.

[0200] Please see Figure 14 , Figure 14 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 5 Understandably, this data processing method can be executed by a computer device, which can be a server or a terminal device; this application does not limit this. Figure 14 As shown, the data processing method may include the following steps S501 to S504:

[0201] Step S501: Obtain spatial transcriptome data corresponding to the tissue sample. Based on the spatial location information and second gene expression characteristics contained in the spatial transcriptome data, construct a second spatial neighborhood map corresponding to the cells in the tissue sample.

[0202] Step S502: The second gene expression features are encoded by the first encoder in the target prediction model to obtain the third gene encoding features corresponding to the spatial transcriptome data.

[0203] Step S503: The second spatial neighborhood map and the third gene coding feature are encoded by the second encoder in the target prediction model to obtain the fourth gene coding feature corresponding to the spatial transcriptome data. The third gene coding feature and the fourth gene coding feature are combined into the second joint coding feature.

[0204] Step S504: The second joint encoded features are identified by the feature classifier in the target prediction model to obtain the cell prediction type corresponding to the cells in the tissue sample.

[0205] In this embodiment, the target prediction model may include a trained first encoder, a second encoder, and a feature classifier. After obtaining the spatial transcriptome data corresponding to the tissue sample to be processed, a second spatial neighborhood map corresponding to the cells in the tissue sample can be constructed based on the spatial location information and second gene expression features contained in the spatial transcriptome data. This second spatial neighborhood map includes all cells in the tissue sample to be processed. The cell type prediction process of the target prediction model for the spatial transcriptome data can be found in the foregoing. Figure 9 The process of generating the cell classification results in the corresponding embodiments will not be repeated here.

[0206] Please see Figure 15 , Figure 15 This is a schematic diagram illustrating gene spatial distribution prediction based on a target prediction model, provided in an embodiment of this application. For example... Figure 15 As shown, after obtaining the spatial transcriptome data corresponding to the tissue sample to be processed, a second spatial neighborhood graph 80f corresponding to the spatial transcriptome data can be constructed. The second gene expression feature 80d in the spatial transcriptome data can be input into the first encoder in the target prediction model 80a. After dimensionality reduction processing by the first encoder, the third gene coding feature 80e can be obtained. Then, the second spatial neighborhood graph 80f and the third gene coding feature 80e can be input into the second encoder. After graph encoding embedding by the second encoder, the second spatial neighborhood graph 80f and the third gene coding feature 80e can output the mean feature 80g and the variance feature 80h. Then, the mean feature 80g and the variance feature 80h can be synthesized into the fourth gene coding feature 80i.

[0207] The third gene coding feature 80e and the fourth gene coding feature 80i are added together to obtain the second joint coding feature 80j. This second joint coding feature 80j can be represented as the final embedding feature expression of the second spatial neighborhood graph 80f and the second gene expression feature 80d. The second joint coding feature 80j can be input into a feature classifier. After the feature classifier identifies and processes the second joint coding feature 80j, it outputs the predicted cell type corresponding to each cell in the tissue sample.

[0208] In this embodiment of the application, compared with the cell gene expression characteristics established by single-cell transcriptome data, spatial transcriptome data may also include the spatial location information of cells. The spatial arrangement of cells can be characterized as the relationship between cells. By using the spatial location information of cells and introducing the shared gene expression characteristics between cells and neighboring cells, the target prediction model trained thereby can improve the accuracy of cell prediction type of spatial transcriptome data.

[0209] It is understood that in the specific embodiments of this application, biological tissue slices (human tissue slices) used for medical research may be involved. When the above embodiments of this application are applied to specific products or technologies, permission or consent from users or other parties is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0210] Please see Figure 16 , Figure 16 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application. Figure 16 As shown, the data processing device 1 includes: a neighborhood graph acquisition module 101, a first encoding module 102, a second encoding module 103, a first decoding module 104, and a parameter correction module 105.

[0211] The neighborhood graph acquisition module 101 is used to acquire a reference dataset and a spatial transcriptome dataset. Based on the reference dataset and the spatial transcriptome dataset, it acquires a first spatial neighborhood graph containing a candidate cell set. The first spatial neighborhood graph is used to characterize the spatial location information of cells in the candidate cell set. The reference dataset includes single-cell transcriptome data carrying label information.

[0212] The first encoding module 102 is used to obtain the first gene expression features of the candidate cell set in the reference dataset and the spatial transcriptome dataset, and to encode the first gene expression features through the first encoder in the initial prediction model to obtain the first gene encoding features.

[0213] The second encoding module 103 is used to encode the first gene encoding feature and the first spatial neighborhood graph through the second encoder in the initial prediction model to obtain the second gene encoding feature, and to combine the first gene encoding feature and the second gene encoding feature into a first joint encoding feature.

[0214] The first decoding module 104 is used to decode the first joint coding feature through the first decoder in the initial prediction model to obtain gene expression reconstruction features, and to decode the first joint coding feature through the second decoder in the initial prediction model to obtain a reconstruction spatial neighborhood map.

[0215] The parameter correction module 105 is used to correct the network parameters of the initial prediction model based on the gene expression reconstruction features, the first gene expression features, the reconstruction spatial neighborhood map, the first spatial neighborhood map, the first joint coding features, and the label information of the candidate cell set in the reference dataset, so as to obtain the target prediction model. The target prediction model is used to output the gene spatial distribution prediction results or cell prediction types of the spatial transcriptome data corresponding to the tissue sample.

[0216] In one or more embodiments, the neighborhood graph acquisition module 101 acquires a first spatial neighborhood graph containing a set of candidate cells based on a reference dataset and a spatial transcriptome dataset, including:

[0217] Based on the distance between adjacent cells in the reference dataset and the similarity between the gene expression features corresponding to adjacent cells in the reference dataset, a source domain spatial neighborhood graph corresponding to the reference dataset is constructed.

[0218] Based on the distance between adjacent cells in the spatial transcriptome dataset and the similarity between the gene expression features corresponding to adjacent cells in the spatial transcriptome dataset, a spatial neighborhood map of the target domain corresponding to the spatial transcriptome dataset is constructed.

[0219] Select an initial cell subset in the source domain spatial neighborhood graph and the target domain spatial neighborhood graph, obtain the first-order neighbor cells and second-order neighbor cells of the cells in the initial cell subset, and combine the initial cell subset, first-order neighbor cells and second-order neighbor cells into a candidate cell set.

[0220] In the source domain spatial neighborhood graph and the target domain spatial neighborhood graph, the edges between cells contained in the candidate cell set, and the cells contained in the candidate cell set are determined as the first spatial neighborhood graph.

[0221] In one or more embodiments, the first encoding module 102 encodes the first gene expression features using the first encoder in the initial prediction model to obtain the first gene encoding features, including:

[0222] The first gene expression feature is input into the first encoder in the initial prediction model. The first gene expression feature is then processed by the fully connected network layer in the first encoder to obtain the fully connected output feature.

[0223] The fully connected output features are normalized to obtain normalized features. The normalized features are then transformed according to the activation network layer in the first encoder to obtain gene transformation features.

[0224] The gene transformation features are regularized by the regularized network layer in the first encoder to obtain the first gene coding features.

[0225] In one or more embodiments, the second encoding module 103 encodes the first gene coding features and the first spatial neighborhood graph using the second encoder in the initial prediction model to obtain the second gene coding features, including:

[0226] The first gene encoding feature and the first spatial neighborhood graph are input into the second encoder in the initial prediction model. The first gene encoding feature and the first spatial neighborhood graph are downsampled according to the first graph convolutional network layer in the second encoder to obtain graph convolutional features.

[0227] The graph convolution features are convolutionally processed by the second graph convolutional network layer in the second encoder to obtain the mean and variance features corresponding to the candidate cell set.

[0228] The sampling parameters are obtained from the standard Gaussian distribution. The product of the sampling parameters and the variance feature, and the sum of the mean feature are used to determine the second gene coding feature.

[0229] In one or more embodiments, the initial prediction model further includes a first domain classifier and a second domain classifier; the first gene expression feature includes the common gene expression features of the candidate cell set in the reference dataset and the spatial transcriptome dataset and the initialized target gene expression feature; the label information corresponding to the candidate cell set includes the common gene expression features and the target gene expression features in the reference dataset;

[0230] The parameter correction module 105 corrects the network parameters of the initial prediction model based on the gene expression reconstruction features, the first gene expression features, the reconstruction spatial neighborhood graph, the first spatial neighborhood graph, the first joint coding features, and the label information of the candidate cell set in the reference dataset, to obtain the target prediction model, including:

[0231] The gene expression reconstruction features and the reconstruction spatial neighborhood map are input into the first domain classifier, and the first domain classifier outputs the first classification result.

[0232] The first joint encoded feature is input into the second domain classifier, and the second classification result is output through the second domain classifier.

[0233] Based on the first classification result, the second classification result, gene expression reconstruction features, the first gene expression feature, the reconstructed spatial neighborhood map, the first spatial neighborhood map, and the label information corresponding to the candidate cell set, the network parameters of the initial prediction model are corrected to obtain the target prediction model; the target prediction model is used to output the gene spatial distribution prediction results of the spatial transcriptome data corresponding to the tissue sample.

[0234] In one or more embodiments, the parameter correction module 105 corrects the network parameters of the initial prediction model based on the first classification result, the second classification result, gene expression reconstruction features, the first gene expression features, the reconstruction spatial neighborhood map, the first spatial neighborhood map, and the label information corresponding to the candidate cell set, to obtain the target prediction model, including:

[0235] The first classification loss corresponding to the first domain classifier is determined based on the first classification result, and the second classification loss corresponding to the second domain classifier is determined based on the second classification result and the dataset label to which the first gene expression feature belongs.

[0236] If the first gene expression feature belongs to the reference dataset, then the first reconstruction loss of the initial prediction model is determined based on the error between the gene expression reconstruction feature and the label information corresponding to the candidate cell set, as well as the error between the reconstruction spatial neighborhood map and the first spatial neighborhood map.

[0237] If the first gene expression feature belongs to the spatial transcriptome dataset, then the second reconstruction loss of the initial prediction model is determined based on the error between the gene expression reconstruction feature and the first gene expression feature, as well as the error between the reconstruction spatial neighborhood map and the first spatial neighborhood map.

[0238] Based on the first classification loss, the second classification loss, the first reconstruction loss, and the second reconstruction loss, determine the total model loss of the initial prediction model;

[0239] The network parameters in the initial prediction model are iteratively trained based on the total model loss until the total model loss meets the training termination condition. Then, the training stops, and the first encoder, second encoder, and first decoder in the initial prediction model at the end of training are determined as the target prediction model.

[0240] In one or more embodiments, the initial prediction model further includes a second domain classifier and a feature classifier; the first gene expression feature includes the common gene expression features of the candidate cell set in the reference dataset and the spatial transcriptome dataset; the label information corresponding to the candidate cell set includes cell type labels in the reference dataset;

[0241] The parameter correction module 105 corrects the network parameters of the initial prediction model based on the gene expression reconstruction features, the first gene expression features, the reconstruction spatial neighborhood graph, the first spatial neighborhood graph, the first joint coding features, and the label information of the candidate cell set in the reference dataset, to obtain the target prediction model, including:

[0242] The first joint coding feature is sequentially input into the second domain classifier and the feature classifier. The second domain classifier outputs the second classification result, and the feature classifier identifies the first joint feature to obtain the cell classification result.

[0243] Based on the second classification result, cell classification result, gene expression reconstruction feature, first gene expression feature, reconstruction spatial neighborhood map, first spatial neighborhood map, and cell type label corresponding to the candidate cell set, the network parameters of the initial prediction model are corrected to obtain the target prediction model; the target prediction model is used to output the cell prediction type of the spatial transcriptome data corresponding to the tissue sample.

[0244] In one or more embodiments, based on the second classification result, cell classification result, gene expression reconstruction features, first gene expression features, reconstruction spatial neighborhood map, first spatial neighborhood map, and cell type labels corresponding to the candidate cell set, the network parameters of the initial prediction model are corrected to obtain the target prediction model, including:

[0245] Based on the second classification result and the dataset label to which the first gene expression feature belongs, determine the second classification loss corresponding to the second domain classifier;

[0246] Based on the cell classification results and the cell type labels corresponding to the candidate cell set, determine the feature classification loss corresponding to the feature classifier;

[0247] The second reconstruction loss of the initial prediction model is determined based on the error between the gene expression reconstruction feature and the first gene expression feature, as well as the error between the reconstruction spatial neighborhood graph and the first spatial neighborhood graph.

[0248] The total model loss corresponding to the initial prediction model is determined based on the second classification loss, feature classification loss, and second reconstruction loss.

[0249] The network parameters in the initial prediction model are iteratively trained based on the total model loss until the total model loss meets the training termination condition. Then, the training stops, and the first encoder, second encoder, and feature classifier in the initial prediction model at the end of training are determined as the target prediction model.

[0250] In one or more embodiments, the data processing apparatus 1 further includes:

[0251] The neighborhood graph construction module 106 is used to obtain the spatial transcriptome data corresponding to the tissue sample, and construct the second spatial neighborhood graph corresponding to the cells in the tissue sample based on the spatial location information and second gene expression characteristics contained in the spatial transcriptome data.

[0252] The third encoding module 107 is used to encode the expression features of the second gene through the first encoder in the target prediction model to obtain the third gene encoding features corresponding to the spatial transcriptome data.

[0253] The fourth encoding module 108 is used to encode the second spatial neighborhood map and the third gene encoding features through the second encoder in the target prediction model to obtain the fourth gene encoding features corresponding to the spatial transcriptome data, and to combine the third gene encoding features and the fourth gene encoding features into a second joint encoding feature.

[0254] The second decoding module 109 is used to decode the second joint coding feature through the first decoder in the target prediction model to obtain the gene spatial distribution prediction result corresponding to the spatial transcriptome data.

[0255] In one or more embodiments, the data processing apparatus 1 further includes:

[0256] The neighborhood graph construction module 106 is used to obtain the spatial transcriptome data corresponding to the tissue sample, and construct the second spatial neighborhood graph corresponding to the cells in the tissue sample based on the spatial location information and second gene expression characteristics contained in the spatial transcriptome data.

[0257] The third encoding module 107 is used to encode the expression features of the second gene through the first encoder in the target prediction model to obtain the third gene encoding features corresponding to the spatial transcriptome data.

[0258] The fourth encoding module 108 is used to encode the second spatial neighborhood map and the third gene encoding features through the second encoder in the target prediction model to obtain the fourth gene encoding features corresponding to the spatial transcriptome data, and to combine the third gene encoding features and the fourth gene encoding features into a second joint encoding feature.

[0259] The feature classification module 110 is used to identify the second joint encoded features through the feature classifier in the target prediction model to obtain the cell prediction type corresponding to the cells in the tissue sample.

[0260] According to one embodiment of this application, the steps involved in the data processing method described above can be performed by... Figure 16 The data processing apparatus 1 shown is executed by each module. For example, Figure 2 The step S101 shown can be performed by Figure 16 The neighborhood graph acquisition module 101 shown is used to execute this. Figure 2 The step S102 shown can be performed by Figure 16 The first encoding module 102 shown is used to execute this. Figure 2 The step S103 shown can be performed by Figure 16 The second encoding module 103 shown is used to execute this. Figure 2 The step S104 shown can be performed by Figure 16 The first decoding module 104 shown is used to perform this operation. Figure 2 The step S105 shown can be performed by Figure 16 The parameter correction module 105 shown is used to perform the above.

[0261] According to one embodiment of this application, Figure 16The modules in the data processing device 1 shown can be individually or entirely combined into one or more units, or some of the units can be further divided into at least two functionally smaller sub-units to achieve the same operation without affecting the technical effects of the embodiments of this application. The above modules are based on logical function division. In practical applications, the function of one module can also be implemented by at least two units, or the function of at least two modules can be implemented by one unit. In other embodiments of this application, the data processing device 1 may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by at least two units.

[0262] In this embodiment, during the training of the initial prediction model, the prior knowledge of cell gene expression features and cell types established from single-cell transcriptome data in the reference dataset can be fully utilized. Domain transfer can be used to apply this prior knowledge to the prediction of gene spatial distribution and cell type in the spatial transcriptome data. Secondly, compared to the cell gene expression features established from single-cell transcriptome data, spatial transcriptome data can also include cell spatial location information. The spatial arrangement of cells can represent the relationships between cells. The initial prediction model can utilize the spatial location information of cells (presented in the form of a spatial neighborhood graph) and introduce shared gene expression features between cells and their neighbors. The target prediction model trained in this way can improve the prediction accuracy of spatial transcriptome data; that is, it can improve the performance of gene spatial distribution prediction and cell type annotation in spatial transcriptome data. Furthermore, since the spatial neighborhood graphs corresponding to the reference dataset and spatial transcriptome data are large-scale graph structure data, a random subgraph training strategy can be adopted during the training phase of the initial prediction model. This can save computational resources when training large-scale graph structure data.

[0263] Please see Figure 17 , Figure 17 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 17 As shown, the computer device 1000 can be a terminal device, for example, the one described above. Figure 1 The terminal device 10a in the corresponding embodiment can also be a server, for example, as described above. Figure 1The server 10d in the corresponding embodiment will not be limited here. For ease of understanding, this application takes a computer device as an example as the terminal device. The computer device 1000 may include: a processor 1001, a network interface 1004, and a memory 1005. In addition, the computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage device. The memory 1005 may also optionally be at least one storage device located remotely from the aforementioned processor 1001. Figure 17 As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application.

[0264] The network interface 1004 in the computer device 1000 can also provide network communication functions, and the optional user interface 1003 can also include a display screen and a keyboard. Figure 17 In the computer device 1000 shown, the network interface 1004 provides network communication functionality; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:

[0265] A reference dataset and a spatial transcriptome dataset are obtained. Based on the reference dataset and the spatial transcriptome dataset, a first spatial neighborhood map containing candidate cell sets is obtained. The first spatial neighborhood map is used to characterize the spatial location information of cells in the candidate cell set. The reference dataset includes single-cell transcriptome data carrying label information.

[0266] The first gene expression features of the candidate cell set in the reference dataset and the spatial transcriptome dataset are obtained. The first gene expression features are encoded by the first encoder in the initial prediction model to obtain the first gene encoding features.

[0267] The first gene coding feature and the first spatial neighborhood graph are encoded by the second encoder in the initial prediction model to obtain the second gene coding feature. The first gene coding feature and the second gene coding feature are combined into the first joint coding feature.

[0268] The first joint coding feature is decoded by the first decoder in the initial prediction model to obtain the gene expression reconstruction feature. The first joint coding feature is then decoded by the second decoder in the initial prediction model to obtain the reconstruction spatial neighborhood map.

[0269] Based on gene expression reconstruction features, first gene expression features, reconstructed spatial neighborhood graph, first spatial neighborhood graph, first joint coding features, and the label information of candidate cell sets in the reference dataset, the network parameters of the initial prediction model are corrected to obtain the target prediction model; the target prediction model is used to output the gene spatial distribution prediction results or cell prediction types of the spatial transcriptome data corresponding to the tissue sample.

[0270] It should be understood that the computer device 1000 described in the embodiments of this application can execute the foregoing text. Figure 2 , Figure 6 , Figure 9 , Figure 12 as well as Figure 14 The description of the data processing method in any of the embodiments can also be performed as described above. Figure 16 The description of the data processing device 1 in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated here.

[0271] Furthermore, it should be noted that this application embodiment also provides a computer-readable storage medium, which stores a computer program executed by the aforementioned data processing device 1. The computer program includes program instructions, and when the processor executes the program instructions, it can execute the aforementioned... Figure 2 , Figure 6 , Figure 9 , Figure 12 as well as Figure 14 The description of the data processing method in any of the embodiments is redundant and will not be repeated here. Similarly, the beneficial effects of using the same method will not be repeated here either. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. For technical details not disclosed in the embodiments of the computer-readable storage medium involved in this application, please refer to the description of the method embodiments of this application. As an example, program instructions can be deployed and executed on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network. These multiple computing devices distributed across multiple locations and interconnected via a communication network can constitute a blockchain system.

[0272] Furthermore, it should be noted that this application also provides a computer program product or computer program, which may include computer instructions, which may be stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions, causing the computer device to perform the aforementioned actions. Figure 2 , Figure 6 , Figure 9 , Figure 12 as well as Figure 14 The description of the data processing method in any of the embodiments is redundant and will not be repeated here. Similarly, the beneficial effects of using the same method will not be repeated here either. For technical details not disclosed in the computer program products or computer program embodiments related to this application, please refer to the description of the method embodiments of this application.

[0273] The terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different media content, not to describe a specific order. Furthermore, the term "comprising," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.

[0274] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0275] The methods and related apparatuses provided in this application are described with reference to the method flowcharts and / or structural diagrams provided in this application. Specifically, each block of the method flowchart and / or structural diagram, as well as combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to create a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the process. Figure 1A schematic diagram of one or more processes and / or structures. Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 A schematic diagram of one or more processes and / or structures. Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 A process or multiple processes and / or structures illustrate the steps of the functions specified in one or more boxes.

[0276] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.

Claims

1. A data processing method, characterized in that, include: Obtain a reference dataset and a spatial transcriptome dataset, and based on the reference dataset and the spatial transcriptome dataset, obtain a first spatial neighborhood map containing a set of candidate cells; The first spatial neighborhood map is used to characterize the spatial location information of cells in the candidate cell set, and the reference dataset includes single-cell transcriptome data carrying label information; The candidate cell set is obtained from the reference dataset and the spatial transcriptome dataset. The first gene expression feature is encoded by the first encoder in the initial prediction model to obtain the first gene encoding feature. The first gene coding feature and the first spatial neighborhood graph are encoded by the second encoder in the initial prediction model to obtain the second gene coding feature. The first gene coding feature and the second gene coding feature are then combined into the first joint coding feature. The first joint coding feature is decoded by the first decoder in the initial prediction model to obtain gene expression reconstruction features, and the first joint coding feature is decoded by the second decoder in the initial prediction model to obtain a reconstruction spatial neighborhood map. Based on the gene expression reconstruction features, the first gene expression features, the reconstruction spatial neighborhood map, the first spatial neighborhood map, the first joint coding features, and the label information of the candidate cell set in the reference dataset, the network parameters of the initial prediction model are corrected to obtain the target prediction model; the target prediction model is used to output the gene spatial distribution prediction results or cell prediction types of the spatial transcriptome data corresponding to the tissue sample.

2. The method according to claim 1, characterized in that, The step of obtaining a first spatial neighborhood map containing a set of candidate cells based on the reference dataset and the spatial transcriptome dataset includes: Based on the distance between adjacent cells in the reference dataset and the similarity between the gene expression features corresponding to adjacent cells in the reference dataset, a source domain spatial neighborhood graph corresponding to the reference dataset is constructed. Based on the distance between adjacent cells in the spatial transcriptome dataset and the similarity between the gene expression features corresponding to adjacent cells in the spatial transcriptome dataset, a target domain spatial neighborhood graph corresponding to the spatial transcriptome data is constructed. An initial cell subset is selected from the source domain spatial neighborhood graph and the target domain spatial neighborhood graph. The first-order neighbor cells and second-order neighbor cells of the cells in the initial cell subset are obtained. The initial cell subset, the first-order neighbor cells, and the second-order neighbor cells are combined into a candidate cell set. In the source domain spatial neighborhood graph and the target domain spatial neighborhood graph, the edges between cells contained in the candidate cell set, and the cells contained in the candidate cell set are determined as the first spatial neighborhood graph.

3. The method according to claim 1, characterized in that, The process of encoding the first gene expression feature using the first encoder in the initial prediction model to obtain the first gene coding feature includes: The first gene expression feature is input into the first encoder in the initial prediction model, and the first gene expression feature is processed by the fully connected network layer in the first encoder to obtain the fully connected output feature. The fully connected output features are normalized to obtain normalized features. The normalized features are then transformed according to the activation network layer in the first encoder to obtain gene transformation features. The gene transformation features are regularized according to the regularized network layer in the first encoder to obtain the first gene encoding features.

4. The method according to claim 1, characterized in that, The step of encoding the first gene coding feature and the first spatial neighborhood graph using the second encoder in the initial prediction model to obtain the second gene coding feature includes: The first gene encoding feature and the first spatial neighborhood graph are input into the second encoder in the initial prediction model. The first gene encoding feature and the first spatial neighborhood graph are downsampled according to the first graph convolutional network layer in the second encoder to obtain graph convolutional features. The graph convolution features are convolutionally processed by the second graph convolutional network layer in the second encoder to obtain the mean and variance features corresponding to the candidate cell set. The sampling parameters are obtained from the standard Gaussian distribution, and the product of the sampling parameters and the variance feature, plus the sum of the mean feature, are determined as the second gene coding feature.

5. The method according to claim 1, characterized in that, The initial prediction model further includes a first domain classifier and a second domain classifier; the first gene expression feature includes the common gene expression features of the candidate cell set in the reference dataset and the spatial transcriptome dataset and the initialized target gene expression feature; The label information corresponding to the candidate cell set includes the common gene expression features and target gene expression features in the reference dataset; The step of refining the network parameters of the initial prediction model based on the gene expression reconstruction features, the first gene expression features, the reconstruction spatial neighborhood graph, the first spatial neighborhood graph, the first joint encoding features, and the label information of the candidate cell set in the reference dataset to obtain the target prediction model includes: The gene expression reconstruction features and the reconstruction spatial neighborhood map are input into the first domain classifier, and the first classification result is output through the first domain classifier. The first joint encoded feature is input into the second domain classifier, and the second domain classifier outputs the second classification result. Based on the first classification result, the second classification result, the gene expression reconstruction feature, the first gene expression feature, the reconstructed spatial neighborhood map, the first spatial neighborhood map, and the label information corresponding to the candidate cell set, the network parameters of the initial prediction model are corrected to obtain the target prediction model; the target prediction model is used to output the gene spatial distribution prediction results of the spatial transcriptome data corresponding to the tissue sample.

6. The method according to claim 5, characterized in that, The step of correcting the network parameters of the initial prediction model based on the first classification result, the second classification result, the gene expression reconstruction feature, the first gene expression feature, the reconstruction spatial neighborhood graph, the first spatial neighborhood graph, and the label information corresponding to the candidate cell set to obtain the target prediction model includes: Based on the first classification result, determine the first classification loss corresponding to the first domain classifier; based on the second classification result and the dataset label to which the first gene expression feature belongs, determine the second classification loss corresponding to the second domain classifier. If the first gene expression feature belongs to the reference dataset, then the first reconstruction loss of the initial prediction model is determined based on the error between the gene expression reconstruction feature and the label information corresponding to the candidate cell set, and the error between the reconstruction spatial neighborhood map and the first spatial neighborhood map. If the first gene expression feature belongs to the spatial transcriptome dataset, then the second reconstruction loss of the initial prediction model is determined based on the error between the gene expression reconstruction feature and the first gene expression feature, and the error between the reconstruction spatial neighborhood map and the first spatial neighborhood map. The total model loss of the initial prediction model is determined based on the first classification loss, the second classification loss, the first reconstruction loss, and the second reconstruction loss. The network parameters in the initial prediction model are iteratively trained based on the total model loss until the total model loss meets the training termination condition. Then, the training stops, and the first encoder, second encoder, and first decoder in the initial prediction model at the end of training are determined as the target prediction model.

7. The method according to claim 1, characterized in that, The initial prediction model further includes a second domain classifier and a feature classifier; the first gene expression feature includes the common gene expression features of the candidate cell set in the reference dataset and the spatial transcriptome dataset; The label information corresponding to the candidate cell set includes cell type labels in the reference dataset; The step of refining the network parameters of the initial prediction model based on the gene expression reconstruction features, the first gene expression features, the reconstruction spatial neighborhood graph, the first spatial neighborhood graph, the first joint encoding features, and the label information of the candidate cell set in the reference dataset to obtain the target prediction model includes: The first joint encoded feature is sequentially input into the second domain classifier and the feature classifier. The second domain classifier outputs a second classification result, and the feature classifier identifies the first joint feature to obtain a cell classification result. Based on the second classification result, the cell classification result, the gene expression reconstruction feature, the first gene expression feature, the reconstruction spatial neighborhood map, the first spatial neighborhood map, and the cell type label corresponding to the candidate cell set, the network parameters of the initial prediction model are corrected to obtain the target prediction model; the target prediction model is used to output the cell prediction type of the spatial transcriptome data corresponding to the tissue sample.

8. The method according to claim 7, characterized in that, The step of correcting the network parameters of the initial prediction model based on the second classification result, the cell classification result, the gene expression reconstruction feature, the first gene expression feature, the reconstruction spatial neighborhood graph, the first spatial neighborhood graph, and the cell type label corresponding to the candidate cell set to obtain the target prediction model includes: Based on the second classification result and the dataset label to which the first gene expression feature belongs, determine the second classification loss corresponding to the second domain classifier; Based on the cell classification results and the cell type labels corresponding to the candidate cell set, determine the feature classification loss corresponding to the feature classifier; The second reconstruction loss of the initial prediction model is determined based on the error between the gene expression reconstruction feature and the first gene expression feature, and the error between the reconstruction spatial neighborhood graph and the first spatial neighborhood graph. The total model loss corresponding to the initial prediction model is determined based on the second classification loss, the feature classification loss, and the second reconstruction loss. The network parameters in the initial prediction model are iteratively trained based on the total model loss until the total model loss meets the training termination condition. Then, the training stops, and the first encoder, second encoder, and feature classifier in the initial prediction model at the end of training are determined as the target prediction model.

9. The method according to any one of claims 5 to 6, characterized in that, The method further includes: Acquire spatial transcriptome data corresponding to the tissue sample, and construct a second spatial neighborhood map corresponding to the cells in the tissue sample based on the spatial location information and second gene expression characteristics contained in the spatial transcriptome data. The second gene expression feature is encoded by the first encoder in the target prediction model to obtain the third gene encoding feature corresponding to the spatial transcriptome data; The second encoder in the target prediction model encodes the second spatial neighborhood map and the third gene coding feature to obtain the fourth gene coding feature corresponding to the spatial transcriptome data. The third gene coding feature and the fourth gene coding feature are then combined into a second joint coding feature. The second joint coding feature is decoded by the first decoder in the target prediction model to obtain the gene spatial distribution prediction result corresponding to the spatial transcriptome data.

10. The method according to any one of claims 7 to 8, characterized in that, The method further includes: Acquire spatial transcriptome data corresponding to the tissue sample, and construct a second spatial neighborhood map corresponding to the cells in the tissue sample based on the spatial location information and second gene expression characteristics contained in the spatial transcriptome data. The second gene expression feature is encoded by the first encoder in the target prediction model to obtain the third gene encoding feature corresponding to the spatial transcriptome data; The second encoder in the target prediction model encodes the second spatial neighborhood map and the third gene coding feature to obtain the fourth gene coding feature corresponding to the spatial transcriptome data. The third gene coding feature and the fourth gene coding feature are then combined into a second joint coding feature. The second joint encoded feature is identified by the feature classifier in the target prediction model to obtain the cell prediction type corresponding to the cells in the tissue sample.

11. A data processing apparatus, characterized in that, include: The neighborhood graph acquisition module is used to acquire a reference dataset and a spatial transcriptome dataset, and based on the reference dataset and the spatial transcriptome dataset, acquire a first spatial neighborhood graph containing a set of candidate cells; The first spatial neighborhood map is used to characterize the spatial location information of cells in the candidate cell set, and the reference dataset includes single-cell transcriptome data carrying label information; The first encoding module is used to obtain the first gene expression features of the candidate cell set in the reference dataset and the spatial transcriptome dataset, and to encode the first gene expression features through the first encoder in the initial prediction model to obtain the first gene encoding features; The second encoding module is used to encode the first gene encoding feature and the first spatial neighborhood map through the second encoder in the initial prediction model to obtain the second gene encoding feature, and to combine the first gene encoding feature and the second gene encoding feature into a first joint encoding feature. The first decoding module is used to decode the first joint coding feature through the first decoder in the initial prediction model to obtain gene expression reconstruction features, and to decode the first joint coding feature through the second decoder in the initial prediction model to obtain a reconstruction spatial neighborhood map. The parameter correction module is used to correct the network parameters of the initial prediction model based on the gene expression reconstruction features, the first gene expression features, the reconstruction spatial neighborhood map, the first spatial neighborhood map, the first joint coding features, and the label information of the candidate cell set in the reference dataset, to obtain the target prediction model; the target prediction model is used to output the gene spatial distribution prediction results or cell prediction types of the spatial transcriptome data corresponding to the tissue sample.

12. A computer device, characterized in that, Including memory and processor; The memory is connected to the processor, the memory is used to store computer programs, and the processor is used to invoke the computer programs so that the computer device performs the method according to any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded and executed by a processor to cause a computer device having the processor to perform the method of any one of claims 1 to 10.

14. A computer program product, characterized in that, Includes a computer program / instruction that, when executed by a processor, implements the method according to any one of claims 1 to 10.