Endoscope image-based esophageal variceal bleeding risk prediction system for hepatitis b patients

CN122737119BActive Publication Date: 2026-11-03自贡市第一人民医院
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611208442.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-11
Publication Date
2026-11-03
Estimated Expiration
2046-08-11

AI Technical Summary

Technical Problem

Existing technologies lack a comprehensive analysis of the relationship between the red area and changes in surrounding structures, as well as the temporal evolution process, when analyzing the risk of esophageal venous bleeding in hepatitis B patients. This makes it difficult to accurately reflect the development trend of abnormal areas and their potential risks in complex clinical scenarios.

Method used

The esophageal video data is collected by the vein region acquisition module, the vein region is segmented using the U-Net segmentation model, and the static structure, short-term tension and long-term fatigue characteristics are analyzed by the vein region energy field analysis module to quantify the structural instability energy factor. The gray level, area and aggregation characteristics of the red region are obtained by the red feature analysis module to determine the degree of instability. The esophageal vein bleeding risk prediction module compares the difference between the evolution speed and the normal speed to provide early warning.

Benefits of technology

It enables a more accurate and refined quantitative assessment of the risk of esophageal venous bleeding, improves the accuracy of bleeding risk prediction, and provides clinicians with reliable preventive treatment options.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122737119B_ABST
    Figure CN122737119B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of venous hemorrhage risk prediction, in particular to an esophageal variceal hemorrhage risk prediction system for hepatitis B patients based on endoscopic images, which obtains the venous region of the esophagus through a venous region acquisition module; quantifies the structural instability energy factor of each pixel point in the venous region through a venous region energy field analysis module; determines the instability degree of the red feature region through a red feature analysis module; compares the difference between the current evolution speed of the hepatitis B patient and the normal evolution speed through an esophageal variceal hemorrhage risk prediction module, determines the instability abnormality degree of the red feature region of the current hepatitis B patient, and performs an esophageal variceal hemorrhage risk warning for the current hepatitis B patient. The present application can more accurately reflect the true instability state of the esophageal varices, and objectively and finely quantize the evaluation of the esophageal variceal hemorrhage risk, thereby providing a more reliable auxiliary decision basis for the clinician to develop a preventive treatment plan.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of venous bleeding risk prediction technology, specifically to a system for predicting the risk of esophageal venous bleeding in hepatitis B patients based on endoscopic images. Background Technology

[0002] When analyzing esophageal venous bleeding in hepatitis B patients using medical imaging, the identification and assessment of abnormal areas on tissue surfaces is a crucial research direction. For example, in images of the skin, oral mucosa, retina, or digestive tract lining, localized red areas are often considered important manifestations of pathological changes such as inflammation, congestion, or bleeding. Therefore, image analysis methods are frequently used in clinical testing to identify and quantitatively assess red areas. Existing technologies typically extract features of red areas through color thresholding, area statistics, or machine learning-based image recognition methods, and then determine the severity of the lesion based on its size, quantity, or distribution.

[0003] However, in real-world medical imaging scenarios, changes in abnormal red areas on tissue surfaces are not only reflected in apparent features such as color or area, but are also often closely related to changes in the surrounding tissue structure. For example, during the development of inflammation or bleeding, local tissue edges may experience morphological disturbances, subtle displacements, or structural fluctuations. These structural changes affect the aggregation pattern, diffusion direction, and stability of red areas. Furthermore, different patients differ in physiological indicators such as blood flow status, metabolic levels, or inflammatory response capacity, meaning that the risk level corresponding to the same morphologically changed red areas may vary significantly among different patients. Current techniques for analyzing red areas on tissue surfaces typically focus on single image features or static feature statistics, lacking a comprehensive analysis of the relationship between red areas and surrounding structural changes, as well as their temporal evolution. Therefore, in complex clinical scenarios, it is difficult to accurately reflect the development trend and potential risks of abnormal areas. Summary of the Invention

[0004] To address the above technical problems, this invention provides a system for predicting the risk of esophageal venous bleeding in hepatitis B patients based on endoscopic images.

[0005] The endoscopic image-based esophageal venous bleeding risk prediction system for hepatitis B patients provided in the embodiments of this application specifically includes: The vein region acquisition module is used to collect esophageal video data of the current hepatitis B patient, segment the esophageal video data, and obtain the vein region of the esophagus; The vein region energy field analysis module is used to analyze the static structural features, short-term tension features and long-term fatigue features of each pixel in the vein region, and to quantify the structural instability energy factor of each pixel in the vein region. The red feature analysis module is used to acquire red feature regions within the vein area, and, in conjunction with the structural instability energy factor, analyze the grayscale features, area features, and aggregation features of the red feature regions to determine the degree of instability of the red feature regions. The esophageal venous bleeding risk prediction module is used to obtain the evolution rate and acceleration of the instability of the red characteristic area of ​​the current hepatitis B patient based on the degree of instability, and to obtain the normal evolution rate based on historical hepatitis B patients. By comparing the difference between the evolution rate and the normal evolution rate, the module determines the degree of instability abnormality of the red characteristic area of ​​the current hepatitis B patient and provides an early warning of the esophageal venous bleeding risk of the current hepatitis B patient.

[0006] In some embodiments of the present invention, segmenting the esophageal video data to obtain the venous region of the esophagus includes: The esophageal video data is converted into an RGB image, input into a pre-trained U-Net segmentation model, and the output is a binary mask of the esophageal vein region; The binary mask of the vein region is converted into spatial coordinate information to obtain the coordinates of each pixel within the vein region of the esophagus.

[0007] In some embodiments of the present invention, the vein region energy field analysis module includes a static structural feature analysis unit, which is configured to: Based on the coordinates of each pixel within the vein region, for each pixel within the vein region, the pixels before and after it are taken to obtain the local curvature of each pixel within the vein region; Extract the central skeleton line of the vein region. Taking each pixel in the vein region as the starting point, the sum of the distances from the central skeleton line to the two edges of the vein region along the normal direction is used as the local diameter of the vein corresponding to each pixel in the vein region. Based on the local curvature and the local diameter of the vein, the structural stress index of each pixel within the vein region is obtained, which serves as the static structural feature of each pixel within the vein region.

[0008] In some embodiments of the present invention, the vein region energy field analysis module further includes a short-term tension characteristic analysis unit, which is configured to: Stable background feature points are selected from the esophageal video data to obtain the global motion translation vector; Based on the esophageal video data, the mean pixel displacement vector of each pixel in the venous region between two frames is obtained through an optical flow algorithm. Based on the mean pixel displacement vector and the global motion translation vector, the relative micro-motion vector of each pixel within the vein region is obtained; Based on the relative micro-motion vector, the short-term micro-motion energy of each pixel within the vein region is obtained, which serves as the short-term tension feature of each pixel within the vein region.

[0009] In some embodiments of the present invention, the vein region energy field analysis module further includes a long-term fatigue characteristic analysis unit, which is configured to: The historical short-term micro-motion energy of the corresponding pixels in the vein region during each follow-up of the current hepatitis B patient is obtained. By time weighting, the long-term cumulative energy of each pixel in the vein region is obtained as the long-term fatigue feature of each pixel in the vein region.

[0010] In some embodiments of the present invention, the grayscale characteristics, area characteristics, and aggregation characteristics of the red feature region are analyzed in conjunction with the structural instability energy factor to determine the degree of instability of the red feature region, including: Calculate the average gray value of the R channel within the red feature region, and use it as the gray value feature of the red feature region; The total number of pixels in the red feature region is counted and used as the area feature of the red feature region. Based on the area characteristics and the structural instability energy factor, the position weight of each pixel within the red feature region is determined. Within the red feature region, the Euclidean distance between each pixel and its neighboring pixels is calculated, and the clustering features of the red feature region are obtained by combining the position weights. The degree of instability of the red feature region is determined based on the grayscale features and the clustering features.

[0011] In some embodiments of the present invention, based on the degree of instability, the evolution rate and acceleration of the instability of the red characteristic region of the current hepatitis B patient are obtained, including: Calculate the difference in the degree of instability of the red characteristic area of ​​the current hepatitis B patient between the current and previous follow-up visits to obtain the change in the degree of instability of the red characteristic area of ​​the current hepatitis B patient; Obtain the time span between the current follow-up and the previous follow-up of the current hepatitis B patient, and combine the change amount to obtain the evolution rate of the instability of the red feature area of ​​the current hepatitis B patient; Based on the evolution rate and the time span, obtain the evolution acceleration of the degree of instability of the red characteristic region of the current hepatitis B patient.

[0012] In some embodiments of the present invention, obtaining the normal evolution rate based on historical hepatitis B patients includes: For hepatitis B patients in the database, clustering is performed based on physiological indicators, and the cluster to which the current hepatitis B patient belongs is used as the reference patient group; The average total change in the degree of instability of all red characteristic regions in all historical hepatitis B patients in the reference patient group at the first and last follow-up visits was calculated. Combined with the average total time span between the first and last follow-up visits of all historical hepatitis B patients in the reference patient group, the average evolution rate of the degree of instability of all red characteristic regions in all historical hepatitis B patients in the reference patient group was obtained as the normal evolution rate.

[0013] In some embodiments of the present invention, the degree of instability and abnormality of the red characteristic region in the current hepatitis B patient is determined by comparing the difference between the evolution rate and the normal evolution rate, including: Based on the normal evolution rate, and combined with the historical evolution rate of the instability of all red feature regions of each historical hepatitis B patient in the reference patient group, the dispersion of the historical evolution rate corresponding to the reference patient group is calculated. The difference between the evolution rate of the instability of the red feature region in the current hepatitis B patient and the normal evolution rate is calculated. Combined with the degree of dispersion, the degree of instability of the red feature region in the current hepatitis B patient is determined by the Z-score method.

[0014] In some embodiments of the present invention, a risk warning for esophageal venous bleeding in current hepatitis B patients is provided, including: Preset anomaly threshold; Determine whether the instability anomaly degree is greater than the anomaly degree threshold, and simultaneously determine whether the evolution acceleration is greater than 0; If all conditions are met, a warning is issued that the current hepatitis B patient has a high risk of esophageal venous bleeding, and the red characteristic area with high bleeding risk is marked.

[0015] Compared with existing technologies, the endoscopic image-based esophageal venous bleeding risk prediction system for hepatitis B patients provided by this invention has the following beneficial effects: This invention acquires esophageal video data from a current hepatitis B patient through a vein region acquisition module, segments the esophageal video data to obtain the esophageal vein region; analyzes the static structural features, short-term tension features, and long-term fatigue features of each pixel within the vein region through a vein region energy field analysis module, quantifying the structural instability energy factor of each pixel within the vein region; acquires red feature regions within the vein region through a red feature analysis module, and analyzes the grayscale features, area features, and aggregation features of the red feature regions in conjunction with the structural instability energy factor to determine the degree of instability of the red feature regions; and predicts the risk of esophageal venous bleeding through an esophageal venous bleeding risk module, based on the degree of instability, acquires the evolution rate and acceleration of the instability of the red feature regions in the current hepatitis B patient, and acquires the normal evolution rate based on historical hepatitis B patients, comparing the difference between the evolution rate and the normal evolution rate to determine the degree of instability abnormality of the red feature regions in the current hepatitis B patient, and providing a warning of the risk of esophageal venous bleeding in the current hepatitis B patient. This invention correlates the structural instability energy field of the venous region with the bleeding characteristics of the red feature region, effectively enhancing the risk contribution of the red feature in areas with higher structural instability energy factors. This allows for a more accurate reflection of the true instability state of the esophageal venous wall. Compared to existing methods that rely solely on the quantity or area of ​​red features for assessment, this invention comprehensively considers changes in venous structure, the distribution characteristics of red features, and their spatial aggregation, enabling a more objective and refined quantitative assessment of the risk of esophageal venous bleeding. This improves the accuracy of bleeding risk prediction and provides clinicians with a more reliable basis for developing preventive treatment plans. Attached Figure Description

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

[0017] Figure 1 A schematic diagram of the basic components of a risk prediction system for esophageal venous bleeding in hepatitis B patients based on endoscopic images, provided in one embodiment of the present invention; Figure 2 This is a schematic diagram of the basic components of another endoscopic image-based esophageal venous bleeding risk prediction system for hepatitis B patients, provided as an embodiment of the present invention. Detailed Implementation

[0018] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of the endoscopic image-based esophageal venous bleeding risk prediction system for hepatitis B patients proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. Terms such as “comprising,” “including,” or any other variations thereof are intended to cover a non-exclusive inclusion, such that a circuit structure, article, or device comprising a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such article or device. Without further limitation, an element defined by the phrase “comprising one…” does not exclude the presence of additional identical elements in the article or device that includes that element.

[0020] The following description, in conjunction with the accompanying drawings, details the specific scheme of the endoscopic image-based esophageal venous bleeding risk prediction system for hepatitis B patients provided by this invention.

[0021] Please see Figure 1 This illustrates the basic components of an endoscopic image-based system for predicting the risk of esophageal venous bleeding in hepatitis B patients, provided by an embodiment of the present invention.

[0022] like Figure 1 As shown in the figure, an embodiment of the present invention provides a risk prediction system for esophageal venous bleeding in hepatitis B patients based on endoscopic images. The system mainly includes a vein region acquisition module 1, a vein region energy field analysis module 2, a red feature analysis module 3, and an esophageal venous bleeding risk prediction module 4. Wherein: The vein region acquisition module 1 is used to collect esophageal video data from the current hepatitis B patient, segment the esophageal video data, and obtain the esophageal vein region. Specifically, the vein region acquisition module 1 is configured as follows: A high-definition medical endoscope (1920×1080 resolution, 25fps) was used to acquire continuous video of the lower esophageal veins of the current hepatitis B patient. The acquisition time was ≥10 seconds to ensure complete coverage of the vein's morphology and minute movements. Pre-existing continuous video of the lower esophageal veins of the current hepatitis B patient was then extracted to obtain the esophageal video data of the current hepatitis B patient.

[0023] Esophageal video data was converted into RGB images and input into a pre-trained U-Net segmentation model (the training dataset contains endoscopic images of esophageal veins from 1000 hepatitis B patients). The model outputs a binary mask of the esophageal vein region (in the binary mask, a value of 1 represents the vein region and 0 represents the background region). The binary mask of the vein region was converted into spatial coordinate information, and each pixel within the vein region was obtained. Two-dimensional coordinates The vein region is defined as the set of coordinates of all vein region pixels, thus obtaining the vein region of the esophagus of the current hepatitis B patient.

[0024] By connecting to the hospital's information system or electronic medical record system, physiological indicators such as Child-Pugh classification (diagnostic criteria for liver reserve function), HBV-DNA load, and prothrombin time (PT) of current hepatitis B patients can be obtained synchronously.

[0025] The vein region energy field analysis module 2 is used to analyze the static structural features, short-term tension features, and long-term fatigue features of each pixel within the vein region, and to quantify the structural instability energy factor of each pixel within the vein region. For example... Figure 2 As shown, the further vein region energy field analysis module 2 includes a static structural feature analysis unit 21, a short-term tension feature analysis unit 22, a long-term fatigue feature analysis unit 23, and a structural instability energy analysis unit 24, wherein: The static structural feature analysis unit 21 is configured to analyze the static structural features of each pixel within the vein region, further including: First, since the local curvature of the vein wall directly reflects the stress concentration of the vein wall, the greater the local curvature, the more obvious the stress concentration, which is a core static indicator of structural instability. Therefore, in some embodiments of the present invention, based on the coordinates of each pixel within the vein region, the local curvature of each pixel within the vein region is obtained by taking the pixels before and after it. Specifically, for each pixel within the vein region... The pixels that are 2 pixels apart are respectively and It should be noted that the preceding and following pixels refer to pixels along the direction of the vein wall (not the thickness direction). Therefore, the pixel calculation... The local curvature is:

[0026] In the formula, Represents pixels The local curvature; Represents pixels The x-coordinate value; Represents pixels The ordinate value; Represents pixels The x-coordinate value; Represents pixels The ordinate value; Represents pixels The x-coordinate value; Represents pixels The ordinate value.

[0027] By taking the pixel point Calculating the local curvature of pixels spaced two pixels apart can avoid the inaccuracy of reflecting local curvature changes when adjacent pixels are too close together, thus improving the accuracy of local curvature calculations.

[0028] Then, since local curvature alone cannot distinguish between, for example, slightly tortuous large veins and strongly tortuous small veins, and clinically, veins with smaller diameters are more prone to rupture, it is necessary to introduce diameter for structural scale correction. Therefore, in some embodiments of the present invention, the central skeleton line of the vein region is extracted, and the sum of the distances from each pixel point within the vein region to the two edges of the vein region along the normal direction of the central skeleton line is taken as the local diameter of the vein corresponding to each pixel point within the vein region. Specifically, the central skeleton line of the vein region is extracted based on the minimum cost path method, which is existing technology and will not be elaborated here; the distances from each pixel point within the vein region to the central skeleton line are taken as the local diameter of the vein. Starting from the central skeleton line, the sum of the distances to the two edges of the vein region along the normal direction is taken as the pixel points within the vein region. The corresponding local diameter of the vein is denoted as .

[0029] Finally, based on the local curvature and local diameter of the vein, the structural stress index of each pixel within the vein region is obtained, serving as the static structural feature of each pixel within the vein region. Specifically, the local curvature of the vein region is calculated using the three-point method to quantify the stress concentration degree of the vein wall, and the local curvature... The larger the diameter, the greater the structural stress index; as a complementary indicator of curvature, the diameter reflects the local variations in the thickness of the vein. The smaller the value, the greater the structural stress index; thus, the pixel points within the vein region are obtained. The formula for calculating the structural stress index is:

[0030] In the formula, Represents pixels within the vein area Structural stress index; Represents pixels The local curvature; Represents pixels The local diameter of the vein.

[0031] The greater the local curvature and the smaller the local diameter of the vein, the higher the corresponding structural stress index, indicating the degree of stress concentration generated by the vein structure itself.

[0032] Similarly, the structural stress index of each pixel within the vein region is obtained as the static structural feature of each pixel within the vein region.

