A method, device, equipment and storage medium for selecting an anastomosis device

Through pressure sensor pressure measurement and ultrasonic image processing, combined with the detection of the esophageal end image intraoperatively, the esophageal end diameter is dynamically adjusted and the target stapler is determined, which solves the problem of difficulty in selecting the stapler diameter in esophageal cancer surgery and improves the accuracy and efficiency of stapler selection.

CN119367050BActive Publication Date: 2025-04-01THE SIXTH AFFILIATED HOSPITAL OF SUN YAT SEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411943397.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-01
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

In esophageal cancer resection, it is difficult to choose a suitable stapler diameter, which leads to difficulty in anastomosis, does not conform to the patient's physiological structure, increases the risk of anastomosis failure, and prolongs the operation time and wastes medical resources.

Method used

Through the esophageal pressure measurement based on the pressure sensor, the pressure wave intensity, frequency and propagation speed are calculated, and input into the expansion coefficient calculation model to obtain the first esophageal dilation coefficient; at the same time, the esophageal ultrasonic images under different esophageal states are obtained, image edge processing is performed, and the second esophageal dilation coefficient is calculated; combined with the detection of the intraoperative esophageal end diagram, the esophageal end diameter is dynamically adjusted to determine the target stapler.

Benefits of technology

The accuracy of stapler selection is improved, so that the selection of stapler is more consistent with the actual esophageal status of the patient, and the problems of poor anastomosis or waste of materials caused by inappropriate stapler are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119367050B_ABST
    Figure CN119367050B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and storage medium for selecting a stapler. The method calculates the pressure wave intensity, pressure wave frequency and pressure wave propagation speed based on the pressure signal data of the user's esophagus and inputs them into the expansion coefficient calculation model to output a first esophageal expansion coefficient. The user's esophageal ultrasonic images under different esophageal states are input into a pre-trained ultrasonic image detection model for image edge processing to output the esophageal diameter under different esophageal states for calculating a second esophageal expansion coefficient. The intraoperative esophageal end image is subjected to image detection processing based on the image detection model to obtain the user's esophageal end diameter. The esophageal end diameter is dynamically adjusted based on the weighted esophageal expansion coefficient obtained by weighting the first esophageal expansion coefficient and the second esophageal expansion coefficient to obtain and determine the target stapler based on the dynamic esophageal end diameter. Compared with the prior art, the technical solution of the present invention can improve the accuracy of stapler selection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image processing, and in particular to a method, device, equipment and storage medium for selecting a stapler. Background Art

[0002] In esophagectomy, restoring the continuity of the esophagus usually depends on the use of a stapler. As a disposable medical device, the selection of the model and diameter of the stapler is crucial to the success of the operation. Staplers are available in a variety of diameters, and the selection of a specific model usually depends on the surgeon's clinical experience.

[0003] However, in actual operation, if the diameter of the selected stapler is too large, it may cause anastomosis difficulties or not conform to the patient's physiological structure, thereby increasing the risk of anastomosis failure; once it is found that the stapler diameter is too large to be used, it must be removed and replaced, which not only increases the difficulty and risk of the operation, but also leads to prolonged operation time and a large waste of medical resources, especially the high cost of staplers; therefore, how to accurately select the appropriate model of stapler has become a key technical problem in current esophageal cancer surgery. Summary of the invention

[0004] The technical problem to be solved by the present application is to provide a method, device, equipment and storage medium for selecting a stapler to improve the accuracy of selecting a stapler.

[0005] In order to solve the above technical problems, the present application provides a method for selecting a stapler, including: performing esophageal pressure measurement on the user based on a pressure sensor to obtain esophageal pressure signal data, calculating the pressure wave intensity, pressure wave frequency and pressure wave propagation speed based on the pressure signal data, and inputting the pressure wave intensity, the pressure wave frequency and the pressure wave propagation speed into a pre-trained expansion coefficient calculation model so that the expansion coefficient calculation model outputs a first esophageal expansion coefficient; obtaining esophageal ultrasonic images of the user in different esophageal states, and inputting the esophageal ultrasonic images into a pre-trained ultrasonic image detection model respectively, so that the ultrasonic image detection model can detect the esophageal state. The esophageal ultrasonic image is processed by image edge processing, and the esophageal diameter corresponding to each of the esophageal ultrasonic images under different esophageal states is output, and a second esophageal dilation coefficient is calculated based on the esophageal diameter; an intraoperative esophageal end image of the user is acquired based on the camera component, and image detection processing is performed on the intraoperative esophageal end image based on a pre-trained image detection model to obtain the esophageal end diameter of the user; the first esophageal dilation coefficient and the second esophageal dilation coefficient are weighted to obtain a weighted esophageal dilation coefficient, and based on the weighted esophageal dilation coefficient, the esophageal end diameter is dynamically adjusted to obtain a dynamic esophageal end diameter, and a target stapler is determined based on the dynamic esophageal end diameter.

[0006] In a possible implementation, based on the pressure signal data, the pressure wave intensity, pressure wave frequency and pressure wave propagation speed are calculated, specifically including: filtering the pressure signal data to obtain filtered pressure signal data; based on a sliding window of a preset size, performing sliding average processing on the filtered pressure signal data to obtain smoothed pressure signal data; traversing each smooth pressure signal point in the smooth pressure signal data, and comparing each smooth pressure signal point with its corresponding adjacent smooth pressure signal point, and determining the peaks in the smooth pressure signal data based on the comparison results; calculating the waveform amplitude based on the peaks, taking the waveform amplitude as the pressure wave intensity, obtaining the number of peaks of the peaks, taking the number of peaks as the pressure wave frequency, and calculating the first time difference between adjacent peaks, and calculating the pressure wave propagation speed based on the first time difference.

[0007] In one possible implementation, the pressure wave intensity, the pressure wave frequency, and the pressure wave propagation velocity are input into a pre-trained expansion coefficient calculation model so that the expansion coefficient calculation model outputs a first esophageal expansion coefficient, specifically including: obtaining an expansion coefficient model training data set, wherein the expansion coefficient model training data set includes a plurality of expansion coefficients, and sample pressure wave intensities, sample pressure wave frequencies, and sample pressure wave propagation velocities corresponding to each expansion coefficient; creating a multivariate linear regression model, and performing model training processing on the multivariate linear regression model based on the expansion coefficient model training data set so that the multivariate linear regression model outputs a first esophageal expansion coefficient. Regression coefficient, intercept term and error term; wherein, the regression coefficient includes a first regression coefficient corresponding to the pressure wave intensity, a second regression coefficient corresponding to the pressure wave frequency and a third regression coefficient corresponding to the pressure wave propagation velocity; the first regression coefficient, the second regression coefficient, the third regression coefficient, the intercept term and the error term are input into the multivariate linear regression model to obtain an expansion coefficient calculation model; the pressure wave intensity, the pressure wave frequency and the pressure wave propagation velocity are input into the expansion coefficient calculation model so that the expansion coefficient calculation model outputs a first esophageal expansion coefficient; wherein, the expansion coefficient calculation model is as follows:

[0008] ;

[0009] In the formula, is the first esophageal expansion coefficient, is the intercept term, is the first regression coefficient, is the second regression coefficient, is the third regression coefficient, is the error term, is the pressure wave intensity, is the pressure wave frequency, is the pressure wave propagation speed.

[0010] In a possible implementation, esophageal ultrasonic images of a user in different esophageal states are obtained, and the esophageal ultrasonic images are respectively input into a pre-trained ultrasonic image detection model so that the ultrasonic image detection model performs image edge processing on the esophageal ultrasonic images and outputs the esophageal diameters corresponding to the esophageal ultrasonic images in different esophageal states. Specifically, the method includes: transmitting a first ultrasonic signal to the esophageal end region of the user based on an endoscopic ultrasonic device, and controlling the endoscopic ultrasonic device to receive a second ultrasonic signal returned by the esophageal end region, and obtaining the esophageal ultrasonic images of the user in different esophageal states based on the second ultrasonic signal; wherein the esophageal ultrasonic images include esophageal dilation ultrasonic images, esophageal contraction ultrasonic images, and esophageal resting ultrasonic images; the esophageal dilation ultrasonic images are input into a pre-trained ultrasonic image detection model so that the ultrasonic image detection model performs image edge processing on the esophageal ultrasonic images and outputs the esophageal diameters corresponding to the esophageal ultrasonic images in different esophageal states. The image is input into the ultrasonic image detection model so that the ultrasonic image detection model performs image edge processing on the esophageal dilation ultrasonic image to obtain the edge of the inner wall of the esophageal dilation, and determines the diameter of the esophageal dilation based on the edge of the inner wall of the esophageal dilation; the esophageal contraction ultrasonic image is input into the ultrasonic image detection model so that the ultrasonic image detection model performs image edge processing on the esophageal contraction ultrasonic image to obtain the edge of the inner wall of the esophageal contraction, and determines the diameter of the esophageal contraction based on the edge of the inner wall of the esophagus; the esophageal rest ultrasonic image is input into the ultrasonic image detection model so that the ultrasonic image detection model performs image edge processing on the esophageal rest ultrasonic image to obtain the edge of the inner wall of the esophagus, and determines the esophageal rest diameter based on the edge of the inner wall of the esophagus.

[0011] In a possible implementation, calculating the second esophageal expansion coefficient based on the esophageal diameter specifically includes: substituting the esophageal expansion diameter and the esophageal resting diameter into a preset esophageal expansion coefficient calculation formula to obtain a first coefficient; substituting the esophageal contraction diameter and the esophageal resting diameter into a preset esophageal contraction coefficient calculation formula to obtain a second coefficient; calculating the second esophageal expansion coefficient based on the first coefficient and the second coefficient;

[0012] The calculation formula of the esophageal expansion coefficient is as follows:

[0013] ;

[0014] In the formula, is the first coefficient, is the dilated diameter of the esophagus, is the resting diameter of the esophagus;

[0015] The calculation formula of the esophageal contraction coefficient is as follows:

[0016] ;

[0017] In the formula, is the second coefficient, is the contracted diameter of the esophagus, is the resting diameter of the esophagus.

[0018] In a possible implementation, image detection processing is performed on the intraoperative esophageal end image based on a pretrained image detection model to obtain the esophageal end diameter of the user, specifically including: grayscale processing is performed on the intraoperative esophageal end image based on the pretrained image detection model to obtain a grayscale intraoperative esophageal end image; esophageal wall shape extraction is performed on the grayscale intraoperative esophageal end image to obtain the esophageal inner wall shape and the esophageal outer wall shape; a first circumference, a first area, and a first inner diameter of the esophageal inner wall shape are calculated, and a second circumference, a second area, and a second outer diameter of the esophageal outer wall shape are calculated; a circumference change ratio is calculated based on the first circumference and the second circumference, and an area change ratio is calculated based on the first area and the second area; the first inner diameter is adjusted based on the circumference change ratio, the area change ratio, and the second outer diameter to obtain the esophageal end diameter.

[0019] In a possible implementation, the esophageal end diameter is dynamically adjusted based on the weighted esophageal expansion coefficient to obtain a dynamic esophageal end diameter, and a target stapler is determined based on the dynamic esophageal end diameter, specifically including: inputting the weighted esophageal expansion coefficient and the esophageal end diameter into a preset dynamic esophageal end diameter calculation formula to obtain a dynamic esophageal end diameter; obtaining all stapler diameters of the staplers, and arranging all the stapler diameters in ascending order to obtain a stapler diameter sequence; traversing the stapler diameter sequence based on the dynamic esophageal end diameter to obtain a target stapler diameter that is greater than the dynamic esophageal end diameter that is traversed for the first time, and obtaining a previous stapler diameter of the target stapler diameter in the stapler diameter sequence, and using the stapler corresponding to the previous stapler diameter as the target stapler.

[0020] The present application also provides a stapler selection device, comprising: a first esophageal expansion coefficient calculation module, a second esophageal expansion coefficient calculation module, an esophageal end diameter acquisition module and a stapler selection module; wherein the first esophageal expansion coefficient calculation module is used to perform esophageal pressure measurement on the user based on a pressure sensor to obtain esophageal pressure signal data, calculate the pressure wave intensity, the pressure wave frequency and the pressure wave propagation speed based on the pressure signal data, and input the pressure wave intensity, the pressure wave frequency and the pressure wave propagation speed into a pre-trained expansion coefficient calculation model so that the expansion coefficient calculation model outputs a first esophageal expansion coefficient; the second esophageal expansion coefficient calculation module is used to obtain esophageal ultrasonic images of the user in different esophageal states, and input the esophageal ultrasonic images into the pre-trained ultrasonic image processing module respectively. In the image detection model, the ultrasonic image detection model performs image edge processing on the esophageal ultrasonic image, outputs the esophageal diameter corresponding to each of the esophageal ultrasonic images under different esophageal states, and calculates the second esophageal expansion coefficient based on the esophageal diameter; the esophageal end diameter acquisition module is used to obtain the user's intraoperative esophageal end image based on the camera component, and perform image detection processing on the intraoperative esophageal end image based on the pre-trained image detection model to obtain the user's esophageal end diameter; the stapler selection module is used to perform weighted processing on the first esophageal expansion coefficient and the second esophageal expansion coefficient to obtain a weighted esophageal expansion coefficient, and dynamically adjust the esophageal end diameter based on the weighted esophageal expansion coefficient to obtain a dynamic esophageal end diameter, and determine a target stapler based on the dynamic esophageal end diameter.

[0021] The present invention provides a method, device, equipment and storage medium for selecting a stapler, which has the following beneficial effects compared with the prior art:

[0022] The technical solution of the present application obtains pressure wave intensity, pressure wave frequency, and pressure wave propagation speed based on pressure measurement of the user's esophageal area, which are used to calculate a first esophageal expansion coefficient, and obtains an esophageal ultrasonic image of the user's esophageal area, calculates a second esophageal expansion coefficient based on the ultrasonic image, combines the first esophageal expansion coefficient and the second esophageal expansion coefficient, and obtains a weighted expansion coefficient through weighted processing; in this step, the expansion capacity of the esophagus is comprehensively evaluated through multi-source data, which can improve the accuracy of subsequent dynamic adjustment of the esophageal end diameter; subsequently, the user's intraoperative esophageal end image is obtained, the esophageal end diameter is confirmed based on the intraoperative esophageal end image, and the esophageal end diameter is dynamically adjusted using the weighted expansion coefficient obtained by weighted processing, and the target stapler is selected based on the dynamic esophageal end diameter obtained after the dynamic adjustment, ensuring that the selection of the stapler matches the actual state of the patient's esophagus, making the selection of the stapler more personalized and accurate, and reducing the problems of poor anastomosis or material waste caused by inappropriate staplers. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a flow chart of an embodiment of a method for selecting a stapler provided by the present application;

[0024] Figure 2 It is a structural schematic diagram of an embodiment of a stapler selection device provided by the present application;

[0025] Figure 3 It is a structural schematic diagram of a terminal device provided by the present invention. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0027] Example 1, see Figure 1 , Figure 1 FIG. 1 is a flow chart of an embodiment of a method for selecting a stapler provided in the present application. Figure 1 As shown, the method includes steps 101 to 104, which are specifically as follows:

[0028] Step 101: Perform esophageal manometry on the user based on a pressure sensor to obtain esophageal pressure signal data, calculate pressure wave intensity, pressure wave frequency and pressure wave propagation velocity based on the pressure signal data, and input the pressure wave intensity, pressure wave frequency and pressure wave propagation velocity into a pre-trained expansion coefficient calculation model so that the expansion coefficient calculation model outputs a first esophageal expansion coefficient.

[0029] In one embodiment, the pressure sensor is a high-precision pressure sensor; wherein the high-precision pressure sensor includes but is not limited to a pressure catheter and a solid sensor array.

[0030] In one embodiment, the pressure sensor is placed at the esophageal end of the user's esophagus to obtain pressure information of this part, especially peristaltic waves of the esophagus or pressure changes of the esophageal sphincter.

[0031] In one embodiment, the pressure sensor is connected to a data acquisition device, and after collecting the pressure signal data of the esophagus, the pressure signal data is transmitted to the data acquisition device to facilitate subsequent viewing of the data.

[0032] In one embodiment, after receiving the pressure signal data, the data acquisition device calculates the pressure wave intensity, the pressure wave frequency and the pressure wave propagation speed based on the pressure signal data.

[0033] In one embodiment, the pressure signal data is filtered to obtain filtered pressure signal data.

[0034] Specifically, a filter is used to remove noise from the pressure signal data obtained based on the pressure sensor to improve the signal quality; common filtering methods include low-pass filtering, high-pass filtering or band-pass filtering.

[0035] In one embodiment, based on a sliding window of a preset size, sliding average processing is performed on the filtered pressure signal data to obtain smoothed pressure signal data.

[0036] Specifically, the sliding average can help smooth the signal, reduce the impact of noise, and obtain a smoother waveform, thereby facilitating accurate detection of peaks and troughs; therefore, a sliding average process is performed on each filtered pressure signal in the filtered pressure signal data based on a sliding window.

[0037] Specifically, the size of the sliding window can be set based on user needs; preferably, the size of the sliding window is set to 5.

[0038] Specifically, the sliding window and each filtered pressure signal in the filtered pressure signal data are respectively input into a preset sliding average formula to obtain a smoothed pressure signal corresponding to each filtered pressure signal to form smoothed pressure signal data; wherein the sliding average formula is as follows:

[0039] ;

[0040] In the formula, is the smoothed pressure signal obtained at time t, N is the size of the sliding window, is the index of the sliding window, is the original signal at time The value of .

[0041] Specifically, Corresponds to the current moment data, and , is the data on both sides of the window; for each moment The window value is the current time and its surroundings. The average value of the points; this process can reduce the fluctuation of the signal and make the signal smoother.

[0042] In one embodiment, each smoothed pressure signal in the smoothed pressure signal data is traversed, and each smoothed pressure signal is compared with the adjacent smoothed pressure signals corresponding to each smoothed pressure signal, and based on the comparison result, the peak signal in the smoothed pressure signal data is determined.

[0043] Specifically, each smooth pressure signal in the smooth pressure signal data is traversed to obtain the front target number of smooth pressure signals and the rear target number of smooth pressure signals corresponding to the currently traversed smooth pressure signal; if the signal values ​​corresponding to the currently traversed smooth pressure signals are all greater than the signal values ​​corresponding to the front target number of smooth pressure signals, and the signal values ​​corresponding to the currently traversed smooth pressure signals are all greater than the signal values ​​corresponding to the rear target number of smooth pressure signals, then it is determined that the currently traversed smooth pressure signal is a peak signal in the smooth pressure signal data.

[0044] Specifically, the number of the front targets and the number of the rear-front targets are the same. Preferably, the number of the front targets and the number of the rear-front targets are not less than 2.

[0045] Specifically, the number of peak signals in the smoothed pressure signal data is at least one.

[0046] In one embodiment, based on the peak signal, the waveform amplitude is calculated, the waveform amplitude is used as the pressure wave intensity, the peak signal number of the peak signal is obtained, the peak signal number is used as the pressure wave frequency, and the first time difference between adjacent peak signals is calculated, and based on the first time difference, the pressure wave propagation speed is calculated.

[0047] Specifically, all the peak signals in the smoothed pressure signal data are acquired, and the highest value of the peak signal among all the peak signals is taken as the waveform amplitude, that is, the pressure wave intensity.

[0048] Specifically, the first time difference between two adjacent peak signals in all the peak signals is obtained, and all the first time differences are averaged to obtain an average time difference, and the average time difference is used as the pressure wave propagation speed.

[0049] In one embodiment, an expansion coefficient model training data set is obtained, wherein the expansion coefficient model training data set includes multiple expansion coefficients, and sample pressure wave intensity, sample pressure wave frequency and sample pressure wave propagation speed corresponding to each expansion coefficient.

[0050] Specifically, the expansion coefficient model training data set is the expansion coefficient of the esophagus corresponding to each combination of different sample pressure wave intensities, sample pressure wave frequencies and sample pressure wave propagation velocities obtained under the same specific pressure wave condition.

[0051] In one embodiment, a multivariate linear regression model is created, and model training processing is performed on the multivariate linear regression model based on the expansion coefficient model training data set, so that the multivariate linear regression model outputs regression coefficients, intercept terms and error terms; wherein the regression coefficients include a first regression coefficient corresponding to the pressure wave intensity, a second regression coefficient corresponding to the pressure wave frequency and a third regression coefficient corresponding to the pressure wave propagation velocity.

[0052] Specifically, based on the expansion coefficient model training data set, the multivariate linear regression model is fitted through regression analysis to solve a plurality of regression coefficients, intercept terms and error terms.

[0053] Specifically, the regression coefficient describes the influence of each input variable on the expansion coefficient, for example, represents the effect of pressure wave intensity on the expansion coefficient, is the effect of the pressure wave frequency, It is the influence of the pressure wave propagation speed.

[0054] Specifically, the intercept term It is a constant term in the regression model, which means that when the pressure wave intensity, pressure wave frequency and pressure wave propagation velocity are all zero, the predicted value of the esophageal expansion coefficient is the constant term in the regression model.

[0055] Specifically, the error term Describes the deviation between the model prediction and the true observed value.

[0056] In one embodiment, the first regression coefficient, the second regression coefficient, the third regression coefficient, the intercept term and the error term are input into the multivariate linear regression model to obtain an expansion coefficient calculation model.

