A tumor immune microenvironment multi-cell recognition and spatial analysis system
By generating initial intrinsic signal vectors, preliminary functional labeling, functional neighborhood construction, and functional determination models, this method solves the problem of the inability to effectively integrate cellular intrinsic state and microenvironment information in existing technologies, and realizes dynamic modeling of the functional state of the tumor microenvironment and generation of continuous gradient maps.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- THE FIRST MEDICAL CENT CHINESE PLA GENERAL HOSPITAL
- Filing Date
- 2026-05-09
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies have failed to effectively integrate intrinsic cellular state information with local functional microenvironment context information in the tumor microenvironment, resulting in biases in the depiction of the spatial distribution map of functional heterogeneity in the tumor microenvironment.
By generating initial intrinsic signal vectors, preliminary functional labeling, functional neighborhood construction, composite feature splicing, and functional determination modules, combined with a pre-trained functional determination model, the final functional strength of cells under local microenvironment regulation is decoded, generating an effective functional map of cells under environmental regulation.
It achieves dynamic modeling of cell functional states, quantifies cell functional potential, avoids information loss caused by hard classification, and generates a continuous gradient map of cell functional states, reflecting the true distribution of cell functional tendencies.
Smart Images

Figure CN122157256A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of computer vision and relates to a multi-cell recognition and spatial analysis system for the tumor immune microenvironment. Background Technology
[0002] In tumor immunology research and clinical diagnosis, characterizing the cellular components, spatial distribution, and functional status within the tumor microenvironment is a core challenge for understanding tumor progression, assessing immunotherapy responses, and developing novel strategies. The tumor microenvironment is composed of various cell types, including tumor cells, immune cells, and stromal cells, which interact through complex signaling networks to jointly determine tumor growth, invasion, and metastasis. Simply identifying the cell types themselves is insufficient; a deep analysis of their effective functional status at specific spatial locations is crucial.
[0003] Currently, the industry's commonly used solutions are based on multiplex immunofluorescence or multiplex immunohistochemical imaging techniques, combined with automated image analysis algorithms, to extract single-cell information from tissue sections. This includes spectral unmixing of high-dimensional image data, cell segmentation, single-cell signal quantification, and cell type identification based on the expression levels of cell surface or internal biomarkers. Some existing technologies also perform basic spatial analysis, such as statistically analyzing the density or number distribution of a specific cell type around another cell type, to preliminarily explore the spatial proximity relationships between cells.
[0004] The method of determining function in isolation based on the expression of intrinsic cell markers has certain limitations. It fails to fully consider the biological reality that the polarization state of cell function is regulated by local microenvironment signals. For example, cells expressing M1 macrophage-related markers may have their effective anti-tumor function suppressed when surrounded by a large number of immunosuppressive cells. If they are identified as functionally active M1 cells based solely on their intrinsic markers, it will deviate from their actual biological functional state.
[0005] Based on the above problems, the present invention addresses the issue that existing technologies, when interpreting cell function, fail to effectively integrate intrinsic cellular state information with local functional microenvironment context information, resulting in biases in the depiction of the spatial distribution map of functional heterogeneity in the tumor microenvironment. Summary of the Invention
[0006] To address the aforementioned problems, this invention provides a multi-cell recognition and spatial analysis system for the tumor immune microenvironment.
[0007] A multi-cell recognition and spatial analysis system for the tumor immune microenvironment includes: The intrinsic signal generation module is used to acquire multispectral pathological images and perform spectral unmixing and cell segmentation, extract the independent fluorescence channel signal intensity of each cell object, and generate an initial intrinsic signal vector characterizing the expression level of isolated biomarkers. The preliminary functional labeling module compares the initial intrinsic signal vector with the preset classification rules to determine the preliminary phenotypic classification label for each cell object, and generates a preliminary phenotypic classification label map based on the spatial centroid coordinates of the cell object. The functional neighborhood construction module uses the preliminary phenotypic classification label map as a reference to search for neighboring cells within the preset analysis radius of each cell object. Based on the preliminary phenotypic classification labels of neighboring cells and the predefined phenotypic interaction influence matrix, it calculates and generates functional neighborhood feature vectors that characterize the local microenvironment. The composite feature splicing module splices the initial intrinsic signal vector with the functional neighborhood feature vector to construct a composite state feature vector containing its own state and environmental background information. The effective function determination module is used to input the composite state feature vector into the pre-trained function determination model and decode it to obtain the continuous value feature vector output by the function determination model, which characterizes the final functional strength under the regulation of the microenvironment. The functional map rendering module, based on the continuous value feature vector and spatial centroid coordinates output by the functional determination model, renders and generates an effective functional map of cells under environmental regulation.
[0008] A further aspect of the present invention involves generating an initial intrinsic signal vector characterizing the expression level of an isolated biomarker, comprising the following steps: A linear unmixing algorithm is used to decompose multispectral pathological images into independent fluorescence channel signals corresponding to different biomarkers; Based on the cell nuclear staining channel signal, a single cell object is located and segmented to obtain its spatial centroid coordinates; The raw signal intensity of each independent fluorescence channel was extracted within the segmented contour of each cell object; The signal intensity of the region extending beyond the outline of the cell object is calculated as the background value, and background correction is performed on the original signal intensity. The intensity of each channel after background correction is normalized by dividing it by the preset expected intensity value, forming an ordered sequence of real numbers as the initial intrinsic signal vector.
[0009] A further aspect of the present invention involves determining a preliminary phenotypic classification label for each cell object, including the following steps: Load a preset classification rule containing a logical expression, which defines the threshold conditions for the channel intensity of a specific biomarker; Iterate through each cell object and substitute the values of each dimension of its initial intrinsic signal vector into the preset classification rules for sequential matching; When the initial intrinsic signal vector satisfies all the logical conditions of a certain rule, the discrete category identifier corresponding to the rule is assigned as the preliminary phenotypic classification label of the cell object. A two-dimensional array corresponding to the image space is established, and the encoding values of the preliminary phenotypic classification labels are written at the positions indexed by the spatial centroid coordinates to generate a preliminary phenotypic classification label map.
[0010] A further aspect of the present invention involves searching for neighboring cells within a preset analysis radius for each cell object, including the following steps: A spatial index data structure is constructed based on the spatial centroid coordinates of all cell objects; Using the spatial centroid coordinates of the target cell being processed as the center, the spatial index data structure is used to query all other cell objects whose Euclidean distance is less than the preset analysis radius. Mark all other cell objects found as neighbor cells of the target cell.
[0011] A further aspect of this invention involves calculating and generating functional neighborhood feature vectors characterizing local microenvironments, comprising the following steps: The preliminary phenotypic classification label of the target cell is obtained as the row index, and the corresponding weight vector is extracted from the predefined phenotypic interaction influence matrix. Traverse all neighboring cells, obtain the preliminary phenotypic classification label of each neighboring cell as a column index, and find the corresponding interaction weight value from the weight vector; The interaction weight values are accumulated into the dimension corresponding to the neighbor cell label type in the multidimensional vector, and the resulting accumulated result is the functional neighborhood feature vector.
[0012] A further aspect of this invention involves constructing a composite state feature vector that includes both the user's own state and environmental background information, comprising the following steps: Create a one-dimensional array whose length is equal to the sum of the dimensions of the initial intrinsic signal vector and the dimensions of the feature vectors in the functional neighborhood; According to a predefined fixed splicing order, all elements of the initial intrinsic signal vector are copied to the beginning segment of the one-dimensional array; All elements of the functional neighborhood feature vector are copied to the subsequent segment of the one-dimensional array to form a composite state feature vector that simultaneously contains information on the cell's own biomarkers and information on the local cellular social environment.
[0013] A further aspect of the present invention is a pre-trained function determination model, comprising: The pre-trained functional determination model uses a neural network structure to represent the nonlinear mapping relationship from composite state feature vectors to effective functional tendencies; The composite state feature vector is calculated by forward propagation of the functional decision model, and a continuous numerical vector is output. Each component value of the continuous numerical vector is processed by an activation function and mapped to a value between 0 and 1. Each component value represents the effective tendency intensity of a specific functional type exhibited by the cell under the current local microenvironment regulation.
[0014] In a further embodiment of the present invention, each component value represents the effective tendency intensity of the cell to exhibit a specific functional type under the current local microenvironment regulation, including: Specific functional types include M1 efficacy tendency, M2 efficacy tendency, or cytotoxic efficacy tendency.
[0015] A further aspect of this invention involves rendering a map of effective cellular functions under environmental regulation, comprising the following steps: Create a blank canvas with the same dimensions as the original image; For each dimension of the continuous value feature vector output by the functional determination model, a visual style encoding rule is predefined to map the numerical values of the vector components to color attributes; Iterate through all cell objects and calculate the fill color based on the continuous value feature vector output by the model according to their functions; On a blank canvas, draw a geometric shape with a preset radius, centered on the spatial centroid coordinates of each cell object and using the calculated fill color.
[0016] A further aspect of this invention, which involves rendering and generating a map of effective cell function under environmental regulation, includes the following steps: Obtain the unmixed nuclear channel grayscale image or the original multispectral image as the background layer; Use the canvas containing the geometry of all cellular functional states as the foreground layer;
[0017] By setting the transparency parameter, the foreground layer and the background layer are overlaid and composited to output an image file that intuitively shows the distribution of the effective functional state of cells and their spatial relationship with the tissue structure.
[0018] In summary, the present invention has the following beneficial technical effects: 1. By dynamically constructing a functional neighborhood for each cell, and generating a functional neighborhood feature vector based on weighted statistics of the preliminary phenotypic classification labels of neighboring cells rather than their number or distance, this mechanism is achieved through a predefined phenotypic interaction influence matrix. This matrix can quantify biological prior knowledge, such as synergistic or antagonistic effects between specific cell types, into weights, transforming the composition of the neighborhood from a description of physical existence, i.e. how many cells there are, into a description of functional potential, i.e. how many promoting or inhibiting effects exist.
[0019] 2. By concatenating the initial intrinsic signal vector characterizing the expression level of cellular biomarkers with the functional neighborhood feature vector quantifying its local microenvironment, a composite state feature vector is constructed. This concatenation operation can simultaneously encapsulate the cell's intrinsic phenotypic information and its environmental context information within a single data structure. This feature-level fusion allows downstream models to directly examine both the cell's individual attributes and the environmental signals it receives within a unified feature space. Compared to methods that analyze intrinsic and extrinsic factors in a step-by-step or isolated manner, this approach achieves simultaneous modeling of the two core elements that determine the cell's final functional state.
[0020] 3. A pre-trained functional determination model is used to decode the composite state feature vector and output a continuous value feature vector. The pre-trained functional determination model learns from a large number of known samples and can interpret the nonlinear interaction between intrinsic signals and neighborhood features in the composite feature vector. The output is a continuous vector, rather than discrete, mutually exclusive category labels such as "M1 cell". It can characterize the intermediate or mixed states of cell functional state. This processing method avoids the information lost due to forced hard classification, so that the generated effective cell functional map can show the continuous gradual change of functional tendency, rather than the boundary of abrupt regions. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. The drawings are used to provide a further understanding of the present invention.
[0022] Figure 1 Structural schematic diagrams of embodiments of this application are disclosed. Detailed Implementation
[0023] The following is in conjunction with the appendix Figure 1 A preferred description of the present invention is provided below.
[0024] See attached document Figure 1 This invention proposes a multi-cell recognition and spatial analysis system for the tumor immune microenvironment, comprising the following modules: The intrinsic signal generation module is used to acquire multispectral pathological images and perform spectral unmixing and cell segmentation, extract the independent fluorescence channel signal intensity of each cell object, and generate an initial intrinsic signal vector characterizing the expression level of isolated biomarkers. The preliminary functional labeling module compares the initial intrinsic signal vector with the preset classification rules to determine the preliminary phenotypic classification label for each cell object, and generates a preliminary phenotypic classification label map based on the spatial centroid coordinates of the cell object. The functional neighborhood construction module uses the preliminary phenotypic classification label map as a reference to search for neighboring cells within the preset analysis radius of each cell object. Based on the preliminary phenotypic classification labels of neighboring cells and the predefined phenotypic interaction influence matrix, it calculates and generates functional neighborhood feature vectors that characterize the local microenvironment. The composite feature splicing module splices the initial intrinsic signal vector with the functional neighborhood feature vector to construct a composite state feature vector containing its own state and environmental background information. The effective function determination module is used to input the composite state feature vector into the pre-trained function determination model and decode it to obtain the continuous value feature vector output by the function determination model, which characterizes the final functional strength under the regulation of the microenvironment. The functional map rendering module, based on the continuous value feature vector and spatial centroid coordinates output by the functional determination model, renders and generates an effective functional map of cells under environmental regulation.
[0025] In one embodiment of the present invention, the intrinsic signal generation module is configured to perform the following steps: Full-scan image data of tumor tissue sections stained with multicolor immunofluorescence were acquired, and multispectral signal demixing was performed on the image data to separate the independent fluorescence channel signals corresponding to each biomarker. Individual cells were located and segmented based on the nuclear staining channel signals, and each segmented cell was assigned a unique identifier and spatial centroid coordinates.
[0026] For each cell, the signal intensities of all independent fluorescence channels are integrated within its segmented contour, and background correction and normalization are performed to generate an initial intrinsic signal vector characterizing the expression level of isolated biomarkers in that cell.
[0027] Specifically, the execution entity is a tissue image analysis system deployed on a computing server. The system loads full-scan multispectral image data of tumor tissue sections stained with multicolor immunofluorescence from a network storage device or a digital pathology scanner. Multispectral image data refers to a stack of digital images containing multiple continuous or discrete narrow-band light intensity information, acquired by a spectral imaging system mounted on a microscope. Multispectral image data usually contains a stack of multiple spectral channels, each corresponding to a specific fluorescent dye or autofluorescence.
[0028] The system invokes a pre-configured linear unmixing algorithm, such as linear least squares estimation or nonnegative matrix factorization, to perform spectral unmixing on the multispectral image data. This process decomposes the acquired mixed spectral signal into independent fluorescence channel signal components corresponding to each preset biomarker, and removes spectral overlap and autofluorescence background. The system selects a channel signal for nuclear staining, such as the DAPI or Hoechst channel, as the basis for cell localization. The system applies Gaussian filtering to smooth and denoise the nuclear staining channel signal and uses an adaptive thresholding algorithm, such as the Otsu method, to generate a binarized mask for preliminary identification of the nuclear region.
[0029] Among them, the independent fluorescence channel signal refers to the image signal layer that reflects the distribution of a single type of fluorescent dye or biomarker after spectral demixing.
[0030] The system applies distance transform and watershed algorithms to the binarized mask, combining predefined minimum and maximum cell nucleus area parameters to separate contacting or overlapping cell nuclei, segmenting individual cell objects. A single cell object refers to a connected pixel region in the image that corresponds to an independent biological cell. The system assigns a globally unique numerical identifier to each successfully segmented cell object and calculates its geometric center within its pixel region as its spatial centroid coordinates. For each segmented cell object, the system extracts pixel intensity values from all demixed independent fluorescence channel signals within its corresponding pixel contour region.
[0031] For each channel, the system calculates the median or average of the intensity of all pixels within that region as the original signal intensity of the cell in that channel. The system performs background correction: from the original signal intensity of each channel, it subtracts the median signal intensity of the corresponding channel from the background region within a certain radius extending outwards from the cell object's outline. The radius defines the background region, typically a distance of 5 to 15 pixels extending outwards from the cell outline. Background correction aims to eliminate the effects of non-specific staining and light scattering. After correction, the system normalizes the signal intensity of each channel for each cell object by dividing the corrected intensity of each channel by a preset maximum expected signal intensity value for that channel, or by the 99th percentile of the corrected intensity of all cells in that channel, mapping each channel intensity value to a range of 0 to 1.
[0032] The normalization process uses the maximum expected signal intensity value or the 99th percentile, which is based on statistical experience from a large number of stained samples from the same batch. The aim is to ensure comparability of signal intensities between different samples and different experimental batches, guaranteeing that the values of each dimension of the vector are within similar numerical ranges. This is assumed to be applied to a standard 40x objective scan of multispectral tumor tissue images with a resolution of [missing information]. For 40-80 pixels, the diameter of a typical cell is approximately 10-20 mm. The preset analysis radius can be set to 50 pixels, approximately 12.5. This allows them to capture interactions between neighboring cells.
[0033] The system generates an ordered sequence of real numbers for each cell object, where each real number represents the normalized signal intensity of an independent biomarker channel. This sequence constitutes the initial intrinsic signal vector characterizing the expression level of an isolated biomarker in the cell. The initial intrinsic signal vector has a dimension equal to the total number of independent biomarker channels retained after demixing, such as CD3, CD8, CD68, iNOS, CD163, Pan-CK, and DAPI channels. The value of each dimension is the intensity of the corresponding channel after background correction and normalization. The initial intrinsic signal vector is associated with the cell object's identifier and spatial centroid coordinates and stored in an in-memory database or structured file.
[0034] For example, suppose the multispectral image data loaded by the system contains 7 channels, corresponding to the biomarkers CD3, CD8, CD68, iNOS, CD163, Pan-CK, and the nuclear dye DAPI, respectively. After linear unmixing and noise filtering, 7 independent single-channel grayscale images are obtained. The system detects and segments cells on the DAPI channel image; for example, it identifies cells numbered... The cell object has a pixel contour region containing 150 pixels, and its calculated spatial centroid coordinates are x=520.3, y=780.5. Within this contour region, the system extracts pixel intensities from the CD3, CD8, CD68, iNOS, CD163, and Pan-CK channel images, respectively. The calculated median intensity of the original intensity of the CD3 channel is 4500, and the median intensity of the 10-pixel annular background region outside its contour is 500. Therefore, the corrected intensity is 4000.
[0035] Similarly, after correction, the CD8 intensity is 3800, CD68 is 8500, iNOS is 12000, CD163 is 2000, and Pan-CK is 1500; assuming the system's preset normalized denominators for each channel are CD3: 20000, CD8: 18000, CD68: 10000, iNOS: 15000, CD163: 10000, and Pan-CK: 20000. After normalization, the channel values are as follows: CD3: 4000 / 20000=0.20, CD8: 3800 / 18000≈0.21, CD68: 8500 / 10000=0.85, iNOS: 12000 / 15000=0.80, CD163: 2000 / 10000=0.20, Pan-CK: 1500 / 20000=0.075. The initial intrinsic signal vector generated by the system for cell ID_1001 is [0.20, 0.21, 0.85, 0.80, 0.20, 0.075], which is stored along with the cell ID and coordinates.
[0036] In one embodiment of the present invention, the preliminary function marking module is used to perform the following steps: Input the initial intrinsic signal vector and establish a preset classification rule based on the intensity of a single marker or a simple combination of markers.
[0037] The initial intrinsic signal vector of each cell is compared with the preset classification rules to assign a discrete preliminary phenotypic classification label to each cell object, which represents its approximate functional classification, such as "M1-predisposed macrophage", "Th2-predisposed T cell", or "tumor cell". Based on the spatial centroid coordinates of all cell objects and the corresponding preliminary phenotypic classification labels, a spatial distribution map containing preliminary functional classification information, i.e., a preliminary phenotypic classification label map, is generated.
[0038] Specifically, the execution entity is the tissue image analysis system. The system reads the initial intrinsic signal vector and its associated spatial centroid coordinates generated for each cell object from a memory database or structured file. The system loads preset classification rules from a predefined rule configuration file. These preset classification rules are a set of judgment logics predefined by users or domain experts for coarse functional classification of cells based on limited biomarker expressions. The preset classification rules are stored in the form of logical expressions. Each rule defines conditions and its corresponding phenotypic classification label. The condition part of each rule sets logical judgments for a specific dimension of the initial intrinsic signal vector, i.e., the normalized intensity value of a specific biomarker channel. For example, it judges whether the value of a certain channel is greater than or less than a preset threshold, or judges a simple logical combination of several channel values, such as AND or OR relationships.
[0039] The system defines rules for each type of target functional cell. For example, the rule for identifying "M1-prone macrophages" might be defined as: triggering this label when the "CD68" channel value is greater than threshold A and the "iNOS" channel value is greater than threshold B, while the rule for "tumor cells" is defined as: The system triggers when the “Pan-CK” channel value is greater than threshold C and the “CD45” (leukocyte common antigen, if present) channel value is less than threshold D. The system iterates through all identified cell objects in the image. For the currently processed cell object, the system extracts its initial intrinsic signal vector and sequentially substitutes its dimensions into the conditional expression of each preset classification rule. The system employs a sequential matching strategy, testing rules according to priority. When a cell meets all the conditions of a rule, subsequent rule testing stops, and the discrete phenotypic classification label corresponding to that rule is assigned to the current cell object as its initial phenotypic classification label. If a cell does not meet any of the preset rule conditions, the system assigns it a default label, such as “unclassified.”
[0040] The preliminary phenotypic classification label is a discrete category identifier, such as one in a predefined string set, like “M1-prone to macrophages”, “M2-prone to macrophages”, “cytotoxic T cells”, “helper T cells”, “tumor cells”, “stromal cells”, etc. It is used to characterize the approximate functional classification tendency of cells inferred based on the expression of their isolated markers. This classification does not take into account the microenvironmental context in which the cells are located.
[0041] The system creates a two-dimensional array or layer of integer or string data type corresponding to the spatial range of the original image. This serves as the underlying data structure for the preliminary phenotypic classification label map. It iterates through all cell objects, using the spatial centroid coordinates of each cell object as an index, typically rounded to the nearest pixel position. A unique encoded value mapped to the preliminary phenotypic classification label is written to the corresponding position in this data structure. The system outputs this preliminary phenotypic classification label map, containing preliminary functional classification information for each cell location, and stores it in association with the original cell identifier list and coordinate information. The preliminary phenotypic classification label map is a spatially indexed data structure that associates each pixel position in the image, typically corresponding to the cell centroid position, with the preliminary phenotypic classification label code, representing the distribution of the preliminary functional classification results in tissue space, for use in subsequent steps.
[0042] The thresholds used in these rules are typical values set based on statistical analysis of a large amount of historical sample data, prior biological knowledge, or literature reports. For example, thresholds A, B, C, and D. Assuming the application scenario is a common immunofluorescence staining panel, based on the analysis of hundreds of similar samples, the high expression threshold for the macrophage marker CD68 (threshold A) can be set to a normalized intensity value greater than 0.5; the high expression threshold for the M1-related marker iNOS (threshold B) can be set to greater than 0.4; the high expression threshold for the epithelial cell marker Pan-CK (threshold C) can be set to greater than 0.6; and the low expression threshold for the leukocyte marker CD45 (threshold D) can be set to less than 0.1. The purpose of these thresholds is to convert continuous signal intensity into a binary "high / low" expression state for logical judgment.
[0043] For example, the system reads cells The initial intrinsic signal vector is [0.20, 0.21, 0.85, 0.80, 0.20, 0.075]. Assume that the system loads four preset classification rules, and their logical conditions and corresponding labels are as follows: Rule 1: If CD68 (index 2, value 0.85) > 0.5 and iNOS (index 3, value 0.80) > 0.4 in the vector, then the label is "M1 predisposing to macrophages". Rule 2: If CD68 > 0.5 and CD163 (index 4, value 0.20) > 0.3, then the label is "M2 predisposing to macrophages". Rule 3: If CD3 (index 0, value 0.20) > 0.3 and CD8 (index 1, value 0.21) > 0.3, then the label is "cytotoxic T cells". Rule 4: If Pan-CK (index 5, value 0.075) > 0.6, then the label is "tumor cells".
[0044] For cells Applying rule 1, the system checks if CD68 > 0.5 (0.85 > 0.5 is true) and iNOS > 0.4 (0.80 > 0.4 is true). If all conditions are met, the system stops further rule matching and assigns the cell a preliminary phenotypic classification label of "M1-prone macrophage". The system then assumes it will treat another cell. The vector is [0.35, 0.40, 0.10, 0.05, 0.08, 0.90]. Applying rule 1: CD68 = 0.10 is not greater than 0.5, the condition is not met; applying rule 2: CD68 = 0.10 is not greater than 0.5, the condition is not met; applying rule 3: CD3 = 0.35 > 0.3 is true, but CD8 = 0.40 > 0.3 is true, all conditions are met, therefore the label "cytotoxic T cell" is assigned.
[0045] Cell treatment The vector is [0.05, 0.07, 0.60, 0.15, 0.55, 0.02]. Applying rule 1: CD68 = 0.60 > 0.5 is true, but iNOS = 0.15 is not greater than 0.4, so the condition is not met. Applying rule 2: CD68 = 0.60 > 0.5 is true, and CD163 = 0.55 > 0.3 is true, so the condition is met, and the label "M2 tends towards macrophages" is assigned. After the system completes labeling for all cells, based on the spatial centroid coordinates, for example... The coordinates are (520, 780). The coordinates are (600, 810). The coordinates are (550, 720). The corresponding label encoding value is written into the corresponding coordinate position of an integer array of the same size as the original image to generate a preliminary phenotypic classification label map.
[0046] In one embodiment of the present invention, the functional neighborhood construction module is configured to perform the following steps: Using the preliminary phenotypic classification label map as a spatial context reference, each cell in the image is traversed as a target cell. For each target cell, all neighboring cells are searched within a predefined analysis radius around its spatial centroid coordinates. A multi-dimensional functional neighborhood feature vector is generated based on a weighted statistical analysis of the neighboring cells' preliminary phenotypic classification labels, rather than their number or distance. Each dimension of the functional neighborhood feature vector represents a weighted sum of neighboring cells of a specific type, with the weights determined by a predefined inter-phenotypic interaction matrix.
[0047] Specifically, the execution entity is the tissue image analysis system. The system loads from storage the preliminary phenotypic classification label map generated in the preliminary functional labeling module, as well as the list of spatial centroid coordinates and unique identifiers recorded and associated for all cell objects in the intrinsic signal generation module. The system reads a predefined phenotypic interaction influence matrix from a configuration file or database table. This matrix is a two-dimensional real number array, whose row and column indices correspond to the enumerated codes of all possible preliminary phenotypic classification labels. The system reads the parameter of the preset analysis radius, which is a key spatial scale parameter. The typical range is set based on knowledge of cell interactions, for example, within 20... Up to 100 Between these ranges, corresponding to approximately 80 to 400 pixels in an image with a 40x objective lens and a resolution of 0.25 micrometers per pixel, this radius is set based on the effective distance for direct cell contact or paracrine effects commonly found in biological research.
[0048] To efficiently perform spatial range queries, the system constructs a spatial index data structure based on the spatial centroid coordinates of all cell objects, such as using a KD-tree or ball tree algorithm. The system traverses each cell in the cell object list as the current target cell. For the current target cell, starting from its spatial centroid coordinates, the system uses the spatial index data structure to query all other cell objects within a preset analysis radius's Euclidean distance range, identifying these cell objects as neighboring cells. The system obtains the current target cell's preliminary phenotypic classification label and uses it as an index to extract the corresponding weight vector from a predefined phenotypic interaction influence matrix. The system initializes a multidimensional vector with a length equal to the total number of preliminary phenotypic classification label types, with all elements initially set to zero; this vector is the functional neighborhood feature vector of the current target cell.
[0049] In this context, the functional neighborhood refers to the circular spatial region surrounding the centroid coordinates of a target cell, bounded by a preset analysis radius. All other cells within this region are considered its neighbors, collectively constituting the local microenvironment of the target cell. The functional neighborhood feature vector is a multi-dimensional real-valued vector, with its dimension number equal to the total number of preliminary phenotypic classification label categories defined in the system. The value of each dimension represents the weighted cumulative "influence" strength of neighboring cells of a specific functional category within the local microenvironment of the current target cell.
[0050] For each neighboring cell, the system obtains its preliminary phenotypic classification label and uses this label as a column index to find the corresponding weight value from the previously extracted weight vector. The system then accumulates the weight values into the functional neighborhood feature vector along the dimension corresponding to the neighboring cell's label type. After traversing all neighboring cells, the calculation of the functional neighborhood feature vector for the current target cell is complete, and this vector is associated with and stored as the unique identifier of the current target cell. This process is repeated until all cell objects in the image have been processed into target cells and their corresponding functional neighborhood feature vectors have been generated.
[0051] Let the preliminary phenotypic classification label of target cell p be... Its neighboring cells are set as The predefined phenotypic interaction influence matrix is The predefined phenotypic interaction influence matrix is A real-valued matrix, For the number of label categories, matrix elements When the target cell label is At that time, the label was The weight contributed by neighboring cells.
[0052] Let the total number of all possible preliminary phenotypic classification labels be . The functional neighborhood feature vector of target cell p for A dimensional vector, whose dimensional vector is the first dimensional vector. Dimension value Calculated by the following formula:
[0053] ;
[0054] in, It is an indicator function, neighboring cells tags equal The value is 1 if the target cell p is active and 0 otherwise; that is, for each neighboring cell q of the target cell p, determine whether its label is j; if so, add a weight. Otherwise, increment by 0. The original description is easily misunderstood as checking all neighbors once. Matrix elements. The settings are based on known patterns of cell-type interactions reported in biological literature. For example, synergistic effects between immune-activating cells, including M1 macrophages and Th1 T cells, are assigned positive weights, ranging from 0.5 to 1.0. Suppressive cells, including M2 macrophages and regulatory T cells, may be assigned negative or low weights for their inhibitory effects on effector cells, ranging from -0.5 to 0.2. Phenotypic interaction influence matrices are typically predefined by domain experts based on the research context and stored in a configuration file before the analysis begins.
[0055] For example, the system has been designed for cells. The initial phenotypic classification label was assigned as "M1-prone macrophages," which encodes L1 cells. These are "cytotoxic T cells," specifically those encoding L3. The expression "M2 predisposition towards macrophages" encodes L2. Assuming a preset analysis radius of 100 pixels, a predefined inter-phenotypic interaction matrix is loaded. The rows and columns correspond to the labels L1, L2, L3, L4 ("tumor cells"), and the matrix values are as follows: , , , ; , , , ; , , , .
[0056] After the system constructs the spatial index, it processes the target cells. Calculate its coordinates (520, 780) and The distance at coordinates (600, 810) is 85.44 pixels, and... The distance between coordinates (550, 720) is approximately 67.08 pixels, both of which are less than 100 pixels, therefore... and Its neighbor. Target cell. The label is L1, from the matrix Extract the first row of weight vectors [0.1, 0.2, 0.8, 0.0] and initialize the four-dimensional functional neighborhood feature vector [0, 0, 0, 0]. For neighbors... (Label L3), with a corresponding weight of 0.8, is accumulated in the third dimension of the vector (corresponding to L3), resulting in [0, 0, 0.8, 0]. For neighbors... (Label L2), with a corresponding weight of 0.2, is accumulated in the second dimension of the vector (corresponding to L2), resulting in [0, 0.2, 0.8, 0]. Therefore, the cell... The final functional neighborhood feature vector is [0, 0.2, 0.8, 0].
[0057] Treatment of target cells (Label L3), its coordinates (600, 810) and Distance 85.44 pixels (less than 100), and The distance is approximately 102.96 pixels (greater than 100), therefore only Extract the matrix from its neighbors. The third row contains the weight vector [0.7, 0.3, 0.2, 0.1]. Neighbors. The label is L1, with a corresponding weight of 0.7. These are accumulated in the first dimension of the vector to obtain... The functional neighborhood feature vector is [0.7, 0, 0, 0]. Target cells are processed. (Label L2), only with For the neighbors, extract the weight vector [0.3, 0.1, 0.4, 0.0] from the second row of the matrix. The label L1 corresponds to a weight of 0.3, and the functional neighborhood feature vector is [0.3, 0, 0, 0]. The system associates and stores these vectors with their respective cell IDs.
[0058] In one embodiment of the present invention, the composite feature splicing module is used to perform the following steps: For each cell object, the initial intrinsic signal vector generated by its intrinsic signal generation module and the functional neighborhood feature vector constructed by its functional neighborhood construction module are retrieved. The initial intrinsic signal vector and the functional neighborhood feature vector are concatenated to construct a higher-dimensional composite state feature vector that simultaneously contains information on the cell's own biomarkers and its local cellular social environment.
[0059] Specifically, the execution entity is the tissue image analysis system. The system traverses the list of unique identifiers for all cell objects in storage. For each cell object currently being processed, the system retrieves its corresponding initial intrinsic signal vector from the dataset generated by the intrinsic signal generation module and its corresponding functional neighborhood feature vector from the dataset generated by the functional neighborhood construction module, based on its identifier. It ensures that both vectors have been successfully loaded and have the correct dimensions, i.e., the dimension of the initial intrinsic signal vector is equal to the number of unmixed independent biomarker channels, and the dimension of the functional neighborhood feature vector is equal to the total number of preliminary phenotypic classification label categories.
[0060] Perform vector concatenation: Create a new, empty one-dimensional real array with a preset length equal to the sum of the dimensions of the initial intrinsic signal vector and the functional neighborhood feature vector. This array serves as the storage container for the composite state feature vector of the current cell. The system follows a predefined and fixed concatenation order, for example, first copying all elements of the initial intrinsic signal vector sequentially to the beginning of the new array, and then copying all elements of the functional neighborhood feature vector sequentially to subsequent positions. This concatenation order remains consistent throughout the analysis process and is recorded in the analysis log or metadata.
[0061] The concatenation operation refers to the process of connecting two or more one-dimensional arrays end to end according to their spatial or logical order to form a longer one-dimensional array. The concatenation operation does not involve numerical transformation or weighting of the original vector elements, but only sequential combination.
[0062] After splicing, the system associates the generated composite state feature vector with the unique identifier of the current cell object and stores it in a new data structure or database table. This process is repeated until the composite state feature vectors of all cell objects are constructed. The composite state feature vector of all cell objects is a higher-dimensional real vector, whose total dimension equals the number of intrinsic biomarker channels plus the number of phenotypic classification label categories. The first half (first N dimensions) of this vector encodes the cell's own intrinsic biomarker expression profile information, i.e., the initial intrinsic signal vector; the second half (last K dimensions) encodes the local microenvironment in which the cell is located, and the weighted statistical information of various functional neighboring cells, i.e., the functional neighborhood feature vector. Through this design, the composite state feature vector simultaneously contains both "self-state" and "environmental background" information, providing integrated input features for subsequent context-aware functional polarization state determination. The predefined fixed splicing order is a technical detail to ensure the reproducibility of data analysis results.
[0063] For example, the system processes cell ID_1001. Based on its identifier, it retrieves the initial intrinsic signal vector generated by this cell as [0.20, 0.21, 0.85, 0.80, 0.20, 0.075], with a dimension of 6. It also retrieves the functional neighborhood feature vector generated by this cell as [0, 0.2, 0.8, 0], with a dimension of 4. Following a preset order of "intrinsic signal first, then neighborhood feature," the system performs concatenation, creating a new array of length 10. The six elements of the initial intrinsic signal vector are copied sequentially to the first six positions of the new array, resulting in [0.20, 0.21, 0.85, 0.80, 0.20, 0.075, ...]. Finally, the four elements of the functional neighborhood feature vector are copied sequentially to the last four positions of the new array.
[0064] The composite state feature vector of cell ID_1001 is [0.20, 0.21, 0.85, 0.80, 0.20, 0.075, 0, 0.2, 0.8, 0]. For cell ID_1002, its initial intrinsic signal vector is [0.35, 0.40, 0.10, 0.05, 0.08, 0.90], and its functional neighborhood feature vector is [0.7, 0, 0, 0]. After concatenation, the composite state feature vector is generated as [0.35, 0.40, 0.10, 0.05, 0.08, 0.90, 0.7, 0, 0, 0]. For cell ID_1003, its initial intrinsic signal vector is [0.05, 0.07, 0.60, 0.15, 0.55, 0.02], and its functional neighborhood feature vector is [0.3, 0, 0, 0]. After concatenation, a composite state feature vector [0.05, 0.07, 0.60, 0.15, 0.55, 0.02, 0.3, 0, 0, 0] is generated. The system associates and stores these new composite vectors with their respective cell IDs.
[0065] In one embodiment of the present invention, the effective function determination module is used to perform the following steps: The composite state feature vector of each cell is input into a pre-trained functional determination model. The model is trained to decode the composite state feature vector and, given the local microenvironment, reinterprets the effective functional tendency represented by its intrinsic signals. The continuous value feature vector output by the functional determination model represents the functional strength ultimately exhibited by the cell under the current microenvironment regulation.
[0066] Specifically, the execution entity is the tissue image analysis system. The system loads composite state feature vectors and their associated cell identifiers, constructed by the composite feature stitching module for all cell objects, from storage. The system then loads a pre-trained functional determination model, which can be a set of neural network model parameters stored in a file, such as a multilayer perceptron or a lightweight convolutional neural network. During the training phase, the functional determination model uses cell sample data with expert annotations, whose effective functional states are known under specific microenvironments. During training, the input features for each sample are the composite state feature vectors defined by the composite feature stitching module, whose labels are normalized continuous numerical vectors, such as [M1 effective propensity value, M2 effective propensity value, cytotoxicity effective propensity value], representing the true functional performance intensity of the cell in a given environmental context.
[0067] The training objective is to enable the model to learn the mapping relationship from composite features to effective functional vectors. The loss function used can be mean squared error. The system preprocesses the composite state feature vector of each cell object in the current analysis according to the input format required by the model, such as normalization and dimensionality adjustment, and then sequentially inputs it into the pre-trained functional determination model for forward propagation calculation. The model's internal multi-layer nonlinear transformation fuses and decodes the two parts of the input vector—its intrinsic signal and functional neighborhood features—ultimately outputting a continuous numerical vector. This output vector is the continuous value feature vector output by the functional determination model. The value of each dimension represents the strength estimate of the specific functional tendency exhibited by the cell after considering the regulatory effect of its current local microenvironment; the value range is typically between 0 and 1. The continuous value feature vector output by the functional determination model for each cell object is associated with its unique identifier and updated and stored in the database.
[0068] Let the composite state feature vector of cell object c be... , among them Let the total dimension after concatenation be the pre-trained function decision model, and let it be a function. , among them To determine the dimension of the output effective functional polarization vector, for example, representing effective tendencies such as M1 and M2. Model Typically parameterized by a series of learnable weights and biases, the computation process can be represented as a multi-layer transformation, for example, for a neural network with a single hidden layer:
[0069] ;
[0070] ;
[0071] in, For model parameters, and These are activation functions, such as ReLU and Sigmoid. This refers to the continuous-valued feature vector output by the functional determination model for cell c. The continuous-valued feature vector output by the functional determination model is a continuous-valued vector, and its dimensions correspond to the effective functional categories of the cell that need to be interpreted. For example... Each component value The physical meaning is that, given the expression of a cell's own markers, i.e., intrinsic signals, and the combined effect of its local cellular social structure, i.e. neighborhood characteristics, the probability or relative strength of the cell performing a corresponding function, such as exhibiting M1 type antitumor activity.
[0072] The pre-trained functional determination model is a supervised learning model. Training data comes from datasets that quantify and annotate the functional states of cells in known microenvironments, such as in vitro co-culture experiments or rigorously spatially annotated tissue samples. The training process uses backpropagation to optimize model parameters, with typical learning rates set to 0.001 to 0.01 and batch sizes ranging from 32 to 128. Its output values are constrained between 0 and 1 using the Sigmoid function. The model design allows for up- or down-adjustment based solely on preliminary judgments of intrinsic signals, such as macrophages with moderate iNOS signal but surrounded by numerous effector T cells, whose output... The value may be higher than the level indicated by its intrinsic iNOS signal alone.
[0073] For example, the system processes cell ID_1001, whose composite state feature vector is: The system loads a pre-trained multilayer perceptron model with an input layer dimension of 10 and an output layer dimension of 3, corresponding to the M1 propensity score, M2 propensity score, and cytotoxicity propensity score, respectively. Assuming the model parameters are fixed, the output vector is obtained after forward propagation. It is assumed that the final result calculated internally by the model is the value after applying the sigmoid function. This indicates that cell ID_1001 exhibits strong self-CD68 and iNOS signaling, and its neighborhood contains cytotoxic T cells and M2 macrophages. The model determines that it has a propensity value of 0.85 to exhibit strong M1 function in the current microenvironment, while the propensity values for M2 function and cytotoxic function are low.
[0074] Similarly, for cell ID_1002, its input vector The model outputs after calculation. This indicates that the cell itself is a strong marker of tumor cells, but there are M1 macrophages in its neighborhood. The model interprets this as a low tendency to exhibit cytotoxicity in the current environment (0.10, 0.05), while a high tendency to maintain its tumor cell properties (0.75). The system then outputs these vectors... Stored in association with the corresponding cell ID.
[0075] In one embodiment of the present invention, the functional map rendering module is used to perform the following steps:
[0076] The spatial centroid coordinates of each cell and its continuous feature vector output by the functional determination model obtained in the effective functional determination module are integrated. Based on the value of the effective functional polarization vector, a color or visual style is assigned to each cell object and rendered on the original image or segmentation map.
[0077] The output visually displays a map of the effective cellular function under environmental regulation, showing the distribution of the effective cellular function status in different regions and their spatial relationships. This map is used to identify functional microenvironment regions such as those with immunosuppression or immune activation.
[0078] Specifically, the execution entity is the tissue image analysis system. The system loads from storage the continuous-value feature vectors output by the functional determination model generated for all cell objects in the effective function determination module, as well as the spatial centroid coordinates recorded and associated with them in the intrinsic signal generation module. The system creates a blank RGB color image canvas with the same spatial size and resolution as the original multispectral image as the base layer for rendering. For each effective function category requiring visualization, i.e., each dimension of the continuous-value feature vector output by the corresponding functional determination model, the system predefines a unique visual style code. The visual style code is a set of rules that converts numerical data into graphical attributes that humans can intuitively perceive, such as color, shape, and brightness. This visual style code can be a specific color, determined by linearly mapping the corresponding component values of the vector to the hue components of the HSL color space; or it can be a symbolic shape or fill pattern, assigned by discretizing the continuous component values into several levels.
[0079] The system iterates through all cell objects. For the current cell object, the system reads the continuous feature vector output by its functional judgment model and converts it into specific visual attributes according to predefined visual mapping rules. For example, if color mapping is used and the current requirement is to highlight the effective tendency of M1, the system extracts the value of the first dimension of the vector and maps it to the intensity value of the red channel using a linear function. The intensities of the green and blue channels are calculated based on the values of other dimensions or set to fixed values. The system obtains the spatial centroid coordinates of the cell object and draws a solid circle or other shape on a blank RGB canvas with these coordinates as the center and a preset drawing radius proportional to the cell size, and fills it with the calculated color. If a multi-category overlay display is used, alpha blending is required for the colors calculated from multiple dimensions.
[0080] The drawing radius is usually set according to the image resolution. For example, at a resolution of 0.25 micrometers per pixel, a cell with a diameter of 10 micrometers corresponds to a diameter of about 40 pixels. Therefore, the drawing radius can be set to 15 to 20 pixels to ensure that the points are clearly visible on the image.
[0081] After traversing all cells, the system obtains a dot plot containing the locations of all cells and their encoded functional states. Optionally, the system semi-transparently overlays this dot plot layer with a representative grayscale image of a demixed channel, such as the DAPI channel, to provide a tissue background. The system encodes the synthesized image data in a standard raster image format, such as PNG or TIFF, and saves the output as an environmentally regulated cell effective function map. The environmentally regulated cell effective function map is a digital image output, where the color or style of each pixel encodes the functional state information of the cell at its spatial location. This state is the final effective tendency determined by the effective function determination module after model fusion with the local microenvironment context.
[0082] The mapping from continuous vector values to visual attributes in the functional map rendering module involves calculations. Let the continuous value feature vector output by the functional determination model of cell c be... , If a single heatmap mode is used, only the first heatmap will be visualized. Each functional dimension is mapped to RGB color, with a common mapping using a color spectrum from blue to red, and the red channel intensity... and blue channel intensity Calculated using the following formula:
[0083] ;
[0084] ;
[0085] Among them, green channel It is usually set to 0, at which point the expression is low ( It appears blue, indicating high expression ( The color appears red. If HSL color mapping is used to distinguish different functional categories, for the first... Each category, its hue (Angle values, 0-360°) can be pre-specified based on base values. Since the hue is a circular variable, the final blended hue of cell c... Vector composition should be used instead of direct arithmetic averaging to avoid color errors caused by periodicity.
[0086] ;
[0087] ;
[0088] ;
[0089] in, Assign display weights to each functional status category. This represents the intensity value of the current cell in the m-th functional dimension, typically... Values between, for example Represents a strong correlation. This indicates a weak correlation. Indicates that the first Each functional category specifies a base hue angle, the inherent color angle assigned to that individual category on the HSL color wheel (0-360°), for example, specifying category 1 as red. Category 2 is green. . The result is calculated using the arctangent function and converted back to the 0-360 degree range.
[0090] In color mapping, the slope and intercept parameters of the linear function used for the red channel are set so that an input value of 0 corresponds to an output intensity of 0, and an input value of 1 corresponds to an output intensity of 255. For the blue channel, an inverse mapping is used, for example, an input value of 0 corresponds to 255, to ensure that the dynamic range is fully displayed by utilizing the contrast between warm and cool colors. The hue component range of the HSL color space is 0 to 360 degrees, representing the color wheel. Different functional categories are assigned different base hue values based on visual differentiation considerations. For example, functionally opposing categories (such as M1 and M2) are assigned visually contrasting colors (such as red 0 degrees and green 120 degrees) or optically complementary colors (such as red 0 degrees and cyan 180 degrees) to maximize visual difference.
[0091] For example, when processing cell IDs 1001, 1002, and 1003, the system loads the continuous value feature vector output by the functional judgment model: , , The coordinates of the centroid are: (520, 780), (600, 810), (550, 720). The system creates a blank canvas, assuming the predefined visual rules are: using HSL color mapping, the first dimension of the vector... (M1 effective tendency) is mapped to hue H, when When H = 0 degrees (red). At time H=240 degrees (blue), saturation S and brightness L are fixed at 80% and 50% respectively.
[0092] For ID_1001, Calculate its hue The color is orange-red, and the system draws a solid circle of that color with a radius of 15 pixels at its coordinates (520, 780). For ID_1002, ,calculate The degree (blue-cyan) is plotted at its coordinates (600, 810). For ID_1003, ,calculate The degree (cyan-green) is drawn at its coordinates (550, 720).
[0093] After the system completes this operation on all cells, it overlays the generated color dot map with the DAPI background channel, which displays the cell nucleus location, at 70% transparency to synthesize the final image. In the final output environmentally regulated cell effective function map file, red areas (such as ID_1001) indicate cell clusters with high M1 effective function tendency, blue areas (such as ID_1002) indicate areas with low M1 effective function tendency, and cyan-green areas (such as ID_1003) represent intermediate states, intuitively analyzing the spatial distribution of functional heterogeneity in the tumor microenvironment.
[0094] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A multi-cell recognition and spatial analysis system for the tumor immune microenvironment, characterized in that, include: The intrinsic signal generation module is used to acquire multispectral pathological images and perform spectral unmixing and cell segmentation, extract the independent fluorescence channel signal intensity of each cell object, and generate an initial intrinsic signal vector characterizing the expression level of isolated biomarkers. The preliminary functional labeling module compares the initial intrinsic signal vector with the preset classification rules to determine the preliminary phenotypic classification label for each cell object, and generates a preliminary phenotypic classification label map based on the spatial centroid coordinates of the cell object. The functional neighborhood construction module uses the preliminary phenotypic classification label map as a reference to search for neighboring cells within the preset analysis radius of each cell object. Based on the preliminary phenotypic classification labels of neighboring cells and the predefined phenotypic interaction influence matrix, it calculates and generates functional neighborhood feature vectors that characterize the local microenvironment. The composite feature splicing module splices the initial intrinsic signal vector with the functional neighborhood feature vector to construct a composite state feature vector containing its own state and environmental background information. The effective function determination module is used to input the composite state feature vector into the pre-trained function determination model and decode it to obtain the continuous value feature vector output by the function determination model, which characterizes the final functional strength under the regulation of the microenvironment. The functional map rendering module, based on the continuous value feature vector and spatial centroid coordinates output by the functional determination model, renders and generates an effective functional map of cells under environmental regulation.
2. The tumor immune microenvironment multi-cell recognition and spatial analysis system according to claim 1, characterized in that, Generating an initial intrinsic signal vector characterizing the expression level of an isolated biomarker includes the following steps: A linear unmixing algorithm is used to decompose multispectral pathological images into independent fluorescence channel signals corresponding to different biomarkers; Based on the cell nuclear staining channel signal, a single cell object is located and segmented to obtain its spatial centroid coordinates; The raw signal intensity of each independent fluorescence channel was extracted within the segmented contour of each cell object; The signal intensity of the region extending beyond the outline of the cell object is calculated as the background value, and background correction is performed on the original signal intensity. The intensity of each channel after background correction is normalized by dividing it by the preset expected intensity value, forming an ordered sequence of real numbers as the initial intrinsic signal vector.
3. The tumor immune microenvironment multi-cell recognition and spatial analysis system according to claim 1, characterized in that, Determine the preliminary phenotypic classification label for each cellular object, including the following steps: Load a preset classification rule containing a logical expression, which defines a preset threshold condition for the intensity of a specific biomarker channel; Iterate through each cell object and substitute the values of each dimension of its initial intrinsic signal vector into the preset classification rules for sequential matching; When the initial intrinsic signal vector satisfies all the logical conditions of a certain rule, the discrete category identifier corresponding to the rule is assigned as the preliminary phenotypic classification label of the cell object. A two-dimensional array corresponding to the image space is established, and the encoding values of the preliminary phenotypic classification labels are written at the positions indexed by the spatial centroid coordinates to generate a preliminary phenotypic classification label map.
4. The tumor immune microenvironment multi-cell recognition and spatial analysis system according to claim 1, characterized in that, Searching for neighboring cells within a preset analysis radius for each cell object includes the following steps: A spatial index data structure is constructed based on the spatial centroid coordinates of all cell objects; Using the spatial centroid coordinates of the target cell being processed as the center, the spatial index data structure is used to query all other cell objects whose Euclidean distance is less than the preset analysis radius. Mark all other cell objects found as neighbor cells of the target cell.
5. The tumor immune microenvironment multi-cell recognition and spatial analysis system according to claim 1, characterized in that, Calculating and generating functional neighborhood feature vectors representing the local microenvironment includes the following steps: The preliminary phenotypic classification label of the target cell is obtained as the row index, and the corresponding weight vector is extracted from the predefined phenotypic interaction influence matrix. Traverse all neighboring cells, obtain the preliminary phenotypic classification label of each neighboring cell as a column index, and find the corresponding interaction weight value from the weight vector; The interaction weight values are accumulated into the dimension corresponding to the neighbor cell label type in the multidimensional vector, and the resulting accumulated result is the functional neighborhood feature vector.
6. The tumor immune microenvironment multi-cell recognition and spatial analysis system according to claim 1, characterized in that, Constructing a composite state feature vector that includes information about the user's own state and the environmental context involves the following steps: Create a one-dimensional array whose length is equal to the sum of the dimensions of the initial intrinsic signal vector and the dimensions of the feature vectors in the functional neighborhood; According to a predefined fixed splicing order, all elements of the initial intrinsic signal vector are copied to the beginning segment of the one-dimensional array; All elements of the functional neighborhood feature vector are copied to the subsequent segment of the one-dimensional array to form a composite state feature vector that simultaneously contains information on the cell's own biomarkers and information on the local cellular social environment.
7. The tumor immune microenvironment multi-cell recognition and spatial analysis system according to claim 1, characterized in that, Pre-trained function decision models include: The pre-trained functional determination model uses a neural network structure to represent the nonlinear mapping relationship from composite state feature vectors to effective functional tendencies; The composite state feature vector is calculated by forward propagation of the functional decision model, and a continuous numerical vector is output. Each component value of the continuous numerical vector is processed by an activation function and mapped to a value between 0 and 1. Each component value represents the effective tendency intensity of a specific functional type exhibited by the cell under the current local microenvironment regulation.
8. The tumor immune microenvironment multi-cell recognition and spatial analysis system according to claim 7, characterized in that, Each component value represents the strength of the cell's effective tendency to exhibit a specific functional type under the current local microenvironment regulation, including: Specific functional types include M1 efficacy tendency, M2 efficacy tendency, or cytotoxic efficacy tendency.
9. A multi-cell recognition and spatial analysis system for the tumor immune microenvironment according to claim 1, characterized in that, Rendering a map of effective cell function under environmental regulation includes the following steps: Create a blank canvas with the same dimensions as the original image; For each dimension of the continuous value feature vector output by the functional determination model, a visual style encoding rule is predefined to map the numerical values of the vector components to color attributes; Iterate through all cell objects and calculate the fill color based on the continuous value feature vector output by the model according to their functions; On a blank canvas, draw a geometric shape with a preset radius, centered on the spatial centroid coordinates of each cell object and using the calculated fill color.
10. A multi-cell recognition and spatial analysis system for the tumor immune microenvironment according to claim 9, characterized in that, Rendering a map of effective cell function under environmental regulation also includes the following steps: Obtain the unmixed nuclear channel grayscale image or the original multispectral image as the background layer; Use the canvas containing the geometry of all cellular functional states as the foreground layer; By setting the transparency parameter, the foreground layer and the background layer are overlaid and composited to output an image file that intuitively shows the distribution of the effective functional state of cells and their spatial relationship with the tissue structure.