Proton dose information processing apparatus, method, and electronic device
By employing matrix compression and parallel computing methods, the problem of long computation time in traditional Monte Carlo dosing calculations is solved, achieving efficient and accurate proton dosing calculations and supporting rapid treatment plan optimization.
Patent Information
- Application Number
- CN202510965261.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-14
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-07-14
AI Technical Summary
Traditional Monte Carlo dosing calculation methods in proton therapy require simulating a large number of particles to obtain accurate dose distribution, resulting in excessively long calculation times and low efficiency, which limits the optimization and iteration speed of treatment plans.
A compressed matrix processing and parallel computing architecture is adopted. The dose deposition matrix is compressed through the matrix processing unit, and the particle transport behavior is simulated in parallel using multi-threaded blocks and dual-type particle stacks. Dose deposition information is collected in the medium to update the compressed matrix.
It significantly shortens the proton dose calculation time, reduces memory usage and computing resources, improves computational efficiency and accuracy, and supports timely and accurate clinical decision-making.
Smart Images

Figure CN120493674B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of medical science, in particular to a proton dose information processing device, method and electronic equipment. BACKGROUND
[0002] In the field of radiotherapy, especially in proton therapy, the Monte Carlo method is considered as the "gold standard" for dose calculation because it can accurately simulate the transport process of particles in the patient's body, including scattering, energy deposition and the generation of secondary particles and other complex physical effects.
[0003] However, the traditional Monte Carlo dose calculation usually needs to simulate a large number of particle tracks to obtain a dose distribution with sufficient precision. This process is extremely time-consuming, which greatly limits the optimization and iteration speed of the treatment plan.
[0004] Therefore, there is an urgent need for an efficient and accurate Monte Carlo dose calculation method to shorten the calculation time, improve the calculation efficiency, and reduce the demand for video memory, providing a faster and more accurate dose distribution calculation scheme for clinical applications.
[0005] At present, there is no effective solution to the above problems. SUMMARY
[0006] The present application provides a proton dose information processing device, method and electronic equipment to at least solve the technical problem of long calculation time and low calculation efficiency caused by the need to simulate a large number of particles to obtain accurate dose distribution when using the Monte Carlo method for proton dose calculation in the prior art.
[0007] According to one aspect of the present application, a proton dose information processing device is provided, comprising: a matrix processing unit configured to determine a compression matrix according to a physical information table, wherein the physical information table comprises at least spot energy information and spot size information, and the compression matrix is a matrix obtained by compressing a dose deposition matrix based on spot data; a particle simulation processing unit configured to simulate the transport behavior of target particles in a medium through a plurality of thread blocks and a plurality of particle stacks, wherein each thread block includes N threads, the N threads are configured to process N particles in parallel, and N is an integer greater than 1; the plurality of particle stacks include a first type of particle stack and a second type of particle stack, the first type of particle stack is configured to store original particles released by a radiation source, and the second type of particle stack is configured to store particles newly generated in the activity process of the original particles; and a dose processing unit configured to collect dose deposition information of the target particles according to the transport behavior of the target particles in the medium, and update the compression matrix according to the collected dose deposition information.
[0008] Optionally, the proton dose information processing device further comprises: an acquisition unit configured to determine an energy particle quantity table according to the physical information table, wherein the energy particle quantity table is used to count the minimum particle quantity required by a single spot to reach a noise distribution threshold at different energies; a calculation unit configured to sum up the minimum particle quantity required by each spot in the radiotherapy plan according to the energy particle quantity table to obtain a total particle quantity corresponding to the radiotherapy plan; a first determination unit configured to determine the particle quantity required to be simulated for each spot according to a ratio of the total particle quantity to the minimum particle quantity required by each spot; and a second determination unit configured to establish a spot particle quantity table according to the particle quantity required to be simulated for each spot.
[0009] Optionally, the matrix processing unit comprises: a first determination sub-unit configured to determine the equivalent depth information corresponding to each spot in the radiotherapy plan according to the physical information table; a second determination sub-unit configured to determine the dose deposition matrix corresponding to each spot according to the equivalent depth information corresponding to each spot; and a third determination sub-unit configured to compress the dose deposition matrix into a compressed matrix based on the start point coordinates corresponding to the row index and the column index of the dose deposition matrix, and establish a matrix position mapping relationship between the compressed matrix and the dose deposition matrix.
[0010] Optionally, the particle simulation processing unit comprises: a first processing sub-unit configured to select a target beam and a target spot used when simulating the transport behavior of a target particle; an initialization sub-unit configured to initialize attribute information of the target particle according to parameter information of the target beam, parameter information of the target spot, and parameter information of the radiotherapy machine, wherein the attribute information comprises: particle position, flight speed, released energy, and flight direction; a second processing sub-unit configured to fill the initialized target particle into a first type particle stack; and a third processing sub-unit configured to simulate the transport behavior of the target particle in the first type particle stack in different media through a plurality of thread blocks, and store new particles generated by the target particle in the first type particle stack in an activity process in a second type particle stack.
[0011] Optionally, the proton dose information processing device further comprises: a first processing unit, configured to collect position update information of the target particle when it is detected that the plurality of thread blocks simulate the transport behavior of the target particle in the air medium, and determine that no update occurs to the attribute information of the target particle other than the position; a second processing unit, configured to determine the flight step length of the target particle in the uniform medium according to the position, speed, direction of the target particle when it enters the uniform medium, and the transport path of the target particle from the current position to the current grid range when it exits the uniform medium, when it is detected that the plurality of thread blocks simulate the transport behavior of the target particle in the uniform medium; and a third processing unit, configured to determine the flight step length of the target particle in the non-uniform medium according to the position, speed, direction of the target particle when it enters the non-uniform medium, and the transport path of the target particle from the current position to the current grid range when it exits the non-uniform medium, when it is detected that the plurality of thread blocks simulate the transport behavior of the target particle in the non-uniform medium.
[0012] Optionally, the proton dose information processing device further comprises: a probability determination unit, configured to determine probability distribution information of M physical effects of the target particle according to the attribute change information of the target particle when it is simulated to perform the transport behavior in the medium by the plurality of thread blocks and the plurality of particle stacks, where M is an integer greater than 1; a physical effect determination unit, configured to determine a target physical effect from the M physical effects according to the probability distribution information; a particle detection unit, configured to detect whether a new particle is generated according to the target physical effect; and a particle storage unit, configured to store the generated new particle into the second type of particle stack when it is detected that the new particle is generated.
[0013] Optionally, the proton dose information processing device further comprises: a thread block strategy setting unit, configured to set at least one of the following strategies for the plurality of thread blocks during the simulation of the transport behavior of the target particle in the medium by the plurality of thread blocks and the plurality of particle stacks:
[0014] a thread block synchronization strategy, configured to input N particles into N threads of one thread block respectively, and determine that the thread block is in a task completion state after it is detected that the N threads of the thread block completely process the N particles;
[0015] a thread reassignment strategy, configured to assign particles belonging to the same beam or the same spot to the same thread block for processing;
[0016] a thread block update strategy, configured to traverse all threads after the number of times of simulating the transport of the particle reaches a preset number of times, search for unprocessed particles in the particle stack and add them to the i th thread for processing if it is detected that the particles in the i th thread have been processed during the traversal, where the i th thread is any thread.
[0017] Optionally, the first processing subunit includes: a beam selection module, used to select the target beam used when simulating the transport behavior of the target particle based on the numerical range of the random number, using the cumulative value of the beam weight or the total weight value of all beams as the beam selection constraint; and a spot selection module, used to select the target spot used when simulating the transport behavior of the target particle based on the numerical range of the random number, using the cumulative value of the spot weight or the total weight value of all spots as the spot selection constraint.
[0018] According to another aspect of this application, a proton dose information processing method is also provided, comprising: determining a compression matrix based on a physical information table, wherein the physical information table includes at least spot energy information and spot size information, and the compression matrix is a matrix obtained by compressing a dose deposition matrix based on spot data; simulating the transport behavior of target particles in a medium through multiple thread blocks and multiple particle stacks, wherein each thread block includes N threads, the N threads are used to process N particles in parallel, and N is an integer greater than 1; the multiple particle stacks include a first type of particle stack and a second type of particle stack, the first type of particle stack is used to store the original particles released by the radioactive source, and the second type of particle stack is used to store newly generated particles during the activity of the original particles; collecting dose deposition information of the target particles according to the transport behavior of the target particles in the medium, and updating the compression matrix based on the collected dose deposition information.
[0019] According to another aspect of the embodiments of this application, an electronic device is also provided, wherein the electronic device includes one or more processors and a memory, the memory being used to store one or more programs, wherein when one or more programs are executed by one or more processors, the one or more processors control the operation of the proton dose information processing device described above.
[0020] As described above, this application introduces a compression matrix to determine the effective region of the dose deposition matrix based on the physical information table (containing spot energy and spot size information), thereby achieving compression processing of the full-size dose deposition matrix. This compression processing can reduce unnecessary computation and memory access, thus significantly reducing GPU memory usage and data read time.
[0021] In addition, the parallel computing architecture is adopted in the present application to decompose the particle simulation into multiple thread blocks, each of which contains N threads for parallel processing of the transport behavior of N particles. This parallelization strategy can improve the speed of particle simulation and reduce the overall particle simulation calculation time. In addition, the present application also sets up a double-class particle stack, i.e., a first-class particle stack and a second-class particle stack, stores the original particles released by the initial radiation source in the first-class particle stack, and saves the new particles generated by the original particles in the transport process in the second-class particle stack. This classification management method ensures the orderliness and traceability of particles at each stage, avoids the chaotic interaction between particles, and thus improves the orderliness and accuracy of particle simulation calculation.
[0022] Finally, at each stage of particle transport, the dose processing unit collects the dose deposition information of the particles and updates the compression matrix according to the collected dose deposition information.
[0023] In summary, the present application significantly improves the efficiency of proton dose calculation, greatly shortens the required time for proton dose calculation, and overcomes the low efficiency problem of traditional calculation methods in processing massive particles through matrix compression, parallel processing of particle simulation, and division of particle stacks into primary particle stacks and secondary particle stacks. BRIEF DESCRIPTION OF DRAWINGS
[0024] The accompanying drawings, which are included to provide a further understanding of the present application, constitute a part of the present application and illustrate the illustrative embodiments of the present application and their description serve to explain the present application, and do not constitute improper limitations on the present application. In the drawings:
[0025] Figure 1 is a schematic diagram of an optional proton dose information processing device according to an embodiment of the present application;
[0026] Figure 2 is a quality dose information processing flowchart according to an embodiment of the present application;
[0027] Figure 3 is a flowchart of an optional proton dose information processing method according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.
[0029] It is to be understood that the terminology "first", "second" and the like used in the specification and the claims of the application as well as the appended drawings is merely intended to distinguish between similar objects and not necessarily for describing a special order or sequence. It is to be understood that the data used in this way can be interchanged, where appropriate, so that embodiments of the application described herein can be carried out in other than the order shown or described herein. Furthermore, the terms "comprise" and "comprising" and any variations thereof are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements that are expressly listed, but can include additional steps or elements not expressly listed or inherent to such process, method, product or apparatus.
[0030] Figure 1 is a schematic diagram of an optional proton dose information processing apparatus according to an embodiment of the application, as shown in Figure 1 The proton dose information processing apparatus comprises a matrix processing unit 101, a particle simulation processing unit 102 and a dose processing unit 103.
[0031] Optionally, the matrix processing unit 101 is configured to determine a compression matrix according to a physical information table, wherein the physical information table comprises at least spot energy information and spot size information, and the compression matrix is a matrix obtained by compressing a dose deposition matrix based on spot data.
[0032] Optionally, in the embodiment of the application, the matrix processing unit 101 is configured to determine a compression matrix according to a physical information table, so as to realize effective compression of the dose deposition matrix. The physical information table is an important component of a radiotherapy plan, and at least comprises spot energy information and spot size information. The spot energy information describes the energy of particles (such as protons) released from a radiation source, and the spot size information reflects the distribution range of the particle beam in a target region.
[0033] Optionally, the matrix processing unit 101 can traverse each spot parameter according to the physical information table, calculate the equivalent depth and influence range of the spot, and determine the contribution area of the spot to the dose deposition matrix. This process can avoid redundant calculation on non-contribution areas.
[0034] Subsequently, the matrix processing unit 101 can also determine a compression matrix according to the physical information table, and the size of the compression matrix is limited to the effective area of dose deposition (for example, the contribution area of the dose deposition matrix determined above). It should be noted that by avoiding processing the entire dose deposition matrix, but subsequent processing is performed on the compression matrix, the memory requirement and the calculation time can be reduced.
[0035] After the compressed matrix is created, the matrix processing unit 101 initializes the GPU memory to ensure that the size of the compressed matrix matches the size of the dose deposition active area. In addition, an index mapping table can be established to ensure that each element of the compressed matrix can accurately correspond to the relevant element in the original dose deposition matrix.
[0036] As can be seen from the above, compared with using a full-size dose deposition matrix for proton dose calculation, using a compressed matrix for proton dose calculation can consume less memory resources to complete the calculation, which is particularly important for using GPU for accelerated calculation, because it can release more GPU memory space for parallel processing of more particles. Moreover, although the matrix is compressed, the accuracy of the dose calculation is not affected through the accurate mapping relationship (i.e. the index mapping table described above), thereby ensuring the quality of the radiotherapy plan.
[0037] In an alternative embodiment, the particle simulation processing unit 102 is configured to simulate the transport behavior of target particles in a medium by using a plurality of thread blocks and a plurality of particle stacks, wherein each thread block includes N threads, the N threads are configured to process N particles in parallel, and N is an integer greater than 1; the plurality of particle stacks include first-type particle stacks and second-type particle stacks, the first-type particle stacks are configured to store original particles released by a radiation source, and the second-type particle stacks are configured to store new particles generated during the activity of the original particles.
[0038] Optionally, the particle simulation processing unit 102 can make full use of the parallel computing capability of the GPU to efficiently simulate the transport behavior of particles in a medium (such as human tissue) by using a plurality of thread blocks and particle stacks.
[0039] Optionally, the particle simulation processing unit 102 can assign particle simulation tasks to a plurality of thread blocks, and each thread block includes N threads. The particle simulation processing unit 102 allows each thread to independently simulate the entire transport process of a particle, including the energy loss, scattering behavior, and possible secondary particles of the particle, and other complex physical effects. In addition, by using the parallel characteristics of the GPU, a plurality of thread blocks can simultaneously process different particles, thereby achieving the purpose of simulating the transport behavior of a large number of particles in parallel, and further shortening the required time for particle simulation calculation.
[0040] Optionally, the particle simulation processing unit 102 also adopts a design of double-class particle stacks, including a first-class particle stack and a second-class particle stack. The first-class particle stack (main particle stack) is used to store the original particles directly released by the radiation source. At the beginning of the simulation, these original particles form the basis of the calculation, and their initial positions, energies and directions are accurately set. As the simulation proceeds, the original particles will interact with other matter during transport, which may generate new particles. These new particles can be referred to as secondary particles, and the secondary particles are stored in the second-class particle stack (secondary particle stack). Storing newly generated particles in the secondary particle stack can ensure that all new particles generated by physical effects are effectively tracked and simulated, thereby ensuring that the final calculated dose distribution information is complete and accurate dose distribution information.
[0041] When the particles in the thread block (provided by the main particle stack) generate new particles during transport, these newly generated particles are transferred to the secondary particle stack for subsequent simulation calculations.
[0042] It should be noted that by adopting the particle stack classification management and thread block parallel calculation method, the particle simulation processing unit 102 realizes efficient simulation of the particle transport process. This method not only can handle large-scale particles, but also can ensure the accuracy of the calculation, while greatly reducing the total time required for simulation. In the application scenario of proton therapy with high precision requirements, this efficient particle simulation strategy is particularly important, which helps to accelerate the calculation of dose distribution and provide timely and accurate support for clinical decision-making.
[0043] In an optional embodiment, the dose processing unit 103 is configured to collect dose deposition information of the target particle according to the transport behavior of the target particle in the medium, and update the compression matrix according to the collected dose deposition information.
[0044] Optionally, when the target particle (proton or other radioactive particle) is transported in the medium, the dose processing unit 103 can continuously monitor the behavior of the target particle. For example, if it is detected that the target particle collides with the medium or energy deposition, the dose processing unit 103 will collect the relevant dose information, including but not limited to the size of the particle release energy, the latest position of the particle and the interaction between the particle and the surrounding matter.
[0045] It should be noted that the dose deposition information collected based on the transport behavior of particles will not be directly applied to the original dose deposition matrix, but will be mapped to the compressed matrix generated by the matrix processing unit 101 according to the position of the particle activity. The dose processing unit 103 updates the corresponding elements of the compressed matrix according to the collected dose deposition information, so as to reflect the real situation of particle energy deposition. Since the compressed matrix only retains the data of the effective area of dose deposition, the updating operation of the dose processing unit 103 on the compressed matrix can avoid accessing a large number of invalid areas, which not only saves the calculation time, but also significantly reduces the memory consumption, especially when dealing with high-precision and large-range dose distribution, such optimization becomes crucial.
[0046] In an optional embodiment, the proton dose information processing device further comprises: an acquisition unit configured to determine an energy particle quantity table according to a physical information table, wherein the energy particle quantity table is used to count the minimum number of particles required by a single spot to reach a noise distribution threshold at different energies; a calculation unit configured to sum up the minimum number of particles required by each spot in the radiotherapy plan according to the energy particle quantity table to obtain a total particle number corresponding to the radiotherapy plan; a first determination unit configured to determine the number of particles required to be simulated for each spot according to the ratio of the total particle number to the minimum number of particles required by each spot; and a second determination unit configured to establish a spot particle quantity table according to the number of particles required to be simulated for each spot.
[0047] Optionally, Figure 2 is a quality dose information processing flowchart according to an embodiment of the present application, as Figure 2 shown, in the data preparation stage, first, an energy particle quantity table is constructed according to a physical information table, which is used to record the minimum number of particles required by a single spot to reach the preset dose calculation uncertainty requirement at different energy levels. Then, by traversing all spots in the radiotherapy plan, the number of particles required to be simulated for each spot is determined by using the energy particle quantity table constructed in the previous step. This process involves the accumulation of the minimum number of particles for the spot, and based on the ratio of the total target particle number to the accumulated minimum number of particles, the specific number of particle simulations for each spot is set, thereby establishing a spot particle quantity table.
[0048] Optionally, the matrix processing unit 101 further comprises: a first determination subunit configured to determine the equivalent depth information corresponding to each spot in the radiotherapy plan according to a physical information table; a second determination subunit configured to determine the dose deposition matrix corresponding to each spot according to the equivalent depth information corresponding to each spot; and a third determination subunit configured to compress the dose deposition matrix into a compressed matrix based on the starting point coordinates corresponding to the row index and the column index of the dose deposition matrix, and establish a matrix position mapping relationship between the compressed matrix and the dose deposition matrix.
[0049] Optionally, as shown in Figure 2 According to the physical information table, each spot parameter in the radiotherapy plan can be analyzed in depth, for example, by calculating the equivalent depth corresponding to each spot, to determine the dose deposition effective area corresponding to each spot. The dose deposition effective area is the focus of dose calculation, and by calibrating the dose deposition effective area, redundant calculation of non-effective areas can be avoided, thereby improving the efficiency of dose calculation.
[0050] Based on the calibrated dose deposition effective area, a compression matrix can be constructed. The generation of the compression matrix is achieved by determining the starting point coordinates of the row index and the column index, and then only retaining the dose information in the dose deposition effective area, thereby reducing the size of the dose deposition matrix (that is, the starting point coordinates corresponding to the row index and the column index of the dose deposition matrix described above, and the full-size dose deposition matrix corresponding to each spot is compressed into a compression matrix).
[0051] In an optional embodiment, the particle simulation processing unit 102 includes: a first processing subunit for selecting a target beam and a target spot used to simulate the transport behavior of a target particle; an initialization subunit for initializing attribute information of the target particle according to parameter information of the target beam, parameter information of the target spot, and parameter information of a radiotherapy machine, wherein the attribute information includes: particle position, flight speed, released energy, and flight direction; a second processing subunit for filling the initialized target particle into a first-type particle stack; and a third processing subunit for simulating the transport behavior of the target particle in the first-type particle stack in different media through a plurality of thread blocks, and storing new particles generated by the target particle in the first-type particle stack in an activity process in a second-type particle stack.
[0052] Optionally, before the particle simulation starts, the first processing subunit is responsible for selecting a specific target beam and a target spot from a radiotherapy plan.
[0053] Optionally, as shown in Figure 2 The initialization subunit can initialize the attribute information of the target particle according to the selected target beam parameters, target spot parameters, and specific parameters of the radiotherapy machine (such as beam energy, divergence angle, machine structure, etc.). These attribute information includes but is not limited to: particle position, flight speed, released energy, and flight direction.
[0054] Subsequently, the initialized target particle is filled into the first-type particle stack (main particle stack) by the second processing subunit, preparing to start simulating the transport behavior of the target particle. The first-type particle stack is the starting point of the particle simulation, and stores all original particles to be simulated.
[0055] The third processing subunit then utilizes multiple thread blocks to simulate the transport behavior of target particles in the first type of particle stack in different media in parallel. This process involves energy loss, direction change and possible secondary particles (i.e. new particles) of the particles. Among them, all new particles caused by physical effects are stored in the second type of particle stack (secondary particle stack) for subsequent simulation.
[0056] In an alternative embodiment, the first processing subunit comprises a beam selection module for taking the cumulative value of beam weights or the total weight value of all beams as a beam selection constraint condition, and selecting a target beam used for simulating the transport behavior of target particles according to the value interval of the random number; and a spot selection module for taking the cumulative value of spot weights or the total weight value of all spots as a spot selection constraint condition, and selecting a target spot used for simulating the transport behavior of target particles according to the value interval of the random number.
[0057] Optionally, as shown in Figure 2 The present application introduces a set of weight-based random selection mechanisms to select the target beam and target spot for current simulation, including the following steps:
[0058] Step one, in the initial stage of particle simulation, a random number between 0 and 1 is first generated, and then a beam is selected from multiple beams as the target beam for current simulation using this random number. The positioning of this random number is determined according to the weight ratio of the beam in the treatment plan. Specifically, the weights of each beam can be accumulated, and then the accumulated weight is compared with the total weight of the plan to form a series of weight ratio intervals. The random number falls in which interval determines the selection of the beam corresponding to the interval as the target beam for simulation. Through this mechanism, the probability of beam selection is proportional to its importance (i.e. weight) in the treatment plan, thereby ensuring that the final particle simulation result has prominent representativeness.
[0059] Step two, after determining the target beam, a second random number between 0 and 1 is generated, and a spot in the target beam is selected as the target spot using this random number. Similar to the selection logic of the target beam, the selection of the target spot is also based on the weight ratio. For example, the weight of each spot can be accumulated and compared with the total weight of all spots in the target beam to form a weight ratio interval corresponding to each spot. According to the weight ratio interval in which the random number specifically falls, the spot corresponding to the weight ratio interval is selected as the target spot. This process ensures the randomness and fairness of the selection of the target spot, while ensuring the granularity of the simulation, which can be fine-grained to the level of each spot, further enhancing the accuracy of dose calculation.
[0060] Step three, after the target spot is selected, the system can count the number of particles in the spot. The number of particles simulated in the target spot is compared with the number of particles in the spot table set in advance according to the uncertainty requirement. If the number of simulated particles reaches or exceeds the minimum number of particles specified in the spot particle number table, the simulation task of the target spot is considered to be completed, and the system will skip the subsequent particle simulation step and directly return to step one to select the next beam or spot for simulation. Otherwise, if the number of simulated particles in the spot does not reach the minimum number of particles specified for the spot, the system will continue to perform particle simulation as planned until the minimum number of particles specified for the spot is met.
[0061] In an optional embodiment, the proton dose information processing device further comprises: a first processing unit configured to, if it is detected that multiple thread blocks are simulating the transport behavior of a target particle in an air medium, collect position update information of the target particle when the target particle travels in a region where no attribute information is set, and determine that other attribute information of the target particle except position is not updated; a second processing unit configured to, if it is detected that multiple thread blocks are simulating the transport behavior of a target particle in a uniform medium, determine a flight step length of the target particle in the uniform medium according to the position, speed, direction of the target particle when the target particle enters the uniform medium, and the transport path of the target particle from the current position to the current grid range when the target particle exits the uniform medium; and a third processing unit configured to, if it is detected that multiple thread blocks are simulating the transport behavior of a target particle in a non-uniform medium, determine a flight step length of the target particle in the non-uniform medium according to the position, speed, direction of the target particle when the target particle enters the non-uniform medium, and the transport path of the target particle from the current position to the current grid range when the target particle exits the non-uniform medium.
[0062] Optionally, the present application proposes a refined particle attribute processing method for particle transport simulation in different medium environments, ensuring the physical accuracy and computational efficiency of the simulation process.
[0063] Optionally, as shown in Figure 2 For simulating the transport process of particles in air, the system assumes that the transport of particles in air medium is only the movement of position, and other physical attributes such as energy, speed and direction remain unchanged, because the regions passed by the particles belong to air medium, and the effect of air on the particles is mainly reflected in drag, which can be ignored in the path of high-energy protons. This can simplify the calculation process, thereby avoiding unnecessary simulation of complex physical effects, and further improving the efficiency of simulation calculation.
[0064] Optionally, as shown in Figure 2As shown, regarding the simulation of the particle transport process in a homogeneous medium, it includes that when the particle enters the homogeneous medium (such as water or a solid with a specific density), the transport process of the particle will be affected by the properties of the medium, such as scattering and energy loss. In order to accurately simulate these physical processes, the present application adopts a step selection strategy based on the current position and velocity direction of the particle. Specifically, the system takes the position of the particle when it enters the homogeneous medium as the starting point, takes the velocity direction of the particle as the reference, and takes the path from the current position to before the particle exits the edge of the medium as the step of the particle transport. This strategy ensures that the energy deposition and physical effects of the particle in the homogeneous medium can be accurately simulated, and at the same time, by reasonably selecting the step, the problem of increasing the computational burden caused by too fine step division is avoided.
[0065] Optionally, as Figure 2 As shown, regarding the simulation of the particle transport process in a non-uniform medium, it includes that when the particle passes through the non-uniform medium (such as a living body containing different tissue densities), the differences in the properties of the medium will significantly affect the transport behavior of the particle, including the scattering angle, the energy loss rate, etc. Therefore, the present application adopts a more dynamic and fine step selection mechanism for the simulation of the particle transport in the non-uniform medium. The system calculates the transport path of the particle within the current medium grid range as the step according to the real-time position and velocity direction of the particle. In this way, the influence of the local medium properties is considered in the simulation of each step, achieving the purpose of accurately simulating the particle transport behavior in complex medium structures, and at the same time, by dynamically adjusting the step, the use efficiency of the computing resources is improved, avoiding the problem of excessive calculation in the non-uniform medium area.
[0066] Optionally, the proton dose information processing device further comprises: a probability determination unit, configured to determine probability distribution information of M kinds of physical effects of a target particle after simulating the transport behavior of the target particle in the medium by the plurality of thread blocks and the plurality of particle stacks according to attribute change information of the target particle when performing the transport behavior, wherein M is an integer greater than 1; a physical effect determination unit, configured to determine a target physical effect from the M kinds of physical effects according to the probability distribution information; a particle detection unit, configured to detect whether a new particle is generated according to the target physical effect; and a particle storage unit, configured to store the generated new particle into the second type of particle stack when it is detected that the new particle is generated.
[0067] Optionally, as Figure 2As shown, in the Monte Carlo dose calculation method, the interaction between particles and the medium is one of the key factors determining the dose distribution. To accurately reflect this complex physical process, this application designs a detailed particle effect evaluation and state update mechanism, including: calculating the probability of different physical effects occurring by analyzing the particle's energy, velocity, and other key properties, combined with the physical characteristics of the medium it traverses (such as electron density and atomic number). These physical effects include, but are not limited to, scattering, energy deposition, and secondary particle generation. Based on the probability distribution information obtained from the evaluation, the system can determine the specific physical effect of the particle within the current step, ensuring that the simulation process can realistically reflect the physical behavior of particles in the medium.
[0068] Once the target physical effect of a particle is determined, the system can dynamically update the particle's state information based on the specific nature of the effect. For example, if it's a scattering effect, the particle's direction may randomly deflect; if it's an energy deposition process, the particle's energy will decrease accordingly; if a new particle is generated, in addition to modifying the current particle's state, the new particle also needs to be initialized. This update process strictly follows the laws of physics to ensure that each simulation accurately reflects the real physical scenario of particle transport. Simultaneously, the system also checks for new particle generation events to incorporate them into subsequent simulations.
[0069] In an optional embodiment, the proton dose information processing device further includes: a thread block strategy setting unit, used to set at least one of the following strategies for multiple thread blocks during the process of simulating the transport behavior of target particles in a medium through multiple thread blocks and multiple particle stacks: a thread block synchronization strategy, used to input N particles to N threads of a thread block respectively, and to determine that the thread block is in a task completion state after detecting that the N threads of the thread block have completely processed the N particles; a thread reallocation strategy, used to allocate particles belonging to the same beam or the same spot to the same thread block for processing; and a thread block update strategy, used to traverse all threads after the number of simulated particle transports reaches a preset number, and if it is detected during the traversal that the particles in the i-th thread have been processed, then search for unprocessed particles in the particle stack and add them to the i-th thread for processing, wherein the i-th thread is any thread.
[0070] Optionally, such as Figure 2 As shown, the particles in the particle stack are first distributed to various threads according to certain rules, ensuring that each thread is responsible for simulating one particle. For example, every 32 threads (the specific number depends on the specific design of the GPU) can be organized into a thread block to utilize the parallel computing capabilities of the GPU. This particle allocation strategy makes efficient use of computing resources and facilitates subsequent thread synchronization and reallocation operations.
[0071] During the particle simulation process, threads within each thread block run in a synchronized manner. This means that all threads in a thread block must complete their assigned particle simulation tasks before collectively moving on to the next execution phase. Any thread that completes its task early will wait for the other threads to ensure that the thread block as a whole completes its tasks. This synchronization mechanism avoids data inconsistency issues caused by differences in thread execution speeds.
[0072] Additionally, to further optimize the parallel efficiency of the particle simulation, the system will re-evaluate the distribution of particles after the particle simulation reaches a certain stage (e.g., after a pre-set number of times of simulating particle transport). For example, the system can redistribute particles belonging to the same beam or spot into the same thread block, which can reduce the data exchange and synchronization overhead between threads, improving the efficiency of parallel computing. Through this thread redistribution process, the system can dynamically adjust the correspondence between particles and threads, ensuring the rational allocation of computing resources.
[0073] Further, the system can also periodically check the particle simulation status of the thread block. When it detects that the particles within a thread have completed their simulation of transport behavior and have reached the predetermined exit condition, the system will not immediately terminate the thread, but will mark its status as "to be updated". Subsequently, the system will traverse the particle stack to find new particles to fill these completed task threads to continue the particle simulation. In this way, each thread block can remain active until all particles complete the simulation, thereby improving the utilization of GPU resources while ensuring the continuity and integrity of the simulation process.
[0074] In an alternative embodiment, the dose information processing device further comprises a processing priority setting unit for setting the processing priority of particles in the first type of particle stack to be higher than the processing priority of particles in the second type of particle stack during the process of simulating the transport behavior of particles in the medium by the plurality of thread blocks and the plurality of particle stacks.
[0075] Optionally, as shown in Figure 2 , two particle stacks are first created: the primary particle stack (corresponding to the first type of particle stack described above) and the secondary particle stack (corresponding to the second type of particle stack described above). The primary particle stack is used to store original particles that are participating in the dose calculation transport process, which are derived from the beam. The secondary particle stack is specifically used to store new particles generated during the transport process due to physical effects such as scattering and energy deposition.
[0076] Optionally, as shown in Figure 2As shown, when a thread finishes its assigned particle transport simulation, the system checks the status of the secondary particle stack. If there are newly generated particles in the secondary particle stack, these particles are moved into the primary particle stack to be picked up by a new thread and continue the simulation. If there are no new particles in the secondary particle stack, the system automatically generates a certain number of particles to replenish the primary particle stack to ensure the continuity of the simulation. In this way, the dynamic updating of the primary particle stack is ensured, and the technical problem of termination of the simulation due to depletion of particle resources is avoided.
[0077] In the system initialization phase, each thread picks up a particle from the primary particle stack for simulation. Once the thread finishes the transport simulation of the particle, the system automatically allocates a new particle from the primary particle stack to the thread, and this process is repeated until all particles in the primary particle stack are simulated. In the case of depletion of particle resources in the primary particle stack, the system calls newly generated particles from the secondary particle stack to replenish the primary particle stack, thereby maintaining the continuity of the simulation.
[0078] In addition, whenever a new particle is generated, the newly generated particle is immediately added to the secondary particle stack. The updating of the secondary particle stack is synchronized with the generation of particles, ensuring the timely storage of new particles.
[0079] It should be noted that in actual application, the first type of particle stack and the second type of particle stack can also not be set with priority, and the application does not specially limit the setting of priority.
[0080] According to another aspect of the embodiment of the application, a proton dose information processing method is also provided, wherein, Figure 3 is a flowchart of an optional proton dose information processing method according to an embodiment of the application, as Figure 3 shown, comprising the following steps:
[0081] Step S301, determining a compression matrix according to a physical information table, wherein the physical information table at least includes spot energy information and spot size information, and the compression matrix is a matrix obtained by compressing a dose deposition matrix based on spot data.
[0082] Optionally, first, each spot parameter can be traversed according to the physical information table to calculate the equivalent depth and the influence range of the spot, so as to determine the contribution area of the spot to the dose deposition matrix. This process can avoid redundant calculation of non-contribution areas. Subsequently, the compression matrix can also be determined according to the physical information table, and the size of the compression matrix is limited to the effective area of the dose deposition (for example, the contribution area of the dose deposition matrix determined above). The index and value of the compression matrix are mapped to the corresponding position of the original dose deposition matrix. It should be noted that by avoiding processing the entire dose deposition matrix, but instead processing the compression matrix for subsequent processing, the memory requirement and the calculation time can be reduced.
[0083] From the above, compared with using a full-size dose deposition matrix for proton dose calculation, using a compressed matrix for proton dose calculation can consume less memory resources to complete the calculation, which is particularly important for using GPU for accelerated calculation, because it can release more video memory space for parallel processing of more particles. Moreover, although the matrix is compressed, the accuracy of the dose calculation is not affected through the precise mapping relationship (i.e. the index mapping table described above), thereby ensuring the quality of the radiotherapy plan.
[0084] In step S302, the transport behavior of the target particles in the medium is simulated by a plurality of thread blocks and a plurality of particle stacks.
[0085] Each thread block includes N threads, and the N threads are used to process N particles in parallel, and N is an integer greater than 1; the plurality of particle stacks include a first type of particle stack and a second type of particle stack, the first type of particle stack is used to store original particles released by the radiation source, and the second type of particle stack is used to store new particles generated in the activity process of the original particles.
[0086] Optionally, according to the scheme of the present application, the particle simulation task can be assigned to a plurality of thread blocks, and each thread block internally includes N threads. Wherein, the particle simulation processing unit allows each thread to independently simulate the whole process of the transport of a particle, including the energy loss, scattering behavior and possible secondary particles of the particle and other complex physical effects. In addition, by using the parallel characteristics of the GPU, a plurality of thread blocks can process different particles at the same time, so as to achieve the purpose of simulating the transport behavior of a large number of particles in a parallel manner, and further shorten the required time of particle simulation calculation.
[0087] Optionally, the present application also adopts a double-class particle stack design, including: a first type of particle stack and a second type of particle stack. Wherein, the first type of particle stack (main particle stack) is used to store the original particles directly released by the radiation source. At the beginning of the simulation, these original particles constitute the basis of the calculation, and their initial position, energy and direction are accurately set. As the simulation proceeds, the original particles will interact with other substances in the transport process, thereby possibly generating new particles. These new particles can be referred to as secondary particles, and the secondary particles are stored in the second type of particle stack (secondary particle stack). Storing the newly generated particles in the secondary particle stack can ensure that all new particles generated by physical effects can be effectively tracked and simulated, thereby ensuring that the dose distribution information obtained by the final calculation is complete and accurate dose distribution information.
[0088] When the particles in the thread block (provided by the main particle stack) generate new particles in the transport process, these newly generated particles will be transferred to the secondary particle stack for subsequent simulation calculation.
[0089] It should be noted that by adopting the particle stack classification management and thread block parallel computing mode, efficient simulation of the particle transport process is realized. This method not only can handle large-scale particles, but also can ensure the accuracy of the calculation, while greatly reducing the total time required for simulation. In the application scenarios such as proton therapy which require high precision, this efficient particle simulation strategy is particularly important, which helps to speed up the calculation of the dose distribution and provides timely and accurate support for clinical decision-making.
[0090] In step S303, the dose deposition information of the target particle is collected according to the transport behavior of the target particle in the medium, and the compressed matrix is updated according to the collected dose deposition information.
[0091] Optionally, when the target particle (proton or other radioactive particle) is transported in the medium, the dose processing unit can continuously monitor the behavior of the target particle. For example, if it is detected that the target particle collides with the medium or energy deposition, the dose processing unit will collect the relevant dose information, including but not limited to the size of the particle energy release, the latest position of the particle, and the interaction between the particle and the surrounding matter.
[0092] It should be noted that the dose deposition information collected based on the transport behavior of the particle will not be directly applied to the original dose deposition matrix, but will be mapped to the compressed matrix generated by the matrix processing unit according to the position of the particle activity. The dose processing unit updates the corresponding elements of the compressed matrix according to the collected dose deposition information, so as to reflect the real situation of particle energy deposition. Since the compressed matrix only retains the data of the effective area of dose deposition, the update operation of the dose processing unit on the compressed matrix can avoid accessing a large number of invalid areas, which not only saves the calculation time, but also significantly reduces the memory consumption, especially in the processing of high-precision and large-range dose distribution, this optimization becomes crucial.
[0093] According to another aspect of the embodiments of the present application, an electronic device is also provided, wherein the electronic device includes one or more processors and a memory, the memory is configured to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors control the proton dose information processing device described above to run.
[0094] The above sequence numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0095] In the above embodiments of the present application, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0096] In several embodiments provided in the present application, it should be understood that the disclosed technology can be implemented by other ways. Among them, the above-described device embodiments are only schematic, for example, the division of the units can be a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, units or modules, and can be electrical or other forms.
[0097] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed to multiple units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0098] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0099] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art that contributes to the technical solutions or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various program code storage media.
[0100] The above is only the preferred embodiment of the present application, and it should be pointed out that for ordinary skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should be considered as the protection scope of the present application.
Claims
1. A proton dose information processing apparatus characterized by comprising: The method comprises the following steps: A matrix processing unit is configured to determine a compressed matrix based on a physical information table, wherein the physical information table comprises at least spot energy information and spot size information, and the compressed matrix is a matrix obtained by compressing a dose deposition matrix based on spot data; The determination of the compressed matrix based on the physical information table comprises the following steps: traversing parameters of each spot based on the physical information table, determining an equivalent depth and an influence range of each spot, and determining a contribution area of each spot to the dose deposition matrix based on the equivalent depth and the influence range of each spot; determining a dose deposition effective area based on the contribution area of each spot to the dose deposition matrix; and compressing the dose deposition matrix into the compressed matrix based on the dose deposition effective area, wherein the size of the compressed matrix matches the dose deposition effective area; A particle simulation processing unit is configured to simulate a transport behavior of target particles in a medium through a plurality of thread blocks and a plurality of particle stacks, wherein each thread block comprises N threads, the N threads are configured to process N particles in parallel, and N is an integer greater than 1; the plurality of particle stacks comprise a first type of particle stack and a second type of particle stack, the first type of particle stack is configured to store original particles released by a radiation source, and the second type of particle stack is configured to store particles newly generated in an activity process of the original particles; A dose processing unit is configured to collect dose deposition information of the target particles based on the transport behavior of the target particles in the medium, and update the compressed matrix based on the collected dose deposition information.
2. The proton dose information processing apparatus according to claim 1, characterized by, The proton dose information processing device further comprises: An acquisition unit is configured to determine an energy particle quantity table based on a physical information table, wherein the energy particle quantity table is used to count the minimum number of particles required by a single spot to reach a noise distribution threshold at different energies; A calculation unit is configured to sum up the minimum number of particles required by each spot in a radiotherapy plan based on the energy particle quantity table to obtain a total number of particles corresponding to the radiotherapy plan; A first determination unit is configured to determine the number of particles required by each spot to be simulated based on a ratio of the total number of particles to the minimum number of particles required by each spot; A second determination unit is configured to establish a spot particle quantity table based on the number of particles required by each spot to be simulated.
3. The proton dose information processing apparatus according to claim 1, characterized by, The matrix processing unit comprises: A first determination subunit is configured to determine equivalent depth information corresponding to each spot in a radiotherapy plan based on a physical information table; A second determination subunit is configured to determine a dose deposition matrix corresponding to each spot based on the equivalent depth information corresponding to each spot; A third determination subunit is configured to compress the dose deposition matrix into the compressed matrix based on start point coordinates corresponding to row indexes and column indexes of the dose deposition matrix, and establish a matrix position mapping relationship between the compressed matrix and the dose deposition matrix.
4. The proton dose information processing apparatus according to claim 1, characterized by, The particle simulation processing unit comprises: A first processing subunit is configured to select a target beam and a target spot used to simulate the transport behavior of the target particles. The initialization subunit is configured to initialize attribute information of the target particle according to parameter information of the target beam, parameter information of the target spot, and parameter information of the radiotherapy machine, wherein the attribute information includes particle position, flight speed, release energy, and flight direction. The second processing subunit is configured to fill the initialized target particle into the first type particle stack. The third processing subunit is configured to simulate transport behavior of the target particle in the first type particle stack in different media through the plurality of thread blocks, and store new particles generated by the target particle in the first type particle stack in the activity process in the second type particle stack.
5. The proton dose information processing apparatus according to claim 4, characterized by, The proton dose information processing device further comprises: The first processing unit is configured to, if it is detected that the plurality of thread blocks simulate transport behavior of the target particle in air medium, collect position update information of the target particle when simulating a region through which the target particle passes and in which no attribute information is set, and determine that attribute information of the target particle other than position is not updated; The second processing unit is configured to, if it is detected that the plurality of thread blocks simulate transport behavior of the target particle in a uniform medium, determine a flight step length of the target particle in the uniform medium according to position, speed, direction of the target particle when entering the uniform medium, and a transport path of the target particle from the current position to leaving the uniform medium; The third processing unit is configured to, if it is detected that the plurality of thread blocks simulate transport behavior of the target particle in a non-uniform medium, determine a flight step length of the target particle in the non-uniform medium according to position, speed, direction of the target particle when entering the non-uniform medium, and a transport path of the target particle from the current position to leaving a current grid range of the non-uniform medium.
6. The proton dose information processing apparatus according to claim 1, wherein The proton dose information processing device further comprises: The probability determination unit is configured to, after simulating transport behavior of the target particle in the medium through the plurality of thread blocks and the plurality of particle stacks, determine probability distribution information of M physical effects of the target particle according to attribute change information of the target particle when performing the transport behavior, wherein M is an integer greater than 1; The physical effect determination unit is configured to determine a target physical effect from the M physical effects according to the probability distribution information; The particle detection unit is configured to detect whether a new particle is generated according to the target physical effect; The particle storage unit is configured to, when detecting that a new particle is generated, store the generated new particle into the second type particle stack.
7. The proton dose information processing apparatus according to claim 1, wherein The proton dose information processing device further comprises: The thread block strategy setting unit is configured to, during simulating transport behavior of the target particle in the medium through the plurality of thread blocks and the plurality of particle stacks, set at least one of the following strategies for the plurality of thread blocks: The thread block synchronization strategy is configured to input N particles into N threads of a thread block respectively, and determine that the thread block is in a task completion state after detecting that the N threads of the thread block completely process the N particles; A thread reassignment strategy is used to assign particles belonging to the same beam or the same spot to the same thread block for processing. A thread block update strategy is used to traverse all threads after the number of times of simulating particle transport reaches a preset number of times, and if it is detected in the traversal process that particles in an i th thread have been processed, then the particle stack is searched for unprocessed particles to be added to the i th thread for processing, where the i th thread is any thread.
8. The proton dose information processing apparatus according to claim 4, characterized by, The first processing subunit comprises: A beam selection module is configured to use the cumulative value of beam weights or the total weight value of all beams as a beam selection constraint condition, and select a target beam used to simulate the transport behavior of the target particle according to the value interval in which the random number is located. A spot selection module is configured to use the cumulative value of spot weights or the total weight value of all spots as a spot selection constraint condition, and select a target spot used to simulate the transport behavior of the target particle according to the value interval in which the random number is located.
9. A proton dose information processing method characterized by, It comprises: The compression matrix is determined according to a physical information table, wherein the physical information table at least includes spot energy information and spot size information, and the compression matrix is a matrix obtained by compressing a dose deposition matrix based on spot data; The method comprises the following steps: determining the equivalent depth and the influence range of each spot according to the parameters of each spot in the physical information table, and determining the contribution area of each spot to the dose deposition matrix according to the equivalent depth and the influence range of each spot; determining the dose deposition effective area according to the contribution area of each spot to the dose deposition matrix; and compressing the dose deposition matrix into the compression matrix according to the dose deposition effective area, wherein the size of the compression matrix matches the dose deposition effective area; The transport behavior of the target particle in the medium is simulated by using a plurality of thread blocks and a plurality of particle stacks, wherein each thread block comprises N threads, the N threads are used to process N particles in parallel, and N is an integer greater than 1; the plurality of particle stacks comprise a first type of particle stack and a second type of particle stack, the first type of particle stack is used to store original particles released by a radiation source, and the second type of particle stack is used to store particles newly generated in the activity process of the original particles; According to the transport behavior of the target particle in the medium, the dose deposition information of the target particle is collected, and the compression matrix is updated according to the collected dose deposition information.
10. An electronic device, comprising: The proton dose information processing device comprises one or more processors and a memory, and the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors control the proton dose information processing device to run.
Citation Information
Patent Citations
Carbon ion Monte Carlo dose calculation method, device, equipment, medium and product
CN117435331A
Monte Carlo rapid dose calculation method
CN120216202A