Intelligent calculation method and system for spatial distribution of cell population

By employing visual inspection and biometric recognition, and using a spatially complex distance calculation method, the problem of misjudgment in the spatial distribution of cell populations using traditional Euclidean distance has been solved, enabling more accurate analysis of cell functional aggregation.

CN121686445BActive Publication Date: 2026-06-30ALPHA X BIOTECH (BEIJING) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ALPHA X BIOTECH (BEIJING) CO LTD
Filing Date
2025-12-11
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

When calculating the spatial distribution of cell populations, existing technologies cannot accurately reflect the functional relationships between cells using traditional Euclidean distance, leading to misjudgments of functional clustering and distance bias, especially when cells are unevenly distributed.

Method used

By employing visual detection and biometric recognition, and using a spatially complex distance calculation method, combined with the statistical characteristics of quartiles and medians, the shortest surrounding distances of central and peripheral cells and central aggregated cells are corrected to obtain the true edge distances and eliminate the overestimation or underestimation of Euclidean distances.

Benefits of technology

It achieves more accurate spatial analysis results, reflecting the actual biological spatial relationships of cells, and is suitable for processing tissue sections with uneven cell distribution, providing spatial analysis of functional aggregation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121686445B_ABST
    Figure CN121686445B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of image analysis and proposes an intelligent method and system for calculating the spatial distribution of cell populations. The method includes the following steps: traversing single-cell files, collecting cell images and cell information for each tissue region to construct a cell space; identifying and locating cells in the cell space and extracting the position and contour of each cell to obtain the central cell; obtaining the shortest surrounding distance of each central cell and obtaining the spatially complex distance based on the shortest surrounding distance; obtaining the central-edge cells and centrally aggregated cells through the spatially complex distance; correcting the shortest surrounding distances of the central-edge cells and centrally aggregated cells to obtain the true edge distances of the central-edge cells and centrally aggregated cells. According to the calculation method of this invention, the problem of uneven cell distribution in tissues and misjudgment of functional aggregation leading to deviations in the distance from the cell center to the edge can be solved through visual detection and biometric recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image analysis, specifically relating to an intelligent method and system for calculating the spatial distribution of cell populations. Background Technology

[0002] Because the actual spatial distribution of cells in tissues may be more complex and diverse than the results of traditional calculations, especially when cell populations have different morphologies, sizes, and distribution patterns, the calculation of the shortest surrounding distance, while providing a geometric distance metric, ignores the possible functional relationships between cells, such as cell type, interactions, and signal transduction. In the analysis of multiple cell pairs, simply using Euclidean distance can misclassify cells with similar functions as far apart, and mistakenly identify cells with no functional relationship as closely connected, thus failing to reflect the true biological spatial relationships between cells. Summary of the Invention

[0003] This invention aims to at least partially solve one of the technical problems in related technologies. Therefore, the first objective of this invention is to propose an intelligent method for calculating the spatial distribution of cell populations, which can solve the problem of uneven cell distribution in tissues and misjudgment of functional aggregation leading to deviations in the distance from the cell center to the edge through visual detection and biometric recognition.

[0004] The second objective of this invention is to propose an intelligent measurement system for the spatial distribution of cell populations.

[0005] To achieve the above objectives, a first aspect of the present invention proposes an intelligent method for calculating the spatial distribution of cell populations, the method comprising the following steps:

[0006] S100 traverses single-cell files, collects cell images and cell information for each tissue region, and constructs a cell space;

[0007] S200 identifies and locates cells in the cellular space and extracts the position and outline of each cell to obtain the central cell;

[0008] S300, obtain the shortest surrounding distance of each central cell, and obtain the spatial complex distance based on the shortest surrounding distance;

[0009] S400, which acquires central peripheral cells and central aggregated cells through complex spatial distances;

[0010] S500 corrects the shortest surrounding distance between the central edge cells and the central aggregated cells, obtaining the true edge distance between the central edge cells and the central aggregated cells.

