Control method and apparatus for dose calculation system, and dose calculation system
By adopting the joint computing method of CPU and GPU in the dose calculation system, particle simulation tasks are allocated according to their respective calculation speeds, which solves the problem of waste of computing resources caused by traditional single hardware acceleration and maximizes the dose calculation speed and computing resources. efficient utilization.
Patent Information
- Application Number
- PCT/CN2024/089786
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-27
- Filing Date
- 2024-04-25
- Publication Date
- 2024-10-31
AI Technical Summary
The single computer hardware acceleration method in traditional dose calculation systems leads to a waste of computing resources and cannot maximize the dose calculation speed.
The joint dose calculation method of CPU and GPU is used to determine the distribution of particle simulation tasks according to their respective calculation speeds to achieve collaborative calculation between CPU and GPU, thereby making full use of computing resources.
Significantly improves dose calculation speed, improves calculation efficiency, and maximizes the utilization of computing resources.
Smart Images

Figure CN2024089786_31102024_PF_FP_ABST
Abstract
Description
Control method and device of dose calculation system and dose calculation system Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a control method and device for a dose calculation system, and a dose calculation system. Background Art
[0002] With the advancement of atomic science, radiation therapy, such as cobalt-60, linear accelerators, and electron beams, has become a primary approach to cancer treatment. However, conventional photon or electron therapy is limited by the physical properties of radiation. While killing tumor cells, it can also damage a significant amount of normal tissue in the beam's path. Furthermore, due to the varying sensitivity of tumor cells to radiation, conventional radiation therapy is often ineffective in treating more radioresistant malignancies, such as glioblastoma multiforme and melanoma.
[0003] To reduce radiation damage to normal tissues surrounding the tumor, the concept of targeted therapy from chemotherapy has been applied to radiotherapy. Furthermore, for highly radioresistant tumor cells, radiation sources with high relative biological effectiveness (RBE), such as proton therapy, heavy particle therapy, and neutron capture therapy, are currently being actively developed. Neutron capture therapy, such as boron neutron capture therapy (BNCT), combines these two concepts. By leveraging the specific accumulation of boron-containing drugs in tumor cells and combining them with precise beam control, BNCT offers a superior cancer treatment option compared to traditional radiation.
[0004] Boron neutron capture therapy utilizes the high capture cross-section of thermal neutrons by boron-containing (10B) drugs. Through 10B(n,α)7Li neutron capture and nuclear fission reactions, two heavily charged particles, 4He and 7Li, are generated. The combined range of these two particles is approximately equivalent to the size of a cell. Therefore, radiation damage to the organism is limited to the cellular level. When the boron-containing drug selectively accumulates in tumor cells and is combined with an appropriate neutron source, it can achieve the goal of locally killing tumor cells without causing excessive damage to normal tissue.
[0005] In order to ensure that radiation particles kill as many cancer cells as possible while minimizing damage to normal cells, a CT or PET imaging scan is usually performed before treating a living organism. The tissue material information of the living organism is obtained based on the scan results. A computational model is established based on the material information and the radiation source to simulate the transport process of radiation particles in the living organism. Ultimately, the dose distribution of radiation particles in the living organism is obtained, and the plan with the optimal dose distribution for the living organism is then selected as the treatment plan for the living organism.
[0006] Currently, the most accurate and reliable method for dose calculation is the Monte Carlo method. However, the Monte Carlo method takes a long time to calculate, and the dose calculation speed needs to be improved. A common technique is to improve the dose calculation speed from the perspective of computer hardware, specifically by accelerating the dose calculation through a single computer hardware in the dose calculation system. However, the dose calculation system includes multiple computer hardware. Performing dose calculations using only a single computer hardware will result in a waste of computing resources and fail to maximize the dose calculation speed.
[0007] Summary of the Invention
[0008] Based on this, it is necessary to provide a control method, device and dose calculation system for the dose calculation system, which can fully utilize the computing resources of the dose calculation system to maximize the dose calculation speed, in order to address the above technical problems.
[0009] In a first aspect, the present application provides a control method for a dose calculation system, the dose calculation system including a CPU and a GPU; the method comprising:
[0010] Construct a geometric model for dose calculation;
[0011] Determine the CPU and GPU joint dose calculation method based on the CPU and GPU calculation speeds;
[0012] The CPU and GPU perform particle simulation based on the CPU and GPU joint dose calculation method and dose calculation geometric model to obtain dose calculation results.
[0013] By using the CPU and GPU for joint dose calculation, the computing resources of the dose calculation system can be fully utilized to maximize the speed of dose calculation.
[0014] In one embodiment, the CPU and GPU perform particle simulation according to the CPU and GPU joint dose calculation method and the dose calculation geometric model to obtain dose calculation results, including:
[0015] When the CPU and GPU joint dose calculation method is the first joint dose calculation method, the number of particles to be simulated on the CPU and GPU is determined according to the calculation speed of the CPU, the calculation speed of the GPU, and the total number of particles to be simulated;
[0016] The CPU and GPU respectively simulate particles corresponding to the number of particles to be simulated according to the dose calculation geometric model to obtain the CPU dose calculation results and the GPU dose calculation results;
[0017] The CPU dose calculation results and the GPU dose calculation results are summarized to obtain the dose calculation results.
[0018] In one embodiment, determining the number of particles to be simulated by the CPU and the GPU according to the computing speed of the CPU, the computing speed of the GPU, and the total number of particles to be simulated includes:
[0019] According to the computing speed of the CPU and the computing speed of the GPU, determine the computing speed ratio of the CPU and the computing speed ratio of the GPU;
[0020] Determine the number of particles to be simulated on the CPU based on the CPU's computing speed ratio and the total number of particles to be simulated;
[0021] The number of particles to be simulated on the CPU is determined based on the GPU's computing speed ratio and the total number of particles to be simulated.
[0022] In one embodiment, the CPU and the GPU perform particle simulation according to a CPU and GPU joint dose calculation method and a dose calculation geometric model to obtain a dose calculation result, further comprising:
[0023] When the CPU and GPU joint dose calculation method is the second joint dose calculation method, the GPU performs particle simulation based on the dose calculation geometry model;
[0024] When the GPU recognizes that the number of collision particles in the simulation process exceeds the preset collision particle threshold, the CPU performs collision processing on the collision particles and obtains the collision processing result;
[0025] The GPU continues the particle simulation process based on the collision processing results and obtains the dose calculation results.
[0026] In one embodiment, the GPU performing particle simulation based on the dose calculation geometry model includes:
[0027] The GPU simulates the particle transport process based on the dose calculation geometric model.
[0028] In one embodiment, the method further comprises:
[0029] The GPU determines the cross-sectional information of the grid where the particles are located, and determines whether the particles will collide during the transport process based on the cross-sectional information and random sampling values;
[0030] If a collision occurs, the GPU marks the particle as a collision particle.
[0031] In one embodiment, when the GPU identifies that the number of colliding particles during a simulation exceeds a preset collision particle threshold, the CPU performs collision processing on the colliding particles, including:
[0032] When the GPU recognizes that the number of collision particles during the simulation exceeds the preset collision particle threshold, the particle information of the collision particles is copied to the CPU;
[0033] The CPU performs collision processing on the colliding particles based on the particle information.
[0034] In one embodiment, determining a CPU and GPU joint dose calculation method based on the CPU calculation speed and the GPU calculation speed includes:
[0035] When the ratio of the calculation speed of the CPU to the calculation speed of the GPU is greater than a first threshold, determining that the CPU and GPU combined dose calculation method is a first combined dose calculation method;
[0036] When the ratio of the CPU calculation speed to the GPU calculation speed is less than a second threshold, the CPU and GPU joint dose calculation method is determined to be the second joint dose calculation method; wherein the first threshold is greater than the second threshold.
[0037] In one embodiment, determining a CPU and GPU joint dose calculation method based on the CPU calculation speed and the GPU calculation speed further includes:
[0038] When the ratio of the CPU calculation speed to the GPU calculation speed is less than or equal to the first threshold and greater than or equal to the second threshold, the CPU and GPU combined dose calculation method is determined to be the first combined dose calculation method or the second combined dose calculation method.
[0039] In one embodiment, the first threshold is 0.3 and the second threshold is 0.15.
[0040] In a second aspect, the present application further provides a control device for a dose calculation system, wherein the dose calculation system includes a CPU and a GPU. The device includes:
[0041] Model building module, used to build the dose calculation geometry model;
[0042] A method determination module is used to determine the CPU and GPU joint dose calculation method based on the CPU calculation speed and the GPU calculation speed;
[0043] The dose calculation module is used to control the CPU and GPU to perform particle simulation according to the CPU and GPU joint dose calculation method and dose calculation geometric model to obtain the dose calculation results.
[0044] In one embodiment, the dose calculation module is further used to, when the CPU and GPU joint dose calculation method is the first joint dose calculation method, determine the number of particles to be simulated for the CPU and GPU respectively according to the calculation speed of the CPU, the calculation speed of the GPU and the total number of particles to be simulated; control the CPU to simulate particles corresponding to the number of particles to be simulated according to the dose calculation geometric model to obtain a CPU dose calculation result; control the GPU to simulate particles corresponding to the number of particles to be simulated according to the dose calculation geometric model to obtain a GPU dose calculation result; and summarize the CPU dose calculation result and the GPU dose calculation result to obtain a dose calculation result.
[0045] In one embodiment, the dose calculation module is further used to determine the CPU calculation speed ratio and the GPU calculation speed ratio based on the CPU calculation speed and the GPU calculation speed; determine the number of particles to be simulated by the CPU based on the CPU calculation speed ratio and the total number of particles to be simulated; determine the number of particles to be simulated by the CPU based on the GPU calculation speed ratio and the total number of particles to be simulated.
[0046] In one embodiment, the dose calculation module is also used to control the GPU to perform particle simulation according to the dose calculation geometric model when the joint dose calculation method of the CPU and GPU is the second joint dose calculation method; when the GPU recognizes that the number of colliding particles in the simulation process exceeds a preset collision particle threshold, control the CPU to perform collision processing on the colliding particles to obtain a collision processing result; control the GPU to continue the particle simulation process according to the collision processing result to obtain a dose calculation result.
[0047] In one embodiment, the dose calculation module is further used to control the GPU to simulate the particle transport process based on the dose calculation geometric model.
[0048] In one embodiment, the dose calculation module is further used to control the GPU to determine the cross-sectional information of the grid where the particle is located, and determine whether the particle will collide during the transport process based on the cross-sectional information and the random sampling value; if a collision occurs, the GPU is controlled to mark the particle as a collision particle.
[0049] In one embodiment, the dose calculation module is further used to control the GPU to copy the particle information of the collision particles to the CPU when the GPU recognizes that the number of collision particles in the simulation process exceeds a preset collision particle threshold; and control the CPU to perform collision processing on the collision particles according to the particle information.
[0050] In one embodiment, the method determination module is further used to determine that the combined dose calculation method of the CPU and GPU is the first combined dose calculation method when the ratio of the calculation speed of the CPU to the calculation speed of the GPU is greater than a first threshold; when the ratio of the calculation speed of the CPU to the calculation speed of the GPU is less than a second threshold, determine that the combined dose calculation method of the CPU and GPU is the second combined dose calculation method; wherein the first threshold is greater than the second threshold.
[0051] In one embodiment, the method determination module is further used to determine that the CPU and GPU joint dose calculation method is the first joint dose calculation method or the second joint dose calculation method when the ratio of the CPU calculation speed to the GPU calculation speed is less than or equal to the first threshold and greater than or equal to the second threshold.
[0052] In one embodiment, the first threshold is 0.3 and the second threshold is 0.15.
[0053] In a third aspect, the present application also provides a dose calculation system. The system includes:
[0054] Model building module, used to build the dose calculation geometry model;
[0055] A method determination module is used to determine the CPU and GPU joint dose calculation method based on the CPU calculation speed and the GPU calculation speed;
[0056] A CPU module is used to perform at least a portion of the dose calculation based on a CPU and GPU combined dose calculation method and a dose calculation geometric model;
[0057] The GPU module is used to perform at least part of the dose calculation according to the CPU and GPU joint dose calculation method and the dose calculation geometric model.
[0058] In a fourth aspect, the present application further provides a computer device. The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0059] Construct a geometric model for dose calculation;
[0060] Determine the CPU and GPU joint dose calculation method based on the CPU and GPU calculation speeds;
[0061] The CPU and GPU perform particle simulation based on the CPU and GPU joint dose calculation method and dose calculation geometric model to obtain dose calculation results.
[0062] In a fifth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0063] Construct a geometric model for dose calculation;
[0064] Determine the CPU and GPU joint dose calculation method based on the CPU and GPU calculation speeds;
[0065] The CPU and GPU perform particle simulation based on the CPU and GPU joint dose calculation method and dose calculation geometric model to obtain dose calculation results.
[0066] In a sixth aspect, the present application further provides a computer program product. The computer program product includes a computer program, which, when executed by a processor, implements the following steps:
[0067] Construct a geometric model for dose calculation;
[0068] Determine the CPU and GPU joint dose calculation method based on the CPU and GPU calculation speeds;
[0069] The CPU and GPU perform particle simulation based on the CPU and GPU joint dose calculation method and dose calculation geometric model to obtain dose calculation results.
[0070] The control method, device, and system for the dose calculation system introduce a CPU-GPU combined acceleration approach. After constructing a dose calculation geometric model, the combined CPU-GPU dose calculation approach is determined based on the CPU and GPU calculation speeds. This approach selects an appropriate combined dose calculation approach based on the performance of the CPU and GPU, fully utilizing computing resources and maximizing the dose calculation speed to reduce dose calculation time. Furthermore, compared to using either CPU or GPU calculations alone, both systems offer higher computational efficiency and maximize the use of computing resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] FIG1 is a schematic flow chart of a control method of a dose calculation system according to an embodiment;
[0072] FIG2 is a schematic diagram of a process of performing particle simulation by a CPU and a GPU according to a CPU and GPU joint dose calculation method and a dose calculation geometric model in one embodiment;
[0073] FIG3 is a schematic diagram of a process of performing particle simulation by the CPU and GPU according to a joint dose calculation method and a dose calculation geometric model of the CPU and GPU in another embodiment;
[0074] FIG4 is a planar schematic diagram of particles in a three-dimensional voxel tissue model when the boundary distance is greater than the collision distance in one embodiment;
[0075] FIG5 is a planar schematic diagram of particles in a three-dimensional voxel tissue model when the boundary distance is less than the collision distance in one embodiment;
[0076] FIG6 is a schematic diagram of a process for determining a CPU and GPU joint dose calculation method in one embodiment;
[0077] FIG7 is a block diagram of a control device of a dose calculation system according to an embodiment;
[0078] FIG8 is a block diagram of a dose calculation system according to an embodiment;
[0079] FIG9 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0080] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0081] Radiation therapy is an important treatment for cancer. Before starting radiotherapy, a treatment plan must be developed, and dose calculation is a core component of this plan. Currently, the most accurate and reliable method for dose calculation is the Monte Carlo method. The Monte Carlo method simulates the transport trajectory of each particle, accurately calculating the dose distribution within the target object. However, the Monte Carlo method has a slow convergence rate. Reliable dose calculations require simulating a large number of particles, resulting in lengthy calculation times. Therefore, it is necessary to improve the speed of dose calculation.
[0082] There are two main directions for optimizing the Monte Carlo method. One is to speed up the convergence speed and reduce the number of particles that need to be simulated; the other is direct acceleration, which makes the time required to simulate the same number of particles shorter. The direct acceleration method mainly improves the dose calculation speed from the perspective of computer hardware. The computer hardware in the dose calculation system mainly includes CPU (center processing unit) and GPU (Graphic Processing Unit). Currently, most dose calculation systems use multi-core CPUs to accelerate dose calculations, and some dose calculation systems use GPUs to accelerate dose calculations. Specifically, for dose calculations in photon beam therapy and proton therapy, the use of GPU acceleration has a significant effect and is significantly faster than multi-core CPUs of the same price. For dose calculations in boron neutron capture therapy, since the neutron simulation process is far more complex than that of photons and protons, there is currently no corresponding dose calculation system that uses GPU acceleration methods to calculate doses, and multi-core CPUs are still used to accelerate dose calculations. Therefore, traditional technologies all use a single computer hardware in the dose calculation system to accelerate dose calculations.
[0083] However, most dose calculation systems have both multi-core CPUs and GPUs. Whether using the CPU or the GPU alone to accelerate the dose calculation process will waste the other computing resource. In order to fully utilize the computing resources of the dose calculation system, a control method for the dose calculation system that can simultaneously utilize the CPU and GPU to accelerate the dose calculation is proposed.
[0084] In one embodiment, as shown in FIG1 , a control method for a dose calculation system is provided. This embodiment uses the method applied to a dose calculation system as an example. In this embodiment, the method includes the following steps:
[0085] Step 102: Construct a dose calculation geometry model.
[0086] The dose calculation geometric model refers to the geometric model used for particle simulation during the dose calculation process. The particles can be at least one of neutrons, photons, protons, or electrons.
[0087] The dose calculation system constructs a dose calculation geometric model. The dose calculation geometric model may include a radiation source model, a three-dimensional voxel tissue model, a shielding body model, a loading device model, etc. Among them, the radiation source model may be a collimator model or a beam outlet model of an irradiation device, etc., which contains information such as the energy, position and direction of the radiation source. The three-dimensional voxel tissue model is constructed based on the medical image of the target object, and refers to a three-dimensional model containing the tissue information of the target object. The tissue information may include tissue type and tissue density. The shielding body model refers to the shielding material information set on the skin surface of the target object or between the radiation source and the target object, etc., which is used to shield the radiation of the beam emitted from the radiation source model to the normal tissue of the target object. The loading device model refers to a loading device used to perform radiotherapy on the target object, such as a treatment bed, a treatment chair, etc. It can be understood that in most dose calculations, the dose calculation geometric model may only include the radiation source model and the three-dimensional voxel tissue model.
[0088] Furthermore, the dose calculation system can perform three-dimensional reconstruction on the medical image to obtain a three-dimensional model, and then perform three-dimensional grid processing on the three-dimensional model to obtain a three-dimensional voxel model. According to the pre-defined ROI (region of interest) boundary, at least one ROI area is outlined, and the tissue type and tissue density in the POI area are determined, thereby obtaining a three-dimensional voxel tissue model containing the tissue information of the target object. Among them, the medical image can be an X-ray image, a CT image, etc. The medical image can be an image of a part or multiple parts. Specifically, one or more body parts of the target object can be scanned in advance by a scanning device, or by emitting X-rays to one or more body parts of the object to obtain scanning data or projection data of the object, and then the medical image of the target object can be obtained by image reconstruction of the scanning data or projection data. Optionally, the medical image can also be pre-stored in the terminal, and when performing the dose calculation, the medical image sent by the terminal is obtained.
[0089] Step 104 : Determine a CPU and GPU joint dose calculation method based on the CPU calculation speed and the GPU calculation speed.
[0090] The CPU and GPU are two independent modules in the dose calculation system. The GPU operates by sending instructions from the CPU. The CPU's calculation speed and the GPU's calculation speed refer to the number of particles that the CPU and GPU can simulate per unit time, respectively.
[0091] By simulating a small number of particles on the CPU and GPU in advance, the calculation speeds of the CPU and GPU are obtained. Therefore, the computing power of the CPU can be determined by the ratio between the computing speeds of the CPU and GPU, and then the CPU and GPU joint dose calculation method is determined based on the computing power of the CPU. The CPU and GPU joint dose calculation method is used to determine the collaboration method of the CPU and GPU in the dose calculation process. By using the CPU and GPU to perform joint dose calculation, the computing resources of the dose calculation system are fully utilized to maximize the dose calculation speed. When the ratio between the computing speeds of the CPU and GPU changes, the determined CPU and GPU joint dose calculation method may also be different. Of course, the computing speeds of the GPU and CPU can also be evaluated by other methods known to those skilled in the art.
[0092] Furthermore, the preset CPU and GPU joint dose calculation methods may include two methods: one in which the CPU and GPU independently complete the particle simulation process, and the other in which the CPU and GPU each complete a portion of the particle simulation process. By determining the computing power of the CPU, one of the preset CPU and GPU joint dose calculation methods is selected as the CPU and GPU joint dose calculation method.
[0093] In step 106 , the CPU and the GPU perform particle simulation according to the CPU and GPU joint dose calculation method and the dose calculation geometric model to obtain a dose calculation result.
[0094] The CPU and GPU determine their respective collaboration methods in the dose calculation process according to the joint dose calculation method of CPU and GPU. Then, the Monte Carlo method is used to simulate the particle transport process based on the dose calculation geometric model to obtain the dose calculation results.
[0095] In this embodiment, by introducing a combined CPU and GPU acceleration approach, after constructing a dose calculation geometry model, the combined CPU and GPU dose calculation method is determined based on the CPU and GPU calculation speeds. This means that an appropriate combined dose calculation method is selected based on the performance of the CPU and GPU, fully utilizing computing resources. This maximizes dose calculation speed and reduces dose calculation time. Furthermore, compared to using either CPU or GPU calculations alone, both methods offer higher computational efficiency and maximize the use of computing resources.
[0096] Since there are multiple preset CPU and GPU joint dose calculation methods, it is necessary to select a joint dose calculation method from the preset CPU and GPU joint dose calculation methods as the CPU and GPU joint dose calculation method. In one embodiment, as shown in FIG2 , the CPU and GPU perform particle simulation according to the CPU and GPU joint dose calculation method and the dose calculation geometric model to obtain dose calculation results, including:
[0097] Step 202 : When the CPU and GPU joint dose calculation mode is the first joint dose calculation mode, the number of particles to be simulated of the CPU and GPU is determined respectively according to the calculation speed of the CPU, the calculation speed of the GPU and the total number of particles to be simulated.
[0098] In step 204 , the CPU and the GPU respectively simulate particles corresponding to the number of particles to be simulated according to the dose calculation geometric model to obtain a CPU dose calculation result and a GPU dose calculation result.
[0099] Step 206 : Summarize the CPU dose calculation result and the GPU dose calculation result to obtain a dose calculation result.
[0100] The first joint dose calculation method means that both the CPU and GPU need to independently complete the particle simulation process. The total number of particles to be simulated refers to the total number of particles that the dose calculation system needs to simulate during the dose calculation process.
[0101] When accelerating the dose calculation of the Monte Carlo method, an acceleration method called particle parallelism is usually used. Whether it is a multi-core CPU or GPU, the principle of acceleration is to speed up the calculation by distributing the calculation tasks to multiple computing cores. For a certain model of CPU or GPU, the computing power of each core in the CPU or GPU is the same, so when distributing the calculation amount, it only needs to be evenly distributed according to the number of computing cores. However, considering the differences in the computing power of CPUs and GPUs, the computing power of different models of CPUs and GPUs varies greatly. To achieve a good acceleration effect, it is necessary to ensure that the computing power of the CPU and GPU is proportional to its computing power, so that the CPU and GPU can complete the dose calculation almost simultaneously and shorten the waiting time as much as possible.
[0102] When the CPU's computing power is determined to be high or medium based on the ratio between the CPU and GPU's computing speeds, the CPU and GPU joint dose calculation method is determined to be the first joint dose calculation method. Specifically, the total number of particles to be simulated is obtained according to the first joint dose calculation method, and the computational workload is allocated to the CPU and GPU based on the CPU's computing speed, the GPU's computing speed, and the total number of particles to be simulated, thereby obtaining the number of particles to be simulated for the CPU and the GPU. The sum of the number of particles to be simulated for the CPU and the number of particles to be simulated for the GPU is the total number of particles to be simulated. Thus, the CPU simulates the particles corresponding to the number of particles to be simulated on the CPU based on the dose calculation geometric model according to the Monte Carlo method, thereby obtaining a CPU dose calculation result. Simultaneously, the GPU also simulates the particles corresponding to the number of particles to be simulated on the GPU based on the Monte Carlo method, thereby obtaining a GPU dose calculation result, and transmits the GPU dose calculation result to the CPU. The CPU then superimposes the CPU dose calculation result and the GPU dose calculation result to obtain a dose calculation result.
[0103] Optionally, the CPU is a multi-core CPU, and parallel particle simulation is performed using the multi-core CPU. The particle simulation process for the multi-core CPU is as follows: the number of processes or threads of the CPU is obtained to obtain a value n, thereby dividing the number of particles to be simulated on the CPU into n equal parts. Then, each process or thread simulates and counts each particle part based on the dose calculation geometry model using the Monte Carlo method. The counts obtained by each process or thread are then statistically analyzed to obtain a CPU dose calculation result.
[0104] Optionally, the GPU is implemented using multi-processor parallel computing of the GPU, and the simulation calculation process of the GPU is as follows: the cross-sectional information, random sampling values, etc. of the number of particles to be simulated by the GPU are transferred from the CPU memory to the GPU video memory, so that each processor in the GPU simulates, calculates and counts a single particle based on the dose calculation geometric model according to the Monte Carlo method, and the counting results are counted into the global count. Afterwards, it is determined whether there are still particles that have not been simulated. If not, the counting result, that is, the GPU dose calculation result, is transferred from the GPU memory to the CPU memory. If there are still particles that have not been simulated, return to the previous step, continue to simulate and count the particles that have not been simulated, until all particles are simulated, and obtain the GPU dose calculation result.
[0105] In this embodiment, when the computing power of the CPU is high or medium, the CPU and GPU respectively calculate the corresponding particle numbers according to their computing power, which is more efficient than using only the CPU or only the GPU for calculation.
[0106] In an optional manner of the above embodiment, the number of particles to be simulated of the CPU and the GPU is determined according to the computing speed of the CPU, the computing speed of the GPU, and the total number of particles to be simulated, including: determining the computing speed ratio of the CPU and the computing speed ratio of the GPU according to the computing speed of the CPU and the computing speed of the GPU; determining the number of particles to be simulated of the CPU according to the computing speed ratio of the CPU and the total number of particles to be simulated; determining the number of particles to be simulated of the CPU according to the computing speed ratio of the GPU and the total number of particles to be simulated.
[0107] The CPU computing speed ratio refers to the ratio of the CPU computing speed to the sum of the CPU and GPU computing speeds. The GPU computing speed ratio refers to the ratio of the GPU computing speed to the sum of the CPU and GPU computing speeds.
[0108] Specifically, the sum of the CPU's and GPU's computing speeds is calculated, and the ratio of the CPU's computing speed to the sum is determined as the CPU's computing speed share. The ratio of the GPU's computing speed to the sum is determined as the GPU's computing speed share. Thus, the total number of particles to be simulated is multiplied by the CPU's computing speed share to obtain the number of particles to be simulated for the CPU, and the total number of particles to be simulated is multiplied by the GPU's computing speed share to obtain the number of particles to be simulated for the GPU.
[0109] For example, the computing speeds of the CPU and GPU are Vc and Vg respectively. If the total number of particles to be simulated is N, the number of particles simulated on the CPU is N*Vc / (Vc+Vg), and the number of particles simulated on the GPU is N*Vg / (Vc+Vg).
[0110] In this embodiment, the computing load is allocated to the CPU and GPU respectively according to the computing speed ratio of the CPU and GPU, so as to fully utilize the computing resources of the CPU and GPU, maximize the computing speed based on the existing CPU and GPU, and reduce the dose calculation time.
[0111] In one embodiment, as shown in FIG3 , the CPU and GPU perform particle simulation according to the CPU and GPU joint dose calculation method and the dose calculation geometric model to obtain dose calculation results, further comprising:
[0112] Step 302: When the CPU and GPU joint dose calculation method is the second joint dose calculation method, the GPU performs particle simulation according to the dose calculation geometric model.
[0113] Step 304: When the GPU recognizes that the number of collision particles during the simulation exceeds a preset collision particle threshold, the CPU performs collision processing on the collision particles to obtain a collision processing result.
[0114] In step 306 , the GPU continues the particle simulation process based on the collision processing result to obtain the dose calculation result.
[0115] Among them, the second joint dose calculation method refers to the CPU and GPU completing part of the simulation process during the particle simulation process respectively.
[0116] In GPU simulations, particle collision calculations account for a significant proportion of the total computation time, up to 30%. In contrast, in CPU simulations, the calculation time for particle collisions is less than 3%. This discrepancy stems primarily from the computational models of the CPU and GPU. In a CPU, each physics core executes independent instructions. In a GPU, however, each of the 32 GPU cores must execute instructions synchronously. If different computational instructions occur, cores with different instructions go dormant while some cores with the same instruction run. This results in poor GPU processing capabilities for computational branches and low computational efficiency. For neutron collisions, the number of reaction paths for neutron-nucleus collisions is numerous, and the collisions that occur for each particle depend on random sampling. This prevents the GPU from accelerating collision calculations, resulting in a significantly higher percentage of collision calculation time than CPU calculations. Therefore, a second combined dose calculation method has been proposed. This method primarily uses the GPU for particle simulation, but offloads the collision calculation process to the CPU. Specifically, the CPU performs only the particle collision calculation, while the GPU handles all the particle simulation processes other than the collision calculation.
[0117] Specifically, when the CPU's computing power is determined to be poor or medium based on the ratio of the CPU's computing speed to the GPU's computing speed, the CPU and GPU joint dose calculation method is determined to be the second joint dose calculation method. Specifically, the GPU simulates the particle transport process based on the dose calculation geometric model using the Monte Carlo method. During the particle transport process, when the GPU identifies the particle as a collision particle, the simulation process for the particle is stopped and the collision particle is saved. When the GPU identifies that the number of collision particles in the transport process exceeds a preset collision particle threshold, a collision calculation is required, and the collision calculation process is transferred to the CPU. The CPU performs collision processing on the collision particles, obtains a collision processing result, and sends the collision processing result to the GPU. After obtaining the collision processing result, the GPU continues to simulate the transport process of the collision particles corresponding to the collision processing result until the particle simulation of the total number of particles to be simulated is completed, and the dose calculation result is obtained. It is understandable that while the CPU is performing collision processing on the collision particles, the GPU can continue to simulate other particles, and the two do not interfere with each other.
[0118] After the GPU obtains the dose calculation result, it transmits the dose calculation result to the CPU, and the CPU uses the dose calculation result as the final dose calculation result.
[0119] In this embodiment, when the CPU's own computing power is poor or medium, considering the CPU's acceleration characteristics for the collision calculation process, during the GPU particle simulation process, the collision calculation process is transferred to the CPU. By performing collision calculations through the CPU, the contribution of the CPU and GPU to the computing speed can be fully utilized, thereby maximizing the computing speed based on the existing CPU and GPU.
[0120] In an optional manner of the above embodiment, the GPU performing particle simulation according to the dose calculation geometric model includes: the GPU simulating the particle transport process based on the dose calculation geometric model.
[0121] Among them, particle simulation is to simulate the entire transport process of particles from the radiation source model to the three-dimensional voxel tissue model.
[0122] Specifically, the GPU uses a Monte Carlo simulation program to simulate the transport of particles from the radiation source model to the 3D voxel tissue model when the target object is irradiated by a particle beam emitted by the radiation source model, based on models of shielding and support devices. This particle transport process includes the particle's movement in the space between the radiation source model and the 3D voxel tissue model, as well as the particle's collision trajectory and energy distribution within the 3D voxel tissue model of the target object.
[0123] Furthermore, beam parameters (such as beam energy, intensity, radius, etc.) are defined in the Monte Carlo simulation program, and by sampling different irradiation angles, the particle transport process from the radiation source model to the three-dimensional voxel tissue model under different irradiation angles is simulated and calculated.
[0124] In this embodiment, when the CPU itself has poor or medium computing power, the GPU simulates the particle transport process based on the dose calculation geometric model, which can fully utilize the computing resources of the GPU and improve the dose calculation speed.
[0125] In the above optional method, the process of simulating the transport of particles also includes: a step of identifying collision particles, which may include: the GPU determining the cross-sectional information of the grid where the particles are located, and determining whether the particles will collide during the transport process based on the cross-sectional information and random sampling values; if a collision occurs, the GPU marks the particles as collision particles.
[0126] The cross-sectional information refers to the total macroscopic cross-sectional area of the particle and the mesh material in which the particle resides. The random sampling value refers to a sampling value of a random variable uniformly distributed between 0 and 1.
[0127] The GPU determines the material of the grid where the particle is currently located during the transport process based on the shielding model in the dose calculation geometric model, and calculates the total macroscopic cross-section of the particle and the grid material where the particle is located as the cross-sectional information of the grid where the particle is located.
[0128] Since the dose calculation geometric model is not a uniform medium and the particle simulation is performed in grid units, after obtaining the collision distance based on the cross-sectional information of the grid where the particle is located and the random sampling value, it is also necessary to calculate the distance from the particle to the grid boundary, that is, the boundary distance. If the boundary distance is greater than the collision distance, it is recognized that the particle will collide when it moves to the position of the collision distance, and the particle is marked as a collision particle.
[0129] Specifically, the cross-section information of the particle's grid and the random sampling value are substituted into the collision distance calculation function to obtain the collision distance. The collision distance calculation function can be shown as follows:
[0130] Where L represents the collision distance, ξ is a sample value of a random variable uniformly distributed between 0 and 1, and Σ t Represents the cross-section information of the grid where the particle is located.
[0131] If the boundary distance is greater than the collision distance, the particle is identified as a collision particle if it moves to the collision distance, and the particle is marked as a collision particle. When the boundary distance is greater than the collision distance, taking a 3D voxel tissue model as an example, a planar schematic diagram of a particle in a 3D voxel tissue model grid can be shown in Figure 4, where D represents the boundary distance and L represents the collision distance.
[0132] If the boundary distance is less than the collision distance, no collision occurs and the particle moves to the grid boundary. At this point, the particle enters the next grid and returns to the step of identifying colliding particles. The collision distance is resampled and compared to the boundary distance until the particle leaves the grid or is absorbed. When the boundary distance is less than the collision distance, taking a 3D voxel tissue model as an example, a planar schematic diagram of a particle in a 3D voxel tissue model grid can be shown in Figure 5, where D represents the boundary distance and L represents the collision distance.
[0133] In this embodiment, the GPU determines whether particles will collide during transportation based on the cross-sectional information of the grid where the particles are located and the random sampling value, and marks the particles that will collide as collision particles. This can accurately determine whether particles will collide. By marking the collision particles, it is easy to distinguish between collision particles and non-collision particles, which is conducive to quickly transmitting the collision particles to the CPU.
[0134] In one embodiment, when the GPU recognizes that the number of collision particles during the simulation process exceeds a preset collision particle threshold, the CPU performs collision processing on the collision particles, including: when the GPU recognizes that the number of collision particles during the simulation process exceeds the preset collision particle threshold, copying the particle information of the collision particles to the CPU; the CPU performs collision processing on the collision particles according to the particle information.
[0135] When the GPU detects that the number of colliding particles during the simulation exceeds the preset collision particle threshold, indicating that the number of collision particles required for the collision calculation process has met the dose calculation requirements, the GPU copies the particle information of the colliding particles to the CPU. This particle information may include particle type (such as neutron, photon), particle cross-section information, and particle nuclide. The CPU performs collision processing on the colliding particles based on this particle information to obtain the particle dose absorbed by the 3D voxel tissue model. The CPU can perform collision calculations using traditional particle collision methods.
[0136] Furthermore, when the particle type is a neutron, the nuclide that collides with the neutron, whether the neutron undergoes an absorption reaction with the nuclide, whether the neutron undergoes elastic scattering with the nuclide, whether the neutron undergoes inelastic scattering with the nuclide, etc. during the collision process are determined based on the neutron information. The neutron dose absorbed by the three-dimensional voxel tissue model is calculated based on the reactions that occur. Among them, an absorption reaction refers to a reaction in which all neutrons are absorbed but no neutrons are produced (for example, only photons are produced). When the particle type is a photon, the photon information is used to determine whether the photon undergoes coherent scattering (Rayleigh scattering), incoherent scattering (Compton scattering), photoelectric effect, electron pair effect, etc., and the photon dose absorbed by the three-dimensional voxel tissue model is calculated based on the reactions that occur.
[0137] In this embodiment, the particle information of the collision particles is copied to the CPU so that the CPU can quickly perform collision processing on the collision particles according to the particle information.
[0138] In one embodiment, as shown in FIG6 , determining a CPU and GPU joint dose calculation method based on the CPU calculation speed and the GPU calculation speed includes:
[0139] Step 602: When the ratio of the CPU calculation speed to the GPU calculation speed is greater than a first threshold, the CPU and GPU combined dose calculation method is determined to be a first combined dose calculation method.
[0140] Step 604 : When the ratio of the CPU calculation speed to the GPU calculation speed is less than a second threshold, the CPU and GPU combined dose calculation method is determined to be a second combined dose calculation method.
[0141] The first threshold and the second threshold are used to determine the computing capability of the CPU. The first threshold is greater than the second threshold.
[0142] Specifically, the CPU's computing power is determined based on the ratio of the CPU's computing speed to the GPU's computing speed. When the ratio is greater than a first threshold, it indicates that the CPU's computing power is high, and the first combined dose calculation method can be determined as the combined dose calculation method for CPU and GPU. When the ratio is less than a second threshold, it indicates that the CPU's computing power is low, and the second combined dose calculation method can be determined as the combined dose calculation method for CPU and GPU.
[0143] Furthermore, the first threshold is 0.3, and the second threshold is 0.15. The first threshold and the second threshold can be obtained based on a large number of dose calculation experiments. Thus, in the actual dose calculation process, the dose calculation system can flexibly determine the CPU and GPU joint dose calculation method based on the ratio of the CPU calculation speed to the GPU calculation speed.
[0144] In this embodiment, the CPU computing power is determined by the ratio of the CPU computing speed to the GPU computing speed, and the CPU and GPU joint dose calculation method is determined according to the CPU's own computing power, so that the computing amount is allocated according to the actual computing power of the CPU and GPU, and the computing speed can be maximized based on the CPU and GPU.
[0145] Furthermore, determining the CPU and GPU joint dose calculation method based on the CPU calculation speed and the GPU calculation speed also includes: when the ratio of the CPU calculation speed to the GPU calculation speed is less than or equal to the first threshold and greater than or equal to the second threshold, determining that the CPU and GPU joint dose calculation method is the first joint dose calculation method or the second joint dose calculation method.
[0146] When the ratio of the CPU's computing speed to the GPU's computing speed is between the second threshold and the first threshold, it indicates that the CPU's computing power is medium, and either the first combined dose calculation method or the second combined dose calculation method can be selected as the CPU and GPU combined dose calculation method.
[0147] In this embodiment, when the ratio of the CPU computing speed to the GPU computing speed is less than or equal to the first threshold and greater than or equal to the second threshold, the first combined dose calculation method or the second combined dose calculation method can be selected to flexibly determine the CPU and GPU combined dose calculation method.
[0148] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0149] Based on the same inventive concept, embodiments of the present application also provide a control device for a dose calculation system for implementing the aforementioned control method for a dose calculation system. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more embodiments of the control device for a dose calculation system provided below can be found in the aforementioned limitations of the control method for a dose calculation system, and will not be further elaborated here.
[0150] In one embodiment, as shown in FIG7 , a control device for a dose calculation system is provided. The dose calculation system includes a CPU and a GPU. The control device for the dose calculation system includes: a model building module 702 , a mode determination module 704 , and a dose calculation module 706 , wherein:
[0151] The model building module 702 is used to build a dose calculation geometry model.
[0152] The method determination module 704 is used to determine the CPU and GPU joint dose calculation method according to the calculation speed of the CPU and the calculation speed of the GPU.
[0153] The dose calculation module 706 is used to control the CPU and GPU to perform particle simulation according to the CPU and GPU joint dose calculation method and the dose calculation geometric model to obtain the dose calculation result.
[0154] In one embodiment, the dose calculation module 706 is further used to, when the CPU and GPU joint dose calculation mode is the first joint dose calculation mode, determine the number of particles to be simulated for the CPU and GPU, respectively, based on the CPU calculation speed, the GPU calculation speed, and the total number of particles to be simulated; control the CPU to simulate particles corresponding to the number of particles to be simulated according to the dose calculation geometric model to obtain a CPU dose calculation result; control the GPU to simulate particles corresponding to the number of particles to be simulated according to the dose calculation geometric model to obtain a GPU dose calculation result; and summarize the CPU dose calculation result and the GPU dose calculation result to obtain a dose calculation result.
[0155] In one embodiment, the dose calculation module 706 is further used to determine the CPU's calculation speed ratio and the GPU's calculation speed ratio based on the CPU's calculation speed ratio and the GPU's calculation speed ratio; determine the number of particles to be simulated for the CPU based on the CPU's calculation speed ratio and the total number of particles to be simulated; and determine the number of particles to be simulated for the CPU based on the GPU's calculation speed ratio and the total number of particles to be simulated.
[0156] In one embodiment, the dose calculation module 706 is also used to control the GPU to perform particle simulation according to the dose calculation geometric model when the CPU and GPU joint dose calculation method is the second joint dose calculation method; when the GPU recognizes that the number of colliding particles in the simulation process exceeds the preset collision particle threshold, control the CPU to perform collision processing on the colliding particles to obtain a collision processing result; control the GPU to continue the particle simulation process according to the collision processing result to obtain a dose calculation result.
[0157] In one embodiment, the dose calculation module 706 is further configured to control the GPU to simulate the particle transport process based on a dose calculation geometric model.
[0158] In one embodiment, the dose calculation module 706 is further used to control the GPU to determine the cross-sectional information of the grid where the particle is located, and determine whether the particle will collide during the transport process based on the cross-sectional information and the random sampling value; if a collision occurs, the GPU is controlled to mark the particle as a collision particle.
[0159] In one embodiment, the dose calculation module 706 is also used to control the GPU to copy the particle information of the collision particles to the CPU when the GPU recognizes that the number of collision particles in the simulation process exceeds a preset collision particle threshold; and control the CPU to perform collision processing on the collision particles according to the particle information.
[0160] In one embodiment, the method determination module 704 is also used to determine that the combined dose calculation method of the CPU and GPU is the first combined dose calculation method when the ratio of the calculation speed of the CPU to the calculation speed of the GPU is greater than a first threshold; when the ratio of the calculation speed of the CPU to the calculation speed of the GPU is less than a second threshold, determine that the combined dose calculation method of the CPU and GPU is the second combined dose calculation method; wherein the first threshold is greater than the second threshold.
[0161] In one embodiment, the method determination module 704 is also used to determine that the CPU and GPU joint dose calculation method is the first joint dose calculation method or the second joint dose calculation method when the ratio of the CPU calculation speed to the GPU calculation speed is less than or equal to the first threshold and greater than or equal to the second threshold.
[0162] In one embodiment, the first threshold is 0.3 and the second threshold is 0.15.
[0163] Each module in the control device of the dose calculation system may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0164] In one embodiment, as shown in FIG8 , a dose calculation system is provided, including: a model building module 802 , a method determination module 804 , a CPU module 806 , and a GPU module 808 , wherein:
[0165] The model building module 802 is used to build a dose calculation geometry model.
[0166] The method determination module 804 is used to determine the CPU and GPU joint dose calculation method according to the calculation speed of the CPU and the calculation speed of the GPU.
[0167] The CPU module 806 is at least used to perform partial dose calculation according to the CPU and GPU joint dose calculation method and the dose calculation geometric model.
[0168] The GPU module 808 is at least used to perform partial dose calculation according to the CPU and GPU joint dose calculation method and the dose calculation geometric model.
[0169] In one embodiment, the dose calculation system further comprises:
[0170] The particle allocation module is used to determine the number of particles to be simulated for the CPU and GPU respectively according to the calculation speed of the CPU, the calculation speed of the GPU and the total number of particles to be simulated when the CPU and GPU joint dose calculation mode is the first joint dose calculation mode.
[0171] The CPU module 806 is used to simulate particles corresponding to the number of particles to be simulated according to the dose calculation geometric model to obtain a CPU dose calculation result.
[0172] The GPU module 808 is used to simulate particles corresponding to the number of particles to be simulated according to the dose calculation geometric model to obtain GPU dose calculation results.
[0173] The result summary module is used to summarize the CPU dose calculation results and the GPU dose calculation results to obtain the dose calculation results.
[0174] In one embodiment, the particle allocation module is further used to determine the CPU's computing speed ratio and the GPU's computing speed ratio based on the CPU's computing speed ratio and the GPU's computing speed ratio; determine the number of particles to be simulated for the CPU based on the CPU's computing speed ratio and the total number of particles to be simulated; and determine the number of particles to be simulated for the CPU based on the GPU's computing speed ratio and the total number of particles to be simulated.
[0175] In one embodiment, the GPU module 808 is also used to perform particle simulation according to the dose calculation geometric model when the CPU and GPU joint dose calculation method is the second joint dose calculation method; when it is identified that the number of colliding particles in the simulation process exceeds the preset collision particle threshold, the CPU module 806 performs collision processing on the colliding particles to obtain a collision processing result; the GPU module 808 is also used to continue the particle simulation process according to the collision processing result to obtain a dose calculation result.
[0176] In one embodiment, the GPU module 808 is further configured to simulate the particle transport process based on a dose calculation geometry model.
[0177] In one embodiment, the GPU module 808 is further used to determine the cross-sectional information of the grid where the particle is located, and determine whether the particle will collide during the transport process based on the cross-sectional information and the random sampling value; if a collision occurs, the particle is marked as a collision particle.
[0178] In one embodiment, the GPU module 808 is also used to copy the particle information of the collision particles to the CPU module 806 when it is identified that the number of collision particles in the simulation process exceeds a preset collision particle threshold; the CPU module 806 is also used to perform collision processing on the collision particles according to the particle information.
[0179] In one embodiment, the method determination module 804 is also used to determine that the CPU and GPU joint dose calculation method is the first joint dose calculation method when the ratio of the CPU calculation speed to the GPU calculation speed is greater than a first threshold; when the ratio of the CPU calculation speed to the GPU calculation speed is less than a second threshold, determine that the CPU and GPU joint dose calculation method is the second joint dose calculation method; wherein the first threshold is greater than the second threshold.
[0180] In one embodiment, the method determination module 804 is also used to determine that the CPU and GPU joint dose calculation method is the first joint dose calculation method or the second joint dose calculation method when the ratio of the CPU calculation speed to the GPU calculation speed is less than or equal to the first threshold and greater than or equal to the second threshold.
[0181] In one embodiment, the first threshold is 0.3 and the second threshold is 0.15.
[0182] In one embodiment, a computer device is provided, which may be a terminal. A diagram of its internal structure may be shown in FIG9 . The computer device includes a processor, memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the computer device is configured to exchange information between the processor and an external device. The communication interface of the computer device is configured to communicate with an external terminal via wired or wireless communication, where the wireless communication may be achieved via Wi-Fi, a mobile cellular network, NFC (near-field communication), or other technologies. When executed by the processor, the computer program implements a control method for a dose calculation system. The display unit of the computer device is configured to produce a visually visible image and may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse.
[0183] Those skilled in the art will understand that the structure shown in Figure 9 is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0184] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0185] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0186] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0187] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.
[0188] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0189] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A control method for a dose calculation system, characterized in that: The dose calculation system includes a CPU and a GPU; the method includes: Construct a geometric model for dose calculation; Determining a CPU and GPU joint dose calculation method according to a calculation speed of the CPU and a calculation speed of the GPU; The CPU and the GPU perform particle simulation according to the CPU and GPU joint dose calculation method and the dose calculation geometric model to obtain a dose calculation result.
2. The control method according to claim 1, characterized in that: The CPU and the GPU perform particle simulation according to the CPU and GPU joint dose calculation method and the dose calculation geometric model to obtain a dose calculation result, including: When the CPU and GPU joint dose calculation method is the first joint dose calculation method, the number of particles to be simulated of the CPU and the GPU are determined respectively according to the calculation speed of the CPU, the calculation speed of the GPU and the total number of particles to be simulated; The CPU and the GPU respectively simulate particles corresponding to the number of particles to be simulated according to the dose calculation geometric model to obtain a CPU dose calculation result and a GPU dose calculation result; The CPU dose calculation result and the GPU dose calculation result are aggregated to obtain a dose calculation result.
3. The control method according to claim 2, characterized in that: Determining the number of particles to be simulated by the CPU and the GPU according to the calculation speed of the CPU, the calculation speed of the GPU and the total number of particles to be simulated includes: Determine the proportion of the CPU's computing speed and the proportion of the GPU's computing speed according to the CPU's computing speed and the GPU's computing speed; Determine the number of particles to be simulated by the CPU according to the calculation speed ratio of the CPU and the total number of particles to be simulated; The number of particles to be simulated by the CPU is determined according to the calculation speed ratio of the GPU and the total number of particles to be simulated.
4. The control method according to claim 1, characterized in that: The CPU and the GPU perform particle simulation according to the CPU and GPU joint dose calculation method and the dose calculation geometric model to obtain a dose calculation result, further comprising: When the CPU and GPU joint dose calculation method is the second joint dose calculation method, the GPU performs particle simulation according to the dose calculation geometric model; When the GPU identifies that the number of collision particles in the simulation process exceeds a preset collision particle threshold, the CPU performs collision processing on the collision particles to obtain a collision processing result; The GPU continues the particle simulation process according to the collision processing result to obtain a dose calculation result.
5. The control method according to claim 1, characterized in that: Determining a CPU and GPU joint dose calculation method according to a calculation speed of the CPU and a calculation speed of the GPU includes: When the ratio of the calculation speed of the CPU to the calculation speed of the GPU is greater than a first threshold, determining that the CPU and GPU joint dose calculation method is a first joint dose calculation method; When the ratio of the calculation speed of the CPU to the calculation speed of the GPU is less than a second threshold, the CPU and GPU joint dose calculation method is determined to be a second joint dose calculation method; wherein the first threshold is greater than the second threshold.
6. The control method according to claim 5, characterized in that: The step of determining a CPU and GPU joint dose calculation method according to a calculation speed of the CPU and a calculation speed of the GPU further includes: When the ratio of the calculation speed of the CPU to the calculation speed of the GPU is less than or equal to the first threshold and greater than or equal to the second threshold, it is determined that the CPU and GPU joint dose calculation method is the first joint dose calculation method or the second joint dose calculation method.
7. A control device for a dose calculation system, characterized in that: The dose calculation system includes a CPU and a GPU; the control device of the dose calculation system includes: Model building module, used to build the dose calculation geometry model; A method determination module, used to determine a CPU and GPU joint dose calculation method according to a calculation speed of the CPU and a calculation speed of the GPU; The dose calculation module is used to control the CPU and the GPU to perform particle simulation according to the combined dose calculation method of the CPU and the GPU and the dose calculation geometric model to obtain a dose calculation result.
8. The control device according to claim 7, characterized in that: The dose calculation module is also used to, when the joint dose calculation mode of the CPU and the GPU is the first joint dose calculation mode, determine the number of particles to be simulated of the CPU and the GPU respectively according to the calculation speed of the CPU, the calculation speed of the GPU and the total number of particles to be simulated; control the CPU to simulate particles corresponding to the number of particles to be simulated according to the dose calculation geometric model to obtain a CPU dose calculation result; control the GPU to simulate particles corresponding to the number of particles to be simulated according to the dose calculation geometric model to obtain a GPU dose calculation result; and summarize the CPU dose calculation result and the GPU dose calculation result to obtain a dose calculation result.
9. The control device according to claim 8, characterized in that: The dose calculation module is also used to determine the calculation speed ratio of the CPU and the calculation speed ratio of the GPU according to the calculation speed of the CPU and the calculation speed of the GPU; determine the number of particles to be simulated of the CPU according to the calculation speed ratio of the CPU and the total number of particles to be simulated; determine the number of particles to be simulated of the CPU according to the calculation speed ratio of the GPU and the total number of particles to be simulated.
10. The control device according to claim 7, characterized in that: The dose calculation module is also used to control the GPU to perform particle simulation according to the dose calculation geometric model when the joint dose calculation method of the CPU and GPU is the second joint dose calculation method; when the GPU recognizes that the number of collision particles in the simulation process exceeds a preset collision particle threshold, control the CPU to perform collision processing on the collision particles to obtain a collision processing result; control the GPU to continue the particle simulation process according to the collision processing result to obtain a dose calculation result.
11. A dose calculation system, characterized in that: The dose calculation system comprises: Model building module, used to build the dose calculation geometry model; The method determines the module, which is used to determine the calculation speed of the CPU and the calculation speed of the GPU. Determine the CPU and GPU joint dose calculation method; A CPU module, at least used to perform partial dose calculation according to the CPU and GPU joint dose calculation method and the dose calculation geometric model; The GPU module is at least used to perform partial dose calculation according to the CPU and GPU joint dose calculation method and the dose calculation geometric model.
12. A computer device, characterized in that: The invention comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented: Construct a geometric model for dose calculation; Determine the CPU and GPU joint dose calculation method based on the CPU and GPU calculation speeds; The CPU and GPU perform particle simulation according to the CPU and GPU joint dose calculation method and dose calculation geometric model to obtain dose calculation results.
13. A computer-readable storage medium, characterized in that: The computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the following steps are implemented: Construct a geometric model for dose calculation; Determine the CPU and GPU joint dose calculation method based on the CPU and GPU calculation speeds; The CPU and GPU perform particle simulation according to the CPU and GPU joint dose calculation method and dose calculation geometric model to obtain dose calculation results.
14. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the following steps: Construct a geometric model for dose calculation; Determine the CPU and GPU joint dose calculation method based on the CPU and GPU calculation speeds; The CPU and GPU perform particle simulation according to the CPU and GPU joint dose calculation method and dose calculation geometric model to obtain dose calculation results.
Citation Information
Patent Citations
Method for accelerating dosage calculation in radiotherapy based on GPU (Graphics Processing Unit)
CN101954148A
GPU-base (Graphics Processing Unit-based) multi-particle transport simulation method
CN103955567A
Adaptive parallel algorithm for traversing neighbors in fixed radius under CPU-GPU (Central Processing Unit-Graphic Processing Unit) heterogeneous framework
CN105468439A
Collaborative computing method and device
CN109871352A
