CN107291556B - Medical equipment, memory allocation method and device thereof and storage medium - Google Patents

Medical equipment, memory allocation method and device thereof and storage medium Download PDF

Info

Publication number
CN107291556B
CN107291556B CN201710648102.8A CN201710648102A CN107291556B CN 107291556 B CN107291556 B CN 107291556B CN 201710648102 A CN201710648102 A CN 201710648102A CN 107291556 B CN107291556 B CN 107291556B
Authority
CN
China
Prior art keywords
memory
capacity
sequence
dynamic memory
current dynamic
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.)
Active
Application number
CN201710648102.8A
Other languages
Chinese (zh)
Other versions
CN107291556A (en
Inventor
王灿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai United Imaging Healthcare Co Ltd
Original Assignee
Shanghai 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 Shanghai United Imaging Healthcare Co Ltd filed Critical Shanghai United Imaging Healthcare Co Ltd
Priority to CN201710648102.8A priority Critical patent/CN107291556B/en
Publication of CN107291556A publication Critical patent/CN107291556A/en
Application granted granted Critical
Publication of CN107291556B publication Critical patent/CN107291556B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Apparatus For Radiation Diagnosis (AREA)

Abstract

The invention discloses medical equipment, a memory allocation method and device thereof and a storage medium. The method comprises the following steps: when the acquisition of a previous sequence of images is finished, acquiring the acquisition time of a next sequence of images of the previous sequence of images; determining a first memory capacity required by the next sequence of images according to the acquisition time; comparing the first memory capacity with the idle capacity of the current dynamic memory; the current dynamic memory is a memory dynamically allocated for storing the sequence images; and if the first memory capacity is not less than the free capacity of the current dynamic memory, the memory with the memory capacity of the first capacity difference is reallocated for the current dynamic memory on the basis of the current dynamic memory. The method provided by the invention can automatically adjust the dynamic memory for storing the medical images in the medical equipment, ensure that the dynamic memory can completely store the acquired sequence images, and improve the safety and reliability of the sequence image storage.

Description

Medical equipment, memory allocation method and device thereof and storage medium
Technical Field
The invention relates to the technical field of image storage, in particular to medical equipment, a memory allocation method and device thereof and a storage medium.
Background
In the medical field, the mobile C-arm is widely used in orthopedic surgery such as bone setting or reduction, surgical surgery such as removal of foreign bodies from the body or implantation of a pacemaker, and other interventional therapy or radiography.
The principle of moving the C-shaped arm is that after the detector receives an acquisition starting instruction, the detector acquires images for a shooting part, the panel control module stores the acquired images into a preset memory and simultaneously sends a notification to the control unit to notify the image processing module to acquire the acquired images from the preset memory, after the notification is received, the image processing module reads the images from the preset memory and processes and displays the read images, and after the acquisition ending instruction is received, the detector stops acquiring the images. Wherein, during the period from the time when the detector receives the acquisition starting instruction to the time when the detector receives the acquisition ending instruction, all the images acquired by the detector are called a sequence image.
However, in the above process, when the preset memory is full of memory, if the detector acquires the next frame of image, the flat panel control module stores the frame of image into the preset memory and covers the previously stored image in the preset memory, so that the image processing module cannot acquire a complete sequence image from the preset memory, and the security and reliability of the sequence image storage are low.
Disclosure of Invention
The invention provides medical equipment, a memory allocation method and device thereof and a storage medium, which are used for automatically adjusting a dynamic memory for storing sequence images, ensuring that the dynamic memory can store the complete next sequence image in real time and improving the safety, real-time property and reliability of sequence image storage.
In a first aspect, an embodiment of the present invention provides a memory allocation method for a medical device, where the method includes:
when the acquisition of a previous sequence of images is finished, acquiring the acquisition time of a next sequence of images of the previous sequence of images;
determining a first memory capacity required by the next sequence of images according to the acquisition time;
comparing the first memory capacity with the idle capacity of the current dynamic memory; the current dynamic memory is a memory dynamically allocated for storing the sequence images;
and if the first memory capacity is not less than the idle capacity of the current dynamic memory, redistributing a memory with a memory capacity which is a first capacity difference for the current dynamic memory on the basis of the current dynamic memory, wherein the first capacity difference is a difference value obtained by subtracting the idle capacity of the current dynamic memory from the first memory capacity.
In a second aspect, an embodiment of the present invention further provides a memory allocation apparatus for a medical device, where the apparatus includes:
the acquisition time acquisition module is used for acquiring the acquisition time of the next sequence of images of the previous sequence of images when the acquisition of the previous sequence of images is finished;
the first memory capacity determining module is used for determining the first memory capacity required by the next sequence of images according to the acquisition time;
the first capacity comparison module is used for comparing the first memory capacity with the idle capacity of the current dynamic memory; the current dynamic memory is a memory dynamically allocated for storing the sequence images;
the first memory allocation module is configured to, if the first memory capacity is not less than the free capacity of the current dynamic memory, allocate, to the current dynamic memory, a memory whose memory capacity is a first capacity difference based on the current dynamic memory, where the first capacity difference is a difference value obtained by subtracting the free capacity of the current dynamic memory from the first memory capacity.
In a third aspect, an embodiment of the present invention further provides a medical apparatus, including:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the memory allocation method of the medical device provided by any embodiment of the invention.
In a fourth aspect, embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the memory allocation method of a medical device provided in any embodiment of the present invention.
Acquiring the acquisition time of the next sequence image of the previous sequence image when the acquisition of the current sequence image is finished; determining a first memory capacity required by a next sequence of images according to the acquisition time; comparing the first memory capacity with the idle capacity of the current dynamic memory; the current dynamic memory is a memory dynamically allocated for storing the sequence images; and if the first memory capacity is not less than the idle capacity of the current dynamic memory, redistributing the memory with the memory capacity being a memory with a first capacity difference for the current dynamic memory on the basis of the current dynamic memory, wherein the first capacity difference is the difference value of subtracting the idle capacity of the current dynamic memory from the first memory capacity. The technical scheme of the invention realizes automatic adjustment of the dynamic memory for storing the sequence images, ensures that the complete sequence images can be stored in the dynamic memory in real time, improves the safety, real-time performance and reliability of the sequence image storage, simultaneously can avoid the problem of memory space waste caused by opening up a large-capacity preset memory for storing the acquired sequence images, and also can solve the problems of slow execution speed, blocking or limited development of certain functions and the like of other processes caused by the fact that only a relatively small-capacity memory in the medical equipment can be used by other processes due to the opening up of the large-capacity preset memory for storing the acquired sequence images, thereby improving the utilization rate of the memory.
Drawings
Fig. 1 is a flowchart of a memory allocation method of a medical device according to a first embodiment of the present invention;
fig. 2 is a flowchart of a memory allocation method of a medical device according to a second embodiment of the present invention;
fig. 3 is a flowchart of a memory allocation method of a medical device according to a third embodiment of the present invention;
fig. 4 is a flowchart of a memory allocation method of a medical device according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a memory allocation apparatus of a medical device according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a medical apparatus in a sixth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a memory allocation method for medical equipment according to an embodiment of the present invention, where the present embodiment is applicable to a case where memory allocation needs to be performed on storage of a medical image, and the method may be executed by a memory allocation apparatus for medical equipment, where the apparatus may be composed of software and/or hardware, and the apparatus may be generally integrated in medical equipment. The method provided by the embodiment specifically comprises the following steps:
and 110, acquiring the acquisition time of the next sequence of images of the previous sequence of images when the acquisition of the previous sequence of images is finished.
The sequence image is an image acquired from the image acquisition device receiving the acquisition starting instruction to the image acquisition ending instruction.
In this embodiment, taking a mobile C-type arm as an example, for the mobile C-type arm, an exposure hand brake is arranged on the mobile C-type arm, when the exposure hand brake is pressed down, a detector (an image acquisition device) receives an acquisition start instruction, starts to acquire a certain sequence of images, and when the exposure hand brake is released, the detector receives an acquisition end instruction, ends to acquire the sequence of images, thereby acquiring a sequence of images. When the exposure hand brake is pressed again to release the acquired image, the next image in the sequence is the next image in the sequence. Wherein each frame of image acquired from when the exposure hand brake is pressed to when the exposure hand brake is released is referred to as a sequence of sub-images of the sequence of images.
For the same medical equipment, under the condition that the frame rate of the detector is fixed, the frame number of the sequence sub-images contained in each sequence image depends on the acquisition time of the sequence image, and the acquisition time of the sequence image depends on the doctor operation time, that is, the acquisition time of the sequence image is the same as the doctor operation time, or the doctor operation time of the sequence image is the acquisition time of the sequence image. For moving the C-arm, the doctor operating time is the time period from when the exposure hand brake is pressed to when the exposure hand brake is released.
Specifically, the doctor operation time (acquisition time of the sequence image) is closely related to the technical experience of the doctor and information such as a specific operation position, for example, for the same operation, the doctor with abundant technical experience has a shorter operation time than the doctor without technical experience; as another example, for the same surgeon, a complicated surgery may require a longer surgeon operating time than a simple surgery. Therefore, in order to accurately acquire the acquisition time of the next sequence of images, the operation time of the operation with different operation names by different doctors can be counted through big data, and then the average operation time (the average operation time can be obtained through various ways, such as weighted average, arithmetic average, etc.) corresponding to the operation by the doctors is obtained as the operation time of the doctors corresponding to the operation. The acquisition time of the sequence images is the same as the operation time of the doctor, so that a storage table of the acquisition time of the sequence images corresponding to different operations of different doctors can be established. Therefore, under the condition that the name of the operation and the corresponding doctor are known, the acquisition time of the corresponding sequence image when the doctor operates a certain operation can be determined through the storage table.
Illustratively, before a medical device is used for an operation, a doctor firstly logs in the medical device by using a login account of the doctor, and sequentially selects or inputs operation names to be performed by using the medical device in an operation list according to the sequence of operation time after logging in, so that when the acquisition of a current sequence of images is finished, the acquisition time of the sequence of images when the doctor operates a certain operation can be inquired in a storage table according to the previous input information.
Illustratively, when the login account is logged out, the operation names recorded in the operation list are cleared.
And step 120, determining a first memory capacity required by the next sequence of images according to the acquisition time.
After acquiring the acquisition time of the next sequence of images, the frame number of the sequence sub-images contained in the next sequence of images can be determined according to the acquired acquisition time, and then the first memory capacity required by the next sequence of images is determined.
The product of the acquisition time and the frame frequency of the detector is the frame number of the sequence sub-images contained in the next sequence image, and the memory capacity occupied by each frame of sequence sub-image acquired by the same detector is fixed, so that the product of the frame number of the sequence sub-images and the memory capacity occupied by each frame of sequence sub-images is determined as the first memory capacity required by the next sequence image.
For example, the sequence images may be acquired by using a default set frame frequency of the detector, or the doctor may set the frame frequency of the detector according to the requirements of different operations, and then acquire the sequence images by using the set frame frequency.
Step 130, comparing the first memory capacity with the size of the free capacity of the current dynamic memory.
And the current dynamic memory is a memory dynamically allocated for storing the sequence images.
When the acquisition of a current sequence image is finished, acquiring the idle capacity of a current dynamic memory, namely acquiring the memory capacity of the current dynamic memory, which does not store the sequence image, comparing the idle capacity of the current dynamic memory with the first memory capacity required by a next sequence image, and when the first memory capacity required by the next sequence image is not less than the idle capacity, indicating that the idle capacity of the current dynamic memory is not enough to store the next sequence image; when the first memory capacity required by the next sequence of images is smaller than the free memory capacity, the fact that the free capacity of the current dynamic memory is enough to store the next sequence of images is indicated.
Step 140, reallocate the memory with the memory capacity of the first capacity difference for the current dynamic memory based on the current dynamic memory.
And the first capacity difference is the difference value obtained by subtracting the idle capacity of the current dynamic memory from the first memory capacity.
Preferably, when the first memory capacity required by the next sequence of images is not less than the free capacity of the current dynamic memory, the memory with the capacity equal to the difference value obtained by subtracting the free capacity of the current dynamic memory from the first memory capacity is reallocated for the current dynamic memory on the basis of the current dynamic memory.
Illustratively, when the acquisition of the 1 st sequence image is finished, acquiring an acquisition time T of the 2 nd sequence image according to the storage table, and determining a first memory capacity N required by the 2 nd sequence image according to the acquisition time T, a frame frequency f of the detector, and a memory capacity M occupied by each frame of sequence sub-image, where N is T × f × M, and if a free capacity in a total capacity K of the current dynamic memory is L, where L is less than N, a memory with a memory capacity of (N-L) is reallocated for the current dynamic memory based on the current dynamic memory, and a total capacity of the dynamic memory after the memory is allocated is [ K + (N-L) ].
Therefore, when the free capacity of the current dynamic memory is not enough to store the next sequence image, a new memory is automatically developed on the basis of the current dynamic memory according to the memory capacity requirement of the next sequence image so that the dynamic memory can completely store the next sequence image in real time, the reliability, the integrity and the real-time performance of sequence image storage are improved, the problem of memory space waste caused by the fact that a preset memory with a larger capacity is developed to store the acquired sequence image can be avoided, the problem that the execution speed of other processes is low, the process is blocked or certain functions are limited to be developed due to the fact that the preset memory with the larger capacity is developed to store the acquired sequence image is caused, and the utilization rate of the memory is improved.
For example, when the first memory capacity required by the next sequence of images is smaller than the free capacity of the current dynamic memory, the memory with the memory capacity of the first capacity difference absolute value can be recovered from the free memory of the current dynamic memory on the basis of the current dynamic memory, so that the recovered memory can be used by other processes, and the utilization rate of the memory is improved.
As in the above example, if L > N, then the memory with the memory capacity of (L-N) is recovered from the free memory of the current dynamic memory on the basis of the current dynamic memory, and then the total capacity of the recovered dynamic memory is [ K- (L-N) ].
Preferably, in the process of acquiring each sequence image, after acquiring each frame sequence sub-image of the sequence image, the frame sequence sub-image is stored in the dynamic memory. The dynamic memory can store corresponding header information and pixel information in each frame of sequence subimage, and the header information can include information such as exposure high-pressure parameters and image size.
Preferably, after a frame sequence subimage is stored in the dynamic memory, the frame sequence subimage may be read from the dynamic memory, and the frame sequence subimage may be post-processed, for example: adjusting the window width and window level, removing image artifacts, performing ROI algorithm processing and cutting on the region of interest, and displaying the post-processed image. The method provided by the embodiment can enable the dynamic memory to store the complete next sequence image, so that in the process of acquiring the sequence image, the condition that the acquired sequence sub-image of the sequence image covers the sequence sub-image of the sequence image or other sequence images previously stored in the dynamic memory does not exist, and the complete sequence image can be ensured to be acquired from the dynamic memory and to be post-processed and displayed, so that the completeness and reliability of the display of the sequence image are ensured, and doctors are better assisted in treating patients.
Preferably, after a frame sequence sub-image is acquired from the dynamic memory for post-processing and displaying, the frame sequence sub-image is cleared from the dynamic memory so that the dynamic memory storing the frame sequence sub-image is used for storing the subsequently acquired sequence sub-image.
In the embodiment, when the acquisition of a current sequence of images is finished, the acquisition time of a next sequence of images acquired by the previous sequence of images is acquired; determining a first memory capacity required by a next sequence of images according to the acquisition time; comparing the first memory capacity with the idle capacity of the current dynamic memory; the current dynamic memory is a memory dynamically allocated for storing the sequence images; if the first memory capacity is not less than the idle capacity, a memory with a memory capacity of a first capacity difference is reallocated for the current dynamic memory on the basis of the current dynamic memory, wherein the first capacity difference is a difference value obtained by subtracting the idle capacity of the current dynamic memory from the first memory capacity, so that the dynamic memory for storing the sequence images is automatically adjusted, the complete sequence images can be stored in the dynamic memory in real time, the safety, the real-time performance and the reliability of the sequence image storage are improved, meanwhile, the problems of memory space waste caused by storing the acquired sequence images by opening up a preset memory with a larger capacity and the problems of slow execution speed, deadlocking or limited development of certain functions and the like of other processes caused by the fact that only a memory with a relatively smaller capacity can be used by other processes because the preset memory with a larger capacity is opened up to store the acquired sequence images can be avoided, the utilization rate of the memory is improved.
Example two
Fig. 2 is a flowchart of a memory allocation method of a medical device according to a second embodiment of the present invention. The embodiment is further optimized on the basis of the embodiment. The embodiment specifically comprises the following steps:
and step 210, when the acquisition of the previous sequence of images is finished, acquiring the acquisition time of the next sequence of images of the previous sequence of images.
Step 220, determining a first memory capacity required by the next sequence of images according to the acquisition time.
Preferably, the first memory capacity is determined as a product of the acquisition time, the frame frequency of the detector and the memory capacity occupied by each frame of sequence sub-image.
Preferably, the memory capacity occupied by each frame sequence sub-image may include the memory capacity occupied by the header information and the pixel information of the frame sequence sub-image.
Step 230, determining whether the first memory capacity is smaller than the free capacity of the current dynamic memory, if so, executing step 250, and if not, executing step 240.
Step 240, reallocate the memory with the memory capacity of the first capacity difference for the current dynamic memory based on the current dynamic memory.
And the first capacity difference is the difference value obtained by subtracting the idle capacity of the current dynamic memory from the first memory capacity.
If the first memory capacity is determined to be not less than the free capacity of the current dynamic memory, the memory with the memory capacity being the first capacity difference is reallocated for the current dynamic memory on the basis of the current dynamic memory so as to open up a new memory for the current dynamic memory, and the dynamic memory can be ensured to completely store the next sequence image.
Step 250, calculating a second capacity difference obtained by subtracting the absolute value of the first capacity difference from the total capacity of the current dynamic memory.
Preferably, for the first-time acquired sequence image, there is no corresponding previous sequence image, so in order to ensure that the dynamic memory can completely store the first-time acquired sequence image, an initial capacity of memory is allocated to store the first-time acquired sequence image before the first-time acquired sequence image.
Preferably, the initial capacity of the dynamic memory is a memory capacity occupied by sequence images acquired at a preset maximum acquisition frame frequency within a preset maximum acquisition time.
In this embodiment, taking the moving C-arm as an example, the preset maximum acquisition time may be 10 minutes, and the preset maximum acquisition frame rate may be 60fps (Frames Per Second).
Preferably, when it is determined that the first memory capacity is smaller than the free capacity of the current dynamic memory, it is determined that the free capacity of the current dynamic memory can store a complete next sequence of images and there is a memory with a certain memory capacity remaining, so that the remaining memory is properly recycled, so that the recycled memory is used by other processes, and the utilization rate of the memory is improved.
Step 260, determining whether the second capacity difference is greater than the initial capacity of the current dynamic memory, if so, executing step 270, and if not, executing step 280.
Step 270, a memory with a memory capacity of the first capacity difference absolute value is recovered from the idle memory of the current dynamic memory.
Step 280, recovering a memory with a memory capacity equal to a third capacity difference obtained by subtracting the initial capacity from the total capacity of the current dynamic memory from the free memory of the current dynamic memory.
In order to improve the storage reliability, the minimum total capacity of the dynamic memory after the reclamation is preferably the initial capacity. Therefore, when the first memory capacity is determined to be smaller than the free capacity of the current dynamic memory, calculating a second capacity difference obtained by subtracting the absolute value of the first capacity difference from the total capacity of the current dynamic memory, comparing the second capacity difference with the initial capacity of the current dynamic memory, wherein, the absolute value of the first capacity difference is the remaining memory capacity of the current free capacity of the dynamic memory after storing the next sequence of images, if the second capacity difference is larger than the initial capacity of the current dynamic memory, the memory with the memory capacity of the absolute value of the first capacity difference is recycled from the idle memory of the current dynamic memory, and if the second capacity difference is not larger than the initial capacity of the current dynamic memory, recovering the memory with the memory capacity which is the sum of the total capacity of the current dynamic memory minus the third capacity difference of the initial capacity from the idle memory of the current dynamic memory, so that the total capacity of the dynamic memory after the memory is recovered is the initial capacity.
In this embodiment, if the capacity of the first memory is smaller than the free capacity of the current dynamic memory, a second capacity difference obtained by subtracting the absolute value of the first capacity difference from the total capacity of the current dynamic memory is calculated, and the second capacity difference is compared with the initial capacity of the current dynamic memory; if the second capacity difference is larger than the initial capacity, recovering the memory with the memory capacity of the first capacity difference absolute value from the idle memory of the current dynamic memory; if the second capacity difference is not larger than the initial capacity, a memory with the memory capacity being the total capacity of the current dynamic memory minus a third capacity difference of the initial capacity is recycled from the idle memory of the current dynamic memory, so that when the first memory capacity is determined to be smaller than the idle capacity of the current dynamic memory, the idle memory of the current dynamic memory is recycled, the recycled memory is used by other processes, the utilization rate of the memory is improved, when the second capacity difference is larger than the initial capacity, all memories with the memory capacity being the absolute value of the first capacity difference in the idle memory of the current dynamic memory are recycled, when the second capacity difference is not larger than the initial capacity, only memories with the memory capacity being the total capacity of the current dynamic memory minus the third capacity difference of the initial capacity are recycled, and the minimum total capacity of the recycled dynamic memory is the initial capacity, the reliability of the storage of the sequence images is improved.
EXAMPLE III
Fig. 3 is a flowchart of a memory allocation method of a medical device according to a third embodiment of the present invention, which is further optimized based on the foregoing embodiments. In this embodiment, in consideration of the fact that, in practical application, the dynamic memory may be under-allocated or over-allocated by the memory allocation method in the first embodiment or the second embodiment, in this embodiment, the dynamic memory at that time may be calculated at regular intervals during the next sequence of image acquisition, so as to determine whether to further open up the dynamic memory or to further recycle the dynamic memory. Referring to fig. 3, the method provided in this embodiment includes the following steps:
and step 310, acquiring the acquisition time of the next sequence of images of the previous sequence of images when the acquisition of the previous sequence of images is finished.
And step 320, determining a first memory capacity required by the next sequence of images according to the acquisition time.
Step 330, determine whether the first memory capacity is smaller than the free capacity of the current dynamic memory, if not, execute step 340.
Step 340, reallocate the memory with the memory capacity of the first capacity difference for the current dynamic memory based on the current dynamic memory.
And if the first memory capacity is determined to be not smaller than the free capacity of the current dynamic memory, the memory with the memory capacity of the first capacity difference is reallocated for the current dynamic memory on the basis of the current dynamic memory.
It should be noted that, after determining whether the first memory capacity is smaller than the idle capacity of the current dynamic memory in step 330, if it is determined that the first memory capacity is smaller than the idle capacity of the current dynamic memory, the dynamic memory may be recycled in the manner in the second embodiment, which is not described in detail in this embodiment.
And 350, in the next sequence image acquisition process, comparing the second memory capacity with the idle capacity of the current dynamic memory every set time from the acquisition starting moment of the next sequence image and when the current comparison frequency does not reach the set frequency.
The second memory capacity is related to the acquisition time, the set time, the current comparison times, the frame frequency of the detector and the memory capacity occupied by each frame of sequence subimage, the current comparison times are initialized to be zero at the acquisition starting moment, and the current comparison times are added with 1 every set time.
Preferably, after the previous sequence of image acquisition is finished and before the next sequence of image acquisition, the current dynamic memory is allocated or recycled in advance, and when the next sequence of image acquisition starts, that is, when the exposure hand brake is pressed down, the detector receives an acquisition start instruction, the current comparison frequency is added by 1 every set time from the start time of the next sequence of image acquisition, and whether the current comparison frequency reaches the set frequency is determined, and if the current comparison frequency does not reach the set frequency, the size of the second memory capacity and the size of the idle capacity of the current dynamic memory are compared.
Specifically, the second memory capacity is (acquisition time-setting time × current comparison times) × the frame frequency of the detector × the memory capacity occupied by each frame of sequence sub-image.
For example, the set time may be 2 minutes or 3 minutes, and the set number may be 2 times or 3 times.
Step 360, under the current comparison times, judging whether the second memory capacity is smaller than the idle capacity of the current dynamic memory; if yes, go to step 380, otherwise go to step 370.
Step 370, reallocate the memory with the memory capacity of the fourth capacity difference for the current dynamic memory based on the current dynamic memory.
And the fourth capacity difference is the difference value obtained by subtracting the idle capacity of the current dynamic memory from the second memory capacity.
Step 380, a fifth capacity difference obtained by subtracting the absolute value of the fourth capacity difference from the total capacity of the current dynamic memory is calculated.
Step 390, determining whether the fifth capacity is greater than the initial capacity of the current dynamic memory, if so, executing step 3100, and if not, executing step 3110.
Step 3100, recovering a memory with a memory capacity equal to the absolute value of the fourth capacity difference from the idle memory of the current dynamic memory.
Step 3110, retrieve the memory with the memory capacity equal to the sixth capacity difference obtained by subtracting the initial capacity from the total capacity of the current dynamic memory from the free memory of the current dynamic memory. Therefore, after the current dynamic memory is allocated or recovered before the next sequence image is acquired after the current sequence image is acquired, in order to more accurately allocate and recover the current dynamic memory, in the process of acquiring the next sequence image, when a set condition is met, whether the dynamic memory needs to be allocated or recovered is determined again, so as to improve the accuracy of adjusting the dynamic memory, and the situation that after the acquisition of the previous sequence image is finished, a stored sequence subimage is possibly removed from the dynamic memory before the acquisition of the next sequence image or in the acquisition process of the next sequence image, if a sequence subimage of the previous sequence image or a sequence subimage of the next sequence image is read from the dynamic memory and is subjected to post-processing and display in the acquisition process of the next sequence image, the read sequence subimage is removed from the dynamic memory is avoided, and then compared with the time when the acquisition of the previous sequence of images is finished, the dynamic memory has larger spare capacity and is used for storing the next sequence of images, so that the memory allocated for the dynamic memory is larger when the acquisition of the previous sequence of images is finished.
In the embodiment, in the next sequence image acquisition process, the second memory capacity is compared with the idle capacity of the current dynamic memory every set time from the acquisition start time of the next sequence image and when the current comparison frequency does not reach the set frequency; the second memory capacity is related to the acquisition time, the set time, the current comparison times, the frame frequency of the detector and the memory capacity occupied by each frame of sequence subimage, the current comparison times are initialized to be zero at the acquisition starting moment, and the current comparison times are added by 1 every set time; under the current comparison times, if the second memory capacity is not less than the idle capacity of the current dynamic memory, a memory with a memory capacity of a fourth capacity difference is reallocated for the current dynamic memory on the basis of the current dynamic memory, wherein the fourth capacity difference is the difference value obtained by subtracting the idle capacity of the current dynamic memory from the second memory capacity; under the current comparison times, if the second memory capacity is smaller than the idle capacity of the current dynamic memory, calculating a fifth capacity difference obtained by subtracting the absolute value of the fourth capacity difference from the total capacity of the current dynamic memory, and comparing the fifth capacity difference with the initial capacity of the current dynamic memory: if the fifth capacity difference is larger than the initial capacity, recovering the memory with the memory capacity of the fourth capacity difference absolute value from the idle memory of the current dynamic memory; if the fifth capacity difference is not larger than the initial capacity, the memory with the memory capacity which is the sixth capacity difference obtained by subtracting the initial capacity from the total capacity of the current dynamic memory is recycled from the idle memory of the current dynamic memory, so that the dynamic memory occupied by the next sequence image is accurately allocated, and the problem that the memory utilization rate is low due to the fact that the dynamic memory is possibly opened up too much when the dynamic memory is opened up is avoided.
Example four
Fig. 4 is a flowchart of a memory allocation method of a medical device according to a fourth embodiment of the present invention, which is further optimized based on the foregoing embodiments. Referring to fig. 4, the method provided in this embodiment includes the following steps:
and step 410, acquiring the acquisition time of the next sequence of images of the previous sequence of images when the acquisition of the previous sequence of images is finished.
Step 420, determining a first memory capacity required by the next sequence of images according to the acquisition time.
In some cases, after a sequence of images is acquired, the sequence of images needs to be post-processed and displayed for doctors to treat patients, and the sequence of images also needs to be stored in a storage disc such as a magnetic disc for communication between subsequent doctors or research by scientific research institutions.
For example, an image saving option may be set on the sequential image capturing interface, and if the saving option is selected, the captured sequential image is saved in a storage disk such as a magnetic disk.
For example, the three different threads of the acquisition control thread, the image processing thread and the image storage thread can respectively realize the storage of the acquired sequence images into the dynamic memory, the reading of the sequence images from the dynamic memory and the post-processing and display of the sequence images, and the reading of the sequence images from the dynamic memory and the storage of the sequence images into the storage disk, so that in the process of acquiring a sequence of images, when the acquisition of a certain frame sequence sub-image of the sequence images is completed, the acquisition control thread stores the frame sequence sub-image into the dynamic memory and sends an acquisition notice to inform the image processing thread and the image storage thread that the frame sequence sub-image can be acquired from the dynamic memory, so that after the image processing thread receives the acquisition notice, the image processing thread can read the sub-image frame sequence from the dynamic memory and post-process and display the read sub-image sequence, after the image storage thread receives the acquisition notice, the image storage thread can read the frame sequence subimages from the dynamic memory and store the read frame sequence subimages into the storage disk, thereby realizing the acquisition, display and storage of the sequence images at the same time.
Preferably, after the image storage thread stores a certain frame sequence sub-image to the storage disk, the frame sequence sub-image is cleared from the dynamic memory so that the dynamic memory storing the frame sequence sub-image is used for storing the subsequently acquired sequence sub-image.
Specifically, due to reasons such as CPU (Central Processing Unit) time slice allocation, the speed at which the acquisition control thread stores the acquired sequence sub-images into the dynamic memory, the speed at which the image Processing thread reads the sequence sub-images from the dynamic memory, and the speed at which the image storage thread reads the sequence sub-images from the dynamic memory may be different, and when the speeds are the acquisition control thread storage speed, the image storage thread reading speed, and the image Processing thread reading speed in this order from high to low, if the acquisition control thread has stored 6 frame sequences of a certain sequence of images into the dynamic memory, the image storage thread reads the 4 th frame sequence of the sequence image from the dynamic memory, and the image Processing thread only reads the 3 rd frame sequence of the sequence image from the dynamic memory, after the certain frame sequence is stored in the storage disk, the frame sequence subimages are cleared from the dynamic memory, so that when the image processing process reads the 4 th frame sequence subimage of the sequence image from the dynamic memory, the corresponding sequence subimage cannot be acquired from the dynamic memory. Therefore, when the image processing thread cannot acquire the corresponding sequence sub-image from the dynamic memory, the sequence sub-image is acquired from the sequence sub-image stored in the storage disk, so that the image processing process can acquire the complete sequence image, and the safety and reliability of the display of the sequence image are improved.
Preferably, the step 420 of determining the first memory capacity required for the next sequence of images according to the acquisition time may be implemented in the following manner:
calculating a first product between the frame frequency of the detector and the memory capacity occupied by each frame of sequence sub-image, and calculating a second product between the writing speed of the storage disk and a preset coefficient;
determining a third product between the difference between the first product and the second product and the acquisition time as a first memory capacity; the preset coefficient is associated with a storage disc writing speed.
Illustratively, if the storage disk write speed is 150MB/s to 200MB/s, the predetermined factor may be 0.5 to 0.7, where MB/s represents megabytes per second.
Therefore, in the next sequence image acquisition process, the memory capacity occupied by the sequence sub-images which are stored in the storage disk and removed from the dynamic memory is considered in the idle capacity of the current dynamic memory, so that the waste of memory space caused by the fact that the overlarge memory is allocated to the dynamic memory when the current sequence image acquisition is finished is avoided, and the dynamic memory is adjusted more accurately.
Step 430, determine whether the first memory capacity is smaller than the free capacity of the current dynamic memory, if not, execute step 440.
Step 440, reallocate the memory with the memory capacity of the first capacity difference for the current dynamic memory based on the current dynamic memory.
And if the first memory capacity is determined to be not smaller than the free capacity of the current dynamic memory, the memory with the memory capacity of the first capacity difference is reallocated for the current dynamic memory on the basis of the current dynamic memory.
It should be noted that, after determining whether the first memory capacity is smaller than the idle capacity of the current dynamic memory in step 430, if it is determined that the first memory capacity is smaller than the idle capacity of the current dynamic memory, the dynamic memory may be adjusted by the method in the second embodiment, which is not described in detail in this embodiment.
Step 450, obtaining at least one frame of next sequence sub-image in the next sequence image from the dynamic memory storing the next sequence image, and using the at least one frame of next sequence sub-image as the current next sequence sub-image respectively.
Step 460, saving the current next sequence of sub-images to the storage disk.
Step 470, the current next sequence of sub-images is cleared from the dynamic memory.
When the acquisition of a previous sequence image is finished, and a memory is allocated or recycled for a dynamic memory, if the detector starts to acquire a next sequence image, after the detector finishes acquiring a frame sequence subimage of the next sequence image, the acquisition control thread stores the frame sequence subimage into the dynamic memory and sends an acquisition notice to the image storage thread, after the image storage thread receives the acquisition notice, the frame sequence subimage is acquired from the dynamic memory, the frame sequence subimage is stored into a storage disc, and after the frame sequence subimage is stored into the storage disc, the frame sequence subimage is cleared from the dynamic memory so as to be used for storing the subsequent acquired sequence subimage. And when the image storage thread receives the acquisition notice again, acquiring the corresponding sequence sub-images again and storing the sequence sub-images to the storage disk.
In the embodiment, at least one frame of next sequence sub-image in the next sequence image is acquired from a dynamic memory in which the next sequence image is stored, and the at least one frame of next sequence sub-image is respectively used as the current next sequence sub-image; saving the current next sequence of subimages to a storage disc; clearing the current next sequence subimage from the dynamic memory, realizing that the collected sequence image is stored in a storage disc for communication between subsequent doctors or research by scientific research institutions, and the like, calculating a first product between the frame frequency of a detector and the memory capacity occupied by each frame sequence subimage, and calculating a second product between the writing speed of the storage disc and a preset coefficient; and determining a third product between the difference between the first product and the second product and the acquisition time as a first memory capacity, so that the memory capacity occupied by the sequence sub-images which are stored to the storage disk and removed from the dynamic memory in the next sequence image acquisition process is considered to the free capacity of the current dynamic memory, thereby avoiding the waste of memory space caused by the allocation of overlarge memory to the dynamic memory when the acquisition of the current sequence image is finished, and realizing more accurate adjustment of the dynamic memory.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a memory allocation apparatus of a medical device according to a fifth embodiment of the present invention. The device can be composed of software and/or hardware, and the device can be integrated in medical equipment generally. The device provided by the embodiment comprises: a collection time obtaining module 510, a first memory capacity determining module 520, a first capacity comparing module 530, and a first memory allocating module 540, wherein,
an acquisition time obtaining module 510, configured to obtain, when acquisition of a previous sequence of images is finished, acquisition time of a next sequence of images of the previous sequence of images;
a first memory capacity determining module 520, configured to determine a first memory capacity required by the next sequence of images according to the acquisition time;
a first capacity comparison module 530, configured to compare the first memory capacity with a size of an idle capacity of the current dynamic memory; the current dynamic memory is a memory dynamically allocated for storing the sequence images;
a first memory allocation module 540, configured to allocate, on the basis of the current dynamic memory, a memory with a memory capacity that is a first capacity difference for the current dynamic memory if the first memory capacity is not less than the idle capacity of the current dynamic memory, where the first capacity difference is a difference value obtained by subtracting the idle capacity from the first memory capacity.
In the embodiment, when the acquisition of a current sequence of images is finished, the acquisition time of a next sequence of images of the previous sequence of images is acquired through the acquisition time acquisition module; the first memory capacity determining module determines a first memory capacity required by the next sequence of images according to the acquisition time; the first capacity comparison module compares the first memory capacity with the idle capacity of the current dynamic memory; when the first memory capacity is not less than the free capacity of the current dynamic memory, the memory with the memory capacity of the first capacity difference is reallocated for the current dynamic memory on the basis of the current dynamic memory, thereby realizing the automatic adjustment of the dynamic memory for storing the sequence image, ensuring that the complete sequence image can be stored in the dynamic memory in real time, improving the safety, the real-time performance and the reliability of the sequence image storage, meanwhile, the problem of memory space waste caused by opening up a large-capacity preset memory to store the acquired sequence images can be avoided, and the problems that the execution speed of other processes is slow, the processes are blocked or certain functions are limited to be developed due to the fact that only a memory with relatively small capacity can be used by other processes in the medical equipment because a preset memory with relatively large capacity is opened up to store the acquired sequence images can be avoided, and the utilization rate of the memory is improved.
In the foregoing scheme, optionally, the method further includes:
a second capacity comparison module, configured to calculate a second capacity difference obtained by subtracting the absolute value of the first capacity difference from the total capacity of the current dynamic memory if the capacity of the first memory is smaller than the idle capacity of the current dynamic memory, and compare the second capacity difference with an initial capacity of the current dynamic memory;
a first memory recovery module, configured to, if the second capacity difference is greater than the initial capacity, recover, from an idle memory of the current dynamic memory, a memory whose memory capacity is an absolute value of the first capacity difference;
and a second memory recovery module, configured to recover, if the second capacity difference is not greater than the initial capacity, a memory whose memory capacity is a third capacity difference obtained by subtracting the initial capacity from a total capacity of the current dynamic memory from a free memory of the current dynamic memory.
In the foregoing scheme, optionally, the method further includes:
the third capacity comparison module is used for comparing the second memory capacity with the idle capacity of the current dynamic memory every set time from the acquisition starting moment of the next sequence image in the acquisition process of the next sequence image and when the current comparison times do not reach the set times; the second memory capacity is related to the acquisition time, the set time, the current comparison times, the frame frequency of the detector and the memory capacity occupied by each frame of sequence sub-image, the current comparison times are initialized to be zero at the acquisition starting moment, and the current comparison times are added by 1 every set time;
and the second memory allocation module is used for, under the current comparison times, if the second memory capacity is not less than the idle capacity of the current dynamic memory, allocating a memory with a memory capacity of a fourth capacity difference to the current dynamic memory on the basis of the current dynamic memory, wherein the fourth capacity difference is a difference value obtained by subtracting the idle capacity of the current dynamic memory from the second memory capacity.
In the foregoing scheme, optionally, the method further includes: a third memory recovery module for
Under the current comparison times, if the capacity of the second memory is smaller than the idle capacity of the current dynamic memory, calculating a fifth capacity difference obtained by subtracting an absolute value of a fourth capacity difference from the total capacity of the current dynamic memory, and comparing the fifth capacity difference with the initial capacity of the current dynamic memory:
if the fifth capacity difference is larger than the initial capacity, recovering a memory with the memory capacity of the fourth capacity difference absolute value from the idle memory of the current dynamic memory;
and if the fifth capacity difference is not larger than the initial capacity, recovering a memory with a memory capacity of a sixth capacity difference obtained by subtracting the initial capacity from the total capacity of the current dynamic memory from the idle memory of the current dynamic memory.
In the foregoing solution, optionally, the first memory capacity determining module is configured to determine a first memory capacity of the memory device based on the first memory capacity
And determining the product of the acquisition time, the frame frequency of the detector and the memory capacity occupied by each frame of sequence sub-image as the first memory capacity.
In the foregoing scheme, optionally, the method further includes:
a sequence subimage obtaining module, configured to obtain at least one frame of next sequence subimage in the next sequence image from a dynamic memory in which the next sequence image is stored, and use the at least one frame of next sequence subimage as a current next sequence subimage respectively;
the sequence subimage storage module is used for storing the current next sequence subimage to a storage disc;
and the sequence sub-image clearing module is used for clearing the current next sequence sub-image from the dynamic memory.
In the foregoing solution, optionally, the first memory capacity determining module is configured to:
calculating a first product between the frame frequency of the detector and the memory capacity occupied by each frame of sequence sub-image, and calculating a second product between the writing speed of the storage disc and a preset coefficient;
determining a third product between a difference between the first product and the second product and the acquisition time as the first memory capacity; the preset coefficient is associated with the storage disc writing speed.
In the foregoing scheme, optionally, the initial capacity is a memory capacity occupied by sequence images acquired at a preset maximum acquisition frame frequency within a preset maximum acquisition time.
EXAMPLE six
Fig. 6 is a schematic structural diagram of a medical apparatus according to a sixth embodiment of the present invention, as shown in fig. 6, the medical apparatus includes a processor 610, a memory 620, an input device 630, and an output device 640; the number of the processors 610 in the medical device may be one or more, and one processor 610 is taken as an example in fig. 6; the processor 610, the memory 620, the input device 630 and the output device 640 of the medical apparatus may be connected by a bus or other means, and fig. 6 illustrates an example of a connection by a bus.
The memory 620 is used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the memory allocation method of the medical device in any embodiment of the present invention (for example, the acquisition time acquisition module 510, the first memory capacity determination module 520, the first capacity comparison module 530, and the first memory allocation module 540 in the memory allocation device of the medical device). The processor 610 executes various functional applications of the medical device and data processing, i.e., implements the operations for the medical device described above, by executing software programs, instructions, and modules stored in the memory 620.
The memory 620 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the medical device, and the like. Further, the memory 620 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 620 may further include memory located remotely from the processor 610, which may be connected to the medical device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 630 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function controls of the medical apparatus. The output device 640 may include a display device such as a display screen.
EXAMPLE seven
The seventh embodiment of the present invention further provides a storage medium containing computer-executable instructions, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, the method for allocating memory of a medical device according to any embodiment of the present invention is implemented.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the method according to any embodiment of the present invention.
It should be noted that, in the embodiment of the memory allocation apparatus for medical devices, the units and modules included in the apparatus are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
The device can execute the method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects for executing the method. For technical details not described in detail in this embodiment, reference may be made to the method provided in any embodiment of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (9)

1. A method for memory allocation in a medical device, comprising:
when the acquisition of a previous sequence of images is finished, acquiring the acquisition time of a next sequence of images of the previous sequence of images;
determining a first memory capacity required by the next sequence of images according to the acquisition time;
comparing the first memory capacity with the idle capacity of the current dynamic memory; the current dynamic memory is a memory dynamically allocated for storing the sequence images;
if the first memory capacity is not smaller than the free capacity of the current dynamic memory, the memory with the memory capacity of a first capacity difference is reallocated for the current dynamic memory on the basis of the current dynamic memory; wherein, the first capacity difference is the difference value obtained by subtracting the idle capacity of the current dynamic memory from the first memory capacity;
if the first memory capacity is smaller than the free capacity of the current dynamic memory, calculating a second capacity difference obtained by subtracting an absolute value of the first capacity difference from the total capacity of the current dynamic memory, and comparing the second capacity difference with the initial capacity of the current dynamic memory, wherein the initial capacity is the memory capacity occupied by sequence images acquired within a preset maximum acquisition time at a preset maximum acquisition frame frequency;
if the second capacity difference is larger than the initial capacity, recovering a memory with the memory capacity of the absolute value of the first capacity difference from the idle memory of the current dynamic memory;
and if the second capacity difference is not larger than the initial capacity, recovering a memory with a memory capacity of a third capacity difference obtained by subtracting the initial capacity from the total capacity of the current dynamic memory from the idle memory of the current dynamic memory.
2. The method of memory allocation for medical devices of claim 1, further comprising:
in the next sequence image acquisition process, comparing the second memory capacity with the idle capacity of the current dynamic memory at set time intervals from the acquisition starting moment of the next sequence image and when the current comparison times do not reach the set times; the second memory capacity is related to the acquisition time, the set time, the current comparison times, the frame frequency of the detector and the memory capacity occupied by each frame of sequence sub-image, the current comparison times are initialized to be zero at the acquisition starting moment, and the current comparison times are added by 1 every set time;
under the current comparison times, if the second memory capacity is not less than the idle capacity of the current dynamic memory, a memory with a memory capacity of a fourth capacity difference is reallocated for the current dynamic memory on the basis of the current dynamic memory, wherein the fourth capacity difference is a difference value obtained by subtracting the idle capacity of the current dynamic memory from the second memory capacity.
3. The method of claim 2, further comprising:
under the current comparison times, if the capacity of the second memory is smaller than the idle capacity of the current dynamic memory, calculating a fifth capacity difference obtained by subtracting an absolute value of a fourth capacity difference from the total capacity of the current dynamic memory, and comparing the fifth capacity difference with the initial capacity of the current dynamic memory:
if the fifth capacity difference is larger than the initial capacity, recovering a memory with the memory capacity of the fourth capacity difference absolute value from the idle memory of the current dynamic memory;
and if the fifth capacity difference is not larger than the initial capacity, recovering a memory with a memory capacity of a sixth capacity difference obtained by subtracting the initial capacity from the total capacity of the current dynamic memory from the idle memory of the current dynamic memory.
4. The method of claim 1, wherein determining the first memory capacity required for the next sequence of images according to the acquisition time comprises:
and determining the product of the acquisition time, the frame frequency of the detector and the memory capacity occupied by each frame of sequence sub-image as the first memory capacity.
5. The method of memory allocation for medical devices of claim 1, further comprising:
acquiring at least one frame of next sequence subimage in the next sequence image from a dynamic memory in which the next sequence image is stored, and taking the at least one frame of next sequence subimage as the current next sequence subimage respectively;
saving the current next sequence subimage to a storage disc;
and clearing the current next sequence sub-image from the dynamic memory.
6. The method of claim 5, wherein determining the first memory capacity required for the next sequence of images according to the acquisition time comprises:
calculating a first product between the frame frequency of the detector and the memory capacity occupied by each frame of sequence sub-image, and calculating a second product between the writing speed of the storage disc and a preset coefficient;
determining a third product between a difference between the first product and the second product and the acquisition time as the first memory capacity; the preset coefficient is associated with the storage disc writing speed.
7. A memory allocation apparatus of a medical device, comprising:
the acquisition time acquisition module is used for acquiring the acquisition time of the next sequence of images of the previous sequence of images when the acquisition of the previous sequence of images is finished;
the first memory capacity determining module is used for determining the first memory capacity required by the next sequence of images according to the acquisition time;
the first capacity comparison module is used for comparing the first memory capacity with the idle capacity of the current dynamic memory; the current dynamic memory is a memory dynamically allocated for storing the sequence images;
a first memory allocation module, configured to, if the first memory capacity is not less than the idle capacity of the current dynamic memory, allocate, on the basis of the current dynamic memory, a memory with a memory capacity that is a first capacity difference to the current dynamic memory, where the first capacity difference is a difference value obtained by subtracting the idle capacity of the current dynamic memory from the first memory capacity;
a second capacity comparison module, configured to calculate a second capacity difference obtained by subtracting the absolute value of the first capacity difference from the total capacity of the current dynamic memory if the capacity of the first memory is smaller than the idle capacity of the current dynamic memory, and compare the second capacity difference with an initial capacity of the current dynamic memory;
a first memory recovery module, configured to, if the second capacity difference is greater than the initial capacity, recover, from an idle memory of the current dynamic memory, a memory whose memory capacity is an absolute value of the first capacity difference;
and a second memory recovery module, configured to recover, if the second capacity difference is not greater than the initial capacity, a memory whose memory capacity is a third capacity difference obtained by subtracting the initial capacity from a total capacity of the current dynamic memory from a free memory of the current dynamic memory.
8. A medical device, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a memory allocation method of a medical device as claimed in any one of claims 1-6.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out a method of memory allocation of a medical device according to any one of claims 1-6.
CN201710648102.8A 2017-08-01 2017-08-01 Medical equipment, memory allocation method and device thereof and storage medium Active CN107291556B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710648102.8A CN107291556B (en) 2017-08-01 2017-08-01 Medical equipment, memory allocation method and device thereof and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710648102.8A CN107291556B (en) 2017-08-01 2017-08-01 Medical equipment, memory allocation method and device thereof and storage medium

Publications (2)

Publication Number Publication Date
CN107291556A CN107291556A (en) 2017-10-24
CN107291556B true CN107291556B (en) 2021-01-22

Family

ID=60104928

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710648102.8A Active CN107291556B (en) 2017-08-01 2017-08-01 Medical equipment, memory allocation method and device thereof and storage medium

Country Status (1)

Country Link
CN (1) CN107291556B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908479B (en) * 2017-12-11 2021-03-02 北京奇艺世纪科技有限公司 Node resource allocation method and device
CN108829514B (en) * 2018-05-28 2020-11-10 中国联合网络通信集团有限公司 Memory allocation method and platform
CN110928580B (en) * 2019-10-23 2022-06-24 北京达佳互联信息技术有限公司 Asynchronous flow control method and device
CN112179903B (en) * 2020-09-30 2022-08-19 深兰人工智能芯片研究院(江苏)有限公司 Method and system for detecting empty bottle without lock
CN113342516B (en) * 2021-05-13 2024-09-03 北京小米移动软件有限公司 Data processing method and device, terminal and storage medium
CN114756542B (en) * 2022-06-15 2022-08-26 深圳市三维医疗设备有限公司 Color Doppler ultrasound image processing control system based on data feedback

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101231619A (en) * 2008-02-22 2008-07-30 浙江大学 Method for managing dynamic internal memory base on discontinuous page
CN102446139A (en) * 2011-11-14 2012-05-09 奇智软件(北京)有限公司 Method and device for data storage
CN103077550A (en) * 2012-12-10 2013-05-01 华北电力大学(保定) Vascular four-dimensional reconstruction method in NOT gate-controlled ICUS (intravascular ultrasound) image sequence
CN103135944A (en) * 2013-03-12 2013-06-05 飞依诺科技(苏州)有限公司 Method and system for expanding maximum ultrasonic image data memory capacity
CN105759720A (en) * 2016-04-29 2016-07-13 中南大学 Mechanical arm tracking and positioning on-line identification and correction method based on computer vision
CN106821406A (en) * 2016-12-02 2017-06-13 上海联影医疗科技有限公司 Medical image system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090300629A1 (en) * 2008-06-02 2009-12-03 Mois Navon Scheduling of Multiple Tasks in a System Including Multiple Computing Elements

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101231619A (en) * 2008-02-22 2008-07-30 浙江大学 Method for managing dynamic internal memory base on discontinuous page
CN102446139A (en) * 2011-11-14 2012-05-09 奇智软件(北京)有限公司 Method and device for data storage
CN103077550A (en) * 2012-12-10 2013-05-01 华北电力大学(保定) Vascular four-dimensional reconstruction method in NOT gate-controlled ICUS (intravascular ultrasound) image sequence
CN103135944A (en) * 2013-03-12 2013-06-05 飞依诺科技(苏州)有限公司 Method and system for expanding maximum ultrasonic image data memory capacity
CN105759720A (en) * 2016-04-29 2016-07-13 中南大学 Mechanical arm tracking and positioning on-line identification and correction method based on computer vision
CN106821406A (en) * 2016-12-02 2017-06-13 上海联影医疗科技有限公司 Medical image system

Also Published As

Publication number Publication date
CN107291556A (en) 2017-10-24

Similar Documents

Publication Publication Date Title
CN107291556B (en) Medical equipment, memory allocation method and device thereof and storage medium
US8542794B2 (en) Image processing apparatus for a moving image of an object irradiated with radiation, method thereof, and storage medium
CN111968130B (en) Brain contrast image processing method, device, medium and electronic equipment
DE102005036998A1 (en) Device for the automatic detection of abnormalities in medical image data
JP2001061824A (en) Saturation control method of radioactive ray photographing image and system therefor
JPH0554116A (en) Method for setting roi and image processor
CN114240937A (en) Kidney stone detection method and system based on CT (computed tomography) slices
CN109903841A (en) A kind of the abnormality reminding method and device of superior gastrointestinal endoscope image
CN111383753A (en) Convenient gauze counting device for operating room and control method thereof
CN114732425A (en) Method and system for improving DR chest radiography imaging quality
CN109377477B (en) Image classification method and device and computer readable storage medium
CN111540442A (en) Medical image diagnosis scheduling management system based on computer vision
JP2008253401A (en) Data management system
JP6837054B2 (en) Automatic estimation methods, devices, and computer programs for bone regions in CT images
CN114464300A (en) Medical image processing method and device, storage medium and computer equipment
CN115631151A (en) Ultrasonic image interception method and device, electronic equipment and storage medium
US20190130561A1 (en) Medical image processing apparatus
CN106470609B (en) fluoroscopy system for detection and real-time display of fluoroscopy images
JP2012179367A (en) Data management system
WO2024012014A1 (en) X-ray image acquisition method and system, x-ray device and storage medium
JP2003339685A (en) Display device, image processor, image processing system, display method, and storage medium
JP2015188536A (en) Control device, control system, radiographic system, control method, and program
JP2002010997A (en) Photographing device, image processor, image processing system, operation control method and storage medium
CN103561656A (en) Image processing apparatus and method
JP7551230B2 (en) Medical image processing system, medical image processing method, information processing device, and program

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
CB02 Change of applicant information

Address after: 201807 Shanghai City, north of the city of Jiading District Road No. 2258

Applicant after: Shanghai Lianying Medical Technology Co., Ltd

Address before: 201807 Shanghai City, north of the city of Jiading District Road No. 2258

Applicant before: SHANGHAI UNITED IMAGING HEALTHCARE Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant