Scanning imaging method and device and medical imaging system
By using two independent processes in the medical imaging system to perform real-time image building and post-image building tasks, the inefficiency problem caused by resource conflicts in the existing technology is solved, and the parallel execution of tasks and efficient utilization of resources are achieved.
Patent Information
- Application Number
- CN202411859570.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-05-13
AI Technical Summary
In medical imaging systems, if there are both real-time image building tasks and post-image building tasks, the existing technology image building methods are less efficient and easily lead to resource conflicts. The post-image building tasks need to be suspended to prioritize real-time image building tasks.
By running two independent processes in a medical imaging system, one is used to perform real-time image building tasks and the other is used to perform post-image building tasks, and processes are isolated from each other to avoid competing for the same physical resources.
The parallel execution of real-time image building tasks and post-image building tasks is realized, which avoids resource conflicts and improves the image building efficiency of medical imaging systems and the utilization rate of computing resources.
Smart Images

Figure CN119993403A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical imaging technology, and in particular to a scanning imaging method and device, and a medical imaging system. Background Art
[0002] Computer tomography (CT) imaging technology is currently a major imaging technology for clinical diagnosis. Image reconstruction is a very important working link of the CT imaging system. Image reconstruction refers to the processing of the scan data (i.e., attenuated signal data, also called raw data) obtained by the CT imaging system when scanning the scanned object to generate a cross-sectional image of the scanned object.
[0003] Image reconstruction can include real-time imaging and post-imaging. The reconstruction speed of real-time imaging is relatively fast, and the quality of the generated image is relatively low. It can be used to provide a real-time overview of the scanning status of the scanned object during the scanning process. The reconstruction speed of post-imaging is relatively slow, and the quality of the generated image is relatively high, which can be used for subsequent diagnosis. If there are real-time imaging tasks and post-imaging tasks in the CT imaging system at the same time, it may cause resource conflicts in the CT imaging system.
[0004] In the related art, if there are both real-time imaging tasks and post-imaging tasks in a CT imaging system, the CT imaging system needs to suspend the post-imaging task, give priority to the real-time imaging task, and restart the post-imaging task after the real-time imaging task is completed, so as to avoid the problem of resource conflict in the CT imaging system. However, the imaging method in the related art is inefficient. Summary of the invention
[0005] The present invention provides a scanning imaging method and device, and a medical imaging system, which can solve the problem of low efficiency of the imaging method of the medical imaging system in the related art when the medical imaging system needs to perform real-time imaging tasks and post-imaging tasks at the same time. The technical solution is as follows:
[0006] In one aspect, a scanning imaging method is provided, which is applied to a medical imaging system, wherein a first process and a second process are running in the medical imaging system; the method comprises:
[0007] receiving an image reconstruction command;
[0008] In response to the image reconstruction command, a real-time imaging task is performed by a first process, and a post-imaging task is performed by a second process.
[0009] Optionally, the time period during which the real-time imaging task is executed by the first process overlaps with the time period during which the post-imaging task is executed by the second process.
[0010] Optionally, the medical imaging system includes: a memory and a first disk, wherein the memory stores a first data file obtained by scanning; performing a real-time imaging task through a first process, and performing a post-imaging task through a second process, including:
[0011] Reading a first data file from a memory through a first process, and executing a real-time imaging task based on the read first data file;
[0012] The second data file required for post-imaging is read from the first disk through the second process, and the post-imaging task is performed based on the read second data file.
[0013] Optionally, the medical imaging system further includes: a second disk; after reading the first data file from the memory through the first process, the method further includes:
[0014] Writing the first data file read from the memory to the second disk through the first process;
[0015] The second disk also stores a second data file, and the second data file stored in the second disk is read from the memory and written to the second disk by the first process;
[0016] The second data file in the first disk is written to the first disk by the first process during the process of the first process writing the second data file to the second disk;
[0017] Alternatively, the second data file in the first disk is copied from the second disk to the first disk through the second process in response to the image reconstruction command.
[0018] Optionally, reading a second data file required for post-image building from the first disk by a second process includes:
[0019] In the case where the first disk stores the second data file, reading the second data file from the first disk through the second process;
[0020] The method also includes:
[0021] In the case that the first disk does not store the second data file, the second data file is read from the second disk through the second process.
[0022] Optionally, after reading the second data file from the second disk by the second process, the method further includes:
[0023] The read second data file is written to the first disk.
[0024] Optionally, the first disk is a virtual disk implemented by partial memory simulation of the memory.
[0025] Optionally, the first disk stores a plurality of second data files; the method further includes:
[0026] If the remaining space of the first disk is insufficient, the second data files whose usage frequencies are lower than the frequency threshold among the plurality of second data files are deleted.
[0027] Optionally, the medical imaging system records a numerical value indicating the usage frequency of each second data file; before deleting the second data files whose usage frequency is lower than the frequency threshold among the plurality of second data files, the method further includes:
[0028] Based on the values of the respective second data files, a second data file whose usage frequency is lower than a frequency threshold is determined from the plurality of second data files.
[0029] Optionally, the method further includes:
[0030] Each time a target second data file among the plurality of second data files is accessed, the value of the target second data file is set to the target value, and the values of the other second data files are updated, the updated values being greater than the values before the update;
[0031] The other second data files are second data files other than the target second data file among the plurality of second data files, and the target value is smaller than the updated value of each of the other second value files.
[0032] Optionally, based on the values of each second data file, determining a second data file whose usage frequency is lower than a frequency threshold from multiple second data files includes: determining the second data file whose value is greater than the value threshold as a second data file whose usage frequency is lower than the frequency threshold.
[0033] Optionally, the medical imaging system includes: a plurality of graphics cards, and a graphics card management process is running; and the real-time imaging task is executed through the first process, including:
[0034] Calling the graphics card management process through the first process, so that the graphics card management process obtains a preset number of target graphics cards in idle state from multiple graphics cards, and locks each target graphics card;
[0035] The locked target graphics cards are used to respond to the image creation request sent by the first process, but are prohibited from responding to the image creation request sent by other processes except the first process.
[0036] Optionally, after the real-time imaging task is completed, the method further includes:
[0037] The graphics card management process is called by the first process, so that the graphics card management process unlocks each target graphics card.
[0038] Optionally, the first process is also used to execute a scanning task; the first process executes the scanning task and the real-time imaging task in series.
[0039] On the other hand, a scanning imaging device is provided, which is applied to a medical imaging system, in which a first process and a second process are running; the device comprises:
[0040] A receiving module, used for receiving an image reconstruction command;
[0041] An imaging module, for executing a real-time imaging task through a first process and a post-imaging task through a second process in response to an image reconstruction command;
[0042] The time period during which the real-time imaging task is executed by the first process overlaps with the time period during which the post-imaging task is executed by the second process.
[0043] In yet another aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the scanning imaging method described in the above aspect is implemented.
[0044] On the other hand, a medical imaging system is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the scanning imaging method described in the above aspects is implemented.
[0045] The beneficial effects brought about by the technical solution provided by the present invention include at least:
[0046] The embodiment of the present invention provides a scanning imaging method and device, and a medical imaging system. After receiving an image reconstruction command, the medical imaging system can execute a real-time imaging task through a first process running in the medical imaging system and execute a post-imaging task through a second process running in the medical imaging system in response to the image reconstruction command. Since the processes are isolated from each other, the real-time imaging task executed by the first process and the post-imaging task executed by the second process will not compete for the same physical resources (such as a disk and a graphics card, etc.). Therefore, when the real-time imaging task and the post-imaging task exist in the medical imaging system at the same time, the real-time imaging task and the post-imaging task can be implemented in parallel without first interrupting the post-imaging task, thereby effectively improving the imaging efficiency of the medical imaging system and the utilization rate of the computing resources of the medical imaging system.
[0047] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 is a flow chart of a scanning imaging method provided by an embodiment of the present invention;
[0049] Figure 2 is a flow chart of another scanning imaging method provided by an embodiment of the present invention;
[0050] Figure 3 is a schematic diagram of the structure of a medical imaging system provided by an embodiment of the present invention;
[0051] Figure 4 is a block diagram of a scanning imaging device provided by an embodiment of the present invention;
[0052] Figure 5 It is a block diagram of another scanning imaging device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0053] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0054] CT imaging technology is currently a major imaging technology for clinical diagnosis. Image reconstruction is a very important working link of the CT imaging system. Image reconstruction refers to the processing of the scan data obtained by the CT imaging system to generate a cross-sectional image of the scanned object.
[0055] Image reconstruction may include real-time imaging and post-imaging. The reconstruction speed of real-time imaging is relatively fast, and the quality of the generated image is relatively low. It can be used to provide a real-time overview of the scanning status of the scanned object during the scanning process. The reconstruction speed of post-imaging is relatively slow, and the quality of the generated image is relatively high. It can be used for subsequent diagnosis. If the real-time imaging task and the post-imaging task exist in the CT imaging system at the same time, it may cause resource conflicts in the CT imaging system. The scanning data used by the real-time imaging task and the post-imaging task may be different.
[0056] Specifically, the real-time imaging task is accompanied by the data collection process, and the collected data needs to be written to the disk in real time, while the post-imaging task needs to read the data from the disk. It can be seen that there is disk I0 competition between the real-time imaging task and the post-imaging task. In addition, both the real-time imaging task and the post-imaging task need to use the graphics card for calculation (such as processing and rendering images) during execution, so there is also a conflict in the graphics card computing resources. Among them, the graphics card can provide computing resources for the CT imaging system.
[0057] In the related art, if there are both real-time imaging tasks and post-imaging tasks in a CT imaging system, the CT imaging system needs to suspend the post-imaging task, give priority to the real-time imaging task, and restart the post-imaging task after the real-time imaging task is completed, so as to avoid the problem of resource conflict in the CT imaging system. However, the imaging method in the related art is inefficient.
[0058] It is understandable that the real-time imaging task and the post-imaging task in the CT imaging system may be for the same scan object or for different scan objects. In the case of the same scan object, the real-time imaging task and the post-imaging task are for different scan tasks. In other words, the real-time imaging task and the post-imaging task are not for the same scan of the same scan object.
[0059] Figure 1 This is a flow chart of a scanning imaging method provided by an embodiment of the present invention, which is applied to a medical imaging system. Optionally, the medical imaging system may be a CT imaging system, a positron emission computed tomography (PET) imaging system, or a magnetic resonance imaging (MRI) system. For example, the medical imaging system is a CT imaging system. A first process and a second process are running in the medical imaging system. Reference Figure 1 , the method comprising:
[0060] Step 101: Receive an image reconstruction command.
[0061] The image reconstruction command includes: a real-time imaging command for the scan data of the first object, and a post-imaging command for the scan data of the second object. The first object and the second object may be the same or different.
[0062] Optionally, when the first object and the second object are the same, that is, when the real-time imaging command and the post-imaging command are directed to the same scan object, the scan tasks directed by the real-time imaging command and the post-imaging command may not be the same scan task.
[0063] The receiving time of the real-time imaging command and the post-imaging command may be the same or different. Specifically, the post-imaging command may be received by the medical imaging system in the process of executing the real-time imaging task. Alternatively, the medical imaging system may receive the real-time imaging command to execute the real-time imaging task in the process of executing the post-imaging task. Alternatively, the medical imaging system may receive the real-time imaging command and the post-imaging command at the same time.
[0064] Step 102: In response to an image reconstruction command, a real-time imaging task is executed through a first process, and a post-imaging task is executed through a second process.
[0065] After the medical imaging system is started, the first process and the second process can be run. In response to the real-time imaging command, the medical imaging system can execute the real-time imaging task by calling the first process and execute the post-imaging task by calling the second process.
[0066] When a medical imaging system has both real-time imaging tasks and post-imaging tasks, since the reception times of the real-time imaging command and the post-imaging command may be the same or different, the time period during which the medical imaging system executes the real-time imaging task through the first process overlaps with the time period during which the medical imaging system executes the post-imaging task through the second process.
[0067] In summary, an embodiment of the present invention provides a scanning imaging method, wherein after receiving an image reconstruction command, the medical imaging system can execute a real-time imaging task through a first process running in the medical imaging system and execute a post-imaging task through a second process running in the medical imaging system in response to the image reconstruction command. Since the processes are isolated from each other, the real-time imaging task executed by the first process and the post-imaging task executed by the second process will not compete for the same physical resources (such as a disk and a graphics card, etc.). Thus, in the case where both the real-time imaging task and the post-imaging task exist in the medical imaging system, the real-time imaging task and the post-imaging task can be implemented in parallel without first interrupting the post-imaging task, thereby effectively improving the imaging efficiency of the medical imaging system and the utilization rate of the computing resources of the medical imaging system.
[0068] The embodiment of the present invention takes the case where a real-time imaging task and a post-imaging task exist in a medical imaging system at the same time, and the post-imaging task command is received by the medical imaging system during the execution of the real-time imaging task, that is, the post-imaging task is started during the real-time imaging process as an example to exemplify the scanning imaging method provided by the embodiment of the present invention, and the method can be applied to the medical imaging system. Figure 2 , the method may include:
[0069] Step 201: Start the medical imaging system and run the first process and the second process.
[0070] The first process may be used to execute the real-time imaging task, and the second process may be used to execute the post-imaging task. The number of the first process may be one, and the number of the second process may be one or more.
[0071] It is understandable that currently, medical imaging systems cannot scan multiple scanned objects at the same time, and real-time imaging is completed during the scanning of the scanned object, so the number of the first process can be one. The subsequent imaging task is started after the medical imaging system finishes scanning the scanned object, so the number of the second process can be one or more.
[0072] Step 202: Receive a real-time imaging command.
[0073] In an embodiment of the present invention, the medical imaging system may be provided with a first button, and the real-time imaging command may be generated by a touch operation on the first button. In other words, the medical imaging system may receive the real-time imaging command in response to the touch operation on the first button.
[0074] Optionally, the first button may be a physical button, or may be a virtual control.
[0075] Step 203: In response to the real-time image creation command, the graphics card management process is called by the first process, so that the graphics card management process obtains a preset number of idle target graphics cards from the multiple graphics cards, and locks each target graphics card.
[0076] The locked target graphics cards are used to respond to the imaging request sent by the first process, and are prohibited from responding to the imaging request sent by other processes except the first process. The preset number can be calculated by the medical imaging system in response to the real-time imaging command. Specifically, after receiving the real-time imaging command and before the first process obtains the scan data, the medical imaging system can calculate the preset number by calling the graphics card management process through the first process.
[0077] It is understandable that, due to the high real-time requirements of the real-time imaging task, when executing the real-time imaging task, the medical imaging system needs to give priority to the application of the graphics card resources for the real-time imaging task. In order to avoid the graphics card resources being occupied by tasks of other processes during the execution of the real-time imaging task, which may affect the real-time performance of the real-time imaging task, the medical imaging system can pre-lock a preset number of idle target graphics cards in response to the real-time imaging command to ensure the real-time performance of the real-time imaging task.
[0078] Specifically, the medical imaging system may send a graphics card resource application request to an interface provided by the graphics card management process through the first process. The graphics card management process may then respond to the graphics card resource application request, search for a preset number of graphics cards that are idle, and update their status to locked, waiting for the call of the first process. Optionally, among the multiple graphics cards included in the medical imaging system, the display status of each graphics card may be recorded in a graphics card status queue. The status of each graphics card may be idle, busy, initializing, locked, etc.
[0079] When the graphics card management process of the medical imaging system searches for a preset number of graphics cards in the graphics card status queue that are idle, if the number of graphics cards in the current idle state is less than the preset number of alternatives, the graphics card management process can first lock the graphics cards in the alternative state that are idle. Then, the graphics card management process can wait for a preset time. During the waiting process, if the state of a graphics card in a non-idle state is updated to idle, the graphics card management process locks the graphics card until the number of graphics cards in the locked state is greater than or equal to the preset number. If the waiting time exceeds the preset time, the graphics card management process can consider that the graphics card is in an abnormal state, and then the process can be terminated.
[0080] In the embodiment of the present invention, the application of the first process or the second process of the medical imaging system for the graphics card resources must be implemented by calling the interface provided by the graphics card management process.
[0081] Step 204: read the first data file from the memory through the first process, and execute the real-time imaging task based on the read first data file.
[0082] After the medical imaging system obtains the first data file (i.e., the scan data mentioned above) obtained by scanning the scanned object, the first data file will be stored in the memory first. Therefore, in response to the real-time imaging command, the medical imaging system can read the first data file from the memory through the first process and perform the real-time imaging task based on the read first data file.
[0083] In the embodiment of the present invention, after the medical imaging system completes the real-time imaging task, the graphics card management process may be called by the first process so that the graphics card management process unlocks each target graphics card.
[0084] Specifically, after the medical imaging system completes the real-time imaging task, it can send a graphics card resource release request to the interface provided by the graphics card management process through the first process. In response to the graphics card resource release request, the graphics card management process can unlock each target graphics card and update the status of each target graphics card to idle. Each target graphics card in the idle state can be used for scheduling by other processes.
[0085] Step 205: Write the first data file read from the memory to the second disk through the first process.
[0086] After the medical imaging system reads the first data file from the memory through the first process, the first data file can be written to the second disk through the first process. The second disk is a physical disk. In this way, it can be ensured that the medical imaging system can obtain the scan data (i.e., the first data file) from the second disk when performing the post-imaging task later, that is, the smooth execution of the post-imaging can be ensured.
[0087] Specifically, the medical imaging system runs a disk file access management process. After the medical imaging system reads the first data file from the memory through the first process, it can send a write request to the interface provided by the disk file access management process. The write request may include the first data file to be written and the storage information of the first data file. In response to the write request, the disk file access management process may write the first data file to the storage area indicated by the storage information in the second disk. For example, the storage information may include a file path.
[0088] In the embodiment of the present invention, the access operation of the process of the medical imaging system (such as the first process or the second process) to the files in the first disk and the second disk can be implemented through the interface provided by the disk file access management process. The access operation includes not only the write operation, but also the operations of opening, closing, reading, obtaining the file size, and jumping the file pointer.
[0089] It is understandable that after a process of the medical imaging system (such as the first process or the second process) opens a file through the disk file access management process, the disk file access management process can create a file handle for the file and record the pointer of the file handle in the handle pointer queue. In addition, the disk file access management process can also record the file information of the file in the handle pointer queue to manage and track the status of the file. The file information may include: file name, file location pointer, file opening times, and file size, etc.
[0090] Then, the first process and the second process can access the file through the file handle, and the file handle can transmit the access operation for the file. The disk file access management process can manage the access operation of the first process or the second process to the file based on the file handle and the handle pointer queue.
[0091] Furthermore, the disk file access management process can update the file information (such as the file location pointer, etc.) recorded in the handle pointer queue based on the access operation to the file to ensure the correctness of the file operation. When the first process and the second process no longer need to access the file, that is, when the access operation of the file is closed, the disk file access management process can close the file handle of the file and delete the pointer and file information of the file handle from the handle pointer queue to release resources.
[0092] Optionally, after writing the first data file to the second disk, the medical imaging system may delete the first data file in the memory to release the memory.
[0093] Step 206: During the process of executing the real-time imaging task through the first process, a post-imaging command is received.
[0094] In an embodiment of the present invention, the medical imaging system may be provided with a second button, and the post-imaging command may be generated by a touch operation on the second button. In other words, the medical imaging system may receive the post-imaging command in response to the touch operation on the second button.
[0095] Optionally, the second button may be a physical button or a virtual control.
[0096] It is understandable that the post-imaging command and the real-time imaging command mentioned above may target the same or different scanning objects. When the real-time imaging command and the post-imaging command target the same scanning object, the real-time imaging command and the post-imaging command target different scanning tasks.
[0097] Step 207: In response to the post-imaging command, determine through a second process whether the first disk stores a second data file required for imaging.
[0098] If the first disk stores the second data file, the medical imaging system may execute step 208. If the first disk does not store the second data file, the medical imaging system may execute step 209. The second data file may be the same as or different from the first data file described above.
[0099] Optionally, in response to the post-imaging command, the medical imaging system may copy the second data file in the second disk to the first disk through the second process. Afterwards, the medical imaging system reads the second data file from the first disk to perform the post-imaging task. However, due to some reasons (such as network failure), there may be a copy failure. Therefore, when the medical imaging system reads the second data file from the first disk, it may first determine whether the first disk stores the second data file required for imaging through the second process.
[0100] Optionally, the first disk may be a physical disk or a virtual disk. For example, the first disk may be a virtual disk.
[0101] In the embodiment of the present invention, when the first disk is a virtual disk, the first disk may be a virtual disk implemented by partial memory simulation of a memory, thereby reducing the hardware cost of the medical imaging system.
[0102] Step 208: Read the second data file required for the subsequent image creation from the first disk through the second process.
[0103] When it is determined that the first disk stores the second data file, the second process of the medical imaging system can directly read the second data file required for post-imaging from the first disk.
[0104] When the first disk is a virtual disk, since the read and write speed of the memory is faster than that of the disk, the second process can quickly read the second data file from the first disk compared to the second disk, thereby improving the imaging efficiency of the medical imaging system.
[0105] It is understandable that, in the case where there are multiple post-imaging tasks, the medical imaging system can synchronously read the second data file required for imaging from the first disk through the second process corresponding to the multiple post-imaging tasks, so as to synchronously execute the multiple post-imaging tasks. Thus, the imaging efficiency of the medical imaging system can be further improved.
[0106] Step 209: Read the second data file from the second disk through the second process.
[0107] When it is determined that the first disk does not store the second data file, the medical imaging system may read the second data file from the second disk through a second process.
[0108] In the embodiment of the present invention, when the first process and the second process need to access the second disk at the same time, the disk access operation of the first process needs to be guaranteed first. Therefore, when the medical imaging system is reading the second data file from the second disk through the second process, if the first process needs to write the first data file to the second disk, the disk access scene of the second process can be reserved first, and after the first data file is written, the disk access scene can be restored to ensure the writing operation of the first process to the second disk.
[0109] Specifically, when the medical imaging system is reading the second data file from the second disk through the second process, if the first process needs to write the first data file to the second disk, the disk file access management process can suspend the second process's access operation (such as read operation) to the file in the second disk, and ensure the first process's access operation to the file. For example, the medical imaging system's disk file access management process can traverse the handle pointer queue to obtain and save the file information of all files in the second disk accessed by the second process, so as to save the disk access operation of the second process. In addition, the disk file access management process can also suspend the second process's access operation to the file in the second disk, so as to suspend the second process's access operation to the file, and ensure that only the first process accesses the second disk.
[0110] After the first process writes the first data file to the second disk, the disk file access management process can restore the disk access scene of the second process according to the saved file information to restore the access operation of the second process to the second disk.
[0111] In an embodiment of the present invention, after the medical imaging system reads the second data file from the second disk through the second process, it can also write the read second data file to the first disk, so that the medical imaging system can directly obtain the second data file from the first disk when performing a post-imaging task based on the second data file next time. It can be seen that the second data file in the first disk can be copied from the second disk to the first disk through the second process after the medical imaging system reads the second data file from the second disk through the second process in response to the image reconstruction command. The process of the medical imaging system reading the second data file from the second disk and writing it to the first disk through the second process can include the following steps A1 to A4:
[0112] Step A1: Determine whether the remaining space of the first disk is sufficient.
[0113] The medical imaging system may obtain the remaining space of the first disk through the disk file access management process, and determine whether the remaining space of the first disk is sufficient. If the remaining space is insufficient, the medical imaging system may execute step A2. If the remaining space is sufficient, the medical imaging system may execute step A4.
[0114] In the embodiment of the present invention, since the first disk can be a virtual disk implemented by partial memory simulation of the memory, and the memory resource is relatively precious for the medical imaging system, the capacity of the first disk will not be too large. Therefore, before writing the second data file to the first disk, the medical imaging system needs to determine whether the remaining space of the first disk is sufficient.
[0115] Step A2: Determine a second data file among a plurality of second data files whose usage frequency is lower than a frequency threshold.
[0116] When the medical imaging system determines that the remaining space of the first disk is insufficient, it may determine a second data file among the plurality of second data files whose usage frequency is lower than a frequency threshold.
[0117] In the embodiment of the present invention, the medical imaging system records a numerical value indicating the usage frequency of each second data file. The medical imaging system can determine a second data file whose usage frequency is lower than a frequency threshold from multiple second data files based on the numerical value of each second data file.
[0118] When the medical imaging system writes the second data file to the first disk, the value of the second data file can be set to an initial value. The initial value is a non-negative integer and can be pre-stored in the medical imaging system. Afterwards, in an optional implementation, each time the medical imaging system accesses (such as reads) a target second data file in a plurality of second data files, the value of the target second data file can be set to a target value, and the values of each other second data file can be updated. The updated value is greater than the value before the update. For example, the updated value is 1 greater than the value before the update. Among them, the other second data files are second data files other than the target second data file in the plurality of second data files. The target value can be less than the difference between the updated value and the value before the update. Optionally, the target value can be 0.
[0119] In this implementation, the medical imaging system may determine the second data file whose value is greater than the value threshold as the second data file whose usage frequency is lower than the frequency threshold. The value threshold may be pre-stored by the medical imaging system. The value threshold may be slightly greater than the target value, so that the most recently used second data file may be effectively prevented from being deleted.
[0120] In another optional implementation, for each second data file, the CT imaging system updates the value of the second data file each time it reads the second data file, and the updated value is greater than the value before the update, for example, the updated value is 1 greater than the value before the update. In this implementation, the CT imaging system can determine the second data file whose value is less than a preset threshold as a second data file with low usage frequency. The preset threshold can be pre-stored by the medical imaging system.
[0121] In an embodiment of the present invention, the disk file access management process can record a numerical value indicating the usage frequency of each second data file through a file queue. Specifically, the disk file access management process can record multiple second data files and attribute information of each second data file in the file queue. The attribute information may include: the size of the file and the sequence number of the file. The sequence number of each second data file can be used to indicate the usage frequency of the second data file, that is, the sequence number is the numerical value described above.
[0122] Step A3: Delete the second data files whose usage frequency is lower than the frequency threshold among the plurality of second data files.
[0123] It is understandable that the medical imaging system may continue to perform step A1 after deleting the second data files whose usage frequency is lower than the frequency threshold among the multiple second data files. That is, when the remaining space of the first disk is insufficient, the medical imaging system may first delete the second data files whose usage frequency is lower than the frequency threshold, and then write the read second data files to the first disk when it is determined that the remaining space is sufficient.
[0124] Step A4: Write the read second data file to the first disk
[0125] When the medical imaging system determines that the remaining space of the first disk is sufficient, the second data file may be directly written to the first disk.
[0126] Step 210: Execute the post-image task based on the read second data file through the second process.
[0127] After the second process of the medical imaging system reads the second data file, it can perform a post-imaging task based on the second data file.
[0128] In the embodiment of the present invention, the disk file access management process needs to accurately distinguish the file operations for the first disk and the second disk. Taking the first disk as a virtual disk as an example, the process of distinguishing the file operations for the first disk and the second disk by the disk file access management process is exemplarily described as follows:
[0129] When the first process (or the second process) of the medical imaging system needs to access the target file, it will first send an open request for the target file to the file open interface provided by the disk file access management process. The open request includes the file path of the target file. If the file path corresponds to a physical disk, the disk file access management process can record the file position pointer of the target file, and can perform a forward offset of a specific size on the file position pointer, and return the offset file position pointer to the first process (or the second process). Among them, the file pointer after the forward offset exceeds the range of the valid pointer of the operating system.
[0130] Afterwards, the first process (or the second process) of the medical imaging system sends an access request to the target file to other file operation interfaces (such as a write interface or a read interface, etc.) provided by the disk file access management process. After receiving the access request, the disk file access management process can determine whether the file location pointer exceeds the range of valid pointers of the operating system. If the file location pointer exceeds the range of valid pointers of the operating system, the disk file access management process can consider that the file location pointer is for a physical disk. Then, the disk file access management process can reversely offset the file pointer by a specific size to obtain the original file location pointer. If the file location pointer does not exceed the range of valid pointers of the operating system, the disk file access management process can consider that the file location pointer is for a virtual disk. Specific sizes and ranges of valid pointers can be pre-stored in the medical imaging system.
[0131] It is understandable that the real-time imaging task is usually executed synchronously with the scanning task. During the scanning task, the collected data needs to be written to the disk in real time. The post-imaging task needs to read data from the disk. Therefore, there is disk IO competition between the scanning task and the post-imaging task.
[0132] In an embodiment of the present invention, when the medical imaging system performs a scanning task, the first data file in the memory can be written to the second disk, and when the medical imaging system performs a post-imaging task, the second data file is read from the first disk first. Thus, the reading operation of the medical imaging system on the first disk and the writing operation on the second disk can be separated. Thus, when the medical imaging system performs a post-imaging task based on the second data file stored in the first disk, the process of writing the first data file to the second disk during the real-time imaging process is not affected. Thus, the disk IO competition between the real-time imaging task and the post-imaging task is avoided, and the problem of resource conflict in the medical imaging system is reduced.
[0133] It is understandable that the scanning task can also be executed through the first process. In this case, the scanning task and the real-time imaging task can be executed in series.
[0134] The above embodiment is an exemplary description of the medical imaging system responding to an image reconstruction command (such as a post-construction image command) and writing the second data file in the second disk to the first disk through the second process. It can be understood that the medical imaging system can also write the second data file to the first disk through the first process during the process of writing the second data file to the second disk by the first process.
[0135] It is understandable that the order of the steps of the scanning imaging method provided by the embodiment of the present invention can be appropriately adjusted, and the steps can be increased or decreased accordingly according to the situation. For example, step 201 can be deleted according to the situation; or, steps 207 to 210 can be performed before step 202. Any person skilled in the art who can easily think of a method of variation within the technical scope disclosed in this application should be included in the protection scope of this application, so it will not be repeated.
[0136] In summary, an embodiment of the present invention provides a scanning imaging method, wherein after receiving an image reconstruction command, the medical imaging system can execute a real-time imaging task through a first process running in the medical imaging system and execute a post-imaging task through a second process running in the medical imaging system in response to the image reconstruction command. Since the processes are isolated from each other, the real-time imaging task executed by the first process and the post-imaging task executed by the second process will not compete for the same physical resources (such as a disk and a graphics card, etc.). Thus, in the case where both the real-time imaging task and the post-imaging task exist in the medical imaging system, the real-time imaging task and the post-imaging task can be implemented in parallel without first interrupting the post-imaging task, thereby effectively improving the imaging efficiency of the medical imaging system and the utilization rate of the computing resources of the medical imaging system.
[0137] The embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned scanning imaging method is implemented. For example, Figure 1 or Figure 2 The scanning imaging method shown.
[0138] Figure 3 is a schematic diagram of the structure of a medical imaging system provided by an embodiment of the present invention, such as Figure 3 As shown, the medical imaging system 30 may include a memory 301, a processor 302, and a computer program stored in the memory 301 and executable on the processor 302. When the processor 302 executes the computer program, the scanning imaging method shown in the above embodiment is implemented. Figure 1 or Figure 2 The scanning imaging method shown.
[0139] Figure 4 is a process diagram of a scanning imaging device provided by an embodiment of the present invention, the device is applied to a medical imaging system, and a first process and a second process are running in the medical imaging system; Figure 4 As shown, the device 40 includes:
[0140] The receiving module 401 is used to receive an image reconstruction command.
[0141] The imaging module 402 is used to execute a real-time imaging task through a first process and a post-imaging task through a second process in response to an image reconstruction command.
[0142] Optionally, the time period during which the real-time imaging task is executed by the first process overlaps with the time period during which the post-imaging task is executed by the second process.
[0143] Optionally, the medical imaging system includes: a memory and a first disk, wherein the memory stores a first data file obtained by scanning; and the imaging module 402 can be used for:
[0144] Reading a first data file from a memory through a first process, and executing a real-time imaging task based on the read first data file;
[0145] The second data file required for post-imaging is read from the first disk through the second process, and the post-imaging task is performed based on the read second data file.
[0146] Optionally, the medical imaging system further comprises: a second disk. Figure 5 The device 40 may further include a first writing module 403. The first writing module 403 may be used to: after reading the first data file from the memory through the first process, write the first data file read from the memory to the second disk through the first process;
[0147] The second disk also stores a second data file, and the second data file stored in the second disk is read from the memory and written to the second disk by the first process;
[0148] The second data file in the first disk is written to the first disk by the first process during the process of the first process writing the second data file to the second disk;
[0149] Alternatively, the second data file in the first disk is copied from the second disk to the first disk through the second process in response to the image reconstruction command.
[0150] Optionally, the image building module 402 may be configured to: when the first disk stores the second data file, read the second data file from the first disk through a second process.
[0151] Please continue to see Figure 5 The device 40 may further include a reading module 404. The reading module 404 may be configured to: read the second data file from the second disk through a second process when the first disk does not store the second data file.
[0152] Optional, such as Figure 5As shown, the device 40 may further include a second writing module 405. The second writing module 405 may be configured to: after reading the second data file from the second disk through the second process, write the read second data file to the first disk.
[0153] Optionally, the first disk is a virtual disk implemented by partial memory simulation of the memory.
[0154] Optionally, the first disk stores a plurality of second data files. Figure 5 It can be seen that the device 40 may further include a deletion module 406, which may be used to delete a second data file whose usage frequency is lower than a frequency threshold among the plurality of second data files if the remaining space of the first disk is insufficient.
[0155] Optionally, the medical imaging system records a numerical value indicating the usage frequency of each second data file. Figure 5 As shown, the device 40 may further include a determination module 407, which may be used to: before deleting second data files with a usage frequency lower than a frequency threshold among multiple second data files, determine, based on the values of each second data file, second data files with a usage frequency lower than the frequency threshold from the multiple second data files.
[0156] Optional, such as Figure 5 As shown, the apparatus 40 may further include an updating module 408, which may be used to:
[0157] Each time a target second data file among the plurality of second data files is accessed, the value of the target second data file is set to the target value, and the values of the other second data files are updated, the updated values being greater than the values before the update;
[0158] The other second data files are second data files other than the target second data file among the multiple second data files; and the target value is smaller than the updated value of each of the other second value files.
[0159] Optionally, the determination module 407 may be configured to: determine a second data file whose value is greater than a value threshold as a second data file whose usage frequency is lower than a frequency threshold.
[0160] Optionally, the medical imaging system includes: a plurality of graphics cards, and a graphics card management process is running; the imaging module 402 can be used to:
[0161] Calling the graphics card management process through the first process, so that the graphics card management process obtains a preset number of target graphics cards in idle state from multiple graphics cards, and locks each target graphics card;
[0162] The locked target graphics cards are used to respond to the image creation request sent by the first process, but are prohibited from responding to the image creation request sent by other processes except the first process.
[0163] Optional, such as Figure 5 As shown, the apparatus 40 may further include a release module 409, which may be used to:
[0164] After the real-time image building task is completed, the graphics card management process is called through the first process, so that the graphics card management process releases the locks on each target graphics card.
[0165] Optionally, the first process is also used to execute a scanning task; the first process executes the scanning task and the real-time imaging task in series.
[0166] In summary, an embodiment of the present invention provides a scanning imaging device. After receiving an image reconstruction command, the medical imaging system can execute a real-time imaging task through a first process running in the medical imaging system and execute a post-imaging task through a second process running in the medical imaging system in response to the image reconstruction command. The time period during which the real-time imaging task is executed by the first process overlaps with the time period during which the post-imaging task is executed by the second process. Since the processes are isolated from each other, the real-time imaging task executed by the first process and the post-imaging task executed by the second process will not compete for the same physical resources (such as a disk and a graphics card, etc.). Therefore, in the case where the real-time imaging task and the post-imaging task exist simultaneously in the medical imaging system, the real-time imaging task and the post-imaging task can be executed in parallel without first interrupting the post-imaging task, thereby effectively improving the imaging efficiency of the medical imaging system and the utilization rate of the computing resources of the medical imaging system.
[0167] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0168] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0169] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0170] In the description of the present invention, it is to be understood that the terms “center”, “longitudinal”, “lateral”, “length”, “width”, “thickness”, “up”, “down”, “front”, “back”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, “clockwise”, “counterclockwise”, “axial”, “radial”, “circumferential”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.
[0171] In addition, the terms "first", "second", etc. used in the embodiments of the present invention are only used for descriptive purposes and should not be understood as indicating or implying relative importance, or implicitly indicating the number of technical features indicated in the present embodiment. Therefore, the features defined by the terms "first", "second", etc. in the embodiments of the present invention can explicitly or implicitly indicate that the embodiment includes at least one of the features. In the description of the present invention, the word "multiple" means at least two or two or more, such as two, three, four, etc., unless otherwise clearly and specifically defined in the embodiments.
[0172] In the present invention, unless otherwise clearly specified or limited in the embodiments, the terms "installed", "connected", "connected" and "fixed" etc. in the embodiments should be understood in a broad sense. For example, the connection can be a fixed connection, a detachable connection, or an integrated connection. It can be understood that it can also be a mechanical connection, an electrical connection, etc.; of course, it can also be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal connection of two elements, or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to the specific implementation situation.
[0173] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0174] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A scanning imaging method, characterized in that: Applied to a medical imaging system, wherein a first process and a second process are running in the medical imaging system; the method comprises: receiving an image reconstruction command; In response to the image reconstruction command, a real-time imaging task is performed by the first process, and a post-imaging task is performed by the second process.
2. The method according to claim 1, characterized in that The medical imaging system comprises: a memory and a first disk, wherein the memory stores a first data file obtained by scanning; performing a real-time imaging task through the first process, and performing a post-imaging task through the second process, including: Reading the first data file from the memory through the first process, and executing a real-time imaging task based on the read first data file; The second data file required for post-imaging is read from the first disk through the second process, and the post-imaging task is performed based on the read second data file.
3. The method according to claim 2, characterized in that The medical imaging system further includes: a second disk; after reading the first data file from the memory through the first process, the method further includes: Writing the first data file read from the memory into the second disk through the first process; The second disk also stores the second data file, and the second data file stored in the second disk is read from the memory and written to the second disk by the first process; The second data file in the first disk is written into the first disk by the first process during the process of the first process writing the second data file into the second disk; Alternatively, the second data file in the first disk is copied from the second disk to the first disk through the second process in response to the image reconstruction command.
4. The method according to claim 2, characterized in that: The second data file required for post-image construction is read from the first disk by the second process, including: In a case where the first disk stores the second data file, reading the second data file from the first disk through the second process; The method further comprises: In the case that the first disk does not store the second data file, the second data file is read from the second disk through the second process.
5. The method according to claim 4, characterized in that After reading the second data file from the second disk by the second process, the method further includes: The read second data file is written to the first disk.
6. The method according to claim 2, characterized in that The first disk is a virtual disk implemented by partial memory simulation of the memory.
7. The method according to claim 6, characterized in that The first disk stores a plurality of the second data files; the method further comprises: If the remaining space of the first disk is insufficient, the second data files whose usage frequencies are lower than a frequency threshold among the plurality of second data files are deleted.
8. The method according to claim 7, characterized in that The medical imaging system records a numerical value indicating a usage frequency of each second data file; before deleting a second data file whose usage frequency among a plurality of second data files is lower than a frequency threshold, the method further includes: Each time a target second data file among the plurality of second data files is accessed, the value of the target second data file is set as the target value, and the values of the other second data files are updated, the updated values being greater than the values before the update; Determine the second data file whose value is greater than the value threshold as a second data file whose usage frequency is lower than the frequency threshold; The other second data files are second data files other than the target second data file among the plurality of second data files.
9. The method according to any one of claims 1 to 8, characterized in that: The medical imaging system includes: a plurality of graphics cards, and a graphics card management process is running; and the real-time imaging task is performed through the first process, including: Calling the graphics card management process through the first process, so that the graphics card management process obtains a preset number of target graphics cards in idle state from the multiple graphics cards, and locks each of the target graphics cards; The locked target graphics cards are used to respond to the image building request sent by the first process, and are prohibited from responding to the image building request sent by other processes except the first process; after the real-time image building task is completed, the method further includes: The graphics card management process is called by the first process, so that the graphics card management process unlocks each of the target graphics cards.
10. The method according to any one of claims 1 to 8, characterized in that: The first process is also used to execute a scanning task; the first process executes the scanning task and the real-time imaging task in series.
11. A scanning imaging device, characterized in that: Applied to a medical imaging system, wherein a first process and a second process are running in the medical imaging system; the device comprises: A receiving module, used for receiving an image reconstruction command; An imaging module is used to execute a real-time imaging task through the first process and a post-imaging task through the second process in response to the image reconstruction command.
12. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the scanning imaging method according to any one of claims 1 to 10 is implemented.
13. A medical imaging system, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the scanning imaging method according to any one of claims 1 to 10 is implemented.