CN112182261A - Image storage method and device, computer equipment and storage medium - Google Patents

Image storage method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112182261A
CN112182261A CN202011185170.3A CN202011185170A CN112182261A CN 112182261 A CN112182261 A CN 112182261A CN 202011185170 A CN202011185170 A CN 202011185170A CN 112182261 A CN112182261 A CN 112182261A
Authority
CN
China
Prior art keywords
object data
image
metadata
storage
metadata record
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.)
Pending
Application number
CN202011185170.3A
Other languages
Chinese (zh)
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.)
Wuhan United Imaging Healthcare Co Ltd
Original Assignee
Wuhan United Imaging Healthcare Co Ltd
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 Wuhan United Imaging Healthcare Co Ltd filed Critical Wuhan United Imaging Healthcare Co Ltd
Priority to CN202011185170.3A priority Critical patent/CN112182261A/en
Publication of CN112182261A publication Critical patent/CN112182261A/en
Priority to EP21205635.2A priority patent/EP3992979A1/en
Priority to US17/452,778 priority patent/US20220140840A1/en
Priority to US17/452,783 priority patent/US11829407B2/en
Priority to EP21205586.7A priority patent/EP3992807A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Library & Information Science (AREA)
  • Medical Treatment And Welfare Office Work (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application relates to an image storage method, an image storage device, computer equipment and a storage medium. The method comprises the following steps: receiving a storage request; the storage request comprises first object data of an image to be stored; searching a metadata record corresponding to the first object data in a preset metadata table stored by a storage engine; if the metadata record corresponding to the first object data is not found in the metadata table, storing the first object data; a first metadata record describing the first object data is generated and inserted into the metadata table. By adopting the method, the real-time searching of the object data can be carried out according to the metadata, so that the retrieval speed of the medical image can be improved.

Description

Image storage method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of data storage technologies, and in particular, to an image storage method and apparatus, a computer device, and a storage medium.
Background
With the development of medical imaging equipment, the role of medical imaging in clinical diagnosis is becoming more and more important.
In the related art, object data of a medical image is stored, image index information is generated according to related information of the medical image and a storage position of the object data, and the image index information is stored in an index database. When a doctor needs to retrieve the medical image, the image index information corresponding to the medical image is searched first, and then the object data of the medical image is obtained according to the image index information.
According to the storage mode, when the medical image is retrieved, the image index information needs to be searched first, and the retrieval speed is influenced. Moreover, the object data of the medical image and the image index information need to be maintained separately, and the maintainability is poor.
Disclosure of Invention
In view of the above, it is desirable to provide an image storage method, an apparatus, a computer device and a storage medium capable of improving a retrieval speed.
An image storage method, comprising:
receiving a storage request; the storage request comprises first object data of an image to be stored;
searching a metadata record corresponding to the first object data in a preset metadata table stored by a storage engine;
if the metadata record corresponding to the first object data is not found in the metadata table, storing the first object data;
a first metadata record describing the first object data is generated and inserted into the metadata table.
In one embodiment, the searching for the metadata record corresponding to the first object data in the metadata table stored in the preset storage engine includes:
analyzing the first object data to obtain first image information of an image to be stored;
searching a metadata record corresponding to the first image information in a metadata table;
correspondingly, the above generating a first metadata record describing the first object data includes:
a first metadata record is generated based on the object information of the first object data and the first image information.
In one embodiment, the metadata record includes at least one of a unique identifier of the object data, a storage location of the object data, a length of the object data, a timestamp of the object data, a type of the image, a unique identifier of the image, a user identifier corresponding to the image, an examination identifier corresponding to the image, and an identifier of an image sequence corresponding to the image.
In one embodiment, the method further comprises:
receiving a retrieval request; the retrieval request comprises second image information of the image to be retrieved;
searching a metadata record corresponding to the second image information in a metadata table;
if the second metadata record corresponding to the second image information is found, acquiring corresponding second object data according to the second metadata record;
feeding back the second object data.
In one embodiment, the obtaining the corresponding second object data according to the second metadata record includes:
searching a second metadata record in a preset statistical table to obtain statistical information corresponding to the second metadata record;
if the second object data are determined to be high-frequency access data according to the statistical information, acquiring the second object data from a preset cache;
and if the second object data are determined to be non-high-frequency access data according to the statistical information, acquiring the second object data from a preset storage space.
In one embodiment, after the storing the first object data, the method further comprises:
updating a preset statistical table; the update process includes at least one of updating the number of files and updating the storage space.
In one embodiment, before the storing the first object data, the method further comprises:
compressing the first object data to obtain compressed first object data;
correspondingly, storing first object data comprises:
the compressed first object data is stored.
In one embodiment, the method further comprises:
receiving an editing request; the editing request comprises third image information of an image to be edited; the edit request includes at least one of an update request and a delete request;
searching a metadata record corresponding to the third image information in a metadata table;
if the third metadata record corresponding to the third image information is found, determining third object data to be edited according to the third metadata record;
editing the third object data according to the editing request, and updating a metadata table according to the editing processing;
and if the editing processing is successful, feeding back an editing processing result.
In one embodiment, after the editing process is performed on the third object data according to the editing request and the metadata table is updated according to the editing process, the method further includes:
if the editing processing fails, performing rollback processing on the third metadata record;
and if the rollback processing fails, performing fault-tolerant storage on the third metadata record.
An image storage device, the device comprising:
the storage request receiving module is used for receiving a storage request; the storage request comprises first object data of an image to be stored;
the first record searching module is used for searching a metadata record corresponding to the first object data in a preset metadata table stored by a storage engine;
the object storage module is used for storing the first object data if the metadata record corresponding to the first object data is not found in the metadata table;
a record generation module to generate a first metadata record describing the first object data and to insert the first metadata record into the metadata table.
In one embodiment, the first record searching module is specifically configured to analyze the first object data to obtain first image information of an image to be stored; searching a metadata record corresponding to the first image information in a metadata table;
correspondingly, the record generating module is specifically configured to generate the first metadata record according to the object information of the first object data and the first image information.
In one embodiment, the metadata record includes at least one of a unique identifier of the object data, a storage location of the object data, a length of the object data, a timestamp of the object data, a type of the image, a unique identifier of the image, a user identifier corresponding to the image, an examination identifier corresponding to the image, and an identifier of an image sequence corresponding to the image.
In one embodiment, the apparatus further comprises:
a retrieval request receiving module for receiving a retrieval request; the retrieval request comprises second image information of the image to be retrieved;
the second record searching module is used for searching the metadata record corresponding to the second image information in the metadata table;
the object data acquisition module is used for acquiring corresponding second object data according to the second metadata record if the second metadata record corresponding to the second image information is found;
and the data feedback module is used for feeding back the second object data.
In one embodiment, the object data obtaining module is specifically configured to search a preset statistical table for a second metadata record to obtain statistical information corresponding to the second metadata record; if the second object data are determined to be high-frequency access data according to the statistical information, acquiring the second object data from a preset cache; and if the second object data are determined to be non-high-frequency access data according to the statistical information, acquiring the second object data from a preset storage space.
In one embodiment, the apparatus further comprises:
updating the statistical table, which is used for updating the preset statistical table; the update process includes at least one of updating the number of files and updating the storage space.
In one embodiment, the apparatus further comprises:
the compression module is used for compressing the first object data to obtain compressed first object data;
and the object storage module is also used for storing the compressed first object data.
In one embodiment, the apparatus further comprises:
the editing request receiving module is used for receiving an editing request; the editing request comprises third image information of an image to be edited; the edit request includes at least one of an update request and a delete request;
the third record searching module is used for searching the metadata record corresponding to the third image information in the metadata table;
the data determining module is used for determining third object data to be edited according to the third metadata record if the third metadata record corresponding to the third image information is found;
the editing module is used for editing the third object data according to the editing request and updating the metadata table according to the editing processing;
and the second feedback module is used for feeding back an editing processing result if the editing processing is successful.
In one embodiment, the apparatus further comprises:
the backspacing processing module is used for backspacing the third metadata record if the editing processing fails;
and the fault-tolerant storage module is used for carrying out fault-tolerant storage on the third metadata record if the rollback processing fails.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
receiving a storage request; the storage request comprises first object data of an image to be stored;
searching a metadata record corresponding to the first object data in a preset metadata table stored by a storage engine;
if the metadata record corresponding to the first object data is not found in the metadata table, storing the first object data;
a first metadata record describing the first object data is generated and inserted into the metadata table.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
receiving a storage request; the storage request comprises first object data of an image to be stored;
searching a metadata record corresponding to the first object data in a preset metadata table stored by a storage engine;
if the metadata record corresponding to the first object data is not found in the metadata table, storing the first object data;
a first metadata record describing the first object data is generated and inserted into the metadata table.
According to the image storage method, the image storage device, the computer equipment and the storage medium, the server receives a storage request, wherein the storage request comprises first object data of an image to be stored; searching a metadata record corresponding to the first object data in a preset metadata table stored by a storage engine; if the metadata record corresponding to the first object data is not found in the metadata table, storing the first object data; a first metadata record describing the first object data is generated and inserted into the metadata table. In the embodiment of the disclosure, the metadata describing the object data is stored in the storage engine with real-time query, and when the image is retrieved subsequently, the object data can be searched in real time according to the metadata, so that the retrieval speed can be improved. Furthermore, the metadata record corresponds to the object data, and maintainability is high.
Drawings
FIG. 1 is a diagram illustrating an exemplary embodiment of an image storage method;
FIG. 2 is a flowchart illustrating an image storage method according to an embodiment;
FIG. 3 is a flowchart illustrating the step of locating a metadata record corresponding to first object data in one embodiment;
FIG. 4 is a flowchart illustrating an image storage method according to another embodiment;
FIG. 5 is a flowchart illustrating an image retrieval method according to an embodiment;
FIG. 6 is a flowchart illustrating an image editing method according to one embodiment;
FIG. 7 is a second flowchart illustrating an image editing method according to an embodiment;
FIG. 8 is a block diagram of an embodiment of an image storage device;
FIG. 9 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The image storage method provided by the application can be applied to the application environment shown in fig. 1. The application environment includes a terminal 102 and a server 104; wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster composed of a plurality of servers.
In an embodiment, as shown in fig. 2, an image storage method is provided, which is described by taking the application of the method to the server in fig. 1 as an example, and includes the following steps:
step 201, a storage request is received.
The storage request comprises first object data of the image to be stored.
The terminal receives a storage instruction input by a user and determines the image to be stored according to the storage instruction. And then, the terminal generates first object data and a storage request according to the image to be stored. Then, the terminal transmits a storage request to the server. Correspondingly, the server receives a storage request sent by the terminal and analyzes the first object data of the object to be stored from the storage request.
The image to be stored may be a medical image, such as a CT (Computed Tomography) image, an MR (Magnetic Resonance) image, an ultrasound image, and the like.
In step 202, a metadata record corresponding to the first object data is searched in a metadata table stored in a preset storage engine. Namely, the metadata record corresponding to the first object data is searched in a metadata table, and the metadata table is stored in a preset storage engine.
The server is preset with a storage engine, which may be but not limited to kudu, elasticsearch, hbase, and all of these storage engines have a real-time query function. The storage engine is provided with a metadata table, and the metadata table is used for storing metadata records. Wherein the metadata is data describing the object data. A metadata record is a record generated from metadata.
In an alternative embodiment, the metadata record includes at least one of a unique identifier of the object data, a storage location of the object data, a length of the object data, a timestamp of the object data, a type of the image, a user identifier corresponding to the image, a unique identifier of the image, an examination identifier corresponding to the image, and an identifier of an image sequence corresponding to the image. Wherein the image type may indicate whether the image is a CT image, an MR image, or an ultrasound image. The examination mark corresponding to the image can indicate a series of examinations for a certain disease. The metadata records are shown in the following table:
Figure BDA0002751222680000071
Figure BDA0002751222680000081
after the server acquires the first object data, the server searches the metadata table for the metadata record corresponding to the first object data. If the server finds a metadata record corresponding to the first object data in the metadata table indicating that the first object data is already stored, the first object data is no longer stored. The server may feed back to the terminal that the first object data is stored. If the server does not find the metadata record corresponding to the first object data in the metadata table, it indicates that the first object data is not stored, step 203 is executed.
In step 203, if the metadata record corresponding to the first object data is not found in the metadata table, the first object data is stored.
The storage request also includes a storage location. And if the server does not find the metadata record corresponding to the first object data in the metadata table, storing the first object data according to the storage position carried in the storage request.
In practical applications, a plurality of object storage service nodes may be provided, and the server receiving the storage request is one of the plurality of object storage server nodes. And when the first object data is stored, storing the first object data to one of the object storage service nodes according to the storage position carried in the storage request.
At step 204, a first metadata record describing the first object data is generated and inserted into the metadata table.
The server, when storing the first object data, also generates a first metadata record as shown in the above table, the metadata in the first metadata record being used to describe the first object data. After the first metadata record is generated, the first metadata record is inserted into a metadata table.
In the image storage method, a server receives a storage request, wherein the storage request comprises first object data of an image to be stored; searching a metadata record corresponding to the first object data in a preset metadata table stored by a storage engine; if the metadata record corresponding to the first object data is not found in the metadata table, storing the first object data; a first metadata record describing the first object data is generated and inserted into the metadata table. In the embodiment of the disclosure, the metadata describing the object data is stored in the storage engine with real-time query, and when the image is retrieved subsequently, the object data can be searched in real time according to the metadata, so that the retrieval speed can be improved. Furthermore, the metadata record corresponds to the object data, and maintainability is high.
In an embodiment, as shown in fig. 3, the step of searching for the metadata record corresponding to the first object data in the metadata table stored in the preset storage engine may include:
step 301, analyzing the first object data to obtain first image information of the image to be stored.
In practical application, after the terminal sends the first object data of the image to be stored to the server, the server needs to analyze the first object data first to obtain the first image information of the image to be stored.
For example, the server analyzes the first object data to obtain an image type of the image to be stored, an image sequence identifier corresponding to the image to be stored, a patient number and a patient name corresponding to the image to be stored, a unique identifier of the image to be stored, an examination identifier corresponding to the image to be stored, and the like.
Step 302, a metadata record corresponding to the first video information is searched in the metadata table.
After the server parses the first image information, the metadata table may be searched according to the first image information. If the metadata record corresponding to the first image information is found, indicating that the first object data is stored; and if the metadata record corresponding to the first image information is not found, representing that the first object data is not stored.
In one embodiment, since the server parses the first object data to obtain the first image information of the image to be stored, when generating the first metadata record describing the first object data, the first metadata record may be generated according to the object information of the first object data and the first image information. The object information may include a unique identifier of the object data, a storage location of the object data, a length of the object data, and a timestamp of the object data, and the first image information may include at least one of an image type, a user identifier corresponding to an image, an image unique identifier, an examination identifier corresponding to an image, and an image sequence identifier corresponding to an image.
In one embodiment, the metadata table may be further searched according to the first image information and the related information of the first object data. The embodiments of the present disclosure do not limit this.
Analyzing the first object data to obtain first image information of an image to be stored; the metadata table is searched for a metadata record corresponding to the first image information, and after the first object data is stored, a first metadata record describing the first object data is generated according to the object information of the first object data and the first image information. In the embodiment of the disclosure, because the image information and the object information are stored in the metadata table together, the object data of the medical image can be searched in real time according to the image information; in addition, index information and image information do not need to be stored, an index database and an image information database do not need to be established, and the storage, management and maintenance cost of mass image data can be effectively reduced.
In one embodiment, as shown in fig. 4, an image storage method is provided, which may include the following steps:
step 401, a storage request is received.
The storage request comprises first object data of the image to be stored.
Step 402, analyzing the first object data to obtain first image information of the image to be stored.
In step 403, the metadata table is searched for a metadata record corresponding to the first video information.
Step 404, if the metadata record corresponding to the first object data is not found in the metadata table, compressing the first object data, and storing the compressed first object data.
And if the server does not find the metadata record corresponding to the first object data in the metadata table, which indicates that the first object data is not stored, compressing the first object data based on a compression algorithm of the dicom file to obtain the compressed first object data. Then, the server stores the compressed first object data. It can be understood that the storage space can be saved by compressing and then storing the object data.
Step 405, a first metadata record is generated according to the object information of the first object data and the first image information, and the first metadata record is inserted into the metadata table.
Step 406, updating the preset statistical table.
Wherein the updating process includes at least one of updating the number of files and updating the storage space.
The server is preset with a statistical table, which is used for counting the number of files in the directory where the object data is located, the number of files in the parent directory of the directory where the object data is located, the storage space of the directory where the object data is located, and the storage space of the parent directory of the directory where the object data is located.
After the first object data is stored, the number of files in the directory where the first object data is located, the number of files in the parent directory of the directory where the first object data is located, the storage space of the directory where the first object data is located and the storage space of the parent directory of the directory where the first object data is located are counted to obtain statistical information, and the statistical table is updated according to the statistical information.
In one embodiment, the remaining storage space of the directory where the first object data is located and the remaining storage space of the parent directory of the directory where the first object data is located are calculated; and if the residual storage space is lower than the preset space threshold, generating prompt information.
In the embodiment, the server receives the storage request, and stores the first object data according to the first image information in the storage request; generating a first metadata record according to the object information of the first object data and the first image information, and inserting the first metadata record into a metadata table; and then, updating the preset statistical table. In the embodiment of the disclosure, the statistical table is adopted to count the number of the files and the storage space, so that the real-time monitoring and early warning of the residual storage space can be realized, and the storage space can be better managed.
In an embodiment, as shown in fig. 5, on the basis of the above embodiment, an embodiment of the present disclosure may further include:
step 501, a retrieval request is received.
The retrieval request comprises second image information of the image to be retrieved.
The terminal receives an image retrieval condition input by a user, wherein the image retrieval condition comprises second image information of an image to be retrieved. Then, the terminal generates a search request according to the image search condition and transmits the search request to the server. Correspondingly, the server receives the retrieval request sent by the terminal.
For example, the terminal acquires the image search condition including the patient name and the image type, and then generates a search request according to the patient name and the image type, and sends the search request to the server. The server may then receive the patient name and image type.
Step 502, a metadata record corresponding to the second video information is searched in the metadata table.
And the server searches the metadata table according to the second image information. For example, the server looks up in a metadata table based on the patient name and image type.
If the metadata record corresponding to the second video information is found in the metadata table, step 403 is executed. And if the second metadata record corresponding to the second image information is not found in the metadata table, the server feeds back to the terminal that the image to be retrieved is not found.
In step 503, if the second metadata record corresponding to the second image information is found, the corresponding second object data is obtained according to the second metadata record.
If the server finds the second metadata record corresponding to the second image information, the server indicates that the second object data corresponding to the second image information is stored, and the server acquires the second object data according to the storage position of the object data in the second metadata record.
In an alternative embodiment, obtaining the corresponding second object data according to the second metadata record may include: searching a second metadata record in a preset statistical table to obtain statistical information corresponding to the second metadata record; if the second object data are determined to be high-frequency access data according to the statistical information, acquiring the second object data from a preset cache; and if the second object data are determined to be non-high-frequency access data according to the statistical information, acquiring the second object data from a preset storage space.
The preset statistical table also stores statistical information indicating whether the object data is high-frequency access data. After the server searches the second metadata record corresponding to the second image information in the metadata table, the server searches the second metadata record in the statistical table to obtain statistical information corresponding to the second metadata record. If the statistical information indicates that the second object data is high frequency access data, the second object data is read from the pre-cache. And if the statistical information indicates that the second object data is non-high frequency access data, reading the second object data from a preset storage space.
In one embodiment, after the second object data is read from the preset storage space, the second object data is stored in the preset buffer, and the statistical information corresponding to the second object data is updated, that is, the second object data is recorded as the high-frequency access data in the statistical table.
As can be appreciated, storing the high-frequency access data in the preset cache can improve the access performance of the object data.
And step 504, feeding back the second object data.
And after acquiring the second object data, the server sends the second object data to the terminal. Correspondingly, the terminal receives the second object data sent by the server.
In the above embodiment, the server receives the retrieval request; searching a metadata record corresponding to the second image information in a metadata table; if the second metadata record corresponding to the second image information is found, acquiring corresponding second object data according to the second metadata record; feeding back the second object data. In the prior art, when a doctor accesses a medical image, a server needs to search image index information in an index database first, and then object data is obtained according to the image index information; in the embodiment of the present disclosure, the metadata table of the storage engine stores the image information, so that the corresponding second object data can be directly found according to the second image information of the image to be retrieved. It can be seen that the retrieval speed of the disclosed embodiments is faster compared to the prior art.
In an embodiment, as shown in fig. 6, on the basis of the above embodiment, an embodiment of the present disclosure may further include:
step 601, receiving an editing request.
The editing request comprises third image information of an image to be edited; the edit request includes at least one of an update request and a delete request.
When a doctor edits a medical image, the terminal receives an editing operation, such as an updating operation, a deleting operation and the like, for the image to be edited. And then, the terminal generates an editing request according to the editing operation and the third image information of the image to be edited and sends the editing request to the server. Correspondingly, the server receives the editing request sent by the terminal, and analyzes the editing request to obtain third image information of the image to be edited and editing operation to be executed.
Step 602, the metadata table is searched for a metadata record corresponding to the third video information.
And the server searches the metadata table according to the third image information. For example, if the third image information includes the image unique identifier of the image to be edited, the metadata table is searched for the image unique identifier. If the unique image identifier is found, it is determined that the metadata record where the unique image identifier is located is the metadata record corresponding to the third image information, and then step 603 is executed. And if the image identifier is not found, feeding back the editing failure to the terminal.
Step 603, if the third metadata record corresponding to the third image information is found, determining third object data to be edited according to the third metadata record.
After the server finds the third metadata record corresponding to the third image information in the metadata table, the server may determine the third data object to be edited according to the unique identifier of the object data stored in the third metadata record and the storage location of the object data.
Step 604, editing the third object data according to the editing request, and updating the metadata table according to the editing process.
And when the editing request is an updating request, the editing request can also comprise updating information, and after the server determines the third object data, the server updates the third object data according to the updating information. And the server updates a third metadata record corresponding to the third object data in the metadata table according to the updating processing.
In a case where the edit request is a delete request, the server deletes the third object data. And the server also deletes a third metadata record corresponding to the third object data in the metadata table.
Step 605, if the editing process is successful, feeding back the editing process result.
If the editing process is an updating process, the server feeds back the updating success to the terminal if the updating process is successful, and the updated third object data can also be sent to the terminal.
If the editing process is a deletion process, the server feeds back the deletion success to the terminal if the deletion succeeds.
In one embodiment, as shown in fig. 7, after step 604, the method may further include:
and step 606, if the editing processing fails, performing rollback processing on the third metadata record.
In the case where the editing process is the updating process, if the updating process fails, the server feeds back the updating failure to the terminal, and restores the third metadata record in the metadata table to the third metadata record before the updating process.
In the case where the editing process is a deletion process, if the deletion process fails, the server feeds back the deletion failure to the terminal and reinserts the deleted third metadata record into the metadata table.
Step 607, if the rollback processing fails, the third metadata record is stored in a fault-tolerant manner.
The server is preset with a fault-tolerant storage space. And under the condition that the updating fails and the rollback processing on the third element data record fails, the server stores the third element data record before the updating processing into the fault-tolerant storage space.
And under the condition that the deletion processing fails and the rollback processing on the third element data record fails, the server stores the deleted third element data record into the fault-tolerant storage space.
It is to be understood that after the rollback processing for the third metadata record fails, the metadata records in the metadata table no longer correspond to the actual situation of the third object data. In response to this situation, the embodiment of the present disclosure uses the fault-tolerant storage, and may determine the third object data according to the third metadata record stored in the fault-tolerant storage space when the third object data is edited next time, and implement the editing of the third object data.
In the above embodiment, an edit request is received; searching a metadata record corresponding to the third image information in a metadata table; if the third metadata record corresponding to the third image information is found, determining third object data to be edited according to the third metadata record; editing the third object data according to the editing request, and updating a metadata table according to the editing processing; and if the editing processing is successful, feeding back an editing processing result. In the prior art, when a doctor edits a medical image, a server needs to search image index information in an index library first, and then obtain object data according to the image index information, and then can edit the medical image. In the embodiment of the present disclosure, the image information is stored in the metadata table of the storage engine, so that the corresponding third object data can be directly found according to the third image information of the image to be edited, thereby editing the medical image. It can be seen that the editing speed of the disclosed embodiments is faster compared to the prior art.
It should be understood that although the various steps in the flowcharts of fig. 2-7 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-7 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 8, there is provided an image storage device, including:
a storage request receiving module 701, configured to receive a storage request; the storage request comprises first object data of an image to be stored;
a first record searching module 702, configured to search a metadata record corresponding to the first object data in a metadata table stored in a preset storage engine;
an object storage module 703, configured to store the first object data if the metadata record corresponding to the first object data is not found in the metadata table;
a record generation module 704 for generating a first metadata record describing the first object data and inserting the first metadata record into the metadata table.
In one embodiment, the first record searching module 702 is specifically configured to analyze the first object data to obtain first image information of an image to be stored; searching a metadata record corresponding to the first image information in a metadata table;
correspondingly, the record generating module 704 is specifically configured to generate a first metadata record according to the object information of the first object data and the first image information.
In one embodiment, the metadata record includes at least one of a unique identifier of the object data, a storage location of the object data, a length of the object data, a timestamp of the object data, a type of the image, a unique identifier of the image, a user identifier corresponding to the image, an examination identifier corresponding to the image, and an identifier of an image sequence corresponding to the image.
In one embodiment, the apparatus further comprises:
a retrieval request receiving module for receiving a retrieval request; the retrieval request comprises second image information of the image to be retrieved;
the second record searching module is used for searching the metadata record corresponding to the second image information in the metadata table;
the object data acquisition module is used for acquiring corresponding second object data according to the second metadata record if the second metadata record corresponding to the second image information is found;
and the data feedback module is used for feeding back the second object data.
In one embodiment, the object data obtaining module is specifically configured to search a preset statistical table for a second metadata record to obtain statistical information corresponding to the second metadata record; if the second object data are determined to be high-frequency access data according to the statistical information, acquiring the second object data from a preset cache; and if the second object data are determined to be non-high-frequency access data according to the statistical information, acquiring the second object data from a preset storage space.
In one embodiment, the apparatus further comprises:
updating the statistical table, which is used for updating the preset statistical table; the update process includes at least one of updating the number of files and updating the storage space.
In one embodiment, the apparatus further comprises:
the compression module is used for compressing the first object data to obtain compressed first object data;
and the object storage module is also used for storing the compressed first object data.
In one embodiment, the apparatus further comprises:
the editing request receiving module is used for receiving an editing request; the editing request comprises third image information of an image to be edited; the edit request includes at least one of an update request and a delete request;
the third record searching module is used for searching the metadata record corresponding to the third image information in the metadata table;
the data determining module is used for determining third object data to be edited according to the third metadata record if the third metadata record corresponding to the third image information is found;
the editing module is used for editing the third object data according to the editing request and updating the metadata table according to the editing processing;
and the second feedback module is used for feeding back an editing processing result if the editing processing is successful.
In one embodiment, the apparatus further comprises:
the backspacing processing module is used for backspacing the third metadata record if the editing processing fails;
and the fault-tolerant storage module is used for carrying out fault-tolerant storage on the third metadata record if the rollback processing fails.
For the specific definition of the image storage device, reference may be made to the above definition of the image storage method, which is not described herein again. All or part of the modules in the image storage device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 9. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing image storage data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an image storage method.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
receiving a storage request; the storage request comprises first object data of an image to be stored;
searching a metadata record corresponding to the first object data in a preset metadata table stored by a storage engine;
if the metadata record corresponding to the first object data is not found in the metadata table, storing the first object data;
a first metadata record describing the first object data is generated and inserted into the metadata table.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
analyzing the first object data to obtain first image information of an image to be stored;
searching a metadata record corresponding to the first image information in a metadata table;
a first metadata record is generated based on the object information of the first object data and the first image information.
In one embodiment, the metadata record includes at least one of a unique identifier of the object data, a storage location of the object data, a length of the object data, a timestamp of the object data, a type of the image, a unique identifier of the image, a user identifier corresponding to the image, an examination identifier corresponding to the image, and an identifier of an image sequence corresponding to the image.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
receiving a retrieval request; the retrieval request comprises second image information of the image to be retrieved;
searching a metadata record corresponding to the second image information in a metadata table;
if the second metadata record corresponding to the second image information is found, acquiring corresponding second object data according to the second metadata record;
feeding back the second object data.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
searching a second metadata record in a preset statistical table to obtain statistical information corresponding to the second metadata record;
if the second object data are determined to be high-frequency access data according to the statistical information, acquiring the second object data from a preset cache;
and if the second object data are determined to be non-high-frequency access data according to the statistical information, acquiring the second object data from a preset storage space.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
updating a preset statistical table; the update process includes at least one of updating the number of files and updating the storage space.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
compressing the first object data to obtain compressed first object data;
correspondingly, storing first object data comprises:
the compressed first object data is stored.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
receiving an editing request; the editing request comprises third image information of an image to be edited; the edit request includes at least one of an update request and a delete request;
searching a metadata record corresponding to the third image information in a metadata table;
if the third metadata record corresponding to the third image information is found, determining third object data to be edited according to the third metadata record;
editing the third object data according to the editing request, and updating a metadata table according to the editing processing;
and if the editing processing is successful, feeding back an editing processing result.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
if the editing processing fails, performing rollback processing on the third metadata record;
and if the rollback processing fails, performing fault-tolerant storage on the third metadata record.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
receiving a storage request; the storage request comprises first object data of an image to be stored;
searching a metadata record corresponding to the first object data in a preset metadata table stored by a storage engine;
if the metadata record corresponding to the first object data is not found in the metadata table, storing the first object data;
a first metadata record describing the first object data is generated and inserted into the metadata table.
In one embodiment, the computer program when executed by the processor further performs the steps of:
analyzing the first object data to obtain first image information of an image to be stored;
searching a metadata record corresponding to the first image information in a metadata table;
a first metadata record is generated based on the object information of the first object data and the first image information.
In one embodiment, the metadata record includes at least one of a unique identifier of the object data, a storage location of the object data, a length of the object data, a timestamp of the object data, a type of the image, a unique identifier of the image, a user identifier corresponding to the image, an examination identifier corresponding to the image, and an identifier of the sequence of images corresponding to the image.
In one embodiment, the computer program when executed by the processor further performs the steps of:
receiving a retrieval request; the retrieval request comprises second image information of the image to be retrieved;
searching a metadata record corresponding to the second image information in a metadata table;
if the second metadata record corresponding to the second image information is found, acquiring corresponding second object data according to the second metadata record;
feeding back the second object data.
In one embodiment, the computer program when executed by the processor further performs the steps of:
searching a second metadata record in a preset statistical table to obtain statistical information corresponding to the second metadata record;
if the second object data are determined to be high-frequency access data according to the statistical information, acquiring the second object data from a preset cache;
and if the second object data are determined to be non-high-frequency access data according to the statistical information, acquiring the second object data from a preset storage space.
In one embodiment, the computer program when executed by the processor further performs the steps of:
updating a preset statistical table; the update process includes at least one of updating the number of files and updating the storage space.
In one embodiment, the computer program when executed by the processor further performs the steps of:
compressing the first object data to obtain compressed first object data;
correspondingly, storing first object data comprises:
the compressed first object data is stored.
In one embodiment, the computer program when executed by the processor further performs the steps of:
receiving an editing request; the editing request comprises third image information of an image to be edited; the edit request includes at least one of an update request and a delete request;
searching a metadata record corresponding to the third image information in a metadata table;
if the third metadata record corresponding to the third image information is found, determining third object data to be edited according to the third metadata record;
editing the third object data according to the editing request, and updating a metadata table according to the editing processing;
and if the editing processing is successful, feeding back an editing processing result.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the editing processing fails, performing rollback processing on the third metadata record;
and if the rollback processing fails, performing fault-tolerant storage on the third metadata record.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An image storage method, comprising:
receiving a storage request; the storage request comprises first object data of an image to be stored;
searching a metadata record corresponding to the first object data in a preset metadata table stored by a storage engine;
if the metadata record corresponding to the first object data is not found in the metadata table, storing the first object data;
a first metadata record describing the first object data is generated and inserted into the metadata table.
2. The method according to claim 1, wherein the searching for the metadata record corresponding to the first object data in the metadata table stored in the preset storage engine comprises:
analyzing the first object data to obtain first image information of the image to be stored;
searching a metadata record corresponding to the first image information in the metadata table;
correspondingly, the generating a first metadata record describing the first object data includes:
and generating the first metadata record according to the object information of the first object data and the first image information.
3. The method of claim 1, wherein the metadata record comprises at least one of a unique identifier of the object data, a storage location of the object data, a length of the object data, a timestamp of the object data, a type of the image, a unique identifier of the image, a user identifier corresponding to the image, an examination identifier corresponding to the image, and an identifier of a sequence of images corresponding to the image.
4. The method of claim 1, further comprising:
receiving a retrieval request; the retrieval request comprises second image information of an image to be retrieved;
searching a metadata record corresponding to the second image information in the metadata table;
if the second metadata record corresponding to the second image information is found, acquiring corresponding second object data according to the second metadata record;
feeding back the second object data.
5. The method of claim 1, wherein after said storing the first object data, the method further comprises:
updating a preset statistical table; the update process includes at least one of updating the number of files and updating the storage space.
6. The method of claim 1, wherein prior to said storing said first object data, said method further comprises:
compressing the first object data to obtain compressed first object data;
correspondingly, the storing the first object data includes:
storing the compressed first object data.
7. The method of claim 1, further comprising:
receiving an editing request; the editing request comprises third image information of an image to be edited; the edit request comprises at least one of an update request and a delete request;
searching a metadata record corresponding to the third image information in the metadata table;
if the third metadata record corresponding to the third image information is found, determining third object data to be edited according to the third metadata record;
editing the third object data according to the editing request, and updating the metadata table according to the editing processing;
and if the editing processing is successful, feeding back an editing processing result.
8. An image storage device, comprising:
the storage request receiving module is used for receiving a storage request; the storage request comprises first object data of an image to be stored;
the first record searching module is used for searching a metadata record corresponding to the first object data in a metadata table stored by a preset storage engine;
the object storage module is used for storing the first object data if the metadata record corresponding to the first object data is not found in the metadata table;
a record generation module to generate a first metadata record describing the first object data and insert the first metadata record into the metadata table.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202011185170.3A 2020-10-29 2020-10-29 Image storage method and device, computer equipment and storage medium Pending CN112182261A (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CN202011185170.3A CN112182261A (en) 2020-10-29 2020-10-29 Image storage method and device, computer equipment and storage medium
EP21205635.2A EP3992979A1 (en) 2020-10-29 2021-10-29 Systems and methods for file archiving
US17/452,778 US20220140840A1 (en) 2020-10-29 2021-10-29 Systems and methods for data storage
US17/452,783 US11829407B2 (en) 2020-10-29 2021-10-29 Systems and methods for file archiving
EP21205586.7A EP3992807A1 (en) 2020-10-29 2021-10-29 Systems and methods for data storage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011185170.3A CN112182261A (en) 2020-10-29 2020-10-29 Image storage method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112182261A true CN112182261A (en) 2021-01-05

Family

ID=73917936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011185170.3A Pending CN112182261A (en) 2020-10-29 2020-10-29 Image storage method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112182261A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113096776A (en) * 2021-04-30 2021-07-09 平安好医投资管理有限公司 DICOM image file storage method, DICOM image file storage device, electronic equipment and DICOM image file storage medium
CN114090521A (en) * 2021-11-19 2022-02-25 中国银行股份有限公司 Image uploading method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109740366A (en) * 2019-01-03 2019-05-10 深圳壹账通智能科技有限公司 Image Management method, apparatus, computer equipment and storage medium
CN110570928A (en) * 2019-09-11 2019-12-13 浪潮软件股份有限公司 HBase and ozone based medical image file access method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109740366A (en) * 2019-01-03 2019-05-10 深圳壹账通智能科技有限公司 Image Management method, apparatus, computer equipment and storage medium
CN110570928A (en) * 2019-09-11 2019-12-13 浪潮软件股份有限公司 HBase and ozone based medical image file access method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113096776A (en) * 2021-04-30 2021-07-09 平安好医投资管理有限公司 DICOM image file storage method, DICOM image file storage device, electronic equipment and DICOM image file storage medium
CN114090521A (en) * 2021-11-19 2022-02-25 中国银行股份有限公司 Image uploading method and device

Similar Documents

Publication Publication Date Title
CN110276002B (en) Search application data processing method and device, computer equipment and storage medium
CN109215771B (en) Medical mapping relation library establishment method, device, computer equipment and storage medium
US20050055383A1 (en) Capturing session activity as in-memory snapshots using a time-based sampling technique within a database for performance tuning and problem diagnosis
CN112182261A (en) Image storage method and device, computer equipment and storage medium
US11347711B2 (en) Sparse infrastructure for tracking ad-hoc operation timestamps
CN109783457B (en) CGI interface management method, device, computer equipment and storage medium
US20080071992A1 (en) Method and Apparatus for Space Efficient Identification of Candidate Objects for Eviction from a Large Cache
CN110287201A (en) Data access method, device, equipment and storage medium
CN114911830A (en) Index caching method, device, equipment and storage medium based on time sequence database
CN105117489B (en) Database management method and device and electronic equipment
Li et al. Database management strategy and recovery methods of Android
CN112527923A (en) Unstructured data storage method and device, computer equipment and storage medium
CN113051221A (en) Data storage method, device, medium, equipment and distributed file system
CN114238334A (en) Heterogeneous data encoding method and device, heterogeneous data decoding method and device, computer equipment and storage medium
US9405786B2 (en) System and method for database flow management
CN112286457A (en) Object deduplication method and device, electronic equipment and machine-readable storage medium
CN112256649A (en) Medical file storage method and device
CN112783866A (en) Data reading method and device, computer equipment and storage medium
KR20220013084A (en) Document storage management server for performing storage processing of document files received from a client terminal in conjunction with a plurality of document storage and operating method thereof
CN115858471A (en) Service data change recording method, device, computer equipment and medium
CN114067964B (en) Medical image data processing method, device, computer equipment and storage medium
CN112447280A (en) Intelligent medical system for medical image information management
KR100359234B1 (en) Method for constructing and retrievalling a data base of a medical image by using a content-based indexing technique and recording medium thereof
CN113946365A (en) Page identification method and device, computer equipment and storage medium
CN117194350B (en) Document storage method and system in engineering construction stage of data center

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