Intelligent endoscope decontamination state monitoring system based on image recognition
Through an intelligent monitoring system based on image recognition, images during the endoscopic cleaning process are collected and processed in real time, pollutant types are identified and the effect of evaluating the decontamination effect is solved, and the traditional methods cannot monitor the endoscopic cleaning status in real time and accurately, achieving an efficient and safe endoscopic cleaning process.
Patent Information
- Application Number
- CN202510600581.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-06-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional endoscopic cleaning monitoring methods rely on manual examination or chemical indicators, and cannot achieve real-time, accurate and comprehensive monitoring of the endoscopic cleaning status, especially difficult to identify stains or bacterial residues that are difficult to recognize with the naked eye.
Using an intelligent monitoring system based on image recognition, the endoscopic cleaning image acquisition module collects image frames in real time and performs detailed pre-processing. The endoscopic pollutant recognition module recognizes the endoscopic contour and contaminant type, the endoscopic cleaning status evaluation module evaluates the cleaning effect, and alarms in real time through the endoscopic cleaning status alarm module.
Real-time, accurate and comprehensive monitoring of the endoscopic decontamination status is achieved, improving the accuracy and timeliness of decontamination operations, ensuring that the endoscopic meets the prescribed hygiene standards, and reducing the risk of cross-infection.
Smart Images

