Pancreatic cancer and breast cancer early image diagnosis method based on multi-modal contrast learning

By constructing multi-temporal, multi-modal images of the pancreas and breast under a unified spatial reference frame, and employing an alternating ring domain coding method to fuse lesion and peripheral features, the problem of insufficient utilization of multi-modal information in the early diagnosis of pancreatic and breast cancer was solved, achieving highly sensitive and specific diagnostic results.

CN121122651BActive Publication Date: 2026-03-31GUIZHOU MEDICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511202478.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2026-03-31
Estimated Expiration
2045-08-26

AI Technical Summary

Technical Problem

Existing technologies for the early diagnosis of pancreatic and breast cancer suffer from several drawbacks, including reliance on manual interpretation which is highly subjective, low efficiency in the comprehensive utilization of multimodal information, lack of sensitivity to small lesions and their surrounding microenvironment, and inaccurate modeling of lesion evolution processes across time phases.

Method used

A multimodal contrastive learning-based approach was adopted to construct multi-temporal multimodal images of the pancreas and breast under a unified spatial reference frame. Feature fusion of lesion candidate areas and peripheral ring domain masks was achieved through alternating ring domain coding. Combined with temporal block alignment and completion strategies with organ identifiers as keys, symbol sequences were generated and jointly judged.

Benefits of technology

It improves the sensitivity and specificity of early lesion detection, enhances the robustness and interpretability of diagnosis, reduces the risk of missed diagnoses and misdiagnoses, and improves the accuracy and clinical application value of imaging diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121122651B_ABST
    Figure CN121122651B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image processing, and more particularly to a pancreatic cancer and breast cancer early image diagnosis method based on multi-modal contrast learning, step 1: obtaining multiple time-phase multi-modal images of the pancreas and breast of a subject in a unified spatial reference system to form a basic data set; step 2: based on the basic data set, alternately encoding the lesion candidate area mask and the peripheral ring domain mask to obtain an encoded feature vector; step 3: aligning the organ identification as the key according to the time-phase block index, and filling in the encoded feature vector of the missing time-phase block according to the set rule; jointly determining the intra-organ results of the two organs according to the set priority, and outputting the overall result. The present application can improve the sensitivity and specificity of early lesion detection, and enhance the diagnostic robustness and clinical application value while maintaining interpretability and traceability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology, specifically relating to an early imaging diagnostic method for pancreatic and breast cancer based on multimodal contrastive learning. Background Technology

[0002] Currently, pancreatic cancer and breast cancer, as malignant tumors with high incidence and poor prognosis in clinical practice, have made early diagnosis an important research direction in the fields of medical imaging and computer-aided diagnosis. Early symptoms of pancreatic cancer are often insidious; the tumor is often small in size on images and has little contrast with normal pancreatic tissue, frequently accompanied by complex interference from surrounding tissue structures. While some suspicious lesions in breast cancer can be detected early through routine imaging examinations, the imaging manifestations of high-density breast tissue or small lesions are still not typical, easily leading to missed diagnoses and misdiagnoses. Current clinical diagnosis mainly relies on multimodal medical imaging, including computed tomography (CT), magnetic resonance imaging (MRI), ultrasound imaging (US), and breast-specific imaging techniques (such as mammography), with doctors interpreting images and comparing them with medical history information for comprehensive analysis. However, manual interpretation suffers from problems such as reliance on experience, strong subjectivity, and limited efficiency in the comprehensive utilization of multi-temporal and multimodal information, lacking sensitivity to subtle changes in small lesions and their surrounding microenvironment.

[0003] In existing computer-aided diagnostic research, multimodal image fusion has been widely used to improve the accuracy of lesion detection and classification. A typical approach involves spatially registering images from different modalities, extracting and fusing features, and then using deep learning models such as convolutional neural networks or manual feature methods for lesion identification and classification. These methods typically employ global or local feature fusion strategies, such as extracting multiple features like intensity, texture, and shape within the region of interest (ROI) and performing joint modeling through feature stitching or multi-branch networks. However, when processing multi-temporal images, these methods often focus on lesion features from a single temporal phase, lacking precise modeling of the lesion's evolution across different time phases. Furthermore, in modeling the relationship between lesions and surrounding tissues, most existing methods simply extract features from a certain area outside the ROI as a peripheral region, lacking precise control over the interaction between the lesion boundary and the peripheral region, making them susceptible to interference from irrelevant backgrounds. Summary of the Invention

[0004] The main objective of this invention is to provide an early imaging diagnostic method for pancreatic and breast cancer based on multimodal contrastive learning. This method acquires multi-temporal, multimodal images of the pancreas and breast under a unified spatial reference frame, accurately constructs lesion candidate area masks and peripheral ring domain masks, and achieves bidirectional feature fusion within a common boundary band through alternating ring domain encoding. Combined with a temporal block alignment and completion strategy using organ identifiers as keys, the differences between lesions and their peripheries are transformed into symbol sequences matching a fixed-direction codebook. Finally, based on continuous run rules and multi-organ joint judgment, the overall result is output, thereby improving the sensitivity and specificity of early lesion detection, and enhancing diagnostic robustness and clinical application value while maintaining interpretability and traceability.

[0005] To solve the above problems, the technical solution of the present invention is implemented as follows:

[0006] An early imaging diagnostic method for pancreatic and breast cancer based on multimodal contrastive learning, the method comprising:

[0007] Step 1: Acquire multimodal images of the pancreas and breast of the subject in multiple temporal phases within a unified spatial reference frame. Determine lesion candidate area masks in the pancreatic and breast multimodal images respectively, and generate peripheral ring masks. Divide all multimodal images into temporal blocks of a set length along the time axis. Record the organ identifier, lesion candidate area mask position, peripheral ring mask range, and temporal block index for each temporal block to form a basic dataset.

[0008] Step 2: Based on the basic dataset, alternately encode the lesion candidate area mask and the peripheral ring domain mask to obtain the encoded feature vector;

[0009] Step 3: Align the time block index with organ identifier as key, and pad the encoding feature vector of missing time blocks according to the set rules; split the padded encoding feature vector into lesion candidate distinguishable quantity and peripheral ring domain component according to the set order, construct contrast vector and match it with the preset and fixed direction codebook to obtain symbol sequence; generate intra-organ results in each organ according to the continuous run of the symbol sequence and the set judgment rules, and jointly judge the intra-organ results of two organs according to the set priority, and output the overall result.

[0010] Furthermore, in step 1, the minimum connected area of ​​the lesion candidate area mask is not less than 10 square millimeters; the minimum effective diameter is not less than 3 millimeters.

[0011] Furthermore, the process of obtaining the peripheral annular mask in step 1 includes: using the outer boundary of the lesion candidate area mask as the inner boundary of the peripheral annular mask, and generating the outer boundary of the peripheral annular mask in a unified spatial reference system by morphological expansion; the expansion width of the morphological expansion is 0.5 times the minimum effective diameter of the lesion candidate area mask; the annular region between the outer boundary obtained after morphological expansion and the outer boundary of the lesion candidate area mask, which serves as the inner boundary, is defined as the peripheral annular mask.

[0012] Furthermore, step 2 specifically includes:

[0013] Step 2.1: Within a unified spatial reference frame, crop and unify the resolution of the corresponding regions of the lesion candidate area mask and the peripheral ring area mask, calculate the regional features of the preset dimension, and obtain the initial feature vector of the lesion candidate area and the initial feature vector of the peripheral ring area.

[0014] Step 2.2: Within the common boundary zone of the lesion candidate area mask and the peripheral ring domain mask, the weighting coefficient is determined based on the boundary similarity. Following the rule of alternating between lesion candidate area dominance and peripheral ring domain dominance, the two types of feature vectors are weighted and fused on the common boundary and updated alternately.

[0015] Step 2.3: After completing the preset rounds, the two types of updated feature vectors are processed by fixed length and normalization respectively, and the lesion candidate differentiation quantity and the peripheral ring domain component are concatenated in a fixed order to form the encoded feature vector of the current time block.

[0016] Step 2.4: When any mask is missing, zero values ​​are used as placeholders to maintain the dimension and order; the encoded feature vectors are registered one-to-one with the organ identifiers and temporal block indexes, so that subsequent steps can split and align them according to the set order.

[0017] Furthermore, step 3, which aligns the time block index with the organ identifier as the key and completes the encoding feature vector of the missing time block according to the set rules, specifically includes: aligning the time block index with the organ identifier as the key; when the encoding feature vector of a certain time block is missing and its adjacent front and rear are present, linear interpolation is performed to complete the encoding feature vectors of the two adjacent time blocks one dimension at a time; when there are consecutive missing or only one side is adjacent, the encoding feature vector of the nearest known time block is copied to complete the stepwise.

[0018] Furthermore, the process of obtaining the symbol sequence in step 3 includes: for the encoded feature vector of each phase block, splitting the lesion candidate distinguishing value and the peripheral ring domain component according to the fixed order of alternating ring domain coding, calculating the contrast vector as the lesion candidate distinguishing value minus the peripheral ring domain component; comparing the contrast vector with each unit vector in the fixed direction codebook that is preset by the system and remains unchanged, taking the codebook index corresponding to the one with the largest similarity, and mapping the index to a symbol according to the fixed symbol mapping table, the symbol set including three categories: normal, transitional and abnormal.

[0019] Furthermore, the process of outputting the overall result in step 3 includes: counting the longest continuous run length of the abnormal symbols; when the longest continuous run length in a certain organ is not less than the preset length, outputting the result of that organ as positive; when there are no abnormal symbols in a certain organ, outputting the result of that organ as negative; in other cases, outputting the result of that organ as suspicious; and making a joint judgment based on the results of the two organs, with the overall result being positive when either organ is positive, negative when both organs are negative, and suspicious in other cases, and outputting the overall result.

[0020] Furthermore, in step 2, the common boundary band is obtained through the following process: The outer boundary of the lesion candidate area mask and the inner boundary of the peripheral ring mask are extracted, both represented as pixel-level closed curves, retaining normal direction information; the outer boundary of the lesion candidate area mask is extended equidistantly on both sides along its normal direction to form equidistant strips with a fixed bandwidth; the inner boundary of the peripheral ring mask is also extended equidistantly on both sides along its normal direction to form equidistant strips with a fixed bandwidth. The bandwidth is measured in millimeters or pixels; the intersection of the two equidistant strips in a unified spatial reference frame is taken, and the intersection is further restricted to the union of the lesion candidate area mask and the peripheral ring mask to obtain the pixel set of the common boundary band; this set only contains pixels that are simultaneously adjacent to both boundaries.

[0021] Furthermore, the regional features in step 2.1 include: mean intensity, mean gradient magnitude, gray-level co-occurrence matrix contrast, and roundness.

[0022] The multimodal contrastive learning-based early imaging diagnostic method for pancreatic and breast cancer of this invention has the following beneficial effects: It accurately constructs lesion candidate area masks and peripheral ring domain masks for multi-temporal and multimodal images of the pancreas and breast under a unified spatial reference frame, and introduces an alternating ring domain encoding mechanism based on a common boundary band to achieve bidirectional information fusion of lesion internal representation and peripheral microenvironment representation, effectively enhancing the discriminability of both at the feature level. By determining weighting coefficients based on boundary similarity within the common boundary band and alternating updates in the order of first lesion candidate area dominance and then peripheral ring domain dominance, this invention enhances the correlation expression of adjacent boundary regions while preserving the characteristics of their respective core regions, thereby improving the sensitivity to small lesions and their peripheral changes. In terms of multi-temporal processing, this invention adopts a temporal block index alignment and categorical completion strategy based on organ identifiers, ensuring that time series features maintain continuity and comparability even with missing data, which helps to stably detect long-term evolution trends. By constructing a contrast vector from the difference between the candidate lesion discrimination value and the peripheral ring domain component, and matching it with a preset and fixed direction codebook, this invention transforms continuous changes into discrete symbol sequences, significantly improving the interpretability and traceability of the results. The longest continuous run determination method based on symbol sequences can effectively suppress the interference of isolated noise on diagnostic results, and in multi-organ scenarios, it balances sensitivity and specificity by setting priority joint determination rules, reducing the risk of missed diagnoses and misdiagnoses. Overall, this invention, through a comprehensive design of spatially precise registration, bidirectional feature interaction, temporal continuity modeling, symbolic output, and multi-organ joint determination, improves the accuracy, robustness, and interpretability of early pancreatic cancer and breast cancer imaging diagnosis, possessing high clinical application value. Attached Figure Description

[0023] Figure 1 This is a schematic flowchart of a method for early imaging diagnosis of pancreatic and breast cancer based on multimodal contrastive learning, provided in an embodiment of the present invention.

[0024] Figure 2 A schematic diagram illustrating the principle of the symbol sequence continuous run determination technology provided in this embodiment of the invention;

[0025] Figure 3 This is a schematic diagram illustrating the principle of the alternating ring domain coding mask structure technology provided in an embodiment of the present invention. Detailed Implementation

[0026] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0027] refer to Figure 1 A method for early imaging diagnosis of pancreatic and breast cancer based on multimodal contrastive learning, the method comprising:

[0028] Step 1: Following standardized body positioning and imaging range, the raw data undergoes orientation unification and coordinate reconstruction. Spatial alignment across modalities and time phases is achieved using the same reference volume. Voxel spacing, slice thickness, and field of view are resampled and cropped to ensure consistent spatial measurement and indexing methods for pancreatic and breast multimodal images within a unified spatial reference system. Subsequently, anatomical region localization and artifact suppression are performed on both pancreatic and breast multimodal images within this space. Intensity normalization and contrast equalization are applied to enhance the separability of tissue edges. After successful organ localization, candidate regions are limited to reduce interference from irrelevant structures. Based on this, lesion candidate area masks are determined. The determination process primarily uses semi-automatic segmentation, combined with edge response, texture consistency, and anatomical priors to initially screen for possible abnormal signals. Discrete signals are eliminated through connected component analysis. Noise and minor artifacts are eliminated, and stability constraints such as minimum connected area and minimum effective diameter are used to ensure the integrity and measurability of the lesion candidate area mask. To ensure that the microenvironment information related to the lesion is systematically characterized, a peripheral ring mask is generated based on the outer boundary of the obtained lesion candidate area mask. Specifically, an annular band is formed by expanding outward along the normal direction of the outer boundary within a unified spatial reference frame. The peripheral area is restricted from crossing boundaries and organs by intersecting with organ boundaries and the effective field of view of the image. At the same time, the local morphology of the annular band is automatically adjusted when it is close to the skin, cavity or highly heterogeneous area to avoid introducing non-target tissue signals. In the case of multiple adjacent lesions, their respective peripheral ring masks are generated independently and maintain unique identification and non-intersection constraints in subsequent registration, thereby ensuring that the one-to-one correspondence between different lesion candidate area masks and corresponding peripheral ring masks is clear and reliable.

[0029] After spatial domain processing, to achieve comparability and inferability in the temporal dimension, all multimodal images are segmented into temporal blocks of a set length along the time axis. The segmentation process is based on the acquisition timestamp and examination sequence, prioritizing that multimodal images within the same temporal block cover the same physiological stage and the same lesion evolution interval. Minor time differences formed across devices or examination days are merged using a temporal alignment strategy, making each temporal block a multi-source data unit that is relatively stable in time and strictly co-located in space. For time samples with missing or uneven intervals, a strategy of order-preserving rearrangement and vacancy filling is adopted to maintain the continuity and indexability of the global time axis, providing boundaries for subsequent interpolation and comparison matching. Conditions: After completing the construction of the unified spatial reference system and temporal blocks, standardized registration is carried out for each temporal block. The registration content includes organ identification, lesion candidate area mask position, peripheral ring mask range, and temporal block index. Among them, the organ identification clearly distinguishes between the pancreas and the breast and serves as the primary key for subsequent sequence alignment and joint determination. The lesion candidate area mask position is expressed in coordinates under the unified spatial reference system and simultaneously saves morphological enclosing information for rapid retrieval and verification. The peripheral ring mask range is recorded in a spatial discrete representation consistent with the lesion candidate area mask and includes a relative outward expansion relationship to support subsequent alternating fusion operations. The temporal block index is numbered continuously from early to late according to the time sequence to ensure that the complete temporal relationship can be restored by index.

[0030] Step 2: After completing the construction of the basic dataset, alternating ring domain encoding is carried out around the lesion candidate area mask and the peripheral ring domain mask within the unified spatial reference frame to obtain encoded feature vectors that can stably represent the differences between the lesion body and the surrounding microenvironment. The principle is that within the same temporal block, the lesion candidate area mask and the peripheral ring domain mask are used as two types of constrained feature-bearing regions. Measurable consistency and difference constraints are established through a common boundary band. Then, the two types of feature vectors are locally weighted and fused and globally updated in an alternating order of first being dominated by the lesion candidate area and then by the peripheral ring domain. Thus, without introducing additional uncertainties, the lesion candidate area discrimination quantity is concentrated to express the stable signs inside the lesion, and the peripheral ring domain component is focused to reflect the reactive changes of the adjacent tissue. Under the alternating action of continuous rounds, a directional comparative representation is formed.

[0031] In the specific implementation process, within each temporal block, subdomains corresponding one-to-one with the lesion candidate area mask and the peripheral ring domain mask are first cropped from a unified spatial reference system based on organ identifiers and the positions of the two types of masks. Resolution consistency and field of view are then implemented for the two types of subdomains to ensure the consistency of the spatial reference for subsequent feature calculations. Subsequently, for each modality, the mean intensity, mean gradient magnitude, gray-level co-occurrence matrix contrast, and roundness are calculated in the lesion candidate area mask and the peripheral ring domain mask, respectively. These are then concatenated in a fixed order on the lesion candidate area side and the peripheral ring domain side to form the initial feature vector of the lesion candidate area and the initial feature vector of the peripheral ring domain. When multiple modalities coexist, the consistency of the modal order is maintained and the modal source label is preserved so as to perform cross-modal fusion and comparison without destroying the dimensional correspondence.

[0032] After initial feature calculation, the outer boundary of the lesion candidate area mask and the inner boundary of the peripheral ring domain mask are extracted. Both are represented by pixel-level closed curves and the normal direction information is preserved. They are expanded equidistantly on both sides along their respective normal directions to form equidistant strips with a fixed bandwidth. The intersection of the two equidistant strips in a unified spatial reference system is taken and the intersection is restricted to the union of the lesion candidate area mask and the peripheral ring domain mask to obtain a common boundary band containing only pixels that are adjacent to both boundaries. The boundary similarity is evaluated pixel by pixel or block by block within this common boundary band. The similarity is defined to satisfy the monotonic response to boundary consistency and the suppression characteristics of noise disturbance. Based on this, weighting coefficients are assigned to the lesion candidate area mask side and the peripheral ring domain mask side so that the contribution of both sides on the common boundary band can be stably measured.

[0033] In the first round of alternation, an update dominated by the lesion candidate area is performed. This involves using the characteristics of the lesion candidate area mask side as the dominant information, and locally fusing the corresponding components of the peripheral ring mask side on the common boundary band according to weighted coefficients. This propagates the stable morphological features of the lesion candidate area mask side to the peripheral ring mask side with a controllable intensity, thereby enhancing the response sensitivity and directional consistency near the boundary without changing the statistical characteristics of the part of the peripheral ring mask that is far from the boundary. After this step, a subsequent update dominated by the peripheral ring domain is performed. This involves using the characteristics of the peripheral ring mask side as the dominant information, and performing symmetrical weighted fusing on the corresponding components of the lesion candidate area mask side on the common boundary band. This allows the lesion candidate area mask side to fully absorb the microenvironmental changes reflected by the peripheral ring mask side in the region near the boundary, without changing the overall distribution characteristics of the core region inside the lesion candidate area mask, thus completing one round of alternation.

[0034] After each round of alternation, consistency checks and range pruning are performed on the two types of feature vectors. The checks include dimensional order, modal splicing order, common boundary band coverage ratio, and relative shifts in statistical indicators before and after fusion. If local anomalies are found, local rollback is performed within that time block, or the abnormal component is replaced with the original component to prevent the anomaly from propagating to the next round of alternation. This alternation process is repeated in the preset number of rounds until the preset number of rounds is reached or the stability condition is met, at which point the alternation terminates, and two updated feature vectors are obtained. Subsequently, the updated feature vectors are fixed-length and normalized. The goal of normalization is to ensure that the masks of different temporal blocks, different lesion candidate regions, and the peripheral ring domain masks are strictly consistent in dimension. The goal of normalization is to reduce the amplitude differences across modalities and devices and maintain relative sensitivity to boundary changes. Both fixed-length normalization and normalization are performed without changing the dimensional order and modal order. After the above standardization process is completed, the lesion candidate differentiation quantity and the peripheral ring domain component are concatenated in a fixed order to form the encoded feature vector of the current temporal block. The encoded feature vector is then registered one-to-one with the organ identifier and the temporal block index to support subsequent temporal block alignment and missing completion based on the organ identifier.

[0035] When any mask is missing in a certain time block, to maintain dimensional consistency and sequence comparability, the missing side is filled with the corresponding component using zero-value placeholders, while the actual components of the non-missing side are retained and concatenated in a fixed order to form the encoded feature vector, thus avoiding changes in the dimensional mapping relationship due to unilateral missingness. When multiple lesions coexist, the above process is executed independently for each lesion candidate region mask and its corresponding peripheral ring domain mask, and a unique identifier is assigned to each pair of masks during registration to ensure clear and traceable mapping between the encoded feature vector and the specific spatial location. In terms of specific implementation details, to improve the sensitivity of alternating ring domain coding to small-volume lesions and weak boundary signs, priority is given to ensuring the boundary attachment during the construction stage of the common boundary band. To ensure the coverage balance of near samples, finer-grained small-block similarity assessment is used at abrupt changes in boundary curvature to reduce bias caused by morphological changes. During weighted fusion, extreme outliers are truncated to enhance numerical stability. When concatenating cross-modal information, the fixed positional relationship between modalities is maintained to avoid dimensional mismatch in subsequent comparisons. In a theoretical sense, alternating ring domain encoding uses a common boundary band under a unified spatial reference system as a constraint to explicitly characterize the comparability between the lesion candidate area mask and the peripheral ring domain mask. By utilizing the dominant order, the discrimination direction of the lesion candidate discrimination quantity and the peripheral ring domain component is gradually separated in the feature space, so that the two types of components present a stable, interpretable and cross-temporal block comparable comparison structure after completing a preset number of rounds.

[0036] This contrastive structure aligns with the goal of multimodal contrastive learning: without relying on the assumption of an opaque model, it constructs a pair of directional feature vectors from the lesion ontology and the surrounding microenvironment representation within the same temporal block through a fixed encoding process. The output, using a unified dimensional mapping, serves as the encoded feature vector, providing a solid data foundation for subsequent temporal block-level splitting, contrast vector construction, and matching with a fixed-direction codebook. Finally, alternating ring domain encoding, while preserving the spatial topological relationship between the lesion candidate area mask and the surrounding ring domain mask, achieves controlled information interaction and differential enhancement of the two components through a common boundary band. This ensures that the encoded feature vector retains stable features within the lesion while reflecting the responsive changes of surrounding tissues to the lesion. Furthermore, it yields consistent outputs under different organs, modalities, and time conditions, following the same process and order. This provides a directly callable standardized input for reliable temporal alignment, missing data completion, and symbol sequence generation in subsequent steps of multimodal contrastive learning-based early imaging diagnostic methods for pancreatic and breast cancer.

[0037] Step 3: After completing the alternating ring domain encoding, the temporal alignment and judgment stage begins. First, the temporal block index is aligned using the organ identifier as the key. Specifically, two sequences, pancreas and breast, are established separately. The encoded feature vector of each temporal block is written into the corresponding organ's index position according to the time sequence, and the continuity of the index is checked to eliminate duplication and out-of-bounds situations. When a missing encoded feature vector of a temporal block is detected and both its adjacent front and rear are present, linear interpolation is performed on the encoded feature vectors of the two adjacent temporal blocks one dimension at a time to maintain the smooth continuation of the same dimension in time and avoid causing breakpoints to the construction of subsequent comparison vectors. When there are consecutive missing features or only one side is adjacent, the encoded feature vector of the nearest known temporal block is copied for stepwise padding, so that dimensional consistency and index reachability are still guaranteed even in scenarios where interpolation is not possible. All padding is marked for subsequent quality control and review.

[0038] After obtaining the aligned and padded sequences, the encoded feature vectors of each temporal block are split according to the set order of alternating ring domain coding, strictly separating the lesion candidate distinguishability and the peripheral ring domain component, while maintaining the modal splicing order and dimensional mapping relationship unchanged. Then, a contrast vector is constructed as the lesion candidate distinguishability minus the peripheral ring domain component. This contrast vector is used to describe the directional differences between the lesion body and the peripheral microenvironment within the same temporal block. The contrast vector is matched with a preset and fixed direction codebook, and cosine similarity is used as the consistency measure to compare them one by one within the codebook. The index corresponding to the unit direction with the highest similarity is selected, and the index is mapped to a symbol according to a fixed symbol mapping table. The symbol set is limited to three categories: normal, transitional, and abnormal. Thus, a symbol sequence arranged by temporal block index is obtained for each organ. To suppress single-point fluctuations caused by occasional noise, the original output is retained at the symbol sequence level and subsequent judgment is supported by continuous rules. No additional smoothing processing is performed on the symbols to avoid weakening the true evolutionary trend.

[0039] Within each organ, intra-organ results are generated based on the continuous runs of the symbol sequence and set judgment rules. Specifically, the longest continuous run length of the abnormal symbols is counted. When this length is not less than a preset length, the intra-organ result for that organ is considered positive. When there are no abnormal symbols in that organ, the intra-organ result is considered negative. Otherwise, the intra-organ result is considered suspicious. This rule improves the detection probability driven by stable abnormalities and reduces the risk of misjudgment caused by isolated abnormalities through time-based persistence constraints. After completing the intra-organ results for two organs, a joint judgment is performed according to the set priority. When either organ is positive, the overall result is output as positive. When both organs are negative, the overall result is output as negative. Otherwise, the overall result is output as suspicious. At the same time, the intra-organ results, the overall results, organ identifiers, temporal block indexes, and completion marks are saved together for traceability and verification.

[0040] By aligning and completing the encoded feature vectors of different organs, time points, and modalities using organ identifiers as keys and based on temporal block indexes, it is ensured that the encoded feature vectors are comparable on the time axis and decomposable in the dimensional space. This allows the contrast vector composed of lesion candidate distinguishability and peripheral ring domain components to be stably mapped into a symbol sequence under the constraint of a fixed-direction codebook. Furthermore, by using continuous runs as a measure of temporal consistency, sensitive detection of stable anomalies is achieved. Through independent determination at the organ level and joint determination across organs, the reliability and clinical usability of the overall results are improved while ensuring interpretability.

[0041] Furthermore, the minimum connected area of ​​the lesion candidate region mask is set to be no less than 10 square millimeters, and the minimum effective diameter is set to be no less than 3 millimeters. This aims to eliminate scattered small patches caused by noise, vascular cross sections, or reconstruction artifacts, ensuring that the candidate region has measurable morphology and stable texture statistics. This allows the alternating ring domain coding to obtain sufficient sample density and reliable boundary similarity within the common boundary band. At the same time, it provides a lower bound for determining the outer width of the peripheral ring domain mask according to the minimum effective diameter, avoiding ring domain degradation or cross-pixel breaks, improving the robustness of cross-temporal block alignment and padding, and ensuring stable direction discrimination when matching with the preset and fixed direction codebook.

[0042] Furthermore, the process of generating a peripheral ring mask in a unified spatial reference frame for the early imaging diagnosis method of pancreatic and breast cancer based on multimodal contrastive learning is as follows: First, the outer boundary of the lesion candidate area mask is used as the inner boundary of the peripheral ring mask, maintaining spatial measurement and indexing consistent with organ positioning in the same coordinate system; then, morphological expansion is used to generate the outer boundary of the peripheral ring mask in the unified spatial reference frame, with the expansion width being 0.5 times the minimum effective diameter of the lesion candidate area mask, to ensure that the thickness of the ring region is adaptive relative to the lesion scale, so as not to be too thin and lose microenvironment signs, nor too thick and introduce irrelevant tissue signals far from the lesion; the ring region between the outer boundary obtained after morphological expansion and the outer boundary of the lesion candidate area mask, which serves as the inner boundary, is defined as the peripheral ring mask, and the topological consistency and connectivity of the ring region are checked during the generation process to ensure that the ring region is closed, without holes, and maintains a strict same-layer enclosing relationship with the lesion candidate area mask.

[0043] The outer boundary of the lesion candidate area mask and the inner boundary of the peripheral ring domain mask naturally constitute the interface between the lesion body and the adjacent tissue. The morphological expansion with a fixed ratio can provide a scale-stable neighborhood band without relying on device parameters. This ensures that sufficient neighbor sample density and consistent feature transition are obtained when evaluating boundary similarity and performing alternating ring domain encoding within the common boundary band. At the same time, determining the expansion width based on the minimum effective diameter can prevent the ring domain from degenerating into discrete pixels in small-volume lesion scenarios, and improve the feature comparability and robustness during cross-temporal block alignment and missing padding. To prevent the annular region from crossing boundaries or organs, the morphological expansion results are clipped at points near organ boundaries, subcutaneous fat layers, ductal lumens, or field of view edges, intersecting with the organ mask and effective field of view. If necessary, connectivity repair is performed to address local discontinuities caused by clipping, maintaining a complete annular band. For cases with multiple lesions, peripheral annular masks are independently generated with the outer boundary of each lesion candidate area mask as its inner boundary, maintaining unique identifiers and non-intersecting constraints during registration to prevent overlapping of annular regions and confusion of common boundary zones. The final peripheral annular mask is stored as a discrete pixel set under a unified spatial reference system, corresponding one-to-one with the lesion candidate area mask, organ identifier, and temporal block index. This lays a stable spatial foundation for subsequent splitting of the completed coded feature vectors according to a set order, constructing comparison vectors, and matching them with a preset and fixed directional codebook. This ensures that the symbol sequences generated within the pancreas and breast accurately reflect the differential evolution of the lesion and its surrounding microenvironment, serving the reliable output of the overall results.

[0044] Furthermore, step 2 specifically includes: after completing the construction of the basic dataset, starting an alternating ring domain encoding process around the lesion candidate region mask and the peripheral ring domain mask in the unified spatial reference frame. Its core is to transform the two types of restricted regions within the same temporal block into two comparable feature vectors, and perform weighted fusion and alternating updates based on boundary similarity within the common boundary band, thereby outputting an encoded feature vector with a stable discriminative direction.

[0045] Specifically, firstly, the lesion candidate region mask and the peripheral ring region mask corresponding to each temporal block are located within a unified spatial reference frame. The spatial regions corresponding to these two masks are then cropped into compact subdomains. Resolution unification is performed on both types of subdomains to standardize voxel spacing and pixel grid, ensuring that subsequent feature calculations and cross-modal comparisons are based on the same spatial metrics. After resolution unification, region features of a preset dimension are calculated for each modality within the lesion candidate region mask and the peripheral ring region mask. These region features are primarily statistically stable, sensitive to tissue differences, and reproducible within small sample neighborhoods. They are concatenated in a fixed order on the lesion candidate region side and the peripheral ring region side to form the initial feature vectors for the lesion candidate region and the peripheral ring region. In multimodal parallel scenarios, the consistency of modal order and subvector positions is strictly maintained, and modal source labels are attached to ensure that the subsequent weighted fusion within the common boundary band can achieve one-to-one component alignment. After the initial feature vectors are constructed, the outer boundary of the lesion candidate area mask and the inner boundary of the peripheral ring domain mask are extracted from the unified spatial reference frame. They are then expanded equidistantly along their respective normal directions to obtain two equidistant strips with a fixed bandwidth. The intersection of the two equidistant strips within the union of the two masks is taken as the common boundary band. A pixel-wise or block-wise boundary similarity metric is established within the common boundary band to reflect the local consistency of the two sides in terms of intensity, texture, and shape-related features.

[0046] Subsequently, weighting coefficients are determined based on boundary similarity and assigned to the corresponding components of the lesion candidate area and the peripheral ring domain. This leads to an alternating update phase where the lesion candidate area is initially dominant, followed by the peripheral ring domain. In the first half-round, the initial feature vector of the lesion candidate area is used as the dominant information. Weighted fusion is performed only on the initial feature vector of the peripheral ring domain at the corresponding component positions of the common boundary zone. The fused result reflects the controllable influence of the lesion's physical characteristics on the peripheral response near the boundary, while retaining its original distribution characteristics in the peripheral region far from the boundary. In the next half-round, the component of the peripheral ring domain at the common boundary zone is used as the dominant information. Symmetrical weighted fusion is performed on the corresponding component of the lesion candidate area, allowing the lesion candidate area to absorb the changes in the microenvironment of the adjacent tissue near the boundary while maintaining stable statistics in the core lesion area. These two half-rounds constitute an alternating update cycle. After each round of alternating updates, a consistency check is performed on the two types of feature vectors. The check includes dimensional order, modal splicing position, coverage ratio of common boundary bands, and relative shifts in statistical indicators before and after fusion. If an anomalous component is found in any temporal block, the anomalous component is either locally rolled back or replaced with the original component to ensure that the anomalous component does not accumulate and amplify in subsequent rounds. The above alternating process of "first lesion candidate region dominating, then peripheral ring region dominating" is repeated according to the preset rounds until the termination condition is met, at which point the two types of updated feature vectors are obtained respectively.

[0047] To ensure comparability and concatenation of outputs from different temporal blocks and organs, fixed-length and normalization processes are performed on the two types of updated feature vectors. Fixed-length processing ensures strict consistency of vector dimensions across all samples, while normalization suppresses the influence of amplitude scale from differences in equipment, acquisition protocols, and modalities, while maintaining relative sensitivity to changes in common boundary bands. These processes are performed without altering the dimensional and modal order. After standardization, the lesion candidate discrimination value and the peripheral ring domain components are concatenated in a fixed order to form the encoded feature vector of the current temporal block. This fixed order remains unchanged throughout the entire process to ensure no ambiguity during subsequent splitting, alignment, and orientation matching. If any mask is missing within a temporal block, a zero-value placeholder is used to maintain the dimension and order. The zero-value placeholder is only used to maintain stable dimensional mapping and does not change the actual components on the other side, allowing the encoded feature vector to still be serialized and temporally aligned even under missing conditions. Missing placeholders are explicitly marked during registration to facilitate quality control and necessary sensitivity analysis in subsequent judgment stages.

[0048] Finally, the encoded feature vector of each temporal block is registered in a one-to-one correspondence with the organ identifier and temporal block index. The registration record includes source information under a unified spatial reference system, the validity check results of the common boundary band, and missing markers. This allows the encoded feature vector to be directly used for alignment by temporal block index with the organ identifier as the key. When constructing the contrast vector and matching it with a preset and fixed direction codebook, the source of the components is clear and the index is traceable. Through the above process, under the constraints of a unified spatial reference system and a common boundary band, the alternating ring domain coding transforms the spatial topological relationship between the lesion candidate area mask and the peripheral ring domain mask into two types of stable, comparable, and directionally consistent feature representations. The encoded feature vector output by each temporal block simultaneously retains the stable signs inside the lesion and the responsive changes of the peripheral tissues. The fixed dimensional mapping ensures unified processing across organs, modalities, and time. This provides standardized, repeatable, and interpretable input for the early imaging diagnosis method of pancreatic cancer and breast cancer based on multimodal contrast learning in subsequent temporal alignment, missing completion, contrast vector construction, and symbol sequence generation.

[0049] Furthermore, after completing the alternating ring domain encoding, the sequence construction and determination process is carried out on an organ-by-organ basis. First, the organ identifier is used as the key and aligned with the temporal block index. The encoded feature vectors obtained by each organ in each temporal block are written to the corresponding index positions on the same time axis to ensure that the temporal order within the same organ is strictly consistent. The continuity and uniqueness of the index are checked to eliminate duplicate records and out-of-bounds writing, thereby forming an intra-organ sequence that can be directly used for temporal comparison. During the alignment process, when a missing encoded feature vector is detected in a temporal block and it exists in both its immediate vicinity and adjacent phases, dimensional linear interpolation is used for padding. That is, while maintaining the dimensional order and modal concatenation order, each dimension of the encoded feature vector is interpolated between adjacent temporal blocks according to its temporal position, so that the temporal block obtains an intermediate value consistent with its temporal position in each dimension. This maintains the smooth continuation of the same dimension over time and avoids the breakpoint effect on the construction of subsequent comparison vectors. When there are consecutive missing features or only one adjacent feature vector, the encoded feature vector of the nearest known temporal block is copied for step-wise padding. The gap is filled in a piecewise constant manner to ensure that the dimensional mapping and modal order are not affected. At the same time, it avoids introducing unverifiable numerical extrapolation in the absence of reliable neighboring references. Both types of padding are marked in the record for easy subsequent quality control and traceability.

[0050] After alignment and padding, the encoded feature vector of each temporal block is split into lesion candidate distinguishing factor and peripheral ring domain component according to the fixed order of alternating ring domain encoding. The modal order and dimensional mapping within the component are kept completely consistent with the generation stage to avoid component mismatch when comparing across temporal blocks and organs. On this basis, a contrast vector is constructed by subtracting the peripheral ring domain component from the lesion candidate distinguishing factor. This makes the contrast vector express the directional difference between the lesion body and the peripheral microenvironment at the same time point in each dimension. This difference expression can focus on the relative changes of the boundary neighborhood without relying on the global intensity scale, and inherits the directional consistency established by alternating ring domain encoding in the common boundary band, thus being more sensitive to slight but continuous structural and texture changes.

