Method for converting a dose-depth curve into an energy spectrum

By segmenting environmental energy spectrum files, building data sets and training multi-layer perceptron models, the problem of lack of effective conversion tools in the existing technology is solved, and efficient and accurate conversion from dose-depth curve to energy spectrum is achieved.

CN115186383BActive Publication Date: 2025-05-30HARBIN INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210769989.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-30
Publication Date
2025-05-30
Estimated Expiration
2042-06-30

AI Technical Summary

Technical Problem

The lack of effective tools in the prior art to convert dose-depth curves into energy spectrum limits the computational power of radiation dose simulation in certain special cases.

Method used

By segmenting the environmental energy spectrum files, multiple single energy spectrum files are built, and the data set is batch solved and constructed using the shieldose program, filling processing, logarithmic operation and forward transformation, and finally a multi-layer perceptron model is built for training to realize the conversion of dose-depth curve to energy spectrum.

Benefits of technology

It realizes efficient conversion from dose-depth curve to energy spectrum, improves conversion accuracy, and can perform effective radiation dose simulation calculations without energy spectrum information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115186383B_ABST
    Figure CN115186383B_ABST
Patent Text Reader

Abstract

The present invention provides a method for converting a dose-depth curve into an energy spectrum, belonging to the technical field of space radiation analysis. The method includes: constructing a single energy spectrum file; performing a solution to obtain a dose-depth curve and construct a data set; performing a forward transformation on the data set, mapping the minimum value, median value, and maximum value of the data set to 0, 0.5, and 1.0 respectively, and scaling the values less than the median value to the interval of [0, 0.5] and the values greater than the median value to the interval of (0.5, 1]; constructing a multi-layer perceptron model; running the multi-layer perceptron model, reading the dose-depth curve that the user wants to convert, outputting differential energy spectrum data in the range of [0, 1] interval, and performing an inverse transformation on the output differential energy spectrum data. The present invention first constructs a conversion model, and then uses the trained conversion model to read the dose-depth curve to be converted, so as to realize the efficient conversion of the dose-depth curve to the energy spectrum.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of satellite space environment analysis, and in particular to a method for converting a dose-depth curve into an energy spectrum. Background Art

[0002] During the mission cycle of a spacecraft, the radiation effects on sensitive components determine the success or failure of the entire mission. Therefore, during the design phase of a spacecraft, it is necessary to estimate the radiation dose of the spacecraft's three-dimensional structure as a basis for optimizing the design of the spacecraft's radiation-resistant structure.

[0003] At present, ray tracing and Monte Carlo methods are usually used to simulate and calculate the radiation effects on sensitive components of spacecraft. Among them, the ray tracing method uses the equivalent shielding depth and dose-depth curve to estimate the radiation dose more quickly, while the Monte Carlo method simulates particle transport based on energy spectrum information and can estimate the radiation dose more accurately. Both methods have their advantages and disadvantages. When energy spectrum information is available, the dose-depth curve can be calculated using the energy spectrum information. At this time, both the ray tracing method and the Monte Carlo method can be used to simulate and calculate the radiation dose; but when only the dose-depth curve is obtained, only the ray tracing method can be used for ray tracing operations.

[0004] Normally, using existing mature computing tools, such as shield software, the dose-depth curve can be calculated by energy spectrum information. However, in some special cases, such as when only the dose-depth curve is obtained and it is desired to perform Monte Carlo calculations, the dose-depth curve needs to be converted into an energy spectrum first, and there is currently no effective conversion tool to achieve this process. Therefore, developing a computing tool that can conveniently convert dose-depth curves to energy spectra is a technical problem that needs to be solved urgently. Summary of the invention

[0005] In view of the above problems in the prior art, the present invention provides a method for converting a dose-depth curve into an energy spectrum.

[0006] To achieve the above object, the present invention is specifically implemented by the following technologies:

[0007] The present invention provides a method for converting a dose-depth curve into an energy spectrum, comprising the following steps:

[0008] S1, splitting a known environmental energy spectrum file to construct multiple single energy spectrum files;

[0009] S2, using the shieldose program to batch solve the single energy spectrum file to obtain a dose-depth curve, and writing the dose-depth curve data and the single energy spectrum file data into a data file to construct a data set;

[0010] S3. Perform filling processing and logarithmic operation on the dataset in sequence to obtain the extreme values and median of all the energy spectrum data in the dataset. The extreme values include the maximum value and the minimum value. Determine whether the extreme values are close to the median. If they are close, select the data at other positions as the median, and repeat the above process until the median is not close to the extreme values. Then, perform a forward transformation on the dataset, map the minimum value, the median, and the maximum value to 0, 0.5, and 1.0 respectively, and scale the values in the dataset that are less than the median to the interval [0, 0.5], and scale the values greater than the median to the interval (0.5, 1].

[0011] S4. Construct a multi-layer perceptron model, use the dataset after the forward transformation as the training set, and perform model training and saving.

[0012] S5. Run the multi-layer perceptron model obtained in step S4, read the dose-depth curve to be converted, output the differential energy spectrum data in the interval [0, 1], and perform an inverse transformation on the output differential energy spectrum data to complete the conversion of the dose-depth curve to be converted to the energy spectrum.

[0013] Further, in step S1, the environmental energy spectrum file includes one or more of the differential energy spectrum of captured protons and the differential energy spectrum of captured electrons.

[0014] Further, the specific steps of splitting the known environmental energy spectrum file to construct multiple single energy spectrum files in step S1 include: splitting the known environmental energy spectrum file, separating each row of the data of the environmental energy spectrum file, so as to form multiple single energy spectrum files.

[0015] Further, the specific operations of step S2 include:

[0016] S21. Convert the single energy spectrum file into input data according to the input format of the shieldose program.

[0017] S22. Call the open-source shieldose program to solve the input data.

[0018] S23. Extract the dose-depth curve data from the solution result, and write it together with the data of the single energy spectrum file into the data file. The data file includes the energy spectrum data of the single energy spectrum file and the ionization absorption dose value data of the dose-depth curve. The data file is named according to the count and incremented by one in sequence.

[0019] S24. Obtain the current count.

[0020] S25. Compare the current count with the maximum number of data, where the maximum number of data corresponds to the number of rows of the environmental energy spectrum file involved in the calculation. If the current count is greater than or equal to the maximum number of data, end constructing the data set. If the current count is less than the maximum number of data, go to step S21.

[0021] Further, the software program for converting the single energy spectrum file into the input data is a Python program.

[0022] Further, in step S3, the criterion for determining that the extreme value is not close to the median is that the absolute value of the difference between the median and the extreme value is greater than or equal to 1e -5 .

[0023] Further, the specific operations of step S3 include:

[0024] S31. Perform filling processing on the data set until the minimum value in the data set is not less than 1e -20 ;

[0025] S32. Perform a base-10 logarithm operation to obtain the extreme values and the median of the data set, where the extreme values include the maximum value and the minimum value;

[0026] S33. Compare whether the median is close to the extreme values. If the absolute value of the difference between the median and the extreme values is less than 1e -5 , adjust the percentile of the median by a step of 2% and repeat this process until the difference is greater than or equal to 1e -5 , at this time, determine that the median is not close to the extreme values;

[0027] S34. Use the minimum value, the median, and the maximum value of all the energy spectrum data in the data set to perform linear interpolation processing according to the first formula, map the median to 0.5, the minimum value to 0, and the maximum value to 1.0, and scale the values in the data set that are less than the median to the interval [0, 0.5] and the values that are greater than the median to the interval (0.5, 1], and the first formula includes:

[0028]

[0029] where Xmin is the data minimum value, Xmid is the data median value, Xmax is the data maximum value, x is the data to be positively transformed, and y is the data after positive transformation.

[0030] Further, in step S4, the software program for constructing the multi-layer perceptron model is the sklearn framework.

[0031] Further, in step S4, the multi-layer perceptron model includes an input layer, an output layer, and at least one hidden layer. Among them, the size of the input layer is 70, the size of the hidden layer is 200, and the size of the output layer is 46.

[0032] Further, in step S5, the specific operation of the inverse transformation includes: using the minimum value, the median, and the maximum value of all the energy spectrum data in the dataset, performing linear interpolation processing according to the second formula to obtain the original data corresponding to the output differential energy spectrum data, and the second formula includes:

[0033]

[0034] where Xmin is the data minimum value, Xmid is the data median value, Xmax is the data maximum value, X is the output differential energy spectrum data to be inversely transformed, and Y is the data after the inverse transformation.

[0035] The present invention realizes an effective data range transformation algorithm by using a known environmental energy spectrum file to construct a dataset and batch processing the dataset, such as filling, logarithmic operation, and forward transformation. It can convert large-dynamic physical data to the [0, 1] interval. At the same time, by comprehensively using the median and extreme values, compared with the general scaling method based on extreme values, it can correct the statistical offset and ensure that half of the values are in the [0, 0.5] interval and the other half are in the (0.5, 1] interval. Finally, a conversion model from the dose-depth curve to the energy spectrum is obtained. After training and saving this conversion model, it can be ensured that under certain energy level conditions, the trained conversion model is used to read the dose-depth curve (i.e., the dose-depth curve to be converted) that the user wants to convert and use it as the input of the perceptron model, and perform inverse transformation on the output, so as to realize the efficient conversion from the dose-depth curve to be converted to the energy spectrum, greatly improving the conversion accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0037] Figure 1 It is the flowchart of constructing the dataset in Embodiment 1 of the present invention;

[0038] Figure 2 It is the flowchart of converting and processing the dataset in Embodiment 1 of the present invention;

[0039] Figure 3 This is the training effect diagram of the multi-layer perceptron model in Embodiment 1 of the present invention. Detailed implementation manners

[0040] It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments may be combined with each other. In addition, the meanings of the terms "include", "contain", and "have" are non-restrictive, that is, other steps and other components that do not affect the result may be added. Unless otherwise specified, the materials, equipment, and reagents are all commercially available.

[0041] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following detailed description of the specific embodiments of the present invention will be given with reference to the accompanying drawings.

[0042] The embodiment of the present invention provides a method for converting a dose-depth curve into an energy spectrum, including the following steps:

[0043] S1. Split the known environmental energy spectrum file to construct multiple single energy spectrum files; for the machine learning prediction in step S4, it is necessary to first prepare some known environmental energy spectrum files and the dose-depth curves obtained therefrom as the basis for subsequent model training. After the model runs stably, it can be separated from the aforementioned environmental energy spectrum file data and convert the dose-depth curve to be converted without energy spectrum information.

[0044] Specifically, the environmental energy spectrum file mainly includes one or more of the differential energy spectra of trapped protons and the differential energy spectra of trapped electrons corresponding to the change of the space environment over time determined by certain orbital parameters and time start and end.

[0045] The specific steps of splitting the known environmental energy spectrum file to construct multiple single energy spectrum files are as follows: split the known environmental energy spectrum file, separate each line of the environmental energy spectrum file data, so as to form multiple single energy spectrum files; that is, the number of single energy spectrum files is the same as the number of lines of the environmental energy spectrum file. Each single energy spectrum file contains the differential energy spectra of trapped protons and / or trapped electrons in a time period.

[0046] S2. Use the shieldose program to batch solve the single energy spectrum files to obtain the dose-depth curve. The dose-depth curve contains multiple items such as 70 shielding depth values (unit: g / cm 2 ) and the ionization absorption dose values corresponding to the shielding depth values, and write the dose-depth curve data and the single energy spectrum file data into a data file together to construct a data set.

[0047] The above-mentioned dataset contains multiple data files, and each data file contains two parts, which are, in sequence: the energy spectrum data of a single energy spectrum file (i.e., the differential energy spectrum data of trapped protons and / or trapped electrons) and the data of ionization absorption dose values of the dose-depth curve.

[0048] S3. Perform transformation processing on the dataset: perform filling processing and logarithmic operation on the dataset in sequence, obtain the extreme values and median of all the energy spectrum data in the dataset. The extreme values include the maximum value and the minimum value. Determine whether the extreme values are close to the median. If they are close, select the data at other positions as the median, and repeat the above process until the median is not close to the extreme values. Then perform a forward transformation on the dataset, map the median to 0.5, the minimum value to 0, and the maximum value to 1.0, and scale the values in the dataset that are less than the median to the interval [0, 0.5], and scale the values that are greater than the median to the interval (0.5, 1]; such a range and distribution conform to the activation function output by the multi-layer perceptron model, which can ensure that the data distribution is relatively uniform and improve the training effect of the model.

[0049] S4. Construct a multi-layer perceptron model, use the dataset after forward transformation as the training set, and perform training and saving of the model.

[0050] The software program for constructing the above-mentioned multi-layer perceptron model is the sklearn framework of the Python program. The sklearn framework is a very powerful machine learning library provided by a third party for Python programs, which includes all aspects from data preprocessing to training models.

[0051] The above-mentioned multi-layer perceptron model includes an input layer, an output layer, and at least one hidden layer. Exemplarily, the multi-layer perceptron model includes an input layer, an output layer, and two hidden layers. The size of the input layer is 70, corresponding to the dose-depth curve data after forward transformation. The sizes of the two hidden layers are 200, and the size of the output layer is 46, corresponding to the differential energy spectrum data that has not undergone inverse transformation at a certain energy level. Train the multi-layer perceptron model, and after training, use the pickel tool in the Python program for serialization and saving.

[0052] S5. Run the multi-layer perceptron model obtained by training in step S4, read the dose-depth curve to be converted, output the differential energy spectrum data in the range of [0, 1] interval, and perform inverse transformation on the output differential energy spectrum data to complete the conversion of the dose-depth curve to be converted to the energy spectrum.

[0053] Specifically, the specific operations of the inverse transformation include: using the minimum value (including the minimum and maximum values) and the median of all the energy spectrum data in the dataset recorded before the forward transformation operation. After the forward transformation operation, the minimum value, the median, and the maximum value correspond to 0.0, 0.5, and 1.0 respectively. Linear interpolation processing is performed according to the second formula to obtain the inverse transformation data corresponding to the output differential energy spectrum data. That is, for values less than 0.5, linear interpolation is performed using the minimum value and the median, and for values greater than 0.5, linear interpolation is performed using the median and the maximum value, thereby obtaining the inverse transformation data. This inverse transformation data is the energy spectrum data required after the conversion of the dose-depth curve to be converted in the object of the present invention. The second formula includes:

[0054]

[0055] Wherein, Xmin is the data minimum value, Xmid is the data median value, Xmax is the data maximum value, X is the output differential energy spectrum data to be inversely transformed, and Y is the data after the inverse transformation.

[0056] See Figure 1 , in step S2, the specific operations for constructing the dataset include:

[0057] S21. Convert a single energy spectrum file into input data according to the input format of the shieldose program;

[0058] S22. Call the open-source shieldose program for solution;

[0059] S23. Extract the dose-depth curve data from the solution result and write it into a data file together with the single energy spectrum file data. The data file is named according to the count. Specifically, for each line of the data in the segmented environmental energy spectrum file, the count of the corresponding data file is incremented by one in sequence. For example, the first line of the environmental energy spectrum file data corresponds to a count of 0, and the output data file is named "00000.txt", the second line of the environmental energy spectrum file data corresponds to a count of 1, and the output data file is named "00001.txt", the third line of the environmental energy spectrum file data corresponds to a count of 2, and the output data file is named "00002.txt", and so on for the format conversion and solution of each line of data.

[0060] S24. Obtain the current count; it should be noted that during the operation of the program, the initial count is set to 0, that is, the current count at the beginning of the program is defaulted to 0;

[0061] S25. Compare the current count with the maximum number of data, where the maximum number of data is the size of the expected data set, corresponding to the number of rows of the environmental energy spectrum file participating in the calculation. If the current count is greater than or equal to the maximum number of data, end constructing the data set. If the current count is less than the maximum number of data, go to step S21.

[0062] The software program for converting a single energy spectrum file into input data as described above is a Python program.

[0063] The criterion for judging whether the extreme value is close to the median is whether the absolute value of the difference between the median and the extreme value is less than 1e -5 . The specific operations of step S3 include:

[0064] S31. Perform a filling process on the data set until the minimum value in the data set is not less than 1e -20 ;

[0065] S32. Perform a base-10 logarithm operation to obtain the extreme values and median of the data set. The extreme values include the maximum value and the minimum value;

[0066] S33. Compare whether the median is close to the extreme values. If the absolute value of the difference between the median and the extreme values is less than 1e -5 , then adjust the percentile of the median by a step size of 2%, and repeat this process until the difference is greater than or equal to 1e -5 . At this time, it is determined that the median is not close to the extreme values. That is, first judge whether the median is close to the minimum value among the extreme values. When the difference between the median and the minimum value among the extreme values is less than 1e -5 , then find a higher percentile by a step size of 2% (the new median is equal to the original median multiplied by 102%), and repeat this process until the difference is greater than or equal to 1e -5 ; then judge whether the median is close to the maximum value among the extreme values. When the difference between the maximum value among the extreme values and the median is less than 1e -5 , then find a lower 2% percentile by a step size of 2% (the new median is equal to the original median multiplied by 98%) until the difference is greater than or equal to 1e -5 .

[0067] S34. Perform a forward transformation operation: Using the extreme values (including the minimum value and the maximum value) and the median of all the energy spectrum data in the data set recorded before the forward transformation operation, perform linear interpolation processing according to the first formula, map the median to 0.5, the minimum value to 0, and the maximum value to 1.0, and scale the values in the data set that are less than the median to the interval [0, 0.5] and the values that are greater than the median to the interval (0.5, 1]; The first formula includes:

[0068]

[0069] Wherein, Xmin is the minimum data value, Xmid is the median data value, Xmax is the maximum data value, x is the data to be forward-transformed, and y is the data after forward transformation.

[0070] Based on the machine learning method, the present invention realizes a method for converting a relatively accurate dose-depth curve into an energy spectrum. By using the known environmental energy spectrum file to construct a data set, the present invention batch processes the data set, performs logarithmic operations and forward transformations, etc., to realize an effective data range transformation algorithm, which can convert large-dynamic physical data to the [0, 1] interval. At the same time, by comprehensively using the median and extreme values, compared with the general scaling method according to extreme values, statistical offsets can be corrected, ensuring that half of the values are in the [0, 0.5] interval and the other half are in the (0.5, 1] interval. Finally, a conversion model from the dose-depth curve to the energy spectrum is obtained. After training and saving the conversion model, it can be ensured that under certain energy levels, the trained conversion model is used to read the dose-depth curve to be converted (i.e., the dose-depth curve to be converted) desired by the user and used as the input of the perceptron model, and the output is inversely transformed to realize the efficient conversion of the dose-depth curve to be converted to the energy spectrum, greatly improving the conversion accuracy.

[0071] The following further elaborates the present invention in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and not to limit the scope of the present invention. The experimental methods without specific conditions noted in the following embodiments are usually carried out according to the conditions recommended by the manufacturer.

[0072] Embodiment 1

[0073] A method for converting a dose-depth curve into an energy spectrum includes the following steps:

[0074] S1. Obtain an environmental energy spectrum file under a certain environmental condition range. All information of the environmental energy spectrum file is known. The environmental energy spectrum file mainly includes the differential energy spectra of captured protons and captured electrons. The environmental energy spectrum file is segmented, and each row of the data of the environmental energy spectrum file is separated to form multiple single energy spectrum files;

[0075] S2. Use the shieldose program to batch solve the single energy spectrum files to obtain the dose-depth curve. The dose-depth curve contains 70 shielding depth values (unit: g / cm 2 ) arranged from small to large and the ionization absorption dose values corresponding to the shielding depth values. Write the dose-depth curve data and the single energy spectrum file data into a data file to construct a data set. Each data file contains 2 parts, which are in turn: the energy spectrum data of the single energy spectrum file (including the differential energy spectra of captured protons and captured electrons) and the ionization absorption dose value data of the dose-depth curve;

[0076] See Figure 1 , the specific operations of step S2 include:

[0077] S21. According to the input format of the shieldose program, use a Python program to convert a single energy spectrum file into input data;

[0078] S22. Call the open-source shieldose program to solve the input data;

[0079] S23. Extract the dose-depth curve data from the solution results and write it into a data file together with the single energy spectrum file data. The data file is named according to the count;

[0080] S24. Obtain the current count;

[0081] S25. Compare the current count with the maximum number of data. The maximum number of data is the size of the expected data set, corresponding to the number of rows of the environmental energy spectrum file participating in the calculation. If the current count is greater than or equal to the maximum number of data, end building the data set. If the current count is less than the maximum number of data, go to step S21;

[0082] S3. Perform filling processing and logarithmic operation on the data set in sequence to obtain the extreme values and median of all energy spectrum data in the data set. The extreme values include the maximum value and the minimum value. Judge whether the extreme values are close to the median. If they are close, select the data at other positions as the median, and repeat the above process until the median is not close to the extreme values. Then perform a positive transformation on the data set, map the median to 0.5, the minimum value to 0, and the maximum value to 1.0, and scale the values in the data set less than the median to the interval [0, 0.5], and scale the values greater than the median to the interval (0.5, 1]; See Figure 2 , the specific operations of step S3 include:

[0083] S31. Perform filling processing on the data set until the minimum value in the data set is not less than 1e -20 ;

[0084] S32. Perform a base-10 logarithmic operation to obtain the extreme values and median of the data set. The extreme values include the maximum value and the minimum value;

[0085] S33. First, judge whether the median is close to the minimum value among the extreme values. When the difference between the median and the minimum value among the extreme values is less than 1e -5 , then find the higher percentile at a 2% step (the new median is equal to the original median multiplied by 102%), and repeat this process until the difference is greater than or equal to 1e -5 ; Then judge whether the median is close to the maximum value among the extreme values. When the difference between the maximum value among the extreme values and the median is less than 1e-5 , the lower 2% percentile is calculated at a step size of 2% (the new median is equal to the original median multiplied by 98%) until the difference is greater than or equal to 1e -5 ;

[0086] S34. Using the extreme values (including the minimum and maximum values) and the median of all the energy spectrum data recorded before the forward transformation operation, perform linear interpolation processing according to the first formula, map the median to 0.5, the minimum value to 0, and the maximum value to 1.0, and scale the values in the data set that are less than the median to the interval [0, 0.5], and scale the values greater than the median to the interval (0.5, 1]; the first formula includes:

[0087]

[0088] where Xmin is the data minimum value, Xmid is the data median, Xmax is the data maximum value, x is the data to be forward-transformed, and y is the data after forward transformation;

[0089] Taking an array with a minimum value of 2.0, a maximum value of 20.0, and a median of 5.0 as an example, for a certain data item 3.0, which is less than the median, the data after forward transformation is: 0.5 * (3.0 - 2.0) / (5.0 - 2.0) = 0.167; for a certain data item 9.0, which is greater than the median, the data after forward transformation is: 0.5 + 0.5 * (9.0 - 5.0) / (20.0 - 5.0) = 0.633.

[0090] S4. Use the sklearn framework in the Python program to construct a multi-layer perceptron model. This multi-layer perceptron model includes an input layer, an output layer, and two hidden layers. The size of the input layer is 70, corresponding to the dose-depth curve data after forward transformation. The sizes of the two hidden layers are 200, and the size of the output layer is 46, corresponding to the differential energy spectrum of captured protons and / or captured electrons that have not undergone reverse data transformation at a certain energy level. Train this multi-layer perceptron model, and after training, use the pickel tool in the Python program for serialization and storage. The decrease in loss during training is shown in Figure 3 .

[0091] S5. Use the pickle tool in the Python program to read the multi-layer perceptron model obtained in step S4, and then run the multi-layer perceptron model to read the dose-depth curve that the user wants to convert. Input the shielding depth value of the dose-depth curve into the input layer side of the multi-layer perceptron model, and the output layer outputs a differential energy spectrum in the range of [0, 1]. Perform linear interpolation processing on the output differential energy spectrum data according to the second formula to obtain the original data corresponding to the output differential energy spectrum data, and complete the conversion from the dose-depth curve to the energy spectrum; the second formula includes:

[0092]

[0093] where Xmin is the minimum value of the data, Xmid is the median of the data, Xmax is the maximum value of the data, X is the output differential energy spectrum data to be inversely transformed, and Y is the data after the inverse transformation.

[0094] Perform inverse transformation on the data mentioned in step S34. The inverse transformation process of data item 3.0 is: 2.0 * 0.167 * (5.0 - 2.0) + 2.0 = 3.0, and the inverse transformation process of data item 9.0 is: 2.0 * (0.633 - 0.5) * (20.0 - 5.0) + 5.0 = 9.0. Predict and verify each data in the test set one by one, and measure it by the absolute value of the relative error. The average relative error can be obtained as 6.77%, which is an ideal result.

Claims

