Defect detection data acquisition and management method based on endoscope

Through the combined combination of light adaptive preprocessing and blockchain evidence storage combined with knowledge distillation optimization model, the problem of insufficient image quality and automation in endoscopic detection is solved, and efficient and safe defect detection data management and cross-system integration are achieved.

CN120298320AInactive Publication Date: 2025-07-11SHENZHEN SIMU AUTOMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510321746.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2025-07-11
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure CN120298320A_ABST
    Figure CN120298320A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of defect detection data management, in particular to a defect detection data acquisition and management method based on an endoscope. The method comprises the following steps: firstly, improving the quality of an industrial image through illumination adaptive preprocessing, carrying out feature extraction and classification by utilizing a defect detection model, and then determining a data storage and model updating strategy in combination with user feedback; when the data volume exceeds a first threshold value, incremental updating is carried out by adopting knowledge distillation, and a teacher model is used for guiding student model learning, so that new data are effectively fused while original knowledge is kept; in addition, the cloud server realizes safe and controllable data sharing and industrial system integration through a block chain smart contract, and the intelligence and traceability of industrial detection are improved. The invention provides an efficient, intelligent and safe defect detection data management method, image quality optimization, model adaptive updating and block chain intelligent storage and sharing are realized, and the accuracy and reliability of industrial detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of defect detection data management, and specifically to a method for obtaining and managing defect detection data based on an endoscope. Background Art

[0002] As a non-destructive testing technology, an endoscope can penetrate into the interior of equipment to obtain real-time image information, helping engineers to discover and analyze various potential defects, especially in narrow or complex spaces that cannot be reached by traditional testing means. By combining the high-definition images obtained by the endoscope with advanced image processing and defect detection models, the detection accuracy and efficiency can be significantly improved. This provides great convenience for the maintenance, fault prevention, and life cycle management of industrial equipment, enabling the early identification of latent defects, reducing downtime and production losses caused by equipment failures, and thus improving production efficiency and safety.

[0003] However, there are still many limitations in the application of endoscopes in industrial defect detection at the present stage. Firstly, the image quality collected by the endoscope is limited by the environmental lighting conditions, often having strong highlight areas and shadow areas, resulting in unclear image information and affecting subsequent defect identification and analysis. Secondly, traditional defect detection mostly relies on manual operation, which is prone to human judgment deviation, lacks sufficient automation and intelligence, and reduces the accuracy and consistency of detection. In addition, it is difficult for the defect detection models deployed locally to achieve integrated data processing and model updates, and it is also difficult to form data sharing between different devices and systems. Therefore, there is an urgent need for a new method to improve the detection accuracy, data management ability, and resource sharing ability of endoscopes in defect detection.

[0004] Therefore, a method for obtaining and managing defect detection data based on an endoscope is proposed. Summary of the Invention

[0005] The present invention provides a method for obtaining and managing defect detection data based on an endoscope. The system acquires real-time industrial images, performs light-adaptive preprocessing, and uses a defect detection model to extract features and classify them, and the results are projected onto the endoscope display screen; according to user feedback, it is confirmed that the data is encrypted and stored and blockchain-certified, and if it is negative or timed out, a backup model is triggered for rechecking to ensure detection accuracy; abnormal data enters the database to be trained, and knowledge distillation is used to optimize the model; the cloud server opens APIs and combines blockchain smart contracts to achieve secure integration and access control of external systems, improving the intelligence and traceability of industrial detection.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A method for obtaining and managing defect detection data based on an endoscope, comprising:

[0008] S100: Remotely obtain the industrial image inside the device captured in real time by the endoscope;

[0009] S200: Perform light adaptation preprocessing on the industrial image, extract and classify defect features from the preprocessed industrial image through a defect detection model, generate defect detection data and superimpose and project it onto the endoscope display screen;

[0010] S300: Receive the feedback signal from the endoscope operation end and perform corresponding data management according to the feedback signal, including:

[0011] S310: When the feedback signal is a confirmation signal, encrypt and upload the industrial image and the defect detection data to the cloud server and perform blockchain evidence storage;

[0012] S320: When receiving a negative signal feedback from the endoscope operation end or not receiving a feedback signal within a preset time threshold, trigger a secondary detection process, including:

[0013] S321: Invoke a backup detection model to perform secondary defect analysis on the industrial image;

[0014] S322: Compare the consistency of the two detection data. If the data is consistent, give up uploading the industrial image and the defect detection data to the cloud server; if the data is inconsistent, upload the industrial image to the database to be trained and correct the defect detection model.

[0015] Further, the light adaptation preprocessing includes:

[0016] Perform global brightness enhancement on the industrial image through histogram equalization, and segment the highlight area and the shadow area;

[0017] Adopt the multi-scale Retinex algorithm for the highlight area and adaptive gamma correction for the shadow area;

[0018] Perform edge sharpening processing on the whole image through a local contrast enhancement algorithm and output the preprocessed image.

[0019] Further, the calculation formula of the adaptive gamma correction is:

[0020] I out = pow(I in , 1 + α(1 - μL max ));

[0021] Among them, I out represents the corrected shadow area, I in represents the shadow area, pow represents the exponential function, μ represents the average pixel value of the shadow area, L maxRepresents the maximum pixel value of the shaded area.

[0022] Furthermore, the encryption process and blockchain evidence storage include:

[0023] Encrypt the industrial images and defect detection data, upload the encrypted data packet to the cloud server, and obtain the URL returned by the cloud server;

[0024] Obtain the timestamp and hash value of the industrial images and defect detection data;

[0025] Record the URL, timestamp, and hash value and store them in the blockchain.

[0026] Furthermore, the correction of the defect detection model includes:

[0027] Statistically analyze the data volume of the industrial images in the database to be trained. If the data volume is greater than the first threshold, perform incremental update on the defect detection model through knowledge distillation.

[0028] Furthermore, the calculation formula of the first threshold is:

[0029]

[0030] where T s represents the first threshold, T b represents the data volume of the defect detection model database, N neg represents the number of negative signals, S max represents the maximum capacity of the database to be trained, S free represents the remaining capacity of the database to be trained, β represents the negative signal weight, and ∈ represents the bias constant.

[0031] Furthermore, the incremental update includes:

[0032] Annotate the industrial images in the database to be trained. After annotation, move the images and annotation files into the defect detection model database;

[0033] Use the deployed defect detection model as the teacher model and the defect detection model to be trained as the student model, and use the teacher model to supervise the training of the student model.

[0034] Furthermore, the method further includes:

[0035] S400: The cloud server opens the API to the permission setting system, and uses blockchain smart contracts for access control to achieve cloud integration with external systems.

[0036] Furthermore, using blockchain smart contracts for access control includes:

[0037] The API server receives connection requests sent by external systems and connects to the blockchain via Web3;

[0038] Call the smart contract to query the access rights of the external system. If the query is successful, allow the external system to access the API server; otherwise, deny access to the API server.

[0039] The beneficial effects of the present invention are:

[0040] 1. Through light-adaptive preprocessing, the quality of industrial images is effectively improved, providing clearer and more stable input for subsequent defect detection. Histogram equalization can enhance the global brightness, balance the overall contrast of the image, and at the same time segment the highlight and shadow areas, optimizing the details of different lighting areas specifically. The multi-scale Retinex algorithm suppresses glare in the highlight area, improves the detail restoration degree, and the adaptive gamma correction enhances the contrast in the shadow area, making the details in the dark part more obvious. In addition, the local contrast enhancement algorithm further sharpens the image edges, improving the recognizability of defect features. Compared with traditional preprocessing methods, this scheme adaptively optimizes different lighting areas, ensuring the accuracy and robustness of defect detection under complex lighting conditions, and enhancing the stability and reliability of the industrial detection system.

[0041] 2. Using the first threshold as the trigger condition for incremental update can dynamically regulate the update frequency of the defect detection model, ensuring that model training is carried out when the data volume accumulates to a sufficient scale, and avoiding waste of computing resources caused by frequent updates. At the same time, the first threshold is adaptively adjusted based on the data volume in the defect detection model database, the number of negative signals, and the storage status of the database to be trained, which can balance the timeliness of model update and the computing overhead, ensuring the representativeness and effectiveness of the training data.

[0042] 3. By annotating the data to be trained and using knowledge distillation technology to guide the training of the student model with the teacher model, efficient model optimization is achieved. This method gradually integrates new data while retaining the original knowledge, avoiding overfitting or forgetting problems caused by full-scale retraining. At the same time, it reduces the consumption of computing resources, improves the model update efficiency, enables the defect detection model to continuously improve the detection accuracy and adaptability while maintaining stability, and enhances the intelligence and scalability of the industrial detection system. Description of the Drawings