[0051] To stably map the contrast vector to discrete symbols, a pre-defined and unchanging fixed-direction codebook is used for direction matching. The codebook consists of unit vectors covering the main discriminative directions, maintaining complete consistency across different samples and time conditions to avoid reference frame changes caused by training drift or device differences. In each time block, the contrast vector is compared with each unit vector in the fixed-direction codebook using cosine similarity. The codebook index corresponding to the highest similarity is selected, and this index is mapped to a symbol according to a fixed symbol mapping table. The symbol set includes three categories: normal, transitional, and abnormal. This yields a symbol sequence for each organ that corresponds one-to-one with the time block index. The principle behind this matching process is that cosine similarity emphasizes directional consistency while downplaying amplitude differences, perfectly aligning with the relative direction between the lesion candidate discrimination value and the peripheral ring component expressed by the contrast vector. The fixed-direction codebook provides a reusable and device-independent reference frame across datasets, ensuring consistency and traceability in symbol sequence generation. To avoid over-processing from affecting the true evolutionary trend, the symbol sequence is not subjected to numerical smoothing or merging operations after generation, but directly enters the organ determination process, suppressing isolated noise through temporal persistence constraints.

[0052] Specifically, within each organ, intra-organ results are generated based on the continuous runs of the symbol sequence and set judgment rules. The longest continuous run length of the abnormal symbols is counted and compared with a preset length. If the longest continuous run length is not less than the preset length, the intra-organ result for that organ is output as positive; if no abnormal symbols are found in that organ, the intra-organ result for that organ is output as negative; otherwise, the intra-organ result for that organ is output as suspicious. The principle behind this temporal consistency judgment is that the true pathological changes of early lesions and their surrounding microenvironment often manifest as a continuous directional shift across several adjacent temporal blocks. The longest continuous run length can directly measure this continuity, thereby increasing the detection probability of stable abnormalities and reducing misjudgments caused by single-point fluctuations. For temporal blocks containing completions generated by linear interpolation and step-wise completion, although the symbol generation process is not changed, completion markers and completion types are retained in the system log to facilitate a dedicated review of the uncertainties introduced by completions during retrospective analysis or sensitivity assessment. After completing the intra-organ results for both organs, a joint judgment is made according to the set priority. If either organ is positive, the overall result is positive; if both organs are negative, the overall result is negative; otherwise, the overall result is suspicious. The principle of this joint strategy is to maintain the independence of intra-organ judgments for the pancreas and breast while integrating information at the overall level through priority rules. This ensures that when either organ shows an abnormality with sufficient duration, a positive indication can be output in a timely manner, while a negative guarantee is provided when both organs are normal. When the two are inconsistent or a single organ is insufficient to meet the duration threshold, a conservative conclusion of suspiciousness is made, reducing the risk of overdiagnosis and missed diagnosis.

[0053] At the engineering implementation level, both intra-organ and overall results are stored together with the generation information of organ identifiers, temporal block indexes, completion markers, and contrast vectors. This ensures that every processing step, from the final output to the encoded feature vector and its source data, is supported by records. This recording mechanism, combined with a fixed-direction codebook and a unified spatial reference system, enables the early imaging diagnostic methods for pancreatic and breast cancer based on multimodal contrastive learning to obtain consistent symbol sequences and stable judgment logic in application scenarios of different batches, different equipment, and different centers. In summary, by using organ identifiers as keys and aligning them with temporal block indices, and by padding missing temporal block encoding feature vectors according to set rules, the comparisons on the timeline become operable and complete. The padded encoding feature vectors are then split into lesion candidate distinguishing factors and peripheral ring domain components in a set order to construct a comparison vector. This vector is then matched with a preset and fixed directional codebook to obtain a symbol sequence, so that the relative changes between lesions and their peripheries are uniformly mapped to a finite set of symbols. Within each organ, intra-organ results are generated based on the continuous runs of the symbol sequence and set judgment rules. The two organs are then jointly judged according to a set priority, and the overall result is finally output. Thus, while maintaining the interpretability, verifiability, and scalability of the entire process, stable identification and consistent judgment of early lesion-related changes are achieved across time.

[0054] Furthermore, the process of constructing a common boundary band within a unified spatial reference system first involves boundary extraction of the lesion candidate area mask and the peripheral ring domain mask. The outer boundary of the lesion candidate area mask and the inner boundary of the peripheral ring domain mask are represented as pixel-level closed curves, and the normal direction information is recorded for each point to ensure that subsequent geometric operations along the normal direction have directional uniformity and repeatability.

[0055] Based on this, the outer boundary of the lesion candidate area mask is expanded equidistantly on both sides along its normal direction to form equidistant strips with a fixed bandwidth. Simultaneously, the inner boundary of the peripheral ring mask is expanded equidistantly on both sides along its normal direction to form equidistant strips with a fixed bandwidth. The bandwidth is measured in millimeters or pixels, and the conversion relationship of this unit within a unified spatial reference system ensures scale consistency between different devices and different modalities. To avoid gaps or overlaps at abrupt curvature changes, the curve is resampled segment by segment and corner smoothed during the expansion process. In cases of local self-intersection, only the effective strips on the same side as the original boundary are retained. Subsequently, the intersection of the two equidistant strips in the unified spatial reference system is calculated, and the intersection is further restricted to the union of the lesion candidate area mask and the peripheral ring mask, excluding pixels falling outside either or crossing non-target tissues. This results in a pixel set of the common boundary band, which contains only pixels simultaneously adjacent to both boundaries, providing symmetrical and comparable neighborhood samples in subsequent boundary similarity evaluation and weighted fusion.

[0056] When the common boundary band is close to the organ boundary, gas cavity, or edge of the field of view, the band is kept closed and connected by intersecting with the overall organ mask and the effective field of view. When the clipping causes local discontinuity, the shortest connection pixel filling strategy is used to maintain topological consistency. For multiple lesions, a common boundary band is independently generated for each pair of lesion candidate area masks and peripheral ring area masks and assigned a unique identifier to avoid the common boundary bands of different lesions overlapping each other and causing feature leakage. Around the above common boundary band, the region feature calculation in step 2.1 uses the lesion candidate area mask and the peripheral ring area mask as independent statistical domains. At the same time, boundary-related statistics are recorded in the neighborhood of the common boundary band to support the subsequent weighted fusion. The region features include intensity mean, gradient magnitude mean, gray-level co-occurrence matrix contrast, and roundness. The intensity mean is obtained by averaging the gray levels of each pixel in the specified region and is used to characterize the overall signal level of the tissue. It can form a comparable scale after normalization between different modalities. The gradient magnitude mean is obtained by averaging the local intensity changes of pixels in the region. Amplitude summation reflects the sharpness of edges and the strength of tissue transition, helping to distinguish smooth tissue from changes caused by fibrous hyperplasia or hardening near common boundary zones; gray-level co-occurrence matrix contrast, by statistically analyzing the co-occurrence relationship of pixel pairs within a specified neighborhood and measuring the contribution of high and low gray-level differences, is sensitive to texture unevenness and graininess changes, and can capture the differences in the microstructure level between the internal and peripheral microenvironments of lesions; roundness, through the consistency of area and boundary shape, reflects the regularity of lesion geometry, which is helpful for tracking the evolution trend of lesion shape from regular to irregular or from irregular to regular over time.

[0057] The above four regional features are calculated separately in the lesion candidate area mask and the peripheral ring domain mask, and concatenated in a fixed order to form the initial feature vector of the lesion candidate area and the initial feature vector of the peripheral ring domain. Under multimodal conditions, the modal splicing order is kept constant to ensure that the one-to-one correspondence between the components is clear and reliable when the weighting coefficients are determined based on the boundary similarity in the common boundary band and the weighted fusion and alternating update are implemented with the lesion candidate area as the main focus first and the peripheral ring domain as the main focus later.

[0058] The construction of the common boundary band ensures that samples participating in weighted fusion are simultaneously adjacent to two boundaries, reducing the bias caused by asymmetric neighborhood selection. This allows boundary similarity to be evaluated around the same geometric reference and stably converted into weighting coefficients. The selection of regional features takes into account four aspects: intensity, edge, texture, and shape. This ensures that the lesion candidate discrimination and the peripheral ring domain components are complementary and directional in the alternating update of the common boundary band. After completing a preset number of rounds, a clearly contrasting and comparable encoded feature vector across time blocks is formed. This provides a stable input basis for subsequently splitting the supplemented encoded feature vector in a set order to construct a contrast vector and matching it with a preset and fixed directional codebook to obtain a symbol sequence. It also maintains a unified scale, unified topology, and unified discrimination criteria in the temporal analysis of the pancreas and breast.

[0059] The following is a complete implementation example for a single patient, where multimodal images of the pancreas and breast are acquired during the same medical visit. After resampling, isotropic voxels are used in a unified spatial reference frame, and all intensities are normalized to the interval [0,1] during the preprocessing stage. Let the temporal block index be... ,in These correspond to four time phase blocks arranged in chronological order; organ identifiers are provided. .

[0060] Within each organ and each temporal block, the lesion candidate region mask is denoted as The peripheral ring mask is denoted as Both are located in a unified spatial reference frame. The minimum connected area and minimum effective diameter of the lesion candidate region mask are respectively... and ,in Indicates in The minimum area of ​​all connected regions within the given area, expressed in square millimeters; Indicates in The minimum effective diameter of any connected region within the pancreas, in millimeters. In this embodiment, the pancreas is taken... and , for breast tissue and Based on this, the outer width of the perimeter ring mask is set according to the rules. pancreas With breast .

[0061] The fixed bandwidth of the common boundary band is set to Millimeters, and obtained by finding the intersection through equidistant extension of normals in a unified spatial reference frame, retaining only the simultaneously adjacent ones. outer boundary and The set of pixels within the inner boundary. Region features are represented by a 4-dimensional vector, consisting of the mean intensity, mean gradient magnitude, gray-level co-occurrence matrix contrast, and roundness, defined as follows: Let the set of pixels within the region be... Pixel intensity is Then the mean intensity Gradient magnitude mean ,in and The strength is respectively at and Discrete gradient of direction; contrast of gray-level co-occurrence matrix ,in It is the gray level after discretization and Co-occurrence probability under a specified displacement vector; roundness ,in The area is expressed as square millimeters. The perimeter (in millimeters) of the outer boundary of the region.

[0062] With the pancreas in Taking the temporal block as an example, the measured area and perimeter of the lesion candidate region mask are as follows: and Based on this roundness In each time phase block Calculate the initial feature vectors on the mask side of the lesion candidate area respectively. Initial feature vectors on the periphery of the ring mask side Then, within the common boundary zone, based on boundary similarity... Weighted coefficients are generated, and an alternating update is performed in the order of "first the lesion candidate area is dominant, then the peripheral ring region is dominant," and the update coefficients are recorded. and Used respectively for the first half of the wheel and the second half of the wheel, defined as , ,in A fixed proportionality coefficient is used. This embodiment involves pancreatic extraction. In order For breast tissue, take samples from the observed time-phase blocks .

[0063] The calculation formula for one round of alternating updates is (vectors are calculated equally by components): Peripheral ring mask side update ; Mask-side update of lesion candidate area With the pancreas For example, let's assume , ,Pick ,but ; Similarly, the pancreas can be derived. The updated vectors are respectively , , , , , Breast glands in and Observable, take , , , and take ,have to , , , The updated vectors, after being fixed-lengthened and normalized (in this example, the dimension and normalization range are unified), are concatenated in a fixed order of "lesion candidate discrimination value first, peripheral ring domain component second" to form the encoded feature vector. And register them one by one with organ identifiers and time block indexes.

[0064] Entering the alignment and completion phase, alignment is performed using organ identifiers as keys, aligned according to phase block indices on their respective timelines. Breast tissue is... Missing and its adjacent front and back Exists, and is completed by one-dimensional linear interpolation, with the interpolation formula being: , ; breasts in Missing and only one-sided adjacent Complete the steps in a step-by-step manner. , Subsequently, a contrast vector is constructed for each time phase block. Taking the pancreas as an example, , , , ; breasts have , , , Let the fixed-direction codebook be... ,in , , And let the symbol mapping table be... , , In each The cosine similarity between the comparison vector and the codebook in each unit direction is calculated, and the following definition is given. ,in It is a Euclidean norm. (Using the pancreas as an example.) For example, Based on this , , The largest corresponds to This is mapped to "transition".

[0065] Similarly, the symbolic sequence of the pancreas is obtained one by one. The symbolic sequence for the mammary gland is When determining the length within an organ, a preset length threshold is set. The longest consecutive run length of statistical outliers "Abnormalities" in the pancreas only occur in... ,therefore Furthermore, an anomaly was found; according to the rules, the intra-organ result for the pancreas was output as "suspicious"; no abnormal symbols were found in the breast, therefore... The results for the output mammary gland were "negative". In the calculation of the overall result, the joint judgment rule is followed: "the overall result is positive when any organ is positive, the overall result is negative when both organs are negative, and the overall result is suspicious in other cases". In this case, the pancreas is "suspicious" and the mammary gland is "negative", so the overall result is "suspicious".

[0066] Figure 2This paper demonstrates the core technical process of continuous run statistics and judgment for symbol sequences generated after symbol mapping of the comparison vector in this invention. The principle of this technology is based on the continuous temporal distribution characteristics of abnormal symbols, and achieves intra-organ result judgment and multi-organ joint judgment by setting judgment rules. First, the processing process for the symbol sequence of the pancreas organ is shown. Within the pancreas organ, after matching the comparison vector with the fixed-direction codebook, the symbol sequence arranged in the temporal block index order contains three types of symbols: normal, transitional, and abnormal. The pancreas symbol sequence shown in the figure is: normal-normal-abnormal-abnormal-abnormal-abnormal-transitional-normal. By statistically analyzing the continuous runs of abnormal symbols, it can be identified that four abnormal symbols appear consecutively from the 3rd to the 6th temporal block, forming a longest continuous run length of 4. According to the preset judgment rules, when the longest continuous run length of abnormal symbols in a certain organ is not less than the preset length, the intra-organ result for that organ is output as positive. Second, the processing process for the symbol sequence of the breast organ is shown. The symbol sequence of the breast organ is shown as: normal-transitional-abnormal-normal-normal-abnormal-abnormal-normal. In this sequence, abnormal symbols exhibit a scattered distribution, with the longest consecutive runs occurring in the 6th and 7th phase blocks, each with a run length of 2. When this length is less than a preset length, according to the established judgment rules, the intra-organ result is considered suspicious due to the presence of abnormal symbols but insufficient consecutive run length. Finally, a joint judgment process for two organs is implemented. According to the established joint judgment priority rules: if either organ is positive, the overall result is positive; if both organs are negative, the overall result is negative; otherwise, the overall result is suspicious. In the illustrated case, the pancreas result is positive, and the breast result is suspicious; according to the joint judgment rules, the final output overall result is positive. This technical principle ensures the extraction of persistent abnormal patterns in lesions through temporal continuity features, improving the accuracy and reliability of early imaging diagnosis.