[0011] According to the calculation method of the present invention, the problem of uneven cell distribution in tissues and misjudgment of functional aggregation leading to deviations in the distance from the cell center to the edge can be solved by visual detection and biometric recognition; and the overestimation or underestimation of intercellular relationships by Euclidean distance is eliminated, making the spatial analysis results more accurate and consistent with biological reality. When processing tissue sections with uneven cell distribution, it can provide spatial analysis results of functional aggregation between cells.

[0012] Furthermore, in step S100, traversing the single-cell files and collecting cell images and cell information for each tissue region to construct a cell space includes:

[0013] A single-cell file refers to a file containing data related to a single cell. This data describes information such as gene expression, morphological characteristics, and spatial distribution of each cell. A single-cell file includes: cell image data and cell information: cell image data contains an image of each cell, obtained through microscopy.

[0014] Specifically, cell image data is used by researchers to visualize the morphology, size, and location of cells.

[0015] Furthermore, cell information exists in the form of tables or databases, recording information such as gene expression, surface markers, and functional characteristics of each cell, with formats including CSV, Excel, HDF5, and AnnData.

[0016] Furthermore, in the fields of single-cell analysis and spatial transcriptomics, cell image data in single-cell files contains information about the spatial location of each cell within the tissue.

[0017] Furthermore, the cell information includes coordinate information, positive / negative labels for each marker, tissue type, and slide name; among which, the coordinate information includes the distance between the cell and the origin of the coordinate system.

[0018] Furthermore, in step S200, identifying and locating cells in the cellular space and extracting the position and outline of each cell to obtain the central cell includes:

[0019] Image quality is improved through image preprocessing to ensure clear cell boundaries. Edge detection and contour extraction methods are used to identify and locate cells in the image. Edge detection includes Otsu adaptive thresholding and Canny edge detection. Cells are accurately separated using region growing, and each cell is assigned a unique identifier. After segmentation, the centroid of each cell is calculated, and the central cell is identified from the surrounding cells by calculating the Euclidean distance between cells. Cell contours are extracted and optimized through smoothing and fine-tuning. All cell location information and morphological features are recorded and stored to generate a cell distribution map for visualization.

[0020] Methods for identifying centroids include calculating the geometric center of the cell using spatial coordinates in an image and identifying it based on markers of cell function or protein content. A centroid is a vital cell located at the geometric center of a tissue region or possessing a specific function.

[0021] Furthermore, cells not labeled as central cells are designated as peripheral cells.

[0022] Because the actual spatial distribution of cells in tissues can be far more complex and diverse than traditional calculations suggest, especially when cell populations exhibit different morphologies, sizes, and distribution patterns, the calculation of the shortest perimeter distance, while providing a geometric metric, neglects potential functional relationships between cells, such as cell type, interactions, and signal transduction. For instance, in the tumor microenvironment, the spatial relationship between immune cells and tumor cells is crucial, and traditional Euclidean distance may not accurately reflect the actual biological interactions between these cells. Immune cells in tumor tissue often aggregate at the tumor periphery, forming an immune cell infiltration zone, and the functional aggregation of these cells may not be directly related to the spatial distance between tumor cells within the tissue. (References are as follows: Fridman, WH, Pagès, F., Sautès-Fridman, C., & Galon, J. (2012). The immune contexture in human tumors: impact on clinical outcome. Nature Reviews Cancer, 12(4), 298-306. https: / / doi.org / 10.1038 / nrc3245); The shortest surrounding distance can misclassify cells with similar functions as cells that are closer together, failing to reflect the true biological spatial relationship between cells. To solve the above problem, this invention proposes step S300.

[0023] Furthermore, in step S300, the shortest surrounding distance of each central cell is obtained, and the spatial complexity distance is obtained based on the shortest surrounding distance, including:

[0024] Let md(i) represent the shortest surrounding distance of the i-th central cell, where the shortest surrounding distance is the Euclidean distance between the central cell and its nearest surrounding cell, and i is the index of the central cell, i=0,1,2,…,t, where t is the number of central cells. Create an empty sequence MIDST, and import md(i) as elements into the sequence MIDST in ascending order. Obtain the first quartile, third quartile, and median of the sequence MIDST, where the first quartile is denoted as Ma, the third quartile as Mb, and the median as Mc.

