A medical institution-oriented safety hazard identification and rectification closed-loop management method and system
Patent Information
- Application Number
- CN202610754461.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-28
- Publication Date
- 2026-08-18
AI Technical Summary
[0002]当前医疗机构安全隐患管理主要依靠人工现场巡查、人工登记、人工派发整改任务,存在隐患排查效率低、覆盖面有限、识别依赖人员经验的问题,难以实现全院区、全天候、无死角的安全隐患排查
[0010] The beneficial effects of this application are as follows: By collecting images of potential hazards, real-time Q&A reporting information, medical safety production regulations, and hospital access and collaboration data, the images are sequentially preprocessed using Gaussian filtering for noise reduction, CLAHE low-light enhancement, Canny edge extraction, and size normalization to generate standard images adapted for AI recognition. YOLOv8 and ResNet are used. Fifty dual models enable target detection and fine classification, combining a 0.75 confidence threshold to complete hierarchical judgment and trigger manual fallback. Automatic regulatory association is achieved based on three-level matching of precision, keywords, and semantic vectors, generating compliance rectification suggestions by combining templates and large models. End-to-end traceability is achieved through closed-loop work order processing, dual-media verification (audio and video), EXIF validation, WeChat external link collaboration, and access control. Finally, statistical analysis, risk scoring, and visualization output of the entire process data form a complete medical safety management system covering identification, rectification, collaboration, and decision-making.
Smart Images

Figure CN122598980A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing, and in particular to a closed-loop management method and system for identifying and rectifying safety hazards in medical institutions. Background Technology
[0002] Currently, safety hazard management in medical institutions mainly relies on manual on-site inspections, manual registration, and manual assignment of rectification tasks. This approach suffers from low efficiency in hazard identification, limited coverage, and reliance on personnel experience, making it difficult to achieve comprehensive, round-the-clock, and thorough safety hazard identification across the entire hospital area. In the hazard handling phase, the traditional model lacks automatic integration with medical safety regulations, and rectification suggestions rely on manual drafting. This results in inconsistent rectification measures, unclear compliance bases, and varying rectification requirements, leading to inconsistent rectification quality.
[0003] In the process control stage, the existing system only implements simple reporting and recording functions, and has not established a closed-loop flow mechanism for the entire process of reporting, rectification, verification, and archiving. It lacks real-time tracking of the rectification process, timeout reminders, verification, and archiving evidence. The progress of hazard rectification is not transparent, responsibilities are unclear, and it is easy for omissions, delays, and incomplete closure to occur. In terms of multi-department collaboration, the rectification of hazards in medical institutions usually involves multiple departments such as logistics, electrical engineering, pharmacy, and equipment. The existing methods mainly rely on offline notifications or internal message communication, which results in long collaboration links, slow information synchronization, and unclear authority boundaries, making it impossible to achieve rapid, controllable, and traceable cross-departmental collaborative handling.
[0004] While existing technologies have publicly disclosed solutions for hazard detection, rectification work order management, and statistical analysis based on image recognition, they suffer from the following significant shortcomings: The hazard identification model is not specifically optimized for four typical scenarios in medical institutions: fire safety, electrical systems, hazardous chemicals, and special equipment. The model's generalization ability is weak, and its accuracy is insufficient under complex indoor lighting and environmental conditions such as hospital corridors, equipment rooms, pharmacies, and warehouses. Furthermore, it lacks confidence level grading and a manual fallback mechanism, making it difficult to meet the stringent requirements of medical safety management in terms of reliability. Rectification verification only supports uploading images or text materials, lacking dual-media verification (audio and video) and EXIF information validation. This fails to effectively prevent the use of historical photos, off-site photos, or other false supporting materials, making it difficult to guarantee the authenticity of rectification efforts. Regulatory matching only enables general clause retrieval, lacking a dedicated regulatory database for medical institutions and precise clause-level mapping. It cannot automatically match corresponding regulatory clauses based on hazard type and generate compliant rectification requirements. The collaboration method relies on internal systems or WeChat official account integration, and does not provide the ability to directly collaborate via WeChat external links without additional configuration. This results in low efficiency of inter-departmental collaboration. The reporting process uses traditional form filling methods, which are cumbersome, costly, and not conducive to frontline staff reporting quickly.
[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore includes information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] According to one aspect of this application, a closed-loop management method for safety hazard identification and rectification in medical institutions is provided, comprising: acquiring basic management data of medical scenarios, including on-site images of hazards, real-time question-and-answer photo reporting information, medical safety production regulations, hospital access configurations, and rectification collaboration requirements; preprocessing the basic image data by employing Gaussian filtering for noise reduction, CLAHE low-light enhancement, Canny edge detection ROI extraction, 640×640 size normalization, and pixel value standardization to form standard hazard image data adapted for AI recognition; processing the standard hazard images by performing target detection and fine-grained classification based on a two-stage model using YOLOv8 and ResNet-50, classifying them according to a 0.75 confidence threshold, automatically triggering manual fallback for low confidence levels, and outputting the hazard category and confidence level. The system integrates location information; processes hazard identification results, employing a three-tiered strategy of precise matching, keyword matching, and semantic vector matching based on the medical safety production regulations database, combined with template filling and LLM enhancement to generate compliance rectification suggestions, configuring time limits and responsibility assignments according to hazard levels; processes hazard work orders and rectification processes, constructing a closed-loop flow logic of reporting-pending rectification-in progress-pending verification-archived, achieving dual-media AI verification (audio and video), EXIF verification, return for upgrade, and archiving, simultaneously completing WeChat external link collaboration, permission isolation, and multi-condition queries to form complete and traceable closed-loop data; processes full-process business data, statistically analyzing hazard distribution, rectification rate, timeliness rate, and regional risk scores, visually displaying them through various types of charts, and integrating full-link results to output hazard control and analysis results that can be directly used for management decisions.
[0007] Another aspect of this application discloses a closed-loop management system for safety hazard identification and rectification in medical institutions, comprising: a basic data acquisition module for acquiring images of hazard sites, real-time question-and-answer photo reporting information, medical safety production regulations, hospital access configuration, and rectification collaboration requirements; an image preprocessing module for denoising, enhancing, extracting ROIs, normalizing size, and standardizing pixel values of the basic image data to form standard hazard image data adapted for AI recognition; and a hazard intelligent recognition module for performing target detection and fine-grained classification on the standard hazard images using a two-stage model of YOLOv8 and ResNet-50, classifying and judging according to a 0.75 confidence threshold. The system triggers manual intervention, outputting hazard category, confidence level, and location information; the compliance rectification generation module uses a three-level matching strategy based on the regulatory database to generate rectification suggestions based on hazard identification results, combined with template filling and LLM enhancement, configuring rectification deadlines and responsibility assignments according to hazard level; the closed-loop process control module constructs the full lifecycle flow logic of hazard work orders, realizing dual-media verification of audio and video, EXIF verification, return and escalation, and archiving and evidence preservation, while simultaneously completing WeChat external link collaboration, permission isolation, and multi-condition query; the data analysis and decision-making module performs statistics, scoring, and visualization of full-process business data, integrating the full-link results to output hazard control and analysis results that can be directly used for management decisions.
[0008] According to another aspect of this application, an electronic device is provided, on which a computer program is stored, which, when executed by a first processor, implements the above-described closed-loop management method for identifying and rectifying safety hazards in medical institutions.
[0009] According to another aspect of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a second processor, implements the above-described closed-loop management method for identifying and rectifying safety hazards in medical institutions.
[0010] The beneficial effects of this application are as follows: By collecting images of potential hazards, real-time Q&A reporting information, medical safety production regulations, and hospital access and collaboration data, the images are sequentially preprocessed using Gaussian filtering for noise reduction, CLAHE low-light enhancement, Canny edge extraction, and size normalization to generate standard images adapted for AI recognition. YOLOv8 and ResNet are used. Fifty dual models enable target detection and fine classification, combining a 0.75 confidence threshold to complete hierarchical judgment and trigger manual fallback. Automatic regulatory association is achieved based on three-level matching of precision, keywords, and semantic vectors, generating compliance rectification suggestions by combining templates and large models. End-to-end traceability is achieved through closed-loop work order processing, dual-media verification (audio and video), EXIF validation, WeChat external link collaboration, and access control. Finally, statistical analysis, risk scoring, and visualization output of the entire process data form a complete medical safety management system covering identification, rectification, collaboration, and decision-making.
[0011] This application addresses the pain points of medical institutions by offering systematic technological advantages: First, its recognition capabilities adapt to complex medical environments. Through scenario-based preprocessing and customized dual models, it effectively solves problems related to lighting, occlusion, and interference from debris, significantly improving recognition accuracy and stability while greatly reducing reliance on manual inspections. Second, it ensures strong compliance in rectification efforts. A three-tiered progressive regulatory matching system ensures accurate justification, and intelligently generated solutions are standardized and clear in terms of responsibility and timelines, mitigating compliance risks. Third, it guarantees the authenticity of rectification efforts. Multi-media verification and information validation effectively prevent material falsification and ensure the implementation of rectification measures. Fourth, it offers high collaborative efficiency. Lightweight external link collaboration breaks down system barriers, enabling rapid and controllable cross-departmental handling. Fifth, it digitizes management decisions. Full-process data accumulation and visualization enable precise risk assessment, closed-loop management of potential hazards, and efficient resource allocation, comprehensively improving the level of refined medical safety management.
[0012] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0013] Figure 1 This invention provides a flowchart illustrating a closed-loop management method for safety hazard identification and rectification in medical institutions, according to an embodiment of this application. Figure 2 This paper presents a schematic diagram of a closed-loop management system for identifying and rectifying safety hazards in medical institutions, provided in one embodiment of this application. Detailed Implementation
[0014] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0015] The following is combined Figure 1 This application describes a closed-loop management method for safety hazard identification and rectification in medical institutions, based on exemplary embodiments thereof: S101, acquire basic management and control data for medical scenarios.
[0016] In one implementation, basic management data for medical scenarios is acquired, including images of potential hazards, real-time question-and-answer photo reporting information, text from the medical safety production regulations database, and hospital access configurations and rectification collaboration requirements. The system collects hazard images taken on-site or uploaded locally by users, covering four core medical safety scenarios: fire safety, electrical safety, hazardous chemical management, and special equipment management. Image sources include real-time mobile terminal photography and historical archive file uploads. The system performs format and size checks on received images, retaining only images that meet application requirements for subsequent processes. Image content must clearly reflect the hazard target, surrounding environment, and location relationships to ensure target detection and fine-classification identification. For example, if a user takes an image of an open electrical distribution box with messy internal wiring in the emergency room corridor, and the image fully shows the box's condition, wiring layout, and surrounding wall environment, and the system verifies that the image format and size meet the requirements, it is stored as a valid hazard image in a temporary dataset, awaiting use in the preprocessing stage.
[0017] The system employs an instant question-and-answer interactive mode to report hazard information, replacing the traditional form-based process. Based on image content and hazard category, the system automatically generates simplified question-and-answer entries, guiding users to confirm information such as location, time, and description of the phenomenon. Users respond using natural language; the system extracts key information through text parsing, establishing a one-to-one binding between the text description and the corresponding image, forming combined image and text reporting data. This mechanism simplifies the reporting process and improves information collection efficiency and accuracy. After a user uploads an image of debris piled up in a fire escape route, the system sequentially prompts the user with the hazard location and on-site conditions. The user then inputs the location of the fire escape route on the second floor of the outpatient building and the location of cleaning tools in the route; the system automatically extracts key information and binds it to the image, forming a structured hazard reporting entry.
[0018] The system loads and parses a dedicated safety production regulation database for medical institutions, containing all applicable regulations and provisions related to fire safety, electrical safety, hazardous chemical storage, and the use of special equipment. The system employs a hierarchical structure to break down and store the regulations, dividing them into four levels: regulation name, clause number, clause content, and keyword tags. The system establishes full-text and inverted indexes for clause content and keywords, enabling rapid association between keywords and regulatory clauses, providing a foundation for subsequent automatic matching of hazards and regulations. The system loads nine regulations for fire safety management in medical institutions, breaking them down into specific clauses such as unobstructed passageways, equipment inspection, and facility maintenance. Each clause is labeled with keywords such as fire exits, fire extinguishers, and electrical distribution boxes, establishing a direct index relationship between keywords and clauses.
[0019] The system collects internal personnel permission configuration information from medical institutions, including role classification, department affiliation, data viewing scope, and operation permission levels. Based on this permission information, the system establishes hierarchical data isolation rules. Ordinary safety officers can only view and process hazard data within their own department; department heads can approve rectification results for their department; and hospital-level administrators can view hospital-wide data and perform export operations. All permission rules automatically take effect during workflow execution, preventing unauthorized access and data leakage, and ensuring traceability and controllability of operations. The system records three role permission categories: ordinary safety officers, department heads, and hospital-level administrators. Ordinary users are limited to accessing data within their own department, while administrators can access hospital-wide data and perform statistical exports. These permission rules take effect throughout the entire process of work order processing, query display, and data export.
[0020] The system automatically matches the responsible department and collaboration requirements based on the category of the hazard, establishing a fixed mapping relationship between hazard type and handling department. It also supports users manually adjusting collaborating departments and adding collaborating personnel to form standardized collaboration plans. The system binds responsible departments, collaboration methods, and handling requirements to hazard work orders, ensuring accurate hazard assignment, clear responsibilities, and smooth collaboration, thus improving the efficiency of multi-department joint handling. For example, after identifying a fire exit blockage hazard, the system automatically matches it with the logistics management department; for an exposed wire hazard, it automatically matches it with the electrician team; and for a hazardous chemical-related hazard, it automatically matches it with the pharmacy department and the logistics department. Users can adjust the collaborating partners according to the actual situation, ultimately forming a clear rectification responsibility and collaborative handling plan.
[0021] S102 preprocesses the basic image data by using Gaussian filtering for noise reduction, CLAHE low-light enhancement, Canny edge detection for ROI extraction, 640×640 size normalization, and pixel value standardization to form standard hazard image data adapted for AI recognition.
[0022] In one implementation, after receiving the original hazard image uploaded by the user, the preprocessing module initiates an image adaptive analysis process. Based on the distribution patterns of visual features such as the outline, color, and texture of the hazard target in the medical scene, as well as the shooting conditions such as on-site lighting intensity, brightness difference, noise density, and image clarity, the module engages in dynamic parameter negotiation with the feature enhancement engine. The module first quantifies three basic indicators: the global average brightness, texture gradient variance, and the area ratio of the hazard target. Then, combining the outline shape, color range, and spatial location features of typical hazards such as fire extinguishers, electrical boxes, cables, and passageways, it dynamically determines the combined processing method of noise suppression, contrast enhancement, and edge extraction, as well as the effective target retention range. This process is based on dynamic decision-making using the image's own pixel statistical features, without relying on fixed parameter templates, and can adapt to different lighting, clarity, and scene imaging conditions in hospital corridors, warehouses, equipment rooms, pharmacies, and emergency areas.
[0023] The system employs a 5×5 Gaussian filtering algorithm to suppress image noise. By performing a weighted average calculation on a 5×5 neighborhood of each pixel, it filters out grainy noise, light jitter interference, and random sensor noise generated during medical environment photography. Simultaneously, it fully preserves the true edge information of potential hazards such as the circular outline of a fire extinguisher, the rectangular edge of a distribution box, and the linear texture of cables. For example, a pixel with a noise grayscale value of 220 is output as a grayscale value of 195 after the 5×5 neighborhood weighted calculation, effectively eliminating noise without blurring the edges.
[0024] For low-light or high-contrast images captured at night, in backlit corridors, in dimly lit indoor environments, or with backlighting or reflections, the system employs an adaptive histogram equalization (CLAHE) algorithm for local contrast enhancement. With a block size of 8×8 and a contrast limit coefficient of 2.0, it improves the visibility of details in dark areas without causing overexposure in bright areas or losing highlight details. This makes subtle hazard features such as fire extinguisher markings, cable connectors, passageway boundaries, and door lock gaps clearly visible. For example, in low-light images where the dark area grayscale is 10-30, the enhancement increases it to 60-12, improving the detail recognition in dark areas by more than 3 times, while preventing overexposure in bright areas.
[0025] Simultaneously, the Canny edge detection algorithm is used to extract the complete outline of potential hazards. With low thresholds of 50 and high thresholds of 150, gradient calculation, non-maximum suppression, dual-threshold filtering, and edge connection are applied to accurately extract the outlines of targets such as fire extinguishers, electrical boxes, passageways, and cables. Large areas of walls, floors, and ceilings are removed as invalid background areas. Combined with Region of Interest (ROI) constraints, the effective calculation range containing the hazard is automatically locked, limiting the image processing scope to the target area, reducing unnecessary computation and improving recognition accuracy. For example, in an electrical box image, 70% of the blank wall surface is removed, locking in the box and its surrounding effective area, resulting in a complete and unbroken outline.
[0026] Finally, size normalization and pixel standardization are performed, scaling images of any size to a uniform 640×640 pixels while maintaining the original aspect ratio. Blank areas are filled with grayscale 128, and pixel values are linearly mapped to the 0~1 range to form a unified input specification. Through the above processing, the system ultimately determines the standardized image calculation form and basic dimensions, including fixed parameters such as input size 640×640, pixel range 0~1, feature extraction range, and enhancement intensity. This ensures that images from different scenes, under different lighting conditions, and with different resolutions can output unified standard data, guaranteeing the stability, standardization, and reproducibility of the subsequent YOLOv8 and ResNet-50 model recognition process.
[0027] When users upload images of blocked fire lanes taken at night, the overall brightness of the images is low, details in dark areas are blurry, and high-frequency noise from the shooting process is present. After performing a global detection on the image, the preprocessing module determines that the image belongs to the low-light, low-resolution type. It then negotiates with the feature enhancement engine to enable a combined processing strategy of low-light enhancement and noise suppression. The system improves the contrast of the passage and cluttered areas through an adaptive histogram equalization algorithm, removes image noise through a 5x5 Gaussian filter, and uses Canny edge detection to lock the fire lane and the area where the clutter is located as the target retention range, eliminating surrounding invalid dark backgrounds, providing accurate regional constraints and parameter basis for subsequent standardization processing.
[0028] A four-stage pipeline adapted to medical scenarios is used to standardize the original hazard images: First, noise suppression: to address noise interference from hospital lighting and granular noise caused by camera shake, a smoothing filter algorithm is used to weaken random noise and preserve the edge contours of the hazard targets. Second, low-light detail enhancement: for low-light scenes such as backlit corridors and dimly lit equipment rooms, adaptive contrast enhancement technology is used to brighten dark details and avoid overexposure of highlights, making subtle hazards such as fire extinguishers, wiring, and passageway boundaries clearly identifiable. Third, target region extraction: edge contour detection is used to remove large areas of blank walls, floors, and other invalid backgrounds, accurately locating the effective area containing the hazard subject and reducing unnecessary calculations. Finally, standardization: images are uniformly adjusted to the model adaptation size and pixel normalized to eliminate input deviations caused by differences in shooting equipment and resolution, ensuring that images of different scenes and qualities can stably adapt to the subsequent recognition model, providing stable input for the subsequent two stages of model recognition. The first stage performs image denoising processing. The system employs a 5x5 Gaussian filtering algorithm to perform global smoothing calculations on the image. Centered on each pixel, it performs a weighted average of the grayscale values of adjacent pixels, effectively suppressing common noise issues, light flicker interference, and image graininess found in hospital indoor environments. While removing noise, it fully preserves the edge contours and texture features of potential hazards, improving the overall image purity. After applying the 5x5 Gaussian filtering to the fire extinguisher image, noise in the image is completely eliminated, and the edges of the fire extinguisher bottle and pressure gauge area remain clear, without affecting subsequent detail recognition.
[0029] The second stage involves low-light image enhancement. For images captured in low-light scenarios such as corridors, equipment rooms, and storage rooms at night, the system employs an adaptive histogram equalization algorithm for local contrast enhancement. This algorithm divides the image into multiple uniform sub-regions, performs histogram equalization calculations on each sub-region, and then eliminates stitching artifacts through bilinear interpolation. This significantly improves the visibility of details in dark areas without overexposure or loss of bright area information, making key hazard features such as fire escape boundaries, electrical wiring status, and equipment markings clearly visible. After enhancing images of fire extinguishers in low light, details such as the pressure gauge pointer position, rusted areas on the bottle, and expired labels are clearly discernible, making the identification features more prominent.
[0030] The third stage involves target area extraction and background cropping. The system employs the Canny edge detection algorithm for global edge extraction of the image. Through gradient calculation, it identifies the contour boundaries of potential hazards, automatically locating target areas containing fire extinguishers, electrical equipment, hazardous chemical storage, and special equipment, while removing large areas of blank walls, open ground, and invalid ceilings as irrelevant background. The cropping range is strictly controlled between 30% and 80% of the original image to ensure the target remains intact and free of redundant information. After edge extraction of the fire extinguisher image, the system accurately locates the area where the fire extinguisher is located, automatically cropping away excess wall background and retaining only the effective area containing the target.
[0031] The fourth stage involves size normalization and pixel scaling. The system uniformly scales the images processed in the first three steps to 640 x 640 pixels, maintaining the original aspect ratio during processing. Insufficient areas are filled with gray to ensure the image size perfectly matches the subsequent model input requirements. Simultaneously, all pixel values are linearly mapped to the zero-to-one range, completing pixel standardization and eliminating brightness differences and numerical deviations caused by different shooting devices. The fire extinguisher images, after denoising, enhancement, and region extraction, are uniformly scaled to 640 x 640 pixels and pixel normalized, resulting in standardized hazard images with completely consistent specifications that can be directly input into the model. Through these four stages of continuous processing, raw hazard images captured in any medical scenario can be converted into standardized image data with low noise, clear details, standard objects, and consistent specifications, providing a consistent, reliable, and stable input foundation for the YOLOv8 and ResNet-50 two-stage recognition models.
[0032] The system performs integrity and usability checks on standardized images after four stages of processing. Based on the input requirements for hazard identification in medical scenarios, it comprehensively checks five dimensions: image brightness, noise level, target integrity, size specifications, and pixel count. The system automatically matches corresponding correction mechanisms based on the detection results to ensure that all images entering the recognition model meet quality requirements and avoid recognition errors caused by image defects. For images with low lighting and high noise, the system initiates an adaptive enhancement and filtering process again. An adaptive histogram equalization algorithm is used to perform secondary contrast enhancement in dark areas, strengthening the texture and contour features of the hazard target. Simultaneously, a 5x5 Gaussian filter is used to smooth residual noise, further improving image clarity and ensuring that the subsequent model can stably extract features. A fire extinguisher image, after initial processing, still showed slight darkness and a small amount of noise. The system automatically performed a second enhancement and filtering operation to make key details such as the pressure gauge and bottle markings clearer, meeting the recognition standards.
[0033] For images with non-standard dimensions or abnormal aspect ratios, the system triggers a proportional filling mechanism. The image is scaled proportionally to a standard size of 640 x 640 pixels. Unfilled edge areas are filled with a uniform gray, without stretching or compressing the target, preserving the original shape of the hazard. This ensures the image size strictly matches the input requirements of subsequent YOLOv8 and ResNet-50 models. For example, in the case of a narrow fire lane image with unusual proportions, the system scales it to its original ratio and fills the blank areas with gray, resulting in a standard image with a standardized size and no distortion of the target.
[0034] For images with pixel values exceeding the normal range, the system performs a linear normalization process within the zero-to-one range. This maps the brightness values of all pixels in the image to this range, eliminating data deviations caused by differences in shooting equipment and exposure parameters. This ensures a uniform and standardized distribution of image data, consistent with the data distribution used during model training, thus improving recognition stability. If an image is excessively bright with high pixel values, the system uses linear mapping to adjust all pixels to a reasonable range, preventing numerical overflow or feature loss during feature extraction.
[0035] The system employs a multi-step verification and adaptive correction process to ultimately generate optimized image data that features thorough noise removal, clear details in dark areas, complete target preservation, uniform size, and standardized pixel distribution. All correction steps are executed based on fixed algorithms and medical scenario rules, requiring no manual intervention and ensuring stable applicability to potentially hazardous images captured in various hospital environments. For example, an image with slight underexposure and missing edges will have its brightness automatically increased, edge areas filled, and size standardized after verification, ensuring the image fully meets the input conditions for AI recognition and guaranteeing accurate and reliable subsequent recognition results.
[0036] The system integrates and executes optimized image data schemes that have undergone verification and correction. Utilizing multi-scale feature extraction technology, it performs global feature analysis on the images, extracting both large-scale overall contour features and small-scale detailed texture features. These two types of features are then fused and presented, making the appearance and status characteristics of medical hazard targets such as fire-fighting equipment, power equipment, hazardous chemical storage, and special equipment clearer, facilitating accurate identification by subsequent models. Simultaneously, the system constructs a region-of-interest constraint matrix, uniformly and collaboratively matching three key parameters determined in the early stages: filter intensity, target cropping ratio, and size normalization scale, establishing the correlation and constraint relationships between these parameters. By controlling the image processing intensity and range through the constraint matrix, the system ensures that the core features of medical hazard targets, such as appearance, operational status, and spatial location, are not weakened, lost, or distorted, achieving complete preservation of target features.
[0037] The system outputs processed image data as standardized hazard image data with stable features and consistent quality. This data can be directly input into the YOLOv8 and ResNet-50 two-stage recognition models without further adjustments, providing a stable and reliable input foundation for subsequent target detection, fine-grained classification, and confidence determination. For fire extinguisher-related hazard images, after complete integration and execution, features such as the fire extinguisher cylinder, pressure gauge, markings, and placement are fully preserved and clearly identifiable. This data can be directly input into the YOLOv8 and ResNet-50 models, accurately distinguishing different subcategories of hazards such as expired fire extinguishers, obstructed fire extinguishers, and missing fire extinguishers, ensuring accurate and reliable recognition results.
[0038] S103 processes standard hazard images, performs target detection and fine-grained classification based on a two-stage model of YOLOv8 and ResNet-50, classifies them according to a 0.75 confidence threshold, automatically triggers manual fallback for low confidence, and outputs hazard category, confidence level and location information.
[0039] In one implementation, the system relies on a medical hazard feature learning mechanism to perform full-domain deep analysis on pre-processed standardized hazard images. The analysis covers three core types of information in the image: target area, feature distribution, and category attributes. This mechanism operates based on a pre-built medical scene hazard feature library, which contains visual feature data for 26 subcategories across four major categories: fire protection, electricity, hazardous chemicals, and special equipment. Each feature uses contour morphology, texture structure, color features, and spatial positional relationships as standard analysis dimensions to ensure that the analysis process closely matches the actual hazard characteristics of the medical scene.
[0040] During the analysis process, the system performs extraction operations according to fixed feature rules. For fire safety hazards, the system focuses on extracting features such as passageway boundaries, equipment appearance, and label status; for electrical hazards, it focuses on extracting features such as line morphology, enclosure structure, and connector status; for hazardous chemical hazards, it focuses on extracting features such as container appearance, label integrity, and storage environment; and for special equipment hazards, it focuses on extracting features such as instrument readings, protective devices, and operational markings. By traversing and calculating region by region, the system distinguishes effective targets from background areas in the image, locates the range of the main hazard, and achieves precise target area locking.
[0041] After feature extraction, the system automatically generates image input rules adapted to the YOLOv8 and ResNet-50 dual-model architecture based on the parsing results. These rules include key parameters such as a uniform input size of 640 x 640 pixels, a fixed image channel order, a pixel value range limited to zero to one, and a defined effective feature extraction range. All parameters fully correspond to the network structure, input interface, and feature extraction method of the dual models, enabling image data to be directly input into the models for inference calculations without additional format conversion or parameter adjustments, ensuring stable model input and a smooth recognition process.
[0042] Taking a standardized hazard image containing a fire extinguisher as an example, the system automatically locates the target area of the fire extinguisher during analysis and extracts key visual features such as the cylindrical outline of the bottle, the circular structure of the pressure gauge, the red and white color scheme of the bottle, and its relative position to the ground. Based on these features, the system generates input parameters that meet the requirements of a dual-model approach, including the target area coordinate range, feature extraction interval, and pixel input range. This allows the image to be directly fed into YOLOv8 for target detection and into ResNet-50 for fine-grained classification, accurately identifying specific hazard subcategories such as expired, obstructed, or missing fire extinguishers.
[0043] The system precisely integrates a medical scenario-specific hazard dataset with standardized image data. Using the hazard features labeled within the dataset as a reference, it constructs a high-dimensional visual feature benchmark suitable for the medical environment. This benchmark uses a unified 640x640 pixel size normalization, ROI target region localization, and pixel value scaling within the zero-to-one range as fixed constraints. It clearly defines the format specifications, feature ranges, and numerical boundaries of the model input, forming stable and unified model input rules to ensure that all images enter the recognition process according to the same standards.
[0044] A customized two-stage recognition architecture for medical scenarios is adopted: The first stage is coarse target detection, which uses an efficient detection model to quickly locate potential hazards in the image, such as fire-fighting equipment, electrical equipment, hazardous chemical containers, and special equipment, and outputs the target bounding box and basic category; The second stage is fine-grained classification, which performs in-depth feature extraction on the detected target areas to accurately distinguish sub-hazard types such as expired fire extinguishers, exposed wiring, blocked passages, and expired special equipment; At the same time, a confidence level mechanism is introduced, which directly accepts high-confidence results and automatically transfers low-confidence results to a manual review process as a fallback, avoiding misjudgments and omissions, and balancing automation efficiency with the high reliability requirements of medical safety.
[0045] The system employs a two-stage backbone network constructed using a cascaded combination of YOLOv8 and ResNet-50. Combining the characteristics of four major categories of medical hazards—firefighting, power, hazardous chemicals, and special equipment—it establishes an integrated feature recognition mechanism encompassing image input, target detection, fine-grained classification, and confidence assessment. The first stage, centered on YOLOv8, performs target detection on the input image. Multi-scale features are extracted based on the CSPDarknet backbone network, and feature fusion is achieved through a PAN-FPN structure. The decoupled detection head outputs the target location bounding box, coarse classification category, and preliminary confidence score, enabling rapid localization and broad category differentiation of hazard targets. The second stage, centered on ResNet-50, receives the target region image cropped from YOLOv8. Deep features are extracted through a convolutional network and reduced to 256 dimensions. A fully connected layer and a Softmax classification head output a fine-grained classification probability distribution, achieving accurate sub-classification of the hazard. The two-stage model is seamlessly integrated and shares features, forming a complete recognition chain from coarse to fine classification.
[0046] Taking a blocked fire lane image as an example, the integrated recognition mechanism first uses YOLOv8 to traverse and detect the entire image, locating the fire lane area and the location of the obstructing obstacle, outputting the coordinates of the target box and classifying it as a fire hazard. Then, the image area within the detected box is fed into ResNet-50 to further extract detailed features such as lane width, obstacle type, and stacking pattern, determining whether it belongs to a specific violation subclass such as obstruction by debris, locked lane, or insufficient width, and outputting the corresponding subclassification result and confidence level, thus realizing a complete process from localization to refined judgment.
[0047] The system uses hazard feature processing as a comprehensive dimension, integrating confidence threshold grading rules, Top-N candidate output methods, manual fallback triggering conditions, and the results of 26 subcategories across four hazard types to form a complete identification and judgment logic system. The system employs a 512-dimensional feature vector as the standard extraction rule and constructs an identification parameter library covering 26 subcategories based on a self-built medical scenario hazard dataset. Each subcategory corresponds to a fixed feature range and judgment threshold, ensuring a standardized and reproducible identification process.
[0048] The system uses a confidence level of 0.75 as the core judgment threshold. This threshold is determined by calculating the precision-recall curve of the validation set and the maximum F1 score, ensuring stable recognition performance. When the image recognition confidence level is greater than or equal to 0.75, the system automatically outputs the top three candidate results with the highest confidence levels for quick user confirmation. When the recognition confidence level is less than 0.75, the system immediately triggers a manual fallback process, switching to a manual assistance judgment mode. In the feature matching stage, the system uses a cosine similarity algorithm to quickly calculate and compare the extracted 512-dimensional feature vector with the standard vectors in the hazard feature database, sorting the candidate categories according to similarity to improve the stability and discriminative power of the recognition results.
[0049] For images of potential hazards in distribution boxes, the system first extracts a 512-dimensional feature vector containing information such as box shape, wiring layout, door lock status, and labeling. Then, it performs cosine similarity calculation between this vector and the standard vectors of electrical hazards in the feature library. Based on the calculation results, it outputs highly matching candidate results such as messy wiring, unlocked boxes, and lack of warning labels. At the same time, it provides a confidence score for each candidate result, providing a reliable basis for subsequent confirmation and submission.
[0050] The system integrates the recognition results output from the two-stage model, employing a four-tier preprocessing mechanism: confidence level determination, feature vector similarity matching, hazard category mapping, and manual verification. This mechanism unifies and optimizes image features and recognition results. Based on a medical scenario hazard feature library and preset judgment rules, it effectively improves the accuracy and consistency of recognition results. In the feature processing stage, the system reduces the high-dimensional features output from the YOLOv8 target detection stage to a uniform 256-dimensional feature space, reducing redundant information and improving computational efficiency. Simultaneously, the classification results output from the ResNet-50 fine classification stage are mapped to the system's preset standard hazard labels, ensuring a unified output format and direct compatibility with subsequent processes. The system uses a 0.75 confidence threshold to filter and enhance results; results above the threshold are directly adopted, while those below are corrected using manual verification to ensure the final conclusion is stable and reliable. By integrating the complete detection chain of the YOLOv8 and ResNet-50 two-stage models, the system forms a coherent recognition logic from target localization to sub-categorization. The final output includes a clear hazard category, confidence level value, and target location information. The output format is standardized and can be directly used for subsequent matching of legal clauses, generation of hazard work orders, and assignment of rectification responsibilities.
[0051] Taking a fire extinguisher image as an example, after integration and processing, the system outputs the identification result as follows: the hazard category is expired fire extinguisher, the confidence level is 0.89, and the target location is on the left side of the corridor on the first floor of the outpatient building. This result contains complete category, confidence level, and location information, which can directly trigger the corresponding regulatory matching process, generate a rectification work order, and assign it to the corresponding responsible department, achieving seamless connection from identification to disposal.
[0052] S104 processes the hazard identification results, relying on the medical safety production regulations database and adopting a three-level strategy of precise matching, keyword matching, and semantic vector matching. Combined with template filling and LLM enhancement, it generates compliance rectification suggestions and configures time limits and responsibility assignments according to the hazard level.
[0053] In one implementation, the hazard identification result dataset is categorized and split, including hazard category data, sub-category data, confidence level data, location area data, and level label data, generating hazard type classification results, a hazard-regulatory feature association table, and a rectification suggestion label mapping relationship. After completing the AI-based hazard identification, the system performs structured splitting and standardized organization of the output identification results, converting unstructured identification information into structured data that can be used for regulatory matching, work order generation, and process control. The splitting process strictly follows the medical scenario hazard classification system and data specifications, extracting five core data categories: hazard category, sub-category, confidence level value, location area, and hazard level. Each data category is formatted according to preset field rules to ensure consistent and standardized subsequent process calls.
[0054] A progressive three-tiered regulatory matching system is constructed to achieve precise association between potential hazards and compliance grounds: The first tier is precise matching, which directly matches preset hazard-regulatory binding entries and quickly retrieves the corresponding clauses; the second tier is keyword matching, which extracts the core features of the hazard to search the regulatory database and match relevant clauses; the third tier is semantic matching, which uses text semantic understanding technology to match regulatory content with similar meanings and related scenarios, solving the matching failure problem caused by differences in expression; after matching is completed, combined with rectification templates and intelligent generation capabilities, a complete rectification plan is output, including problem description, regulatory basis, rectification measures, graded time limits, and responsible departments. This plan covers emergency handling of major hazards, time-limited rectification of general hazards, and routine management of minor hazards, with clear responsibilities and time limits.
[0055] The system categorizes hazards into four primary categories: fire safety, electricity, hazardous chemicals, and special equipment. These are then further subdivided into twenty-six subcategories for a more precise secondary classification, forming a complete hazard type system. Simultaneously, it automatically establishes a mapping table between hazard visual characteristics and relevant legal provisions, binding hazard descriptions, typical features, and applicable legal clauses. This generates three types of labels—rectification measures, rectification deadlines, and responsible departments—to ensure a one-to-one correspondence between hazard types and handling rules, providing stable data support for subsequent legal retrieval, matching, and suggestion generation.
[0056] For the identified fire escape route obstruction hazards, the system performs structured breakdown processing. First, the primary category is extracted as fire safety; second, the subcategory is determined as passageway obstruction; next, the identification confidence score is read as 0.88; then, the location information is extracted as the second floor of the outpatient building; finally, the hazard level is determined as a general hazard based on the risk severity. The system combines the above five pieces of information into a standardized data item with a uniform format and complete fields. This data item can be directly input into the regulatory matching module for retrieving corresponding regulatory clauses, generating rectification suggestions, configuring rectification deadlines, and assigning responsible departments.
[0057] Based on the medical hazard regulation matching strategy and rectification suggestion generation rules, the system uniformly organizes and standardizes the structured hazard type classification results, hazard regulation association table, and rectification tag mapping relationship. The standardization process adheres to the safety production management requirements of medical scenarios, unifying data formats, field definitions, and retrieval logic to ensure the stability, efficiency, and accuracy of subsequent regulation matching processes. The system sets the regulation retrieval scope and granularity based on the clause matching precision threshold, employing a progressive retrieval strategy from precise to broad, sequentially executing three levels of rules: precise matching, keyword matching, and semantic vector matching, gradually expanding the matching scope to ensure that corresponding compliance evidence can be found in any scenario.
[0058] Exact matching is the highest priority rule. The system directly queries the pre-defined hazard-to-regulation mapping table using the unique identifier of the hazard, quickly locating the pre-bound regulatory clauses. This method boasts fast retrieval speed and high matching accuracy. When exact matching yields no results, the system automatically initiates keyword matching. It extracts core keywords from the hazard description and characteristics, performs a reverse search in the full-text index and inverted index of the regulatory database, and quickly filters regulatory clauses containing the keywords. If keyword matching still yields no results, the system initiates semantic vector matching. It uses a text vector model to convert the hazard description and regulatory clauses into feature vectors, calculates the cosine similarity between the vectors to determine the degree of association, and returns the most similar related clauses. This three-level progressive matching mechanism ensures complete and accurate matching results.
[0059] To address the hazard of expired fire extinguishers, the system first performs precise matching, directly retrieving the corresponding clauses from the Nine Regulations on Fire Safety Management of Medical Institutions based on the hazard number. If precise matching returns no results, the system automatically extracts core keywords such as "fire extinguisher," "expired," and "regular inspection" and performs a keyword search in the regulatory database. If the keyword search still yields no matching clauses, the system converts the hazard description into a feature vector, calculates the cosine similarity between this vector and all regulatory clause vectors, and returns the most relevant regulatory clauses based on similarity ranking, completing the full three-level matching process.
[0060] Based on the matching results of regulations and the parameters of the hazard level, the system classifies and integrates all hazards, dividing them into four sub-datasets: direct matching rectification, keyword matching rectification, semantic matching rectification, and level-time limit configuration. These sub-datasets form four categories of rectification control batches with unified rules and clear processing procedures. Each dataset corresponds to independent processing logic, suggestion generation methods, and execution sequences, ensuring standardized and traceable rectification and handling.
[0061] For hazards entering the direct matching rectification subset, the system generates rectification suggestions using a preset fixed template. The template is pre-prepared based on medical safety production regulations and includes complete elements such as problem description, rectification measures, legal basis, rectification deadline, and responsible department, resulting in standardized and compliant output. For hazards entering the keyword matching and semantic matching rectification subsets, the system, based on the basic template, combines a large model enhancement generation method to personalize the hazard description, scenario characteristics, and rectification conditions, forming rectification suggestions more closely aligned with the actual situation on-site. The system also automatically configures corresponding rectification completion deadlines based on three levels: major hazards, general hazards, and minor hazards, establishing a direct correspondence between hazard level and rectification deadline, forming clearly grouped and uniformly regulated rectification control batches.
[0062] Based on the matching results for different types of hazards, the system performs differentiated grouping processing. For exposed wire hazards, the system directly associates them with electrical safety regulations through precise matching, categorizing them into the direct matching rectification subset. A fixed template is used to generate standard rectification suggestions and configure corresponding rectification deadlines. For hazards caused by obstructed fire exits, the system retrieves regulations through keyword matching, categorizing them into the keyword matching rectification subset. Combined with large-scale model enhancement, rectification suggestions tailored to the site environment are generated. For equipment anomaly hazards, the system associates them with regulations through semantic vector similarity matching, categorizing them into the semantic matching rectification subset. Personalized rectification plans are generated to suit the equipment type and fault characteristics. All hazards are configured with rectification deadlines according to their severity level, forming complete rectification management information that can be directly issued and implemented.
[0063] The system prioritizes all rectification and control batches according to their hazard level and compliance risk. The prioritization rules are based on medical safety production management regulations, with major hazards having the highest risk level and receiving priority for dispatch and handling. General hazards have a medium risk level and are addressed sequentially according to procedures. Minor hazards have a low risk level and only require rectification within the stipulated timeframe. The system combines the synchronous pace of hazard closed-loop management with the tiered rectification sequence requirements to establish differentiated handling schedules for hazards of different priorities, ensuring rapid response to high-risk hazards and orderly handling of low-risk hazards.
[0064] Based on the sorting results, the system generates a complete rectification implementation plan. The plan includes all control elements such as a unique rectification batch number, detailed matching regulatory clauses, standardized rectification suggestions, verification methods, and time-limit compensation rules for hazard levels. It also establishes unified review standards, content modification rules, and timeout handling mechanisms, integrating the above information into rectification process control information that can be directly used for hazard work order circulation, achieving seamless integration from regulatory matching and suggestion generation to process execution.
[0065] Regarding the potential hazard of unlocked distribution boxes, the system prioritizes this issue based on hazard level and compliance risk assessment rules. The system assigns a unique rectification number to this hazard, links it to relevant electrical safety regulations, generates rectification suggestions including immediate locking, standardized labeling, and regular inspections, configures a 24-hour emergency rectification deadline, and sets image verification and EXIF information validation as verification methods, forming a rectification instruction containing all execution elements. This instruction can be directly issued to the responsible person in the corresponding electrician team. The responsible person completes the rectification as required and uploads on-site photos. The system automatically verifies the authenticity of the photos and the rectification effect, completing closed-loop management.
[0066] S105 processes the work orders and rectification procedures for potential hazards, constructs a closed-loop flow logic of reporting, pending rectification, rectification in progress, pending verification, and archived, realizes AI verification of audio and video dual media, EXIF verification, return for upgrade and archiving, and simultaneously completes WeChat external link collaboration, permission isolation and multi-condition query to form complete and traceable closed-loop data.
[0067] In one implementation, the system automatically generates uniquely identified hazard work orders based on hazard identification results, constructing a five-step standard workflow path: reporting, pending rectification, rectification in progress, pending verification, and archived, forming a closed-loop management logic for the entire lifecycle. The system automatically advances status transitions according to preset timing rules and operation nodes, while also supporting branch process triggers such as overdue, extension applications, and verification failure returns. Each status transition records the operator, operation time, operation content, and preceding and following status information, ensuring that the entire process is traceable, monitorable, and auditable.
[0068] After a user submits a report of a blocked fire exit, the system immediately generates an independent work order and sets its status to "Reported." Once the responsible department and person are automatically matched, the status changes to "Pending Rectification." After the responsible person confirms that they have begun handling the issue, the status updates to "Rectifying." After rectification is completed and supporting materials are uploaded, the work order enters the "Pending Verification" phase. Once the reviewer confirms that the work order is qualified and approved, the status finally changes to "Archived," completing the entire closed-loop process.
[0069] After rectification is completed, the system supports uploading images or videos as verification evidence, employing a dual-media AI verification rule to ensure the authenticity and effectiveness of the rectification. For image materials, the system calls the ResNet-50 feature extraction model to obtain feature vectors of the images before and after rectification, calculates cosine similarity to determine the effectiveness of hazard elimination, and simultaneously reads the shooting time and geographical location from the image's EXIF information to verify that the material was captured in real time on-site. For video materials, the system extracts keyframes one frame per second, performs feature comparison with the images on all frames, and performs consistency verification by extracting descriptive content from speech-to-text and matching it with hazard information. The responsible person uploads a photo of the replaced fire extinguisher, the system compares features to determine hazard elimination, verifies the shooting time to be the current time, confirms the authenticity and effectiveness of the material, and the verification is completed.
[0070] When reviewing rectification results, auditors can choose to approve or disapprove. If disapproval is selected, a reason explanation of at least ten words must be provided, and the work order will be automatically returned to the "rectification in progress" status. The system tracks the number of returns in real time; when the cumulative number of returns reaches three or more, an escalation reminder is automatically sent to the superior manager. Work orders that pass verification and meet the requirements of complete rectification information and all relevant legal clauses are automatically archived. Archived data only supports viewing and adding notes; modification and deletion are not supported. The retention period meets the three-year long-term management requirement, and all operation records are fully traceable. If a hazard fails verification and is returned to "rectification in progress," the responsible person can revise and resubmit. After multiple returns, the system automatically notifies the department head. Finally, once rectification is approved and the work order is archived, all operations can be queried and traced.
[0071] The system generates a unique WeChat external link for each hazard work order. The link has a fixed validity period, and visitors have only read-only access. Collaboration requests require approval from the creator. The system implements data access isolation based on personnel roles: ordinary personnel can only view hazard data for their own unit, while managers can view all data within their jurisdiction. The system supports multi-condition queries based on rectification status, hazard type, hazard level, and time range. Results are sorted in reverse chronological order by submission time, and complete rectification records and personnel information can be viewed. Safety officers share fire hazard work orders to the logistics department. Recipients can view details and apply for collaboration via the link. After approval, they participate in the handling. Ordinary personnel can only view work orders within their own department, while managers can query and compile statistics for the entire hospital.
[0072] The system integrates all work order status logs, verification materials, validation results, operation logs, collaboration records, and query logs into structured closed-loop data. All information is uniquely linked to the hazard work order, enabling full traceability, responsibility identification, verification of rectification effectiveness, and review of process compliance. This provides comprehensive data support for subsequent statistical analysis, regulatory review, and accountability. For example, all status changes, verification images, validation results, sharing records, and operator information for a fire escape obstruction hazard, from submission to archiving, are fully saved and can be retrieved and viewed at any time.
[0073] S106 processes business data across the entire process, statistically analyzes hazard distribution, rectification rate, timeliness rate, and regional risk scores, and presents the data visually through various types of charts. It integrates the results of the entire chain and outputs hazard control and analysis results that can be directly used for management decisions.
[0074] In one implementation, the system performs unified parsing and standardization on all business data related to potential hazards, work order status data, and rectification verification data. It breaks down and adapts the statistical dimensions, indicator algorithms, and scoring rules contained in the data item by item, achieving unified standardization of the data format. The system converts unstructured information such as hazard categories, subcategories, work order status, rectification time, verification results, and rectification quality into numerical and tagged features that can be directly used in calculations. This generates three types of basic feature data: hazard type statistical features, rectification efficiency calculation features, and regional risk assessment features. This provides a stable and reliable foundation for subsequent indicator calculations, risk assessment, and visualization.
[0075] In the statistical dimension analysis phase, the system extracts the major category, sub-category, occurrence area, reporting time, rectification status, verification results, hazard level, and responsible department as basic statistical dimensions, clarifying the calculation caliber and statistical scope of each indicator. In the indicator algorithm analysis phase, the system extracts the calculation formulas for the total number of hazards, type distribution ratio, rectification completion rate, rectification timeliness rate, average rectification cycle, and regional risk score, clarifying the calculation logic and parameter sources for each indicator. In the scoring rule analysis phase, the system extracts the weighting rules for major, general, and minor hazards, as well as the judgment thresholds for high, medium, and low risk areas, clarifying the quantitative standards for risk assessment.
[0076] The system standardizes and transforms the parsed information, tagged and encodes textual information, converts time-related information into time difference values, and converts status-related information into Boolean or level values, ensuring that all data has a unified format that is calculable, comparable, and statistically valid. Based on this, the system generates three types of standardized features: statistical features of hazard types reflecting the distribution of hazards, calculation features of rectification efficiency reflecting the efficiency of handling, and regional risk assessment features reflecting the safety level of a location.
[0077] The system extracts and transforms all hazard data, including blocked fire exits in the outpatient building, exposed wires in the pharmacy, unlocked electrical boxes, and expired fire extinguishers. It converts status information such as reported, pending rectification, in progress, pending verification, and archived into statistical status features. It converts the start time of rectification, submission time for verification, and approval time into rectification time features. It converts verification results such as verification passed, verification failed, and returned for rectification into rectification validity features. Finally, it forms standardized data items with unified format and consistent standards that can be directly used in calculations, providing complete data support for subsequent statistical analysis, indicator calculation, and visualization output.
[0078] The system addresses the practical needs of end-to-end data statistical analysis by transforming functional requirements such as indicator calculation, risk assessment, and visualization into executable calculation rules and configuration logic. It clearly defines parameter boundaries and execution scope, forming standardized statistical analysis constraints. The system provides a unified execution standard for subsequent statistical calculations, risk assessments, chart generation, and data export by solidifying four core configurations: hazard weighting parameters, risk level classification thresholds, chart rendering configuration parameters, and data export format specifications. Based on medical safety management regulations and hazard risk levels, the system sets fixed weighting parameters for different levels of hazards. Major hazards are assigned a weight of three, general hazards two, and minor hazards one. These weighting parameters are used for regional risk scoring calculations, objectively reflecting the impact of different hazards on the safety status of medical facilities.
[0079] The system establishes regional risk scoring rules based on weight parameters and statistical periods, and defines thresholds for high-risk, medium-risk, and low-risk areas according to the calculation results. A regional risk score greater than or equal to 0.5 is classified as a high-risk area. A regional risk score greater than or equal to 0.2 and less than 0.5 is classified as a medium-risk area. A regional risk score less than 0.2 is classified as a low-risk area. The system determines corresponding chart rendering styles for different analysis dimensions. Hazard type distribution is displayed using a pie chart, rectification status distribution using a bar chart, regional risk distribution using a heat map, and hazard change trends using a line chart. The system also specifies data export formats as Excel and PDF, clearly defining the structure and field specifications of the exported files. The system integrates the aforementioned weight parameters, thresholds, chart styles, and export formats to form complete statistical analysis constraints. All parameters and rules are fixed configurations and are automatically invoked during statistical analysis without manual intervention, ensuring stable, comparable, and reproducible statistical results.
[0080] When conducting safety statistical analysis in the hospital area, the system automatically calls the pre-set hazard weights, risk thresholds, chart types, and export formats to perform risk scoring on areas such as the outpatient building, pharmacy, and emergency corridor. It generates visual charts that include the proportion of hazards, rectification status, and risk level, and exports them as Excel and PDF files in accordance with the prescribed formats, providing standardized and unified analytical materials for management decision-making.
[0081] The system matches statistical results with management decision-making objectives using an objective function. It then calibrates indicators and evaluates data validity by incorporating hospital supervision logic. This generates alignment features for hazard distribution, evaluation parameters for rectification quality, and parameters for risk area determination, resulting in optimized analysis information. Guided by the safety management decision-making goals of medical institutions, the system constructs an objective function that matches statistical results with management objectives. It aligns the three statistical outputs—hazard distribution, rectification efficiency, and regional risk—with the actual supervision logic of daily hospital supervision, key prevention and control, responsibility implementation, and compliance inspections. Based on preset statistical rules and business constraints, the system performs numerical calibration and data validity evaluation on all indicators, removing abnormal records, correcting biased indicators, and supplementing missing fields. This results in optimized analysis information that aligns with the realities of medical site management, ensuring that the output conclusions are truthful, accurate, and usable for management decision-making.
[0082] The system first performs alignment verification on the distribution characteristics of potential hazards, checking the consistency between the identified hazard categories, subcategories, and locations and the actual departmental distribution, equipment layout, and patrol routes within the hospital area, eliminating distribution deviations caused by image misidentification or incorrect location labeling. Secondly, it conducts a quantitative evaluation of rectification quality, based on indicators such as rectification completion rate, rectification timeliness rate, average rectification cycle, and verification pass rate, combined with actual work order processing time and departmental handling capabilities, making reasonable corrections to indicators that significantly deviate from the normal range. Thirdly, it verifies the accuracy of risk area determination results, comparing the high, medium, and low risk areas calculated by the system with daily patrol records, historical hazard data, and key control areas to ensure consistency between risk assessment and on-site safety conditions.
[0083] During data processing, the system automatically identifies and excludes duplicate reports, incorrectly labeled records, and invalid records that have not completed the closed loop. It smooths and corrects deviation indicators caused by missing data or calculation anomalies, and reasonably constrains extreme data that exceed the normal range, ensuring that the statistical results conform to the actual laws of medical safety management. Through the above alignment, evaluation, judgment, and correction process, the system generates hazard distribution alignment features, rectification quality evaluation parameters, and risk area judgment parameters, integrating them to form optimized analysis results information, providing a reliable basis for subsequent visualization and decision-making output.
[0084] The system performs a specific calibration operation on the regional risk score. Based on the regional hazard density scoring formula and the weight settings for major, general, and minor hazards, the system first removes old records that have completed closed-loop management and exceeded the effective statistical period, redundant records reported repeatedly, and invalid work orders that have not been actually verified. Then, it smooths and corrects abnormally high scores caused by concentrated reporting in a short period and reasonably compensates for abnormally low scores caused by underreporting. Ultimately, this ensures that the regional risk score accurately reflects the actual safety level of different areas such as outpatient clinics, wards, pharmacies, equipment rooms, and fire exits, ensuring that the high-risk area assessment results are completely consistent with the actual safety situation of the hospital area, providing a reliable basis for key prevention and control and resource allocation.
[0085] The system integrates basic data analysis information, statistical analysis constraint information, and analysis result optimization information into a unified whole, conducting full-process collaborative design based on the business logic of medical safety management. The integrated content covers four core functions: automatic indicator calculation, multi-dimensional chart rendering, high-risk area heat map generation, and structured export to Excel and PDF. All processes are automatically executed according to preset algorithms and rules, generating complete hazard control and analysis results that can directly support medical institutions' safety management decisions.
[0086] In the automatic indicator calculation stage, the system automatically completes the quantitative calculation of core indicators based on pre-set statistical algorithms and weighting rules. The system calculates the total number of hazards within the statistical period, categorizes them by statistical type (fire protection, electricity, hazardous chemicals, and special equipment), calculates the rectification completion rate based on the number of archived work orders, calculates the rectification timeliness rate based on the number of timely archived work orders, and obtains the average rectification cycle by the difference between the archiving time and the reporting time. The system uses a regional hazard density scoring formula to calculate the regional risk score, multiplying the number of major hazards by three, the number of general hazards by two, and the number of minor hazards by one, summing the results, and then dividing by the number of days in the statistical period to obtain the final score.
[0087] In the multi-dimensional chart rendering stage, the system automatically generates visual charts matching different analysis dimensions based on the chart configuration rules in the statistical analysis constraints. The system uses pie charts to display the percentage structure of different hazard types, bar charts to show the distribution of rectification status in different departments or areas, line charts to show the monthly or quarterly trends in the number of hazards and rectification rate, and heat maps overlaid on the campus map to present the risk level of each area. All charts are rendered in a unified style, with clear data labels, accurate proportions, and can be directly used for reporting and presentation.
[0088] In the high-risk area heat map generation stage, the system uses color mapping based on the calibrated regional risk score and three risk levels: high-risk, medium-risk, and low-risk. High-risk areas are marked in red, medium-risk areas in yellow, and low-risk areas in green. The system overlays the color layer with the campus building floor plan to visually present the distribution of safety risks throughout the campus.
[0089] During the data export phase, the system generates structured Excel and PDF files according to the prescribed format. The Excel file includes a summary table, a detailed list of potential hazards, a trend data table, and a regional analysis table. The PDF file includes statistical conclusions, key charts, risk distribution, and rectification suggestions, facilitating reporting, archiving, and external inspections.
[0090] The system automatically generates monthly safety management analysis reports, providing unified statistics and analysis of all hazard data for the month. The report shows that fire safety hazards accounted for the highest proportion, and the outpatient building area, with a risk score of 0.5 or higher, was classified as a high-risk area. The hospital-wide timely rectification rate reached 90%. The system outputs these conclusions in a combination of pie charts, bar charts, regional heat maps, and structured reports, providing the hospital with direct and reliable decision-making support for developing inspection plans, allocating rectification resources, and implementing safety responsibilities.
[0091] In one implementation, such as Figure 2 As shown, this application also provides a closed-loop management system for safety hazard identification and rectification in medical institutions, including: The basic data acquisition module 201 is used to acquire images of potential hazards, real-time question-and-answer photo reporting information, medical safety production regulations database text, hospital area permission configuration, and rectification collaboration requirements. Image preprocessing module 202 is used to perform noise reduction, enhancement, ROI extraction, size normalization and pixel value standardization on basic image data to form standard hidden danger image data adapted to AI recognition; The hazard intelligent identification module 203 is used to perform target detection and fine-grained classification on standard hazard images using a two-stage model of YOLOv8 and ResNet-50. It makes graded judgments based on a confidence threshold of 0.75 and triggers manual fallback, outputting hazard category, confidence level and location information. The compliance rectification generation module 204 is used to generate rectification suggestions based on the hazard identification results using a three-level matching strategy based on the legal database, combined with template filling and LLM enhancement, and to configure rectification time limits and responsibility assignments according to the hazard level. The closed-loop process control module 205 is used to build the full life cycle flow logic of the hidden danger work order, realize audio and video dual-media verification, EXIF verification, return and upgrade and archiving evidence, and simultaneously complete WeChat external link collaboration, permission isolation and multi-condition query. The data analysis and decision-making module 206 is used to statistically analyze, score, and visualize the business data throughout the entire process. It integrates the output of the entire chain and can be directly used for management decision-making, including risk control and analysis results.
[0092] The various embodiments in this application are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for evaluating the closed-loop management method for identifying and rectifying safety hazards in medical institutions, electronic devices, electronic equipment, and readable storage media are basically similar to the above-described embodiments of the closed-loop management method for identifying and rectifying safety hazards in medical institutions, so the description is relatively simple. Relevant parts can be referred to in the descriptions of the above-described embodiments of the closed-loop management method for identifying and rectifying safety hazards in medical institutions.
Claims
1. A closed-loop management method for safety hazard identification and rectification in medical institutions, characterized in that, include: Acquire basic management and control data for medical scenarios, including images of potential hazards, real-time question-and-answer photo reporting information, medical safety production regulations and texts, hospital access configurations, and rectification collaboration requirements; The basic image data is preprocessed by using Gaussian filtering for noise reduction, CLAHE low-light enhancement, Canny edge detection for ROI extraction, 640×640 size normalization and pixel value standardization to form standard hazard image data adapted for AI recognition. Standard hazard images are processed, and target detection and fine-grained classification are completed based on a two-stage model of YOLOv8 and ResNet-50. The hazard is classified according to a confidence threshold of 0.
75. Low confidence automatically triggers manual fallback, and the hazard category, confidence level and location information are output. The results of hazard identification are processed, and a three-level strategy of precise matching, keyword matching and semantic vector matching is adopted based on the medical safety production law database. Combined with template filling and LLM enhancement, compliance rectification suggestions are generated, and time limits and responsibility assignments are configured according to the hazard level. Process the work orders and rectification process for potential hazards, and build a closed-loop flow logic of reporting, waiting for rectification, rectification in progress, waiting for verification, and archived. It realizes AI verification of audio and video dual media, EXIF verification, return for upgrade and archiving, and simultaneously completes WeChat external link collaboration, permission isolation and multi-condition query to form a complete and traceable closed-loop data. The system processes business data across the entire process, statistically analyzes hazard distribution, rectification rate, timeliness rate, and regional risk scores, and presents these data through various types of charts and graphs. It integrates the results from the entire chain and outputs hazard control and analysis results that can be directly used for management decisions.
2. The method as described in claim 1, characterized in that, The basic image data is preprocessed using Gaussian filtering for noise reduction, CLAHE low-light enhancement, Canny edge detection for ROI extraction, and 640×640 size normalization and pixel value standardization to form standard hazard image data suitable for AI recognition, including: Based on the feature distribution and scene illumination difference rules of medical hazard images, the image optimization and target preservation strategies are determined by the preprocessing module and the feature enhancement engine through negotiation. The image calculation form and standardized basic dimensions are determined by multi-dimensional processing of Gaussian filtering, CLAHE, and Canny operators and ROI region constraints. A four-stage processing mechanism of denoising-enhancement-extraction-normalization is adopted to process the basic image. First, image denoising is completed based on 5×5 Gaussian filtering. Then, the contrast of dark light is improved by CLAHE algorithm. The effective target area is extracted by Canny edge detection. The image is uniformly scaled to 640×640 size and filled with gray. The recognition accuracy and the core requirements of model input are correlated to generate standardized image data. The standardized image data is validated for validity. Adaptive enhancement and cropping are initiated for low light, high noise, and invalid backgrounds. A proportional filling mechanism is triggered for non-standard sizes. A normalization process is performed in the [0,1] interval for pixel values that exceed the limit. An optimized image data scheme is generated that includes noise removal, dark area enhancement, target preservation, and size standardization. The optimized image data scheme is integrated and executed, and multi-scale feature extraction is combined to achieve clear presentation of potential hazards. ROI constraint matrix is constructed simultaneously, and the complete preservation of medical hazard features is ensured through collaborative matching of filtering intensity, cropping ratio, and normalized scale. Standard hazard image data adapted to YOLOv8 and ResNet-50 model inputs is generated.
3. The method as described in claim 1, characterized in that, Standard hazard images are processed, and target detection and fine-grained classification are completed based on a two-stage model using YOLOv8 and ResNet-50. Hazard classification is based on a 0.75 confidence threshold, with low confidence levels automatically triggering manual intervention. The output includes hazard category, confidence level, and location information, including: By using a medical hazard feature learning mechanism, the target region, feature distribution, and category attributes in standardized hazard images are deeply analyzed to generate image input rules and feature extraction parameter ranges that are compatible with both YOLOv8 and ResNet-50 models. By connecting with a dedicated dataset of potential hazards in medical scenarios and standardized image data, a high-dimensional visual feature benchmark is constructed. The model input rules are determined through 640×640 size normalization, ROI region localization, and pixel value scaling. At the same time, a two-stage backbone network of YOLOv8-ResNet-50 is introduced. Combining the features of four types of potential hazards—fire protection, electricity, hazardous chemicals, and special equipment—an integrated feature recognition mechanism of image input, target detection, fine-grained classification, and confidence determination is established. Using hazard feature processing as the coverage dimension, it integrates confidence threshold grading, Top-N candidate output, manual fallback triggering conditions and hazard subclass classification results, combined with 512-dimensional feature vector extraction rules and 26 sub-class identification parameters; By integrating image features and recognition results through confidence level determination, feature vector similarity matching, hazard category mapping and manual verification preprocessing mechanism, the target detection features are reduced to 256 dimensions and fine classification features are mapped to standard hazard labels. The recognition accuracy is enhanced by combining confidence threshold, and a two-stage model detection technology link is integrated to generate hazard category, confidence and location information.
4. The method as described in claim 1, characterized in that, The results of hazard identification are processed, and a three-level strategy of precise matching, keyword matching, and semantic vector matching is adopted based on the medical safety production law database. This is combined with template filling and LLM enhancement to generate compliance rectification suggestions. Time limits and responsibility assignments are configured according to the hazard level, including: The dataset of hazard identification results is classified and split, including hazard category data, sub-category data, confidence level judgment data, location area data, and level label data, generating hazard type classification results, hazard-regulatory feature association table, and rectification suggestion label mapping relationship; Based on the strategy of matching medical hazard regulations and generating rectification suggestions, the results of hazard type classification, hazard-regulatory feature association table, and rectification suggestion tag mapping relationship are standardized. The granularity of regulation retrieval is set in combination with the clause matching accuracy threshold, and the execution logic of precise matching, keyword matching and semantic vector matching is clarified according to the three-level matching rules. Based on the regulatory matching granularity standard and suggestion generation rules, each hidden danger category is grouped and integrated to form a rectification control batch that includes direct matching rectification subset, keyword matching rectification subset, semantic matching rectification subset, and level and time limit configuration subset. Prioritize compliance for each rectification and control batch, and formulate an orderly rectification plan in conjunction with the closed-loop management synchronization rhythm and the hierarchical rectification sequence requirements. Generate rectification process control information that includes rectification batch number, detailed list of legal provisions, suggested generation plan, synchronization verification rules, and hazard level time limit compensation rules.
5. The method as described in claim 4, characterized in that, The entire process of business data is processed to statistically analyze hazard distribution, rectification rate, timeliness rate, and regional risk scores. This data is then visualized using various types of charts and graphs. The integrated output of the entire process provides hazard control and analysis results that can be directly used for management decision-making, including: The statistical dimensions, indicator algorithms, and scoring rules in the entire process of hidden danger business data, work order status data, and rectification verification data are adapted, analyzed, and standardized to generate statistical characteristics of hidden danger types, calculation characteristics of rectification efficiency, and regional risk assessment characteristics, forming basic information for data analysis. The system transforms the logical rules and defines the configuration boundaries for the indicator calculation, risk assessment, and visualization requirements in the full-process data statistical analysis, and generates parameters for assigning hazard weights, thresholds for risk level classification, configuration parameters for chart rendering, and data export format specifications, thus forming statistical analysis constraint information. The objective function is matched between statistical results and management decision-making objectives. Combined with the hospital's regulatory logic, indicator calibration and data validity assessment are performed to generate hazard distribution alignment characteristics, rectification quality evaluation parameters, and risk area determination parameters, thus forming optimization information for the analysis results. By integrating basic data analysis information, statistical analysis constraint information, and analysis result optimization information, the entire process of automatic indicator calculation, multi-dimensional chart rendering, high-risk area heat map generation, and structured export to Excel / PDF is designed collaboratively, outputting complete hazard control and analysis results that can be directly used for safety management decisions in medical institutions.
6. A closed-loop management system for safety hazard identification and rectification in medical institutions, characterized in that, The system includes: The basic data acquisition module is used to acquire images of potential hazards, real-time question-and-answer photo reporting information, medical safety production regulations and text, hospital area permission configuration, and rectification collaboration requirements. The image preprocessing module is used to perform noise reduction, enhancement, ROI extraction, size normalization and pixel value standardization on basic image data to form standard hazard image data adapted to AI recognition. The hazard intelligent identification module is used to perform target detection and fine-grained classification on standard hazard images using a two-stage model of YOLOv8 and ResNet-50. It makes graded judgments based on a confidence threshold of 0.75 and triggers manual fallback, outputting hazard category, confidence level and location information. The compliance rectification generation module is used to generate rectification suggestions based on the hazard identification results using a three-level matching strategy based on the legal database, combined with template filling and LLM enhancement, and to configure rectification time limits and responsibility assignments according to the hazard level. The closed-loop process control module is used to build the full life cycle flow logic of the hidden danger work order, realize audio and video dual-media verification, EXIF verification, return and upgrade and archiving evidence, and simultaneously complete WeChat external link collaboration, permission isolation and multi-condition query. The data analysis and decision-making module is used to statistically analyze, score, and visualize business data throughout the entire process. It integrates the output of the entire chain and can be directly used for management decision-making, including risk control and analysis results.
7. An electronic device, characterized in that, include: First processor; The processor also includes a memory for storing executable instructions of the first processor; wherein the first processor is configured to execute the closed-loop management method for identifying and rectifying safety hazards in medical institutions as described in any one of claims 1 to 5 by executing the executable instructions.