[0067] Figure 3This paper details the core technical mechanism of constructing lesion candidate region masks and peripheral ring domain masks within a unified spatial reference frame, as well as the determination and alternating encoding process of the common boundary band between the two types of masks. This technical principle is a key foundational structure for realizing multimodal contrastive learning. The generation of the lesion candidate region mask follows strict geometric constraints. The mask must meet the technical requirements of a minimum connected area of ​​not less than 10 square millimeters and a minimum effective diameter of not less than 3 millimeters. By accurately registering multimodal images within a unified spatial reference frame, the spatial consistency of the lesion candidate region mask across different temporal phases and modalities is ensured. The outer boundary of the lesion candidate region mask serves as the inner boundary reference for the subsequent generation of the peripheral ring domain mask, guaranteeing the precise spatial correspondence between the two types of masks. The generation of the peripheral ring domain mask employs morphological expansion technology. Using the outer boundary of the lesion candidate region mask as the inner boundary of the peripheral ring domain mask, morphological expansion is used to generate the outer boundary of the peripheral ring domain mask within the unified spatial reference frame. The morphological expansion width is set to 0.5 times the minimum effective diameter of the lesion candidate area mask, ensuring that the peripheral annular region has sufficient space to capture tissue feature changes around the lesion. The annular region between the outer boundary obtained after expansion and the outer boundary of the lesion candidate area mask (which serves as the inner boundary) is defined as the peripheral annular region mask, providing a reference area for subsequent comparative analysis. Determining the common boundary band is a key technical step in realizing alternating annular region coding. By extracting the outer boundary of the lesion candidate area mask and the inner boundary of the peripheral annular region mask, both are represented as pixel-level closed curves, preserving normal direction information. The two boundaries are expanded equidistantly on both sides along their normal directions to form equidistant strips with fixed bandwidth. The intersection of the two equidistant strips in a unified spatial reference system is taken, and the intersection is restricted to the union of the lesion candidate area mask and the peripheral annular region mask, ultimately obtaining a common boundary band containing only pixels that are simultaneously adjacent to the two boundaries. This common boundary band provides a precise spatial positioning basis for weighted fusion in alternating annular region coding.

[0068] The above-described 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.

Claims

1. A pancreatic cancer and breast cancer early image diagnosis method based on multi-modal contrast learning, characterized in that, The method comprises: Step 1: acquiring multiple time-phase multi-modal images of the pancreas and the breast of a subject in a unified spatial reference system, determining a lesion candidate region mask in the multi-modal image of the pancreas and the multi-modal image of the breast respectively, and generating a peripheral ring domain mask; all multi-modal images are cut into time-phase blocks of a set length along the time axis; organ identification, lesion candidate region mask position, peripheral ring domain mask range and time-phase block index are recorded for each time-phase block to form a basic data set; Step 2: based on the basic data set, alternately encode the lesion candidate region mask and the peripheral ring domain mask to obtain an encoded feature vector; Step 3: aligning with the organ identification as the key according to the time-phase block index, and filling in the encoded feature vector of the missing time-phase block according to the set rule; the filled-in encoded feature vector is split into a lesion candidate region component and a peripheral ring domain component according to the set order, a comparison vector is constructed and matched with a pre-set and fixed direction codebook to obtain a symbol sequence; the organ-in results of each organ are generated according to the continuous run of the symbol sequence and the set determination rule, and the organ-in results of the two organs are jointly determined according to the set priority to output the overall result; Step 2 specifically comprises: Step 2.1: in the unified spatial reference system, the corresponding regions of the lesion candidate region mask and the peripheral ring domain mask are cropped and resolution-uniformed, and the region features of a pre-set dimension are calculated to obtain the lesion candidate region initial feature vector and the peripheral ring domain initial feature vector; Step 2.2: in the common boundary zone of the lesion candidate region mask and the peripheral ring domain mask, the weighting coefficients are determined according to the boundary similarity, and the weighted fusion of the two types of feature vectors on the common boundary is performed according to the rule of alternately leading by the lesion candidate region first and then the peripheral ring domain; Step 2.3: after completing a pre-set number of rounds, the two types of updated feature vectors are respectively processed by fixed-length and normalization, and the lesion candidate region component and the peripheral ring domain component are concatenated in a fixed order to form the encoded feature vector of the current time-phase block; Step 2.4: when any mask is missing, a zero-value placeholder is used to maintain the dimension and order unchanged; the encoded feature vector is registered with the organ identification and the time-phase block index one by one for subsequent splitting and alignment according to the set order; In step 3, the process of aligning with the organ identification as the key according to the time-phase block index and filling in the encoded feature vector of the missing time-phase block according to the set rule specifically comprises: aligning with the organ identification as the key according to the time-phase block index; when the encoded feature vector of a certain time-phase block is missing and its adjacent front and back exist, the encoded feature vectors of the adjacent two time-phase blocks are linearly interpolated to fill in; when there is continuous missing or only one side adjacent, the encoded feature vector of the nearest known time-phase block is copied for stepwise filling. 2.The pancreatic cancer and breast cancer early-stage image diagnosis method based on multi-modal contrast learning of claim 1, wherein, In step 1, the minimum connected area of the lesion candidate region mask is not less than 10 square millimeters; the minimum effective diameter is not less than 3 millimeters. 3.The pancreatic cancer and breast cancer early-stage image diagnosis method based on multi-modal contrast learning of claim 2, wherein, The process of obtaining the peripheral ring mask in step 1 comprises: taking the outer boundary of the lesion candidate mask as the inner boundary of the peripheral ring mask, and generating the outer boundary of the peripheral ring mask in a unified spatial reference system by morphological dilation; the dilation width of the morphological dilation is 0.5 times the minimum effective diameter of the lesion candidate mask; the annular region between the outer boundary obtained after the morphological dilation and the lesion candidate mask outer boundary as the inner boundary is defined as the peripheral ring mask. 4.The method of claim 3, wherein the method is based on multi-modal contrastive learning. The process of obtaining the symbol sequence in step 3 comprises: for each phase block coding feature vector, the lesion candidate component and the peripheral ring component are split according to the fixed order of the alternating ring coding, and the contrast vector is calculated as the lesion candidate component minus the peripheral ring component; the contrast vector is compared with each unit vector in the fixed direction codebook preset and kept unchanged by the system one by one to obtain the codebook index corresponding to the maximum similarity, and the index is mapped to a symbol according to the fixed symbol mapping table, and the symbol set includes normal, transition and abnormal three types. 5.The pancreatic cancer and breast cancer early-stage image diagnosis method based on multi-modal contrast learning according to claim 4, wherein, The process of outputting the overall result in step 3 comprises: counting the length of the longest continuous run of abnormal symbols; when the length of the longest continuous run in a certain organ is not less than the preset length, output the organ-in result of the organ as positive; when there is no abnormal symbol in a certain organ, output the organ-in result of the organ as negative; in other cases, output the organ-in result of the organ as suspicious; the organ-in results of the two organs are jointly determined, and the overall result is positive when any organ is positive, the overall result is negative when both organs are negative, and the overall result is suspicious in other cases, and the overall result is output. 6.The pancreatic cancer and breast cancer early-stage image diagnosis method based on multi-modal contrast learning of claim 5, wherein, In step 2, the common boundary band is obtained by the following process: extracting the outer boundary of the lesion candidate mask and the inner boundary of the peripheral ring mask, both of which are represented in the form of a closed curve at the pixel level and the normal direction information is retained; for the outer boundary of the lesion candidate mask, isoparametric bilateral expansion is performed along its normal direction to form an isoparametric band with a fixed band width; for the inner boundary of the peripheral ring mask, isoparametric bilateral expansion is performed along its normal direction to form an isoparametric band with a fixed band width, and the band width is in units of millimeters or pixels; the intersection of the two isoparametric bands in the unified spatial reference system is taken, and the intersection is further limited within the union of the lesion candidate mask and the peripheral ring mask to obtain the pixel set of the common boundary band; the set only contains pixels adjacent to both boundaries.

7. The multi-modal contrast learning based early-stage pancreatic and breast cancer diagnosis method of claim 6, wherein, The region features in step 2.1 include: intensity mean, gradient amplitude mean, gray level co-occurrence matrix contrast, and circularity.

Citation Information

Patent Citations

  • Method, system and equipment for detecting multiple lesions of lung cancer and medium

    CN118212501A

  • Intelligent pneumoconiosis diagnosis system based on weighted information flow data increment network

    CN118967614A