Medical detection data redundancy protection method

By grading and real-time health monitoring of DICOM image files and dynamically determining data protection strategies, the problems of resource waste and delayed response in existing technologies are solved, and efficient and accurate protection of medical data is achieved.

CN120704594APending Publication Date: 2025-09-26HANGZHOU AIYIJIAN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510718217.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing technologies fail to effectively distinguish the degree of data importance in medical data protection, resulting in waste of resources and improper data protection. The lack of real-time monitoring of the health status of storage devices makes it difficult to respond to data protection in advance, leading to sudden data damage.

Method used

By sequentially reading the byte stream of the DICOM image file, dividing the file header area and the pixel data area, establishing the medical data hierarchical unit information, calculating the number of erasure code data blocks and the number of check blocks based on the importance level, and determining whether to start data protection in combination with the health status of the storage medium, a copy of the medical data with enhanced protection is generated.

Benefits of technology

It achieves differentiated protection of medical data, improves data recovery accuracy and response speed, reduces the probability of data loss caused by equipment failure, and improves the adaptability and timeliness of data protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120704594A_ABST
    Figure CN120704594A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data protection, in particular to a medical detection data redundancy protection method, which comprises the following steps of: performing byte stream sequential reading on a DICOM (Digital Imaging and Communications in Medicine) image file to position a file header area and a pixel data area, and judging that the file header area is high in importance and the pixel data area is medium in importance; and establishing medical data grading unit information. According to the method, the byte streams of the medical detection data are sequentially read for positioning, data grading unit information is formed, data regions with different importance degrees in the medical data are divided and subjected to differential protection, and the balance between the safety and the storage efficiency of the medical data is guaranteed; meanwhile, redundancy protection parameters are accurately calculated according to the actual importance level of the data unit, erasure code configuration is customized according to needs, blindness and resource waste of redundancy protection are avoided, and data recovery precision and response speed are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data protection, and in particular to a method for redundancy protection of medical detection data. Background Art

[0002] The field of data protection technology mainly involves the secure storage, transmission and processing of data through specific computing technologies and management methods to avoid or reduce the risks of data loss, tampering, leakage and damage.

[0003] In actual application, existing technologies primarily employ holistic backup strategies for medical data protection, without distinguishing the importance of data. This can easily lead to a disconnect between resource investment and actual data protection needs, leaving important data underprotected while less important data consumes significant storage resources. Furthermore, existing technologies lack real-time monitoring and dynamic analysis of storage device health, often responding passively to device damage and making it difficult to proactively implement effective data protection responses. For example, when a mechanical hard drive shows a gradually worsening damage trend or temperature anomalies, these are often difficult to detect immediately, resulting in sudden data damage or even permanent loss. Therefore, improvements are needed. Summary of the Invention

[0004] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a redundancy protection method for medical detection data.

[0005] To achieve the above objectives, the present invention adopts the following technical solution, a method for redundancy protection of medical test data, comprising the following steps:

[0006] The DICOM image file is sequentially read in byte stream to locate the file header area and the pixel data area, the file header area is determined to be of high importance and the pixel data area is of medium importance, and the medical data hierarchical unit information is established;

[0007] Based on the importance level of each unit in the medical data hierarchical unit information, a unit target redundancy level is obtained; based on the unit target redundancy level, the number of erasure code data blocks and the number of check blocks corresponding to each unit are calculated to form a customized erasure code configuration scheme;

[0008] Reading a reallocated sector count value and a current operating temperature value from a mechanical hard disk storage medium to obtain key health data of the medium, and determining a current health status level of the storage medium based on the key health data of the medium;

[0009] Based on the current health status level of the storage medium, determine whether to generate a data protection startup instruction, obtain a data protection operation decision, and based on the data protection operation decision and the customized erasure code configuration scheme, perform redundant encoding on the DICOM image file to generate an enhanced protection medical data copy.

[0010] Preferably, the steps for obtaining the medical data classification unit information are:

[0011] Read the DICOM image file in sequential byte stream, analyze the tag structure in the byte stream byte by byte, determine the starting position of each data element in the DICOM image file, and form data element positioning information;

[0012] Based on the data element location information, parsing the file header area and the pixel data area in the data element location information, determining that the elements belonging to the meta information in the data element location information are the file header area, and the elements belonging to the image information are the pixel data area, and generating a region division result;

[0013] Based on the region division result, it is determined that the elements belonging to the file header region in the region division result are high-importance units, and the elements belonging to the pixel data region are medium-importance units, thereby forming medical data hierarchical unit information.

[0014] Preferably, the step of obtaining the unit target redundancy level is:

[0015] Parsing all units in the medical data hierarchical unit information, calling the average stable transmission time, maximum delay time, average access frequency, data hierarchy depth and delay log of each unit, calculating the average value of each record in the delay log to form an average delay time, and collating the average stable transmission time, maximum delay time, average delay time, average access frequency and data hierarchy depth corresponding to all units to obtain a five-indicator statistical table;

[0016] Calculate the redundancy level value of each unit according to the five-indicator statistical table;

[0017] According to the redundancy level value, the redundancy level value corresponding to the high importance unit is extracted as the first redundancy coefficient, and the redundancy level value corresponding to the medium importance unit is extracted as the second redundancy coefficient to generate the unit target redundancy level.

[0018] Preferably, the steps for obtaining the customized erasure code configuration scheme are:

[0019] Based on the unit target redundancy level, parsing the redundancy level value of each unit, retrieving the original data volume and maximum allowable recovery time of the corresponding unit, and forming a unit coding configuration input set;

[0020] Calculating the number of erasure code data blocks and the number of check blocks according to the unit coding configuration input set;

[0021] Based on the number of erasure code data blocks and the number of check blocks, an erasure code parameter combination for each unit is constructed, and all units are combined and merged to generate a customized erasure code configuration scheme.

[0022] Preferably, the steps for obtaining the key health data of the medium are:

[0023] Reading a status attribute table through an interface of a mechanical hard disk storage medium, extracting a data field value corresponding to a reallocated sector count and a data field value corresponding to a current operating temperature in the status attribute table, recording them as the reallocated sector count value and the current operating temperature value, respectively, to generate raw data on the mechanical hard disk operation status;

[0024] Analyzing the number of logical block replacements reflected by the reallocated sector count value based on the raw data of the mechanical hard disk operation status, and converting the current operating temperature value into a corresponding Celsius temperature value, unifying the physical quantity expressions of the two parameters, and obtaining a standardized parameter of the mechanical hard disk operation status;

[0025] Based on the standardized parameters of the mechanical hard disk operation status, the reallocated sector count value and the current operating temperature value are combined as an indicator set of the same device dimension to generate medium key health data.

[0026] Preferably, the steps for obtaining the current health status level of the storage medium are:

[0027] Extracting the current reallocated sector count value, the current operating temperature value, the continuous operation time of the device, and the average number of read errors in the last month from the key health data of the medium to generate a basic parameter set for determining the health of the storage medium;

[0028] Calculating a health grade score of the storage medium based on the storage medium health judgment basic parameter set;

[0029] Based on the health grade score of the storage medium, a health status grade judgment rule is set to generate the current health status grade of the storage medium.

[0030] Preferably, the steps for obtaining the data protection operation decision are:

[0031] Based on the current health status level of the storage medium, calling the level label corresponding to the health status level, performing logical judgment on the level label value, identifying whether it belongs to the three states of healthy, sub-healthy or abnormal, and generating a health status level judgment result;

[0032] According to the health status level judgment result, the judgment condition is set to that the start condition is met when the level label is equal to sub-health or abnormal state. If the condition is met, it is marked as "protection needs to be started", otherwise it is marked as "no protection needed", and a data protection start flag is obtained;

[0033] Based on the data protection startup identifier, a corresponding control instruction is generated, and a data protection execution request is issued when the identifier is "protection needs to be started". No operation instruction is generated when the identifier is "no protection needs to be started", and a data protection operation decision is formed.

[0034] Preferably, the steps for obtaining the enhanced protection medical data copy are:

[0035] Based on the data protection operation decision and the customized erasure code configuration scheme, determining whether the data protection operation decision is "protection needs to be started", and if so, calling the parameters of the number of erasure code data blocks and the number of check blocks for each unit in the customized erasure code configuration scheme, establishing a redundant encoding task configuration list, and generating a DICOM image file redundant encoding initialization instruction set;

[0036] According to the DICOM image file redundant encoding initialization instruction set, the file header area and pixel data area of ​​each DICOM image file are sequentially read, the corresponding area data is fragmented according to the configured number of erasure code data blocks and the number of check blocks, and each data fragment is filled into the corresponding data block of the erasure code structure, the erasure code encoding function is executed and the output is verified to generate a DICOM image file redundant encoding fragment result set;

[0037] Based on the redundant coding fragment result set of the DICOM image file, all fragment results are combined and packaged according to the file structure index. After the packaging is completed, verification meta-information is added to the file copy to generate an enhanced protection medical data copy.

[0038] Compared with the prior art, the advantages and positive effects of the present invention are:

[0039] The present invention positions the byte stream of medical test data by sequential reading to form data hierarchical unit information, divides and differentially protects data areas of different importance in the medical data, and ensures a balance between medical data security and storage efficiency; at the same time, it accurately calculates redundant protection parameters according to the actual importance level of the data unit, customizes the correction and erasure code configuration as needed, avoids the blindness and resource waste of redundant protection, and improves data recovery accuracy and response speed; further monitors the health status of the storage device itself in real time, uses the reallocated sector count and operating temperature of the mechanical hard disk as the evaluation basis, dynamically determines the current health status of the device and decides in real time whether to start data protection, thereby strengthening the adaptability and timeliness of data protection measures from the source of data security; carries out data redundancy coding based on real-time decision-making and customized configuration, achieves a high degree of matching between data protection behavior and the actual status of the device and the actual data needs, and reduces the probability of data loss caused by the risk of equipment failure. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1Schematic diagram of the steps of the present invention. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0042] See also Figure 1 The present invention provides a technical solution, a method for redundancy protection of medical detection data, comprising the following steps:

[0043] The DICOM image file is sequentially read in byte stream to locate the file header area and the pixel data area, the file header area is determined to be of high importance and the pixel data area is of medium importance, and the medical data hierarchical unit information is established;

[0044] Based on the importance level of each unit in the medical data hierarchical unit information, the unit target redundancy level is obtained. Based on the unit target redundancy level, the number of erasure code data blocks and the number of check blocks corresponding to each unit are calculated to form a customized erasure code configuration scheme;

[0045] Reading a reallocated sector count value and a current operating temperature value from a mechanical hard disk storage medium to obtain key health data of the medium, and determining a current health status level of the storage medium based on the key health data of the medium;

[0046] Based on the current health status level of the storage medium, determine whether to generate a data protection startup instruction and obtain a data protection operation decision. Based on the data protection operation decision and the customized erasure code configuration plan, perform redundant encoding on the DICOM image file to generate an enhanced protection medical data copy.

[0047] The steps for obtaining medical data hierarchical unit information are as follows:

[0048] Read the DICOM image file in sequential byte stream, analyze the tag structure in the byte stream byte by byte, determine the starting position of each data element in the DICOM image file, and form data element positioning information;

[0049] Based on the data element location information, the file header area and the pixel data area in the data element location information are parsed, and the elements belonging to the meta information in the data element location information are determined to be the file header area, and the elements belonging to the image information are the pixel data area, and a region division result is generated;

[0050] Based on the region division results, it is determined that the elements belonging to the file header area in the region division results are high-importance units, and the elements belonging to the pixel data area are medium-importance units, forming medical data hierarchical unit information.