[0043] The drawings are used to provide further understanding of the present invention, and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention, and do not constitute a limitation to the present invention. In the drawings:

[0044] Figure 1 is a flowchart of a method for obtaining and managing defect detection data based on an endoscope provided by the present invention;

[0045] Figure 2 is the flowchart for the feedback signal to perform data management provided by the present invention;

[0046] Figure 3 is the flowchart for the secondary detection process provided by the present invention. Detailed implementation manners

[0047] 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 only for the purpose of illustrating and explaining the present invention, and are not intended to limit the present invention.

[0048] A method for obtaining and managing defect detection data based on an endoscope, as Figure 1 shown, includes:

[0049] S100: Remotely obtain the industrial images inside the device collected in real time by the endoscope;

[0050] Specifically, the endoscope camera collects real-time industrial images, encapsulates the data into frames, and transmits the data through a Wi-Fi or 5G module to the cloud server.

[0051] S200: Perform light adaptation preprocessing on the industrial images, extract and classify defect features from the preprocessed industrial images through a defect detection model, generate defect detection data, and superimpose and project it onto the endoscope display screen;

[0052] Specifically, perform light adaptation preprocessing on the industrial images, and extract and classify defect features from the preprocessed industrial images through a defect detection model. The defect detection model can be a common network model (such as YOLOv8 / Faster R-CNN / Swin Transformer, etc.). In this embodiment, Faster R-CNN is preferably used; generate defect detection data and superimpose and project it onto the endoscope display screen. The defect detection data includes defect type, defect area, and defect confidence. Collect the endoscope screen through the OpenCV library, draw the defect area at the detected defect position, and display the defect type and defect confidence.

[0053] Further, the light adaptation preprocessing includes:

[0054] Perform global brightness enhancement on the industrial images through histogram equalization, and segment the highlight area and the shadow area;

[0055] Apply the multi-scale Retinex algorithm to the highlight area and the adaptive gamma correction to the shadow area;

[0056] Perform edge sharpening processing on the whole image through a local contrast enhancement algorithm, and output the preprocessed image.

[0057] Specifically, an industrial image is read, converted into a grayscale image, and the grayscale histogram is calculated. The cumulative distribution function is obtained, and the pixel values are normalized and mapped through the cumulative distribution function to generate an enhanced image. Then, the threshold segmentation method is used to segment the enhanced image into a highlight area and a shadow area. For the highlight area, first calculate the logarithmic transformation of the highlight area to enhance the low-brightness details, and then use the Retinex algorithm with different scales for processing. Calculate the output of the Retinex with different scales through weighted averaging. For the shadow area, calculate the average pixel value and the maximum pixel value of the shadow area, then calculate the adaptive gamma value, and correct the shadow area through the adaptive gamma value to output the image after shadow enhancement. Use the Laplacian operator for edge detection to enhance the edge region contrast, and then use non-local means filtering for noise reduction to avoid oversharpening. Finally, output the industrial image with balanced illumination.

[0058] Global brightness enhancement of the industrial image is achieved through histogram equalization to make the overall brightness of the image balanced. Further, the image is segmented into a highlight area and a shadow area, and targeted enhancement strategies are adopted for different areas: the multi-scale Retinex algorithm is used in the highlight area to suppress glare and restore details, and adaptive gamma correction is used in the shadow area to enhance the contrast, thereby optimizing the illumination uniformity. Finally, the local contrast enhancement algorithm is used for edge sharpening to improve the clarity of image details and the visibility of defects, ensuring the accuracy and robustness of subsequent detection.

[0059] Further, the calculation formula of the adaptive gamma correction is:

[0060] I out = pow(I in , 1 + α(1 - μL max ));

[0061] Where, I out represents the corrected shadow area, I in represents the shadow area, pow represents the exponential function, μ represents the average pixel value of the shadow area, and L max represents the maximum pixel value of the shadow area.

[0062] The adaptive gamma correction uses a dynamically adjusted gamma value, which is adaptively adjusted according to the average brightness and the maximum brightness of the shadow area. Compared with the ordinary gamma correction that uses a fixed gamma value, this method can adaptively enhance the contrast of the dark area for images with different brightness distributions, avoid the problems of over-enhancement or under-enhancement, thereby retaining more detailed information, improving the visual quality, making the defect area clearer, and being beneficial to subsequent automatic detection and analysis.

[0063] S300: Receive the feedback signal from the operation end of the endoscope and perform corresponding data management according to the feedback signal, such as Figure 2As shown, it includes:

[0064] S310: When the feedback signal is a confirmation signal, encrypt and upload the industrial image and the defect detection data to the cloud server, and perform blockchain evidence storage;

[0065] Furthermore, the encryption process and blockchain evidence storage include:

[0066] Encrypt the industrial image and the defect detection data, upload the encrypted data packet to the cloud server, and obtain the URL returned by the cloud server;

[0067] Obtain the timestamp and hash value of the industrial image and the defect detection data;

[0068] Record the URL, timestamp, and hash value and store them in the blockchain.

[0069] Specifically, use AES encryption for the industrial image, use RSA encryption for the defect detection data, combine the encrypted industrial image, defect detection data, and encryption key into an encrypted data packet and upload it to the cloud server. After receiving the encrypted data packet, the cloud server returns the unique URL after storage for subsequent evidence storage; Obtain the current timestamp and SHA-256 hash value to ensure the uniqueness and anti-tampering of the data; Write the stored URL, timestamp, and hash value into the blockchain to ensure the data cannot be tampered with.

[0070] By encrypting the industrial image and the defect detection data, ensure the security of data transmission and storage, upload the encrypted data packet to the cloud server, and obtain the corresponding access URL. Subsequently, calculate the timestamp and hash value of the data, and store these key information in the blockchain. Utilize the immutability and traceability of the blockchain to ensure the integrity and credibility of the data. This solution not only enhances data security but also provides a reliable anti-tampering traceability mechanism for subsequent auditing, verification, and data sharing, improving the transparency and credibility of defect detection data management.

[0071] S320: When receiving a negative signal feedback from the endoscopic operation end or not receiving a feedback signal within the preset time threshold, trigger a secondary detection process, as Figure 3 shown, it includes:

[0072] S321: Invoke the standby detection model to perform secondary defect analysis on the industrial image;

[0073] Specifically, the standby detection model is a commonly used network model (such as YOLOv8 / Faster R-CNN / SwinTransformer, etc.), and it is different from the defect detection model. In this embodiment, YOLOv8 is preferably used.

[0074] S322: Compare the consistency of the two sets of detection data. If the data is consistent, then do not upload the industrial image and the defect detection data to the cloud server; if the data is inconsistent, then upload the industrial image to the database to be trained and correct the defect detection model.

[0075] Specifically, if the types of detected defects of the defect detection model and the backup detection model are the same, the coincidence degree of the defect regions is greater than 75%, and the absolute difference of the defect confidence levels is less than 0.1, then the data is considered consistent; otherwise, it is considered inconsistent.

[0076] Further, correcting the defect detection model includes:

[0077] Count the data volume of the industrial images in the database to be trained. If the data volume is greater than the first threshold, then perform incremental update on the defect detection model through knowledge distillation.

[0078] By dynamically monitoring the number of industrial images in the database to be trained, after the data volume exceeds the set first threshold, knowledge distillation is used for incremental update, so as to efficiently absorb the features of new data without affecting the performance of the original model. Compared with traditional full-scale retraining, this solution can reduce the computational cost and training time, while avoiding catastrophic forgetting of the model, ensuring continuous optimization of the defect detection model to adapt to new defect types, improving the accuracy and generalization ability of detection, and being applicable to the changing industrial production environment.

[0079] Further, the calculation formula for the first threshold is:

[0080]

[0081] where T s represents the first threshold, T b represents the data volume of the defect detection model database, N neg represents the number of negative signals, S max represents the maximum capacity of the database to be trained, S free represents the remaining capacity of the database to be trained, β represents the weight of the negative signal, and ∈ represents the bias constant.

[0082] By comprehensively considering the existing data in the defect detection model database, the number of negative signals, and the storage status of the database to be trained, the first threshold is calculated adaptively to trigger incremental update. The setting of the first threshold avoids frequent updates when the data is too small and the lag problem when the data accumulates too much by dynamically adjusting the model update frequency, thereby improving the model training efficiency, optimizing the resource utilization rate, and ensuring continuous optimization and accuracy of the defect detection model.

[0083] Further, the incremental update includes:

[0084] Label the industrial images in the database of training data. After labeling, move the images and annotation files to the defect detection model database.

[0085] Use the deployed defect detection model as the teacher model and the defect detection model to be trained as the student model, and use the teacher model to supervise the training of the student model.

[0086] Specifically, the teacher model (stored on the server) only provides prediction results and will not be updated. The student model is only trained with new data and learns the knowledge of the old model at the same time. The teacher model supervises the training of the student model through the distillation loss function, and the calculation formula of the distillation loss function is:

[0087]

[0088] where L represents the distillation loss function, ρ represents the weight balancing the real label loss and the distillation loss, L CE represents the cross-entropy loss, which is used to train the student model according to the real label, y represents the real label, represents the prediction result, T represents the temperature parameter, KL represents the KL divergence, and the student is trained with the prediction distribution of the teacher model. σ(z t T) represents the prediction distribution of the teacher model, and σ(z s T) represents the prediction distribution of the student model.

[0089] By manually labeling the industrial images in the database to be trained, ensure the high-quality labels of the new added data, and integrate them into the defect detection model database after labeling to improve the recognition ability of the model. Adopt the knowledge distillation strategy, use the deployed mature model as the teacher model to guide the model to be trained to learn, so as to improve its defect detection ability while keeping the model lightweight. The introduction of the knowledge distillation strategy significantly reduces the computing cost, speeds up the model update speed, and avoids catastrophic forgetting, ensuring that the defect detection model is continuously optimized and adapted to new defect types in practical applications, and improving the generalization performance.

[0090] Furthermore, the method further includes:

[0091] S400: The cloud server opens the API to the license system and uses blockchain smart contracts for access control to achieve cloud integration with external systems.

[0092] By the cloud server opening the API, seamless integration with external industrial systems (such as MES, ERP, PLM, etc.) is realized, promoting data sharing and collaborative applications. Using blockchain smart contracts for access control ensures the security, transparency, and immutability of data access rights, and avoids unauthorized access or data leakage.

[0093] Further, the use of blockchain smart contracts for access control includes:

[0094] The API server receives a connection request sent by an external system and connects to the blockchain through Web3.

[0095] Call the smart contract to query the access permission of the external system. If the query is successful, allow the external system to access the API server; otherwise, deny access to the API server.

[0096] Specifically, the API server runs in the cloud and provides HTTP / RESTful API interfaces. The external system makes access requests through APIKey / identity authentication. The API server uses Web3 to connect to the blockchain to query the access permission of the external system. The authorized external system addresses are stored in the smart contract. In this embodiment, the permission query is performed by means of the API server address and the API Key hash value. If the query is successful, allow the external system to access the API server; otherwise, deny access to the API server.

[0097] Embodiment 2

[0098] A certain company needs to regularly use an industrial endoscope to detect internal defects in the vehicle engine during engine maintenance. The traditional method generally involves an engineer obtaining real-time images of the internal defects of the engine, and then preprocessing the images and performing expert analysis or local detection model processing to obtain the analysis results. To achieve intelligent and integrated defect detection data acquisition and management, a method for obtaining and managing defect detection data based on an endoscope proposed by the present invention is adopted, including:

[0099] S100: Remotely obtain the industrial images inside the device collected in real time by the endoscope;

[0100] S200: Perform light adaptation preprocessing on the industrial images, extract and classify defect features from the preprocessed industrial images through a defect detection model, generate defect detection data, and superimpose and project it onto the endoscope display screen;

[0101] S300: Receive the feedback signal from the endoscope operation end and perform corresponding data management according to the feedback signal, including:

[0102] S310: When the feedback signal is a confirmation signal, encrypt and upload the industrial image and the defect detection data to the cloud server and perform blockchain evidence storage;

[0103] S320: When a negative signal is received from the endoscope operation end or no feedback signal is received within the preset time threshold, trigger a secondary detection process, including:

[0104] S321: Invoke the backup detection model to perform secondary defect analysis on the industrial image;

[0105] S322: Compare the consistency of the two sets of detection data. If the data is consistent, refrain from uploading the industrial image and the defect detection data to the cloud server. If the data is inconsistent, upload the industrial image to the database awaiting training and correct the defect detection model.

[0106] S400: The cloud server opens APIs to the permission setting system and uses blockchain smart contracts for access control to achieve cloud integration with external systems.

[0107] The defect detection performances under different methods are compared as shown in Table 1. It can be seen from the table that by comparing the performances of the three defect detection methods, the results show that this method is superior to the other two methods in terms of both efficiency and accuracy. Compared with manual visual inspection, this method reduces the time consumed for a single detection from 60 minutes to 15 minutes, significantly improving the detection efficiency. At the same time, the defect detection rate of this method is 94%, higher than 91% of manual visual inspection and 81% of local model detection, demonstrating its higher accuracy in defect identification. In addition, through cloud data sharing, this method can achieve seamless connection and data synchronization between different devices and systems, further enhancing the intelligent level and real-time response ability of defect detection. This not only strengthens cross-device collaboration but also ensures the traceability and security of detection data, further optimizing the management and maintenance efficiency of industrial equipment.

[0108] Table 1 Comparison Table of Defect Detection Performances under Different Methods

[0109]

[0110] Finally, it should be noted that the above are only the preferred embodiments of the present invention and are not used to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. An endoscope-based defect detection data acquisition and management method, characterized in that, Including: S100: Remotely obtain the industrial image inside the device collected by the endoscope in real time; S200: Perform light adaptation preprocessing on the industrial image, extract and classify defect features from the preprocessed industrial image through a defect detection model, generate defect detection data and superimpose and project it onto the endoscope display screen; S300: Receive the feedback signal from the endoscope operation end and perform corresponding data management according to the feedback signal, including: S310: When the feedback signal is a confirmation signal, encrypt and upload the industrial image and the defect detection data to the cloud server and perform blockchain evidence storage; S320: When receiving a negative signal feedback from the endoscope operation end or not receiving a feedback signal within a preset time threshold, trigger a secondary detection process, including: S321: Call a backup detection model to perform secondary defect analysis on the industrial image; S322: Compare the consistency of the two sets of detection data. If the data is consistent, give up uploading the industrial image and the defect detection data to the cloud server; if the data is inconsistent, upload the industrial image to the database to be trained and correct the defect detection model.

2. The method for acquiring and managing defect detection data based on an endoscope according to claim 1, wherein The light adaptation preprocessing includes: Perform global brightness enhancement on the industrial image through histogram equalization, and segment the highlight area and the shadow area; Apply the multi-scale Retinex algorithm to the highlight area and apply adaptive gamma correction to the shadow area; Perform edge sharpening processing on the whole image through a local contrast enhancement algorithm and output the preprocessed image.

3. A method for obtaining and managing defect detection data based on an endoscope according to claim 2, characterized in that, The calculation formula of the adaptive gamma correction is: I out = pow(I in , 1 + α(1 - μ / L max )); Among them, I out represents the corrected shadow area, I in represents the shadow area, pow represents the exponential function, μ represents the average pixel value of the shadow area, L max represents the maximum pixel value of the shadow area.

4. The method for acquiring and managing defect detection data based on an endoscope according to claim 1, wherein Encryption processing and blockchain evidence storage include: Encrypt the industrial image and the defect detection data, upload the encrypted data packet to the cloud server and obtain the URL returned by the cloud server; Obtain the timestamp and hash value of the industrial image and the defect detection data; Record the URL, timestamp and hash value and store them in the blockchain.

5. The method for obtaining and managing defect detection data based on an endoscope according to claim 1, wherein Correcting the defect detection model includes: Count the data volume of the industrial images in the database to be trained. If the data volume is greater than the first threshold, perform incremental update on the defect detection model through knowledge distillation.

6. The method for acquiring and managing defect detection data based on an endoscope according to claim 5, wherein The calculation formula of the first threshold is: Among them, T s represents the first threshold, T b represents the data volume of the defect detection model database, N neg represents the number of negative signals, S max represents the maximum capacity of the database to be trained, S free represents the remaining capacity of the database to be trained, β represents the negative signal weight, and ∈ represents the bias constant.

7. A method for obtaining and managing defect detection data based on an endoscope according to claim 5, characterized in that The incremental update includes: Annotate the industrial images in the database to be trained. After annotation, move the images and annotation files into the defect detection model database; Use the deployed defect detection model as the teacher model and the defect detection model to be trained as the student model, and use the teacher model to supervise the training of the student model.

8. A method for obtaining and managing defect detection data based on an endoscope according to claim 1, characterized in that, The method further includes: S400: The cloud server opens an API to the permission setting system and uses a blockchain smart contract for access control to achieve cloud integration with external systems.

9. A method for obtaining and managing defect detection data based on an endoscope according to claim 8, characterized in that Using a blockchain smart contract for access control includes: The API server receives a connection request sent by an external system and connects to the blockchain through Web3; Call the smart contract to query the access permission of the external system. If the query is successful, allow the external system to access the API server; otherwise, reject the access to the API server.