Figure CN120107899A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to an intelligent monitoring system for endoscope disinfection status based on image recognition. Background Art
[0002] In recent years, the cleaning status of the endoscope surface can be obtained in real time by combining high-resolution cameras with image processing technology, and the presence of stains, residues or incomplete disinfection areas can be determined by image analysis algorithms. Compared with traditional manual inspection or chemical indication methods, intelligent monitoring methods based on image recognition have higher accuracy, automation and repeatability, and can comprehensively and objectively evaluate the cleaning and disinfection process of endoscopes. However, traditional endoscope disinfection monitoring methods mainly rely on manual inspection or chemical indicators to confirm the cleanliness and disinfection effect of endoscopes. The accuracy and consistency of manual inspection are easily affected by the operator's experience. Chemical indicators can only provide references in some aspects and cannot fully monitor the entire process of endoscope cleaning and disinfection. In addition, there are some stains or bacterial residues inside the endoscope that are difficult to identify with the naked eye. Traditional methods cannot achieve real-time, accurate and comprehensive monitoring of the endoscope disinfection status, which reduces the accuracy and timeliness of endoscope disinfection operations. Summary of the invention
[0003] Based on this, it is necessary for the present invention to provide an intelligent monitoring system for endoscope disinfection status based on image recognition to solve at least one of the above-mentioned technical problems.
[0004] To achieve the above purpose, an intelligent monitoring system for endoscope disinfection status based on image recognition includes the following modules: An endoscope decontamination image acquisition module is used to acquire an endoscope decontamination scene image frame corresponding to the endoscope decontamination process in real time in the endoscope decontamination working area, and perform image frame detail preprocessing to generate an endoscope decontamination standard image frame; An endoscope contaminant identification module is used to identify and locate the endoscope contour of the standard image frame of the endoscope decontamination link, so as to obtain the endoscope contour position corresponding to the endoscope decontamination link image; based on the endoscope contour position corresponding to the endoscope decontamination link image, the contaminant type of the corresponding decontamination start image in the standard image frame of the endoscope decontamination link is identified, so as to obtain the type of contaminant corresponding to the endoscope surface, including blood stains or mucus; The endoscope decontamination status evaluation module is used to obtain the corresponding endoscope decontamination solution concentration and endoscope decontamination time according to the type of pollutants corresponding to the endoscope surface, and obtain the corresponding decontamination end image from the endoscope decontamination link standard image frame according to the endoscope decontamination time; based on the endoscope decontamination solution concentration and the endoscope decontamination time, the decontamination status effect evaluation is performed on the decontamination end image to obtain the endoscope decontamination status evaluation effect; The endoscope disinfection status alarm module is used to store the endoscope disinfection status assessment results in real time in the local database, and upload them to the hospital information management system through a secure network communication protocol to query and trace the corresponding endoscope disinfection status assessment results. If it is judged that the endoscope disinfection status assessment result indicates that the area size of the corresponding pollutants remaining on the surface of the endoscope exceeds the predetermined range, it means that the endoscope disinfection is not compliant, and an alarm message is automatically sent to the relevant disinfection operator, otherwise it will not be sent.
[0005] Furthermore, the endoscope disinfection image acquisition module includes the following functions: By setting a high-definition camera in the working area of the endoscope decontamination link to collect the endoscope decontamination image frames corresponding to each decontamination link in the endoscope decontamination process in real time, including the decontamination link scene image frames corresponding to the endoscope, decontamination equipment, operation work and decontamination liquid, to generate the endoscope decontamination link scene image frames; Grayscale processing is performed on the endoscope washing process scene image frame to obtain the endoscope washing process grayscale image frame; Calculate the pixel fuzziness of the grayscale image frame of the endoscope washing process to obtain the pixel fuzziness of the endoscope washing image frame; Based on the pixel fuzziness of the endoscope washing image frame, the grayscale image frame of the endoscope washing link is subjected to fuzzy filtering and noise reduction processing, so as to filter and remove the corresponding fuzzy noise interference in the image frame, so as to obtain the denoised image frame of the endoscope washing link; The detail histogram equalization processing is performed on the noise reduction image frames of the endoscope decontamination link, so as to enhance the detail contrast corresponding to the endoscope decontamination image frames through histogram equalization, and make the corresponding details in the endoscope decontamination image frames clearer, so as to generate the standard image frames of the endoscope decontamination link.
[0006] Furthermore, the endoscope contaminant identification module includes the following functions: The image background and foreground mask separation is performed on the standard image frame of the endoscope decontamination link, so as to separate the endoscope foreground from the decontamination link background by using the threshold segmentation corresponding to the image gradient and texture features, and the separated endoscope foreground area generates a corresponding binary mask image, wherein the endoscope foreground area is white and the value is 1, and the decontamination link background area is black and the value is 0, so as to generate an endoscope decontamination separation binary mask image frame; The rough topological structure of the contour of the endoscope washing and separation binary mask image frame is analyzed to obtain the rough topological structure curve of the endoscope contour; Perform curve fitting contour point positioning on the topological structure curve of the rough contour of the endoscope to obtain the key points of the spline fitting curve of the endoscope contour; Based on the key points of the endoscope contour spline fitting curve, the endoscope foreground area contour corresponding to the endoscope decontamination separation binary mask image frame is identified and located to obtain the endoscope contour position corresponding to the endoscope decontamination link image; Based on the endoscope contour position corresponding to the endoscope decontamination link image, the contaminant type is identified in the decontamination start image corresponding to the endoscope decontamination link standard image frame to obtain the type of contaminant corresponding to the endoscope surface, including blood or mucus.
[0007] Furthermore, the rough topological structure analysis of the endoscope washing and separation binary mask image frame includes: The Suzuki algorithm is used to roughly extract the regional contour of the endoscope foreground area corresponding to the endoscope washing and separation binary mask image frame to obtain the approximate contour of the endoscope foreground area; Performing contour structure topological transformation on the rough contour of the endoscope foreground area to generate a contour topological structure of the endoscope foreground area; Performing contour topology recognition analysis on the contour topology structure of the endoscope foreground area to identify and analyze the connectivity and interconnected branching conditions of the corresponding endoscope contour topology, and obtaining the topological connectivity and branching structure number corresponding to the contour structure of the endoscope foreground area; Based on the topological connectivity and the number of branch structures corresponding to the contour structure of the endoscope foreground area, the rough topological structure analysis of the contour of the endoscope foreground area corresponding to the endoscope disinfection and separation binary mask image frame was performed to obtain the rough contour topological structure curve of the endoscope, including whether the contour of the endoscope foreground area corresponds to a closed curve and whether there are branch structures connected to each other.
[0008] Furthermore, the positioning of the contour points by curve fitting of the topological structure curve of the general contour of the endoscope includes: Performing profile curve fitting on the endoscope profile structure curve corresponding to the endoscope general profile topological structure curve condition to generate an endoscope profile topological structure fitting curve; Performing a morphological refinement operation on the endoscope contour topological structure fitting curve, so as to remove the corresponding curve drawing deformation interference area in the fitting curve by using corresponding dilation and erosion morphological operations, and generating an endoscope contour structure refinement fitting curve; Performing contour spline interpolation smoothing on the endoscope contour structure refinement fitting curve, and using spline interpolation fitting to smooth the corresponding endoscope contour curve in combination with the endoscope connection topological structure information, to generate an endoscope contour structure spline fitting smoothing curve; The key points of the contour curve are located on the spline fitting smooth curve of the endoscope contour structure to locate the corresponding position points of the head, bend and interface on the endoscope contour to obtain the key points of the spline fitting curve of the endoscope contour.
[0009] Further, the identifying of the pollutant type of the decontamination start image corresponding to the decontamination start image in the standard image frame of the decontamination link of the endoscope based on the endoscope contour position corresponding to the endoscope decontamination link image includes: Obtain the start time of the endoscope decontamination phase; Based on the start time point of the endoscope decontamination phase, the start point matching and extraction of the standard image frame of the endoscope decontamination phase are performed to obtain the start image of the endoscope decontamination phase; Based on the endoscope contour position corresponding to the endoscope decontamination link image, the endoscope contour surface is registered and positioned on the endoscope decontamination link start image to obtain the endoscope contour positioning surface corresponding to the endoscope decontamination link start image; Perform surface contaminant feature analysis on the endoscope contour positioning surface corresponding to the endoscope decontamination start image to obtain the contaminant color, texture and shape features corresponding to the endoscope contour surface of the start image; A pre-established endoscope contaminant feature library is obtained, and based on the pre-established endoscope contaminant feature library, the contaminant color, texture and shape features corresponding to the endoscope contour surface of the starting image are compared and identified to obtain the type of contaminant corresponding to the endoscope surface, including blood or mucus.
[0010] Furthermore, the endoscope decontamination status assessment module includes the following functions: According to the types of pollutants corresponding to the endoscope surface, the corresponding endoscope decontamination solution concentration and endoscope decontamination time are obtained; Obtain the duration of initial preparation for endoscope decontamination; The actual operation time of the endoscope decontamination process is calculated based on the initial preparation time of the endoscope decontamination and the corresponding endoscope decontamination time; Determine the end time point of the endoscope decontamination link based on the actual operation time of the endoscope decontamination link, and obtain the corresponding decontamination end image from the standard image frame of the endoscope decontamination link according to the end time point of the endoscope decontamination link; The decontamination status effect of the decontamination end image is evaluated based on the concentration of the endoscope decontamination solution and the endoscope decontamination time to obtain the endoscope decontamination status evaluation effect.
[0011] Further, obtaining the corresponding endoscope cleaning solution concentration and endoscope cleaning time according to the type of pollutants corresponding to the endoscope surface includes: According to the pollutant types corresponding to the surface of the endoscope, the corresponding corrosion pollution level on the surface of the endoscope is obtained; By setting different concentration gradients of cleaning solution, and conducting experiments to determine the residual contamination of endoscopes based on the different concentration gradients of cleaning solution for the corrosion contamination levels of different pollutant types on the endoscope surface, the residual contamination of endoscopes corresponding to different pollutant types under each concentration gradient of cleaning solution is obtained; According to the analysis of the endoscope contamination residual amount corresponding to different types of pollutants under each concentration gradient of the decontamination solution, the optimal decontamination concentration of the endoscope decontamination solution for the corresponding type of pollutants is determined; The time series variation trend of the endoscope contamination residue corresponding to different types of pollutants at each concentration gradient of the decontamination solution was analyzed to obtain the variation trend of the contamination residue corresponding to different types of pollutants at each concentration gradient of the decontamination solution; Based on the residual contamination change trend corresponding to different types of pollutants under each concentration gradient of the decontamination solution, the endoscope decontamination time corresponding to the type of pollutant on the endoscope surface is deduced to obtain the corresponding endoscope decontamination time.
[0012] Furthermore, the evaluation of the decontamination status effect of the decontamination completion image based on the concentration of the endoscope decontamination solution and the decontamination time of the endoscope includes: Based on the concentration of endoscope decontamination solution and the duration of endoscope decontamination, the pollutant decontamination removal calculation formula is used to calculate the removal rate of pollutants on the surface of the endoscope corresponding to the endoscope decontamination process, so as to obtain the endoscope decontamination pollutant removal rate; Identify the contaminated residual area of the endoscope foreground area corresponding to the endoscope decontamination image to obtain the contaminated residual area after the endoscope decontamination; Based on the endoscope decontamination pollutant removal rate, the contaminated residual area at the end of endoscope decontamination is predicted to obtain the size of the contaminated residual area at the end of endoscope decontamination; The disinfection status effect of the disinfection end image is evaluated based on the size of the residual contamination area at the end of endoscope disinfection. If the size of the residual contamination area at the end of endoscope disinfection exceeds the specified range of endoscope surface contamination, it will be judged as unqualified for disinfection; otherwise, it will be judged as compliant for disinfection, so as to obtain the evaluation effect of endoscope disinfection status.
[0013] Furthermore, the pollutant cleaning and removal calculation formula is specifically: ; In the formula, is the endoscope decontamination contaminant removal rate, is the total mass corresponding to the distribution of pollutants on the endoscope surface, The duration of endoscope decontamination. is the time variable, is the concentration of endoscope decontamination solution, is an exponential function, For in time The cumulative area corresponding to the distribution of pollutants on the endoscope surface at time, is the total surface area of the endoscope.
[0014] Beneficial effects of the present invention: The intelligent monitoring system for endoscope disinfection status based on image recognition proposed in the present invention is generally composed of an endoscope disinfection image acquisition module, an endoscope contaminant identification module, an endoscope disinfection status evaluation module and an endoscope disinfection status alarm module. Compared with the prior art, the beneficial effect of the present application lies in that the image frames corresponding to the endoscope disinfection process are collected in real time in the working area of the endoscope disinfection link, and the image is first preprocessed in detail to generate a standard image frame. The key to this step is that through real-time image acquisition, the entire process of endoscope disinfection can be comprehensively recorded and monitored, which helps to ensure that each link in the disinfection process has corresponding image data support, and provides a reliable data source for subsequent quality evaluation. Through image detail preprocessing, image noise can be effectively removed, image quality can be improved, and the image can be ensured to be clearer and more accurate in subsequent processing. Image detail preprocessing also includes adjusting brightness, contrast, sharpening and other technologies to make the details, contours, surface contaminants, etc. of the endoscope more prominent, thereby facilitating the accurate identification and analysis of subsequent algorithms, which can ensure the consistency and efficiency of the processing, and can also maintain good stability under different disinfection cycles and environments, thereby improving the reliability and accuracy of endoscope disinfection. Secondly, the contour position of the endoscope is located by endoscope contour recognition technology, and the type of contaminants is further identified. The key to this step is that the contour recognition of the endoscope is the basis for judging whether the endoscope is in the standard disinfection state. It can accurately determine the position and state of the endoscope in the image, and then optimize the accuracy of subsequent contaminant identification. The core significance of contaminant type identification is that by accurately identifying the types of contaminants such as blood and mucus remaining on the surface of the endoscope, it can provide an important reference for subsequent disinfection treatment. Blood and mucus are common endoscope contaminants, which not only affect the use effect of the endoscope, but also may cause health risks such as cross-infection. Therefore, timely and accurate identification of the types of contaminants helps to select the corresponding cleaning methods and disinfection liquid formulas according to different contaminants, so that the stains or bacteria remaining on the endoscope can be identified, thereby realizing real-time, accurate and comprehensive monitoring of the disinfection status of the endoscope, and improving the safety and hygiene standards of endoscope use. Then, by obtaining the concentration and duration of the endoscope disinfection solution according to the type of pollutants, and performing a status evaluation of the disinfection end image based on these parameters, the disinfection treatment can be customized according to the type and quantity of pollutants by adjusting the disinfection solution concentration and disinfection time, thereby improving the targetedness and effectiveness of disinfection. Different types of pollutants require different cleaning intensities and durations. Therefore, through this intelligent adjustment mechanism, the thorough cleaning of the endoscope can be guaranteed to prevent secondary contamination or cross-infection caused by insufficient cleaning. In addition, the disinfection status effect evaluation helps to monitor the quality of endoscope disinfection in real time, ensuring that each batch of endoscopes meets the prescribed hygiene standards during the disinfection process, and avoiding potential risks caused by unqualified cleaning effects.Finally, by storing the endoscope disinfection status assessment results in real time in the local database and uploading them to the hospital information management system through a secure network communication protocol for query and traceability, the accuracy, completeness and traceability of the information can be effectively guaranteed by real-time storage and uploading of the endoscope disinfection status assessment results, meeting the strict requirements of the medical industry for data management. Through network transmission, the disinfection status assessment results can be remotely monitored and reviewed, providing real-time data support for hospital management, helping them to identify problems and make decisions in a timely manner, thereby improving the accuracy and timeliness of endoscope disinfection operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments thereof made with reference to the following drawings: Figure 1 It is a module schematic diagram of the endoscope decontamination status intelligent monitoring system based on image recognition of the present invention; Figure 2 for Figure 1 Schematic diagram of the functional flow of the endoscope decontamination image acquisition module; Figure 3 for Figure 1 Schematic diagram of the functional flow of the endoscope contaminant identification module. DETAILED DESCRIPTION
[0016] The technical system of the present invention is described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.
[0017] To achieve this, please refer to Figures 1 to 3 The present invention provides an intelligent monitoring system for endoscope disinfection status based on image recognition, and the system includes the following modules: An endoscope decontamination image acquisition module is used to acquire an endoscope decontamination scene image frame corresponding to the endoscope decontamination process in real time in the endoscope decontamination working area, and perform image frame detail preprocessing to generate an endoscope decontamination standard image frame; An endoscope contaminant identification module is used to identify and locate the endoscope contour of the standard image frame of the endoscope decontamination link, so as to obtain the endoscope contour position corresponding to the endoscope decontamination link image; based on the endoscope contour position corresponding to the endoscope decontamination link image, the contaminant type of the corresponding decontamination start image in the standard image frame of the endoscope decontamination link is identified, so as to obtain the type of contaminant corresponding to the endoscope surface, including blood stains or mucus; The endoscope decontamination status evaluation module is used to obtain the corresponding endoscope decontamination solution concentration and endoscope decontamination time according to the type of pollutants corresponding to the endoscope surface, and obtain the corresponding decontamination end image from the endoscope decontamination link standard image frame according to the endoscope decontamination time; based on the endoscope decontamination solution concentration and the endoscope decontamination time, the decontamination status effect evaluation is performed on the decontamination end image to obtain the endoscope decontamination status evaluation effect; The endoscope disinfection status alarm module is used to store the endoscope disinfection status assessment results in real time in the local database, and upload them to the hospital information management system through a secure network communication protocol to query and trace the corresponding endoscope disinfection status assessment results. If it is judged that the endoscope disinfection status assessment result indicates that the area size of the corresponding pollutants remaining on the surface of the endoscope exceeds the predetermined range, it means that the endoscope disinfection is not compliant, and an alarm message is automatically sent to the relevant disinfection operator, otherwise it will not be sent.
[0018] In the embodiment of the present invention, please refer to Figure 1 FIG. 1 is a schematic diagram of a module of an intelligent monitoring system for endoscope decontamination status based on image recognition according to the present invention. In this example, the intelligent monitoring system for endoscope decontamination status based on image recognition includes the following modules: S1: an endoscope decontamination image acquisition module, which is used to acquire the endoscope decontamination scene image frames corresponding to the endoscope decontamination process in real time in the endoscope decontamination working area, and perform image frame detail preprocessing to generate endoscope decontamination standard image frames; In an embodiment of the present invention, an industrial-grade camera with high resolution (such as 5 million pixels) and stable frame rate (30 frames per second) is installed in the working area of the endoscope disinfection link. The camera is connected to the local data acquisition device through a high-speed data line. The camera is set to collect scene image frames corresponding to the endoscope disinfection process in real time at a frequency of 1 frame per second from the time the endoscope enters the disinfection process. The collected image frames are temporarily stored in the cache area of the local data acquisition device. After that, the image frames in the cache area are pre-processed in detail using the Python OpenCV library on the data processing workstation. First, the cv2.cvtColor function is used to convert the color image frame into a grayscale image frame to simplify the subsequent processing flow. Next, the median filtering algorithm is used to denoise the grayscale image frames through the cv2.medianBlur function, and the convolution kernel size is set to 5×5 to effectively remove interference such as salt and pepper noise in the image. Then, the histogram equalization technology is used to enhance the contrast of the image through the cv2.equalizeHist function to make the image details clearer. Finally, the processed image frames are stored in the designated folder of the data processing workstation in chronological order. The first half of the file name is the start time of disinfection, and the second half is the image frame number. These processed image frames are the standard image frames of the endoscope disinfection link.
[0019] S2: Endoscope contaminant identification module, used to identify and locate the endoscope contour of the endoscope disinfection link standard image frame to obtain the endoscope contour position corresponding to the endoscope disinfection link image; based on the endoscope contour position corresponding to the endoscope disinfection link image, identify the contaminant type of the disinfection start image corresponding to the endoscope disinfection link standard image frame to obtain the type of contaminant corresponding to the endoscope surface, including blood or mucus; In an embodiment of the present invention, the endoscope contour is identified and located on the standard image frame of the endoscope disinfection link by using Python's OpenCV library and the deep learning framework TensorFlow on a data processing workstation, and the first frame of the image is read from the specified folder as the starting point of the analysis. First, the edge detection algorithm of OpenCV, such as the Canny algorithm, is used to set the low threshold to 30 and the high threshold to 100 through the cv2.Canny function to detect the edge information in the image. Then, the semantic segmentation model of deep learning, such as the U-Net model, is used to load the pre-trained weights under the TensorFlow framework and fine-tune them, so that the image after edge detection is input into the fine-tuned U-Net model, and the model outputs the segmentation result of the endoscope contour, and the contour of the endoscope in the image is determined by analyzing the segmentation result. The position of the endoscope is determined, and the coordinates of the circumscribed rectangle and the geometric center coordinates of the endoscope outline are recorded. Based on the determined position of the endoscope outline, images near the start time of disinfection (assuming it is within plus or minus 5 seconds) are selected from the standard image frame folder as the start time of disinfection. The pre-trained convolutional neural network model under the TensorFlow framework, such as ResNet101, is also used to identify the type of pollutants in the start image of disinfection. The image is resized to 224×224 pixels, and the pixel values are normalized to the range of [0, 1] before being input into the model. After the model is operated through convolution, pooling, full connection and other layers, the model outputs the prediction result of the pollutant type in the image. If the probability of blood in the output result is 0.8 and the probability of mucus is 0.2, it is determined that the type of pollutant corresponding to the surface of the endoscope is blood, and it is recorded in the log file of the data processing workstation.
[0020] S3: Endoscope decontamination status evaluation module, used to obtain the corresponding endoscope decontamination solution concentration and endoscope decontamination time according to the type of pollutants corresponding to the endoscope surface, and obtain the corresponding decontamination end image from the endoscope decontamination link standard image frame according to the endoscope decontamination time; based on the endoscope decontamination solution concentration and the endoscope decontamination time, the decontamination state effect evaluation is performed on the decontamination end image to obtain the endoscope decontamination state evaluation effect; In an embodiment of the present invention, by reading the pollutant type information corresponding to the endoscope surface from the previously generated log file, assuming that it is bloodstains, and accessing the locally stored endoscope disinfection parameter database, the database is stored in a table form, each row corresponds to a pollutant type, and each column records the parameters such as the concentration of the endoscope disinfection solution and the endoscope disinfection time required for the pollutant. A program is written in Python, and by querying the database table, a row of data with the pollutant type of "bloodstains" is found. It is assumed that the corresponding endoscope disinfection solution concentration is 0.6%, and the endoscope disinfection time is 18 minutes. According to the endoscope disinfection time, the image at the corresponding time point is selected from the standard image frame folder of the endoscope disinfection link as the disinfection end image. It is assumed that the disinfection start time is "2024-07-10 10:05:00" and the disinfection time is 18 minutes, that is, 1080 seconds, then the disinfection end time is approximately "2024-07-10 10:23:00", filter out images with shooting time near this time point (assuming it is within plus or minus 5 seconds), such as "20240710102302-108.jpg" as the decontamination end image, and use Python's image processing library and the pre-established decontamination effect evaluation model to evaluate the decontamination state effect of the decontamination end image based on the endoscope decontamination solution concentration of 0.6% and the endoscope decontamination time of 18 minutes, and preprocess the end decontamination image, such as adjusting the image size to a uniform size of 224×224 pixels, normalizing the pixel value to the range of [0, 1], and using the preprocessed image, decontamination solution concentration, and decontamination time as input data, and input them into the pre-trained convolutional neural network decontamination effect evaluation model. The model outputs an evaluation result, such as qualified or unqualified decontamination, through operations such as convolution, pooling, and full connection. Assuming that the output result is qualified decontamination, the endoscope decontamination state evaluation effect is recorded in a temporary file of the data processing workstation.
[0021] S4: Endoscope disinfection status alarm module, used to store the endoscope disinfection status assessment results in real time in the local database, and upload them to the hospital information management system through a secure network communication protocol to query and trace the corresponding endoscope disinfection status assessment results. If it is judged that the endoscope disinfection status assessment result indicates that the area size of the corresponding pollutants remaining on the surface of the endoscope exceeds the predetermined range, it means that the endoscope disinfection is not compliant, and an alarm message is automatically sent to the relevant disinfection operator, otherwise it will not be sent.
[0022] In the embodiment of the present invention, by using Python's database operation library, such as sqlite3, the previously generated endoscope decontamination status evaluation results are stored in real time in a local SQLite database. At the same time, by creating a database file, a table named "decontamination_results" is created in it, which contains fields such as endoscope number, decontamination time, pollutant type, decontamination status evaluation results, etc. Assume that the endoscope number of this decontamination is "E001", the decontamination time is "2024-07-10 10:05:00 - 10:23:00", the type of pollutant is "blood", and the decontamination status assessment result is "qualified". These data are inserted into the "decontamination_results" table. At the same time, a secure network communication protocol, such as the HTTPS protocol, is used to upload these data to the hospital information management system through the Python requests library. During the upload process, the data is packaged and sent according to the data format and interface requirements specified by the hospital information management system. After receiving the data, the hospital information management system stores it in its corresponding database to facilitate medical staff to query and trace the corresponding endoscope decontamination status assessment results. On the data processing workstation, a regular inspection mechanism is set up to read the latest endoscope decontamination status assessment results from the local database every hour. If it is judged that the endoscope decontamination status assessment result indicates that the area size of the corresponding pollutant residue on the endoscope surface exceeds the predetermined range (assuming that the predetermined range is 5% of the endoscope surface area), an alarm message is automatically sent to the relevant decontamination operator through the hospital's internal communication system, such as the SMS platform or the interface of the instant messaging software, to inform the decontamination operator of the unqualified situation; if it does not exceed the predetermined range, no alarm message is sent.
[0023] Further, as an embodiment of the present invention, refer to Figure 2 As shown, Figure 1 The functional flow diagram of the endoscope disinfection image acquisition module in this embodiment includes the following functions: S11: a high-definition camera is set in the working area of the endoscope decontamination link to collect the endoscope decontamination image frames corresponding to each decontamination link in the endoscope decontamination process in real time, including the decontamination link scene image frames corresponding to the endoscope, decontamination equipment, operation work and decontamination liquid, so as to generate the endoscope decontamination link scene image frames; In an embodiment of the present invention, a high-definition camera with high resolution (such as 5 million pixels) is installed in the working area of the endoscope disinfection link. The installation position of the camera is carefully designed to ensure that all aspects of the endoscope disinfection can be captured in an all-round and no-dead-angle manner. For example, the camera is installed directly above the disinfection area, and the angle can be fine-tuned so that it can clearly capture the endoscope, disinfection equipment, the operator's movements, and the use of disinfection liquid. The camera is connected to the local storage device through a high-speed data line, and the camera is set to automatically capture a frame of image every 10 seconds. When the endoscope enters the disinfection process, in the pretreatment stage, the camera captures the scene of the endoscope being placed in the cleaning tank and the operator adding disinfection liquid, and a frame of image is captured. The image clearly shows the shape of the endoscope, the appearance of the disinfection equipment, and each frame of the operator's action image holding the disinfection tool, and is stored in the local storage device, stored in chronological order, and the scene image frames corresponding to each disinfection link in the endoscope disinfection process are continuously collected, and finally a series of endoscope disinfection link scene image frames are generated.
[0024] S12: grayscale processing is performed on the endoscope washing process scene image frame to obtain an endoscope washing process grayscale image frame; In an embodiment of the present invention, the collected image frames of the endoscope disinfection scene are gray-scaled by using Python's OpenCV library on a data processing workstation, and the image frames are read from a local storage device, for example, an image with a file name of "20240601100001.jpg" is read. The cv2.cvtColor function in the OpenCV library is used to realize the conversion of the image color space and convert the color image into a grayscale image. The function performs a weighted summation on the pixel values of the red, green, and blue channels of the color image through a certain algorithm. The weight coefficients commonly used are: the red channel weight is 0.299, the green channel weight is 0. .587, blue channel weight 0.114. Taking a certain pixel in the image as an example, its color value is (R=200, G=150, B=100). After grayscale calculation, the grayscale value = 0.299×200+0.587×150+0.114×100=157.55. After rounding, the grayscale value of the pixel is 158. Such calculation is performed on all pixels in the image to convert the entire color image into a grayscale image, and the grayscale image frame of the endoscope disinfection link is obtained. It is stored in the specified folder of the data processing workstation and the file name is changed to "20240601100001-gray.jpg".
[0025] S13: Calculating pixel fuzziness of the grayscale image frame of the endoscope washing process to obtain pixel fuzziness of the endoscope washing image frame; In the embodiment of the present invention, the pixel blurriness of the grayscale image frame of the endoscope decontamination process is calculated by using Python's OpenCV library on the data processing workstation, and the blurriness of the image is calculated by using the Laplace operator. First, the grayscale image frame generated previously is read, and the image is Laplace transformed by the cv2.Laplacian function of OpenCV. The function calculates the second-order derivatives of the image in the horizontal and vertical directions. For a certain pixel point in the image, the Laplace transform calculates the grayscale value change of the surrounding pixels according to the grayscale value change of the surrounding pixels. A value. If the grayscale value around the pixel changes smoothly, it means that the image is blurred in this area, and the value obtained by Laplace transform is smaller. On the contrary, if the grayscale value changes dramatically, it means that the image is rich in details and the value obtained by Laplace transform is larger. The variance of the Laplace transform value of the entire image is calculated and used as the blur index of the image. For example, after calculation, the variance of the Laplace transform value of the image is 50, and this value is the pixel blur of the endoscope disinfection image frame. The blur value is recorded in the log file of the data processing workstation and stored in association with the corresponding image file name.
[0026] S14: performing fuzzy filtering and noise reduction processing on the grayscale image frame of the endoscope washing process based on the pixel fuzziness of the endoscope washing image frame, so as to filter and remove the corresponding fuzzy noise interference in the image frame, so as to obtain a noise reduction image frame of the endoscope washing process; In the embodiment of the present invention, based on the previously obtained pixel blur of the endoscope disinfection image frame, the grayscale image frame of the endoscope disinfection link is subjected to fuzzy filtering and noise reduction processing by using Python's OpenCV library on the data processing workstation. If the pixel blur of the image frame exceeds a preset threshold (assuming the threshold is 40), it indicates that there is a lot of fuzzy noise interference in the image, and filtering processing is required. The Gaussian filtering algorithm is adopted and implemented by the cv2.GaussianBlur function of OpenCV. The function performs weighted averaging on each pixel in the image according to the set Gaussian kernel size and standard deviation, for example , its blurriness is 50, which exceeds the threshold. The Gaussian kernel size is set to (5, 5), the standard deviation is 1.5, and the image is Gaussian filtered. During the filtering process, for a certain pixel in the image, a 5×5 neighborhood is taken with the pixel as the center, and the weight of each pixel in the neighborhood is calculated according to the Gaussian distribution function. Then, the grayscale values of the pixels in the neighborhood are weighted averaged to obtain the grayscale value of the pixel after filtering. This operation is performed on all pixels in the image, thereby filtering and removing the corresponding blur noise interference in the image frame, obtaining the denoised image frame of the endoscope disinfection link, and storing it in the specified folder of the data processing workstation.
[0027] S15: performing detail histogram equalization processing on the denoised image frame of the endoscope washing process, so as to enhance the detail contrast corresponding to the endoscope washing image frame through histogram equalization, and make the corresponding details in the endoscope washing image frame clearer, so as to generate a standard image frame of the endoscope washing process.
[0028] In an embodiment of the present invention, by using Python's OpenCV library on a data processing workstation to perform detail histogram equalization on the denoised image frames of the endoscope decontamination link, the previously generated denoised image frames are read, and the CLAHE (contrast limited adaptive histogram equalization) algorithm is adopted. The CLAHE object is created by the cv2.createCLAHE function of OpenCV, and the contrast limit is set to 2.0 and the tile size is (8, 8). For each 8×8 small area (tile) in the image, the CLAHE algorithm will count the grayscale value distribution of the pixels in the area, and then calculate the grayscale value distribution of the pixels based on the grayscale value distribution of the pixels. The grayscale values are remapped according to certain rules to make the grayscale value distribution in the area more uniform, thereby enhancing the detail contrast of the image. For example, in a certain 8×8 area, the grayscale values of most pixels were originally concentrated in a smaller range. After CLAHE processing, the grayscale value distribution range becomes wider and the image details are clearer. This processing is performed on all small areas of the entire image to obtain an endoscopic disinfection image frame with clearer details, that is, a standard image frame for the endoscopic disinfection link, and it is stored in the final storage folder of the data processing workstation to provide high-quality image data for subsequent image recognition and analysis.
[0029] Further, as an embodiment of the present invention, refer to Figure 3 As shown, Figure 1 The functional flow diagram of the endoscope contaminant identification module is shown in FIG. 1 . In this embodiment, the endoscope contaminant identification module includes the following functions: S21: performing image background and foreground mask separation on the standard image frame of the endoscope decontamination link, so as to separate the endoscope foreground from the decontamination link background by using threshold segmentation corresponding to the image gradient and texture features, and generating a corresponding binary mask image for the separated endoscope foreground area, wherein the endoscope foreground area is white and has a value of 1, and the decontamination link background area is black and has a value of 0, so as to generate an endoscope decontamination separation binary mask image frame; In an embodiment of the present invention, the image background and foreground mask of the standard image frame of the endoscope disinfection link are separated by using the OpenCV library of Python, and the previously generated standard image frame is read. First, the cv2.Canny function of OpenCV is used for edge detection. This function identifies the edge by calculating the gradient strength and direction of the image. The low threshold is set to 50 and the high threshold is set to 150 to highlight the obvious edges in the image. Then, based on the detected edges, the cv2.findContours function is used to find the contour. In the contour search process, appropriate parameters are set, such as the contour retrieval mode is cv2.RETR_EXTERNAL (only the outer contour is detected) and the contour approximation method is cv2.CHAIN_APPROX_SIMPLE (only the endpoints of the contour are retained). For the contours found, the contours that may belong to the endoscope are screened out according to their area and shape characteristics. Assuming that a contour with a large area and a shape that meets the characteristics of the endoscope is screened out, use the cv2.drawContours function to create a blank image with the same size as the standard image frame, and draw the screened endoscope contour on the blank image, so that the foreground area of the endoscope is white (value is 1), and the background area of the remaining disinfection links is black (value is 0). The corresponding binary mask image, that is, the endoscope disinfection separation binary mask image frame, is generated and stored in the specified folder of the data processing workstation.
[0030] S22: performing a rough topological structure analysis on the endoscope washing and separation binary mask image frame to obtain a rough topological structure curve of the endoscope; In an embodiment of the present invention, the rough topological structure analysis of the binary mask image frame of endoscope washing and separation is performed by using Python's OpenCV library to read the previously generated binary mask image frame, and the contour in the image is searched again by the cv2.findContours function. At this time, since the image is already a binary mask image, the contour search is more accurate. For the found endoscope contour, polygon approximation is performed by the cv2.approxPolyDP function to simplify the representation of the contour. The function sets an approximation accuracy parameter, such as 0.01, and uses fewer vertices to approximate the contour according to the shape characteristics of the contour. By analyzing the distribution and connection relationship of these vertices, the topological structure curve of the approximate contour of the endoscope is obtained. For example, the approximate contour of the endoscope presents an elongated curved shape. After polygon approximation, the main turning points and the approximate direction of the contour are determined, and this information is recorded in the log file of the data processing workstation and stored in association with the corresponding image file name to provide a basis for subsequent curve fitting.
[0031] S23: performing curve fitting contour point positioning on the topological structure curve of the rough contour of the endoscope to obtain key points of the spline fitting curve of the endoscope contour; In an embodiment of the present invention, the scipy library of Python is used to perform curve fitting contour point positioning on the condition of the topological structure curve of the rough contour of the endoscope, the vertex information of the previously recorded topological structure curve of the rough contour of the endoscope is read from the log file, and the spline function of the interpolate module in the scipy library is used to perform spline curve fitting. The purpose of spline curve fitting is to generate a smooth curve through given vertices to better describe the contour of the endoscope. For example, assuming that the topological structure curve of the rough contour of the endoscope has 10 vertices, the coordinates of these vertices are input into the spline function, and appropriate parameters are set, such as k=3 (indicating a cubic spline curve), s=0 (indicating the smoothness of the fitting, and s=0 is a strict fitting). After calculation, the parametric equation of the spline fitting curve is obtained. By solving the parametric equation, a series of points are uniformly selected on the curve. These points are the key points of the spline fitting curve of the endoscope contour. For example, 50 key points are selected on the curve, and the coordinates of these points are recorded in a new log file of the data processing workstation, and stored in association with the corresponding image file name for subsequent endoscope contour recognition and positioning.
[0032] S24: performing endoscope contour recognition and positioning on the endoscope foreground area contour corresponding to the endoscope decontamination separation binary mask image frame based on the key points of the endoscope contour spline fitting curve, so as to obtain the endoscope contour position corresponding to the endoscope decontamination link image; In the embodiment of the present invention, the Python OpenCV library is used to perform endoscope contour recognition and positioning on the endoscope foreground area contour corresponding to the endoscope decontamination and separation binary mask image frame based on the key points of the endoscope contour spline fitting curve, so as to read the previously recorded key point coordinates and the generated binary mask image frame. For each key point, the corresponding pixel position is found in the binary mask image frame, and these key points are marked on the image by the cv2.circle function to form a rough endoscope contour shape. Then, cv2.drawCon The tours function draws a complete endoscope outline on the binary mask image frame according to the connection relationship of the key points. The precise position and posture of the endoscope in the image are determined by calculating the geometric center, circumscribed rectangle and other features of the outline. For example, the geometric center coordinates of the endoscope outline are calculated to be (x=100, y=150), the width of the circumscribed rectangle is 80 pixels, and the height is 200 pixels. The endoscope outline position information is recorded in the log file of the data processing workstation and stored in association with the corresponding image file name. Finally, the endoscope outline position corresponding to the endoscope disinfection link image is obtained.
[0033] S25: Based on the endoscope contour position corresponding to the endoscope disinfection link image, the contaminant type is identified in the disinfection start image corresponding to the endoscope disinfection link standard image frame to obtain the type of contaminant corresponding to the endoscope surface, including blood or mucus.
[0034] In an embodiment of the present invention, Python's deep learning framework TensorFlow is used to identify the type of pollutants in the corresponding decontamination start image in the standard image frame of the endoscope decontamination link based on the endoscope contour position corresponding to the endoscope decontamination link image, so as to read the previously recorded endoscope contour position information and the generated standard image frame, and then, according to the endoscope contour position, the image area containing the endoscope surface is cropped from the standard image frame, and the cropped image is preprocessed, such as adjusting the image size to 224×224 pixels, normalizing the pixel value to the range of [0, 1], and using the pre-trained Convolutional neural network models, such as ResNet50, load the model weights and perform fine-tuning. The preprocessed endoscope surface image is input into the fine-tuned model. The model outputs the prediction results of the pollutant type in the image through convolution, pooling, full connection and other layer operations. Assuming that the model predicts that the probability of blood stains is 0.8 and the probability of mucus is 0.2, the type of pollutant corresponding to the endoscope surface is judged to be blood stains according to the probability values. The pollutant type identification results are recorded in the final report file of the data processing workstation and stored in association with the corresponding image file name, providing a basis for the subsequent optimization of the endoscope disinfection process.
[0035] Furthermore, the rough topological structure analysis of the endoscope washing and separation binary mask image frame includes: The Suzuki algorithm is used to roughly extract the regional contour of the endoscope foreground area corresponding to the endoscope washing and separation binary mask image frame to obtain the approximate contour of the endoscope foreground area; In the embodiment of the present invention, the Suzuki algorithm is implemented by using the OpenCV library of Python to perform a rough extraction of the regional contour of the endoscope foreground area corresponding to the endoscope washing and separation binary mask image frame to read the previously generated binary mask image frame. In OpenCV, the Suzuki algorithm is executed by the cv2.findContours function, and the contour retrieval mode is set to cv2.RETR_TREE (obtain all contours and establish a hierarchical relationship between contours), and the contour approximation method is cv2.CHAIN_APPROX_SIMPLE (only retain the endpoints of the contours). ), when the function is executed, it will traverse the pixels in the image and identify different contours according to the changes in pixel values. For the endoscopic foreground area with a value of 1 (white) in the binary mask image, the algorithm will extract its boundary contour. Assuming that there are multiple white areas in the image, the algorithm will identify the contours of all these areas. After screening, according to the area size and shape characteristics of the contour, the contour with a larger area and a shape that conforms to the endoscopic characteristics is determined as the approximate contour of the endoscopic foreground area, and the extracted contour information is stored in the form of a list. Each contour consists of a series of point coordinates, which are recorded in the temporary file of the data processing workstation for subsequent analysis.
[0036] Preferably, a contour structure topological transformation is performed on the rough contour of the endoscope foreground area to generate a contour topological structure of the endoscope foreground area; In an embodiment of the present invention, a contour structure topological transformation is performed on the rough contour of the endoscope foreground area by utilizing a custom function of Python, and the rough contour information of the endoscope foreground area previously extracted is read from a temporary file. The custom function constructs a topological structure by analyzing the connection order and relationship of the contour points. For example, for a contour composed of points A, B, C, and D connected in sequence, the function will record the relationship between A and B, B and C, C and D, and D and A. For a complex contour, if there are branches, such as two branches at point E connected to point F and point G respectively, the function will also accurately record the branch connection relationship, and organize the connection relationship between these contour points into a data structure, such as an adjacency list, in which each node represents a contour point, and the node stores information on other contour points connected to it. In this way, a topological structure of the contour of the endoscope foreground area is generated and stored in a new temporary file of the data processing workstation, providing a basis for subsequent topological recognition analysis.
[0037] Preferably, a contour topology recognition analysis is performed on the contour topology structure of the endoscope foreground area to identify and analyze the connectivity and interconnected branching conditions of the corresponding endoscope contour topology, and obtain the topological connectivity and branching structure number corresponding to the contour structure of the endoscope foreground area; In an embodiment of the present invention, the contour topology recognition and analysis of the contour topology structure of the endoscope foreground area is realized by using Python's graph theory-related algorithms, and the previously generated contour topology structure data of the endoscope foreground area is read from a new temporary file. Based on graph theory, the contour topology structure is regarded as a graph, the contour points are the nodes of the graph, and the connection relationship between the points is the edge of the graph. The depth-first search (DFS) algorithm is used to traverse from a certain starting node in the graph. During the traversal process, the visited nodes are recorded. If all nodes can be traversed without repeated visits, it means that the graph is connected, that is, the endoscope contour topology is connected. For the branch structure, during the DFS traversal process, if multiple unvisited adjacent nodes are found at a certain node, it means that there is a branch here. By counting the number of these branch points, the interconnected branch conditions are counted to obtain the topological connectivity and the number of branch structures corresponding to the contour structure of the endoscope foreground area. For example, after analysis, it is determined that the contour topology structure of the endoscope foreground area is connected and there are 3 branch structures. These analysis results are recorded in the log file of the data processing workstation and stored in association with the corresponding image file name.
[0038] Preferably, based on the topological connectivity and the number of branch structures corresponding to the contour structure of the endoscope foreground area, a rough topological structure analysis of the contour of the endoscope foreground area corresponding to the endoscope disinfection and separation binary mask image frame is performed to obtain the curve status of the endoscope's rough contour topological structure, including whether the contour of the endoscope foreground area corresponds to a closed curve and whether there are branch structures corresponding to each other.
[0039] In an embodiment of the present invention, a rough topological structure analysis of the endoscopic foreground area corresponding to the endoscopic foreground area contour structure in the endoscopic decontamination separation binary mask image frame is performed by using a Python analysis program based on the topological connectivity and the number of branch structures corresponding to the endoscopic foreground area contour structure, the previously recorded topological connectivity and branch structure number information are read from the log file, and the endoscopic foreground area information is read again from the generated binary mask image frame. If the topological connectivity is displayed as connected and the number of branch structures is not 0, it means that there are branch structures corresponding to each other in the endoscopic foreground area contour. By checking whether the starting and ending points of the contour points coincide, it is determined whether the endoscopic foreground area contour corresponds to a closed curve. For example, for a contour, the coordinates of its starting point and ending point are the same, indicating that the contour is a closed curve. The information about the condition of the topological structure curve of the rough contour of the endoscope, that is, whether it is a closed curve and whether there is a branch structure, is recorded in detail in the final analysis report file of the data processing workstation and stored in association with the corresponding image file name, providing an important basis for subsequent accurate identification of the endoscopic contour, and also providing a key image analysis basis for the entire endoscopic decontamination status intelligent monitoring method.
[0040] Furthermore, the positioning of the contour points by curve fitting of the topological structure curve of the general contour of the endoscope includes: Performing profile curve fitting on the endoscope profile structure curve corresponding to the endoscope general profile topological structure curve condition to generate an endoscope profile topological structure fitting curve; In an embodiment of the present invention, the scipy library of Python is used to perform contour curve fitting on the endoscope contour structure curve corresponding to the condition of the endoscope rough contour topological structure curve, and the relevant information of the endoscope rough contour topological structure curve is read from the final analysis report file generated previously. These curves are composed of a series of contour point coordinates. The spline function of the interpolate module in the scipy library is used to perform curve fitting operations. It is assumed that the endoscope contour structure curve has N contour points, and the coordinates of these points are sorted into array form, namely, the horizontal coordinate array [x1, x2, ..., xN] and the vertical coordinate array [y1, y2, ..., yN], respectively. These arrays are input into the spline function as parameters, and appropriate fitting parameters are set at the same time, such as k=3 (indicating cubic spline curve fitting), s=0 (indicating strict fitting, that is, the fitting curve passes through all given contour points). The function generates a spline fitting function object through calculation, and the object can calculate the corresponding dependent variable value according to the input independent variable value, thereby obtaining a series of new points, which are connected to form a smooth curve, namely, the endoscope contour topological structure fitting curve.
[0041] Preferably, a morphological refinement operation is performed on the endoscope contour topological structure fitting curve, so as to remove the corresponding curve wiredrawing deformation interference area in the fitting curve by using corresponding dilation and corrosion morphological operations, so as to generate an endoscope contour structure refinement fitting curve; In an embodiment of the present invention, a morphological refinement operation is performed on the endoscope contour topology structure fitting curve by using Python's OpenCV library, the point coordinate data of the previously generated endoscope contour topology structure fitting curve is read, and the point coordinates are converted into an image format that can be processed by OpenCV. For example, a blank image with the same frame size as the original endoscope disinfection separation binary mask image is created, and the points on the fitting curve are marked as white (value 1) on the blank image, and the remaining areas are black (value 0) to form a binary image representing the fitting curve, and an erosion operation is performed by using OpenCV's cv2.erode function, and the erosion kernel size is set to (3, 3). The erosion operation will The white area in the image (i.e., the fitting curve) is gradually shrunk to remove some tiny burrs and interference areas. Then, the cv2.dilate function is used for dilation operation. The dilation kernel size is also set to (3, 3). The dilation operation will restore the width of the shrunk curve to a certain extent and further smooth the edge of the curve. By repeatedly performing corrosion and dilation operations several times (for example, 3 times), the corresponding curve wire drawing deformation interference area in the fitting curve is removed, and the coordinates of the white pixel points in the image after the morphological thinning operation are re-extracted. The curve composed of these points is the endoscope contour structure thinning fitting curve. Its point coordinates are recorded in a new temporary file to prepare for the next step of contour spline interpolation smoothing.
[0042] Preferably, the endoscope contour structure refinement fitting curve is smoothed by contour spline interpolation, so as to combine the endoscope connection topological structure information and use spline interpolation fitting to smooth the corresponding endoscope contour curve, thereby generating an endoscope contour structure spline fitting smooth curve; In the embodiment of the present invention, the scipy library of Python is used to perform contour spline interpolation smoothing on the endoscope contour structure refinement fitting curve, the point coordinate data of the previously generated endoscope contour structure refinement fitting curve is read, and combined with the generated endoscope connection topological structure information (such as the contour point connection relationship stored in the form of an adjacency list), the spline function of the interpolate module in the scipy library is used again. First, the starting point and the end point of the curve and the connection relationship between each segment of the curve are determined according to the topological structure information. For each segment of the curve that needs to be fitted, the coordinates of the contour points of the segment are used as parameters. Input the spline function, set the parameter k=3 (cubic spline interpolation), and set the appropriate smoothing factor s (for example, s=0.1) according to the complexity of the curve and the expected smoothing effect. The function performs spline interpolation fitting on each curve segment according to the input point coordinates and the set parameters to make the curve smoother and consistent with the actual shape characteristics of the endoscope. The coordinates of the curve points after spline interpolation smoothing are sorted and summarized. The curve formed by connecting these points is the spline fitting smooth curve of the endoscope contour structure. The point coordinates are recorded in a new temporary file on the data processing workstation to provide accurate curve data for the subsequent positioning of key points of the contour curve.
[0043] Preferably, the key points of the contour curve are located on the spline fitting smooth curve of the endoscope contour structure to locate and obtain the position points of the head, bend and interface corresponding to the endoscope contour to obtain the key points of the spline fitting curve of the endoscope contour.
[0044] In an embodiment of the present invention, a custom algorithm of Python is used to locate the key points of the contour curve of the endoscope contour structure spline fitting smooth curve, so as to utilize the point coordinate data of the previously generated endoscope contour structure spline fitting smooth curve, and the custom algorithm locates the key points by analyzing the geometric features of the curve. For the head position on the endoscope contour, according to the general shape characteristics of the endoscope, the head is usually the starting part of the curve and has more obvious features. For example, the curvature of the curve in the head area changes relatively greatly. By calculating the curvature of each point of the curve (using a mathematical formula to calculate the ratio of the square root of the sum of the squares of the second-order derivative of the curve and the first-order derivative), a point with a large curvature change and located at the starting part of the curve is found as the head position point. For the curved part, a point with a large curvature value is found on the curve because the curved part has a large curvature value. The direction of the curve changes greatly at the bend, and the curvature is also large. By setting a curvature threshold (for example, 0.5), when the curvature of a point on the curve is greater than the threshold, the point is marked as a candidate point at the bend. Combined with the overall shape and topological structure information of the curve, the true bend position point is screened out. For the interface, according to the structural characteristics of the endoscope, the interface is usually the connection point of the curve or the place where the shape changes significantly. By analyzing the connection relationship between the curve points and the change in the direction of the curve, the position point of the interface is determined, and the position point coordinates of the head, bend and interface obtained by positioning are recorded in the final report file of the data processing workstation. These key point information provides an important basis for the subsequent accurate identification of the status and position of the endoscope, which helps to achieve more accurate intelligent monitoring of the endoscope disinfection status.
[0045] Further, the identifying of the pollutant type of the decontamination start image corresponding to the decontamination start image in the standard image frame of the decontamination link of the endoscope based on the endoscope contour position corresponding to the endoscope decontamination link image includes: Obtain the start time of the endoscope decontamination phase; In an embodiment of the present invention, a communication connection is established with the control system of the endoscopic disinfection equipment, and the connection is implemented through a standard network protocol, such as the TCP / IP protocol. When the endoscopic disinfection process is started, the control system of the disinfection equipment will generate a timestamp to record the precise time when the disinfection link starts. The data processing workstation monitors the signal sent by the control system of the disinfection equipment in real time. Once the disinfection start signal is detected, the timestamp is immediately obtained and recorded in the log file of the data processing workstation, and the unique identifier of the disinfection process is associated with it, so as to accurately trace and match the relevant image data later, and finally obtain the start time point of the endoscopic disinfection link.
[0046] Preferably, based on the start time point of the endoscope disinfection step, the start point matching extraction is performed on the standard image frame of the endoscope disinfection step to obtain the start image of the endoscope disinfection step; In the embodiment of the present invention, a program is written in Python to extract the start point matching of the standard image frame of the endoscope disinfection link based on the start time point of the endoscope disinfection link previously obtained, and all image files are read from the folder storing the standard image frame of the endoscope disinfection link. The image file names all contain shooting time information. For example, the image file name "20240605101510-standard.jpg" indicates that the image was taken at 10:15:10 on June 5, 2024. The program traverses all image files and compares the time information in the file name with the disinfection start time "2024-06-05" recorded in the log file. A time matching threshold is set, such as plus or minus 5 seconds, to filter out images with shooting time between 10:15:15 and 10:15:25 on June 5, 2024. Assuming that the image "20240605101522-standard.jpg" is found within this time range, the image is extracted as the start image of the endoscope disinfection phase and copied to a folder dedicated to storing start images.
[0047] Preferably, the endoscope contour surface registration and positioning is performed on the endoscope decontamination link start image based on the endoscope contour position corresponding to the endoscope decontamination link image, so as to obtain the endoscope contour positioning surface corresponding to the endoscope decontamination start image; In an embodiment of the present invention, by utilizing Python's OpenCV library and the endoscope contour position information corresponding to the previously generated endoscope disinfection link image, the endoscope contour surface registration and positioning is performed on the start image of the endoscope disinfection link, the image is read from the folder where the start image is stored, and the endoscope contour position information corresponding to this disinfection process is read from the analysis result file stored in the data processing workstation. For example, the geometric center coordinates of the endoscope contour are (x=120, y=180), the width of the circumscribed rectangle is 90 pixels, and the height is 220 pixels. The image is transformed by using OpenCV's cv2.warpAffine function, and the endoscope contour in the start image is adjusted to a standard position and posture by calculating the translation matrix and the rotation matrix. For example, the translation amount is calculated based on the geometric center coordinates, and the center of the endoscope contour is translated to the specified center position of the image (such as the image center coordinates are (width / 2, height / 2)). At the same time, according to the actual shape and topological structure information of the endoscope, the possible rotation angle is determined, and the image is rotated so that the endoscope contour presents a standard direction in the image. After these transformation operations, the endoscope contour positioning surface image corresponding to the endoscope disinfection start image is obtained and stored in a new folder of the data processing workstation to provide standardized image data for subsequent pollutant feature analysis.
[0048] Preferably, the surface contaminant characteristics of the endoscope contour positioning surface corresponding to the endoscope decontamination start image are analyzed to obtain the color, texture and shape characteristics of the contaminants corresponding to the endoscope contour surface of the start image; In an embodiment of the present invention, by using a Python image processing library, such as scikit-image, a surface contaminant feature analysis is performed on the endoscope contour positioning surface corresponding to the endoscope decontamination start image, so as to read the previously generated image, convert the image into an HSV (hue, saturation, brightness) color space, and use the color.rgb2hsv function of scikit-image to extract the color features of the contaminant area in the image in the HSV space. For example, for blood stain contaminants, the hue value in the HSV space is usually within a certain range (such as 0-10 degrees). By setting a color threshold, the pixel points belonging to the blood stain are screened out. For texture features, the gray level co-occurrence matrix (GLCM) method is used. First, the image is converted into a grayscale image, so that Use the color.rgb2gray function of scikit-image, and then use the feature.greycomatrix function of scikit-image to calculate the grayscale co-occurrence matrix, set the offset to different directions such as (1, 0), (0, 1), (1, 1), (-1, 1), etc., calculate the texture feature values such as energy, contrast, and entropy. For shape features, use contour detection algorithms, such as OpenCV's cv2.findContours function, to obtain the pollutant contour, calculate the contour's area, perimeter, circularity and other shape feature parameters, organize the extracted pollutant color, texture and shape feature values into a feature vector, and record it in a text file on the data processing workstation. The file name is associated with the disinfection process serial number.
[0049] Preferably, a pre-established endoscopic contaminant feature library is obtained, and based on the pre-established endoscopic contaminant feature library, the contaminant color, texture and shape characteristics corresponding to the endoscopic contour surface of the starting image are compared and identified to identify the type of contaminant corresponding to the endoscopic surface, including blood or mucus.
[0050] In an embodiment of the present invention, a pre-established endoscope contaminant feature library is read from a local database. The feature library is stored in a table format, where each row represents a known contaminant type (such as bloodstains, mucus, etc.), and each column corresponds to a different feature value, including a color feature value range, a texture feature value range, a shape feature value range, etc. A program is written in Python to compare the contaminant feature vector corresponding to the endoscope contour surface of the previously generated start image with each row of data in the endoscope contaminant feature library. For color features, it is determined whether the extracted color feature value is within the color feature value range of a certain contaminant in the feature library; for texture features and shape features, range matching is also performed. For example, for a contaminant feature vector, its color feature value is within the bloodstain color feature value range in the feature library, and its texture feature value and shape feature value are also relatively matched with the feature value range of bloodstains. After comprehensive judgment, the program determines that the contaminant type is bloodstains, and records the type of contaminant corresponding to the identified endoscope surface in the final report file of the data processing workstation, providing key contaminant identification results for intelligent monitoring of endoscope disinfection status, which is helpful to evaluate the disinfection effect and optimize the disinfection process.
[0051] Furthermore, the endoscope decontamination status assessment module includes the following functions: According to the types of pollutants corresponding to the endoscope surface, the corresponding endoscope decontamination solution concentration and endoscope decontamination time are obtained; In an embodiment of the present invention, by reading the pollutant type information corresponding to the endoscope surface from the final report file generated previously, assuming that the identified pollutant is blood, at the same time, access the locally stored endoscope disinfection parameter database, which is stored in a table form, each row corresponds to a pollutant type, and each column records the parameters such as the endoscope disinfection solution concentration and endoscope disinfection time required for the pollutant. A program is written in Python to find the row of data with the pollutant type of "blood" by querying the database table. For example, it is found that for blood pollutants, the endoscope disinfection solution concentration should be 0.5%, and the endoscope disinfection time should be 15 minutes. The obtained disinfection solution concentration and disinfection time information are recorded in a temporary file of the data processing workstation.
[0052] Preferably, the duration of the initial preparation work for endoscope decontamination is obtained; In an embodiment of the present invention, a communication connection is established with the work management system of the endoscope disinfection room to realize data interaction through a standard API interface. The work management system records the initial preparation time for each endoscope disinfection, including the time spent by the staff to prepare the disinfection equipment, configure the disinfection solution, check the integrity of the endoscope, and other operations. A program is written in Python to send a request to the work management system to obtain the initial preparation time data for endoscope disinfection corresponding to this disinfection process. Assuming that the work management system returns that the initial preparation time for this disinfection is 5 minutes, the time is recorded in a temporary file of the data processing workstation and recorded in the same file as the disinfection parameters obtained previously. The content of the file is further improved to provide complete data for calculating the actual operation time of the endoscope disinfection link.
[0053] Preferably, the actual operation time of the endoscope decontamination step is calculated according to the duration of the initial preparation work for endoscope decontamination and the corresponding endoscope decontamination duration; In an embodiment of the present invention, a program is written in Python to read the corresponding endoscope disinfection time and the obtained initial preparation time for endoscope disinfection from the previous steps. It is known that the endoscope disinfection time is 15 minutes and the initial preparation time is 5 minutes. The two are added together, that is, 5+15=20 minutes, and the actual operation time of the endoscope disinfection link is finally obtained.
[0054] Preferably, the end time point of the endoscope decontamination link is determined based on the actual operation time of the endoscope decontamination link, and the corresponding decontamination end image is obtained from the standard image frame of the endoscope decontamination link according to the end time point of the endoscope decontamination link; In the embodiment of the present invention, by using Python to write a program, the corresponding end time point of the endoscope disinfection link is determined based on the actual operation time of the endoscope disinfection link previously obtained. First, the start time point of the endoscope disinfection link is read from the previously generated log file. Assuming that the start time is "2024-06-05 10:15:20", the actual operation time of the endoscope disinfection link 20 minutes is converted into seconds, that is, 20×60=1200 seconds. In Python, the datetime module is used to add the start time point to the number of seconds corresponding to the operation time to calculate the end time point. The specific operations are as follows: from datetime import datetime, timedelta; start_time = datetime.strptime("2024-06-05 10:15:20", "%Y - %m - %d %H:%M:%S"); operation_time = timedelta(seconds = 1200); end_time = start_time + operation_time; The end time point of the endoscope disinfection phase is calculated to be "2024-06-05 10:35:20". Then, according to this end time point, image files are read from the folder storing the standard image frames of the endoscope disinfection phase. These image file names contain shooting time information. A time matching threshold is set, such as plus or minus 5 seconds, and images with shooting times between 10:35:15 and 10:35:25 on June 5, 2024 are screened out. They are used as corresponding disinfection end images and copied to a folder specifically for storing disinfection end images to provide image data for subsequent disinfection status effect evaluation.
[0055] Preferably, the disinfection status effect is evaluated on the disinfection end image based on the concentration of the endoscope disinfection solution and the endoscope disinfection time to obtain the endoscope disinfection status evaluation effect.
[0056] In an embodiment of the present invention, by using Python's image processing library and a pre-established disinfection effect evaluation model, the disinfection status effect of the disinfection end image is evaluated based on the endoscopic disinfection solution concentration and the endoscopic disinfection time. The endoscopic disinfection solution concentration is read from the temporary file as 0.5%, and the endoscopic disinfection time is 15 minutes. The previously generated disinfection end image is read and pre-processed by using the OpenCV library, such as adjusting the image size to a uniform size (for example, 224×224 pixels), normalizing the pixel value to the range of [0, 1], and using the pre-processed image and the disinfection solution concentration and disinfection time as input data, which are input into a pre-trained convolutional neural network disinfection effect evaluation model. The model outputs an evaluation result, such as qualified or unqualified disinfection, through operations such as convolution, pooling, and full connection. Assuming that the model outputs a qualified disinfection, the endoscopic disinfection status evaluation effect is recorded in the final report file of the data processing workstation, which provides a key basis for evaluating the quality of endoscopic disinfection work and optimizing the disinfection process, and helps to improve the safety and effectiveness of endoscopic disinfection.
[0057] Further, obtaining the corresponding endoscope cleaning solution concentration and endoscope cleaning time according to the type of pollutants corresponding to the endoscope surface includes: According to the pollutant types corresponding to the surface of the endoscope, the corresponding corrosion pollution level on the surface of the endoscope is obtained; In an embodiment of the present invention, by obtaining the pollutant type information corresponding to the endoscope surface previously generated, assuming that the identified pollutant is blood, access is made to a locally stored database of endoscope pollutant corrosion levels, where the database is stored in a table format, with each row corresponding to a pollutant type and each column recording information related to the corrosion pollution level of the pollutant on the endoscope surface. A program is written in Python to query the database table to find the row of data whose pollutant type is "blood". For example, the database stipulates that the corrosion pollution level of the endoscope surface caused by blood is divided into mild, moderate and severe. A comprehensive judgment is made based on factors such as the composition of the blood and the attachment time. The blood identified this time has a short attachment time, so the corresponding corrosion pollution level to the endoscope surface is determined to be mild. The acquired corrosion pollution level information is recorded in a temporary file of the data processing workstation to provide basic data for subsequent experiments and analysis.
[0058] Preferably, by setting different concentration gradients of the cleaning solution, and based on the different concentration gradients of the cleaning solution, the corrosion pollution levels corresponding to different types of pollutants on the surface of the endoscope are experimentally determined to obtain the residual contamination of the endoscope corresponding to different types of pollutants under each concentration gradient of the cleaning solution; In an embodiment of the present invention, multiple groups of endoscope samples of the same model are prepared, with each group having 10 samples. Experiments are conducted for different types of pollutants, such as blood stains, mucus, etc. Taking blood stains as an example, different concentration gradients of disinfectant are set, such as 0.1%, 0.3%, 0.5%, 0.7%, and 0.9%. Endoscope samples with blood stains and mild corrosion pollution levels are randomly assigned to each concentration gradient group. By using a precise disinfectant configuration device, the disinfectant is configured according to the set concentration gradient, and the endoscope samples of each concentration gradient group are respectively placed in the disinfectant of the corresponding concentration for soaking and cleaning. During the soaking process, an oscillating device is used to oscillate at a frequency of 100 times per minute to ensure that the disinfectant is in full contact with the surface of the endoscope. After soaking for a certain period of time (such as 10 minutes), the endoscope sample is taken out, and a professional endoscope contamination residue detection instrument, such as a pollutant residue detector based on the principle of spectral analysis, is used to detect the blood stain residue on the surface of the endoscope. During the detection, the probe of the detector is evenly moved over the entire surface of the endoscope, and the instrument determines the pollutant residue by analyzing the changes in the reflection spectrum. For example, in the 0.1% disinfectant concentration gradient group, the residual blood stain of a certain endoscope sample was detected to be 0.5 mg / cm². The data was recorded, and the same operation was performed on all endoscope samples in each concentration gradient group to obtain the endoscope contamination residual data corresponding to different types of pollutants in each disinfectant concentration gradient. The data were organized into a table and recorded in a temporary file of the data processing workstation.
[0059] Preferably, the endoscope decontamination solution concentration corresponding to the best decontamination of the corresponding pollutant type is determined according to the analysis of the endoscope contamination residual amount corresponding to different pollutant types under each decontamination solution concentration gradient; In the embodiment of the present invention, a data analysis program is written in Python to read the endoscope contamination residual data corresponding to different types of pollutants under various concentration gradients of disinfectant from a temporary file. Taking blood contaminants as an example, the change of contamination residual under different concentration gradients is analyzed. By drawing a scatter plot of contamination residual and disinfectant concentration, the matplotlib library is used to observe the trend of the scatter plot. For example, as the disinfectant concentration gradually increases from 0.1% to 0.5%, the blood contamination residual increases from 0.5mg / cm² to 0.5mg / cm². It gradually decreased to 0.1mg / cm². When the concentration increased to 0.7% and 0.9%, the reduction rate of the residual contamination slowed down, reaching 0.08mg / cm² and 0.07mg / cm² respectively. Taking into account the disinfection effect and disinfection cost, it was determined that when the disinfection solution concentration was 0.5%, the residual blood contamination was low and further increasing the concentration had no significant effect on reducing the residual amount. Therefore, 0.5% was determined to be the optimal concentration of endoscope disinfection solution for disinfection of blood contaminants. The same analysis was performed on other types of pollutants, and the optimal concentrations of endoscope disinfection solution for disinfection of various types of pollutants were recorded in a new temporary file on the data processing workstation.
[0060] Preferably, a time series variation trend analysis is performed on the endoscope contamination residual amounts corresponding to different types of pollutants at each concentration gradient of the decontamination solution to obtain the contamination residual variation trends corresponding to different types of pollutants at each concentration gradient of the decontamination solution; In an embodiment of the present invention, a program is written in Python to read the endoscope contamination residual data corresponding to different types of pollutants at various disinfectant concentration gradients from a temporary file. Taking the data of blood stain pollutants at a 0.1% disinfectant concentration gradient as an example, it is assumed that the contamination residuals detected at different time points (such as 5 minutes, 10 minutes, 15 minutes, 20 minutes, and 25 minutes) are 0.8 mg / cm², 0.5 mg / cm², 0.3 mg / cm², 0.2 mg / cm², and 0.15 mg / cm², respectively. These data are organized into a time series data structure by using the pandas library. Time is the index and the contamination residue is the value. Then, the matplotlib library is used to draw a time series graph, with the horizontal axis being time and the vertical axis being the contamination residue. By observing the time series graph, the changing trend of the contamination residue over time is analyzed. For blood stain contaminants at a concentration of 0.1% disinfectant, the contamination residue gradually decreases with increasing time, and the decreasing speed is faster in the first 10 minutes, and then the decreasing speed slows down. Such a time series change trend analysis is performed on the data of different types of contaminants at each disinfectant concentration gradient, and the analysis results are organized into charts and text descriptions and recorded in the log file of the data processing workstation.
[0061] Preferably, based on the variation trend of the residual contamination corresponding to different types of contaminants under each concentration gradient of the decontamination solution, the decontamination time of the endoscope corresponding to the type of contaminant on the surface of the endoscope is deduced to obtain the corresponding decontamination time of the endoscope.
[0062] In the embodiment of the present invention, by using Python to write a program, based on the previously obtained trend of contamination residues corresponding to different types of pollutants under various concentration gradients of disinfectant, the endoscope disinfection time is derived for the types of pollutants corresponding to the endoscope surface. Taking blood stains as an example at a disinfectant concentration of 0.5%, the contamination residue change trend data is read from the log file. Assuming that a qualified standard for contamination residue is set to 0.1 mg / cm², the time series graph is observed and it is found that when the disinfection time reaches 15 minutes, the contamination residue is close to 0.1 mg / cm². , through mathematical methods such as linear interpolation, the time corresponding to when the residual contamination is exactly 0.1 mg / cm² is calculated more accurately. Assuming that the calculated result is 15.5 minutes, 15.5 minutes is determined as the endoscope decontamination time corresponding to the blood contaminant at a decontamination solution concentration of 0.5%. The same deduction is performed for other types of contaminants at their respective optimal decontamination solution concentrations. The endoscope decontamination time corresponding to each type of contaminant is recorded in the final report file of the data processing workstation, providing an accurate time basis for subsequent endoscope decontamination operations to ensure the best decontamination effect.
[0063] Furthermore, the evaluation of the decontamination status effect of the decontamination completion image based on the concentration of the endoscope decontamination solution and the decontamination time of the endoscope includes: Based on the concentration of endoscope decontamination solution and the duration of endoscope decontamination, the pollutant decontamination removal calculation formula is used to calculate the removal rate of pollutants on the surface of the endoscope corresponding to the endoscope decontamination process, so as to obtain the endoscope decontamination pollutant removal rate; In the embodiment of the present invention, the concentration of the endoscope cleaning solution is read from the previously generated file, assuming it is 0.5%, and the corresponding endoscope cleaning time is read, assuming it is 15.5 minutes. The corresponding calculation formula is set by combining the total mass corresponding to the distribution of pollutants on the endoscope surface, the endoscope cleaning time, the time variable, the concentration of the endoscope cleaning solution, the cumulative area corresponding to the distribution of pollutants on the endoscope surface, and the total area of the endoscope surface, for example: , and use Python to write a program to record the calculation process and results, and finally obtain the endoscope decontamination contaminant removal rate. In addition, the contaminant decontamination removal calculation formula can also use any contamination removal evaluation algorithm in the field to replace the removal rate calculation process, and is not limited to the contaminant decontamination removal calculation formula.
[0064] Preferably, the contaminated residual area is identified for the endoscope foreground area corresponding to the endoscope decontamination image to obtain the endoscope decontamination residual area; In an embodiment of the present invention, the previously acquired end-of-disinfection image is processed by using Python's OpenCV library. First, the image is converted into a grayscale image using the cv2.cvtColor function. Next, an image segmentation algorithm, such as the threshold-based Otsu algorithm, is used to separate the contaminated residual area from the clean area in the image by setting appropriate parameters through the cv2.threshold function. For areas in the grayscale image whose pixel values are lower than a certain threshold (automatically calculated by the Otsu algorithm), they are determined to be contaminated residual areas. In the segmented image, the cv2.findContours function is used to find the contour of the residual area, the contour retrieval mode is set to cv2.RETR_EXTERNA, the contour approximation method is set to cv2.CHAIN_APPROX_SIMPLE, and the area enclosed by the found contour is determined as the end-of-disinfection contaminated residual area of the endoscope. For example, after processing, three obvious contaminated residual area contours are identified in the image, and finally the end-of-disinfection contaminated residual area of the endoscope is obtained.
[0065] Preferably, the contaminated residual area at the end of endoscope decontamination is predicted based on the endoscope decontamination contaminant removal rate to obtain the size of the contaminated residual area at the end of endoscope decontamination; In an embodiment of the present invention, a program is written in Python to read the endoscope cleaning pollutant removal rate and the contour information of the contaminated residual area at the end of the endoscope cleaning. Assuming that the surface area of the endoscope is known to be 100 cm², according to the removal rate of 90%, the residual pollutants should theoretically account for 10% of the endoscope surface area, that is, 10 cm². The actual contaminated residual area is determined by calculating the area enclosed by the contour of the contaminated residual area, and the cv2.contourArea function is used to calculate the area of each contour, and the contour areas of all contaminated residual areas are added. For example, the contour areas of the three contaminated residual areas are 3 cm², 2 cm², and 1 cm², respectively. The actual contaminated residual area is added up to 6 cm². The calculated contaminated residual area size at the end of the endoscope cleaning is recorded in a temporary file of the data processing workstation, and the contaminated residual area size at the end of the endoscope cleaning is finally obtained.
[0066] Preferably, the disinfection status effect of the disinfection end image is evaluated based on the size of the residual contamination area at the end of endoscope disinfection. If the size of the residual contamination area at the end of endoscope disinfection exceeds the specified range of endoscope surface contamination, it is judged as unqualified for disinfection; otherwise, it is judged as compliant for disinfection, so as to obtain the evaluation effect of the endoscope disinfection status.
[0067] In an embodiment of the present invention, by reading the size of the residual contamination area at the end of endoscope disinfection, assuming it is 6cm², and presetting the specified range of endoscope surface contamination, assuming it is 5cm², a program is written in Python for comparison and judgment. If the size of the residual contamination area at the end of endoscope disinfection exceeds the specified range of endoscope surface contamination, that is, 6cm²>5cm², the program determines that the disinfection is unqualified; if it does not exceed, it is determined that the disinfection is compliant, and the judgment result is recorded in the final report file of the data processing workstation, and relevant data such as the end-of-disinfection image, the contour information of the residual contamination area, and the removal rate are attached to form a complete endoscope disinfection status evaluation effect report, which provides a basis for subsequent improvement of the disinfection process and improvement of the disinfection quality, and finally obtains the endoscope disinfection status evaluation effect.
[0068] Furthermore, the pollutant cleaning and removal calculation formula is specifically: ; In the formula, is the endoscope decontamination contaminant removal rate, is the total mass corresponding to the distribution of pollutants on the endoscope surface, The duration of endoscope decontamination. is the time variable, is the concentration of endoscope decontamination solution, is an exponential function, For in time The cumulative area corresponding to the distribution of pollutants on the endoscope surface at time, is the total surface area of the endoscope.
[0069] The present invention obtains a pollutant removal calculation formula by using a specific mathematical model and verifying it, which is used to calculate the removal rate of pollutant distribution on the surface of the endoscope corresponding to the endoscope removal process. The formula fully considers the endoscope removal rate of pollutants. , the total mass corresponding to the distribution of pollutants on the endoscope surface , endoscope decontamination time , time variable , Endoscope decontamination solution concentration , exponential function , at time The cumulative area corresponding to the distribution of pollutants on the endoscope surface at time , total surface area of the endoscope , according to the endoscope decontamination contaminant removal rate The correlation between the above parameters constitutes a functional relationship , the formula can realize the calculation process of the removal rate of the pollutant distribution on the endoscope surface corresponding to the endoscope decontamination process. At the same time, the formula can quantify the pollutant removal efficiency during the endoscope decontamination process. By considering factors such as the concentration of the endoscope decontamination solution, the decontamination time, and the pollutant distribution area, the formula can accurately calculate the removal rate, providing an accurate numerical basis for evaluating the endoscope decontamination effect. The exponential function in the formula reflects the dynamic changes in the removal process, which is specifically manifested in how the removal effect gradually improves with the increase of the decontamination time and the change of the pollutant distribution on the endoscope surface. This dynamic modeling method makes the calculation of the pollutant removal rate closer to the actual situation and can reflect the complexity of the removal process. By considering the total area of the endoscope surface and the cumulative area of pollutant distribution at different time points, the formula can comprehensively consider the contamination of the endoscope surface. The change of pollutant distribution directly affects the removal efficiency. The formula can adjust the calculation of the removal rate in real time according to this change, making the evaluation more accurate. In addition, the formula explicitly considers the effects of endoscope decontamination solution concentration and decontamination time on contaminant removal. These two factors are key variables that determine the removal efficiency. The formula can be used to optimize the configuration of decontamination solution concentration and duration to obtain the best decontamination effect. In practical applications, this can help adjust the decontamination conditions to ensure that the removal effect is as expected. Finally, the calculation formula provides a clear quantitative evaluation standard that can accurately evaluate the effect of the decontamination process. This quantitative standard is essential to ensure the compliance of medical equipment (such as endoscopes) decontamination, help avoid potential risks caused by incomplete decontamination, and improve patient safety.
[0070] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.
Claims
1. An intelligent monitoring system for endoscope decontamination status based on image recognition, characterized in that: Includes the following modules: An endoscope decontamination image acquisition module is used to acquire an endoscope decontamination scene image frame corresponding to the endoscope decontamination process in real time in the endoscope decontamination working area, and perform image frame detail preprocessing to generate an endoscope decontamination standard image frame; An endoscope contaminant identification module is used to identify and locate the endoscope contour of the standard image frame of the endoscope decontamination link, so as to obtain the endoscope contour position corresponding to the endoscope decontamination link image; based on the endoscope contour position corresponding to the endoscope decontamination link image, the contaminant type of the corresponding decontamination start image in the standard image frame of the endoscope decontamination link is identified, so as to obtain the type of contaminant corresponding to the endoscope surface, including blood stains or mucus; The endoscope decontamination status evaluation module is used to obtain the corresponding endoscope decontamination solution concentration and endoscope decontamination time according to the type of pollutants corresponding to the endoscope surface, and obtain the corresponding decontamination end image from the endoscope decontamination link standard image frame according to the endoscope decontamination time; based on the endoscope decontamination solution concentration and the endoscope decontamination time, the decontamination status effect evaluation is performed on the decontamination end image to obtain the endoscope decontamination status evaluation effect; The endoscope disinfection status alarm module is used to store the endoscope disinfection status assessment results in real time in the local database, and upload them to the hospital information management system through a secure network communication protocol to query and trace the corresponding endoscope disinfection status assessment results. If it is judged that the endoscope disinfection status assessment result indicates that the area size of the corresponding pollutants remaining on the surface of the endoscope exceeds the predetermined range, it means that the endoscope disinfection is not compliant, and an alarm message is automatically sent to the relevant disinfection operator, otherwise it will not be sent.
2. The intelligent monitoring system for endoscope disinfection status based on image recognition according to claim 1 is characterized in that: The endoscope disinfection image acquisition module includes the following functions: By setting a high-definition camera in the working area of the endoscope decontamination link to collect the endoscope decontamination image frames corresponding to each decontamination link in the endoscope decontamination process in real time, including the decontamination link scene image frames corresponding to the endoscope, decontamination equipment, operation work and decontamination liquid, to generate the endoscope decontamination link scene image frames; Grayscale processing is performed on the endoscope washing process scene image frame to obtain the endoscope washing process grayscale image frame; Calculate the pixel fuzziness of the grayscale image frame of the endoscope washing process to obtain the pixel fuzziness of the endoscope washing image frame; Based on the pixel fuzziness of the endoscope washing image frame, the grayscale image frame of the endoscope washing link is subjected to fuzzy filtering and noise reduction processing, so as to filter and remove the corresponding fuzzy noise interference in the image frame, so as to obtain the denoised image frame of the endoscope washing link; The detail histogram equalization processing is performed on the noise reduction image frames of the endoscope decontamination link, so as to enhance the detail contrast corresponding to the endoscope decontamination image frames through histogram equalization, and make the corresponding details in the endoscope decontamination image frames clearer, so as to generate the standard image frames of the endoscope decontamination link.
3. The intelligent monitoring system for endoscope disinfection status based on image recognition according to claim 1 is characterized in that: The endoscope contaminant identification module includes the following functions: The image background and foreground mask separation is performed on the standard image frame of the endoscope decontamination link, so as to separate the endoscope foreground from the decontamination link background by using the threshold segmentation corresponding to the image gradient and texture features, and the separated endoscope foreground area generates a corresponding binary mask image, wherein the endoscope foreground area is white and the value is 1, and the decontamination link background area is black and the value is 0, so as to generate an endoscope decontamination separation binary mask image frame; The rough topological structure of the contour of the endoscope washing and separation binary mask image frame is analyzed to obtain the rough topological structure curve of the endoscope contour; Perform curve fitting contour point positioning on the topological structure curve of the rough contour of the endoscope to obtain the key points of the spline fitting curve of the endoscope contour; Based on the key points of the endoscope contour spline fitting curve, the endoscope foreground area contour corresponding to the endoscope decontamination separation binary mask image frame is identified and located to obtain the endoscope contour position corresponding to the endoscope decontamination link image; Based on the endoscope contour position corresponding to the endoscope decontamination link image, the contaminant type is identified in the decontamination start image corresponding to the endoscope decontamination link standard image frame to obtain the type of contaminant corresponding to the endoscope surface, including blood or mucus.
4. The intelligent monitoring system for endoscope disinfection status based on image recognition according to claim 3 is characterized in that: The rough topological structure analysis of the endoscope washing and separation binary mask image frame includes: The Suzuki algorithm is used to roughly extract the regional contour of the endoscope foreground area corresponding to the endoscope washing and separation binary mask image frame to obtain the approximate contour of the endoscope foreground area; Performing contour structure topological transformation on the rough contour of the endoscope foreground area to generate a contour topological structure of the endoscope foreground area; Performing contour topology recognition analysis on the contour topology structure of the endoscope foreground area to identify and analyze the connectivity and interconnected branching conditions of the corresponding endoscope contour topology, and obtaining the topological connectivity and branching structure number corresponding to the contour structure of the endoscope foreground area; Based on the topological connectivity and the number of branch structures corresponding to the contour structure of the endoscope foreground area, the rough topological structure analysis of the contour of the endoscope foreground area corresponding to the endoscope disinfection and separation binary mask image frame was performed to obtain the rough contour topological structure curve of the endoscope, including whether the contour of the endoscope foreground area corresponds to a closed curve and whether there are branch structures connected to each other.
5. The intelligent monitoring system for endoscope disinfection status based on image recognition according to claim 3 is characterized in that: The positioning of the contour points by curve fitting of the topological structure curve of the rough contour of the endoscope comprises: Performing profile curve fitting on the endoscope profile structure curve corresponding to the endoscope general profile topological structure curve condition to generate an endoscope profile topological structure fitting curve; Performing a morphological refinement operation on the endoscope contour topological structure fitting curve, so as to remove the corresponding curve drawing deformation interference area in the fitting curve by using corresponding dilation and erosion morphological operations, and generating an endoscope contour structure refinement fitting curve; Performing contour spline interpolation smoothing on the endoscope contour structure refinement fitting curve, and using spline interpolation fitting to smooth the corresponding endoscope contour curve in combination with the endoscope connection topological structure information, to generate an endoscope contour structure spline fitting smoothing curve; The key points of the contour curve are located on the spline fitting smooth curve of the endoscope contour structure to locate the corresponding position points of the head, bend and interface on the endoscope contour to obtain the key points of the spline fitting curve of the endoscope contour.
6. The intelligent monitoring system for endoscope decontamination status based on image recognition according to claim 3 is characterized in that: The method of identifying the type of pollutants in the decontamination start image corresponding to the standard image frame of the endoscope decontamination link based on the endoscope contour position corresponding to the endoscope decontamination link image comprises: Obtain the start time of the endoscope decontamination phase; Based on the start time point of the endoscope decontamination phase, the start point matching and extraction of the standard image frame of the endoscope decontamination phase are performed to obtain the start image of the endoscope decontamination phase; Based on the endoscope contour position corresponding to the endoscope decontamination link image, the endoscope contour surface is registered and positioned on the endoscope decontamination link start image to obtain the endoscope contour positioning surface corresponding to the endoscope decontamination link start image; Perform surface contaminant feature analysis on the endoscope contour positioning surface corresponding to the endoscope decontamination start image to obtain the contaminant color, texture and shape features corresponding to the endoscope contour surface of the start image; A pre-established endoscope contaminant feature library is obtained, and based on the pre-established endoscope contaminant feature library, the contaminant color, texture and shape characteristics corresponding to the endoscope contour surface of the starting image are compared and identified to obtain the type of contaminant corresponding to the endoscope surface, including blood or mucus.
7. The intelligent monitoring system for endoscope disinfection status based on image recognition according to claim 1 is characterized in that: The endoscope decontamination status assessment module includes the following functions: According to the types of pollutants corresponding to the endoscope surface, the corresponding endoscope decontamination solution concentration and endoscope decontamination time are obtained; Obtain the duration of initial preparation for endoscope decontamination; The actual operation time of the endoscope decontamination process is calculated based on the initial preparation time of the endoscope decontamination and the corresponding endoscope decontamination time; Determine the end time point of the endoscope decontamination link based on the actual operation time of the endoscope decontamination link, and obtain the corresponding decontamination end image from the standard image frame of the endoscope decontamination link according to the end time point of the endoscope decontamination link; The decontamination status effect of the decontamination end image is evaluated based on the concentration of the endoscope decontamination solution and the endoscope decontamination time to obtain the endoscope decontamination status evaluation effect.
8. The intelligent monitoring system for endoscope disinfection status based on image recognition according to claim 7 is characterized in that: The step of obtaining the corresponding endoscope decontamination solution concentration and endoscope decontamination time according to the type of pollutants corresponding to the endoscope surface comprises: According to the pollutant types corresponding to the surface of the endoscope, the corresponding corrosion pollution level on the surface of the endoscope is obtained; By setting different concentration gradients of cleaning solution, and conducting experiments to determine the residual contamination of endoscopes based on the different concentration gradients of cleaning solution for the corrosion contamination levels of the endoscope surface corresponding to different types of pollutants, the residual contamination of endoscopes corresponding to different types of pollutants under each concentration gradient of cleaning solution is obtained; According to the analysis of the endoscope contamination residual amount corresponding to different types of pollutants under each concentration gradient of the decontamination solution, the optimal decontamination concentration of the endoscope decontamination solution for the corresponding type of pollutants is determined; The time series variation trend of the endoscope contamination residue corresponding to different types of pollutants at each concentration gradient of the decontamination solution was analyzed to obtain the variation trend of the contamination residue corresponding to different types of pollutants at each concentration gradient of the decontamination solution; Based on the residual contamination change trend corresponding to different types of pollutants under each concentration gradient of the decontamination solution, the endoscope decontamination time corresponding to the type of pollutant on the endoscope surface is deduced to obtain the corresponding endoscope decontamination time.
9. The intelligent monitoring system for endoscope disinfection status based on image recognition according to claim 7 is characterized in that: The evaluation of the decontamination status effect of the decontamination end image based on the concentration of the endoscope decontamination solution and the decontamination time of the endoscope includes: Based on the concentration of endoscope decontamination solution and the duration of endoscope decontamination, the pollutant decontamination removal calculation formula is used to calculate the removal rate of pollutants on the surface of the endoscope corresponding to the endoscope decontamination process, so as to obtain the endoscope decontamination pollutant removal rate; Identify the contaminated residual area of the endoscope foreground area corresponding to the endoscope decontamination image to obtain the contaminated residual area after the endoscope decontamination; Based on the endoscope decontamination pollutant removal rate, the contaminated residual area at the end of endoscope decontamination is predicted to obtain the size of the contaminated residual area at the end of endoscope decontamination; The disinfection status effect of the disinfection end image is evaluated based on the size of the residual contamination area at the end of endoscope disinfection. If the size of the residual contamination area at the end of endoscope disinfection exceeds the specified range of endoscope surface contamination, it will be judged as unqualified for disinfection; otherwise, it will be judged as compliant for disinfection, so as to obtain the evaluation effect of endoscope disinfection status.
10. The intelligent monitoring system for endoscope decontamination status based on image recognition according to claim 9 is characterized in that: The specific calculation formula for pollutant decontamination and removal is: ; In the formula, is the endoscope decontamination contaminant removal rate, is the total mass corresponding to the distribution of pollutants on the endoscope surface, The duration of endoscope decontamination. is the time variable, is the concentration of endoscope decontamination solution, is an exponential function, For in time The cumulative area corresponding to the distribution of pollutants on the endoscope surface at time, is the total surface area of the endoscope.
Citation Information
Patent Citations
Digestive endoscope decontamination compliance monitoring method and device and computer equipment
CN117557964A
Bronchoscope cleaning and tracing intelligent management system and method based on Internet of Things technology
CN119230078A
Medical instrument use supervision system based on image recognition
CN119314647A
Medical instrument disinfection dosage control method and system
CN119889630A
Cited By
Bladder irrigation quality control method and system based on dynamic monitoring
CN120318223A
Method and device for extracting point cloud data of beam body structure
CN121095264A