[0033] The micro-motions in the venous region between esophageal video data frames reflect the dynamic tension changes of the venous wall. The greater the amplitude of the micro-motion, the higher the tension of the venous wall and the greater the risk of short-term instability. When the pressure of the venous wall increases, the venous wall will produce subtle periodic fluctuations. These fluctuations are manifested in the endoscopic video as tiny displacements of pixels in the venous region. The larger the tiny displacement, the more intense the micro-motions are, indicating that the wall tension is higher.

[0034] Based on the above analysis, the short-term tension feature analysis unit 22 is configured to: analyze the short-term tension features of each pixel within the vein region, that is, analyze the micro-motion of each pixel within the vein region between two frames of esophageal video data, further including: First, stable background feature points are selected from the esophageal video data to obtain the global motion translation vector. Specifically, the SIFT (Scale-Invariant Feature Transform) algorithm is used to obtain feature points in the esophageal video data image, and stable background feature points (with a value of 0 in the binary mask) are selected from the background region of the esophageal video data. When selecting stable background feature points, they need to be far away from the vein region to prevent the vein region from covering the feature point after slight movement. In addition, pixels in the middle position of the entire esophageal video data image should be selected as much as possible. Using the optical flow algorithm, the average displacement vector of the stable background feature point between all adjacent frames is calculated as the global motion translation vector of the esophageal video data.

[0035] Then, based on the esophageal video data, the average pixel displacement vector of each pixel within the vein region between two adjacent frames is obtained using an optical flow algorithm. Specifically, based on the esophageal video data, the pixel displacement vector of each pixel within the vein region between all two adjacent frames is obtained using an optical flow algorithm; this is an existing technique and will not be elaborated here. Then, the average pixel displacement vector of each pixel within the vein region between all two adjacent frames is calculated.

[0036] Furthermore, based on the mean pixel displacement vector and the global motion translation vector, the relative micro-motion vector of each pixel within the vein region is obtained. Specifically, the global motion translation vector is subtracted from the mean pixel displacement vector of each pixel within the vein region to eliminate background motion interference caused by endoscope shaking, patient breathing, and heartbeat conduction, thus obtaining the true relative micro-motion vector of each pixel within the vein region.

[0037] Finally, based on the relative micro-motion vector, the short-term micro-motion energy of each pixel within the vein region is obtained, serving as the short-term tension feature of each pixel within the vein region. Specifically, by using the squared displacement as energy, the minute motions of the vein region are converted into a tension energy index, quantifying the short-term dynamic tension changes of the vein wall. Thus, the pixel within the vein region... The formula for calculating short-term micro-motion energy is:

[0038] In the formula, Represents pixels within the vein area Short-term micro-motion energy; Represents pixels within the vein area The magnitude of the relative micro-motion vector.

[0039] Similarly, the short-term micro-motion energy of each pixel within the vein region is obtained as the short-term tension feature of each pixel within the vein region.

[0040] Venous wall rupture is not an instantaneous event but rather a result of long-term venous hypertension, i.e., venous wall structural fatigue. This fatigue accumulates over time, therefore, it is necessary to assess long-term structural damage using esophageal video data from multiple follow-ups. The cumulative energy of short-term micromotion in multiple follow-ups reflects long-term fatigue damage to the venous wall; the higher the cumulative energy, the lower the structural strength of the venous wall.

