CN111352591A - Medical image file storage method and device - Google Patents

Medical image file storage method and device Download PDF

Info

Publication number
CN111352591A
CN111352591A CN202010118981.5A CN202010118981A CN111352591A CN 111352591 A CN111352591 A CN 111352591A CN 202010118981 A CN202010118981 A CN 202010118981A CN 111352591 A CN111352591 A CN 111352591A
Authority
CN
China
Prior art keywords
file
medical image
stored
image file
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010118981.5A
Other languages
Chinese (zh)
Other versions
CN111352591B (en
Inventor
袁骏毅
汤钦华
侯晋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Chest Hospital
Original Assignee
Shanghai Chest Hospital
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Chest Hospital filed Critical Shanghai Chest Hospital
Priority to CN202010118981.5A priority Critical patent/CN111352591B/en
Publication of CN111352591A publication Critical patent/CN111352591A/en
Application granted granted Critical
Publication of CN111352591B publication Critical patent/CN111352591B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0685Hybrid storage combining heterogeneous device types, e.g. hierarchical storage, hybrid arrays
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H30/00ICT specially adapted for the handling or processing of medical images
    • G16H30/20ICT specially adapted for the handling or processing of medical images for handling medical images, e.g. DICOM, HL7 or PACS

Abstract

The invention aims to provide a method and equipment for storing a medical image file, and the method comprises the following steps: judging whether the file to be stored is a medical image file, and if the file to be stored is not the medical image file, storing the file to be stored in an HDD (hard disk drive); if the file to be stored is a medical image file, acquiring the current time and the creation time of the file to be stored, calculating a first difference obtained by subtracting the creation time of the stored file from the current time, judging whether the first difference is smaller than a preset first time threshold, and if the first difference is smaller than the preset time threshold, storing the medical image file in an SSD; and if the time is more than or equal to the preset time threshold, storing the medical image file into an HDD (hard disk drive). According to the invention, whether the medical image file is the medical image file or not and the time for creating the medical image file are judged, so that the SSD disk of the network storage system can be more effectively utilized for caching, and the access performance of the medical image file is improved.

Description

Medical image file storage method and device
Technical Field
The invention relates to the field of computers, in particular to a medical image file storage method and medical image file storage equipment.
Background
Network storage systems provide data and file storage services, and typical network file access protocols include NFS, CIFS, FTP, and the like. In order to improve performance, a Solid State Disk (SSD) is often used as a Disk (HDD) cache in a storage system to improve performance.
The SSD disk can be in the form of SATA, SAS, PCIe, NVMe and other interfaces. The read-write performance of the SSD is higher than that of a disk, but the capacity is smaller than that of a disk, and the cost is higher than that of a disk. By keeping frequently accessed data (also referred to as hot data) in a high-performance SSD and data that is accessed less frequently (referred to as cold data) in a Disk (HDD), the performance of the storage system can be increased efficiently at a lower cost.
Medical images are an important application area of network storage systems. Diagnostic images generated by the radiology, cardiovascular imaging and radiology diagnostic equipment need to be stored in a network storage device for diagnostic analysis. As medical imaging has become an important means for medical diagnosis, data of medical PACS images in various hospitals is rapidly increasing.
In a conventional network storage system, whether a file is held in an SSD or a disk is generally determined based on an access time attribute and an access frequency of the file. For example, a file that has been accessed recently, or a file that has been accessed recently with a relatively high frequency, is stored in the SSD. These existing methods have limitations in storing medical images in that:
large amounts of memory and CPU resources are consumed;
when a new set of network storage devices comes online, the migrated data volume will occupy most of the SSD cache, resulting in poor performance when accessing the files generated during the new check;
the access performance is low.
Disclosure of Invention
The invention aims to provide a medical image file storage method and equipment.
According to an aspect of the present invention, there is provided a method for storing a medical image file, the method including:
judging whether the file to be stored is a medical image file,
if the file to be stored is not a medical image file, storing the file to be stored in an HDD (hard disk drive);
if the file to be stored is a medical image file, acquiring the current time and the creation time of the file to be stored, calculating a first difference obtained by subtracting the creation time of the stored file from the current time, judging whether the first difference is smaller than a preset first time threshold value or not,
if the time is less than the preset time threshold, storing the medical image file into an SSD disc;
and if the time is more than or equal to the preset time threshold, storing the medical image file into an HDD (hard disk drive).
Further, in the method, determining whether the file to be stored is a medical image file includes:
determining whether the size of the file to be stored is greater than a preset size threshold,
if the size of the file to be stored is larger than a preset size threshold value, storing the file to be stored in an HDD (hard disk drive);
and if the size is smaller than or equal to the preset size threshold, judging whether the file to be stored is a medical image file.
Further, in the method, determining whether the file to be stored is a medical image file includes:
judging whether the file to be stored is a medical image file or not based on the extension of the file to be stored,
if the file can be determined, the file to be stored is a medical image file;
if the file can not be determined, judging whether the content of the file to be stored contains the flag bit of the medical image file,
if the flag bit exists, the file to be stored is a medical image file;
and if no flag bit exists, the file to be stored is not a medical image file.
Further, in the above method, after storing the medical image file in the SSD disk, the method further includes:
judging whether the current storage space amount of the SSD is higher than a preset storage space amount highest threshold value or not,
if yes, the following steps are executed:
sequentially traversing the files in the SSD, acquiring the current time and the creation time of the currently traversed files stored in the SSD, and calculating a second difference obtained by subtracting the creation time of the currently traversed files from the current time; if the second difference value corresponding to the currently traversed file is smaller than or equal to a preset second time threshold value, repeating the step; and if the second difference value corresponding to the currently traversed file is larger than a preset second time threshold, storing the currently traversed file to the HDD disk, deleting the file from the SSD disk, judging whether the current storage space amount of the SSD disk is lower than a preset minimum storage space amount threshold, and if not, repeating the step.
Further, in the above method, determining whether the current storage space amount of the SSD disk is higher than a preset maximum storage space amount threshold includes:
and judging whether the current storage space amount of the SSD is higher than a preset maximum storage space amount threshold or not and whether the current time is the idle time of the SSD or not.
Further, in the above method, after storing the file to be stored in an HDD disk, or storing the medical image file in an SSD disk, or storing the medical image file in an HDD disk, the method further includes:
acquiring a file reading request;
searching whether a file to be read is located on the SSD disk based on the file read request,
if yes, reading a file from the SSD disk;
if not, reading the file from the HDD disk.
According to another aspect of the present invention, there is also provided a medical image file storage apparatus, wherein the apparatus comprises:
a first device for judging whether the file to be stored is a medical image file,
a second means for storing the file to be stored in an HDD disk if the file to be stored is not a medical image file;
a third device, configured to, if the file to be stored is a medical image file, obtain a current time and a creation time of the file to be stored, calculate a first difference obtained by subtracting the creation time of the stored file from the current time, determine whether the first difference is smaller than a preset first time threshold,
the fourth device is used for storing the medical image file into an SSD if the medical image file is smaller than the preset time threshold;
and a fifth means for storing the medical image file in an HDD disk if the time is greater than or equal to the preset time threshold.
Further, in the above device, the first means is configured to determine whether a size of the file to be stored is greater than a preset size threshold, and if the size of the file to be stored is greater than the preset size threshold, store the file to be stored in the HDD disk; and if the size is smaller than or equal to the preset size threshold, judging whether the file to be stored is a medical image file.
Further, in the above apparatus, the first device is configured to determine whether the file to be stored is a medical image file based on the extension of the file to be stored, and if the file to be stored is a medical image file, the file to be stored is a medical image file; if the content of the file to be stored cannot be determined, judging whether the content of the file to be stored contains a flag bit of the medical image file, and if the content of the file to be stored contains the flag bit, judging that the file to be stored is the medical image file; and if no flag bit exists, the file to be stored is not a medical image file.
Further, the apparatus further includes a sixth device, configured to determine whether a current storage space amount of the SSD disk is higher than a preset maximum storage space amount threshold after the medical image file is stored in the SSD disk, and if so, execute a seventh device;
a seventh means for sequentially traversing the files in the SSD disk, obtaining a current time and a creation time of the currently traversed file stored in the SSD disk, and calculating a second difference obtained by subtracting the creation time of the currently traversed file from the current time; if the second difference value corresponding to the currently traversed file is smaller than or equal to a preset second time threshold, the seventh device is executed repeatedly; if the second difference value corresponding to the currently traversed file is greater than the preset second time threshold, storing the currently traversed file to the HDD disk, deleting the file from the SSD disk, and determining whether the current storage space amount of the SSD disk is lower than the preset minimum storage space amount threshold, otherwise, repeatedly executing the seventh apparatus.
Further, in the foregoing apparatus, the sixth device is further configured to determine whether the current storage space amount of the SSD disk is higher than a preset maximum storage space amount threshold and whether the current time is the idle time of the SSD disk.
Further, the above apparatus further includes: an eighth means for acquiring a file reading request after the file to be stored is stored in an HDD disk, or the medical image file is stored in an SSD disk, or the medical image file is stored in an HDD disk; searching whether a file to be read is located on the SSD disk or not based on the file reading request, and if so, reading the file from the SSD disk; if not, reading the file from the HDD disk.
According to another aspect of the present invention, there is also provided a computing-based device, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
judging whether the file to be stored is a medical image file,
if the file to be stored is not a medical image file, storing the file to be stored in an HDD (hard disk drive);
if the file to be stored is a medical image file, acquiring the current time and the creation time of the file to be stored, calculating a first difference obtained by subtracting the creation time of the stored file from the current time, judging whether the first difference is smaller than a preset first time threshold value or not,
if the time is less than the preset time threshold, storing the medical image file into an SSD disc;
and if the time is more than or equal to the preset time threshold, storing the medical image file into an HDD (hard disk drive).
According to another aspect of the present invention, there is also provided a computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
judging whether the file to be stored is a medical image file,
if the file to be stored is not a medical image file, storing the file to be stored in an HDD (hard disk drive);
if the file to be stored is a medical image file, acquiring the current time and the creation time of the file to be stored, calculating a first difference obtained by subtracting the creation time of the stored file from the current time, judging whether the first difference is smaller than a preset first time threshold value or not,
if the time is less than the preset time threshold, storing the medical image file into an SSD disc;
and if the time is more than or equal to the preset time threshold, storing the medical image file into an HDD (hard disk drive).
Compared with the prior art, the invention provides a method for storing the medical image file in the network storage system, and the SSD disk of the network storage system can be more effectively utilized for caching by judging whether the medical image file is the medical image file and the time of creating the medical image file, so that the access performance of the medical image file is improved.
Specifically, the invention judges whether the file to be stored is a medical image file, and if the file to be stored is not the medical image file, the file to be stored is stored in an HDD (hard disk drive);
if the file to be stored is a medical image file, acquiring the current time and the creation time of the file to be stored, calculating a first difference obtained by subtracting the creation time of the stored file from the current time, judging whether the first difference is smaller than a preset first time threshold value or not,
if the time is less than the preset time threshold, storing the medical image file into an SSD disc;
and if the time is more than or equal to the preset time threshold, storing the medical image file into an HDD (hard disk drive). The access frequency of a large number of files in a network storage system does not need to be monitored and counted in real time, and only the fact whether the files are medical image files and the time for creating the medical image files needs to be judged, so that a large amount of memory and CPU resources are prevented from being consumed;
in addition, the scheme only stores new files generated by new inspection into the SSD disk, when a set of new network storage equipment is online and the previous image files need to be copied or migrated from other storage equipment into the new storage equipment of the network storage system, because the migrated data amount is old files which are long in copying or migrating creation time and not new files, the scheme of directly storing the old files into the HDD disk is adopted, the old files cannot be stored into the SSD disk like the new files, and the access efficiency of the new files can be improved; the problem that when files with long creation time are copied or migrated as in the existing scheme, most SSD disk cache is occupied, so that the performance is low when newly checked files are accessed is solved;
in addition, the medical image file is characterized in that the medical image file can be frequently accessed within a period of time just after examination, but the access frequency is obviously reduced after a period of time, so that the file access efficiency can be improved by storing a new file generated by new examination into the SSD disk; instead of the existing network storage device, the new file is generally only stored in the HDD disk, and only when the file is accessed for multiple times, the file is stored in the SSD disk, which causes a problem that the newly created file needs to be read from the HDD disk, resulting in low access performance.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
FIG. 1 is a diagram illustrating a hardware architecture of a network storage system according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating an SSD cache structure of a network storage system according to an embodiment of the invention;
FIG. 3 illustrates a file write flow diagram according to an embodiment of the invention;
FIG. 4 illustrates a file read flow diagram according to an embodiment of the invention;
FIG. 5 illustrates an SSD data migration flow diagram of an embodiment of the invention.
The same or similar reference numbers in the drawings identify the same or similar elements.
Detailed Description
The present invention is described in further detail below with reference to the attached drawing figures.
In a typical configuration of the present application, the terminal, the device serving the network, and the trusted party each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
As shown in fig. 3, the present invention provides a method for storing a medical image file, including:
step S1, determining whether the file to be stored is a medical image file,
when receiving a file writing request, the network storage equipment judges the file type in real time and determines whether to write the file into the SSD disk or the HDD disk based on the file type;
the protocol gateway comprises DICOM, NFS, CIFS, FTP and the like and can receive a data write request from a client;
step S2, if the file to be stored is not a medical image file, storing the file to be stored in an HDD disc;
here, the storage device of the network storage system of the present invention may include a high performance Solid State Disk (SSD) and a large capacity mechanical hard disk (HDD);
step S3, if the file to be stored is a medical image file, acquiring the current time and the creation time of the file to be stored, calculating a first difference obtained by subtracting the creation time of the stored file from the current time, determining whether the first difference is smaller than a preset first time threshold,
here, the format of medical image files such as PACS image files conforms to the DICOM specification. The medical image file such as a DICOM file comprises a plurality of tags such as a Patient tag and a student tag, wherein the Patient tag records information such as the name and the birthday of a person to be inspected; the studio label records information such as examination number, examination date and time, and examination location, and the examination date and time in the studio label can be used as the creation time of the file.
The content of the medical image file can be read, for example, the study date field T representing the creation time in the medical image file can be obtainedfIn addition, the current time T of the system can be acquiredc
Step S4, if the time is less than the preset time threshold, the medical image file is stored in an SSD disc;
here, if Tc-TfIs less than a set threshold value TssdIf the file is newer, the file is written into the SSD;
and step S5, if the time is more than or equal to the preset time threshold, storing the medical image file into an HDD disk.
Here, if Tc-TfIs greater than or equal to a set threshold value TssdIf the file is older, the file is written to the HDD disk.
Medical image files such as PACS image files, which have characteristics different from other files in general, are characterized in that: a check may result in thousands of image files that are frequently accessed during the period of time that the check was just created, but the frequency of access is significantly reduced over time. Therefore, the invention can select the file to be stored in the SSD disk or the HDD disk according to the creation time of the file in the SSD disk.
The invention provides a method for storing medical image files in a network storage system, which can more effectively utilize an SSD (solid State disk) of the network storage system to cache and improve the access performance of the medical image files by judging whether the medical image files are the medical image files and the time of creating the medical image files.
Specifically, the access frequency of a large number of files in a network storage system does not need to be monitored and counted in real time, and only the fact whether the access frequency is a medical image file and the time for creating the medical image file needs to be judged, so that a large amount of memory and CPU resources are prevented from being consumed;
in addition, the scheme only stores new files generated by new inspection into the SSD disk, when a set of new network storage equipment is online and the previous image files need to be copied or migrated from other storage equipment into the new storage equipment of the network storage system, because the migrated data amount is old files which are long in copying or migrating creation time and not new files, the scheme of directly storing the old files into the HDD disk is adopted, the old files cannot be stored into the SSD disk like the new files, and the access efficiency of the new files can be improved; the problem that when files with long creation time are copied or migrated as in the existing scheme, most SSD disk cache is occupied, so that the performance is low when newly checked files are accessed is solved;
in addition, the medical image file is characterized in that the medical image file can be frequently accessed within a period of time just after examination, but the access frequency is obviously reduced after a period of time, so that the file access efficiency can be improved by storing a new file generated by new examination into the SSD disk; instead of the existing network storage device, the new file is generally only stored in the HDD disk, and only when the file is accessed for multiple times, the file is stored in the SSD disk, which causes a problem that the newly created file needs to be read from the HDD disk, resulting in low access performance.
In an embodiment of the present invention, a structure of a network storage device is shown in fig. 1. Including a CPU, memory DRAM, network interface cards, multiple mechanical disks (HDD disks), and SSD disks. The mechanical disks can be organized in a RAID mode, such as RAID5, RAID6 and the like, or can be in a single disk mode; the SSD disks may be organized in RAID mode, such as RAID5, RAID6, etc., or may be in single disk manner. Regardless of the manner in which the HDD disks and SSD disks are organized, the methods of embodiments of the present invention may be applicable.
In an embodiment of the present invention, a software architecture of a network storage device is shown in fig. 2. The network Storage device has a plurality of protocol gateways for supporting various network protocols, such as nfs (network File system), cifs (common internet File system), ftp (File Transfer protocol), S3(Simple Storage Service), dicom (digital Imaging and Communications in medicine), etc. And after receiving the data, the protocol gateway writes the data into a file system, and the file system writes the data into an HDD (hard disk drive) or an SSD (solid State disk).
As shown in fig. 3, in an embodiment of the method for storing a medical image file according to the present invention, the step S1 of determining whether the file to be stored is a medical image file includes:
step S111, judging whether the size of the file to be stored is larger than a preset size threshold value S,
here, medical image files such as PACS image files and the like, one file generally has a size of several hundreds KB to several MB, where the size of a file to be stored may be the size of a single file to be stored;
step S112, if the size is larger than a preset size threshold value, storing the file to be stored in an HDD (hard disk drive);
here, if the size of a file to be stored is larger than a set threshold S, the file is directly written to the HDD; otherwise, continuing the subsequent step;
in step S113, if the size is smaller than or equal to the preset size threshold, it is determined whether the file to be stored is a medical image file.
Here, since a medical image file such as a PACS image file is usually several hundreds KB to several MB in size, the present embodiment can efficiently and preliminarily separate the medical image file and the non-medical image file by determining the size of the file to be stored, which facilitates the rapid storage of the file.
As shown in fig. 3, in an embodiment of the method for storing a medical image file according to the present invention, the step S1 of determining whether the file to be stored is a medical image file includes:
step S121, judging whether the file to be stored can be determined to be a medical image file or not based on the extension name of the file to be stored,
when writing a file, judging whether the file type is a dcm type or a dicom type according to the extension name of the file;
step S122, if the file can be determined, the file to be stored is a medical image file;
step S123, if it can not be determined, determining whether the content of the file to be stored includes the flag bit of the medical image file,
in the case that whether the file to be stored is a medical image file cannot be determined according to the extension of the file, whether the file to be stored is a medical image file can be further determined according to the flag bits in the file content;
step S124, if the flag bit exists, the file to be stored is a medical image file;
here, the 4-byte content with the offset of the header of the medical image file being 128 bytes can be read, and if the content is "DICM", the file to be stored is judged to be the medical image file;
and if no flag bit exists, the file to be stored is not a medical image file.
Here, the network storage device, upon receiving a write file request, judges the file type in real time, identifies the file content, and decides whether to write the file to the SSD disk or the HDD disk based on the file type and the file content.
In particular, the format of medical image files, such as PACS image files, conforms to the DICOM specification. Wherein, the DICOM file includes: a 128-byte file preamble, a 4-byte DICOM prefix, file meta-information, and a plurality of data elements. The DICOM prefix is fixed to "DICM", and whether the file is a DICOM file can be determined according to whether the character string of the 4-byte marking bits is equal to "DICM". The DICOM file typically uses file extensions such as dcm, DICOM, etc.
When a file is written, whether the file type is a dcm or dicom type can be judged according to the extension name of the file, if so, the file to be stored is a medical image file; if the file type is not the file type, continuously reading 4-byte content with the offset of a header in the file content being 128 bytes, and if the read content is 'DICM', judging that the file type is DICOM, indicating that the file to be stored is a medical image file; otherwise, the file to be stored is not a medical image file and the file is written into the HDD disk.
In this embodiment, based on the extension and the flag bit of the file, whether the file is a medical image file can be efficiently and reliably determined.
As shown in fig. 5, in an embodiment of the method for storing a medical image file according to the present invention, after the step S4, the method further includes:
step S41, determining whether the current storage space amount of the SSD disk is higher than a preset storage space amount maximum threshold,
if yes, go to step S42;
step S42, traversing the files in the SSD disk in sequence, acquiring the current time and the creation time of the currently traversed files stored in the SSD disk, and calculating a second difference obtained by subtracting the creation time of the currently traversed files from the current time; if the second difference value corresponding to the currently traversed file is smaller than or equal to a preset second time threshold value, repeating the step; and if the second difference value corresponding to the currently traversed file is larger than a preset second time threshold, storing the currently traversed file to the HDD disk, deleting the file from the SSD disk, judging whether the current storage space amount of the SSD disk is lower than a preset minimum storage space amount threshold, and if not, repeating the step.
In this embodiment, in the method, when the current storage space amount of the SSD disk is higher than the preset maximum storage space amount threshold, selecting the file for migration starts, traversing the files in the SSD disk that are not traversed in sequence, selecting the file for migration according to the creation time of the file in the SSD disk, and stopping traversing and stopping migrating the file in the traversed SSD disk to the HDD disk when the current storage space amount of the SSD disk is lower than the preset minimum storage space amount threshold.
In order to avoid that enough residual storage space is always kept in the SSD disk in this embodiment, the file in the SSD disk may be periodically migrated to the HDD disk.
The network storage system needs to periodically move out the file in the SSD disk, and reserve a storage space for subsequent writing of the file. For a file selected to be migrated from an SSD disk, the file may first be copied from the SSD to the HDD disk, and then the file in the SSD disk is deleted.
In an embodiment of the method for storing a medical image file, in step S41, the determining whether the current storage space amount of the SSD disk is higher than a preset maximum storage space amount threshold includes:
and judging whether the current storage space amount of the SSD is higher than a preset maximum storage space amount threshold or not and whether the current time is the idle time of the SSD or not.
Here, when the current storage space amount of the SSD disk is higher than the preset maximum storage space amount threshold and the current time is the idle time of the SSD disk, the file in the SSD disk is migrated to the HDD disk, otherwise, the file migration operation is not performed, so that the migration operation can be avoided when the SSD disk is in the peak access, and the access performance of the SSD disk is prevented from being affected.
As shown in fig. 5, in an embodiment, the step of selecting and migrating the file in the SSD disk is as follows:
1) a typical way is to select the time of 0:00 to 5:00 a night every day as the idle time of the SSD disk, and periodically start the file migration cleaning task of the SSD disk at the idle time;
2) the storage space usage of the SSD disk is checked,
3) if the maximum storage space amount is lower than or equal to the preset maximum storage space amount threshold Rhigh,RhighA typical value may be 85% of the total amount of storage space of the SSD disk, then exit;
4) if the maximum storage space amount is higher than or equal to the preset maximum storage space amount threshold value RhighThen go through all files in the SSD disk, if the creation time T of the filecreateAnd the current time TCIs greater than a preset second time threshold TDelete,TDeleteA typical value may be 30 days, the second difference of migration is greater than a preset second time threshold TDeleteCorresponding file to HDD disk; wherein the content of the first and second substances,
in the traversal checking process, if the storage space utilization rate of the SSD is lower than a preset minimum storage space amount threshold Rlow,RlowA typical value may be 70%, the migration of files from the SSD disk to the HDD disk is stopped.
As shown in fig. 4, in an embodiment of the method for storing a medical image file according to the present invention, after storing the file to be stored in an HDD disk, or storing the medical image file in an SSD disk, or storing the medical image file in an HDD disk, the method further includes:
step S6, obtaining a file reading request;
step S7, searching whether the file to be read is located on the SSD disk based on the file reading request,
step S8, if yes, reading a file from the SSD disk;
and step S9, if not, reading the file from the HDD disk.
When receiving a request for reading a file sent by a client, the network storage system firstly searches whether the file exists in the SSD, reads the file from the SSD if the file to be read exists in the SSD, and otherwise reads the file from the HDD, and then returns the read file to the client.
In the embodiment, whether the file exists is firstly searched for by the SSD, if so, the file is read from the SSD, and if not, the file is read from the HDD, so that the searching and reading efficiency of the file can be improved.
In the present invention, a correlation threshold such as file size S, TssdThe modification does not affect the originality of the method, and the creation time of the file obtained by using other fields of the DICOM file does not affect the originality of the method.
According to another aspect of the present invention, there is also provided a medical image file storage apparatus, wherein the apparatus comprises:
a first device for judging whether the file to be stored is a medical image file,
a second means for storing the file to be stored in an HDD disk if the file to be stored is not a medical image file;
a third device, configured to, if the file to be stored is a medical image file, obtain a current time and a creation time of the file to be stored, calculate a first difference obtained by subtracting the creation time of the stored file from the current time, determine whether the first difference is smaller than a preset first time threshold,
the fourth device is used for storing the medical image file into an SSD if the medical image file is smaller than the preset time threshold;
and a fifth means for storing the medical image file in an HDD disk if the time is greater than or equal to the preset time threshold.
Further, in the above device, the first means is configured to determine whether a size of the file to be stored is greater than a preset size threshold, and if the size of the file to be stored is greater than the preset size threshold, store the file to be stored in the HDD disk; and if the size is smaller than or equal to the preset size threshold, judging whether the file to be stored is a medical image file.
Further, in the above apparatus, the first device is configured to determine whether the file to be stored is a medical image file based on the extension of the file to be stored, and if the file to be stored is a medical image file, the file to be stored is a medical image file; if the content of the file to be stored cannot be determined, judging whether the content of the file to be stored contains a flag bit of the medical image file, and if the content of the file to be stored contains the flag bit, judging that the file to be stored is the medical image file; and if no flag bit exists, the file to be stored is not a medical image file.
Further, the apparatus further includes a sixth device, configured to determine whether a current storage space amount of the SSD disk is higher than a preset maximum storage space amount threshold after the medical image file is stored in the SSD disk, and if so, execute a seventh device;
a seventh means for sequentially traversing the files in the SSD disk, obtaining a current time and a creation time of the currently traversed file stored in the SSD disk, and calculating a second difference obtained by subtracting the creation time of the currently traversed file from the current time; if the second difference value corresponding to the currently traversed file is smaller than or equal to a preset second time threshold value, the seventh device is executed repeatedly; if the second difference value corresponding to the currently traversed file is greater than the preset second time threshold, storing the currently traversed file to the HDD disk, deleting the file from the SSD disk, and determining whether the current storage space amount of the SSD disk is lower than the preset minimum storage space amount threshold, otherwise, repeatedly executing the seventh apparatus.
Further, in the foregoing apparatus, the sixth device is further configured to determine whether the current storage space amount of the SSD disk is higher than a preset maximum storage space amount threshold and whether the current time is the idle time of the SSD disk.
Further, the above apparatus further includes: an eighth means for acquiring a file reading request after the file to be stored is stored in an HDD disk, or the medical image file is stored in an SSD disk, or the medical image file is stored in an HDD disk; searching whether a file to be read is located on the SSD disk or not based on the file reading request, and if so, reading the file from the SSD disk; if not, reading the file from the HDD disk.
According to another aspect of the present invention, there is also provided a computing-based device, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
judging whether the file to be stored is a medical image file,
if the file to be stored is not a medical image file, storing the file to be stored in an HDD (hard disk drive);
if the file to be stored is a medical image file, acquiring the current time and the creation time of the file to be stored, calculating a first difference obtained by subtracting the creation time of the stored file from the current time, judging whether the first difference is smaller than a preset first time threshold value or not,
if the time is less than the preset time threshold, storing the medical image file into an SSD disc;
and if the time is more than or equal to the preset time threshold, storing the medical image file into an HDD (hard disk drive).
According to another aspect of the present invention, there is also provided a computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
judging whether the file to be stored is a medical image file,
if the file to be stored is not a medical image file, storing the file to be stored in an HDD (hard disk drive);
if the file to be stored is a medical image file, acquiring the current time and the creation time of the file to be stored, calculating a first difference obtained by subtracting the creation time of the stored file from the current time, judging whether the first difference is smaller than a preset first time threshold value or not,
if the time is less than the preset time threshold, storing the medical image file into an SSD disc;
and if the time is more than or equal to the preset time threshold, storing the medical image file into an HDD (hard disk drive).
The detailed content of the image implemented by each device of the present invention can be specifically referred to the corresponding parts of each method embodiment, and is not described herein again.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
It should be noted that the present invention may be implemented in software and/or in a combination of software and hardware, for example, as an Application Specific Integrated Circuit (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present invention may be executed by a processor to implement the steps or functions described above. Also, the software programs (including associated data structures) of the present invention can be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Further, some of the steps or functions of the present invention may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
In addition, some of the present invention can be applied as a computer program product, such as computer program instructions, which when executed by a computer, can invoke or provide the method and/or technical solution according to the present invention through the operation of the computer. Program instructions which invoke the methods of the present invention may be stored on a fixed or removable recording medium and/or transmitted via a data stream on a broadcast or other signal-bearing medium and/or stored within a working memory of a computer device operating in accordance with the program instructions. An embodiment according to the invention herein comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform a method and/or solution according to embodiments of the invention as described above.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.

Claims (9)

1. A medical image file storage method comprises the following steps:
judging whether the file to be stored is a medical image file,
if the file to be stored is not a medical image file, storing the file to be stored in an HDD (hard disk drive);
if the file to be stored is a medical image file, acquiring the current time and the creation time of the file to be stored, calculating a first difference obtained by subtracting the creation time of the stored file from the current time, judging whether the first difference is smaller than a preset first time threshold value or not,
if the time is less than the preset time threshold, storing the medical image file into an SSD disc;
and if the time is more than or equal to the preset time threshold, storing the medical image file into an HDD (hard disk drive).
2. The method for storing medical image files according to claim 1, wherein the step of determining whether the files to be stored are medical image files comprises:
determining whether the size of the file to be stored is greater than a preset size threshold,
if the size of the file to be stored is larger than a preset size threshold value, storing the file to be stored in an HDD (hard disk drive);
and if the size is smaller than or equal to the preset size threshold, judging whether the file to be stored is a medical image file.
3. The method for storing medical image files according to claim 1 or 2, wherein the step of judging whether the files to be stored are medical image files comprises the steps of:
judging whether the file to be stored is a medical image file or not based on the extension of the file to be stored,
if the file can be determined, the file to be stored is a medical image file;
if the file can not be determined, judging whether the content of the file to be stored contains the flag bit of the medical image file,
if the flag bit exists, the file to be stored is a medical image file;
and if no flag bit exists, the file to be stored is not a medical image file.
4. The method for storing medical image files according to claim 1, wherein after storing the medical image files in an SSD disk, further comprising:
judging whether the current storage space amount of the SSD is higher than a preset storage space amount highest threshold value or not,
if yes, the following steps are executed:
sequentially traversing the files in the SSD, acquiring the current time and the creation time of the currently traversed files stored in the SSD, and calculating a second difference obtained by subtracting the creation time of the currently traversed files from the current time; if the second difference value corresponding to the currently traversed file is smaller than or equal to a preset second time threshold value, repeating the step; and if the second difference value corresponding to the currently traversed file is larger than a preset second time threshold, storing the currently traversed file to the HDD disk, deleting the file from the SSD disk, judging whether the current storage space amount of the SSD disk is lower than a preset minimum storage space amount threshold, and if not, repeating the step.
5. The medical image file storage method according to claim 4, wherein the determining whether the current storage space amount of the SSD disk is higher than a preset storage space amount maximum threshold value comprises:
and judging whether the current storage space amount of the SSD is higher than a preset maximum storage space amount threshold or not and whether the current time is the idle time of the SSD or not.
6. The method for storing medical image files according to claim 1, wherein after storing the file to be stored in an HDD disk, or storing the medical image file in an SSD disk, or storing the medical image file in an HDD disk, further comprising:
acquiring a file reading request;
searching whether a file to be read is located on the SSD disk based on the file read request,
if yes, reading a file from the SSD disk;
if not, reading the file from the HDD disk.
7. A medical image file storage device, wherein the device comprises:
a first device for judging whether the file to be stored is a medical image file,
a second means for storing the file to be stored in an HDD disk if the file to be stored is not a medical image file;
a third device, configured to, if the file to be stored is a medical image file, obtain a current time and a creation time of the file to be stored, calculate a first difference obtained by subtracting the creation time of the stored file from the current time, determine whether the first difference is smaller than a preset first time threshold,
the fourth device is used for storing the medical image file into an SSD if the medical image file is smaller than the preset time threshold;
and a fifth means for storing the medical image file in an HDD disk if the time is greater than or equal to the preset time threshold.
8. A computing-based device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
judging whether the file to be stored is a medical image file,
if the file to be stored is not a medical image file, storing the file to be stored in an HDD (hard disk drive);
if the file to be stored is a medical image file, acquiring the current time and the creation time of the file to be stored, calculating a first difference obtained by subtracting the creation time of the stored file from the current time, judging whether the first difference is smaller than a preset first time threshold value or not,
if the time is less than the preset time threshold, storing the medical image file into an SSD disc;
and if the time is more than or equal to the preset time threshold, storing the medical image file into an HDD (hard disk drive).
9. A computer-readable storage medium having computer-executable instructions stored thereon, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
judging whether the file to be stored is a medical image file,
if the file to be stored is not a medical image file, storing the file to be stored in an HDD (hard disk drive);
if the file to be stored is a medical image file, acquiring the current time and the creation time of the file to be stored, calculating a first difference obtained by subtracting the creation time of the stored file from the current time, judging whether the first difference is smaller than a preset first time threshold value or not,
if the time is less than the preset time threshold, storing the medical image file into an SSD disc;
and if the time is more than or equal to the preset time threshold, storing the medical image file into an HDD (hard disk drive).
CN202010118981.5A 2020-02-26 2020-02-26 Medical image file storage method and device Active CN111352591B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010118981.5A CN111352591B (en) 2020-02-26 2020-02-26 Medical image file storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010118981.5A CN111352591B (en) 2020-02-26 2020-02-26 Medical image file storage method and device

Publications (2)

Publication Number Publication Date
CN111352591A true CN111352591A (en) 2020-06-30
CN111352591B CN111352591B (en) 2023-03-14

Family

ID=71192322

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010118981.5A Active CN111352591B (en) 2020-02-26 2020-02-26 Medical image file storage method and device

Country Status (1)

Country Link
CN (1) CN111352591B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2881854A1 (en) * 2012-08-03 2015-06-10 ZTE Corporation Storage method and apparatus for distributed file system
US20150242130A1 (en) * 2014-02-27 2015-08-27 National Chung Cheng University Multi-Threshold Storage Device and Method
CN109857339A (en) * 2019-01-10 2019-06-07 平安科技(深圳)有限公司 File memory method, device, computer equipment and storage medium
CN110209502A (en) * 2019-06-05 2019-09-06 北京奇艺世纪科技有限公司 A kind of information storage means, device, electronic equipment and storage medium
CN110647498A (en) * 2019-09-12 2020-01-03 浪潮电子信息产业股份有限公司 File storage method, device, equipment and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2881854A1 (en) * 2012-08-03 2015-06-10 ZTE Corporation Storage method and apparatus for distributed file system
US20150242130A1 (en) * 2014-02-27 2015-08-27 National Chung Cheng University Multi-Threshold Storage Device and Method
CN109857339A (en) * 2019-01-10 2019-06-07 平安科技(深圳)有限公司 File memory method, device, computer equipment and storage medium
CN110209502A (en) * 2019-06-05 2019-09-06 北京奇艺世纪科技有限公司 A kind of information storage means, device, electronic equipment and storage medium
CN110647498A (en) * 2019-09-12 2020-01-03 浪潮电子信息产业股份有限公司 File storage method, device, equipment and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
罗保山等: "混合存储数据迁移策略研究", 《计算机技术与发展》 *

Also Published As

Publication number Publication date
CN111352591B (en) 2023-03-14

Similar Documents

Publication Publication Date Title
US9250830B2 (en) Storing data across a plurality of storage nodes
US7716445B2 (en) Method and system for storing a sparse file using fill counts
KR102023351B1 (en) Method and apparatus for analyzing data to facilitate allocation in a storage device
KR101422557B1 (en) Predictive data-loader
US11048629B2 (en) Method, apparatus and computer program product for storing data
JP2012146301A (en) Method and system for executing increment sql server database backup
US7730358B2 (en) Stress testing method of file system
US7899989B2 (en) Method and system for using a block allocation policy
WO2021249201A1 (en) Monitoring data storage method and apparatus based on shingled magnetic recording disk
CN109804359A (en) For the system and method by write back data to storage equipment
US7512135B2 (en) Method for transferring data among a logical layer, physical layer, and storage device
US20120226858A1 (en) Method for managing hierarchical storage during detection of sensitive information, computer readable storage media and system utilizing same
US11385823B2 (en) Method, electronic device and computer program product for rebuilding disk array
US20140244582A1 (en) Apparatus and Methods for Selective Location and Duplication of Relevant Data
CN111666044A (en) Method for accessing shingled magnetic recording SMR hard disk and server
TWI302298B (en) Recordable record carrier having a user area, recording apparatus and method for recording information on recordable record carrier having a user area, and computer readable medium
US20070106868A1 (en) Method and system for latency-directed block allocation
US6910038B1 (en) Methods for efficient host processing of data files selected for recording to an optical disc media
US8745053B2 (en) Method for managing mainframe overhead during detection of sensitive information, computer readable storage media and system utilizing same
CN111352591B (en) Medical image file storage method and device
US10949359B2 (en) Optimizing cache performance with probabilistic model
CN115576722A (en) Disk IO (input/output) query method and device
US20180025015A1 (en) Estimating mount time completion in file systems
EP3674876A1 (en) System and method of deletion of files and counteracting their restoration
CN112783711A (en) Method and storage medium for analyzing program memory on NodeJS

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant