Summary of the invention
The problem that the present invention solves is to provide a kind of storage system of medical image data, unsteadiness when storing massive medical data and inefficient problem can not only be solved, also for medical institutions provide efficient, safe massive medical image store and access services.
In order to solve the problem, the invention provides a kind of storage system of medical image data, comprise image store layer, the metadata layer be connected with described image store layer and the application client end layer be connected with described metadata layer, wherein, described image store layer comprises multiple image store node, containing multiple image data block in described image store node.
The storage system of a kind of medical image data described above, wherein, user stores/reads described medical image data by described image store node.
The storage system of a kind of medical image data described above, wherein, described image store node has dynamic capacity-expanding mechanism.
The storage system of a kind of medical image data described above, wherein, described image data block comprises all medical image datas that patient's single checks.
The storage system of a kind of medical image data described above, wherein, distributes described image data block according to the principle of copy redundancy.
The storage system of a kind of medical image data described above, wherein, described metadata layer comprises multiple metadata node, and described metadata node is for the treatment of the request of described application client end layer and distribution/obtain described medical image data.
The storage system of a kind of medical image data described above, wherein, according to the loading condition of network nearby principle and described image store node, distributes described medical image data.
The storage system of a kind of medical image data described above, wherein, described metadata node comprises main metadata node and from metadata node.
The storage system of a kind of medical image data described above, wherein, the metadata in described metadata node is the mapping of described image data block.
The storage system of a kind of medical image data described above, wherein, described meta-data pack contains patient ID, image sequence ID, the size of described image data block and the node listing at backup number and described image data block place and path.
Compared with prior art, the present invention take image data block as minimum memory unit, because the read-write heads fixture of minimum memory unit has atomicity, therefore, reduce the complexity of read-write medical image data, the operating efficiency of raising system, decreases the memory space of image, reduces the demand to the network bandwidth;
Further, use metadata to map image data block, metadata only includes the basic storage information of data block, much smaller than the size of actual image data block, makes system can store and management massive medical image data;
Further, adopt metadata addresses map and efficient data allocations strategy, improve the efficiency of system read-write image data block, under solving high complications, the efficiency of massive image data access;
Further, image store node has the mechanism of dynamic capacity-expanding, and user can increase image data memory node newly according to the actual requirements in real time, online, has good practicality.
Embodiment
Set forth a lot of detail in the following description so that fully understand the present invention.But the present invention can be much different from alternate manner described here to implement, those skilled in the art can when without prejudice to doing similar popularization when intension of the present invention, therefore the present invention is by the restriction of following public concrete enforcement.
Secondly, the present invention utilizes schematic diagram to be described in detail, and when describing the embodiment of the present invention in detail, for ease of illustrating, described schematic diagram is example, and it should not limit the scope of protection of the invention at this.
Be described in detail below in conjunction with the storage system of drawings and Examples to a kind of medical image data of the present invention.As shown in Figure 1, described medical image data storage system comprises image store layer 3 to embodiment of the present invention medical image data storage system, the metadata layer 2 be connected with described image store layer 3 and the application client end layer 1 be connected with described metadata layer 2.Wherein, described image store layer 3 comprises multiple image store node 31, and user stores/read described medical image data by described image store node 31; Described metadata layer 2 comprises multiple metadata node, and described metadata node is for the treatment of the request of described application client end layer and distribution/obtain described medical image data, and described metadata node comprises main metadata node 21 and from metadata node 22.Particularly, described image store layer 3, for the storage of medical image data, comprises multiple image store node, and each image store node is a medical image storage server.Image store node is responsible for medical image data to be stored in local disk, periodically sends request to metadata layer simultaneously, with obtain operational order (as newly-built, delete, copy image data etc.).Containing multiple image data block in described image store node, an image data block includes all image datas of patient's single inspection, is minimum memory unit.Particularly, according to the ID of patient and the serial ID of image, identify patient's single and check all image datas, and compressed and be packaged into a data block, to reduce the memory space of image data block.The medical image file size comprised due to different patient, different inspection is different, and therefore, image data block size is not fixing.Image data block is the least unit stored, and reading and writing described image data block is all atomicity, does not need cutting or merging, reduces the complexity of the medical image data that read-write patient single checks, improves the read-write efficiency of data.In order to avoid there is the situation of patient image's loss of data because of image data block damage, disk or single machine fault, described image data block is distributed according to the principle of copy redundancy, by medical image data distributed store on multiple image store node 31, thus ensure the safety and reliability of storage system.
In the present embodiment, set copy redundancy is 3, and namely image data block described in each has 2 copies on other image store node.As shown in Figure 2, image store node in frame (cluster that namely in a local area network (LAN), number station server forms) 1 contains image data block 1,2,3 and 4, for each image data block, respectively containing a copy in other image store node of frame 1 and frame 2.For image data block 1, be stored in the image store node 2 of frame 1, and respectively have a copy in the image store node 3 of frame 1 and the image store node M of frame 2.When the image store node 2 in frame 1 delays machine, still described image data can be obtained from the image store node 3 of frame 1; When the whole image store nodes in frame delay machine, described image data can be obtained from the image store node M of frame 2.It should be noted that, user can change the quantity of copy by configuration file, thus ensures the safety and reliability of storage.
Metadata node in described metadata layer 2 accepts RPC (the RemoteProcedure Call protocol from client, remote procedure call protocol) request, the metadata information corresponding to described medical image is obtained according to request, and assign the work of described image store node, and operating result is returned to client.And described image store node periodically sends in the mode of heartbeat packet and is reported to described metadata layer, inform described its operating state of metadata layer and load state (CPU, internal memory, disk 1O, disk storage space, network 1O, process resource etc.), wherein, the content of heartbeat packet can be arranged by configuration file according to the demand of user.Particularly, the metadata of described medical image is the mapping of above-mentioned image data block message, comprises patient ID, serial ID, the size of image data block, the backup number of image data block, the node listing storing described image data block and path.Article one, the size of metadata information is about 1KB, much smaller than the size of actual image data block.Described metadata is stored in internal memory and Fixed disk by metadata node, if a server has the internal memory of 64GB, storable metadata number is 64*1024, and namely system can the image data block of store and management be 64*1024, can meet the storage demand of general hospital.
During in order to prevent from delaying machine, system can not use, and described metadata layer comprises main metadata node and from metadata node, host node timing sends heartbeat message bag to from node, and the content of heartbeat message bag comprises host time and message status code.When heartbeat packet at the appointed time can not be received from node, assert that host node lost efficacy, utilize the resource of virtual IP address switching adapter host node and service to carry out work from node.In the present embodiment, the time interval of setting is 10 seconds.
When metadata node receives the storage resource request from client, metadata node is according to network nearby principle and memory node loading condition, carry out data allocations, i.e. the network site of metadata node residing for client and IP address assignment image store node.From the above, image store node periodically sends in the mode of heartbeat packet and is reported to described metadata layer, inform described its operating state of metadata layer and load state, thus the metadata node in described metadata layer carries out the distribution of data according to the loading condition of image storage node.Particularly, described metadata node is according to the report information of image store node timed sending, the lighter image store node of load is searched at machine frame inside (namely with the frame of described client in same local area network (LAN)), if all image store nodes are all fully loaded in described frame, then search to other frames, if the image store node in other frames described is also all fully loaded, then send warning information to system manager, system manager is by adding the mode of node online to image store dilatation; If find the lighter node of load in machine frame inside or other frames, then described metadata node sends instruction and informs that the image store node that load weighs is transferred to partial data on the lighter image store node of described load.
In addition, according to network nearby principle, when client and image store node are same station servers, then a copy data can be stored in home server; If not same station server, then in the same network segment or local area network (LAN), select memory node stored copies data; If client and image store node be not the same network segment or local area network (LAN) time, then from wide area network, select memory node to store.As shown in Figure 2, two backups are in same frame (frame 1), and a backup (is namely backed up in frame 2) outside frame, thus ensure the safety and reliability of data.Thus paying the utmost attention to load, when in conjunction with network nearby principle, make data be distributed on image data memory node equably, improve the operating efficiency of system.
In the present embodiment, from the above, metadata node is managed concentratedly image store node, image store node is informed by information order, image store node performs concrete task (as data copy and Data Migration etc.) according to message bag (i.e. described information order), after tasks carrying completes, send debriefing to described metadata node.Particularly, as shown in Figure 1, first, main metadata node timing in described metadata layer (in the present embodiment, the time interval is 10 seconds) send heartbeat message bag to described from metadata node, if described from metadata node in heart time (namely within 10 seconds) receive the heartbeat message from described main metadata node, then described main metadata node is responsible for task scheduling; Otherwise the described resource from metadata node adapter host node and service, be responsible for task scheduling.Secondly, image store node is to the regular submit state report of main metadata node, from the above, if described main metadata node is responsible for scheduler task, then main metadata node is according to the status report of described image store node, generate corresponding task scheduling in conjunction with above-mentioned data allocations strategy and Data Migrating Strategy, sends to image store node to perform with message mode.Finally, described image store node accepts the task of described main metadata peer distribution, and in task processes, regularly returns task mabage report to described main metadata node.It should be noted that, if described from metadata node operation dispatching task, then the same with the mode of main metadata node, main metadata node is only issued in the report that just image store node sends.
In addition, metadata node provides independently serves, and namely during newly-increased image store node, only need bind IP address and the end mouth of metadata node, thus realize on-line rapid estimation.Metadata node according to node load situation and migration rules, can be lightened the burden to the node of heavier loads, and transfer part image data block, on newly-increased image store node, makes data be evenly distributed in the server of system.
Described application client end layer 1 is containing application programming interface, and wherein, application programming interface is respectively: GET, downloads the image data block of medical image according to patient's sequence number; POST, newly-built and upload image data block; DELETE, deletes image data block; INFO, obtains the metadata information (patient ID, serial ID, image data block size, backup number) of medical image; LOCK, lock file, forbids user writable; COMPRESS, according to medical science DICOM (Digital imaging andCommunications in Medicine) digitized video and communication standard protocol, all image datas of patient's single inspection are compressed, is packaged into an image data block; UNZIP, according to DICOM agreement, analyzes an image data block, solution is pressed into medical image data.Described application client end layer additionally provides SDK (Software Development Kit, software development kit), and carry out data interaction by the mode of RPC (RemoteProcedure Call Protocol, remote procedure call protocol) and metadata layer and image store layer.
Particularly, in the present embodiment, client carries out writing the flow process of data as shown in Figure 3, and first, perform step S301, client initiates request to create to metadata node.Particularly, the user of client uses patient ID, serial ID and the local path of image data that will write as parameter, and call the POST interface of application client end layer, the metadata node to metadata layer initiates request to create.Then, perform step S302, metadata node determines whether to create according to described request, if so, then performs step S303, and metadata node is that described request creates metadata, and returns to client; If not, then perform step S304, described abnormal conditions are returned to client, terminates whole process.Particularly, whether the image data block that metadata node will create according to the parameter imported into (patient ID and serial ID) inspection exists, and check whether user has permission operation, thus determine whether to create image data block, if the image data block created does not exist, and user has the authority of operation, then metadata node is that described image data creates metadata, and returns to client; Otherwise throw exception signal, to client, terminates whole process.
Then, perform step S305, client, according to metadata, by image data boil down to image data block, and is write destination path.Particularly, client obtains the metadata returned, using the local path of the image data imported into as parameter, call COMPRESS interface, described image data boil down to image data block, and use the IP address of the image store node in metadata, access this image store node, under the image data block compressed is write the path of destination server.
Then whether Already in, perform step S306, according to patient ID and serial ID, judge described image data block destination server, if exist, then perform step S307, image store node returns success to client; If do not exist, then perform step S304, described abnormal conditions are returned to client, stops whole process.Particularly, according to patient ID and serial ID, after determining the success of image data block write destination server, image store node returns success to client, and with the form of report, metadata node is informed in the timing of the fileinfo of this image data block, and upgrade metadata information.The backup number that metadata node is arranged by user and task scheduling notice image store node, distribute image store node and store copy; Image store node accepts the task that metadata is submitted to, copies this image data block according to mission requirements, and its asynchronous migrating on the server of specifying is stored.
Client carries out the flow process of read data as shown in Figure 4, and first, perform step S401, client initiates request to metadata node.Particularly, client, using patient ID and serial ID as input parameter, initiates to read the request of the image data corresponding with patient ID and serial ID to metadata node by calling GET interface.Then, perform step S402, according to described request, search in server whether contain described metadata, if so, then perform step S403, metadata is returned to client; If not, then error message is returned to client.Particularly, metadata node is according to the parameter imported into, i.e. whether patient ID and serial ID, search containing metadata in server, if containing the described metadata with importing parameter correlation in server, then the metadata inquired is returned to client; Otherwise, return error message to client, terminate to read image data.
Then, perform step S405, client, according to metadata, is downloaded corresponding image data block, and is processed described image data block, obtain image data.Particularly, client obtains the metadata that metadata node returns, the Servers-all list of the image data block storing the image data that will read is contained in described metadata, according to network nearby principle, client downloads corresponding image data block from the image store node nearest from client, and call UNZIP interface, described image data block is analyzed, solution is pressed into the discernible image data of medical system, the image data namely needed for user.It should be noted that, before calling UNZIP interface, the image data block size preserved is compared, if the not of uniform size of described image data block causes, then return abnormal information to client in the size of image data block downloaded and metadata.
Although the present invention with preferred embodiment openly as above; but it is not for limiting the present invention; any those skilled in the art without departing from the spirit and scope of the present invention; the Method and Technology content of above-mentioned announcement can be utilized to make possible variation and amendment to technical solution of the present invention; therefore; every content not departing from technical solution of the present invention; the any simple modification done above embodiment according to technical spirit of the present invention, equivalent variations and modification, all belong to the protection range of technical solution of the present invention.