[0041] Based on the above analysis, the long-term fatigue feature analysis unit 23 is configured to: analyze the long-term fatigue features of each pixel within the venous region, that is, calculate the short-term micro-motion energy accumulation corresponding to multiple follow-up esophageal video data, further including: The historical short-term micromotion energy of corresponding pixels within the venous region from each follow-up of the current hepatitis B patient is obtained. Through time weighting, the long-term cumulative energy of each pixel within the venous region is obtained as the long-term fatigue feature of each pixel within the venous region. Specifically, the venous region pixels of the current hepatitis B patient are registered with those of the venous region pixels acquired in previous follow-ups using a nonlinear transformation (such as thin-plate splines or free deformation models), allowing for non-rigid adjustment of local pixels, to obtain the corresponding pixels of the venous region pixels of the current hepatitis B patient in the venous region acquired in previous follow-ups; thus, the historical short-term micromotion energy data of the corresponding pixels within the venous region of the current hepatitis B patient from each follow-up are obtained. ( (Representing the total number of follow-up visits), historical short-term micro-motion energy is weighted using a time-weighted method, meaning that more recent follow-up data has a greater impact on the current fatigue state, with weights... ( Indicates the first (Follow-up visits), thus, by time-weighted fusion of historical short-term micro-motion energy from each follow-up visit, the long-term fatigue accumulation of the vein wall is quantified, and pixel points within the vein region are obtained. The formula for calculating long-term cumulative energy is:

[0042] In the formula, Represents pixels within the vein area Long-term accumulated energy; Indicates the first Time weighting of each follow-up visit; Indicates the first Pixels in the vein area during the second follow-up Short-term micro-motion energy; This indicates the total number of follow-up visits. The structural instability energy analysis unit 24 is configured as follows: After obtaining the static structural features, short-term tension features, and long-term fatigue features of each pixel within the vein region, the structural instability energy factor of each pixel within the vein region is quantified. Specifically, based on the instability process of structural stress leading to short-term tension, resulting in long-term fatigue, and based on the structural instability mechanism that "increased short-term micro-motion energy reflects increased vein wall tension, and long-term accumulated energy reflects wall fatigue damage," short-term micro-motion energy and long-term accumulated energy are integrated, combined with static structural features (structural stress index), to construct a dynamic structural energy field and quantify the dynamic instability trend of the vein wall. That is, structural instability is the result of the combined effects of static structural features, short-term tension features, and long-term fatigue features; these three need to be integrated into a spatially distributed energy field, thereby quantifying the pixel factors within the vein region. The formula for calculating the structural instability energy factor is:

[0043] In the formula, Represents pixels within the vein area Structural instability energy factor; Represents pixels within the vein area Structural stress index; Represents pixels within the vein area Short-term micro-motion energy; Represents pixels within the vein area Long-term accumulated energy; This represents a linear normalization function, such as a max-min normalization function, used to normalize the numerical value of structural instability energy to... Within the range, the maximum and minimum values ​​in the maximum-minimum normalization function are determined based on the extreme values ​​of typical case samples calculated from a pre-set clinical experience database.

[0044] Red Feature Analysis Module 3 is used to acquire red feature regions within the vein area, and combined with the structural instability energy factor, analyze the grayscale features, area features, and aggregation features of the red feature regions to determine the degree of instability of the red feature regions.

[0045] In the development of esophageal varices, red marks typically appear in the areas where the vein walls are weakest and most stressed, representing an important clinical sign of impending rupture. However, not all areas with red marks carry the same risk of bleeding. The degree of danger is closely related to the structural state of the vein region where the red mark is located. Specifically, when a red mark is located in an area with a high energy field of structural instability, it indicates that the area exhibits both stress concentration in the vein wall structure and signs of localized bleeding. The combined effect of these two factors significantly increases the probability of bleeding.

[0046] Therefore, based on the synergistic mechanism that "red features contribute more to the risk of bleeding when located in high structural instability energy fields," the position of red features can be modulated using the structural instability energy field as a spatial constraint. This amplifies the contribution of red features in high structural instability energy regions, thereby constructing a red feature instability degree that reflects the synergistic effect of "structural instability-bleeding signs." Specifically, multi-dimensional features of the red feature region can be extracted and weighted based on the structural instability energy factor where the red feature is located, quantifying the coupling effect between bleeding and structural instability in the red feature region.

[0047] Based on the above analysis, in this embodiment of the invention, a red feature analysis module 3 is set up to acquire red feature regions within the vein area. Combined with the structural instability energy factor, the grayscale characteristics, area characteristics, and aggregation characteristics of the red feature regions are analyzed to determine the degree of instability of the red feature regions. Further, the red feature analysis module 3 is configured as follows: The specific implementation method for obtaining the red feature area within the vein region is as follows: The esophageal video data was converted to HSV space. The red features corresponded to the regions H∈[0,10]∪[160,180], S∈[40,255], and V∈[50,255], generating a binary mask for the red features. An opening operation (erosion + dilation) was performed on the binary mask to remove false red regions (such as food residue and mucosal red dots). Connectivity analysis was used to extract the coordinate set of each red feature region. Since the red feature regions overlapped with the vein regions, the intersection of the binary mask of the vein region and the binary mask of the red features was used to determine multiple valid red feature regions, resulting in a precise spatial distribution of the red features.

[0048] The grayscale, area, and aggregation characteristics of red characteristic regions directly reflect the activity level of bleeding and are core biomarkers for bleeding risk. Therefore, after obtaining the red characteristic regions within the venous area, the grayscale, area, and aggregation characteristics of these regions are analyzed in conjunction with structural instability energy factors to determine the degree of instability. Further analysis includes: First, the average gray value of the R channel within each red feature area is calculated as the gray value feature of each red feature area, reflecting the depth of the blood oozing in the red feature area. The color depth reflects the blood concentration.

[0049] At the same time, the total number of pixels in each red feature area is counted as the area feature of each red feature area, reflecting the extent of bleeding in the red feature area. The total number of pixels in the red feature area reflects the extent of bleeding.

[0050] Furthermore, since the structural instability energy factor of pixels within the vein region represents the spatial location of the vein wall... The degree of instability at the point, when the first Pixels in the red feature area When located in a region of high structural instability energy, it indicates that structural instability and localized bleeding coexist. Therefore, based on area characteristics and the structural instability energy factor, the positional weight of each pixel within the red feature region is determined. Specifically, for the... Pixels in the red feature region Extract its corresponding structural instability energy factor Then, based on the obtained structural instability energy factor and that pixel The area information of the red feature region is used to obtain the location weight index of its influence on the instability intensity in subsequent calculations of clustering characteristics; that is, the first Pixels within the red feature area The position weights are:

[0051] In the formula, Indicates the first Pixels within the red feature area Position weight; Indicates the first Pixels within the red feature area Structural instability energy factor; Represents pixels The first The area of ​​each red feature region; This represents a linear normalization function, such as a max-min normalization function, used to... Numerical normalization to Within the range, the maximum and minimum values ​​in the maximum-minimum normalization function are determined based on the extreme values ​​of typical case samples calculated from a pre-set clinical experience database.

[0052] The larger the area of ​​the red feature region, the more likely it is to be a pixel The more obvious the bleeding area is within the red feature region, the more pronounced the bleeding becomes; at the same time, the pixel... The larger the structural instability energy factor, the more vulnerable the blood vessel wall, and the more significant the hemorrhage effect.

[0053] Next, within the red feature region, the Euclidean distance between each pixel and its neighboring pixels is calculated. Combined with positional weights, the clustering features of the red feature region are obtained. Specifically, in the... Within the red feature area, for the first Pixels within the red feature area , search for its first Calculate the nearest neighbor pixels and the pixel value. The distance to its nearest neighbor pixel is:

[0054] In the formula, Represents pixels With the The nearest neighbor pixel The distance; Represents pixels The x-coordinate value; Represents pixels The ordinate value; Indicates the first The nearest neighbor pixel The x-coordinate value; Indicates the first The nearest neighbor pixel The ordinate value.

[0055] Furthermore, the formula for calculating the degree of clustering of the red feature regions is:

[0056] In the formula, Indicates the first The degree of clustering of the red characteristic regions; Represents the pixels within the red feature area Position weight; Represents pixels With the The nearest neighbor pixel The distance; This represents the preset number of nearest neighbor pixels, with a value range of [value range missing]. If the first The total number of pixels extracted from the red feature regions is less than If so, it is calculated based on the actual number of pixels; Indicates the first The total number of pixels within each red feature region; This represents a linear normalization function, such as a max-min normalization function, used to normalize aggregated values ​​to... Within this range, the maximum and minimum values ​​in the maximum-minimum normalization function are determined based on the extreme values ​​of typical case samples calculated from a pre-set clinical experience database; This represents the denominator correction parameter, which has the same dimensions as the denominator and takes the smallest value greater than 0. This is to prevent the denominator from being 0; for example, it can be set... This can prevent the denominator from being zero without significantly interfering with the calculation of normal standardized change values.

[0057] The degree of clustering of red feature regions is used as the clustering feature of red feature regions.

[0058] Finally, based on grayscale and clustering characteristics, the degree of instability of the red feature region is determined. Specifically, the formula for calculating the degree of instability of the red feature region is:

[0059] In the formula, Indicates the first The degree of instability of the red characteristic areas; Indicates the first The degree of clustering of the red characteristic regions; Indicates the first The average gray value of the R channel within each red feature area; This represents a linear normalization function, such as a max-min normalization function, used to normalize the instability values ​​to a normal value. Within the range, the maximum and minimum values ​​in the maximum-minimum normalization function are determined based on the extreme values ​​of typical case samples calculated from a pre-set clinical experience database.

[0060] The influence of bleeding concentration (average gray value) is adjusted by using the spatial distribution (degree of aggregation) as a weight. The denser the spatial distribution and the darker the abnormal color, the more severe the instability.

[0061] Based on the clinical mechanism that "the synergistic effect of structural instability and red characteristic bleeding is the direct cause of hemorrhage," the coupled instability degree was obtained by fusing the structural instability energy field and weighted red characteristics. A time series of the instability degree was then generated based on follow-up data, providing a foundation for subsequent evolutionary analysis.

[0062] The esophageal venous bleeding risk prediction module 4 is used to obtain the evolution rate and acceleration of the instability of the red characteristic area of ​​the current hepatitis B patient based on the degree of instability, and to obtain the normal evolution rate based on historical hepatitis B patients. By comparing the difference between the evolution rate and the normal evolution rate, the abnormal degree of instability of the red characteristic area of ​​the current hepatitis B patient is determined, and the risk of esophageal venous bleeding of the current hepatitis B patient is given early warning.

[0063] Patients with similar physiological indicators exhibit similar rates of change in the instability of the red characteristic area of ​​the vein, which can serve as a benchmark for individual risk. Therefore, in this embodiment of the invention, an esophageal venous bleeding risk prediction module 4 is included. This module is used to obtain the rate and acceleration of change of the instability of the red characteristic area in the current hepatitis B patient, and to obtain the normal rate of change based on historical hepatitis B patients. By comparing the difference between the normal and historical rates of change, the module determines the degree of instability abnormality of the red characteristic area in the current hepatitis B patient, thus providing an early warning of the esophageal venous bleeding risk in the current hepatitis B patient. Wherein: Based on the degree of instability, the evolution rate and acceleration of the instability of the red characteristic area in the current hepatitis B patient are obtained, further including: First, based on the corresponding pixels of the vein region acquired in the current follow-up of the current hepatitis B patient and the corresponding pixels of the vein region acquired in previous follow-ups, the red feature region of the current hepatitis B patient in the current follow-up is obtained from the red feature region corresponding to the previous follow-up. The difference in the degree of instability of the red feature region of the current hepatitis B patient between the current and previous follow-ups is calculated to obtain the change in the degree of instability of the red feature region of the current hepatitis B patient. Simultaneously, the time span between the current and previous follow-ups of the current hepatitis B patient is obtained, and combined with the change, the evolution rate of the degree of instability of the red feature region of the current hepatitis B patient is obtained. Specifically, the formula for calculating the evolution rate of the degree of instability of the red feature region of the current hepatitis B patient is as follows:

[0064] In the formula, This indicates the current number of hepatitis B patients. The rate of evolution of the instability of each red characteristic region; Indicates the current follow-up period The degree of instability of the red characteristic areas; The red feature area represents the area corresponding to the previous follow-up and the current follow-up (the first follow-up). The degree of instability of the red characteristic area (if the red characteristic area in the current follow-up did not exist in the previous follow-up, then let ; Indicates the time of the current follow-up visit; Indicates the time since the last follow-up visit (unit: days).

[0065] Then, based on the evolution speed and time span, the evolutionary acceleration of the instability of the red characteristic region in the current hepatitis B patient is obtained. Specifically, the evolutionary acceleration of the instability of the red characteristic region in the current hepatitis B patient is... The formula for calculating the evolutionary acceleration of the instability degree of each red feature region is as follows:

[0066] In the formula, This indicates the current number of hepatitis B patients. The acceleration of the evolution of the instability of each red characteristic region; This indicates the current number of hepatitis B patients. The rate of evolution of the instability of each red characteristic region; This indicates that the current hepatitis B patient was at the last follow-up visit. The evolution rate of the instability of each red feature region, if the red feature region in the current follow-up did not exist in the previous follow-up, then let .

[0067] The evolution speed of the instability degree of individual red characteristic areas reflects the speed of change in the current instability risk, and the evolution acceleration reflects the steepness of the change trend. A positive acceleration indicates that the instability risk is rising faster.

[0068] Based on historical hepatitis B patients, the normal evolution rate was obtained, further including: First, for hepatitis B patients in the database, clustering is performed based on physiological indicators, and the cluster to which the current hepatitis B patient belongs is used as the reference patient group. The specific implementation method is as follows: Because physiological indicators such as Child-Pugh classification, HBV load, and prothrombin time have a macroscopic constraint on the evolution rate of the venous surface state, physiological indicators from 1000 hepatitis B patients in the database were collected: Child-Pugh classification (1-15 points), HBV load (log...). 10 The three physiological indicators (copy number) and prothrombin time (PT, seconds) were standardized to eliminate dimensional differences.

[0069] Since the K-Means clustering algorithm can quickly group hepatitis B patients with similar physiological indicators to obtain groups with similar evolutionary characteristics, the standardized physiological indicators of hepatitis B patients are input into the K-Means clustering model. The number of clusters K=5 (determined according to the distribution of clinical data) is set to obtain 5 clusters, that is, 5 patient groups with similar physiological indicators. The center of each cluster is obtained. Existing technology is used, and will not be elaborated here.

[0070] Based on the Euclidean distance from the current hepatitis B patient's physiological indicators (Child-Pugh classification, HBV load, prothrombin time) to the five cluster centers, the cluster closest to the current hepatitis B patient's physiological indicators is selected as the cluster to which the current hepatitis B patient belongs, and the cluster to which the current hepatitis B patient belongs is used as the reference patient group.

[0071] Then, the average total change in the degree of instability of all red characteristic areas in all historical hepatitis B patients within the reference patient group was calculated at the first and last follow-up visits. Combined with the average total time span between the first and last follow-up visits for all historical hepatitis B patients within the reference patient group, the average evolution rate of the degree of instability of all red characteristic areas in all historical hepatitis B patients within the reference patient group was obtained, and this was taken as the normal evolution rate. Specifically, the formula for calculating the average evolution rate of the degree of instability of all red characteristic areas in all historical hepatitis B patients within the reference patient group is as follows:

[0072] In the formula, This represents the average rate of evolution of the instability of all red characteristic regions in all historical hepatitis B patients within the reference patient group; Indicates the reference patient group within the first The first patient with a history of hepatitis B. The degree of instability corresponding to each red characteristic area at the first follow-up; Indicates the reference patient group within the first The first patient with a history of hepatitis B. The degree of instability of each red feature area at the last follow-up; Indicates the reference patient group within the first The time corresponding to the first follow-up of a historical hepatitis B patient; Indicates the reference patient group within the first The time corresponding to the last follow-up of a historical hepatitis B patient; This indicates the total number of patients with a history of hepatitis B within the reference patient group; This indicates the total number of red characteristic areas for each historical hepatitis B patient within the reference patient group.

[0073] This represents the average total change in the degree of instability of all red characteristic areas in all historical hepatitis B patients within the reference patient group at the first and last follow-up visits. This represents the average total time span between the first and last follow-up visits for all historical hepatitis B patients within the reference patient group. The average evolution rate of the reference patient group is calculated as a baseline for risk evolution of patients under this physiological state.

[0074] When the evolution rate of an individual (current hepatitis B patient) is significantly higher than the risk evolution benchmark of the population and accelerates, it indicates that the structural vulnerability is rapidly increasing and the patient is about to enter the bleeding stage. That is, by measuring the degree of deviation between the individual's evolution rate and the population's risk evolution benchmark, and combining the evolution acceleration, we can determine whether the current hepatitis B patient has entered a high bleeding risk stage.

[0075] Therefore, by comparing the difference between the evolution rate and the normal evolution rate, the degree of instability and abnormality of the red characteristic region in current hepatitis B patients can be determined, further including: First, based on the normal evolution rate and the historical evolution rate of the instability of all red characteristic regions for each historical hepatitis B patient within the reference patient group, the dispersion of the historical evolution rate corresponding to the reference patient group is calculated. Specifically, based on the normal evolution rate and the historical evolution rate of the instability of all red characteristic regions for each historical hepatitis B patient within the reference patient group, the standard deviation of the historical evolution rate corresponding to the reference patient group is calculated. The standard deviation reflects the dispersion of the historical evolution rate within the reference patient group.

[0076] Then, the difference between the evolution rate of the instability of the red characteristic region in the current hepatitis B patient and the normal evolution rate is calculated. Combined with the degree of dispersion, the Z-score method is used to determine the degree of instability and abnormality of the red characteristic region in the current hepatitis B patient. Specifically, the formula for calculating the degree of instability and abnormality of the red characteristic region in the current hepatitis B patient is as follows:

[0077] In the formula, This indicates the current number of hepatitis B patients. The degree of instability anomaly in each red feature region; This indicates the current number of hepatitis B patients. The rate of evolution of the instability of each red characteristic region; This represents the average rate of evolution of the instability of all red characteristic regions in all historical hepatitis B patients within the reference patient group; This represents the standard deviation of the historical evolution rate corresponding to the reference patient group, i.e., the degree of dispersion of the historical evolution rate corresponding to the reference patient group. This represents the denominator correction parameter, which has the same dimensions as the denominator and takes the smallest value greater than 0. This is to prevent the denominator from being 0; for example, it can be set... This can prevent the denominator from being zero without significantly interfering with the calculation of normal standardized change values.

[0078] The Z-score measures the degree to which an individual's evolutionary rate deviates from a population baseline. This indicates that the individual's evolution rate is significantly higher than the population baseline (exceeding 95% of the population range).

[0079] To provide early warning of esophageal venous bleeding risk in current hepatitis B patients, further measures include: First, a preset anomaly threshold is set, usually to 2.

[0080] Then, determine whether the degree of instability anomaly is greater than the anomaly threshold, and at the same time determine whether the evolution acceleration is greater than 0; If both conditions are met, that is and (Positive evolutionary acceleration, faster risk escalation) indicates that the evolutionary rate of the red characteristic area on the esophageal vein in current hepatitis B patients is significantly higher than the population baseline, and the risk escalation rate is faster. This suggests that the evolutionary rate of the red characteristic area on the esophageal vein in current hepatitis B patients has entered an accelerated and unstable phase. Therefore, the system outputs a "Local Surface Structure Abnormality Warning" and marks red characteristic areas with high bleeding risk, while also outputting the degree of instability. Numerical and population baseline comparison data (average evolution rate) Standard deviation of historical evolution rate The data includes an evolution trend chart (an evolution trend chart of the instability anomalies corresponding to each follow-up data) as a data reference for auxiliary detection.

[0081] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0082] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

Claims

1. A system for predicting the risk of esophageal venous bleeding in hepatitis B patients based on endoscopic images, characterized in that, The system includes: The vein region acquisition module is used to collect esophageal video data of the current hepatitis B patient, segment the esophageal video data, and obtain the vein region of the esophagus; The vein region energy field analysis module is used to analyze the static structural features, short-term tension features and long-term fatigue features of each pixel in the vein region, and to quantify the structural instability energy factor of each pixel in the vein region. The red feature analysis module is used to acquire red feature regions within the vein area, and, in conjunction with the structural instability energy factor, analyze the grayscale features, area features, and aggregation features of the red feature regions to determine the degree of instability of the red feature regions. The esophageal venous bleeding risk prediction module is used to obtain the evolution rate and acceleration of the instability of the red feature area of ​​the current hepatitis B patient based on the degree of instability, and to obtain the normal evolution rate based on historical hepatitis B patients. By comparing the difference between the evolution rate and the normal evolution rate, the module determines the degree of instability abnormality of the red feature area of ​​the current hepatitis B patient and provides an early warning of the bleeding risk of the esophageal vein of the current hepatitis B patient. The vein region energy field analysis module includes a static structural feature analysis unit, which is configured as follows: Based on the coordinates of each pixel within the vein region, for each pixel within the vein region, the pixels before and after it are taken to obtain the local curvature of each pixel within the vein region; Extract the central skeleton line of the vein region. Taking each pixel in the vein region as the starting point, the sum of the distances from the central skeleton line to the two edges of the vein region along the normal direction is used as the local diameter of the vein corresponding to each pixel in the vein region. Based on the local curvature and the local diameter of the vein, the structural stress index of each pixel in the vein region is obtained, which serves as the static structural feature of each pixel in the vein region. The vein region energy field analysis module also includes a short-term tension characteristic analysis unit, which is configured as follows: Stable background feature points are selected from the esophageal video data to obtain the global motion translation vector; Based on the esophageal video data, the mean pixel displacement vector of each pixel in the vein region between two adjacent frames is obtained through an optical flow algorithm. Based on the mean pixel displacement vector and the global motion translation vector, the relative micro-motion vector of each pixel within the vein region is obtained; Based on the relative micro-motion vector, the short-term micro-motion energy of each pixel in the vein region is obtained, which is used as the short-term tension feature of each pixel in the vein region. The vein region energy field analysis module also includes a long-term fatigue characteristic analysis unit, which is configured as follows: The historical short-term micro-motion energy of the corresponding pixels in the vein region during each follow-up of the current hepatitis B patient is obtained. By time weighting, the long-term cumulative energy of each pixel in the vein region is obtained as the long-term fatigue feature of each pixel in the vein region. Quantify pixels within the vein area The formula for calculating the structural instability energy factor is: In the formula, Represents pixels within the vein area Structural instability energy factor; Represents pixels within the vein area Structural stress index; Represents pixels within the vein area Short-term micro-motion energy; Represents pixels within the vein area Long-term accumulated energy; Represents a linear normalization function; Based on the structural instability energy factor, the grayscale characteristics, area characteristics, and aggregation characteristics of the red feature region are analyzed to determine the degree of instability of the red feature region, including: Calculate the average gray value of the R channel within the red feature region, and use it as the gray value feature of the red feature region; The total number of pixels in the red feature region is counted and used as the area feature of the red feature region. Based on the area characteristics and the structural instability energy factor, the position weight of each pixel within the red feature region is determined. Within the red feature region, the Euclidean distance between each pixel and its neighboring pixels is calculated, and the clustering features of the red feature region are obtained by combining the position weights. The degree of instability of the red feature region is determined based on the grayscale features and the clustering features.

2. The endoscopic image-based esophageal venous bleeding risk prediction system for hepatitis B patients according to claim 1, characterized in that, The esophageal video data is segmented to obtain the venous region of the esophagus, including: The esophageal video data is converted into an RGB image, input into a pre-trained U-Net segmentation model, and the output is a binary mask of the esophageal vein region; The binary mask of the vein region is converted into spatial coordinate information to obtain the coordinates of each pixel within the vein region of the esophagus.

3. The endoscopic image-based esophageal venous bleeding risk prediction system for hepatitis B patients according to claim 1, characterized in that, Based on the degree of instability, the evolution rate and acceleration of the instability of the red characteristic region in the current hepatitis B patient are obtained, including: Calculate the difference in the degree of instability of the red characteristic area of ​​the current hepatitis B patient between the current and previous follow-up visits to obtain the change in the degree of instability of the red characteristic area of ​​the current hepatitis B patient; Obtain the time span between the current follow-up and the previous follow-up of the current hepatitis B patient, and combine the change amount to obtain the evolution rate of the instability of the red feature area of ​​the current hepatitis B patient; Based on the evolution rate and the time span, obtain the evolution acceleration of the degree of instability of the red characteristic region of the current hepatitis B patient.

4. The endoscopic image-based esophageal venous bleeding risk prediction system for hepatitis B patients according to claim 3, characterized in that, Based on historical hepatitis B patients, the normal evolution rate was obtained, including: For hepatitis B patients in the database, clustering is performed based on physiological indicators, and the cluster to which the current hepatitis B patient belongs is used as the reference patient group; The average total change in the degree of instability of all red characteristic regions in all historical hepatitis B patients in the reference patient group at the first and last follow-up visits was calculated. Combined with the average total time span between the first and last follow-up visits of all historical hepatitis B patients in the reference patient group, the average evolution rate of the degree of instability of all red characteristic regions in all historical hepatitis B patients in the reference patient group was obtained as the normal evolution rate.

5. The endoscopic image-based esophageal venous bleeding risk prediction system for hepatitis B patients according to claim 4, characterized in that, By comparing the difference between the evolution rate and the normal evolution rate, the degree of instability and abnormality of the red characteristic region in the current hepatitis B patient is determined, including: Based on the normal evolution rate, and combined with the historical evolution rate of the instability of all red feature regions of each historical hepatitis B patient in the reference patient group, the dispersion of the historical evolution rate corresponding to the reference patient group is calculated. The difference between the evolution rate of the instability of the red feature region in the current hepatitis B patient and the normal evolution rate is calculated. Combined with the degree of dispersion, the degree of instability of the red feature region in the current hepatitis B patient is determined by the Z-score method.

6. The endoscopic image-based esophageal venous bleeding risk prediction system for hepatitis B patients according to claim 5, characterized in that, To provide early warning of esophageal venous bleeding risk in current hepatitis B patients, including: Preset anomaly threshold; Determine whether the instability anomaly degree is greater than the anomaly degree threshold, and simultaneously determine whether the evolution acceleration is greater than 0; If all conditions are met, a warning is issued that the current hepatitis B patient has a high risk of esophageal venous bleeding, and the red characteristic area with high bleeding risk is marked.

Citation Information

Patent Citations

  • Method and equipment for monitoring lower limb vein deformation and blood flow based on M-type ultrasonic technology

    CN120983076A

  • OCTA retina microvessel branch angle automatic extraction and uveitis vascular leakage risk prediction method and system based on deep learning and principal component analysis

    CN122453700A