[0025] The spatially complex distance (MT) is calculated as follows: The average spatial distance (MAD) and the complexity coefficient (RE) are calculated, where MAD = Ma / 2 + Mb / 2, and the complexity coefficient RE = 1 - θ, where θ is the range of the complex distance offset. MT is calculated using the spatial average distance (MAD) and the complexity coefficient (RE), where MT = MAD × RE.

[0026] The beneficial effects of this step are as follows: This method, by introducing the calculation of spatial complexity distance and combining the statistical characteristics of the shortest surrounding distance between cells using quartiles and the median, better reflects the actual spatial layout of cells, especially in densely or unevenly distributed areas. Spatial complexity distance (MT) maps the spatial aggregation patterns and the influence of clustered or dispersed cell regions by combining the spatial mean distance (MAD) and the complexity coefficient (RE). In densely or unevenly distributed areas, this method can more accurately capture the actual spatial layout of cells, thus better revealing the biological significance of these regions. Furthermore, in high-throughput pathological analysis, this method, through automated statistical analysis and spatial complexity measurement, makes large-scale data processing more efficient by introducing automated statistical analysis and reducing errors by minimizing manual intervention. Using quartiles Ma, Mb, and the median Mc to calculate the spatial mean distance (MAD) can better describe the distribution characteristics between cells, and especially in cases of uneven cell distribution, it can avoid the bias that may result from relying solely on Euclidean distance, more accurately capturing the spatial relationships between cells. Moreover, the introduction of the complexity coefficient (RE) can further quantify the complexity of the cell spatial layout. For example, the effects of complex and dispersed regions can be reflected by the complexity coefficient RE, avoiding the errors that may be introduced by the simple Euclidean distance in traditional methods. By incorporating the offset range (θ), the complexity coefficient RE enables automatic adjustment of the distance metric in cases of complex spatial layouts, thereby capturing the actual relationships between cells more accurately.

[0027] Furthermore, in step S400, obtaining the central peripheral cells and central aggregated cells through spatially complex distances includes:

[0028] Traverse the central cells, and mark the central cells whose shortest surrounding distance is greater than the spatial complex distance as central aggregate cells, and the central cells whose shortest surrounding distance is less than the spatial complex distance as central edge cells;

[0029] Obtain the number of central aggregated cells and the number of central peripheral cells. Denote the number of central aggregated cells as x and the number of central peripheral cells as y.

[0030] Because cells in tissue sections may exhibit different spatial distribution patterns, with some areas being densely packed with cells and others sparsely packed, the calculation of shortest perimeter distance and spatial complexity distance often assumes a uniform distribution between cells. However, in reality, this assumption often fails. In cases of uneven cell distribution, the shortest perimeter distance and spatial complexity distance may overlook the different spatial relationships between cells in dense and sparse regions. For example, in densely packed areas, conventional methods calculate a smaller shortest distance, but this does not necessarily mean that these cells are biologically closely interacting; instead, cells may be close together simply due to localized high density, without true functional aggregation, overestimating the actual relationships between cells and leading to a misunderstanding of tissue structure. To address these issues, this invention proposes step S500;

[0031] Furthermore, in step S500, correcting the shortest surrounding distance between the central peripheral cells and the central aggregated cells to obtain the true edge distance between the central peripheral cells and the central aggregated cells includes the following steps:

[0032] S501, create an empty sequence Mor, import the shortest surrounding distance of the centroid cells into the sequence Mor, and arrange the centroid cells in ascending order of their distance from the origin. Let mor(j) represent the shortest surrounding distance of the j-th centroid cell in the sequence Mor; where j = 0, 1, 2, ..., x, and x is the number of centroid cells. Let the first quartile of the sequence Mor be RK, and the third quartile of the sequence Mor be RL.

[0033] S502, create an empty sequence Sor, import the shortest surrounding distance of the center and edge cells into the sequence Sor, and arrange them in ascending order of distance from the center and edge cells to the origin. Let sor(p) represent the shortest surrounding distance of the p-th center and edge cell in the sequence Sor; where p = 0, 1, 2, ..., y, and y is the number of center and edge cells. Let the first quartile in the sequence Sor be denoted as SK, and the third quartile in the sequence Sor be denoted as SL.

[0034] S503, corrects the shortest surrounding distance of the central aggregated cell to obtain the true edge distance of the central aggregated cell;

[0035] Let Mok(j) be the true edge distance of the j-th centroid cell. The true edge distance Mok(j) is calculated as follows: Mok(j) = min(mor(j-1), mor(j), mor(j+1)) + Mw(j); where min(mor(j-1), mor(j), mor(j+1)) represents the minimum value among mor(j-1), mor(j), and mor(j+1); and Mw(j) represents the distance deviation value of the j-th centroid cell.

[0036] The calculation steps for the distance deviation value Mw(j) of the j-th centroidal cell are as follows:

[0037] Determine the magnitudes of mor(j) and mor(j-1), take the larger value as MPa, and then calculate the absolute value MX1 between MPa and the third quartile RL in the sequence Mor;

[0038] Determine the magnitudes of mor(j) and mor(j+1), take the smaller value as MPb, and then calculate the absolute value MX2 between MPb and the first quartile RK in the sequence Mor.

[0039] Subtracting MX2 from MX1 yields the distance deviation value Mw(j) for the j-th centroidal cell.

[0040] S504, corrects the shortest surrounding distance of the center edge cells to obtain the true edge distance of the center edge cells;

[0041] Let Sok(p) be the true edge distance of the p-th central edge cell. The true edge distance Sok(p) is calculated as follows: Sok(p) = min(sor(p-1), sor(p), sor(p+1)) + Sw(p); min(sor(p-1), sor(p), sor(p+1)) represents the minimum value among sor(p-1), sor(p), and sor(p+1); Sw(p) represents the distance deviation value of the p-th central edge cell.

[0042] The calculation steps for the distance deviation value Sw(p) of the p-th central edge cell are as follows:

[0043] Determine the magnitudes of sor(p) and sor(p-1), take the larger value as SPa, and then calculate the absolute value SX1 between SPa and the third quartile SL in the sequence Sor;

[0044] Determine the magnitudes of sor(p) and sor(p+1), take the smaller value as SPb, and then calculate the absolute value SX2 between SPb and the first quartile SK in the sequence Sor.

[0045] Subtracting SX2 from SX1 yields the distance deviation value Sw(p) for the p-th centroidal cell.

[0046] The beneficial effects of this step are as follows: Since ordinary Euclidean distance calculation and shortest perimeter distance calculation cannot obtain the actual distance of functional aggregation between cells, steps S501 and S502 sort the shortest perimeter distances of central aggregated cells and peripheral cells according to their distance from the origin, creating two sequences, Mor and Sor, and calculating the quartiles of these sequences. Then, steps S503 and S504 correct the shortest perimeter distances of central aggregated cells and central-perimeter cells to obtain the true perimeter distance. By comparing the shortest perimeter distances of adjacent cells, the distance deviation value is calculated. The distance deviation value reflects the spatial distribution changes between cells, thereby adjusting the calculated shortest distance to better match the actual distribution of cells in the tissue. By calculating the true perimeter distance, this step can effectively distinguish the different spatial relationships of cells in dense and sparse regions, avoiding misjudgments in traditional methods. For dense cell regions, the corrected distance can more realistically reflect the functional aggregation between cells, while for sparse cell regions, the corrected distance can avoid overestimating the relationship between cells, thus obtaining a cell spatial distribution map that is more consistent with biological reality.

[0047] The beneficial effects of this method are: it can solve the problem of uneven cell distribution in tissues and misjudgment of functional aggregation leading to deviations in the distance from the cell center to the edge through visual detection and biometric recognition; and it eliminates the overestimation or underestimation of intercellular relationships by Euclidean distance, making the spatial analysis results more accurate and consistent with biological reality. When processing tissue sections with uneven cell distribution, it can provide spatial analysis results of functional aggregation between cells.

[0048] To achieve the above objectives, a second aspect of the present invention also proposes an intelligent measurement system for spatial distribution of cell populations. The intelligent measurement system for spatial distribution of cell populations includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of an intelligent measurement method for spatial distribution of cell populations. The intelligent measurement system for spatial distribution of cell populations runs on computing devices such as desktop computers, laptops, handheld computers, and cloud data centers.

[0049] By implementing an intelligent cell population spatial distribution measurement system, the method can solve the problems of uneven cell distribution in tissues and misjudgment of functional aggregation that lead to deviations in the distance from the cell center to the edge. It can also eliminate the overestimation or underestimation of intercellular relationships by Euclidean distance, making the spatial analysis results more accurate and consistent with biological reality. When processing tissue sections with uneven cell distribution, it can provide spatial analysis results of functional aggregation between cells. Attached Figure Description

[0050] Figure 1 The diagram shows a flowchart of an intelligent method for measuring the spatial distribution of cell populations.

[0051] Figure 2 The diagram shows the structure of an intelligent system for measuring the spatial distribution of cell populations. Detailed Implementation

[0052] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0053] Figure 1 The diagram shows a flowchart of an intelligent method for measuring the spatial distribution of cell populations.

[0054] Reference Figure 1 This invention proposes an intelligent method for measuring the spatial distribution of cell populations, the method comprising the following steps:

[0055] S100 traverses single-cell files, collects cell images and cell information for each tissue region, and constructs a cell space;

[0056] S200 identifies and locates cells in the cellular space and extracts the position and outline of each cell to obtain the central cell;

[0057] S300, obtain the shortest surrounding distance of each central cell, and obtain the spatial complex distance based on the shortest surrounding distance;

[0058] S400, which acquires central peripheral cells and central aggregated cells through complex spatial distances;

[0059] S500 corrects the shortest surrounding distance between the central edge cells and the central aggregated cells, obtaining the true edge distance between the central edge cells and the central aggregated cells.

[0060] Furthermore, in step S100, traversing the single-cell files and collecting cell images and cell information for each tissue region to construct a cell space includes:

[0061] Cell information includes coordinate information, positive / negative labels for each marker, tissue type, and slide name; the coordinate information includes the distance between the cell and the origin.

[0062] Furthermore, in step S200, identifying and locating cells in the cellular space and extracting the position and outline of each cell to obtain the central cell includes:

[0063] Image quality is improved through image preprocessing to ensure clear cell boundaries. Edge detection and contour extraction methods are used to identify and locate cells in the image. Edge detection includes Otsu adaptive thresholding and Canny edge detection. Cells are accurately separated using region growing, and each cell is assigned a unique identifier. After segmentation, the centroid of each cell is calculated, and the central cell is identified from the surrounding cells by calculating the Euclidean distance between cells. Cell contours are extracted and optimized through smoothing and fine-tuning. All cell location information and morphological features are recorded and stored to generate a cell distribution map for visualization.

[0064] Methods for identifying centroids include calculating the geometric center of the cell using spatial coordinates in an image and identifying it based on markers of cell function or protein content. A centroid is a vital cell located at the geometric center of a tissue region or possessing a specific function.

[0065] Furthermore, cells not labeled as central cells are designated as peripheral cells.

[0066] Furthermore, in step S300, the shortest surrounding distance of each central cell is obtained, and the spatial complexity distance is obtained based on the shortest surrounding distance, including:

[0067] Let md(i) represent the shortest surrounding distance of the i-th central cell, where the shortest surrounding distance is the Euclidean distance between the central cell and its nearest surrounding cell, and i is the index of the central cell, i=0,1,2,…,t, where t is the number of central cells. Create an empty sequence MIDST, and import md(i) as elements into the sequence MIDST in ascending order. Obtain the first quartile, third quartile, and median of the sequence MIDST, where the first quartile is denoted as Ma, the third quartile as Mb, and the median as Mc.

[0068] The spatially complex distance (MT) is calculated as follows: The average spatial distance (MAD) and the complexity coefficient (RE) are calculated, where MAD = Ma / 2 + Mb / 2, and the complexity coefficient RE = 1 - θ, where θ is the range of the complex distance offset. MT is calculated using the spatial average distance (MAD) and the complexity coefficient (RE), where MT = MAD × RE.

[0069] Furthermore, in step S400, obtaining the central peripheral cells and central aggregated cells through spatially complex distances includes:

[0070] Traverse the central cells, and mark the central cells whose shortest surrounding distance is greater than the spatial complex distance as central aggregate cells, and the central cells whose shortest surrounding distance is less than the spatial complex distance as central edge cells;

[0071] Obtain the number of central aggregated cells and the number of central peripheral cells. Denote the number of central aggregated cells as x and the number of central peripheral cells as y.

[0072] Furthermore, in step S500, correcting the shortest surrounding distance between the central peripheral cells and the central aggregated cells to obtain the true edge distance between the central peripheral cells and the central aggregated cells includes the following steps:

[0073] S501, create an empty sequence Mor, import the shortest surrounding distance of the centroid cells into the sequence Mor, and arrange the centroid cells in ascending order of their distance from the origin. Let mor(j) represent the shortest surrounding distance of the j-th centroid cell in the sequence Mor; where j = 0, 1, 2, ..., x, and x is the number of centroid cells. Let the first quartile of the sequence Mor be RK, and the third quartile of the sequence Mor be RL.

[0074] S502, create an empty sequence Sor, import the shortest surrounding distance of the center and edge cells into the sequence Sor, and arrange them in ascending order of distance from the center and edge cells to the origin. Let sor(p) represent the shortest surrounding distance of the p-th center and edge cell in the sequence Sor; where p = 0, 1, 2, ..., y, and y is the number of center and edge cells. Let the first quartile in the sequence Sor be denoted as SK, and the third quartile in the sequence Sor be denoted as SL.

[0075] S503, corrects the shortest surrounding distance of the central aggregated cell to obtain the true edge distance of the central aggregated cell;

[0076] Let Mok(j) be the true edge distance of the j-th centroidal cell. The true edge distance Mok(j) is calculated as follows: Mok(j) = min(mor(j-1), mor(j), mor(j+1)) + Mw(j); where min(mor(j-1), mor(j), mor(j+1)) represents the minimum value among mor(j-1), mor(j), and mor(j+1).

[0077] The calculation steps for the distance deviation value Mw(j) of the j-th centroidal cell are as follows:

[0078] Determine the magnitudes of mor(j) and mor(j-1), take the larger value as MPa, and then calculate the absolute value MX1 between MPa and the third quartile RL in the sequence Mor;

[0079] Determine the magnitudes of mor(j) and mor(j+1), take the smaller value as MPb, and then calculate the absolute value MX2 between MPb and the first quartile RK in the sequence Mor.

[0080] Subtracting MX2 from MX1 yields the distance deviation value Mw(j) for the j-th centroidal cell.

[0081] S504, corrects the shortest surrounding distance of the center edge cells to obtain the true edge distance of the center edge cells;

[0082] Let Sok(p) be the true edge distance of the p-th central edge cell. The true edge distance Sok(p) is calculated as follows: Sok(p) = min(sor(p-1), sor(p), sor(p+1)) + Sw(p); min(sor(p-1), sor(p), sor(p+1)) represents the minimum value among sor(p-1), sor(p), and sor(p+1).

[0083] The calculation steps for the distance deviation value Sw(p) of the p-th central edge cell are as follows:

[0084] Determine the magnitudes of sor(p) and sor(p-1), take the larger value as SPa, and then calculate the absolute value SX1 between SPa and the third quartile SL in the sequence Sor;

[0085] Determine the magnitudes of sor(p) and sor(p+1), take the smaller value as SPb, and then calculate the absolute value SX2 between SPb and the first quartile SK in the sequence Sor.

[0086] Subtracting SX2 from SX1 yields the distance deviation value Sw(p) for the p-th centroidal cell.

[0087] Figure 2 The diagram shows the structure of an intelligent system for measuring the spatial distribution of cell populations.

[0088] Reference Figure 2 The present invention also proposes a cell population spatial distribution intelligent measurement system 20, which includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of a cell population spatial distribution intelligent measurement method. The cell population spatial distribution intelligent measurement system 20 runs on computing devices such as desktop computers, laptops, handheld computers, and cloud data centers.

[0089] The computing system includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program within a unit of the computing system:

[0090] Acquisition unit 21 is used to traverse single-cell files, acquire cell images and cell information of each tissue region to construct a cell space;

[0091] The identification unit 22 is used to identify and locate cells in the cellular space and extract the position and outline of each cell to obtain the central cell;

[0092] The calculation unit 23 is used to obtain the shortest surrounding distance of each central cell and obtain the spatial complex distance based on the shortest surrounding distance;

[0093] Screening unit 24 is used to obtain central peripheral cells and central aggregated cells through complex spatial distances;

[0094] The correction unit 25 is used to correct the shortest surrounding distance between the central edge cells and the central aggregate cells to obtain the true edge distance between the central edge cells and the central aggregate cells.

[0095] The aforementioned intelligent cell population spatial distribution measurement system can run on computing devices such as desktop computers, laptops, handheld computers, and cloud servers. The computing system that can run on this intelligent cell population spatial distribution measurement system may include, but is not limited to, processors and memory. Those skilled in the art will understand that the above example is merely an illustration of an intelligent cell population spatial distribution measurement system 20 and does not constitute a limitation on the system. It may include more or fewer components, or combine certain components, or different components. For example, the intelligent cell population spatial distribution measurement system may also include input / output devices, network access devices, buses, etc.

[0096] By implementing a cell population spatial distribution intelligent measurement system 20, the problem of uneven cell distribution in tissues and misjudgment of functional aggregation leading to deviations in the distance from the cell center to the edge can be solved through visual detection and biometric recognition.

[0097] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0098] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0099] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0100] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this invention and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0101] Furthermore, the terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying relative importance, or implicitly specifying the number of technical features indicated in this embodiment. Therefore, features defined with terms such as "first" and "second" in the embodiments of this invention can explicitly or implicitly indicate that the embodiment includes at least one of those features. In the description of this invention, the word "multiple" means at least two or more, such as two, three, four, etc., unless otherwise explicitly specified in the embodiments.

[0102] In this invention, unless otherwise explicitly specified or limited in the embodiments, the terms "installation," "connection," "joining," and "fixing" appearing in the embodiments should be interpreted broadly. For example, a connection can be a fixed connection, a detachable connection, or an integral part; it can also be a mechanical connection, an electrical connection, etc. Of course, it can also be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication of two components, or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific implementation.

[0103] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "over," and "on top" of the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.

[0104] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for intelligently calculating the spatial distribution of a cell population, characterized in that, The method includes the following steps: S100 traverses single-cell files, collects cell images and cell information for each tissue region, and constructs a cell space; S200 identifies and locates cells in the cellular space and extracts the position and outline of each cell to obtain the central cell; S300: Obtain the shortest surrounding distance for each central cell and obtain the spatial complexity distance based on the shortest surrounding distance; wherein, step S300 includes: using md(i) to represent the shortest surrounding distance of the i-th central cell, where the shortest surrounding distance is the Euclidean distance between the central cell and its nearest surrounding cell, where i is the index of the central cell, i=0,1,2,…,t, and t is the number of central cells; creating an empty sequence MIDST, and importing md(i) as elements into the sequence MIDST in ascending order; obtaining the first quartile, third quartile, and median in the sequence MIDST, where the first quartile is denoted as Ma, the third quartile as Mb, and the median Mc; wherein, the spatial complexity distance MT is calculated as follows: calculating the spatial average distance MAD and the complexity coefficient RE, where MAD=Ma / 2+Mb / 2, the complexity coefficient RE=1-θ, and θ is the range of complexity distance offset; calculating MT using the spatial average distance MAD and the complexity coefficient RE, where MT=MAD×RE; S400, obtaining central edge cells and central aggregated cells through spatial complex distance; wherein, step S400 includes: traversing the central cells, recording the central cells whose shortest surrounding distance is greater than the spatial complex distance as central aggregated cells, and recording the central cells whose shortest surrounding distance is less than the spatial complex distance as central edge cells; S500 corrects the shortest surrounding distance between the central edge cells and the central aggregated cells, obtaining the true edge distance between the central edge cells and the central aggregated cells.

2. The method of claim 1, wherein, Step S100 includes: cell information including coordinate information, positive / negative labels of each marker, tissue type, and slide name; wherein, coordinate information includes the distance between the cell and the coordinate origin.

3. The method of claim 1, wherein the method comprises: Step S200 includes: improving image quality through image preprocessing to ensure clear cell boundaries; identifying and locating cells from the image using edge detection and contour extraction methods, where edge detection includes Otsu adaptive thresholding and Canny edge detection; accurately separating cells using region growing and assigning each cell a unique identifier; calculating the centroid of each cell after segmentation and identifying the central cell from surrounding cells by calculating the Euclidean distance between cells; extracting cell contours and optimizing the contours through smoothing and fine-tuning; recording and storing all cell location information and morphological features to generate a cell distribution map for visualization.

4. The intelligent method for calculating the spatial distribution of a cell population according to claim 3, further comprising step S400: Obtain the number of central aggregated cells and the number of central peripheral cells. Denote the number of central aggregated cells as x and the number of central peripheral cells as y.

5. The method of claim 1, wherein, Step S500 includes: S501, creating an empty sequence Mor, importing the shortest surrounding distance of the centroid cells into the sequence Mor, and arranging the centroid cells according to their distance from the origin in ascending order, denoted by mor(j) as the shortest surrounding distance of the j-th centroid cell in the sequence Mor; where j = 0, 1, 2, ..., x, and x is the number of centroid cells, and denoting the first quartile of the sequence Mor as RK and the third quartile of the sequence Mor as RL; S502, create an empty sequence Sor, import the shortest surrounding distance of the center and edge cells into the sequence Sor, and arrange them in ascending order of distance from the center and edge cells to the origin. Let sor(p) represent the shortest surrounding distance of the p-th center and edge cell in the sequence Sor; where p = 0, 1, 2, ..., y, and y is the number of center and edge cells. Let the first quartile in the sequence Sor be denoted as SK, and the third quartile in the sequence Sor be denoted as SL. S503, corrects the shortest surrounding distance of the central aggregated cell to obtain the true edge distance of the central aggregated cell; S504 corrects the shortest surrounding distance of the center edge cells to obtain the true edge distance of the center edge cells.

6. The method of claim 5, wherein the method further comprises: Step S503 includes: Let the true edge distance of the j-th central aggregated cell be Mok(j), where the true edge distance Mok(j) is calculated as follows: Mok(j) = min(mor(j-1), mor(j), mor(j+1)) + Mw(j); The calculation steps for the distance deviation value Mw(j) of the j-th centroidal cell are as follows: Determine the magnitudes of mor(j) and mor(j-1), take the larger value as MPa, and then calculate the absolute value MX1 between MPa and the third quartile RL in the sequence Mor; Determine the magnitudes of mor(j) and mor(j+1), take the smaller value as MPb, and then calculate the absolute value MX2 between MPb and the first quartile RK in the sequence Mor. Subtracting MX2 from MX1 yields the distance deviation value Mw(j) for the j-th central aggregated cell.

7. The method of claim 5, wherein the method comprises: Step S504 includes: Let Sok(p) be the true edge distance of the p-th central edge cell, where the true edge distance Sok(p) is calculated as follows: Sok(p) = min(sor(p-1), sor(p), sor(p+1)) + Sw(p); The calculation steps for the distance deviation value Sw(p) of the p-th central edge cell are as follows: Determine the magnitudes of sor(p) and sor(p-1), take the larger value as SPa, and then calculate the absolute value SX1 between SPa and the third quartile SL in the sequence Sor; Determine the magnitudes of sor(p) and sor(p+1), take the smaller value as SPb, and then calculate the absolute value SX2 between SPb and the first quartile SK in the sequence Sor. Subtracting SX2 from SX1, a distance deviation value Sw(p) of the pth central aggregated cell is obtained.

8. A smart system for measuring the spatial distribution of cell populations, characterized in that, The intelligent cell population spatial distribution calculation system comprises a processor, a memory, and a computer program stored in the memory and running on the processor, and the processor implements the steps of the intelligent cell population spatial distribution calculation method in any one of claims 1 to 7 when executing the computer program.