[0051] Specifically, the DICOM image file is read sequentially by byte stream. The system opens the specified DICOM image file in binary read-only mode and initializes a file read pointer or byte offset counter to 0. First, in strict accordance with the DICOM standard, the program sequentially reads the first 128 bytes of the file. This part is the file preamble. The program records its existence but usually does not perform in-depth analysis. The read pointer moves forward 128 bytes. Then, the program reads the next 4 bytes and accurately compares it with the preset ASCII encoding of the DICOM prefix "DICM". If the comparison is inconsistent, the file is immediately marked as a non-standard or damaged DICOM file, and the relevant error information and current file path are recorded, and the subsequent parsing of the file is terminated. If the comparison is consistent, the file is confirmed to be in DICOM format, and the parsing process continues. At this time, the parser begins to process the data elements in the file meta-information header. This part of the data elements usually uses explicit value representation little endian (Explicit VR Little Endian). Endian) transfer syntax, the program will loop to read each data element, the specific steps are: first, read the 2-byte group number and the 2-byte element number, which together constitute the label of the data element. For example, the label of the file meta-information group length is (0002, 0000), and the label of the transfer syntax is (0002, 0010). After each reading, the file pointer advances 4 bytes accordingly, and the current pointer position is recorded as the starting position of the data element. Second, read the 2-byte value representation (VR), which indicates the type of data, for example, "UL" represents an unsigned long integer, "UI" represents a unique identifier, and the file pointer advances 2 bytes. Third, according to the definition of VR, determine the value length (Value The Length (VL) field specifies the number of bytes in the data element value. For VR values ​​of OB, OW, OF, SQ, UT, or UN, the next two bytes are reserved (must be 0000H), followed by the four-byte VL. The program reads these two bytes of reserved bits and then the four-byte VL, advancing the file pointer by six bytes. For other VR values, the two-byte VL is read directly, advancing the file pointer by two bytes. The VL field indicates the actual byte length of the data element value. If the VL value is FFFFFFFFH, it indicates that the value of the data element has an indeterminate length, typically used for sequence or pixel data, the end of which is marked by a specific sequence terminator. Fourth, the program reads the corresponding number of bytes from the current file pointer position based on the read VL. This part is the value of the data element. After reading, the file pointer advances by VL bytes. For each successfully parsed data element, the system encapsulates its label (group number, element number), VR, VL, the starting byte offset of the record, and its actual value (or the storage location and length of the value, especially for large objects) into a structured data record.All these records are collected and stored in a list or array in the physical order in which they appear in the file. After parsing the file meta-information, the parser will determine the encoding rules for the subsequent data body based on the transfer syntax UID (Tag (0002, 0010)) in the file meta-information and continue to parse the remaining data elements according to the corresponding rules until the end of the file or pixel data (7FE0, 0010) is encountered and parsed. This complete traversal and structured information extraction process ultimately forms data element location information.

[0052] Based on the data element location information, the system will traverse each data element entry recorded in this information, extract its label value, such as the group number and element number, for each data element entry, and make a classification judgment. The core basis for judgment is the label of the data element. The specific judgment logic is: the system presets a pixel data label constant, that is, (7FE0, 0010). When traversing to a data element, its label value is extracted and compared with the preset pixel data label. If the two are exactly the same, the data element is clearly identified as a component of the "pixel data area", which directly carries the original medical image. The initial pixel intensity value, for all data elements whose labels are not (7FE0, 0010), they are all classified as "file header area". The "file header area" here is a broad concept, which includes all metadata of non-pixel data, including file meta-information elements with group numbers (0002, XXXX), such as (0002, 0010) transfer syntax UID and (0002, 0002) medium storage SOP class UID, as well as patient information, such as (0010, 0010) patient name and (0010, 0020) patient ID, and information describing examination information. The system adds a new attribute field to each entry in the data element location information to store its region affiliation. The value of this field is set to the text label "file header region" or "pixel data region". Identifier, for example, for the element with label (0010, 0010), its region attribution field is set to "file header region", while for the element with label (7FE0, 0010), it is set to "pixel data region". This process does not involve modification or movement of the content of the data element itself, but only adds classification labels to its metadata description. After traversing and marking all data elements, this updated data element location information now additionally includes the region attribution of each element, which constitutes the region division result. This result records the scope and content composition of the two core data areas in the DICOM file.

[0053] Based on the region division results, the system determines and assigns importance levels to each data element in the region division results according to the preset static importance assignment rules. The rules are defined as follows: all data elements whose region attribution field value is "file header area" are judged as "high importance units", and all data elements whose region attribution field value is "pixel data area" are judged as "medium importance units". The setting of this assignment rule is based on the general understanding that the metadata (file header area) in the DICOM file is crucial to the overall usability, interpretability and accuracy of the clinical diagnosis process of the file. For example, the loss or damage of metadata such as patient identification (0010, 0020), examination date (0008, 0020), and image orientation (0020, 0037) may result in the image being unable to be correctly associated with the patient or unable to perform accurate spatial measurement. Therefore, it is assigned high importance. Although pixel data (pixel data area) is the core of the image, some of its minor damage sometimes has a certain degree of fault tolerance or repairability, or in In some application scenarios, the integrity of metadata takes precedence over the absolute integrity of pixel data, so medium importance is assigned. The system will traverse all data element entries in the regional division results, check the regional attribution field of each entry, and according to the above rules, add an "importance level" attribute field for each entry and set the value of this field to a text identifier of "high importance" or "medium importance". For example, if an entry's regional attribution is "file header area", its importance level is assigned to "high importance". If another entry's regional attribution is "pixel data area", its importance level is assigned to "medium importance". This process does not involve any changes to the original data element content or its position in the file. It only further adds classification labels to its descriptive information. After completing the assignment of importance levels to all data elements, this updated list of data elements, in which each element now contains the original positioning information, regional attribution and importance level, together constitutes the medical data classification unit information, which contains each unit and its corresponding importance level.

[0054] The steps to obtain the unit target redundancy level are:

[0055] Analyze all units in the medical data hierarchical unit information, call the average stable transmission time, maximum delay time, average access frequency, data hierarchy depth and delay log of each unit, calculate the average value of each record in the delay log to form the average delay time, and organize the average stable transmission time, maximum delay time, average delay time, average access frequency and data hierarchy depth corresponding to all units to obtain a five-indicator statistical table;

[0056] According to the five-indicator statistical table, the redundancy level value of each unit is calculated using the following formula:

[0057]

[0058] Among them, R c is the redundancy level value of the c-th unit, ZT c is the average stable transmission time of the cth unit in seconds, D c is the maximum delay time of the cth unit, in seconds, A c is the average delay time of the cth unit in seconds, F c is the average access frequency of the cth unit, in times / day, L c is the data level depth of the c-th unit, ZT ref is the reference transmission time in seconds, F ref is the reference access frequency, in times / day, A ref_log is the logarithm-normalized reference value of the average delay time, in seconds;

[0059] According to the redundancy level value, the redundancy level value corresponding to the high-importance unit is extracted as the first redundancy coefficient, and the redundancy level value corresponding to the medium-importance unit is extracted as the second redundancy coefficient to generate the unit target redundancy level.

[0060] Specifically, based on the medical data classification unit information, which records in detail each data unit and its importance level, the system first processes each data unit in turn. For each unit, the system retrieves its corresponding average stable transmission time, maximum delay time, average access frequency, data level depth, and detailed delay logs for the past period of time (for example, the past 30 days) from the continuously monitored performance logs and metadata storage. The average stable transmission time is obtained by performing multiple (for example, not less than 100) read and write operations on standard-sized data blocks, recording the time taken for each operation, and calculating the average time taken after excluding extreme outliers that are obviously caused by external interference. The maximum delay time is the maximum value of all single operation delays recorded within the same observation period. The 99th percentile value is usually used to smooth extreme jitter. The average access frequency is obtained based on the total number of times the unit is read or written within a specified unit time (for example, daily) according to the access log statistics. The hierarchical depth is determined by the hierarchical position of the data in the logical storage structure. For example, the unit depth in the root directory is 0, the unit depth in the next-level subdirectory is 1, and so on. The delay log contains the specific delay time record for each access to the unit. The system then processes the delay log of each unit specifically, and calculates the average delay time of the unit by summing the delay time values ​​of all records in the log and dividing it by the total number of delay records. For example, if a unit has 1,500 delay records in the past 30 days and the total delay time is 30,000 milliseconds, then its average delay time is 30,000 / 1,500 = 20 milliseconds, or 0.02 seconds. After calculating the average delay time for all units, the system structures each unit's identifier with its corresponding five key indicators: average stable transmission time, maximum delay time, newly calculated average delay time, average access frequency, and data hierarchical depth, to form a five-indicator statistical table.

[0061] formula: The benefit of the formula is that the redundancy level value R c The calculation formula comprehensively considers the transmission and delay characteristics, access frequency and hierarchy of data units in the data structure, aiming to allocate a reasonable level of redundancy protection for data units of different characteristics and importance. The numerator evaluates the degree to which the "risk" or "activity" of the data unit in terms of transmission delay characteristics and access frequency deviates from the benchmark through a quasi-Euclidean distance method. The time-related term ZT c +|D c -A c |Combining the stable transmission time and delay fluctuations, the frequency term F c Reflects the access activity. These two dimensions positively affect the redundancy level. The denominator uses the data level depth L c and the logarithmic average delay time A cAdjustments are made. The deeper the layer or the higher the average latency, the lower the redundancy level. This design approach aims to ensure data availability while taking into account the efficient use of storage resources. It prioritizes providing higher redundancy configurations for data units with fast transmission speeds, large latency fluctuations, or frequent access and shallower layers.

[0062] ZT c The parameter acquisition step is as follows: this parameter represents the average stable transmission time of the cth unit in seconds. This data comes from the record of the corresponding unit in the "Five-Indicator Statistical Table" generated in the previous step. Its original data is collected by performing a series of standardized read and write operations on a specific data unit (for example, continuously reading a 1MB data block 100 times) to collect the time consumed for each operation. After eliminating statistical outliers caused by factors such as instantaneous high load of the system (for example, values ​​exceeding three times the standard deviation of the mean), the average value of the remaining time consumption data is calculated to obtain it. For example, a 1MB read test is performed 100 times on the pixel data unit of a DICOM image file, and the total effective time consumption is 5 seconds. Then its average stable transmission time ZT c 5 seconds / 100=0.05 seconds.

[0063] D c The steps for obtaining the parameter are as follows: the parameter represents the maximum delay time of the cth unit, in seconds. This data also comes from the "Five-Indicator Statistical Table". Its original data is in a continuous monitoring period (for example, continuous monitoring for 7 days), recording the response delay of each access to the data unit, and selecting the largest one from these delay data or using a higher percentile value (such as 99th percentile delay) as a representative to reflect the worst possible response situation of the unit. For example, during the 7-day monitoring period, the maximum access delay of a file header unit is recorded as 0.25 seconds, then D c 0.25 seconds.

[0064] A c The parameter is obtained as follows: the parameter represents the average delay time of the cth unit in seconds. This data comes from the "Five-Indicator Statistics Table" and is obtained by calculating the average value of all delay log records of the specified unit in a specific period (for example, the past 30 days) during the table generation process. The specific calculation is to add up the delay time of all delay records and divide it by the number of records. For example, a unit has 500 access delay records in a month, and the cumulative total delay is 10 seconds. Then its average delay time A c 10 seconds / 500=0.02 seconds.

[0065] F cThe steps to obtain the parameter are as follows: the parameter represents the average access frequency of the cth unit, in times / day. This data comes from the "Five-Indicator Statistical Table". The original data is obtained by analyzing the access log, counting the total number of times the data unit is accessed within a specified period (for example, the past 30 days), and then dividing it by the number of days in the period to calculate the average daily access number. For example, a DICOM metadata unit has been accessed a total of 6000 times in the past 30 days, so its average access frequency F is 0. c 6000 times / 30 days = 200 times / day.

[0066] L c The steps to obtain the parameter are as follows: the parameter represents the data level depth of the cth unit, which is a dimensionless integer. This data comes from the "Five-Indicator Statistical Table". Its value is determined according to the position of the data unit in the predefined logical storage structure or data organization hierarchy. The depth of the root level or top level unit is usually defined as 0, and the depth of its direct child unit is 1, and so on. For example, if a DICOM study level data unit is regarded as level 0, then the sequence level unit L below it is c It can be set to 1, and the image level unit can be set to 2. In this example, a unit in the file header area is set, and its data level depth is L c is 0.

[0067] ZT ref The steps for obtaining the parameter are as follows: This parameter is the reference transmission time, in seconds. As a benchmark value, it is usually set according to the overall performance requirements and typical performance of the storage system. By performing benchmark performance tests on various storage media in the system, a representative average stable transmission time can be selected. For example, after evaluating the IO performance of the main storage arrays in the current medical imaging storage system, it is determined that the average transmission time under ideal conditions is 0.02 seconds, so ZT is set. ref =0.02 seconds.

[0068] F ref The steps for obtaining the parameter are as follows: the parameter is the reference access frequency, which is expressed in times / day. The benchmark value is used to measure the relative activity of data unit access. Its setting can be based on the statistical analysis of the access frequency of all data units in the system over a period of time (for example, one month). The median or a specific percentile (for example, the 75th percentile) of the average daily access frequency of all units is taken as the reference value, or a standard activity level is defined according to business needs. For example, if all DICOM units in the system are analyzed and the 75th percentile of the average daily access frequency is found to be 50 times / day, then F is set. ref =50 times / day.

[0069] A ref_logThe parameter acquisition steps are as follows: This parameter is the logarithmic normalized reference value of the average delay time, in seconds. This parameter is mainly used for the denominator of the logarithmic function ln(x+1), and adjusts A c The relative size of A c =0 when A c / A ref_log Zero leads to the case where ln(1)=0 (although here A c / A ref_log +1, if A c = 0, then ln(1) = 0), and its value is set to a small positive real number. Here, A is set ref_log =0.001 seconds.

[0070] Calculation process:

[0071] Now, for a specific data unit c (for example, the file header area unit of a DICOM study), the redundancy level value R c Calculate the value of the example set in the previous parameter acquisition steps:

[0072] ZT c = 0.05 seconds;

[0073] D c = 0.25 seconds;

[0074] A c = 0.02 seconds;

[0075] F c =200 times / day;

[0076] L c =0;

[0077] ZT ref = 0.02 seconds;

[0078] F ref =50 times / day;

[0079] A ref_log = 0.001 seconds;

[0080] The calculation process is as follows:

[0081] Calculate the numerator of the time-dependent term: ZT c +|D c -A c |=0.05+|0.25-0.02|=0.05+|0.23|=0.05+0.23=0.28 seconds;

[0082] Compute the normalized ratio of the time-dependent terms:

[0083] Compute the normalized ratio of frequency-dependent terms:

[0084] Compute the sum of squares within a square root:

[0085] Calculate the numerator (square root term):

[0086] Calculate the level depth term in the denominator: L c +1=0+1=1;

[0087] Calculate the average latency normalized term in the denominator:

[0088] Compute the logarithmic term in the denominator:

[0089] Calculate the denominator:

[0090] Calculate the redundancy level value R c :

[0091] The result shows that for the selected file header area unit, the calculated redundancy level value is 4.7824. This value is a relative measure used to determine the redundancy required in the data protection strategy. Usually, R c The higher the value, the higher the target redundancy level of the unit is, and more check data needs to be configured. Conversely, the lower the R c A higher value corresponds to a lower target redundancy level.

[0092] According to the redundancy level value, that is, the R calculated for each data unit in the previous step c The system starts to determine the specific unit target redundancy level for each unit based on the importance level (high importance or medium importance) of each unit in the medical data classification unit information obtained at an earlier stage. The specific execution process is as follows: the system traverses each data unit and reads its calculated redundancy level value R c and its marked importance level. If a data unit is marked as a "high importance unit" in the medical data classification unit information, such as the key meta-information element in the DICOM file header, the system directly sets the redundancy level value R corresponding to the unit. c Assigned as its first redundancy coefficient, this first redundancy coefficient is the unit target redundancy level of this high importance unit. If another data unit is marked as a "medium importance unit", such as the pixel data area of ​​a DICOM image, the system will set its corresponding redundancy level value R cAssigned as its second redundancy coefficient, this second redundancy coefficient is the unit target redundancy level of the important unit. In essence, this step is to convert the previously calculated universal redundancy level value R c The units are labeled or assigned roles according to their importance, but their values ​​themselves do not change. The unit target redundancy level is ultimately expressed as a list of values ​​corresponding to each data unit, where each value is inherited from the R of the corresponding unit. c The value is obtained by assigning a specific coefficient name (first redundancy coefficient or second redundancy coefficient) to the importance category (high or medium). These coefficients will be directly used in the calculation of the subsequent customized erasure code configuration scheme. For example, if the R c is 4.7824, then its first redundancy coefficient is 4.7824, which becomes its unit target redundancy level. If the R c is 3.1500, then its second redundancy coefficient is 3.1500, which becomes its unit target redundancy level, and finally forms a complete list containing all units and their corresponding target redundancy levels to guide subsequent data protection operations.

[0093] The steps to obtain a customized erasure code configuration solution are:

[0094] Based on the unit target redundancy level, the redundancy level value of each unit is parsed, the original data volume and the maximum allowable recovery time of the corresponding unit are retrieved, and the unit coding configuration input set is formed;

[0095] According to the unit coding configuration input set, the number of erasure code data blocks and the number of check blocks are calculated using the following formula:

[0096]

[0097] Among them, K u is the number of erasure code data blocks in the u-th unit, M u is the number of check blocks of the u-th unit, B u is the data volume of the u-th unit, in MB, S u is the maximum allowable recovery time of the u-th unit, in seconds, R u is the redundancy level value of the u-th unit, dimensionless, k factor is the conversion constant, the unit is Used to unify data volume and time dimensions;

[0098] Based on the number of erasure code data blocks and the number of check blocks, a combination of erasure code parameters for each unit is constructed, and all units are combined and merged to generate a customized erasure code configuration scheme.

[0099] Specifically, based on the unit target redundancy level, the data structure specifies a specific redundancy level value for each data unit (for example, the file header area or pixel data area in the DICOM file). The system first traverses the unit target redundancy level list, parses and extracts the redundancy level value (R u ), then, for each unit currently being processed, the system needs to retrieve its original data volume (B u ), this volume data for a specific unit in the DICOM file, such as the file header area, is obtained by accumulating the byte lengths of the values ​​(Value Field) of all DICOM data elements in the area, and then converted into MB units. For the pixel data area, its volume is directly calculated based on the dimension, bit depth and compression status (if any) of the pixel matrix or read from the file meta information. For example, an uncompressed 1024x1024x16-bit single-frame grayscale image has a pixel data volume of approximately 1024×1024×2 bytes ≈ 2MB, and the file header area volume may be 0.05MB. At the same time, the system also needs to call its maximum allowable recovery time (S) for each unit. u ), this time is not obtained through dynamic monitoring, but is obtained based on predefined policies and configurations. These policies usually associate the importance level of data units (e.g., high importance, medium importance determined in the previous step) with specific recovery time objectives (RTO). For example, the system configuration may stipulate that the maximum allowable recovery time for all units marked as "high importance" (e.g., file header area) is set to 1800 seconds (30 minutes), while the maximum allowable recovery time for all units marked as "medium importance" (e.g., pixel data area) is set to 7200 seconds (2 hours). These configuration values ​​are stored in the system policy library and are queried and assigned based on the importance level of the current unit. By aggregating the redundancy level value R for each unit, u , original data volume B u , and the maximum allowable recovery time S u , and finally form a containing (unit identifier, R u ,B u ,S u ) tuples, namely the unit encoding configuration input set, which provides the necessary data basis for the subsequent calculation of erasure code parameters.

