Cryptosporidium identifier embedding method and device from slice scanning to slice generation of instrument and readable storage medium of cryptosporidium identifier embedding method and device
By using the AES encryption algorithm to generate and embed cryptospore identifiers in medical imaging processing, combined with data integrity verification and secure transmission methods, the problems of poor data security, low management and retrieval efficiency and low cryptospore detection efficiency are solved, and efficient data management and security guarantees are achieved.
Patent Information
- Application Number
- CN202510194749.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2045-02-21
AI Technical Summary
The prior art has problems in medical image processing such as poor data security, low management and retrieval efficiency, error-prone and low efficiency in manual detection of cryptospores, insufficient compatibility of identification embedding, and imperfect encryption technology.
During the process of instrument scanning to slice generation, the AES encryption algorithm is used to generate cryptospore identifiers and embed slice file metadata. Combined with cryptospore judgment methods based on contour feature parameters and a variety of data integrity verification and secure transmission methods, data management, detection efficiency and security are improved.
Through the combination of AES encryption and digital signature technology, a powerful anti-tampering system has been built, ensuring the integrity and authenticity of data, improving data management and retrieval efficiency, reducing manual intervention in cryptospore detection, enhancing data security, and supporting scientific research and clinical collaboration.
Smart Images

Figure CN119676376A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image processing, and in particular to a method and device for embedding cryptospore markers in the process of scanning a film with an instrument and generating a slice, and a readable storage medium thereof. Background Art
[0002] There is a risk of data being tampered with, lost or leaked due to factors such as cyber attacks and storage media failures. For example, in a telemedicine consultation scenario, if the image data is maliciously tampered with during transmission, it may cause the doctor to make an incorrect diagnosis, seriously affecting the patient's treatment. On the other hand, the management and retrieval of large-scale medical imaging data are inefficient. Due to the lack of an effective identification and indexing mechanism, when it is necessary to query images of specific cases, it often takes a lot of time and manpower, which makes it difficult to meet the needs of rapid clinical diagnosis and scientific research big data analysis.
[0003] In terms of cryptospore detection, traditional manual detection methods have many disadvantages. Manual detection relies on professionals to observe samples under a microscope, which is not only inefficient and prone to fatigue, but also the test results are easily affected by subjective factors, and the accuracy is difficult to guarantee. For example, different testers may have different judgment criteria for the morphology of cryptospores, resulting in deviations in the test results. At the same time, with the increase in cryptospore infection cases, the burden of manual detection has become increasingly heavy, and it cannot meet the clinical needs for rapid and accurate detection.
[0004] In order to solve the problems of data security and cryptospore detection, some technologies have introduced identification embedding and encryption methods, but the existing technologies still have obvious shortcomings. In terms of identification embedding, the embedding scheme lacks broad compatibility with different slice formats, which may result in the inability to embed or read identification information normally in some format files. For example, some identification embedding methods designed for specific formats will fail to embed or affect the normal function of files in other formats. In the application of encryption technology, the selection and use of encryption algorithms are not perfect, and it is difficult to fully guarantee the security of data in all links. For example, some encryption algorithms cannot effectively prevent data from being cracked and tampered with when faced with complex attack methods. Summary of the invention
[0005] The embodiments of the present invention provide a method and device for embedding cryptospore markers in the process of scanning a slide and generating a slice, and a readable storage medium thereof, in order to solve the shortcomings of the current technology in medical image processing, such as poor data security, low management and retrieval efficiency, easy errors and low efficiency in manual cryptospore detection, insufficient compatibility of marker embedding, and imperfect encryption technology.
[0006] The core technology of the present invention is to use the AES encryption algorithm to generate cryptospore identification and embed it into the slice file metadata during the process from instrument scanning to slice generation, and combine the cryptospore identification method based on contour feature parameters and a variety of data integrity verification and secure transmission methods to improve data management, detection efficiency and security.
[0007] In a first aspect, the present invention provides a method for embedding a cryptospore marker in the process of scanning a slide with an instrument and generating a slide, the method comprising the following steps: S1. Scan the sample using a medical imaging scanner to generate raw image data; S2, dividing the preprocessed raw image data into multiple slices, each slice representing a specific level of the sample, and compressing the slice data as needed; S3. Determine whether cryptospores are present. If so, use an encryption algorithm to generate a cryptospore identifier and embed the identifier into the metadata of the slice data.
[0008] Furthermore, in step S2, the step of embedding the cryptospore identifier into the metadata of the slice data includes: Obtain accurate Cryptosporus identification information and determine the extended field structure of metadata; According to the determined extended field structure, the sorted cryptospore identification information is sequentially embedded; After embedding, the metadata is verified for integrity.
[0009] Furthermore, in step S3, the encryption algorithm is the AES encryption algorithm, and the specific steps include: Use the SHA-256 algorithm to calculate the hash value of the slice data; Prepare AES encryption, select CBC mode and PKCS7 padding, generate AES encryption key and initialization vector; The hash value is encrypted using AES, and the encrypted result is used as the cryptospore identifier.
[0010] Furthermore, step S3 also includes compatibility design for different slice formats: For the image slice format, the extensibility of image metadata is utilized to embed the cryptosporidial identifier in a specific area of the metadata; For the document slice format, use the corresponding library to add a custom attribute in the metadata of the document to embed the cryptosporidial identifier; For certain slice formats other than images and documents, the cryptosporidial identifier is embedded in the metadata header information; For different slice formats, select the corresponding software for testing, check whether the metadata is displayed normally, whether the identification information is complete, and whether the normal function of the file is affected, and adjust the embedding plan according to the test results.
[0011] Furthermore, step S3 includes the following steps: Extract the target contour from the slice data and calculate its area, perimeter and circularity; Filter the contours that meet the following criteria: a. The area is between 100 and 500 pixels; b. Circularity greater than 0.7; Perform ellipse fitting on the filtered contour and calculate the aspect ratio; If the aspect ratio is between 0.8 and 1.2, the contour is determined to be a cryptospore.
[0012] Furthermore, in step S3, the arcLength function is used to calculate the contour perimeter, the contour area is calculated using the contourArea function, and the circularity is calculated using the formula 4πA / P 2 , where A is the contour area and P is the contour perimeter.
[0013] Furthermore, it also includes step S4, respectively using a message authentication code combined with AES and / or a hash value and AES encryption method to verify data integrity, using AES encryption in the SSL / TLS protocol for data transmission, and using AES-based key exchange and binding to prevent man-in-the-middle attacks.
[0014] In a second aspect, the present invention provides a cryptospore marker embedding device in the process of scanning a slide and generating a slice, comprising: The scanning module uses the medical imaging scanner to scan the sample and generate raw image data; The segmentation module divides the preprocessed raw image data into multiple slices, each slice represents a specific level of the sample, and compresses the slice data as needed; The processing module determines whether cryptospores are present. If so, an encryption algorithm is used to generate a cryptospore identifier, and the identifier is embedded into the metadata of the slice data.
[0015] In a third aspect, the present invention provides an electronic device including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the cryptosporidial marker embedding method in the above-mentioned instrument scanning to slice generation.
[0016] In a fourth aspect, the present invention provides a readable storage medium having a computer program stored therein, the computer program including a program code for controlling a process to execute the process, the process including a cryptospore marker embedding method in the process of scanning a slide to generating a slice according to the above-mentioned instrument.
[0017] The main contributions and innovations of the present invention are as follows: 1. Data integrity and authenticity assurance Anti-tampering mechanism: A powerful anti-tampering system is built through the combination of AES encryption and digital signature technology. During the transmission and storage of data, any illegal tampering of slice data will cause the hash value to not match, thus triggering an alarm. This ensures that the integrity of the data is effectively maintained throughout the entire process from generation to use, preventing the risk of malicious tampering of the data and providing a solid guarantee for the reliability of medical imaging data.
[0018] Authenticity verification: Users can easily recalculate the hash value and quickly compare it with the embedded cryptospore identifier to verify the originality and authenticity of the data. This feature is particularly important in the fields of medical diagnosis and scientific research, which can effectively avoid misdiagnosis or scientific research conclusion deviation caused by data contamination, and improve the accuracy of medical and scientific research work.
[0019] 2. Efficient data traceability and management Unique identification tracking: Each slice is embedded with a unique cryptosporidial identifier, which greatly improves the retrieval efficiency of large-scale medical imaging data. Through the identifier, users can quickly and accurately locate specific slice data without the need for tedious searches in massive data, saving time and energy and improving work efficiency.
[0020] Full process audit: This invention records the generation, embedding and verification process of cryptospore identification, forming a complete audit trail chain. This makes the data operation history traceable, facilitates the rapid location of potential problems when problems arise, provides strong support for data security management and quality control, and helps to improve the standardization level of the entire medical imaging data management.
[0021] 3. Automation and efficiency improvement Automated verification process: The generation, embedding and verification of the logo are all automatically completed through algorithms, which greatly reduces human intervention. In the traditional data processing process, manual operation is not only time-consuming and labor-intensive, but also prone to human errors. The automated process of the present invention not only improves the diagnostic efficiency, but also reduces the error rate. In addition, the process can be further combined with the AI training model for more in-depth data analysis, providing strong support for the intelligent diagnosis and analysis of medical images, and promoting the development of medical technology.
[0022] 4. Security enhancement and privacy compliance End-to-end encryption: During the transmission and storage of data, the present invention uses the AES encryption algorithm to achieve end-to-end encryption protection. This measure effectively prevents unauthorized access or data leakage and ensures the privacy and security of patients. In today's digital medical environment, patient privacy protection is of vital importance. This feature of the present invention complies with the requirements of relevant laws and regulations and also meets the expectations of medical institutions and patients for data security.
[0023] 5. Support scientific research and clinical collaboration Trusted data sharing: Cryptosporine identification provides "identity proof" for data, making it possible to share data across institutions without worrying about the risk of data tampering. In multi-center research collaboration, data sharing between different institutions is a common requirement, but the authenticity and integrity of the data are often difficult to collaborate. This feature of the invention promotes trusted data sharing, provides strong support for cross-institutional scientific research collaboration, helps integrate resources from all parties, and promotes the development of medical research.
[0024] Standardized data management: The unified identification embedding and verification process provides a standardized framework for the long-term archiving and reuse of medical imaging data. This not only reduces the cost of data management, but also improves the efficiency of data utilization. In clinical practice, standardized data management helps medical institutions better manage and utilize patients' imaging data, providing stronger support for clinical diagnosis and treatment; in the field of scientific research, standardized data is also conducive to data comparison and integration between different studies, promoting the transformation and application of scientific research results.
[0025] The details of one or more embodiments of the invention are set forth in the following drawings and description so that other features, objects, and advantages of the invention are more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings: Figure 1 is a flow chart of a cryptospore marker embedding method in the process of instrument scanning to slice generation according to an embodiment of the present invention; Figure 2 4 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0028] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0029] Embodiment 1 The present invention aims to propose a cryptospore identification embedding method in the process of scanning a slide to generating a slice, specifically, referring to Figure 1 , the method comprising: S1. Scanning with instruments: Use medical imaging scanners to scan samples. For example, in clinical testing, stool samples from patients suspected of being infected with Cryptosporidium are scanned using high-resolution microscope imaging scanners to obtain microscopic images of the samples and generate raw image data. This raw image data contains information about various microscopic objects in the sample and is the basis for subsequent processing.
[0030] S2. Generate slice format Slice generation: Segment the preprocessed image data into multiple slices. Taking the whole slice image (WSI) processing in digital pathology as an example, professional image processing software is used to segment the high-resolution WSI into multiple small slices according to certain rules, and each slice represents a specific level of the sample. The format of these slices adopts common medical image formats, such as TIFF format, to facilitate subsequent storage and processing.
[0031] Data compression: compress slice data according to actual needs. For example, in telemedicine scenarios, in order to reduce data transmission bandwidth, a lossless compression algorithm (such as the JPEG-LS algorithm) is used to compress slice data in TIFF format, effectively reducing the amount of data and improving transmission efficiency while ensuring image quality.
[0032] The slice format can be a common medical image format, such as TIFF, JPEG, PDF, DOCX, SDPC, SVS, etc. During the segmentation process, the appropriate slice thickness and resolution are determined according to the actual needs and sample characteristics to ensure that the slice data can accurately reflect the structural information of the sample. The slice data is compressed as needed to reduce storage space and transmission bandwidth. Select a suitable compression algorithm to maximize compression efficiency while ensuring data quality. For example, for slices in TIFF format, compression algorithms such as LZW and JPEG can also be used; for slices in PDF format, its built-in compression function can be used to compress image and text data.
[0033] S3. Determine whether there are cryptospores. If so, insert the cryptospore identifier. If not, the slice generation is completed.
[0034] (1) Cryptospore identification generation: Cryptospore identification is generated using an encryption algorithm (AES). First, the hash value of the slice data is calculated. Taking a specific slice data as an example, the SHA-256 algorithm is used to calculate it to obtain a unique hash value. Then select the AES encryption mode as CBC mode and the padding method as PKCS7 padding to generate a 128-bit AES encryption key and a 16-byte initialization vector (IV). The calculated hash value is used as plaintext and encrypted using the AES key and IV generated above. Finally, the encrypted binary data is converted into a hexadecimal string to obtain the cryptospore identification.
[0035] (2) Logo insertion Data preparation stage: Extract relevant data of cryptosporidiosis from the laboratory test report, such as the type of cryptosporidiosis, test time, sample source, etc. Assuming that the test report records the type of cryptosporidiosis as "Cryptosporidium parvum", the test time as "2024-10-01", and the sample source as "fecal sample of patient Zhang San", format these data to meet the embedding requirements. At the same time, analyze the metadata structure of the slice file (such as TIFF format) and determine to embed the cryptosporidiosis identification information as an extended field in its custom label area.
[0036] Embedding operation stage: According to the determined extended field structure, the sorted cryptosporidium identification information is embedded in sequence. First, the key information "Cryptosporidium parvum" is embedded, followed by the detection time and sample source information.
[0037] Verification and preservation stage: After embedding, the metadata is verified for integrity. By checking the embedded information length, data format, etc., ensure that the cryptospore identification information is complete and there are no omissions or errors. After verification, save the slice file with the cryptospore identification.
[0038] (3) Compatibility design of different slice formats 1) Embedding solution design Image slice format (such as TIFF, JPEG, etc.): Take the TIFF format as an example, and use its custom tag area to store cryptospore identification information. According to the specifications of the TIFF format, write the relevant data of the cryptospore identification under a specific tag number.
[0039] Document slice formats (such as PDF, DOCX, etc.): For PDF documents, use the PyPDF2 library to add custom attributes to the document's metadata to embed the cryptospore identifier. For example, use the relevant functions of the PyPDF2 library to add a new key-value pair to the " / Metadata" dictionary of the PDF document, with the key being "cryptospore identifier" and the value being the corresponding cryptospore identifier information.
[0040] Specific slice formats (such as SDPC, SVS, etc.): For SDPC files, the cryptospore identifier is embedded in the metadata header information. According to the format definition of the SDPC file, the cryptospore identifier data is written at a specific position in its header.
[0041] 2) Compatibility testing and verification Test tool selection: For different slice formats, select the corresponding mainstream software for testing. For image slices (such as TIFF format), use AdobePhotoshop, IrfanView and other software; for PDF document slices, use AdobeAcrobat software; for SDPC files, use Digital Pathology Slide Viewing Software software.
[0042] Test content: Open the slice file with the Cryptosporidae logo embedded in it, check whether the metadata is displayed normally, whether the logo information is complete, and whether the normal function of the file is affected. For example, open the TIFF image with the Cryptosporidae logo embedded in AdobePhotoshop, check whether the Cryptosporidae logo information is correctly displayed in the metadata, and check whether the display quality of the image has changed; open the PDF document with the logo embedded in AdobeAcrobat, check whether the editing function of the document is normal, and whether the logo information in the metadata is displayed completely.
[0043] Verification result processing: record the problems encountered during the test. For example, if a certain image software cannot recognize the custom metadata tag, it is necessary to modify the tag format or use a more general metadata storage method. After multiple tests and adjustments, ensure that the Cryptosporium logo embedding solution has good compatibility in various mainstream slice formats and related software.
[0044] In this embodiment, in step S3, the specific steps of the cryptospore determination method are as follows: Contour detection: Use the relevant functions in the image processing library (OpenCV, a cross-platform computer vision and machine learning software library released under the Apache2.0 license (open source)) to extract the contours of the target object from the image. For example, for a slice image containing Cryptospores, use OpenCV's cv2.findContours function to extract all contours in the image by setting appropriate thresholds and contour search modes.
[0045] Calculate the perimeter and area of the contour: Use the cv2.arcLength function to calculate the perimeter of the contour, which accumulates the distances between adjacent points on the contour; use the cv2.contourArea function to calculate the area of the contour, which calculates the area enclosed by the contour based on Green's formula.
[0046] Screening contours: Screen contours that meet the requirements based on the conditions that the circularity is greater than 0.7 and the area is greater than 100 and less than 500. The circularity calculation formula is: 4πA / P 2 , where A is the contour area and P is the contour perimeter. By calculating the circularity and area of each contour, the contours that meet the conditions are screened out.
[0047] Fit an ellipse and calculate the aspect ratio of the ellipse: Fit the filtered contour to an ellipse, use the cv2.fitEllipse function to get the fitting result of the ellipse, and then calculate the aspect ratio of the ellipse, that is, the ratio of the minor axis length to the major axis length.
[0048] Determine whether it is a cryptospore: Compare the calculated characteristic parameters with the pre-set thresholds. For example, for the area, determine whether it is within the range of 100-500; for the circularity, determine whether it is greater than 0.7; for the aspect ratio, determine whether it is between 0.8-1.2. Only when all characteristic parameters meet the corresponding threshold conditions, the contour is considered to be similar to the cryptospore in shape characteristics. Through multi-dimensional quantitative evaluation, the contours of objects similar to cryptospores are screened out from the shape characteristics, providing a basis for auxiliary judgment of cryptospores.
[0049] Preferably, the applicability and limitations of the threshold values of each characteristic parameter in different situations are as follows: (1) Different hosts 1) Applicability: In most common hosts, such as humans, cattle, sheep and other mammals, the previously set area range (greater than 100 and less than 500), circularity threshold (greater than 0.7) and aspect ratio range (0.8-1.2) have certain applicability. This is because the basic morphological characteristics of cryptosporidia are relatively stable during the evolution process. No matter which common host they parasitize in, they need to maintain similar cell structures and functions to complete their life history, so the morphological parameters will be in a relatively concentrated range. For example, in the long-term detection of human fecal samples and cattle fecal samples, most of the morphological parameters of cryptosporidia fall within the above threshold range, so that the judgment method based on these thresholds can effectively identify cryptosporidia.
[0050] 2) Limitations: These thresholds may need to be adjusted when it comes to some special hosts. The physiological environment, immune response and other factors of different hosts will affect the growth and morphology of cryptospores. For example, the body temperature and digestive system pH of some bird hosts are quite different from those of mammals, and cryptospores may undergo morphological adaptive changes in bird hosts. Studies have found that the area of cryptospores in some bird hosts may be slightly smaller than that in mammals, and the roundness may also be slightly reduced.
[0051] 3) Adjustment method: For special hosts, a large number of samples need to be collected again to measure morphological parameters and conduct statistical analysis. A stratified sampling method can be used to obtain samples from different types of special hosts to ensure the representativeness of the samples. Perform statistical analysis on the collected data, such as calculating new means, standard deviations, etc., and determine the threshold range applicable to special hosts based on the analysis results. For example, if the new statistical results show that the mean area of cryptosporangium in a certain type of bird host is 80 and the standard deviation is 20, then consider adjusting the lower limit of the area threshold to 60 (mean - standard deviation) and the upper limit to 100 (mean + standard deviation). At the same time, combined with the changes in circularity and aspect ratio, these two thresholds are also adjusted accordingly.
[0052] (2) Different stages of infection 1) Applicability: In the early stages of cryptosporidiosis infection, the above thresholds can usually effectively identify cryptosporidiosis. Because in the early stages of infection, cryptosporidiosis is mainly in the stage of invading host cells and beginning to reproduce, its morphology has not changed significantly and still maintains relatively typical morphological characteristics, so the existing thresholds can be used for judgment. For example, in samples collected within 1-2 days after infection, the morphology of cryptosporidiosis basically meets the set threshold range.
[0053] 2) Limitations: As the infection enters the middle and late stages, cryptospores multiply in large numbers in the host, and some individuals with abnormal morphology may appear. At the same time, the host's immune response will also affect the morphology of cryptospores. For example, under the attack of immune cells, the cell wall of cryptospores may be damaged, resulting in morphological changes. At this time, the original threshold may not be able to accurately identify all cryptospores. For example, in the late stage of infection, some cryptospores may increase in area and decrease in roundness, exceeding the original threshold range.
[0054] 3) Adjustment method: For different infection stages, a dynamic threshold adjustment mechanism needs to be established. Collect samples at different infection stages regularly and analyze the changes in cryptospore morphological parameters over time. Methods such as time series analysis can be used to predict the changing trends of cryptospore morphological parameters at different infection stages, so as to adjust the thresholds in advance. For example, through analysis, it is found that the area of cryptospores will increase by an average of 20% 5 days after infection. In the detection of samples 5 days after infection and later, the upper limit of the area threshold can be increased by 20% accordingly. At the same time, the two thresholds can be adjusted in a coordinated manner according to the changes in circularity and aspect ratio.
[0055] (3) Different testing conditions 1) Applicability: Under standard testing conditions, such as appropriate temperature, pH value, and correct calibration of the testing instrument, the set threshold can accurately identify cryptospores. Because these standard conditions can ensure that the morphology of cryptospores remains in a natural state, and the accuracy of the testing instrument can also ensure the reliability of the measurement data. For example, when using a calibrated high-resolution microscope, the threshold can work effectively when the temperature is 25°C and the pH value is 7.2.
[0056] 2) Limitations: When the detection conditions change, the accuracy of the threshold may be affected. Differences in the accuracy of the detection instruments will lead to errors in the measurement data, and changes in ambient temperature and pH value may change the morphology of cryptospores. For example, when using a low-precision microscope, there may be large errors in the measured area and aspect ratio of cryptospores; in high temperature or extreme pH environments, cryptospores may shrink or swell, causing the morphological parameters to deviate from the normal range.
[0057] 3) Adjustment method: For different detection conditions, it is necessary to establish an association model between detection conditions and thresholds. Analyze the data collected under different detection conditions to find out the relationship between changes in detection conditions and changes in cryptospore morphological parameters. For example, it was found through experiments that when the detection temperature increases by 10°C, the area of cryptospores will shrink by 5%. Therefore, under high-temperature detection conditions, the area threshold can be adjusted accordingly according to the extent of the temperature increase. At the same time, for detection instruments with different precision, establish the relationship between the instrument calibration coefficient and the threshold adjustment, and correct the threshold according to the calibration of the instrument.
[0058] S4. Data integrity verification process Message Authentication Code (MAC) combined with AES: The sender uses the AES key and the data to be verified to generate a message authentication code (MAC) through the HMAC-AES algorithm. After receiving the data and MAC, the receiver uses the same AES key and algorithm to calculate the MAC and compare it with the received MAC. If the two are the same, the data has not been tampered with; otherwise, the data may have been forged. For example, in the image data transmission system within the hospital, the server, as the sender, uses the AES key and the slice data to be transmitted to calculate the MAC, and sends the data and MAC to the terminal device (such as the doctor's workstation). After receiving the data, the terminal device performs MAC verification to ensure the integrity of the data.
[0059] Hash value and AES encryption: The sender first calculates the hash value of the data (such as using the SHA-256 algorithm), and then encrypts the hash value using the AES encryption key. After receiving the encrypted hash value, the receiver uses the AES key to decrypt it, and then recalculates the hash value of the data and compares it. If they are consistent, it means that the data has not been forged; otherwise, there is a problem with the data. In the medical imaging data storage scenario, when the storage device stores slice data, it first calculates the hash value of the data and encrypts it for storage. When reading the data, the hash value is decrypted and recalculated and compared to verify the authenticity of the data.
[0060] Preventing man-in-the-middle attacks - AES encryption in SSL / TLS protocol: The server sends a digital certificate to the client, and the client verifies the validity of the certificate, including whether the certificate is issued by a trusted certificate authority (CA) and whether the certificate has expired. The client and server negotiate a shared AES key through the handshake protocol, and all subsequent data transmissions are encrypted using this AES key. For example, in remote medical data transmission, when the doctor's client device establishes a connection with the hospital's server, key negotiation and data encryption transmission are performed through the SSL / TLS protocol to prevent middlemen from tampering with the data.
[0061] Key exchange and binding based on AES: During the initial communication, the client and server exchange AES keys in a secure manner (such as out-of-band transmission, i.e., through other independent secure channels). For example, the AES key is delivered to the other party via offline email, and the AES key is bound to the other party's identity information (such as the server's domain name, the client's specific identifier, etc.). During communication, the corresponding AES key is queried based on the server's domain name and compared with the received key. In actual applications, when different departments of a hospital share imaging data, this method can be used to prevent man-in-the-middle attacks and ensure data security.
[0062] Embodiment 2 Based on the same concept, the present invention also proposes a cryptospore marker embedding device in the process of scanning a slide and generating a slice, comprising: The scanning module uses the medical imaging scanner to scan the sample and generate raw image data; The segmentation module divides the preprocessed raw image data into multiple slices, each slice represents a specific level of the sample, and compresses the slice data as needed; The processing module determines whether cryptospores are present. If so, an encryption algorithm is used to generate a cryptospore identifier, and the identifier is embedded into the metadata of the slice data.
[0063] Embodiment 3 This embodiment also provides an electronic device, referring to Figure 2 , comprises a memory 404 and a processor 402, wherein the memory 404 stores a computer program, and the processor 402 is configured to run the computer program to execute the steps in any of the above method embodiments.
[0064] Specifically, the processor 402 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiment of the present invention.
[0065] Among them, the memory 404 may include a large capacity memory 404 for data or instructions. For example, but not limitation, the memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In appropriate cases, the memory 404 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 404 may be inside or outside the data processing device. In a specific embodiment, the memory 404 is a non-volatile memory. In a specific embodiment, the memory 404 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (Erasable Programmable Read-Only Memory, EPROM for short), an electrically erasable PROM (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), an electrically alterable ROM (Electrically Alterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. In appropriate circumstances, the RAM may be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM may be a fast page mode dynamic random access memory 404 (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0066] The memory 404 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 402 .
[0067] The processor 402 reads and executes the computer program instructions stored in the memory 404 to implement any one of the cryptosporidial marker embedding methods in the process of scanning a slide and generating a slice in the above-mentioned embodiments.
[0068] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408 , wherein the transmission device 406 is connected to the processor 402 , and the input / output device 408 is connected to the processor 402 .
[0069] The transmission device 406 can be used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired or wireless network provided by a communication provider of the electronic device. In one example, the transmission device includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 406 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0070] Input / output devices 408 are used to input or output information.
[0071] Embodiment 4 This embodiment also provides a readable storage medium, in which a computer program is stored. The computer program includes a program code for controlling a process to execute the process. The process includes the cryptospore marker embedding method in the instrument scanning to slice generation according to the first embodiment.
[0072] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0073] In general, various embodiments may be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. Some aspects of the invention may be implemented in hardware, while other aspects may be implemented in firmware or software executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flow charts, or using some other graphical representation, it should be understood that, as non-limiting examples, the boxes, devices, systems, techniques, or methods described herein may be implemented in hardware, software, firmware, dedicated circuits or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0074] Embodiments of the present invention may be implemented by computer software that is executable by a data processor of a mobile device, such as in a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets and / or macros may be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. A computer program product may include one or more computer executable components configured to perform an embodiment when the program is run. One or more computer executable components may be at least one software code or a portion thereof. In addition, at this point, it should be noted that, for example, Figure 1 Any block of the logic flow in the program may represent program steps, or interconnected logic circuits, blocks and functions, or a combination of program steps and logic circuits, blocks and functions. The software may be stored on physical media such as memory chips or storage blocks implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as, for example, DVDs and their data variants, CDs, etc. Physical media are non-transitory media.
[0075] Those skilled in the art should understand that the technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0076] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for those of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the attached claims.
Claims
1. A method for embedding cryptospore markers in the process of scanning a slide with an instrument and generating a slice, characterized in that: The following steps are involved: S1. Scan the sample using a medical imaging scanner to generate raw image data; S2, dividing the preprocessed raw image data into multiple slices, each slice representing a specific level of the sample, and compressing the slice data as needed; S3. Determine whether cryptospores are present. If so, use an encryption algorithm to generate a cryptospore identifier and embed the identifier into the metadata of the slice data.
2. The method for embedding cryptospore markers in the process of scanning a slide with an instrument to generate a slide as claimed in claim 1, characterized in that: In step S2, the steps of embedding the cryptospore identifier into the metadata of the slice data include: Obtain accurate Cryptosporus identification information and determine the extended field structure of metadata; According to the determined extended field structure, the sorted cryptospore identification information is sequentially embedded; After embedding, the metadata is verified for integrity.
3. The method for embedding cryptospore markers in the process of scanning a slide with an instrument to generate a slide as claimed in claim 1, characterized in that: In step S3, the encryption algorithm is the AES encryption algorithm, and the specific steps include: Use the SHA-256 algorithm to calculate the hash value of the slice data; Prepare AES encryption, select CBC mode and PKCS7 padding, generate AES encryption key and initialization vector; The hash value is encrypted using AES, and the encrypted result is used as the cryptospore identifier.
4. The method for embedding cryptospore markers in the process of scanning a slide with an instrument to generate a slide as claimed in claim 1, characterized in that: The S3 step also includes compatibility designs for different slice formats: For the image slice format, the extensibility of image metadata is utilized to embed the cryptosporidial identifier in a specific area of the metadata; For the document slice format, use the corresponding library to add a custom attribute in the metadata of the document to embed the cryptosporidial identifier; For certain slice formats other than images and documents, the cryptosporidial identifier is embedded in the metadata header information; For different slice formats, select the corresponding software for testing, check whether the metadata is displayed normally, whether the identification information is complete, and whether the normal function of the file is affected, and adjust the embedding plan according to the test results.
5. The method for embedding cryptospore markers in the process of scanning a slide with an instrument to generate a slide as claimed in claim 1, characterized in that: The S3 step includes the following steps: Extract the target contour from the slice data and calculate its area, perimeter and circularity; Filter the contours that meet the following criteria: a. The area is between 100 and 500 pixels; b. Circularity greater than 0.7; Perform ellipse fitting on the filtered contour and calculate the aspect ratio; If the aspect ratio is between 0.8 and 1.2, the contour is determined to be a cryptospore.
6. The method for embedding cryptospore markers in the process of scanning a slide with an instrument to generate a slide as claimed in claim 5, characterized in that: In step S3, the arcLength function is used to calculate the contour circumference, the contour area is calculated using the contourArea function, and the circularity is calculated using the formula 4πA / P 2 , where A is the contour area and P is the contour perimeter.
7. A method for embedding cryptospore markers in the process of scanning a slide with an instrument to generate a slide as described in any one of claims 1 to 6, characterized in that: The method also includes step S4, wherein the data integrity is verified by using a message authentication code combined with AES and / or a hash value and AES encryption, the data is transmitted by using AES encryption in the SSL / TLS protocol, and the key exchange and binding based on AES is used to prevent man-in-the-middle attacks.
8. A cryptospore marker embedding device in the process of scanning a slide and generating a slice, characterized in that: include: The scanning module uses the medical imaging scanner to scan the sample and generate raw image data; The segmentation module divides the preprocessed raw image data into multiple slices, each slice represents a specific level of the sample, and compresses the slice data as needed; The processing module determines whether cryptospores are present. If so, an encryption algorithm is used to generate a cryptospore identifier, and the identifier is embedded into the metadata of the slice data.
9. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to run the computer program to execute the cryptospore marker embedding method in the process of instrument scanning to slice generation according to any one of claims 1 to 7.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, which includes a program code for controlling a process to execute a process, wherein the process includes the method for embedding a cryptospore marker in the process of scanning a slide to generating a slice according to any one of claims 1 to 7.
Citation Information
Patent Citations
Image processing method for improving safety of medical image
CN103440617A
Spore recognition system and method
CN114299493A
Pathological section interpretation result display method and system and readable storage medium
CN114443708A
Accurate extraction and identification method of escherichia coli contour
CN114648511A
Cervical pathological diagnosis device based on semantic segmentation network
CN116705289A