1. A method for converting a dose-depth curve into an energy spectrum, characterized in that, it includes the following steps: S1. Split the known environmental energy spectrum file to construct multiple single energy spectrum files; S2. Use the shieldose program to batch solve the single energy spectrum files, obtain the dose-depth curve, write the dose-depth curve data and the differential energy spectrum data of the single energy spectrum file into a data file together, and construct a data set; S3. Perform filling processing and logarithmic operation on the data set in sequence, obtain the extreme values and median of all the energy spectrum data in the data set, the extreme values include the maximum value and the minimum value, judge whether the extreme values are close to the median, if they are close, then select the data at other positions as the median, repeat the above process until the median is not close to the extreme values, and then perform a forward transformation on the data set, map the minimum value, the median and the maximum value to 0, 0.5 and 1.0 respectively, and scale the values in the data set that are less than the median to the interval of [0, 0.5], and scale the values that are greater than the median to the interval of (0.5, 1]; S4. Construct a multi-layer perceptron model, use the data set after the forward transformation as the training set, and perform model training and saving; S5. Run the multi-layer perceptron model obtained by training in step S4, read the dose-depth curve to be converted, output differential energy spectrum data in the range of [0, 1] interval, and perform an inverse transformation on the output differential energy spectrum data.

2. The method according to claim 1, characterized in that, in step S1, the environmental energy spectrum file includes one or more of the differential energy spectrum of the Earth's radiation belt protons and the differential energy spectrum of the Earth's radiation belt electrons.

3. The method according to claim 1, characterized in that, in step S1, the specific steps for splitting the known environmental energy spectrum file to construct multiple single energy spectrum files include: splitting the known environmental energy spectrum file, separating each line of the environmental energy spectrum file data, so as to form multiple single energy spectrum files.

4. The method according to claim 1, characterized in that, the specific operations of step S2 include: S21. Convert the single energy spectrum file into input data according to the input format of the shieldose program; S22. Call the open-source shieldose program to solve the input data; S23. Extract the dose-depth curve data from the solution result, and write it into the data file together with the single energy spectrum file data. The data file includes the energy spectrum data of the single energy spectrum file and the ionization absorption dose value data of the dose-depth curve. The data file is named according to the count and incremented by one in sequence; S24. Obtain the current count; S25. Compare the current count with the maximum number of data, where the maximum number of data corresponds to the number of rows of the environmental energy spectrum file involved in the calculation. If the current count is greater than or equal to the maximum number of data, end constructing the data set. If the current count is less than the maximum number of data, go to step S21.

5. The method according to claim 4, wherein, the software program for converting the single energy spectrum file into the input data is a Python program.

6. The method according to claim 1, wherein, In step S3, the criterion for determining that the extreme value is not close to the median is that the absolute value of the difference between the median and the extreme value is greater than or equal to 1e -5 .

7. The method according to claim 6, wherein, The specific operations of step S3 include: S31. Perform filling processing on the dataset until the minimum value in the dataset is not less than 1e -20 ; S32. Perform a base-10 logarithm operation to obtain the extreme values and the median of the data set, where the extreme values include the maximum value and the minimum value; S33. Compare whether the median is close to the extreme value. If the absolute value of the difference between the median and the extreme value is less than 1e -5 , then adjust the percentile of the median in steps of 2%, and repeat this process until the difference is greater than or equal to 1e -5 . At this time, it is determined that the median is not close to the extreme value; S34. Use the minimum value, the median, and the maximum value of all the energy spectrum data in the data set to perform linear interpolation processing according to the first formula, map the median to 0.5, the minimum value to 0, and the maximum value to 1.0, and scale the values in the data set that are less than the median to the interval [0, 0.5] and the values that are greater than the median to the interval (0.5, 1]. The first formula includes: where Xmin is the data minimum value, Xmid is the data median value, Xmax is the data maximum value, x is the data to be forward-transformed, and y is the data after the forward transformation.

8. The method according to claim 1, wherein, in step S4, the software program for constructing the multi-layer perceptron model is the sklearn framework.

9. The method according to claim 1, wherein, in step S4, the multi-layer perceptron model includes an input layer, an output layer, and at least one hidden layer. Among them, the size of the input layer is 70, the size of the hidden layer is 200, and the size of the output layer is 46.

10. The method according to claim 1, wherein, in step S5, the specific operations of the inverse transformation include: using the minimum value, the median, and the maximum value of all the energy spectrum data in the data set to perform linear interpolation processing according to the second formula to obtain the original data corresponding to the output differential energy spectrum data. The second formula includes: where Xmin is the data minimum value, Xmid is the data median value, Xmax is the data maximum value, X is the output differential energy spectrum data to be inverse-transformed, and Y is the data after the inverse transformation.

Citation Information

Patent Citations

  • Energy deposition nucleus acquirement method

    CN101477202A

  • Method for establishing measurement data-based simple and convenient irradiation source model of medical linear accelerator

    CN102921115A