[0057] In one embodiment, the pressure wave intensity, the pressure wave frequency and the pressure wave propagation speed are input into the expansion coefficient calculation model so that the expansion coefficient calculation model outputs the first esophageal expansion coefficient.

[0058] In one embodiment, the expansion coefficient calculation model is as follows:

[0059] ;

[0060] In the formula, is the first esophageal expansion coefficient, is the intercept term, is the first regression coefficient, is the second regression coefficient, is the third regression coefficient, is the error term, is the pressure wave intensity, is the pressure wave frequency, is the pressure wave propagation speed.

[0061] Step 102: Obtain esophageal ultrasonic images of the user in different esophageal states, and input the esophageal ultrasonic images into a pre-trained ultrasonic image detection model respectively, so that the ultrasonic image detection model performs image edge processing on the esophageal ultrasonic images, outputs the esophageal diameters corresponding to the esophageal ultrasonic images in different esophageal states, and calculates a second esophageal dilation coefficient based on the esophageal diameters.

[0062] In one embodiment, an endoscopic ultrasound device is used to transmit a first ultrasonic signal to the esophageal end region of a user, and the endoscopic ultrasound device is controlled to receive a second ultrasonic signal returned by the esophageal end region, and based on the second ultrasonic signal, an esophageal ultrasonic image of the user in different esophageal states is obtained; wherein the esophageal ultrasonic image includes an esophageal dilation ultrasonic image, an esophageal contraction ultrasonic image, and an esophageal resting ultrasonic image.

[0063] Preferably, the endoscopic ultrasound device includes but is not limited to an endoscopic ultrasound probe; the endoscopic ultrasound device can transmit ultrasonic signals to the esophageal end region and receive returned echo signals.

[0064] Specifically, the different esophageal states include an esophageal expansion state, an esophageal contraction state and an esophageal resting state.

[0065] Specifically, in the esophageal dilation state, the endoscopic ultrasound device transmits a first ultrasonic signal to the esophageal end area of ​​the user, and controls the endoscopic ultrasound device to receive a second ultrasonic signal returned by the esophageal end area to obtain an esophageal dilation ultrasonic image in the esophageal dilation state.

[0066] Specifically, in the esophageal contraction state, the endoscopic ultrasound device transmits a first ultrasonic signal to the esophageal end area of ​​the user, and controls the endoscopic ultrasound device to receive a second ultrasonic signal returned by the esophageal end area, thereby obtaining an esophageal contraction ultrasonic image in the esophageal contraction state.

[0067] Specifically, in the esophageal dilation state, the endoscopic ultrasound device transmits a first ultrasonic signal to the esophageal end area of ​​the user, and controls the endoscopic ultrasound device to receive a second ultrasonic signal returned by the esophageal end area to obtain an esophageal dilation ultrasonic image in the esophageal dilation state.

[0068] Specifically, based on the second ultrasonic signal, when obtaining the esophageal ultrasonic image of the user in different esophageal states, the amplitude of the second ultrasonic signal is obtained and converted into an RGB value; and the axial distance and circumferential position corresponding to the second ultrasonic signal are obtained, and each second ultrasonic signal is arranged on a two-dimensional image according to the axial distance and circumferential position to generate the esophageal ultrasonic image of the user in different esophageal states.

[0069] Preferably, the second ultrasonic signal returned by the esophageal end region and received by the endoscopic ultrasound device can be represented in a two-dimensional graph of the esophageal axial distance and circumferential position, and the coordinates of the two-dimensional graph of the esophageal axial distance and circumferential position correspond one-to-one to the cylindrical coordinate position of the esophagus.

[0070] In one embodiment, the ultrasonic image detection model is U-Net; the core idea of ​​edge detection through U-Net is to use it for image segmentation tasks, output a probability map of whether each pixel of the image belongs to the edge, and then process these results through thresholding and morphological operations; the advantage of U-Net is that it can capture details and process complex image structures, so it can obtain more accurate edge detection results.

[0071] In one embodiment, the esophageal resting ultrasonic image is input into the ultrasonic image detection model so that the ultrasonic image detection model performs image edge processing on the esophageal resting ultrasonic image to obtain the edge of the dilated inner wall of the esophagus, and determines the dilated diameter of the esophagus based on the edge of the dilated inner wall of the esophagus.

[0072] Specifically, based on the edge of the esophageal dilation inner wall, the esophageal dilation contour is determined, and the dilation minimum inscribed circle corresponding to the esophageal dilation contour is obtained, and the diameter of the dilation minimum inscribed circle is used as the esophageal dilation diameter.

[0073] In one embodiment, the esophageal contraction ultrasonic image is input into the ultrasonic image detection model so that the ultrasonic image detection model performs image edge processing on the esophageal contraction ultrasonic image to obtain the esophageal contraction inner wall edge, and determines the esophageal contraction diameter based on the esophageal contraction inner wall edge.

[0074] Specifically, based on the contraction inner wall edge of the esophagus, the contraction contour of the esophagus is determined, and the contraction minimum inscribed circle corresponding to the contraction contour of the esophagus is obtained, and the diameter of the contraction minimum inscribed circle is used as the contraction diameter of the esophagus.

[0075] In one embodiment, the esophageal resting ultrasonic image is input into the ultrasonic image detection model so that the ultrasonic image detection model performs image edge processing on the esophageal resting ultrasonic image to obtain the esophageal resting inner wall edge, and determines the esophageal resting diameter based on the esophageal resting inner wall edge.

[0076] Specifically, based on the resting inner wall edge of the esophagus, the resting contour of the esophagus is determined, and the resting minimum inscribed circle corresponding to the resting contour of the esophageal expansion is obtained, and the diameter of the resting minimum inscribed circle is used as the resting diameter of the esophagus.

[0077] In one embodiment, the esophageal dilation diameter and the esophageal resting diameter are substituted into a preset esophageal dilation coefficient calculation formula to obtain a first coefficient.

[0078] Specifically, the esophageal expansion coefficient calculation formula is as follows:

[0079] ;

[0080] In the formula, is the first coefficient, is the dilated diameter of the esophagus, is the resting diameter of the esophagus;

[0081] In one embodiment, the esophageal contraction diameter and the esophageal resting diameter are substituted into a preset esophageal contraction coefficient calculation formula to obtain a second coefficient.

[0082] Specifically, the esophageal contraction coefficient calculation formula is as follows:

[0083] ;

[0084] In the formula, is the second coefficient, is the contracted diameter of the esophagus, is the resting diameter of the esophagus.

[0085] In one embodiment, a second esophageal dilation coefficient is calculated based on the first coefficient and the second coefficient.

[0086] Specifically, a first weight value is set for the first coefficient, and a second weight value is set for the second coefficient, a first product of the first coefficient and the first weight value is calculated, and a second product of the second coefficient and the second weight value is calculated, and the first product and the second product are added to obtain a second esophageal dilation coefficient.

[0087] Step 103: Acquire an intraoperative esophageal end image of the user based on the camera assembly, perform image detection processing on the intraoperative esophageal end image based on a pre-trained image detection model, and obtain the esophageal end diameter of the user.

[0088] In one embodiment, the imaging component includes but is not limited to an endoscope, an ultrasonic endoscope, a thoracoscope or a laparoscope.

[0089] In one embodiment, the intraoperative esophageal end image is grayscaled based on a pre-trained image detection model to obtain a grayscale intraoperative esophageal end image.

[0090] In one embodiment, the esophageal wall shape is extracted from the grayscale intraoperative esophageal end image to obtain the esophageal inner wall shape and the esophageal outer wall shape.

[0091] Specifically, the image detection model extracts the esophageal wall shape from the grayscale intraoperative esophageal end image based on the Roberts operator to obtain an esophageal wall shape extraction image, and obtains the esophageal inner wall shape and the esophageal outer wall shape based on the esophageal wall shape extraction image.

[0092] Specifically, the grayscale value of the neighborhood of each pixel in the esophageal end image during grayscaling is checked according to the Roberts operator, and the grayscale change rate of each pixel and its field is quantified to determine the edge points. Based on the edge points, the inner and outer edge regions of the esophagus are extracted to obtain the inner and outer wall shapes of the esophagus.

[0093] In one embodiment, a first perimeter, a first area, and a first inner diameter of the esophagus inner wall shape are calculated, and a second perimeter, a second area, and a second outer diameter of the esophagus outer wall shape are calculated.

[0094] Specifically, the first circumference, the first area and the first inner diameter of the inner wall shape of the esophagus, and the second circumference, the second area and the second outer diameter of the outer wall shape of the esophagus can be obtained based on the Regionprops function in Matlab, wherein the Regionprops function is a function for measuring image region properties.

[0095] Specifically, the first area of ​​the esophageal inner wall shape is calculated based on the Area parameter in the Regionprops function, the first perimeter of the esophageal inner wall shape is calculated based on the Perimeter parameter in the Regionprops function, and the first inner diameter of the esophageal inner wall shape is calculated based on the MajorAxisLength parameter in the Regionprops function.

[0096] Specifically, the second area of ​​the outer wall shape of the esophagus is calculated based on the Area parameter in the Regionprops function, the second perimeter of the outer wall shape of the esophagus is calculated based on the Perimeter parameter in the Regionprops function; and the first outer diameter of the outer wall shape of the esophagus is calculated based on the MajorAxisLength parameter in the Regionprops function.

[0097] In one embodiment, a perimeter change ratio is calculated based on the first perimeter and the second perimeter, and an area change ratio is calculated based on the first area and the second area.

[0098] Specifically, the first perimeter is divided by the second perimeter to calculate a perimeter change ratio; the first area is divided by the second area to calculate an area change ratio.

[0099] In one embodiment, based on the circumference change ratio, the area change ratio and the second outer diameter, the first inner diameter is adjusted to obtain the esophageal end diameter.

[0100] Specifically, the circumference change ratio is multiplied by the second outer diameter to obtain a first predicted inner diameter, and the area change ratio is multiplied by the second outer diameter to obtain a second predicted inner diameter; the first predicted inner diameter, the second predicted inner diameter and the first inner diameter are averaged to obtain the esophageal end diameter.

[0101] Step 104: Perform weighted processing on the first esophageal expansion coefficient and the second esophageal expansion coefficient to obtain a weighted esophageal expansion coefficient, and dynamically adjust the esophageal end diameter based on the weighted esophageal expansion coefficient to obtain a dynamic esophageal end diameter, and determine a target anastomosis device based on the dynamic esophageal end diameter.

[0102] In one embodiment, a first coefficient weight value is set for the first esophageal dilation coefficient, and a second coefficient weight value is set for the second esophageal dilation coefficient. The first esophageal dilation coefficient, the first coefficient weight value, the second esophageal dilation coefficient and the second coefficient weight value are input into a preset weighted esophageal dilation coefficient calculation formula to obtain a weighted esophageal dilation coefficient.

[0103] Specifically, the weighted esophageal expansion coefficient calculation formula is as follows:

[0104] ; ;

[0105] In the formula, is the weighted esophageal dilatation coefficient, is the first coefficient weight value, is the second coefficient weight value, is the first esophageal expansion coefficient, is the second esophageal dilation coefficient.

[0106] In one embodiment, the weighted esophageal expansion coefficient and the esophageal end diameter are input into a preset dynamic esophageal end diameter calculation formula to obtain the dynamic esophageal end diameter.

[0107] Specifically, the dynamic esophageal end diameter calculation formula is as follows:

[0108] ;

[0109] In the formula, is the dynamic esophageal end diameter, is the weighted esophageal dilatation coefficient, The diameter of the esophagus end.

[0110] In one embodiment, all stapler diameters of the staplers are obtained, and all the stapler diameters are arranged in ascending order to obtain a stapler diameter sequence.

[0111] Specifically, the stapler diameters include but are not limited to 21 mm, 23 mm and 25 mm.

[0112] In one embodiment, the stapler diameter sequence is traversed based on the dynamic esophageal end diameter to obtain a target stapler diameter that is larger than the dynamic esophageal end diameter that is traversed for the first time, and the previous stapler diameter of the target stapler diameter in the stapler diameter sequence is obtained, and the stapler corresponding to the previous stapler diameter is used as the target stapler.

[0113] Example 2, see Figure 2 , Figure 2 is a schematic structural diagram of an embodiment of a stapler selection device provided by the present application, such as Figure 2 As shown, the device includes a first esophageal expansion coefficient calculation module 201, a second esophageal expansion coefficient calculation module 202, an esophageal end diameter acquisition module 203 and an anastomosis device selection module 204, which are specifically as follows:

[0114] The first esophageal expansion coefficient calculation module 201 is used to perform esophageal pressure measurement on the user based on a pressure sensor to obtain esophageal pressure signal data, and calculate the pressure wave intensity, pressure wave frequency and pressure wave propagation speed based on the pressure signal data, and input the pressure wave intensity, the pressure wave frequency and the pressure wave propagation speed into a pre-trained expansion coefficient calculation model so that the expansion coefficient calculation model outputs the first esophageal expansion coefficient.

[0115] The second esophageal dilation coefficient calculation 202 is used to obtain esophageal ultrasonic images of the user in different esophageal states, and input the esophageal ultrasonic images into a pre-trained ultrasonic image detection model respectively, so that the ultrasonic image detection model performs image edge processing on the esophageal ultrasonic images, outputs the esophageal diameters corresponding to the esophageal ultrasonic images in different esophageal states, and calculates the second esophageal dilation coefficient based on the esophageal diameters.

[0116] The esophageal end diameter acquisition module 203 is used to acquire an intraoperative esophageal end image of the user based on a camera assembly, and perform image detection processing on the intraoperative esophageal end image based on a pre-trained image detection model to obtain the esophageal end diameter of the user.

[0117] The stapler selection module 204 is used to perform weighted processing on the first esophageal expansion coefficient and the second esophageal expansion coefficient to obtain a weighted esophageal expansion coefficient, and dynamically adjust the esophageal end diameter based on the weighted esophageal expansion coefficient to obtain a dynamic esophageal end diameter, and determine a target stapler based on the dynamic esophageal end diameter.

[0118] In one embodiment, the first esophageal dilation coefficient calculation module 201 is used to calculate the pressure wave intensity, pressure wave frequency and pressure wave propagation speed based on the pressure signal data, specifically including: filtering the pressure signal data to obtain filtered pressure signal data; based on a sliding window of a preset size, performing sliding average processing on the filtered pressure signal data to obtain smoothed pressure signal data; traversing each smooth pressure signal point in the smooth pressure signal data, and comparing each smooth pressure signal point with the adjacent smooth pressure signal points corresponding to each smooth pressure signal point, and determining the peaks in the smooth pressure signal data based on the comparison results; calculating the waveform amplitude based on the peaks, taking the waveform amplitude as the pressure wave intensity, obtaining the number of peaks of the peaks, taking the number of peaks as the pressure wave frequency, and calculating the first time difference between adjacent peaks, and calculating the pressure wave propagation speed based on the first time difference.

[0119] In one embodiment, the first esophageal expansion coefficient calculation module 201 is used to input the pressure wave intensity, the pressure wave frequency and the pressure wave propagation speed into a pre-trained expansion coefficient calculation model so that the expansion coefficient calculation model outputs a first esophageal expansion coefficient, specifically including: obtaining an expansion coefficient model training data set, wherein the expansion coefficient model training data set includes a plurality of expansion coefficients, and sample pressure wave intensity, sample pressure wave frequency and sample pressure wave propagation speed corresponding to each expansion coefficient; creating a multivariate linear regression model, and performing model training processing on the multivariate linear regression model based on the expansion coefficient model training data set so that the multivariate linear The regression model outputs a regression coefficient, an intercept term and an error term; wherein the regression coefficient includes a first regression coefficient corresponding to the pressure wave intensity, a second regression coefficient corresponding to the pressure wave frequency and a third regression coefficient corresponding to the pressure wave propagation velocity; the first regression coefficient, the second regression coefficient, the third regression coefficient, the intercept term and the error term are input into the multivariate linear regression model to obtain an expansion coefficient calculation model; the pressure wave intensity, the pressure wave frequency and the pressure wave propagation velocity are input into the expansion coefficient calculation model so that the expansion coefficient calculation model outputs a first esophageal expansion coefficient; wherein the expansion coefficient calculation model is as follows:

[0120] ;

[0121] In the formula, is the first esophageal expansion coefficient, is the intercept term, is the first regression coefficient, is the second regression coefficient, is the third regression coefficient, is the error term, is the pressure wave intensity, is the pressure wave frequency, is the pressure wave propagation speed.

[0122] In one embodiment, the second esophageal dilation coefficient calculation module 202 is used to obtain esophageal ultrasonic images of the user in different esophageal states, and respectively input the esophageal ultrasonic images into a pre-trained ultrasonic image detection model so that the ultrasonic image detection model performs image edge processing on the esophageal ultrasonic images, and outputs the esophageal diameters corresponding to the esophageal ultrasonic images in different esophageal states, specifically including: transmitting a first ultrasonic signal to the esophageal end region of the user based on an endoscopic ultrasonic device, and controlling the endoscopic ultrasonic device to receive a second ultrasonic signal returned by the esophageal end region, and obtaining the esophageal ultrasonic images of the user in different esophageal states based on the second ultrasonic signal; wherein the esophageal ultrasonic images include esophageal dilation ultrasonic images, esophageal contraction ultrasonic images, and esophageal resting ultrasonic images; The esophageal dilation ultrasonic image is input into the ultrasonic image detection model so that the ultrasonic image detection model performs image edge processing on the esophageal dilation ultrasonic image to obtain the esophageal dilation inner wall edge, and determines the esophageal dilation diameter based on the esophageal dilation inner wall edge; the esophageal contraction ultrasonic image is input into the ultrasonic image detection model so that the ultrasonic image detection model performs image edge processing on the esophageal contraction ultrasonic image to obtain the esophageal contraction inner wall edge, and determines the esophageal contraction diameter based on the esophageal contraction inner wall edge; the esophageal rest ultrasonic image is input into the ultrasonic image detection model so that the ultrasonic image detection model performs image edge processing on the esophageal rest ultrasonic image to obtain the esophageal rest inner wall edge, and determines the esophageal rest diameter based on the esophageal rest inner wall edge.

[0123] In one embodiment, the second esophageal expansion coefficient calculation module 202 is used to calculate the second esophageal expansion coefficient based on the esophageal diameter, specifically including: substituting the esophageal expansion diameter and the esophageal resting diameter into a preset esophageal expansion coefficient calculation formula to obtain a first coefficient; substituting the esophageal contraction diameter and the esophageal resting diameter into a preset esophageal contraction coefficient calculation formula to obtain a second coefficient; calculating the second esophageal expansion coefficient based on the first coefficient and the second coefficient; wherein the esophageal expansion coefficient calculation formula is as follows:

[0124] ;

[0125] In the formula, is the first coefficient, is the dilated diameter of the esophagus, is the resting diameter of the esophagus;

[0126] The calculation formula of the esophageal contraction coefficient is as follows:

[0127] ;

[0128] In the formula, is the second coefficient, is the contracted diameter of the esophagus, is the resting diameter of the esophagus.

[0129] In one embodiment, the esophageal end diameter acquisition module 203 is used to perform image detection processing on the intraoperative esophageal end image based on a pre-trained image detection model to obtain the esophageal end diameter of the user, specifically including: graying the intraoperative esophageal end image based on the pre-trained image detection model to obtain a grayed intraoperative esophageal end image; extracting the esophageal wall shape from the grayed intraoperative esophageal end image to obtain an esophageal inner wall shape and an esophageal outer wall shape; calculating a first circumference, a first area, and a first inner diameter of the esophageal inner wall shape, and calculating a second circumference, a second area, and a second outer diameter of the esophageal outer wall shape; calculating a circumference change ratio based on the first circumference and the second circumference, and calculating an area change ratio based on the first area and the second area; adjusting the first inner diameter based on the circumference change ratio, the area change ratio, and the second outer diameter to obtain the esophageal end diameter.

[0130] In one embodiment, the stapler selection module 204 is used to dynamically adjust the esophageal end diameter based on the weighted esophageal expansion coefficient to obtain a dynamic esophageal end diameter, and determine a target stapler based on the dynamic esophageal end diameter, specifically including: inputting the weighted esophageal expansion coefficient and the esophageal end diameter into a preset dynamic esophageal end diameter calculation formula to obtain a dynamic esophageal end diameter; obtaining all stapler diameters of the staplers, and arranging all the stapler diameters in ascending order to obtain a stapler diameter sequence; traversing the stapler diameter sequence based on the dynamic esophageal end diameter to obtain a target stapler diameter that is greater than the dynamic esophageal end diameter that is traversed for the first time, and obtaining a previous stapler diameter of the target stapler diameter in the stapler diameter sequence, and using the stapler corresponding to the previous stapler diameter as the target stapler.

[0131] The stapler selection device can implement the stapler selection method of the method embodiment. The options in the method embodiment are also applicable to this embodiment and will not be described in detail here.

[0132] Figure 3 A schematic diagram of the structure of a terminal device. Figure 3 As shown, the terminal device 3 of this embodiment includes: at least one processor 301 ( Figure 3Only one is shown in the figure) a processor, a memory 302, and a computer program 303 stored in the memory 302 and executable on at least one processor 301, and when the processor 301 executes the computer program 303, the steps in any of the above method embodiments are implemented.