[0100] formula: The benefit of the formula is that it provides a method for dynamically determining the number of erasure code data blocks (K u ) and the number of check blocks (M u ) method, so that the redundancy configuration can adapt to the characteristics of different data units, K u The calculation takes into account the volume of the data unit (B u) and the maximum allowable recovery time (S u ), by converting the constant k factor Adjustment is performed when the data volume is large or the recovery time requirement is tight (S u Smaller) units tend to be split into more data blocks (K u Larger means smaller potential block size), which helps parallel recovery and shortens actual recovery time, M u The calculation of is directly related to the number of data blocks K u and the unit redundancy level value (R u ), ensuring that the degree of redundancy matches the importance and risk assessment of the data unit, R u The higher the value, the more check blocks there are and the stronger the fault tolerance. This design achieves differentiated and customized redundant protection for different data units.

[0101] B u The steps for obtaining the parameter are as follows: the parameter represents the data volume of the u-th unit in MB. This data comes from the record of the corresponding unit in the "unit encoding configuration input set" generated in the previous step. The original acquisition method depends on the unit type. For the file header area unit in the DICOM file, its volume is obtained by parsing the specific content of all data elements in the area, accumulating the actual number of bytes of each element value field, and converting the total number of bytes into MB units. For example, a detailed DICOM file header area contains a large amount of metadata, and its actual volume is 0.5MB.

[0102] S u The steps for obtaining the parameter are as follows: the parameter represents the maximum allowable recovery time of the u-th unit, in seconds. This data comes from the "unit encoding configuration input set". Its value is set according to the established importance level of the data unit and the recovery time objective (RTO) defined in the service level agreement (SLA). It is not calculated dynamically in real time, but is queried from the system configuration policy. For example, the system policy stipulates that for data units rated as "high importance" (such as key metadata, indexes, etc.), their S u Set to 1800 seconds (ie 0.5 hours), for "medium importance" data units (such as regular image data), S u Set to 7200 seconds (i.e. 2 hours). This setting is intended to ensure that critical data can be quickly recovered, while the recovery time of general data is relatively loose. In this example, the file header unit is considered to be a high-importance unit, so its S is set to u =1800 seconds.

[0103] R uThe parameter acquisition step is as follows: This parameter represents the redundancy level value of the u-th unit, which is a dimensionless value. This data comes from the "unit encoding configuration input set". It is calculated by a specific formula in the previous step based on various characteristics of the unit (such as average stable transmission time, maximum delay time, average access frequency, and data level depth). c Value, for example, in the aforementioned R c In the calculation example, the redundancy level value calculated for a file header area unit (high importance) is 4.7824, so here R u =4.7824.

[0104] k factor The steps to obtain the parameter are as follows: the parameter is a conversion constant with a unit of Its function is to unify the data volume and time dimension, and to scale the calculation of the number of data blocks. factor The value of is usually determined empirically through experiments and system performance analysis, with the goal of making the number of calculated data blocks K u It can meet the recovery performance requirements (usually the more blocks and the smaller the blocks, the more conducive to parallel recovery), and will not cause excessive management overhead due to too many blocks. For example, by performing data recovery tests on the system under different parameter combinations many times, analyzing the relationship between data block size, number and recovery efficiency, and finally determining Appropriate data block partitioning schemes can be generated for different types of data units in the current system environment.

[0105] Calculation process:

[0106] The K u1 and M u1 The calculation of , its parameter value is:

[0107] B u1 =0.5MB;

[0108] S u1 =1800 seconds;

[0109] R u1 =4.7824;

[0110]

[0111] Calculate K u1 :

[0112]

[0113] First calculate the denominator

[0114]

[0115] Then calculate the denominator:

[0116]

[0117] Then calculate the ratio:

[0118]

[0119] Finally take the bottom:

[0120]

[0121] Therefore, the number of erasure code data blocks in the first unit (file header unit) is K u1 is 1.

[0122] Calculate M u1 :

[0123]

[0124] Substitute K u1 =1 and R u1 =4.7824:

[0125] K u1 ·R u1 =1·4.7824=4.7824;

[0126] Then take the top:

[0127]

[0128] Therefore, the number of check blocks in the first unit (file header unit) is M u1 is 5.

[0129] The result shows that for this 0.5MB file header unit, its importance and recovery requirements determine that it will be regarded as 1 data block (K u1 =1), and generate 5 check blocks for it (M u1 =5), which means that a (1+5, 1) or (6, 1) erasure coding scheme is adopted. This scheme has very high redundancy and can tolerate the loss of up to 5 blocks. This is very effective for ensuring the integrity of small but critical metadata (such as file header information). Although the checksum overhead is large (500%), given its small data size, the absolute overhead is still within an acceptable range and consistent with its high importance.

[0130] Based on the number of erasure code data blocks and the number of check blocks, that is, the number of data blocks K calculated for each data unit u in the system in the previous step u Sum check block number M uThe system then begins to construct its own erasure code parameter combination for each data unit. Specifically, the system will traverse all data units and, for each unit, compare its identifier (for example, the unit's unique ID or its specific path and name in the DICOM file) with the K calculated for it. u Value and M u Value pairing, forming a (unit ID, K u , M u ) structured record, which clarifies the data block strategy (K u Block) and redundancy check strategy (M u For example, for the file header unit (unit ID is "Header_001") in the above example, its parameter combination is recorded as ("Header_001", 1, 5). For another pixel data unit (unit ID is "PixelData_001"), if K is calculated u =301 and M u =949, then its record is ("PixelData_001", 301, 949). After generating such parameter combination records for all data units, the system aggregates these independent records to form a complete list or mapping table. This list lists in detail all protected data units in the system and their corresponding erasure code configuration parameters (K u and M u ), this list is the final customized erasure code configuration scheme, which will serve as a direct instruction and basis for the subsequent execution of actual data redundancy encoding operations, ensuring that each data unit can be protected according to the parameters tailored for it.

[0131] The steps to obtain key health data of the medium are:

[0132] Reading a status attribute table through an interface of a mechanical hard disk storage medium, extracting a data field value corresponding to a reallocated sector count and a data field value corresponding to a current operating temperature in the status attribute table, recording them as the reallocated sector count value and the current operating temperature value, respectively, to generate raw data on the mechanical hard disk operation status;

[0133] Based on the raw data of the mechanical hard disk operation status, the number of logical block replacements reflected by the reallocated sector count value is analyzed, and the current operating temperature value is converted into the corresponding Celsius temperature value. The physical quantity expression of the two parameters is unified to obtain the standardized parameters of the mechanical hard disk operation status;

[0134] Based on the standardized parameters of the mechanical hard disk operation status, the reallocated sector count value and the current operating temperature value are combined as an indicator set of the same device dimension to generate the key health data of the medium.

[0135] Specifically, through the serial ATA (SATA) or parallel ATA (PATA) interface of the mechanical hard disk storage medium, the system sends a SMART command that complies with the ATA / ATAPI command set specification to the target mechanical hard disk, specifically a "READ DATA" command (command code B0h, subcommand D8h), to request the hard disk to return its internally stored SMART data structure. This data structure is a status attribute table, which contains multiple monitoring attributes and their current values. After the system receives the data block returned by the hard disk, which is usually 512 bytes, it will parse this data block to locate each SMART attribute. Each attribute consists of an identifier (ID), status flag, current value, worst value, threshold and raw data fields. In this process, the system pays special attention to two specific attribute IDs: one is the "Reallocated Sectors Count" attribute with ID 5, and the system will extract the 6-byte raw data field (Raw Data) corresponding to this attribute. The first is the "Temperature_Celsius" attribute with ID 194. The system also extracts the corresponding 6-byte raw data field. The least significant byte of this field usually directly represents the current hard drive internal temperature in Celsius. Alternatively, in some hard drive firmware, it may need to be converted from the raw value according to the manufacturer's specific calculation method. However, in this step, only the raw value is extracted without conversion. The system records the two extracted raw data field values, namely the raw value of the reallocated sector count and the raw value of the current operating temperature, together with the hard drive's unique identifier (such as the serial number) and the current read timestamp, to form a raw data record of the mechanical hard drive's operating status.

[0136] Based on the raw data of the mechanical hard drive's operating status obtained in the previous step, which includes the reallocated sector count and current operating temperature of the specific hard drive, the system first parses the reallocated sector count. For the "Reallocated Sectors Count" field with SMART attribute ID 5, its 6-byte raw data field typically stores an unsigned integer in little-endian format. This integer represents the total number of sectors logically replaced due to defects detected since the hard drive shipped. For example, if the raw data field is 000000000A00 in hexadecimal, the parsed number of logical block replacements is 10. Next, the system processes the current operating temperature value, extracting the actual temperature information from the 6-byte raw data field of "Temperature_Celsius" with SMART attribute ID 194. Typically, the lowest byte (Byte 0) of this raw value directly represents the current hard drive temperature in Celsius. For example, if the raw data field is XX XX XX XX XX 1F (where XX represents other information, such as the highest recorded temperature, the lowest recorded temperature, etc., and the specific byte allocation may vary depending on the hard disk manufacturer), the extracted 1F (hexadecimal) is converted to decimal 31, which means that the current operating temperature is 31 degrees Celsius. If the original temperature value of some hard disk models does not directly represent Celsius, for example, it may be an offset or Fahrenheit, the system will convert it according to the preset SMART data interpretation rules of the hard disk model. For example, if the original temperature value of a specific model hard disk is Fahrenheit F, it will be converted to Celsius temperature value to ensure that the final temperature is a value in Celsius. Through the above analysis and conversion, the reallocated sector count value is in a clear "unit", and the current operating temperature value is in the standard "degrees Celsius" unit, completing the unification of the physical quantity expression of the two parameters, thereby obtaining the standardized parameters of the mechanical hard disk operation status.

[0137] Based on the standardized parameters of the mechanical hard disk operation status obtained in the previous stage, which already include the reallocated sector count value (integer in units of "pieces") and the current operating temperature value (in degrees Celsius) of the specific hard disk after parsing and unit unification, the system then performs a combination operation to integrate these two key health indicators into an indicator set associated with a specific hard disk device. The specific operation is that the system uses the unique identifier of the hard disk (for example, the hard disk serial number, which is recorded when the original data is obtained) as the primary key to create a data structure. The data structure contains two clearly named fields, one for storing the standardized reallocated sector count value, and the other for storing the standardized current Operating temperature value. For example, for a hard disk with serial number "SN_XYZ123", if its standardized reallocated sector count is 10 and the current operating temperature is 31 degrees Celsius, the combined indicator set can be expressed as {"hard disk serial number": "SN_XYZ123", "reallocated sector count value": 10, "current operating temperature value": 31}. This process does not involve further calculation or transformation of the values ​​themselves. It only brings two independent standardized parameters into the same device context to form a comprehensive data record that can comprehensively reflect the current key health status of the mechanical hard disk. This combined data record is the key health data of the medium, which provides direct input for subsequent health status level assessment.

[0138] The steps to obtain the current health status of the storage medium are as follows:

[0139] Extract the current reallocated sector count, current operating temperature, device continuous operation time, and average number of read errors in the past month from key media health data to generate a basic parameter set for determining storage media health.

[0140] Calculate the storage medium health rating based on the storage medium health judgment basic parameter set. The calculation formula is:

[0141]

[0142] Among them, H d Represents the health rating value of the storage medium (dimensionless), Z d Indicates the reallocated sector count value of the current device (unit: piece), Z ref Indicates the preset reference upper limit of sector count (unit: piece), T d Indicates the current operating temperature of the device (unit: °C), T ref Indicates the recommended operating temperature standard value (unit: °C), E d Indicates the average number of read errors in the last month (unit: times), E refIndicates the reference upper limit of the number of read errors (unit: times), U d Indicates the continuous operation time of the current device (unit: hours), U max Indicates the maximum safe operating time of the equipment (unit: hours);

[0143] Based on the health grade score of the storage medium, a health status grade judgment rule is set to generate the current health status grade of the storage medium.

[0144] Specifically, from the key health data of the medium (the data generated in the previous step already contains the reallocated sector count value and the current operating temperature value of the specific hard disk), the system first extracts two known parameters: the reallocated sector count value of the current device (Z d ) and the current operating temperature of the device (T d ), then, in order to build a complete set of basic parameters for determining the health of storage media, the system also needs to obtain two other key SMART attribute information. The first is the continuous operation time of the device (U d ), by sending SMART commands to the hard disk (such as the "READ DATA" command B0h, subcommand D8h in the ATA / ATAPI command set), reading and parsing the "Power-On Hours" attribute with SMART attribute ID 9, its 6-byte raw data field (Raw Value) usually directly represents the cumulative number of hours the device has been powered on since leaving the factory. The system extracts this raw value as U d For example, if the original value is 000000003A 98 (little endian), it means U d = 15000 hours, the second item is the average number of read errors in the last month (E d ), this parameter needs to be calculated by periodically monitoring the raw value of the SMART attribute ID 1 "Raw Read Error Rate" (usually the first two bytes represent the error rate, and the last four bytes represent the total number of reads or error counts. For specific analysis, please refer to the hard disk manufacturer's documentation) or the raw value change of ID 195 "Hardware ECC Recovered". The system records the raw cumulative value of the selected error count attribute once a day, calculates the number of new errors each day (the cumulative value of the current day minus the cumulative value of the previous day), and accumulates the daily number of new errors in the past 30 days, and then divides it by 30 to obtain the daily average number of read errors as E d For example, if there are 150 new read errors in the past 30 days, then E d=150 / 30=5 times. After obtaining and organizing the current reallocated sector count, current operating temperature, device continuous operation time, and average number of read errors in the past month, the system combines them with the corresponding hard disk device identifier and current timestamp to form a basic parameter set for determining storage media health.

[0145] formula: The benefit of the formula is that it combines multiple SMART parameters reflecting different aging and risk dimensions of mechanical hard disks into a single health level score value H through a normalized mathematical model. d The scoring value ranges from 0 to 1, which is convenient for intuitive judgment and subsequent classification. The formula cleverly combines the sector defect (Z d / Z ref )、Operating temperature deviation(|T d -T ref | / T ref ), read error accumulation (E d / E ref ) and length of service (U d / U max ) four key aspects. Each aspect is normalized by its ratio to its upper reference limit or recommended value, allowing parameters of different dimensions and properties to reasonably work together in the final score. The use of square roots smooths the combined impact of various risk indicators to a certain extent, preventing extreme fluctuations in a single indicator from excessively dominating the scoring results. The 1 / (1+X) structure maps a non-negative comprehensive risk index (i.e., the expression within the square root) to a decreasing function representing health. That is, the higher the risk, the lower the health score. This design enables the health score to have a certain level of early warning capability for potential hard drive failures.

[0146] Z d The parameter acquisition step is as follows: this parameter represents the reallocated sector count value of the current device, in units of "units". This data comes from the record of the corresponding hard disk in the "Basic Parameter Set for Storage Medium Health Judgment" generated in the previous step. Its raw data is obtained by reading and parsing the 6-byte raw data field (Raw Value) of the "Reallocated Sectors Count" with the SMART attribute ID of 5. This raw value directly represents the number of bad sectors that have been replaced. For example, in the previous round of data collection, the reallocated sector count value of a hard disk was recorded as 10, then in this calculation, Z d =10.

[0147] Z refThe steps to obtain the parameter are as follows: this parameter represents the preset reference upper limit of sector count, in units of "units". This is a preset threshold used to evaluate the severity of the current number of reallocated sectors. Its setting is mainly based on the recommended thresholds for hard drive life expectancy and SMART attributes in the technical specification documents provided by the hard drive manufacturer, and combined with statistical analysis of large-scale failure data of hard drives of the same or similar models in actual operating environments. For example, analysis shows that when the number of reallocated sectors exceeds 100, the failure risk of the hard drive increases significantly, and most manufacturers recommend that the hard drive should be replaced at this time. Therefore, Z can be set. ref =100 pieces.

[0148] T d The parameter acquisition steps are as follows: This parameter represents the current operating temperature value of the device in degrees Celsius (℃). This data comes from the "Basic Parameter Set for Storage Media Health Judgment". Its original data is obtained by reading and parsing the original data field of "Temperature_Celsius" with the SMART attribute ID of 194. Usually, the least significant byte of the original value of this attribute is the current Celsius temperature. For example, in the previous round of data collection, the current operating temperature value of a hard disk was recorded as 31℃. In this calculation, T d =31℃.

[0149] T ref The steps to obtain the parameter are as follows: this parameter represents the recommended operating temperature standard value in degrees Celsius (℃). This is a preset ideal operating temperature point or the center point of the range. Its setting is based on the optimal operating temperature range recommended by the hard disk manufacturer. According to the hard disk specification, the recommended operating temperature range of most mechanical hard disks is 25℃ to 45℃. To obtain a specific reference point, the median value of this range or a generally considered better value can be taken. For example, considering the heat dissipation conditions and energy consumption balance, the recommended operating temperature standard value T is set. ref =35℃.

[0150] E dThe steps for obtaining the parameter are as follows: this parameter represents the average number of read errors in the past month, in units of "times" (specifically, the average number of errors occurring per day). This data comes from the "Basic Parameter Set for Storage Media Health Judgment". Its calculation method is as follows: the system regularly collects the raw value of the "Raw Read Error Rate" with the SMART attribute ID 1 every day. A specific byte of this raw value (for example, for some Seagate hard drives, the upper two bytes of the raw value may represent the error count) represents the cumulative number of read error events. The number of new errors added each day is calculated (the cumulative value of the current day minus the cumulative value of the previous day), and the cumulative number of all new errors in the past 30 days is divided by 30. For example, if a hard drive has a total of 150 new read error events monitored and accumulated using the above method in the past 30 days, then E d =150 / 30=5 times.

[0151] E ref The steps for obtaining the parameter are as follows: this parameter represents the reference upper limit of the number of read errors, with the unit of "times" (also refers to the average number of errors occurring per day). This is a preset threshold used to measure the risk level of the current read error rate. Its setting can refer to the SMART attribute threshold information provided by the hard disk manufacturer, or based on the statistical analysis of the correlation between error rate and failure in the long-term operation of a large number of similar hard disks. For example, if the statistical data shows that the average number of read errors per day exceeds 50 times, the probability of hard disk failure increases significantly, then E can be set. ref =50 times.

[0152] U d The parameter acquisition steps are as follows: This parameter represents the continuous operation time of the current device in hours. This data comes from the "Basic Parameter Set for Storage Media Health Judgment". Its original data is obtained by reading the 6-byte original data field of "Power-On Hours" with SMART attribute ID 9. This original value directly represents the cumulative power-on time of the hard disk since it was enabled. For example, if the original value of the SMART attribute of a hard disk is 15000, then U d =15000 hours.

[0153] U max The steps to obtain the parameter are as follows: This parameter represents the maximum safe operating time of the device, in hours. This is a reference value based on the hard drive's design life or manufacturer's recommendation, representing the theoretical maximum operating time of the hard drive before the expected failure rate increases significantly. Usually, you can refer to the hard drive's product specification to obtain its mean time between failures (MTBF) or designed service life (for example, enterprise-class hard drives are usually designed for 5 years of continuous operation). For example, if a certain model of hard drive has a design life of 5 years, calculated based on 365 days a year and 24 hours a day, then Umax =5×365×24=43800 hours.

[0154] Calculation process:

[0155] Now we evaluate the health level H for a specific hard disk device d. d Calculate the value of the example set in the previous parameter acquisition steps:

[0156] Z d =10;

[0157] Z ref =100;

[0158] T d =31℃;

[0159] T ref =35℃;

[0160] E d =5 times;

[0161] E ref =50 times;

[0162] U d =15000 hours;

[0163] U max =43800 hours;

[0164] The calculation process is as follows:

[0165] Calculate the components of the first term (the term related to sector and temperature): Sector and temperature correlation terms:

[0166] Calculate the components of the second term (error and duration correlation term): Error and duration correlation items:

[0167] Calculate the value inside the square root (the square of the comprehensive risk index): inside value = 0.01142857 + 0.03424657 = 0.04567514;

[0168] Calculate the square root:

[0169] Calculate the denominator:

[0170] Calculate the health grade score H d :

[0171] The result shows that for the selected hard disk device, the calculated health level score value H d The value is approximately 0.8239. This score is between 0 and 1. The closer the value is to 1, the healthier the hard drive is, and the closer the value is to 0, the worse the condition is.

[0172] Based on the health rating value H of the storage medium calculated in the previous stage d , such as H obtained in the above example d ≈0.8239, the system will then assign a clear health status level to the storage medium (hard disk) based on the preset health status level judgment rules. These judgment rules are to d The score is mapped to a discrete, easy-to-understand health description level. The setting of the rules usually takes into account the balance between the sensitivity of hard disk failure prevention and the false alarm rate, and may refer to industry practices or thresholds derived from a large amount of historical data analysis. For example, a set of health status level judgment rules can be defined as follows: Rule 1: If H d If the value is greater than or equal to 0.80, the current health status of the storage medium is judged to be "healthy"; Rule 2: If H d If the value is less than 0.80 but greater than or equal to 0.50, it is judged as "sub-health"; Rule 3, if H d If the value is less than 0.50, it is considered "abnormal". The specific thresholds, such as 0.80 and 0.50, are determined by the following process: First, a large amount of hard disk SMART data and corresponding H d The calculated values ​​and the historical data sets of the subsequent actual operating status of these hard drives (whether a failure occurred, when the failure occurred, etc.) are used. Secondly, statistical analysis methods such as ROC curve analysis or decision tree algorithm are used to find H that can better distinguish different health expectations (for example, low, medium, and high failure probability within the next month). d The split point is determined by referring to the operation and maintenance experience and the management requirements for measures to be taken under different levels of status (such as regular monitoring under "healthy" status, strengthening monitoring and preparing contingency plans under "sub-healthy" status, and immediate alarm and replacement arrangements under "abnormal" status). This rule is applied to H in the example. d ≈0.8239. Since 0.8239 is greater than or equal to 0.80, the current health status level of the hard disk will be judged as "healthy". The system finally outputs this "healthy" level as the evaluation conclusion of the current health status of the storage medium.

[0173] The steps to obtain data protection operation decisions are:

[0174] Based on the current health status level of the storage medium, the level label corresponding to the health status level is called, and a logical judgment is performed on the level label value to identify whether it belongs to the three states of healthy, sub-healthy or abnormal, and generate a health status level judgment result;

[0175] According to the health status level judgment result, the judgment condition is set to meet the start condition when the level label is equal to sub-health or abnormal state. If the condition is met, it is marked as "protection needs to be started", otherwise it is marked as "no protection needed" and the data protection start flag is obtained;

[0176] Based on the data protection startup identifier, the corresponding control instruction is generated, and a data protection execution request is issued when the identifier is "protection needs to be started". No operation instruction is generated when the identifier is "no protection needs to be started", forming a data protection operation decision.

[0177] Specifically, based on the current health status level of the storage medium, the level is the health level score value H of the storage medium in the previous step. d Compared with the preset judgment rules (for example, H d ≥0.8 is "healthy", 0.5≤H d <0.8 is "sub-health", H d <0.5 is "abnormal"), the system first retrieves the level label corresponding to the health status level assigned to the specific storage medium. For example, for the medium with the hard disk serial number "SN_XYZ123", its current health status level label may be one of "healthy", "sub-healthy" or "abnormal". Then, the system performs strict logical judgment on the obtained level label value. The specific operation is to compare the level label with an internal predefined set containing all possible valid states (that is, containing the three standard strings of "healthy", "sub-healthy" and "abnormal"). If the level label is "healthy", the system recognizes that it completely matches the "healthy" in the predefined state set. " item. If the level label is "sub-healthy", it matches the "sub-healthy" item; if it is "abnormal", it matches the "abnormal" item. The purpose of this logical judgment is to confirm the validity of the current level label and classify it into one of these three clear states. If the input level label does not belong to any of the three predefined states (for example, an unknown label appears due to data corruption or configuration error), the system will record an error or warning event and may default it to the most conservative state, such as "abnormal", according to the preset fault-tolerant logic. However, under normal processes, the level label will be accurately identified as one of "healthy", "sub-healthy" or "abnormal", and this identification result is the generated health status level judgment result.

[0178] According to the health status level judgment result generated in the previous step, the result clearly indicates whether the current storage medium is in a "healthy", "sub-healthy" or "abnormal" state. The system then decides whether to start the data protection mechanism based on a preset judgment condition. This judgment condition is fixedly set to: when the health status level judgment result of the storage medium is "sub-healthy" or "abnormal", the data protection startup condition is met. During the specific execution, the system will obtain the health status level judgment result (for example, "healthy", "sub-healthy" or "abnormal") and the two trigger condition strings "sub-healthy" and "abnormal" to perform a logical OR (OR) operation. ) comparison, if the health status level judgment result is equal to "sub-healthy", the start condition is met; if the health status level judgment result is equal to "abnormal", the start condition is also met. In these two cases, when the conditions are met, the system will generate a mark for the storage medium, and its value is "need to start protection". On the contrary, if the health status level judgment result is "healthy", the level is neither equal to "sub-healthy" nor equal to "abnormal", so the preset start condition is not met. At this time, the system will generate a mark for the storage medium, and its value is "no protection required". For example, if the health status level judgment result obtained in the previous step is "healthy" (based on H d ≈0.8239), the system determines that it does not meet the "sub-healthy" or "abnormal" conditions and marks it as "no protection required". If the health status of another hard drive is judged as "sub-healthy", the system determines that it meets the startup conditions and marks it as "protection required". This "protection required" or "no protection required" mark is the obtained data protection startup identifier.

[0179] Based on the data protection startup identifier obtained in the previous stage, the identifier clearly indicates whether the current storage medium is "protection needs to be started" or "no protection needs to be started". The system generates corresponding control instructions and executes subsequent operations accordingly. The specific execution process is that the system first checks the value of the data protection startup identifier. If the identifier is "protection needs to be started", it indicates that the health status of the current storage medium has deteriorated to the warning (sub-health) or danger (abnormal) level. At this time, the system will actively generate a data protection execution request. The request is a structured instruction that at least contains the unique identifier of the target storage medium (for example, the hard disk serial number "SN_ABC789"), the current health status level (for example, "sub-health"), and the requested operation type (for example, "execute customized redundant coding"). This data protection execution request The request is then sent to the system's data protection subsystem or designated processing flow, for example, through an internal application program interface (API) call, or by publishing an event to a dedicated message queue to trigger subsequent data redundancy enhancement operations. Conversely, if the data protection startup flag is "no protection required", it indicates that the current storage medium is in good health and has not met the conditions for triggering active data protection measures. In this case, the system will not generate any data protection-related operation instructions or execution requests for this storage medium, and may only record information that a routine health check has passed. In this way, the system will either initiate a specific data protection action or remain silent according to the clear instructions of the data protection startup flag. This series of operations or no-operation decision sets form the final data protection operation decision.

[0180] The steps to obtain a copy of the enhanced protection medical data are:

[0181] Based on the data protection operation decision and the customized erasure code configuration scheme, determine whether the data protection operation decision is "protection needs to be started". If it is "protection needs to be started", call the parameters of the number of erasure code data blocks and the number of check blocks for each unit in the customized erasure code configuration scheme, establish a redundant coding task configuration list, and generate a DICOM image file redundant coding initialization instruction set;

[0182] According to the DICOM image file redundant coding initialization instruction set, the file header area and pixel data area of ​​each DICOM image file are read in sequence, the corresponding area data is fragmented according to the configured number of erasure code data blocks and check blocks, and each data fragment is filled into the corresponding data block of the erasure code structure. The erasure code encoding function is executed and the output is verified to generate the DICOM image file redundant coding fragment result set;

[0183] Based on the redundant coding fragment result set of DICOM image files, all fragment results are combined and packaged according to the file structure index. After the packaging is completed, verification metadata is added to the file copy to generate an enhanced protection medical data copy.

[0184] Specifically, based on the data protection operation decision (the decision indicates whether to perform data protection for a specific storage medium, such as "protection is required" or "no protection is required") and the customized erasure code configuration scheme (the scheme predefines the corresponding number of erasure code data blocks K for each protectable data unit in the system, such as the file header area or pixel data area of ​​a DICOM file), u and the number of check blocks M u ), the system first determines the data protection operation decision of the specified storage medium. If the decision is clearly "protection needs to be started", the system will proceed further. It will call the previously generated customized erasure code configuration scheme and parse each defined data unit for each DICOM image file to be protected stored on the medium (for example, the file header part is regarded as one unit and the pixel data part is regarded as another unit). It will find and extract the number of erasure code data blocks corresponding to each of these units from the configuration scheme. u Sum check block number M u Parameters, then the system creates a detailed redundant coding task entry for each data unit based on these extracted parameters, which contains at least the unit's unique identifier, the unit's position in the original DICOM file (e.g., byte offset and length), the K u Value and M u All these task entries for all DICOM files to be protected and their units on a single storage medium are summarized to form a redundant coding task configuration list, which constitutes a specific instruction set for the upcoming redundant coding operation, namely the DICOM image file redundant coding initialization instruction set.

[0185] According to the DICOM image file redundant encoding initialization instruction set generated in the previous step, the instruction set contains the encoding configuration (K) for each specified data unit (such as file header area, pixel data area) within each DICOM image file to be protected. u and M u Parameters), the system will process each encoding task in the instruction set in sequence. For each task, the system first accurately reads the complete binary data stream of the corresponding area from the original DICOM image file according to the unit position information provided in the task. After obtaining the original data of the area, the system will process the erasure code data block number K configured. u Perform sharding on this original data, that is, split the continuous data stream into K u If the original data length cannot be K u If the last data fragment is divisible by 0, the predefined padding bytes (for example, 0x00) will be used to fill it up to the same size as the other fragments, ensuring that all Ku The length of the K data fragments is the same, and each such data fragment is regarded as a data block in the erasure code structure. Next, the system u data blocks as input, calling a pre-selected erasure coding function (for example, an implementation library based on the Reed-Solomon algorithm), and passing in the configured number of check blocks M u , after the encoding function is executed, M will be generated u check blocks, which are the same as the original K u The data blocks together constitute the erasure code set of the data unit. Subsequently, the system verifies the output of the encoding process, for example, whether the encoding function returns a successful status and whether the number of generated check blocks is the same as the expected M. u The generated data blocks and check blocks can be optionally calculated and checked (such as CRC32 or SHA-256) for subsequent integrity checks. After the encoding and verification of a single data area is completed, the generated K u data blocks and M u The check blocks (i.e., coding segments) are collected. When all tasks in the instruction set are processed, the collection of these coding segments constitutes the redundant coding segment result set of the DICOM image file.

[0186] Based on the redundant coded fragment result set of the DICOM image file, the result set contains all data fragments and check fragments generated from different areas of each DICOM image file (such as the file header area and the pixel data area) after erasure coding. The system then organizes and encapsulates these fragments. Specifically, the system manages these fragments according to a preset file structure index scheme. The index scheme ensures that each fragment can be uniquely associated with the specific area of ​​its original DICOM file and its logical position in the erasure code encoding structure (for example, the i-th data block or the j-th check block). The fragment itself may be stored in different physical locations or logical containers, but this index can completely reconstruct the logical view of the protected file. The combination and encapsulation process is to integrate and manage these scattered fragments together with their index information to form a logical file copy representation. After the storage and index information of all fragments are recorded, the system will attach a set of check metadata to this logical file copy. This set of metadata is crucial and contains at least: the unique identifier of the original DICOM file, the specific erasure code parameters used to protect each area (i.e., K u and M uThe value of ), the type of erasure coding algorithm used (for example, "Reed-Solomon"), the checksum of the original file or its regions before encoding (for example, the hash value calculated using the SHA-256 algorithm), the checksum of each data fragment and checksum fragment, the timestamp of the encoding operation, and the necessary explanatory information for explaining the fragment organization structure and recovery process. These checksum meta-information, together with the encoded fragments and their indexes, constitute the final enhanced protection medical data copy.

[0187] The above are merely preferred embodiments of the present invention and do not limit the present invention in any other form. Any technician familiar with the profession may use the technical content disclosed above to change or modify it into an equivalent embodiment with equivalent changes and apply it to other fields. However, any simple modification, equivalent change and modification made to the above embodiment based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.

Claims

1. A method for redundancy protection of medical detection data, characterized in that: The following steps are involved: The DICOM image file is sequentially read in byte stream to locate the file header area and the pixel data area, the file header area is determined to be of high importance and the pixel data area is of medium importance, and the medical data hierarchical unit information is established; Based on the importance level of each unit in the medical data hierarchical unit information, a unit target redundancy level is obtained; based on the unit target redundancy level, the number of erasure code data blocks and the number of check blocks corresponding to each unit are calculated to form a customized erasure code configuration scheme; Reading a reallocated sector count value and a current operating temperature value from a mechanical hard disk storage medium to obtain key health data of the medium, and determining a current health status level of the storage medium based on the key health data of the medium; Based on the current health status level of the storage medium, determine whether to generate a data protection startup instruction, obtain a data protection operation decision, and based on the data protection operation decision and the customized erasure code configuration scheme, perform redundant encoding on the DICOM image file to generate an enhanced protection medical data copy.

2. The medical test data redundancy protection method according to claim 1, characterized in that: The steps for obtaining the medical data classification unit information are as follows: Read the DICOM image file in sequential byte stream, analyze the tag structure in the byte stream byte by byte, determine the starting position of each data element in the DICOM image file, and form data element positioning information; Based on the data element location information, parsing the file header area and the pixel data area in the data element location information, determining that the elements belonging to the meta information in the data element location information are the file header area, and the elements belonging to the image information are the pixel data area, and generating a region division result; Based on the region division result, it is determined that the elements belonging to the file header region in the region division result are high-importance units, and the elements belonging to the pixel data region are medium-importance units, thereby forming medical data hierarchical unit information.

3. The medical test data redundancy protection method according to claim 1, characterized in that: The steps for obtaining the unit target redundancy level are: Parsing all units in the medical data hierarchical unit information, calling the average stable transmission time, maximum delay time, average access frequency, data hierarchy depth and delay log of each unit, calculating the average value of each record in the delay log to form an average delay time, and collating the average stable transmission time, maximum delay time, average delay time, average access frequency and data hierarchy depth corresponding to all units to obtain a five-indicator statistical table; Calculate the redundancy level value of each unit according to the five-indicator statistical table; According to the redundancy level value, the redundancy level value corresponding to the high importance unit is extracted as the first redundancy coefficient, and the redundancy level value corresponding to the medium importance unit is extracted as the second redundancy coefficient to generate the unit target redundancy level.

4. The medical test data redundancy protection method according to claim 1, characterized in that: The steps for obtaining the customized erasure code configuration scheme are as follows: Based on the unit target redundancy level, parsing the redundancy level value of each unit, retrieving the original data volume and maximum allowable recovery time of the corresponding unit, and forming a unit coding configuration input set; Calculating the number of erasure code data blocks and the number of check blocks according to the unit coding configuration input set; Based on the number of erasure code data blocks and the number of check blocks, an erasure code parameter combination for each unit is constructed, and all units are combined and merged to generate a customized erasure code configuration scheme.

5. The medical test data redundancy protection method according to claim 1, characterized in that: The steps for obtaining the key health data of the medium are: Reading a status attribute table through an interface of a mechanical hard disk storage medium, extracting a data field value corresponding to a reallocated sector count and a data field value corresponding to a current operating temperature in the status attribute table, recording them as the reallocated sector count value and the current operating temperature value, respectively, to generate raw data on the mechanical hard disk operation status; Analyzing the number of logical block replacements reflected by the reallocated sector count value based on the raw data of the mechanical hard disk operation status, and converting the current operating temperature value into a corresponding Celsius temperature value, unifying the physical quantity expressions of the two parameters, and obtaining a standardized parameter of the mechanical hard disk operation status; Based on the standardized parameters of the mechanical hard disk operation status, the reallocated sector count value and the current operating temperature value are combined as an indicator set of the same device dimension to generate medium key health data.

6. The medical test data redundancy protection method according to claim 1, characterized in that: The steps for obtaining the current health status level of the storage medium are: Extracting the current reallocated sector count value, the current operating temperature value, the continuous operation time of the device, and the average number of read errors in the last month from the key health data of the medium to generate a basic parameter set for determining the health of the storage medium; Calculating a health grade score of the storage medium based on the storage medium health judgment basic parameter set; Based on the health grade score of the storage medium, a health status grade judgment rule is set to generate the current health status grade of the storage medium.

7. The medical test data redundancy protection method according to claim 1, characterized in that: The steps for obtaining the data protection operation decision are: Based on the current health status level of the storage medium, calling the level label corresponding to the health status level, performing logical judgment on the level label value, identifying whether it belongs to the three states of healthy, sub-healthy or abnormal, and generating a health status level judgment result; According to the health status level judgment result, the judgment condition is set to meet the start condition when the level label is equal to sub-health or abnormal state. If the condition is met, it is marked as "protection needs to be started", otherwise it is marked as "no protection needed" to obtain the data protection start flag; Based on the data protection startup identifier, a corresponding control instruction is generated, and a data protection execution request is issued when the identifier is "protection needs to be started". No operation instruction is generated when the identifier is "no protection needs to be started", forming a data protection operation decision.

8. The medical test data redundancy protection method according to claim 1, characterized in that: The steps for obtaining the enhanced protection medical data copy are: Based on the data protection operation decision and the customized erasure code configuration scheme, determining whether the data protection operation decision is "protection needs to be enabled"; if so, calling the parameters for the number of erasure code data blocks and the number of check blocks for each unit in the customized erasure code configuration scheme, establishing a redundant encoding task configuration list, and generating a DICOM image file redundant encoding initialization instruction set; According to the DICOM image file redundant encoding initialization instruction set, the file header area and pixel data area of ​​each DICOM image file are sequentially read, the corresponding area data is fragmented according to the configured number of erasure code data blocks and the number of check blocks, and each data fragment is filled into the corresponding data block of the erasure code structure, the erasure code encoding function is executed and the output is verified to generate a DICOM image file redundant encoding fragment result set; Based on the redundant coding fragment result set of the DICOM image file, all fragment results are combined and packaged according to the file structure index. After the packaging is completed, verification meta-information is added to the file copy to generate an enhanced protection medical data copy.