A medical instrument inspection method, device, equipment and storage medium
By combining image processing and deep learning OCR technology with multi-dimensional database comparison and risk warning models, the system can automatically identify and verify medical device certificates of conformity, solving the problem of low efficiency in manual acceptance and realizing full life-cycle risk management and digital transformation of medical devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU HUIJI DIGITAL TECH CO LTD
- Filing Date
- 2026-03-03
- Publication Date
- 2026-06-09
Smart Images

Figure CN122176683A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical device management, and in particular to a medical device testing method, apparatus, equipment, and storage medium. Background Technology
[0002] As special products directly related to people's lives and health, the quality control and risk supervision of medical devices are of paramount importance. Currently, the acceptance of medical device certificates of conformity mainly relies on manual methods, which suffers from inefficiency, susceptibility to errors, and difficulty in achieving standardized processing. Especially for large medical institutions, which need to process a large number of medical device certificates of conformity every day, manual acceptance is not only time-consuming and labor-intensive, but also prone to human negligence, allowing unqualified products to enter the clinical use stage and creating safety hazards.
[0003] In conclusion, ensuring the safe use of medical devices is an urgent issue that needs to be addressed. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a method, apparatus, equipment, and storage medium for testing medical devices, which can ensure the safe use of medical devices. The specific solution is as follows: In a first aspect, this application provides a method for testing medical devices, comprising: Obtain the initial certificate image corresponding to the target medical device, and use the Hough transform algorithm to perform tilt correction on the initial certificate image to obtain the rotated certificate image. The target region in the rotated certificate image is located based on the HSV color space, and the target object in the target region is removed using a preset image restoration algorithm to obtain the restored certificate image; wherein, the target object is the object that obscures the certificate information in the image. The blurriness of the repaired certificate image is detected by the Laplacian operator, and super-resolution reconstruction is performed on the repaired certificate image based on the blurriness to obtain the processed certificate image. The structural information of the processed certificate image is obtained by using a preset deep residual network in the target optical character recognition model, and the certificate information in the processed certificate image is extracted based on the structural information by using a convolutional recurrent neural network in the target optical character recognition model. The extracted certificate information is compared with the preset certificate information in the preset database to obtain the corresponding comparison results; Based on the comparison results, the target medical device is risk-predicted using a preset risk warning model to obtain the corresponding target prediction score. The target risk level of the target medical device is determined based on the target predicted score. A corresponding test report for the target medical device is generated based on the target risk level, and the test report is sent to the user terminal so that the user terminal can handle the target medical device.
[0005] Optionally, the step of using the Hough transform algorithm to perform tilt correction on the initial certificate image to obtain the rotated certificate image includes: The target tilt angle of the initial certificate image that satisfies the preset optimal visual conditions is determined based on the preset Hough transform tilt correction algorithm. The initial certificate image is rotated according to the target tilt angle to generate a corresponding rotated certificate image.
[0006] Optionally, the step of detecting the blurriness of the repaired certificate image using the Laplacian operator and performing super-resolution reconstruction on the repaired certificate image based on the blurriness to obtain the processed certificate image includes: The blurriness of the repaired certificate image is determined using the Laplacian operator; Determine whether the ambiguity is less than a preset ambiguity threshold; If so, a preset resolution adjustment operation is triggered on the repaired certificate image to generate the corresponding processed certificate image. If not, then the repaired certificate image will be directly identified as the processed certificate image.
[0007] Optionally, before obtaining the structural information of the processed certificate image using a preset deep residual network in the target optical character recognition model, the method further includes: Obtain the initial optical character recognition model; Preset data augmentation samples are determined based on a preset data augmentation strategy; the preset data augmentation samples include preset deformed image samples, preset blurred image samples, preset noisy image samples, preset illumination change image samples, and preset text distortion image samples; The initial optical character recognition model is trained based on the preset data augmentation samples to obtain the target optical character recognition model.
[0008] Optionally, the certificate information includes medical device identification, registration certificate number, production batch number, serial number, production date, inspection date, company name, and production address; Accordingly, the step of comparing the extracted certificate information with the preset certificate information in the preset database to obtain the corresponding comparison results includes: The medical device identifier of the target medical device is compared with the medical device identifiers in the first database to obtain a first comparison result; the first database includes the medical device identifiers of various medical devices statistically analyzed locally. If the first comparison result indicates that the medical device identifier of the target medical device does not exist in the first database, then the second database is called according to the first API interface, and the medical device identifier of the target medical device is compared with the medical device identifier in the second database to obtain a second comparison result; the second database includes the medical device identifiers of each medical device counted by the target supervision and management department; Determine the second API interface of the third database; the third database includes the registration certificate numbers of various medical devices; The third database is called according to the second API interface, and the registration certificate number of the target medical device is compared with the registration certificate number in the third database to obtain the corresponding third comparison result; The production information of the target medical device is compared with the production information in the fourth database to obtain the fourth comparison result; the production information includes production batch number, serial number, production date, inspection date, company name and production address.
[0009] Optionally, the step of obtaining a corresponding target prediction score by performing risk prediction on the target medical device based on the comparison results using a preset risk warning model includes: Using a pre-defined medical device identification verification model, a risk assessment is performed on the target medical device based on the first comparison result and the second comparison result to generate a first prediction score; Using a pre-defined registration certificate validity verification model based on the third comparison result, a risk prediction is performed on the target medical device to generate a second prediction score; Based on the fourth comparison result, a risk prediction is performed on the target medical device using a pre-set local benchmark database comparison model to generate a third prediction score; Obtain the pass rate of the target medical device in each region; Using a pre-defined regional difference analysis model, the standard deviation of the pass rate for each region is determined based on the pass rate, and a fourth estimated score is determined based on the standard deviation of the pass rate. Obtain the pass rate fluctuation data of the target medical device within a preset time window; The corresponding volatility is determined based on the pass rate volatility data of the preset time window using a preset time series volatility identification model, and the fifth estimated score is determined based on the volatility. The first estimated score, the second estimated score, the third estimated score, the fourth estimated score, and the fifth estimated score are weighted and summed to obtain the target estimated score of the target medical device.
[0010] Optionally, the step of determining the target risk level of the target medical device based on the target predicted score, generating a corresponding test report for the target medical device based on the target risk level, and sending the test report to the user terminal includes: Based on the target estimated score, determine whether the target medical device meets the preset level classification conditions; If the target medical device meets the first-level classification criteria, it is determined that the target medical device has failed the inspection, and a corresponding first inspection report is generated and sent to the target medical institution using the target medical device so that the target medical institution can stop using the target medical device. If the target medical device meets the second-level classification criteria, a corresponding second inspection report is generated and sent to the target supervision and management department so that the target supervision and management department can inspect the target medical device. If the target medical device meets the criteria for the third-level classification, the target medical device is deemed to have passed the inspection, and a corresponding third-level inspection report is generated.
[0011] Secondly, this application provides a medical device testing apparatus, comprising: The image tilt correction module is used to acquire the initial certificate image corresponding to the target medical device, and use the Hough transform algorithm to perform tilt correction on the initial certificate image to obtain the rotated certificate image. The image restoration module is used to locate the target region in the rotated certificate image based on the HSV color space, and remove the target object in the target region using a preset image restoration algorithm to obtain the restored certificate image; wherein, the target object is an object that obscures the certificate information in the image; The image reconstruction module is used to detect the blurriness of the repaired certificate image using the Laplacian operator, and to perform super-resolution reconstruction of the repaired certificate image based on the blurriness to obtain the processed certificate image. The information extraction module is used to obtain the structural information of the processed certificate image by using a preset deep residual network in the target optical character recognition model, and to extract the certificate information in the processed certificate image based on the structural information by using a convolutional recurrent neural network in the target optical character recognition model. The information comparison module is used to compare the extracted certificate information with the preset certificate information in the preset database to obtain the corresponding comparison results. The scoring module is used to perform risk prediction on the target medical device based on the comparison results using a preset risk warning model to obtain the corresponding target prediction score. The test report generation module is used to determine the target risk level of the target medical device based on the target estimated score, generate a corresponding test report for the target medical device based on the target risk level, and send the test report to the user terminal so that the user terminal can handle the target medical device.
[0012] Thirdly, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor is used to execute the computer program to implement the medical device testing method as described above.
[0013] Fourthly, this application provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the medical device testing method as described above.
[0014] In summary, this application first obtains an initial certificate of conformity image corresponding to the target medical device, then uses the Hough transform algorithm to perform tilt correction on the initial certificate of conformity image to obtain a rotated certificate of conformity image; based on the HSV color space, it locates the target region in the rotated certificate of conformity image, and uses a preset image restoration algorithm to remove the target object in the target region to obtain a restored certificate of conformity image; wherein, the target object is the object that occludes the certificate of conformity information in the image; it detects the blurriness of the restored certificate of conformity image using the Laplacian operator, and performs super-resolution reconstruction on the restored certificate of conformity image based on the blurriness to obtain a processed certificate of conformity image; and uses a preset depth residual network in the target optical character recognition model to obtain the processed... The structural information of the certificate of conformity image is obtained, and the certificate information in the processed certificate of conformity image is extracted based on the structural information through the convolutional recurrent neural network in the target optical character recognition model. The extracted certificate information is compared with the preset certificate information in the preset database to obtain the corresponding comparison result. The target medical device is risk-estimated based on the comparison result by the preset risk warning model to obtain the corresponding target estimation score. The target risk level of the target medical device is determined according to the target estimation score. The corresponding inspection report of the target medical device is generated based on the target risk level and sent to the user terminal so that the user terminal can handle the target medical device. As described above, this application first obtains the initial certificate image of the target medical device, then sequentially performs tilt correction through Hough transform, locates the target object based on HSV color space and removes occlusion information to complete image restoration, then detects ambiguity using the Laplacian operator and performs super-resolution reconstruction, subsequently extracts certificate information using an optical character recognition model integrating deep residual networks and convolutional recurrent neural networks, compares the extracted information with information in a preset database, and derives a predicted score based on the comparison results through a risk warning model, determining the risk level of the medical device and generating an inspection report which is sent to the user for guidance. In this way, the automatic acceptance and risk warning system technology for medical device certificates based on OCR (Optical Character Recognition) and a five-level risk model innovatively combines an improved deep learning OCR model with a multi-dimensional risk assessment mechanism, achieving automated recognition, standardized verification, and precise risk control of medical device certificates. This not only solves the problems of low efficiency and error-proneness in traditional manual review, but also achieves comprehensive risk assessment of the entire life cycle of medical devices through a five-level risk model, providing key technical support for the digital transformation of medical supervision. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0016] Figure 1 This is a framework diagram of a medical device testing system disclosed in this application; Figure 2 This is a flowchart of a medical device testing method disclosed in this application; Figure 3 This is a schematic diagram illustrating the weight composition of a specific loss function disclosed in this application; Figure 4 This is a flowchart of a specific medical device testing method disclosed in this application; Figure 5 This is a schematic diagram of the structure of a medical device testing device disclosed in this application; Figure 6 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Currently, medical devices, as special products directly related to people's lives and health, require crucial quality control and risk management. The acceptance of medical device certificates of conformity mainly relies on manual methods, which suffers from inefficiency, error-proneness, and difficulty in standardizing the process. This is particularly problematic for large medical institutions that process a large number of medical device certificates daily; manual acceptance is not only time-consuming and labor-intensive but also prone to human error leading to substandard products entering clinical use and posing safety hazards. To address these technical problems, this application discloses a medical device testing method, apparatus, equipment, and storage medium that can ensure the safe use of medical devices.
[0019] like Figure 1As shown, the system of this invention consists of five core layers: an input layer, an OCR recognition layer, a multi-source data comparison layer, a risk warning model layer, and an output layer. Input Layer: Medical institutions upload images of medical device qualification certificates via a web interface. The input layer ensures standardized input data to avoid process interruptions caused by format errors. OCR Recognition Layer: Performs high-precision text extraction on the input image. Preprocessing includes grayscale conversion, binarization, and tilt correction to solve problems such as blurriness and tilt in the qualification certificate image. Text recognition uses an improved deep learning model to accurately extract key fields such as the unique identifier of the medical device, registration certificate number, production batch number, serial number, production date, inspection date, company name, and production address. This module ensures a significantly higher recognition accuracy than existing technologies, providing a reliable data foundation for subsequent comparisons. Multi-Source Data Comparison Layer: Connects in real-time to five major data sources for dynamic comparison: the unique identifier database for medical devices, the national medical device registration certificate database, the local benchmark database, regional difference data, and time-series data. Risk warning model layer: Risk scores are divided into three levels: high risk (>80 points), medium risk (50-80 points), and low risk (<50 points), enabling dynamic quantification and accurate assessment of risk. Output layer: A structured acceptance report is generated, including acceptance conclusions, risk basis, and handling recommendations. The report is returned to the medical institution's web interface and synchronized to the regulatory platform, forming a closed-loop management system.
[0020] See Figure 2 As shown in the figure, an embodiment of the present invention discloses a medical device testing method, comprising: Step S11: Obtain the initial certificate image corresponding to the target medical device, and use the Hough transform algorithm to perform tilt correction on the initial certificate image to obtain the rotated certificate image.
[0021] In this embodiment, when a medical device bearing a certificate of conformity passes through the production line, a photoelectric sensor triggers an industrial camera to take a picture. The image captured by the camera is raw data without any processing, which may include the certificate of conformity itself as well as the background, i.e., the initial image of the certificate of conformity.
[0022] Next, since medical device qualification certificates are often tilted due to shooting angle issues, affecting OCR recognition accuracy, it is necessary to determine the target tilt angle of the initial qualification certificate image to meet the preset optimal visual conditions based on a preset Hough transform tilt correction algorithm. The initial qualification certificate image is then rotated according to the target tilt angle to generate the corresponding rotated qualification certificate image. Specifically, the parameters of the traditional Hough transform tilt correction algorithm are optimized. First, appropriate pixel and angle precision need to be set to ensure the fineness of line detection. A smaller pixel resolution allows the algorithm to detect more subtle edge changes, while a finer angle precision helps to capture minute tilt angles, avoiding visible skew after correction. The voting threshold is a key parameter affecting detection sensitivity. If set too low, many short edge fragments will be misjudged as straight lines, introducing noise interference; if set too high, longer text line baselines may be missed. For medical documents, the voting threshold should be appropriately increased to retain significant straight lines formed by continuous text lines while suppressing false detections caused by single character edges or irrelevant patterns. The minimum line length parameter should be set based on the actual length of text lines in the medical document, ensuring coverage of most complete lines and avoiding using short lines or table lines as the primary reference. The maximum line segment gap should adapt to the natural spacing between characters in the document, allowing minor breaks caused by character spacing within the same text line to be connected into a complete straight line, thereby improving the continuity of detection. By comprehensively adjusting these parameters, the Hough transform algorithm can focus more on the main direction of the document, thus achieving stable and accurate skew correction in complex backgrounds, resulting in an improved Hough transform skew correction algorithm.
[0023] Next, an improved Hough transform tilt correction algorithm is adopted, whose mathematical principle is based on linear parameter space mapping: ; in, θ is the distance from point (x,y) to the line; θ is the angle between the line and the x-axis.
[0024] The Hough transform is passed through accumulator A[ [θ] represents the voting results of all edge points in the initial certificate image mapped to the parameter space; the peak value corresponds to the optimal line parameter. (Tilting angle) The estimate is: ; Where M is the number of line parameters for valid votes; Let be the inclination angle of the i-th line.
[0025] The affine transformation matrix for image rotation correction is: ; Where R(θ) is the rotation matrix; θ is the rotation angle, which is the negative value of the tilt angle, i.e., the target tilt angle. The initial certificate image is rotated by the target tilt angle to obtain the rotated certificate image.
[0026] Step S12: Locate the target region in the rotated certificate image based on the HSV color space, and remove the target object in the target region using a preset image restoration algorithm to obtain the restored certificate image; wherein, the target object is the object that obscures the certificate information in the image.
[0027] In this embodiment, medical device certificates often have key information covered by a red stamp. HSV (Hue Saturation Value) color space analysis combined with the Telea image inpainting algorithm is used to effectively remove stamp interference. It's important to understand that the red stamp area, based on the HSV color space, accurately locates the stamp area, unaffected by lighting changes. Closing operations connect dispersed red stamp dots, and opening operations remove small noises, ensuring the integrity of the stamp mask. The Telea algorithm, based on gradient propagation, repairs the obscured text area, preserving text edge information, resulting in the repaired certificate image.
[0028] Step S13: Detect the blurriness of the repaired certificate image using the Laplacian operator, and perform super-resolution reconstruction on the repaired certificate image based on the blurriness to obtain the processed certificate image.
[0029] In this embodiment, a fuzzy detection algorithm is used to reconstruct the image resolution, addressing the common blurring issue in medical device certificates. First, the parameters of the fuzzy detection algorithm are optimized, adjusting the intensity of non-local mean denoising. A moderate intensity can eliminate sensor noise, preventing it from being misjudged as image details and resulting in a low blur score. However, excessive denoising can smooth out character edges, causing even clear images to be judged as blurry. The size of the similar blocks needs to be set based on the stroke width and font size of typical characters on the certificate. Too small a size cannot effectively utilize neighborhood information, while too large a size introduces interference from different structures, compromising edge realism. The search window needs to be large enough to find reliable similar blocks for comparison in repetitive texture areas. The contrast limit parameter of CLAHE (Contrast Limited Adaptive Histogram Equalization) is crucial. Medical device certificates often use light backgrounds and dark text; excessive enhancement can amplify background noise or cause halo artifacts at character edges, interfering with the fuzzy detection algorithm's judgment of edge sharpness. The size of the blocks should match the area divisions in the layout. For example, the title area, parameter table area, and barcode area often have different texture characteristics. Reasonable block division can ensure that each local area can be adaptively enhanced, thus enabling the blur detection algorithm to maintain consistent sensitivity across the entire image. By repeatedly experimenting to find the balance point of these parameters, the algorithm can accurately distinguish between truly blurred images and clear images containing printing textures.
[0030] Then, the blurriness of the repaired certificate image is determined using the Laplacian operator; it is then determined whether the blurriness is less than a preset blur threshold; if so, a preset resolution adjustment operation is triggered on the repaired certificate image to generate the corresponding processed certificate image; otherwise, the repaired certificate image is directly identified as the processed certificate image. Specifically, the gradient magnitude variance of the Laplacian operator is used as a mathematical measure of blurriness: ; in, This is the response of the Laplacian operator at pixel i. is the weight of the Laplacian convolution kernel, I(i+k) is the gray value of pixel (i+k), and N is the total number of pixels in the image.
[0031] In the OCR task for medical device qualification certificates, a 3×3 Laplacian convolution kernel is used: ; It's important to know that the ambiguity threshold can be set to 100. When the ambiguity is below this threshold, the super-resolution processing flow is triggered. Specifically, small text regions, such as those encoded with UDI (Unique Device Identification), are magnified to 320×320 to improve recognition accuracy; large text regions maintain their original resolution to avoid excessive magnification and the introduction of noise; and bicubic interpolation is used in the super-resolution processing flow to maintain clear text edges.
[0032] Step S14: Using the preset deep residual network in the target optical character recognition model, obtain the structural information of the processed certificate image, and extract the certificate information in the processed certificate image based on the structural information through the convolutional recurrent neural network in the target optical character recognition model.
[0033] In this embodiment, before obtaining the structural information of the processed certificate image using the preset deep residual network in the target optical character recognition model, it is necessary to obtain an initial optical character recognition model; preset data augmentation samples are determined based on a preset data augmentation strategy; the preset data augmentation samples include preset deformed image samples, preset blurred image samples, preset noisy image samples, preset illumination change image samples, and preset text distortion image samples; the initial optical character recognition model is trained based on the preset data augmentation samples to obtain the target optical character recognition model. Specifically, to improve the robustness of the OCR model for low-quality medical device certificate images, a specific data augmentation strategy is designed: Image distortion: Randomly rotated ±15° to simulate images taken from different angles; ; Where R(θ) is the rotation matrix; θ is a random rotation angle, ranging from [-15°, +15°]; These are the coordinates of the image center point.
[0034] Blur Simulation: Add Gaussian blur (σ=1.0) and motion blur to simulate the blur effect in actual shooting; ; in, The Gaussian kernel is defined as follows: ; is the standard deviation of the Gaussian kernel, and the random sampling range is [0.5, 3.0].
[0035] Noise addition: Add salt and pepper noise with an intensity of ≤5% to simulate noise interference during image acquisition; ; Where p is the noise intensity, usually set to 0.05; rand() is a random number generated from a uniform distribution U(0,1).
[0036] Lighting variations: Randomly adjust brightness, contrast, and gamma. Simulates image acquisition under different lighting conditions; data enhancement for lighting variations is achieved by adjusting brightness and contrast. ; in, This is the brightness adjustment factor, ranging from [0.7, 1.3]. is the contrast adjustment factor, ranging from [0.7, 1.3]; Clip(·) is a function that limits pixel values to the range of [0, 255].
[0037] Text distortion: Using a random elastic deformation algorithm, the distortion of text during image acquisition is simulated.
[0038] In addition, to improve the OCR model's ability to recognize key fields on medical device qualification certificates, a hybrid loss function combining CTC (Connectionist Temporal Classification) loss and edge detection loss is introduced. The CTC loss function is used to address the input-output sequence length mismatch problem in OCR. Assume the time series features output by the OCR model are... Let V be the character set size plus 1, including whitespace characters. Then, the probability of predicting character k at time step t is: ; in, This is the probability after Softmax normalization.
[0039] For the true label sequence The CTC loss function is defined as: ; in, For all that can be obtained through CTC mapping rules The set of possible paths, Let T be a path, and T be the total number of time steps.
[0040] In addition, CTC mapping rule B(·) includes two operations: remove whitespace symbols: remove all symbols with a value of 0 in path π; merge consecutive repeating symbols: remove consecutive repeating non-whitespace symbols in path π.
[0041] Thus, after data augmentation and the introduction of a loss function, a target optical character recognition model is obtained. The CTC loss can handle variable-length sequences, requires no character alignment, and can suppress artifacts caused by over-sharpening, maintaining natural text edges. It is important to know that, as... Figure 3 As shown, the CTC loss weight is 0.8, the edge detection loss weight is 0.2, and the recognition accuracy and naturalness are balanced.
[0042] It can be understood that the target optical character recognition model's architecture is ResNet-50 + CRNN + CBAM attention mechanism. The ResNet-50 feature extraction layer, as the first part of the model, is mainly used to handle problems such as blurriness and tilt in medical device certificate images, extracting high-quality text features. ResNet-50 has 2048 channels of output feature maps, which can effectively capture complex texture and structural information in the image. ; in, Input feature map; The output feature map is F(·), and the residual function is F(·). These are learnable parameters.
[0043] It's important to know that the CRNN (Convolutional Recurrent Neural Network) sequence recognition layer, as the second part of the model, is used to identify key information such as the device name, batch number, and expiration date, achieving sequential recognition of text. The CRNN layer includes a two-layer bidirectional LSTM (Long Short-Term Memory) network and a CTC decoding layer, effectively handling variable-length text recognition tasks to extract certificate information from the processed certificate image.
[0044] The state update equation for an LSTM cell is: ; in, For input gates; Forgotten Gate; For output gate; In cellular state, h t It is in a hidden state; For the Sigmoid function; This is element-wise multiplication; and These are learnable parameters.
[0045] The output of a bidirectional LSTM is formed by concatenating the hidden states of two LSTM units: forward and backward. ; in, This represents the hidden state of the forward LSTM at time step t; This represents the hidden state of the backward LSTM at time step t.
[0046] The output of the sequence recognition layer of CRNN is: ; in, Spatial dimension of feature map Compression is to time step T; D is the feature dimension (twice the output dimension of bidirectional LSTM). This is the initial hidden state.
[0047] Next, a Convolutional Block Attention Module (CBAM, channel and spatial attention mechanism) is introduced between ResNet-50 and CRNN to enhance the feature weights of key fields and improve recognition accuracy. Simultaneously, the preprocessing algorithm is improved to enhance the model's adaptability to low-quality images. The CBAM module comprises two sub-modules: channel attention and spatial attention. It adopts a sequential structure of "channel first, then spatial." Channel attention extracts statistical information through global average pooling and max pooling, while spatial attention generates a mask through mean / maximum operations on the channel dimensions. Finally, features are normalized using Sigmoid and weighted.
[0048] The mathematical expression for channel attention is: ; in, and These are the feature vectors after global average pooling and max pooling, respectively; Channel attention weights; The expanded weights; This is element-wise multiplication.
[0049] The mathematical expression for spatial attention is: ; in, and These are the results of global average pooling and max pooling along the channel dimension, respectively. This indicates splicing along the channel dimension. This represents a convolution operation with a 3×3 kernel, 2 input channels, and 1 output channel. Spatial attention weights, This is the feature map after spatial attention conditioning.
[0050] It's important to know that the CBAM attention mechanism can be inserted after the residual blocks in stages 3 and 4 of ResNet50. These deep features have a stronger expressive power for the key fields of medical device qualification certificates. The compression ratio of the CBAM module can be set to reduction=4, which ensures that while adding the attention mechanism, the number of model parameters only increases by less than 0.5%, maintaining computational efficiency.
[0051] Furthermore, to address the difficulty in recognizing small text such as UDI codes on medical device qualification certificates, dilated convolutional layers can be inserted into ResNet-50 to expand the receptive field and capture small characters. The mathematical expression for dilated convolution is: ; in, Input feature map; d is the convolution kernel weight; d is the dilation rate; x is the output position; and k is the convolution kernel position.
[0052] In medical device OCR tasks, a 3×3 dilated convolution with a dilation rate of 2 is used, and its receptive field is: ; This approach expands the receptive field, improving the model's ability to capture small text regions without increasing the number of parameters. Maintaining the feature map spatial resolution while increasing the receptive field avoids the detail loss caused by traditional downsampling. Adding dilated convolutions in stage 4 of ResNet50 allows the model to better capture the detailed features of small characters.
[0053] Step S15: Compare the extracted certificate information with the preset certificate information in the preset database to obtain the corresponding comparison results.
[0054] In this embodiment, the extracted certificate information includes medical device identification, registration certificate number, production batch number, serial number, production date, inspection date, company name, and production address. The extracted certificate information is then compared with the database. First, the medical device identifier of the target medical device is compared with the medical device identifiers in the first database to obtain a first comparison result; the first database includes the medical device identifiers of various medical devices statistically analyzed locally; if the first comparison result indicates that the medical device identifier of the target medical device does not exist in the first database, then the second database is called according to the first API interface, and the medical device identifier of the target medical device is compared with the medical device identifiers in the second database to obtain a second comparison result; the second database includes the medical device identifiers of various medical devices statistically analyzed by the target regulatory authority; the second API interface of the third database is determined; the third database includes the registration certificate number of various medical devices; the third database is called according to the second API interface, and the registration certificate number of the target medical device is compared with the registration certificate number in the third database to obtain a corresponding third comparison result; the production information of the target medical device is compared with the production information in the fourth database to obtain a fourth comparison result; the production information includes the production batch number, serial number, production date, inspection date, company name, and production address. Specifically, regarding the comparison of medical device unique identifier databases, a RESTful API is used to connect with the database of the drug regulatory authority. First, an authorization application is required to obtain the appId and appSecret. Then, the UDI parameter is carried when calling the interface, and the fields in the response are parsed. The data comparison logic adopts a cache-first strategy, first querying the local cache. If the product does not exist, the database interface of the drug regulatory authority is called. If the return result is empty, a warning will be triggered stating that "the product does not exist in the database of the drug regulatory authority and the local product database." For exception handling, when the interface call fails, an error log is logged and the user is notified of the interface call failure; if the UDI format validation fails, an error log is also logged and a message indicating that the format is incorrect is given.
[0055] Next, in the comparison with the national medical device registration certificate database, a RESTful API is also used to connect to the national registration certificate information database. The authorization process obtains the appId and access_token, and the registration certificate number parameter must be included when making the call. Key fields such as validity status and expiration date are parsed from the response. The data comparison logic judges based on the returned results: if the registration certificate number does not exist, a corresponding warning is triggered; if the registration certificate number exists but the expiration date has exceeded the current time, an expiration warning is triggered; only when the registration certificate number exists and the expiration date has not expired is the verification considered successful. The exception handling mechanism is similar to that of the UDI module, logging and providing user prompts for interface call failures and incorrect registration certificate number formats.
[0056] Then, the local benchmark database comparison is built based on the information of medical devices that have passed daily acceptance. It mainly focuses on multi-dimensional logical verification of fields such as production batch number, serial number, production date, inspection date, company establishment date, and production address. For example, it checks whether there are different production dates under the same production batch number, whether there are different production batch numbers or registration certificate numbers under the same production date, verifies the logical consistency between the production batch number and production date, ensures the uniqueness of the serial number under the same batch number, verifies whether the certificate of conformity information under the same batch number is consistent with the product type, and checks whether the time sequence of the production batch number and inspection date is reasonable. In addition, it verifies whether the inspection date is earlier than the company's establishment date and compares whether the production address submitted by the same company is consistent with the address in the database of the drug regulatory authority. Through these multi-dimensional data comparisons, logical anomalies and inconsistencies in local data are effectively identified, providing reliable data support for the traceability management of medical devices.
[0057] Step S16: Based on the comparison results, perform risk prediction on the target medical device using a preset risk warning model to obtain the corresponding target prediction score.
[0058] In this embodiment, after obtaining the comparison results, a risk warning model is constructed based on five levels: usage stage, database of drug regulatory authorities, enterprise database, regional distribution, and time series, to achieve a comprehensive risk assessment of the entire life cycle of medical devices. First, a preset medical device identification verification model is used to perform risk prediction on the target medical device based on the first and second comparison results, generating a first predicted score. Then, a preset registration certificate validity verification model is used to perform risk prediction on the target medical device based on the third comparison result, generating a second predicted score. Next, a preset local benchmark database comparison model is used to perform risk prediction on the target medical device based on the fourth comparison result, generating a third predicted score. The pass rate of the target medical device in each region is obtained. A preset regional difference analysis model is used to determine the corresponding pass rate standard deviation based on the pass rate in each region, and a fourth predicted score is determined based on the pass rate standard deviation. Pass rate fluctuation data of the target medical device within a preset time window is obtained. A preset time series volatility identification model is used to determine the corresponding volatility based on the pass rate fluctuation data within the preset time window, and a fifth predicted score is determined based on the volatility. Finally, the first, second, third, fourth, and fifth predicted scores are weighted and summed to obtain the target predicted score of the target medical device. Specifically, unique device identification (UDI) verification is a fundamental step in ensuring device compliance. This is achieved by connecting to the drug regulatory authority's database via an API interface to verify the validity of the UDI. ; in, The feature value for UDI is verified, and the value range is [0,1].
[0059] The validity verification of the registration certificate ensures that the device has obtained legal approval before being marketed. Its mathematical expression is: ; in, This is an indicator function that returns either 0 or 1. This is the characteristic value of the registration certificate validity, and its value range is [0,1].
[0060] Local benchmark database comparison is used to verify the consistency of key information such as production batch number, serial number, and production date. Its mathematical expression is: ; Among them, C i The i-th comparison condition contains 9 verification rules: different production dates for the same batch number; different batch numbers for the same production date; different registration certificate numbers for the same production date; production batch number and production date do not match; products with the same batch number and serial number; inconsistent certificates of conformity for the same batch number and variety; production batch number later than production inspection date; inspection date earlier than the company's establishment date; different production addresses for the same company.
[0061] Regional difference analysis identifies cross-regional risk differences by calculating the standard deviation of the pass rate for the same medical device product in different regions. ; in, Let be the pass rate of the i-th region; The average pass rate across all regions; N is the total number of regions; The standard deviation of the regional pass rate.
[0062] Transform the standard deviation into a regional risk characteristic value: ; in, This represents the regional difference risk characteristic value, with a range of [0,1].
[0063] Time series volatility analysis captures quality fluctuation signals by calculating the trend of the pass rate over time. ; in, The pass rate sequence within the time window; The mean pass rate is the pass rate within the time window; the volatility is the percentage of the pass rate fluctuation.
[0064] Converting volatility into a time risk characteristic: ; in, This represents the time series risk feature value, with a value range of [0,1].
[0065] Finally, the comprehensive risk score, i.e., the target prediction score, is calculated using a weighted summation method. The formula is as follows: ; in, Let i be the feature value of the i-th risk dimension; is the weight of the i-th risk dimension; RiskScore is the overall risk score, with a value range of [0,100].
[0066] Step S17: Determine the target risk level of the target medical device based on the target estimated score, generate a corresponding inspection report for the target medical device based on the target risk level, and send the inspection report to the user terminal so that the user terminal can handle the target medical device.
[0067] In this embodiment, the target medical device is judged to meet the preset level classification conditions based on the target estimated score. If the target medical device meets the first level classification condition, it is determined that the target medical device has failed the inspection, and a corresponding first inspection report is generated and sent to the target medical institution using the target medical device so that the target medical institution can stop using the target medical device. If the target medical device meets the second level classification condition, a corresponding second inspection report is generated and sent to the target supervision and management department so that the target supervision and management department can inspect the target medical device. If the target medical device meets the third level classification condition, it is determined that the target medical device has passed the inspection, and a corresponding third inspection report is generated. Specifically, the risk score is divided into three levels: high risk (>80 points), medium risk (50-80 points), and low risk (<50 points). According to the risk level, a structured acceptance report is generated, including the acceptance conclusion, risk basis, and disposal suggestions. For high-risk medical devices (>80 points), they are automatically marked "Fail," and an early warning report is sent to the medical institution. The report includes information such as "The product does not exist in the drug regulatory authority's database or the local product database" and "Recommendation: Suspend the use of this batch of medical devices." For medium-risk medical devices (50-80 points), they are marked "Requires manual review," and an early warning report is sent to the regulatory platform to generate a task work order. For low-risk medical devices (<50 points), they are automatically marked "Pass," and the device acceptance is successful. After receiving the report, the medical institution can upload rectification proof, such as a new batch certificate of conformity, and a second review will be automatically triggered, completing the "problem-rectification-verification" closed loop.
[0068] As described above, this embodiment first acquires the initial certificate image of the target medical device, then sequentially performs tilt correction through Hough transform, locates the target object based on HSV color space, and removes occlusion information to complete image restoration. Next, it uses the Laplacian operator to detect ambiguity and performs super-resolution reconstruction. Subsequently, it extracts certificate information using an optical character recognition model integrating a deep residual network and a convolutional recurrent neural network. The extracted information is compared with information in a preset database. Based on the comparison results, a risk warning model is used to derive a predicted score, determine the risk level of the medical device, and generate an inspection report which is sent to the user for guidance. In this way, the automatic acceptance and risk warning system technology for medical device certificates based on OCR recognition and a five-level risk model innovatively combines an improved deep learning OCR model with a multi-dimensional risk assessment mechanism, achieving automated recognition, standardized verification, and precise risk control of medical device certificates. This not only solves the problems of low efficiency and error-proneness in traditional manual review but also achieves comprehensive risk assessment of the entire lifecycle of medical devices through a five-level risk model, providing key technical support for the digital transformation of medical supervision.
[0069] As can be seen from the previous embodiment, this application discloses a medical device testing method that can ensure the safety of medical device use. Next, taking the testing of a disposable sterile syringe as an example, regarding... Figure 4 The medical device testing methods shown are explained in detail.
[0070] First, an initial certificate of conformity image is acquired from the packaging of each syringe using a document scanner or other scanning equipment. Due to shooting angle or placement deviations, the image may be tilted. In this case, the Hough transform algorithm is used to detect straight lines in the image, calculate the tilt angle, and perform rotation correction to obtain a straight certificate of conformity image. Based on the HSV color space, areas in the image that may obscure text, such as pasted labels, stains, or reflective points, are located. After identifying these target objects, a pre-defined image inpainting algorithm is used to remove the obscuring text information, resulting in a repaired certificate of conformity image. The Laplacian operator is used to detect image blur. If insufficient sharpness is caused by inaccurate focus or motion blur, super-resolution reconstruction is triggered to improve image resolution and sharpen character edges, preparing for subsequent recognition.
[0071] Next, the processed image is input into the target optical character recognition model to extract the structural features of the image using a preset deep residual network. Then, the sequence text is recognized by a convolutional recurrent neural network, and finally the key information on the certificate of conformity, such as the production batch number, production date, expiration date, and medical device registration certificate number, is output.
[0072] The extracted key information is then compared with data in a pre-set database: on one hand, the local benchmark library is called to verify the logical consistency between the batch number and the production date; on the other hand, a RESTful API is used to connect to the medical device unique identifier database and registration certificate database of the drug regulatory authority to verify the validity and expiration date of the registration certificate number. If information mismatch, expired registration certificate, or product not found in the database is discovered, the corresponding anomaly is recorded. Based on the comparison results, a pre-set risk warning model performs a risk assessment for the batch of syringes, generating a target assessment score. For example, if the registration certificate is valid and the information is consistent, a lower score indicates low risk; if the registration certificate is expired or the batch number is contradictory, a higher score indicates high risk. The risk level is classified according to the score, such as low risk, medium risk, and high risk, and an inspection report is automatically generated, including acceptance conclusions, risk basis, and handling suggestions.
[0073] Finally, after the report is generated, it is pushed to the relevant hospitals via the medical institutions' web portal and simultaneously synchronized to the regulatory platform, automatically generating a regulatory task work order. Upon receiving the report, if rectification is required, the medical institutions can upload rectification documentation, which will automatically trigger a second review, completing the closed-loop management of "problem-rectification-verification". In addition, the backend provides a data visualization dashboard, displaying risk trend charts and pass rate maps for this batch of syringes in different regions, providing intuitive evidence for regulatory decisions.
[0074] See Figure 5 As shown, an embodiment of the present invention discloses a medical device testing device, comprising: The image tilt correction module 11 is used to acquire the initial certificate image corresponding to the target medical device and use the Hough transform algorithm to perform tilt correction on the initial certificate image to obtain the rotated certificate image. Image restoration module 12 is used to locate the target region in the rotated certificate image based on the HSV color space, and remove the target object in the target region using a preset image restoration algorithm to obtain the restored certificate image; wherein, the target object is an object that obscures the certificate information in the image; Image reconstruction module 13 is used to detect the blurriness of the repaired certificate image using the Laplacian operator, and to perform super-resolution reconstruction of the repaired certificate image based on the blurriness to obtain the processed certificate image. Information extraction module 14 is used to obtain the structural information of the processed certificate image by using a preset deep residual network in the target optical character recognition model, and extract the certificate information in the processed certificate image based on the structural information by using a convolutional recurrent neural network in the target optical character recognition model. The information comparison module 15 is used to compare the extracted certificate information with the preset certificate information in the preset database to obtain the corresponding comparison results. The scoring module 16 is used to perform risk prediction on the target medical device based on the comparison results using a preset risk warning model to obtain the corresponding target prediction score. The test report generation module 17 is used to determine the target risk level of the target medical device based on the target estimated score, generate a corresponding test report for the target medical device based on the target risk level, and send the test report to the user terminal so that the user terminal can handle the target medical device.
[0075] As described above, this application first obtains the initial certificate image of the target medical device, then sequentially performs tilt correction through Hough transform, locates the target object based on HSV color space and removes occlusion information to complete image restoration, then detects ambiguity using the Laplacian operator and performs super-resolution reconstruction, subsequently extracts certificate information using an optical character recognition model integrating deep residual networks and convolutional recurrent neural networks, compares the extracted information with information in a preset database, and derives a predicted score based on the comparison results through a risk warning model, determining the risk level of the medical device and generating an inspection report which is sent to the user for guidance. In this way, the automatic acceptance and risk warning system technology for medical device certificates based on OCR recognition and a five-level risk model innovatively combines an improved deep learning OCR model with a multi-dimensional risk assessment mechanism, achieving automated recognition, standardized verification, and precise risk control of medical device certificates. It not only solves the problems of low efficiency and error-proneness in traditional manual review, but also achieves comprehensive risk assessment of the entire life cycle of medical devices through a five-level risk model, providing key technical support for the digital transformation of medical supervision.
[0076] In some specific embodiments, the image tilt correction module 11 may specifically include: An angle determination unit is used to determine the target tilt angle of the initial certificate image that satisfies the preset optimal visibility conditions based on a preset Hough transform tilt correction algorithm. An image rotation unit is used to rotate the initial certificate image according to the target tilt angle to generate a corresponding rotated certificate image.
[0077] In some specific embodiments, the image reconstruction module 13 may specifically include: A blur determination unit is used to determine the blur of the repaired certificate image using a Laplacian operator; A fuzziness determination unit is used to determine whether the fuzziness is less than a preset fuzziness threshold. The first ambiguity determination unit is used to trigger a preset resolution adjustment operation on the repaired certificate image if the ambiguity is true, and generate the corresponding processed certificate image. The second ambiguity determination unit is used to directly determine the repaired certificate image as the processed certificate image if the ambiguity is not found.
[0078] In some specific embodiments, the medical device testing device may further include: The model acquisition module is used to acquire the initial optical character recognition model; The sample determination module is used to determine preset data augmentation samples based on preset data augmentation strategies; the preset data augmentation samples include preset deformed image samples, preset blurred image samples, preset noisy image samples, preset illumination change image samples, and preset text distortion image samples. The model training module is used to train the initial optical character recognition model based on the preset data augmentation samples to obtain the target optical character recognition model.
[0079] In some specific implementations, the certificate information includes medical device identification, registration certificate number, production batch number, serial number, production date, inspection date, company name, and production address; Accordingly, the information comparison module 15 may specifically include: The first result acquisition unit is used to compare the medical device identifier of the target medical device with the medical device identifier in the first database to obtain a first comparison result; the first database includes the medical device identifiers of various medical devices collected locally. The second result acquisition unit is configured to, if the first comparison result indicates that the medical device identifier of the target medical device does not exist in the first database, call the second database according to the first API interface, compare the medical device identifier of the target medical device with the medical device identifier in the second database, and obtain a second comparison result; the second database includes the medical device identifiers of various medical devices as compiled by the target supervision and management department. An interface determination unit is used to determine the second API interface of the third database; the third database includes the registration certificate numbers of various medical devices. The third result acquisition unit is used to call the third database according to the second API interface, compare the registration certificate number of the target medical device with the registration certificate number in the third database, and obtain the corresponding third comparison result; The fourth result acquisition unit is used to compare the production information of the target medical device with the production information in the fourth database to obtain a fourth comparison result; the production information includes production batch number, serial number, production date, inspection date, company name and production address.
[0080] In some specific implementations, the score acquisition module 16 may specifically include: The first score generation unit is used to generate a first estimated score for the target medical device by using a preset medical device identification verification model based on the first comparison result and the second comparison result to perform risk prediction on the target medical device. The second score generation unit is used to generate a second estimated score for the target medical device based on the third comparison result using a preset registration certificate validity verification model. The third score generation unit is used to generate a third predicted score for the target medical device based on the fourth comparison result by using a preset local benchmark database comparison model. A pass rate acquisition unit is used to acquire the pass rate of the target medical device in various regions. The fourth score generation unit is used to determine the corresponding pass rate standard deviation based on the pass rate of each region using a preset regional difference analysis model, and to determine the fourth estimated score based on the pass rate standard deviation. A fluctuation data acquisition unit is used to acquire the pass rate fluctuation data of the target medical device within a preset time window; The fifth score generation unit is used to determine the corresponding volatility based on the pass rate volatility data of the preset time window using a preset time series volatility identification model, and to determine the fifth estimated score based on the volatility. The scoring unit is used to perform a weighted summation of the first estimated score, the second estimated score, the third estimated score, the fourth estimated score, and the fifth estimated score to obtain the target estimated score of the target medical device.
[0081] In some specific implementations, the inspection report generation module 17 may specifically include: A grading unit is used to determine whether the target medical device meets the preset grading conditions based on the target estimated score. The first medical device determination unit is used to determine that the target medical device has failed the inspection if the target medical device meets the first level classification conditions, generate a corresponding first inspection report, and send the first inspection report to the target medical institution using the target medical device so that the target medical institution can stop using the target medical device. The second medical device determination unit is used to generate a corresponding second inspection report if the target medical device meets the second level classification conditions, and send the second inspection report to the target supervision and management department so that the target supervision and management department can inspect the target medical device. The third medical device determination unit is used to determine that the target medical device has passed the inspection if the target medical device meets the third-level classification conditions, and to generate a corresponding third inspection report.
[0082] Furthermore, embodiments of this application also disclose an electronic device, Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0083] Figure 6 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the medical device testing method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0084] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0085] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0086] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the medical device testing method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.
[0087] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed medical device testing method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0088] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0089] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0090] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0091] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0092] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for testing medical devices, characterized in that, include: Obtain the initial certificate image corresponding to the target medical device, and use the Hough transform algorithm to perform tilt correction on the initial certificate image to obtain the rotated certificate image. The target region in the rotated certificate image is located based on the HSV color space, and the target object in the target region is removed using a preset image restoration algorithm to obtain the restored certificate image; wherein, the target object is the object that obscures the certificate information in the image. The blurriness of the repaired certificate image is detected by the Laplacian operator, and super-resolution reconstruction is performed on the repaired certificate image based on the blurriness to obtain the processed certificate image. The structural information of the processed certificate image is obtained by using a preset deep residual network in the target optical character recognition model, and the certificate information in the processed certificate image is extracted based on the structural information by using a convolutional recurrent neural network in the target optical character recognition model. The extracted certificate information is compared with the preset certificate information in the preset database to obtain the corresponding comparison results; Based on the comparison results, the target medical device is risk-predicted using a preset risk warning model to obtain the corresponding target prediction score. The target risk level of the target medical device is determined based on the target predicted score. A corresponding test report for the target medical device is generated based on the target risk level, and the test report is sent to the user terminal so that the user terminal can handle the target medical device.
2. The medical device testing method according to claim 1, characterized in that, The process of using the Hough transform algorithm to correct the tilt of the initial certificate image to obtain the rotated certificate image includes: The target tilt angle of the initial certificate image that satisfies the preset optimal visual conditions is determined based on the preset Hough transform tilt correction algorithm. The initial certificate image is rotated according to the target tilt angle to generate a corresponding rotated certificate image.
3. The medical device testing method according to claim 1, characterized in that, The step of detecting the blurriness of the repaired certificate image using the Laplacian operator and performing super-resolution reconstruction on the repaired certificate image based on the blurriness to obtain the processed certificate image includes: The blurriness of the repaired certificate image is determined using the Laplacian operator; Determine whether the ambiguity is less than a preset ambiguity threshold; If so, a preset resolution adjustment operation is triggered on the repaired certificate image to generate the corresponding processed certificate image. If not, then the repaired certificate image will be directly identified as the processed certificate image.
4. The medical device testing method according to claim 1, characterized in that, Before obtaining the structural information of the processed certificate image using a preset deep residual network in the target optical character recognition model, the method further includes: Obtain the initial optical character recognition model; Preset data augmentation samples are determined based on a preset data augmentation strategy; the preset data augmentation samples include preset deformed image samples, preset blurred image samples, preset noisy image samples, preset illumination change image samples, and preset text distortion image samples; The initial optical character recognition model is trained based on the preset data augmentation samples to obtain the target optical character recognition model.
5. The medical device testing method according to any one of claims 1 to 4, characterized in that, The certificate information includes the medical device identification, registration certificate number, production batch number, serial number, production date, inspection date, company name, and production address. Accordingly, the step of comparing the extracted certificate information with the preset certificate information in the preset database to obtain the corresponding comparison results includes: The medical device identifier of the target medical device is compared with the medical device identifiers in the first database to obtain a first comparison result; the first database includes the medical device identifiers of various medical devices statistically analyzed locally. If the first comparison result indicates that the medical device identifier of the target medical device does not exist in the first database, then the second database is called according to the first API interface, and the medical device identifier of the target medical device is compared with the medical device identifier in the second database to obtain a second comparison result; the second database includes the medical device identifiers of each medical device counted by the target supervision and management department; Determine the second API interface of the third database; the third database includes the registration certificate numbers of various medical devices; The third database is called according to the second API interface, and the registration certificate number of the target medical device is compared with the registration certificate number in the third database to obtain the corresponding third comparison result; The production information of the target medical device is compared with the production information in the fourth database to obtain the fourth comparison result; the production information includes production batch number, serial number, production date, inspection date, company name and production address.
6. The medical device testing method according to claim 5, characterized in that, The step of obtaining a corresponding target prediction score by performing risk prediction on the target medical device based on the comparison results using a preset risk warning model includes: Using a pre-defined medical device identification verification model, a risk assessment is performed on the target medical device based on the first comparison result and the second comparison result to generate a first prediction score; Based on the third comparison result, a risk assessment is performed on the target medical device using a pre-defined registration certificate validity verification model to generate a second estimated score. Based on the fourth comparison result, a risk prediction is performed on the target medical device using a pre-set local benchmark database comparison model to generate a third prediction score; Obtain the pass rate of the target medical device in each region; Using a pre-defined regional difference analysis model, the standard deviation of the pass rate for each region is determined based on the pass rate, and a fourth estimated score is determined based on the standard deviation of the pass rate. Obtain the pass rate fluctuation data of the target medical device within a preset time window; The corresponding volatility is determined based on the pass rate volatility data of the preset time window using a preset time series volatility identification model, and the fifth estimated score is determined based on the volatility. The first estimated score, the second estimated score, the third estimated score, the fourth estimated score, and the fifth estimated score are weighted and summed to obtain the target estimated score of the target medical device.
7. The medical device testing method according to claim 6, characterized in that, The process of determining the target risk level of the target medical device based on the target predicted score, generating a corresponding test report for the target medical device based on the target risk level, and sending the test report to the user terminal includes: Based on the target estimated score, determine whether the target medical device meets the preset level classification conditions; If the target medical device meets the first-level classification criteria, it is determined that the target medical device has failed the inspection, and a corresponding first inspection report is generated and sent to the target medical institution using the target medical device so that the target medical institution can stop using the target medical device. If the target medical device meets the second-level classification criteria, a corresponding second inspection report is generated and sent to the target supervision and management department so that the target supervision and management department can inspect the target medical device. If the target medical device meets the criteria for the third-level classification, the target medical device is deemed to have passed the inspection, and a corresponding third-level inspection report is generated.
8. A medical device testing device, characterized in that, include: The image tilt correction module is used to acquire the initial certificate image corresponding to the target medical device, and use the Hough transform algorithm to perform tilt correction on the initial certificate image to obtain the rotated certificate image. The image restoration module is used to locate the target region in the rotated certificate image based on the HSV color space, and remove the target object in the target region using a preset image restoration algorithm to obtain the restored certificate image; wherein, the target object is an object that obscures the certificate information in the image; The image reconstruction module is used to detect the blurriness of the repaired certificate image using the Laplacian operator, and to perform super-resolution reconstruction of the repaired certificate image based on the blurriness to obtain the processed certificate image. The information extraction module is used to obtain the structural information of the processed certificate image by using a preset deep residual network in the target optical character recognition model, and to extract the certificate information in the processed certificate image based on the structural information by using a convolutional recurrent neural network in the target optical character recognition model. The information comparison module is used to compare the extracted certificate information with the preset certificate information in the preset database to obtain the corresponding comparison results. The scoring module is used to perform risk prediction on the target medical device based on the comparison results using a preset risk warning model to obtain the corresponding target prediction score. The test report generation module is used to determine the target risk level of the target medical device based on the target estimated score, generate a corresponding test report for the target medical device based on the target risk level, and send the test report to the user terminal so that the user terminal can handle the target medical device.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the medical device testing method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store a computer program; wherein, when the computer program is executed by a processor, it implements the medical device testing method as described in any one of claims 1 to 7.