[0133] The terminal device 3 may be a computing device such as a smart phone, a laptop, a tablet computer, and a desktop computer. The terminal device may include but is not limited to a processor 301 and a memory 302. Those skilled in the art will appreciate that Figure 3 It is only an example of the terminal device 3 and does not constitute a limitation on the terminal device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0134] The processor 301 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0135] In some embodiments, the memory 302 may be an internal storage unit of the terminal device 3, such as a hard disk or memory of the terminal device 3. In other embodiments, the memory 302 may also be an external storage device of the terminal device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 3. Further, the memory 302 may also include both an internal storage unit and an external storage device of the terminal device 3. The memory 302 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as program codes of a computer program, etc. The memory 302 may also be used to temporarily store data that has been output or is to be output.

[0136] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0137] In several embodiments provided in the present application, it is understood that each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and a module, a program segment or a part of a code includes one or more executable instructions for realizing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes also be executed in the opposite order, depending on the functions involved.

[0138] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions for a terminal device to execute all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0139] In summary, the present application provides a method, device, equipment and storage medium for selecting an anastomosis device. The method calculates the pressure wave intensity, pressure wave frequency and pressure wave propagation speed based on the user's esophageal pressure signal data and inputs them into the expansion coefficient calculation model to output a first esophageal expansion coefficient; and inputs the user's esophageal ultrasonic image in different esophageal states into a pre-trained ultrasonic image detection model for image edge processing, and outputs the esophageal diameter in different esophageal states for calculating the second esophageal expansion coefficient; performs image detection processing on the intraoperative esophageal end image based on the image detection model to obtain the user's esophageal end diameter; dynamically adjusts the esophageal end diameter based on the weighted esophageal expansion coefficient obtained by weighting the first esophageal expansion coefficient and the second esophageal expansion coefficient to obtain and determine the target anastomosis device based on the dynamic esophageal end diameter; compared with the prior art, the technical solution of the present invention can improve the accuracy of anastomosis device selection.

[0140] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and substitutions can be made without departing from the technical principles of the present application. These improvements and substitutions should also be regarded as the scope of protection of the present application.

Claims

1. A method for selecting a stapler, characterized in that: include: Performing esophageal pressure measurement on the user based on the pressure sensor to obtain esophageal pressure signal data, calculating the pressure wave intensity, the pressure wave frequency and the pressure wave propagation speed based on the pressure signal data, and inputting the pressure wave intensity, the pressure wave frequency and the pressure wave propagation speed into a pre-trained expansion coefficient calculation model, so that the expansion coefficient calculation model outputs a first esophageal expansion coefficient; Obtaining esophageal ultrasonic images of the user in different esophageal states, and inputting the esophageal ultrasonic images into a pre-trained ultrasonic image detection model, respectively, so that the ultrasonic image detection model performs image edge processing on the esophageal ultrasonic images, outputs esophageal diameters corresponding to the esophageal ultrasonic images in different esophageal states, and calculates a second esophageal dilation coefficient based on the esophageal diameters; Acquire an intraoperative esophageal end image of the user based on a camera component, and perform image detection processing on the intraoperative esophageal end image based on a pre-trained image detection model to obtain an esophageal end diameter of the user; Performing weighted processing on the first esophageal expansion coefficient and the second esophageal expansion coefficient to obtain a weighted esophageal expansion coefficient, dynamically adjusting the esophageal end diameter based on the weighted esophageal expansion coefficient to obtain a dynamic esophageal end diameter, and determining a target stapler based on the dynamic esophageal end diameter; The step of inputting the pressure wave intensity, the pressure wave frequency, and the pressure wave propagation velocity into a pre-trained expansion coefficient calculation model so that the expansion coefficient calculation model outputs a first esophageal expansion coefficient specifically includes: Acquire an expansion coefficient model training data set, wherein the expansion coefficient model training data set includes a plurality of expansion coefficients, and a sample pressure wave intensity, a sample pressure wave frequency, and a sample pressure wave propagation velocity corresponding to each expansion coefficient; A multivariate linear regression model is created, and model training processing is performed on the multivariate linear regression model based on the expansion coefficient model training data set, so that the multivariate linear regression model outputs regression coefficients, intercept terms, and error terms; wherein the regression coefficients include a first regression coefficient corresponding to the pressure wave intensity, a second regression coefficient corresponding to the pressure wave frequency, and a third regression coefficient corresponding to the pressure wave propagation velocity; Inputting the first regression coefficient, the second regression coefficient, the third regression coefficient, the intercept term and the error term into the multivariate linear regression model to obtain an expansion coefficient calculation model; The pressure wave intensity, the pressure wave frequency and the pressure wave propagation velocity are input into the expansion coefficient calculation model so that the expansion coefficient calculation model outputs a first esophageal expansion coefficient; wherein the expansion coefficient calculation model is as follows: ; In the formula, is the first esophageal expansion coefficient, is the intercept term, is the first regression coefficient, is the second regression coefficient, is the third regression coefficient, is the error term, is the pressure wave intensity, is the pressure wave frequency, is the pressure wave propagation speed; The performing image detection processing on the intraoperative esophageal end image based on the pre-trained image detection model to obtain the esophageal end diameter of the user specifically includes: Gray-scale the intraoperative esophageal end image based on a pre-trained image detection model to obtain a gray-scale intraoperative esophageal end image; Extracting the shape of the esophagus wall from the grayscale intraoperative esophageal end image to obtain the shape of the inner wall and the outer wall of the esophagus; Calculating a first perimeter, a first area, and a first inner diameter of the esophageal inner wall shape, and calculating a second perimeter, a second area, and a second outer diameter of the esophageal outer wall shape; Based on the first perimeter and the second perimeter, a perimeter change ratio is calculated, and based on the first area and the second area, an area change ratio is calculated; Based on the circumference change ratio, the area change ratio and the second outer diameter, the first inner diameter is adjusted to obtain the esophageal end diameter.

2. A method for selecting a stapler according to claim 1, characterized in that: Based on the pressure signal data, the pressure wave intensity, the pressure wave frequency and the pressure wave propagation speed are calculated, specifically including: Performing filtering processing on the pressure signal data to obtain filtered pressure signal data; Based on a sliding window of a preset size, performing sliding average processing on the filtered pressure signal data to obtain smoothed pressure signal data; Traversing each smoothed pressure signal point in the smoothed pressure signal data, and comparing each smoothed pressure signal point with an adjacent smoothed pressure signal point corresponding to each smoothed pressure signal point, and determining a peak in the smoothed pressure signal data based on the comparison result; Based on the wave peaks, the waveform amplitude is calculated, and the waveform amplitude is used as the pressure wave intensity. The number of wave peaks is obtained, and the number of wave peaks is used as the pressure wave frequency. The first time difference between adjacent wave peaks is calculated, and based on the first time difference, the pressure wave propagation speed is calculated.

3. A method for selecting a stapler according to claim 1, characterized in that: Obtaining esophageal ultrasonic images of the user in different esophageal states, and inputting the esophageal ultrasonic images into a pre-trained ultrasonic image detection model, respectively, so that the ultrasonic image detection model performs image edge processing on the esophageal ultrasonic images, and outputs the esophageal diameters corresponding to the esophageal ultrasonic images in different esophageal states, specifically including: Based on the endoscopic ultrasound device, a first ultrasound signal is transmitted to the esophageal end region of the user, and the endoscopic ultrasound device is controlled to receive a second ultrasound signal returned by the esophageal end region, and based on the second ultrasound signal, an esophageal ultrasound image of the user in different esophageal states is obtained; wherein the esophageal ultrasound image includes an esophageal dilation ultrasound image, an esophageal contraction ultrasound image, and an esophageal rest ultrasound image; Inputting the esophageal dilation ultrasonic image into the ultrasonic image detection model so that the ultrasonic image detection model performs image edge processing on the esophageal dilation ultrasonic image to obtain the inner wall edge of the esophageal dilation, and determining the esophageal dilation diameter based on the inner wall edge of the esophageal dilation; Inputting the esophageal contraction ultrasonic image into the ultrasonic image detection model so that the ultrasonic image detection model performs image edge processing on the esophageal contraction ultrasonic image to obtain the esophageal contraction inner wall edge, and determining the esophageal contraction diameter based on the esophageal contraction inner wall edge; The esophageal resting ultrasonic image is input into the ultrasonic image detection model so that the ultrasonic image detection model performs image edge processing on the esophageal resting ultrasonic image to obtain the esophageal resting inner wall edge, and determines the esophageal resting diameter based on the esophageal resting inner wall edge.

4. A method for selecting a stapler according to claim 3, characterized in that: Based on the esophageal diameter, calculating a second esophageal expansion coefficient specifically includes: Substituting the esophageal dilation diameter and the esophageal resting diameter into a preset esophageal dilation coefficient calculation formula to obtain a first coefficient; Substituting the esophageal contraction diameter and the esophageal resting diameter into a preset esophageal contraction coefficient calculation formula to obtain a second coefficient; calculating a second esophageal dilation coefficient based on the first coefficient and the second coefficient; The calculation formula of the esophageal expansion coefficient is as follows: ; In the formula, is the first coefficient, is the dilated diameter of the esophagus, is the resting diameter of the esophagus; The calculation formula of the esophageal contraction coefficient is as follows: ; In the formula, is the second coefficient, is the contracted diameter of the esophagus, is the resting diameter of the esophagus.

5. A method for selecting a stapler according to claim 1, characterized in that: Based on the weighted esophageal expansion coefficient, the esophageal end diameter is dynamically adjusted to obtain a dynamic esophageal end diameter, and based on the dynamic esophageal end diameter, a target stapler is determined, specifically including: Inputting the weighted esophageal expansion coefficient and the esophageal end diameter into a preset dynamic esophageal end diameter calculation formula to obtain the dynamic esophageal end diameter; Obtaining all stapler diameters of the staplers, and arranging all the stapler diameters in ascending order to obtain a stapler diameter sequence; The stapler diameter sequence is traversed based on the dynamic esophageal end diameter to obtain a target stapler diameter that is larger than the dynamic esophageal end diameter that is traversed for the first time, and the previous stapler diameter of the target stapler diameter in the stapler diameter sequence is obtained, and the stapler corresponding to the previous stapler diameter is used as the target stapler.

6. A stapler selection device, characterized in that: include: A first esophageal expansion coefficient calculation module, a second esophageal expansion coefficient calculation module, an esophageal end diameter acquisition module and a stapler selection module; The first esophageal expansion coefficient calculation module is used to perform esophageal pressure measurement on the user based on the pressure sensor to obtain esophageal pressure signal data, calculate the pressure wave intensity, pressure wave frequency and pressure wave propagation speed based on the pressure signal data, and input the pressure wave intensity, the pressure wave frequency and the pressure wave propagation speed into the pre-trained expansion coefficient calculation model, so that the expansion coefficient calculation model outputs the first esophageal expansion coefficient; The second esophageal expansion coefficient calculation module is used to obtain esophageal ultrasonic images of the user in different esophageal states, respectively input the esophageal ultrasonic images into a pre-trained ultrasonic image detection model, so that the ultrasonic image detection model performs image edge processing on the esophageal ultrasonic images, outputs the esophageal diameters corresponding to the esophageal ultrasonic images in different esophageal states, and calculates the second esophageal expansion coefficient based on the esophageal diameters; The esophageal end diameter acquisition module is used to acquire an intraoperative esophageal end image of the user based on the camera assembly, and perform image detection processing on the intraoperative esophageal end image based on a pre-trained image detection model to obtain the esophageal end diameter of the user; The stapler selection module is used to perform weighted processing on the first esophageal expansion coefficient and the second esophageal expansion coefficient to obtain a weighted esophageal expansion coefficient, and dynamically adjust the esophageal end diameter based on the weighted esophageal expansion coefficient to obtain a dynamic esophageal end diameter, and determine a target stapler based on the dynamic esophageal end diameter; The first esophageal expansion coefficient calculation module is used to input the pressure wave intensity, the pressure wave frequency and the pressure wave propagation speed into a pre-trained expansion coefficient calculation model so that the expansion coefficient calculation model outputs a first esophageal expansion coefficient, specifically including: obtaining an expansion coefficient model training data set, wherein the expansion coefficient model training data set includes a plurality of expansion coefficients, and sample pressure wave intensity, sample pressure wave frequency and sample pressure wave propagation speed corresponding to each expansion coefficient; creating a multivariate linear regression model, and performing model training processing on the multivariate linear regression model based on the expansion coefficient model training data set so that the multivariate linear regression model Output regression coefficient, intercept term and error term; wherein the regression coefficient includes a first regression coefficient corresponding to the pressure wave intensity, a second regression coefficient corresponding to the pressure wave frequency and a third regression coefficient corresponding to the pressure wave propagation velocity; input the first regression coefficient, the second regression coefficient, the third regression coefficient, the intercept term and the error term into the multivariate linear regression model to obtain an expansion coefficient calculation model; input the pressure wave intensity, the pressure wave frequency and the pressure wave propagation velocity into the expansion coefficient calculation model so that the expansion coefficient calculation model outputs a first esophageal expansion coefficient; wherein the expansion coefficient calculation model is as follows: ; In the formula, is the first esophageal expansion coefficient, is the intercept term, is the first regression coefficient, is the second regression coefficient, is the third regression coefficient, is the error term, is the pressure wave intensity, is the pressure wave frequency, is the pressure wave propagation speed; Among them, the esophageal end diameter acquisition module is used to perform image detection processing on the intraoperative esophageal end image based on a pre-trained image detection model to obtain the esophageal end diameter of the user, specifically including: grayscale processing of the intraoperative esophageal end image based on the pre-trained image detection model to obtain a grayscale intraoperative esophageal end image; esophageal wall shape extraction on the grayscale intraoperative esophageal end image to obtain the esophageal inner wall shape and the esophageal outer wall shape; calculating the first circumference, first area and first inner diameter of the esophageal inner wall shape, and calculating the second circumference, second area and second outer diameter of the esophageal outer wall shape; calculating the circumference change ratio based on the first circumference and the second circumference, and calculating the area change ratio based on the first area and the second area; adjusting the first inner diameter based on the circumference change ratio, the area change ratio and the second outer diameter to obtain the esophageal end diameter.

7. A terminal device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the stapler selection method as described in any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the stapler selection method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Abnormity detection method and system for esophageal endoscope image, medium and equipment

    CN116091446A

  • Gastroesophageal joint contraction integral acquisition method, device, equipment and medium

    CN117934446A