Energy correction method and device, electronic equipment, detection equipment and storage medium
By synchronously collecting the energy value to be corrected and the standard energy value and obtaining the energy correction function, the nonlinear problem of energy output in high-energy ray detectors is solved, efficient energy correction is achieved on a chip with few resources, and the calculation process is simplified.
Patent Information
- Application Number
- CN202211628341.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-17
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2042-12-17
AI Technical Summary
In the electronic link of acquisition and processing in existing high-energy ray detectors, the input energy spectrum and the output energy spectrum cannot completely overlap linearly, resulting in a nonlinear relationship between energy output and input. The existing neural network correction method has a large computational load and is not suitable for low-resource chips.
By synchronously collecting the energy value to be corrected and the standard energy value of the pulse signal, an energy correction function is obtained, and the energy value to be corrected of the pulse signal is corrected using the function, which is simplified to a fitting function correction process and is suitable for chips with limited resources.
This method achieves efficient and simple energy correction on a low-resource chip, reduces computational complexity, and improves the versatility and accuracy of the correction process.
Smart Images

Figure CN115951392B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of radiation detection, in particular to an energy correction method and device, electronic equipment, detection equipment and a storage medium. BACKGROUND
[0002] High-energy rays can be applied to various detection scenarios such as security checks, food safety, geological exploration, nuclear medicine, etc. The detection of high-energy rays (such as X-rays and gamma rays) usually requires the use of a scintillation detector. The working principle of the scintillation detector is to deposit high-energy rays in a scintillation crystal to generate a large number of visible photons that can be responded by a photoelectric conversion device, and then output an electrical signal by the photoelectric conversion device. Subsequently, the energy and time information of the high-energy rays are obtained through acquisition and processing. The electronic part of acquisition and processing is very important, which affects the performance of the scintillation detector to some extent.
[0003] Currently, in the electronic part of acquisition and processing, the input energy spectrum and the output energy spectrum cannot be completely coincided after linear transformation. For example, the MVT (Multi-Voltage Threshold) digitization method is a common electronic method for scintillation detectors in nuclear medicine. It collects the scintillation pulses generated by the scintillation detector by setting multiple voltage thresholds, and then reconstructs the scintillation pulses to obtain energy and time information. Since it uses voltage threshold setting to sample, the input-output nonlinearity problem mentioned above occurs. Since the output energy is nonlinearly related to the input energy, the output energy cannot accurately obtain the energy of the input pulse.
[0004] To solve the above problems, a method of using a neural network to correct the input pulse energy has been proposed. However, this method requires a large amount of data for training, has a large amount of calculation, and the calculation process is complicated, which is not suitable for resource-constrained chips and has poor versatility. SUMMARY
[0005] Therefore, it is necessary to provide an energy correction method, an energy correction device, electronic equipment, detection equipment and a computer readable storage medium to solve the above problems.
[0006] According to a first aspect of the present application, an energy correction method is provided, which includes: synchronously collecting pulse signals and obtaining a to-be-corrected energy value and a standard energy value of each pulse signal; obtaining an energy correction function according to the to-be-corrected energy value and the standard energy value of each pulse signal; and correcting the to-be-corrected energy value of each pulse signal based on the energy correction function.
[0007] In one of the embodiments, the step of synchronously collecting the pulse signals and obtaining the to-be-corrected energy values and the standard energy values of the pulse signals respectively comprises: controlling the first collecting device and the second collecting device to synchronously collect the pulse signals; obtaining the energy values of the pulse signals collected by the first collecting device to obtain the to-be-corrected energy values, and obtaining the energy values of the pulse signals collected by the second collecting device to obtain the standard energy values.
[0008] In one of the embodiments, the step of controlling the first collecting device and the second collecting device to synchronously collect the pulse signals comprises: outputting a trigger signal to the second collecting device to instruct the second collecting device to retain the currently collected pulse signal when the first collecting device finishes collecting the current pulse signal.
[0009] In one of the embodiments, the step of controlling the first collecting device and the second collecting device to synchronously collect the pulse signals comprises: obtaining a sampling threshold corresponding to the first collecting device; setting a comparison threshold according to the sampling threshold; when the target parameter value of the pulse signal is greater than the comparison threshold, outputting the pulse signal to the first collecting device and the second collecting device, and outputting a trigger signal to the second collecting device to instruct the second collecting device to retain the currently collected pulse signal.
[0010] In one of the embodiments, the comparison threshold is greater than the sampling threshold.
[0011] In one of the embodiments, the first collecting device comprises an MVT collecting device, and the sampling threshold is the highest sampling threshold of the MVT collecting device.
[0012] In one of the embodiments, the second collecting device comprises an oscilloscope.
[0013] In one of the embodiments, the step of obtaining the energy correction function according to the to-be-corrected energy values and the standard energy values of the pulse signals comprises: obtaining a scatter plot of the to-be-corrected energy values with respect to the standard energy values of the pulse signals according to the to-be-corrected energy values and the standard energy values of the pulse signals; and obtaining the energy correction function according to the distribution law of each position point in the scatter plot.
[0014] In one of the embodiments, the step of obtaining the energy correction function according to the distribution of the position points in the scatter plot comprises: extracting a plurality of target position points in the scatter plot; solving an n-th order function according to the coordinates of the plurality of target position points, where n is a natural number excluding 0, to obtain a fitting function; verifying whether the fitting function meets a preset requirement, and if not, adjusting the n-th order function to an n+1-th order function until the obtained fitting function meets the preset requirement, and taking the fitting function finally meeting the preset requirement as the energy correction function.
[0015] In one of the embodiments, the target position points comprise a plurality of trend points in the scatter plot, and the plurality of trend points comprise a plurality of barycentric points or central points corresponding to different positions in the abscissa of the scatter plot.
[0016] In one of the embodiments, the target position points comprise all the points in the scatter plot.
[0017] In one of the embodiments, the step of verifying whether the fitting function meets the preset requirement, and if not, adjusting the n-th order function to an n+1-th order function until the obtained fitting function meets the preset requirement, and taking the fitting function finally meeting the preset requirement as the energy correction function comprises: determining an error amount of the fitting function according to the to-be-corrected energy values and the standard energy values of the position points in the scatter plot; if the error amount exceeds an allowable range, continuing to solve an n+1-th order function according to the coordinates of the target position points to obtain a new fitting function, and so on until the error amount of the fitting function is within the allowable range.
[0018] In one of the embodiments, the step of determining the error amount of the fitting function according to the to-be-corrected energy values and the standard energy values of the position points in the scatter plot comprises: correcting the to-be-corrected energy values of the position points in the scatter plot by the fitting function to obtain corrected values; comparing the corrected values and the standard energy values corresponding to the position points; and determining the error amount of the fitting function according to the comparison result.
[0019] According to a second aspect of the embodiments of the present application, an energy correction device is provided, which comprises: a first obtaining module configured to synchronously collect pulse signals and obtain to-be-corrected energy values and standard energy values of the pulse signals respectively; a second obtaining module configured to obtain an energy correction function according to the to-be-corrected energy values and the standard energy values of the pulse signals; and a correction module configured to correct the to-be-corrected energy values of the pulse signals based on the energy correction function.
[0020] In one of the embodiments, to realize the synchronous acquisition of the pulse signals and the obtaining of the to-be-corrected energy values and the standard energy values of the pulse signals respectively, the first obtaining module is further configured to: control the first acquisition device and the second acquisition device to synchronously acquire the pulse signals; obtain the energy values of the pulse signals acquired by the first acquisition device to obtain the to-be-corrected energy values, and obtain the energy values of the pulse signals acquired by the second acquisition device to obtain the standard energy values.
[0021] In one of the embodiments, the first acquisition device is configured to output a trigger signal to the second acquisition device to instruct the second acquisition device to retain the currently acquired pulse signal when the current pulse signal acquisition is completed.
[0022] In one of the embodiments, the energy correction device further comprises a comparison unit configured to obtain a sampling threshold corresponding to the first acquisition device and set a comparison threshold according to the sampling threshold; when the target parameter value of the pulse signal is greater than the comparison threshold, output the pulse signal to the first acquisition device and the second acquisition device, and output a trigger signal to the second acquisition device to instruct the second acquisition device to retain the currently acquired pulse signal.
[0023] In one of the embodiments, the comparison threshold is greater than the sampling threshold.
[0024] In one of the embodiments, the first acquisition device comprises an MVT acquisition device, and the sampling threshold is the highest sampling threshold of the MVT acquisition device.
[0025] In one of the embodiments, the second acquisition device comprises an oscilloscope.
[0026] In one of the embodiments, to realize the obtaining of the energy correction function according to the to-be-corrected energy values and the standard energy values of the pulse signals, the second obtaining module is configured to: obtain a scatter plot of the to-be-corrected energy values with respect to the standard energy values of the pulse signals according to the to-be-corrected energy values and the standard energy values of the pulse signals; and obtain the energy correction function according to the distribution law of each position point in the scatter plot.
[0027] In one of the embodiments, the second obtaining module further comprises: an extraction unit configured to extract a plurality of target position points in the scatter plot; a solving unit configured to solve an n-th order function according to the coordinates of the plurality of target position points, wherein n is a natural number excluding 0, to obtain a fitting function; and a verification unit configured to verify whether the fitting function meets a preset requirement, and if not, adjust the n-th order function to an n+1-th order function until the obtained fitting function meets the preset requirement, so as to take the fitting function finally meeting the preset requirement as the energy correction function.
[0028] In one of the embodiments, the verification unit is further configured to determine the error amount of the fitting function according to the standard energy value and the to-be-corrected energy value corresponding to each position point in the scatter plot; and if the error amount exceeds the allowed range, continue to solve the n+1 order function according to the coordinates of the target position point to obtain a new fitting function, and so on until the error amount of the fitting function is within the allowed range.
[0029] In one of the embodiments, to determine the error amount of the fitting function according to the standard energy value and the to-be-corrected energy value corresponding to each position point in the scatter plot, the verification unit is further configured to correct the to-be-corrected energy value of each position point in the scatter plot by using the fitting function to obtain a corrected value; compare the corrected value corresponding to each position point with the standard energy value; and determine the error amount of the fitting function according to the comparison result.
[0030] According to a third aspect of the embodiments of the present application, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the computer program is executed by the processor, the steps of the energy correction method described above are implemented.
[0031] According to a fourth aspect of the embodiments of the present application, a detection device is provided, which includes the energy correction apparatus described above.
[0032] According to a fifth aspect of the embodiments of the present application, a computer readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the energy correction method described above are implemented.
[0033] The energy correction method described above, while acquiring the to-be-corrected energy value of each pulse signal, also acquires the standard energy value of each pulse signal, and based on the to-be-corrected energy value and the standard energy value, the energy correction function can be obtained, and based on the energy correction function, the to-be-corrected energy value of each pulse signal can be corrected. Therefore, only the energy correction function needs to be established to correct the energy value of each pulse signal, and the correction method does not need complex calculation, requires less resources, and the correction process is simple. Even a chip with less resources is suitable for the energy correction method described above, and the method has strong versatility. BRIEF DESCRIPTION OF DRAWINGS
[0034] Figure 1 A flowchart of the energy correction method provided by an embodiment of the present application is shown in the figure;
[0035] Figure 2 A flowchart of step S200 in the energy correction method provided by an embodiment of the present application is shown in the figure;
[0036] Figure 3 A structure diagram of synchronously collecting pulse signals in the energy correction method provided by an embodiment of the present application is shown in the figure;
[0037] Figure 4 A flow chart of step S210 in the energy correction method provided by an embodiment of the present application is shown in the figure;
[0038] Figure 5 A structure diagram of synchronously collecting pulse signals in the energy correction method provided by another embodiment of the present application is shown in the figure;
[0039] Figure 6 A flow chart of step S400 in the energy correction method provided by an embodiment of the present application is shown in the figure;
[0040] Figure 7 A scatter plot of the to-be-corrected energy values of each pulse signal with respect to the standard energy value;
[0041] Figure 8 A flow chart of step S420 in the energy correction method provided by an embodiment of the present application is shown in the figure;
[0042] Figure 9 A flow chart of step S423 in the energy correction method provided by an embodiment of the present application is shown in the figure;
[0043] Figure 10 A structure diagram of the energy correction device provided by an embodiment of the present application is shown in the figure;
[0044] Figure 11 A structure diagram of the electronic device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0045] In order to facilitate the understanding of the present application, the present application will be described in more detail below with reference to the relevant drawings. The preferred embodiments of the present application are shown in the drawings. However, the present application can be realized in many different forms, and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.
[0046] In the present application, unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connecting", "fixing" and the like should be understood in a broad sense, for example, it can be fixedly connected, or it can be detachably connected, or it can be integrated; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium; it can be the internal communication of two elements or the interaction relationship between two elements, unless otherwise explicitly limited. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0047] The terms "first", "second", "third", etc. are used only for descriptive purposes and are not to be construed as indicating or implying relative importance or an ordered ranking of the indicated technical features. Thus, a feature defined with "first", "second" or "third" can implicitly or explicitly include at least one of the features. In the description of the present application, the meaning of "a plurality" is at least two, for example two, three, etc., unless otherwise explicitly and specifically defined.
[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0049] Some preferred embodiments of the present application are described below with reference to the accompanying drawings. It should be noted that the following description is for the purpose of illustration only and is not intended to limit the scope of protection of the present application.
[0050] In one embodiment, referring to Figure 1 , an energy correction method is provided. The energy correction method provided in this embodiment includes the following steps:
[0051] Step S200, synchronously collecting pulse signals and obtaining a to-be-corrected energy value and a standard energy value of each pulse signal.
[0052] The to-be-corrected energy value refers to an energy value obtained by collecting the pulse signal by the collecting device and then processing. Due to the limitation of the collecting device, the energy value often deviates from the true energy value, and therefore needs to be corrected. In this embodiment, the to-be-corrected energy value of each pulse signal is obtained at the same time as the standard energy value corresponding to each pulse signal. The standard energy value refers to the true energy value corresponding to the pulse signal, which can be measured by an electronic measuring instrument (such as an oscilloscope) to ensure that the true energy value of each pulse signal can be obtained.
[0053] Step S400, obtaining an energy correction function according to the to-be-corrected energy value and the standard energy value of each pulse signal.
[0054] After obtaining the to-be-corrected energy value and the standard energy value of each pulse signal, the difference rule between the to-be-corrected energy value and the standard energy value of each pulse signal can be analyzed, and then the energy correction function can be obtained. The energy correction function can reflect the mathematical relationship between the to-be-corrected energy value and the standard energy value.
[0055] Step S600, correcting the to-be-corrected energy value of each pulse signal based on the energy correction function.
[0056] When the energy correction function is obtained, the to-be-corrected energy value of each pulse signal can be substituted into the energy correction function to correct the to-be-corrected energy value, that is, the to-be-corrected energy value of the pulse signal collected by the collection device is substituted into the energy correction function, and the real energy value of the pulse signal can be obtained to complete the correction of the to-be-corrected energy value.
[0057] In this embodiment, the pulse signals in a time period can be collected to obtain the to-be-corrected energy value and the standard energy value of the pulse signals in the time period, and then the energy correction function is obtained. The to-be-corrected energy value of the pulse signal collected in other time periods can be corrected by using the energy correction function.
[0058] The energy correction method provided in this embodiment collects the to-be-corrected energy value and the standard energy value of each pulse signal at the same time, and the energy correction function can be obtained based on the to-be-corrected energy value and the standard energy value. The to-be-corrected energy value of each pulse signal can be corrected based on the energy correction function. Therefore, the energy value of each pulse signal can be corrected only by establishing the energy correction function. Compared with the neural network correction method, the correction method does not require complex calculation, requires less resources, and has a simple correction process. Even a chip with less resources can be applied to the above energy correction method, and the method has strong versatility.
[0059] In one of the embodiments, referring to Figure 2 , the step S200, that is, the step of synchronously collecting pulse signals and obtaining the to-be-corrected energy value and the standard energy value of each pulse signal, includes:
[0060] In step S210, the first collection device 10 and the second collection device 20 are controlled to synchronously collect pulse signals.
[0061] In this embodiment, the first collection device 10 can be a collection device used to collect pulse signals in an actual application scenario, such as an MVT collection device. The second collection device 20 can be an electronic measurement device, such as an oscilloscope. The real electrical parameters of the pulse signals can be obtained through the electronic measurement device. The pulse signals are synchronously collected by the first collection device 10 and the second collection device 20 to ensure that the to-be-corrected energy value corresponding to the first collection device 10 and the standard energy value corresponding to the second collection device 20 correspond to the pulse signals at the same time.
[0062] In step S220, the energy value of each pulse signal collected by the first collection device 10 is obtained to obtain the to-be-corrected energy value, and the energy value of each pulse signal collected by the second collection device 20 is obtained to obtain the standard energy value.
[0063] After the first acquisition device 10 and the second acquisition device 20 synchronously acquire a certain number of pulse signals, the energy values of the pulse signals acquired by the first acquisition device 10 can be obtained through integral operation, and the energy values are used as the to-be-corrected energy values. The energy values of the pulse signals acquired by the second acquisition device 20 can also be obtained through integral operation, and the energy values are used as the standard energy values. Thus, the to-be-corrected energy values and the standard energy values of the pulse signals can be obtained. The integral operation methods can include Newton integral method, Riemann integral method, numerical integral method, and the like, and are not specifically limited.
[0064] In one embodiment, the step S210, i.e., the step of controlling the first acquisition device and the second acquisition device to synchronously acquire the pulse signals, includes: when the first acquisition device 10 finishes acquiring the current pulse signal, outputting a trigger signal to the second acquisition device 20 to instruct the second acquisition device 20 to retain the current acquired pulse signal.
[0065] Referring to Figure 3 In actual application, the pulse signals output by the photoelectric conversion device can be synchronously input to the first acquisition device 10 and the second acquisition device 20. The second acquisition device 20 is an electronic measuring device, such as an oscilloscope, which can acquire all the input signals, but it often does not actively retain the acquired data without external triggering, i.e., the data acquired by the second acquisition device 20 cannot enter the subsequent processing and analysis link with the data acquired by the first acquisition device 10. Therefore, in order to retain the data acquired by the second acquisition device 20 for subsequent processing and analysis, in one embodiment, when the first acquisition device 10 finishes acquiring the current input pulse signal, a finished-acquisition flag signal is generated, and the flag signal is sent to the second acquisition device 20 as a trigger signal of the second acquisition device 20. When the second acquisition device 20 receives the trigger signal, the current acquired pulse signal is retained. Thus, the pulse signal input to the first acquisition device 10 and the second acquisition device 20 can be synchronously acquired and retained by the second acquisition device 20 when the pulse signal is acquired by the first acquisition device 10.
[0066] With the first acquisition device 10 as the MVT acquisition device and the second acquisition device 20 as the oscilloscope as an example, when the MVT acquisition device collects the pulse signal (i.e., the amplitude of the pulse signal exceeds the preset threshold of the MVT acquisition device), it outputs a completed acquisition flag signal, and outputs the flag signal to the oscilloscope. The oscilloscope uses the flag signal as a trigger signal to trigger the retention of the pulse signal. When the non-collection channel of the oscilloscope receives the trigger signal, the collection channel triggers to retain the currently collected pulse signal. Generally, the voltage value of the trigger signal is greater than the trigger voltage of the oscilloscope. Assuming that the trigger voltage of the oscilloscope is 1V, the voltage value of the trigger signal can be greater than 1V, such as 3V, so as to ensure that the trigger signal can be collected by the oscilloscope. In the above manner, it can be ensured that the MVT acquisition device and the oscilloscope can simultaneously collect the pulse waveform of the same time period.
[0067] In addition to the above-mentioned triggering the second acquisition device to retain the collected data when the first acquisition device completes the collection, other ways can also be used to ensure that the first acquisition device and the second acquisition device synchronously collect the pulse of the same time period. For example, each acquisition device has certain collection conditions, and the data can only be collected when the conditions are met. Therefore, before the pulse signal is input to each acquisition device, it can be determined in advance whether the pulse signal can be collected by each acquisition device. If so, the pulse signal is input to each acquisition device, and the second acquisition device is instructed to retain the input pulse signal.
[0068] Specifically, in another embodiment, referring to Figure 4 , step S210, i.e., the step of controlling the first acquisition device and the second acquisition device to synchronously collect the pulse signal, includes:
[0069] Step S211, acquiring a sampling threshold corresponding to the first acquisition device 10.
[0070] The sampling threshold of the first acquisition device 10 can be used to compare with the amplitude of the pulse signal to be input. When the amplitude of the pulse signal to be input can exceed the sampling threshold, the pulse signal can be collected by the first acquisition device 10.
[0071] In one embodiment, the first acquisition device 10 includes an MVT acquisition device, and the sampling threshold is the highest sampling threshold of the MVT acquisition device. When the amplitude of the pulse signal can exceed the highest sampling threshold of the MVT acquisition device, the MVT acquisition device can collect the complete waveform of the pulse signal.
[0072] Step S212, setting a comparison threshold according to the sampling threshold.
[0073] When the sampling threshold of the first acquisition device 10 is acquired, a comparison threshold can be set according to the sampling threshold. The comparison threshold can be used to compare the amplitude of the pulse signal before the pulse signal is input to each acquisition device, so as to determine whether the pulse signal can be acquired by the first acquisition device 10.
[0074] In an embodiment, the comparison threshold can be a value greater than the sampling threshold. Since the comparison threshold is greater than the sampling threshold, when the amplitude of the pulse signal is greater than the comparison threshold, the amplitude of the pulse signal can certainly exceed the sampling threshold, that is, it can be determined that the pulse signal can be acquired by the first acquisition device 10. For example, the highest sampling threshold of the MVT acquisition device is 80V, and the comparison threshold can be set to 81V or 85V or 90V or 100V, etc. When the amplitude of the pulse signal to be input is greater than the comparison threshold, it can certainly exceed the highest sampling threshold of the MVT acquisition device, that is, it can be determined that the MVT acquisition device can completely acquire the complete waveform of the current pulse signal to be input.
[0075] Those skilled in the art should understand that the pulse signal that can be successfully acquired by the MVT acquisition device can certainly be acquired by the oscilloscope. Therefore, in the embodiment, the comparison threshold can be determined only according to the sampling threshold of the first acquisition device, that is, it is only necessary to determine whether the pulse signal can be acquired by the first acquisition device.
[0076] Step S213, when the target parameter value of the pulse signal is greater than the comparison threshold, the pulse signal is output to the first acquisition device 10 and the second acquisition device 20, and a trigger signal is output to the second acquisition device 20 to instruct the second acquisition device 20 to retain the currently acquired pulse signal.
[0077] The target parameter value of the pulse signal can include the amplitude of the pulse signal. When it is greater than the comparison threshold, it can be determined that the pulse signal can be acquired by the first acquisition device 10. Therefore, the pulse signal is output to the first acquisition device 10 and the second acquisition device 20, so that the first acquisition device 10 and the second acquisition device 20 acquire the pulse signal. At the same time, a trigger signal is output to the second acquisition device 20. When the second acquisition device 20 receives the trigger signal, the currently acquired pulse signal is retained. In this way, the first acquisition device 10 and the second acquisition device 20 can synchronously acquire the pulse signal at the same time.
[0078] In the embodiment, the target parameter value of the pulse signal can include the amplitude of the pulse signal. Figure 5A comparator 30 can be configured to compare the comparison threshold with the target parameter value of the pulse signal, and when the target parameter value of the pulse signal is greater than the comparison threshold, the pulse signal is synchronously output to the first acquisition device 10 and the second acquisition device 20, and a high-level square wave signal is output to the second acquisition device 20 as a trigger signal. Thus, the first acquisition device 10 and the second acquisition device 20 can synchronously acquire the pulse signal, and the second acquisition device 20 can further retain the acquired pulse signal for subsequent processing.
[0079] In one of the embodiments, referring to Figure 6 , step S400, i.e., the step of obtaining the energy correction function according to the to-be-corrected energy value and the standard energy value of each pulse signal, includes:
[0080] Step S410, obtaining a scatter plot of the to-be-corrected energy value with respect to the standard energy value according to the to-be-corrected energy value and the standard energy value of each pulse signal.
[0081] When the to-be-corrected energy value and the standard energy value of each pulse signal are obtained, the scatter plot of the to-be-corrected energy value with respect to the standard energy value can be established. Specifically, referring to Figure 7 , the X-axis can represent the to-be-corrected energy value of each pulse signal, and the Y-axis can represent the standard energy value of each pulse signal. One pulse signal corresponds to one X value and one Y value, denoted as coordinate (X, Y). A plurality of pulse signals acquired can form a set (X i , Y i ), (X i , Y i ) is the combination of the to-be-corrected energy value and the standard energy value of the i-th pulse signal sampled, where i is a positive integer less than or equal to the total number of pulse signals acquired. Drawing each point (X i , Y i ) in a two-dimensional coordinate system can obtain the scatter plot of the to-be-corrected energy value with respect to the standard energy value of each pulse signal.
[0082] Step S420, obtaining the energy correction function according to the distribution rule of each position point in the scatter plot.
[0083] Analyzing each position point in the scatter plot can determine the distribution rule of each position point, and can further determine the mathematical relationship between the to-be-corrected energy value and the standard energy value corresponding to each position point. Thus, the energy correction function can be constructed, and the to-be-corrected energy value can be corrected by the energy correction function to obtain an energy correction value. Ideally, the energy correction value of a pulse signal is the standard energy value of the pulse signal. However, considering that errors are inevitable in actual applications, the energy correction value obtained after correction by the energy correction function can have some errors.
[0084] In one embodiment, referring to Figure 8 , step S420, the step of obtaining the energy correction function according to the distribution of the position points in the scatter plot comprises:
[0085] Step S421, extracting several target position points in the scatter plot.
[0086] The target position points can include several trend points in the scatter plot. The trend of each position point can be clearly seen from the scatter plot, and to simplify the correction process, the main trend points in the scatter plot can be extracted according to the trend of each position point.
[0087] The method of extracting the trend points can use the method of extracting the center of gravity, that is, the coordinates of several center of gravity points corresponding to different positions of the horizontal coordinates in the scatter plot are calculated. Specifically, the horizontal coordinates can be divided into several parts, the average value of the horizontal coordinates of all points in each part can be calculated, that is, the horizontal coordinates of the center of gravity point in each part, and the average value of the vertical coordinates of all points in each part can be calculated, that is, the vertical coordinates of the center of gravity point in each part, thereby obtaining the horizontal and vertical coordinates of the center of gravity point in each part, that is, extracting several center of gravity points in the scatter plot as the trend points. For example, the total length of the horizontal coordinates is X, which is divided into N parts, X=1000, N=500, then the length of each part is 2, the first part is 0-2, the second part is 2-4, the third part is 4-6, and so on. Assuming that there are 100 points in the range of 0-2, the average value of the horizontal coordinates and the average value of the vertical coordinates of the 100 points are calculated to obtain the center of gravity point coordinates in the range of 0-2. In this way, the coordinates of 500 center of gravity points can be obtained, that is, 500 center of gravity points are obtained as the trend points of the scatter plot.
[0088] The method of extracting the trend points can also use the method of extracting the center, and since the center of the scatter plot in this embodiment is the same as the center of gravity, the method of extracting the center is the same as the method of extracting the center of gravity, which will not be described here.
[0089] In another embodiment, the target position points can include all points in the scatter plot, that is, all points in the scatter plot are directly extracted for subsequent function determination.
[0090] Step S422, solving an n-th order function according to the coordinates of the several target position points, where n is a natural number excluding 0, to obtain a fitting function.
[0091] For example, when several target position points are extracted, a first-order function can be tried to solve to obtain a first-order fitting function.
[0092] Specifically, a straight line equation y=kx+b can be fitted, where x is the energy value to be corrected corresponding to the first acquisition device, and y is the corrected value after correction.
[0093] The coordinates of the target position points obtained are substituted into the straight line equation, and the values of k and b are solved, and a linear function is solved as the fitting function.
[0094] In step S423, it is verified whether the fitting function meets the preset requirement. If not, the n-th order function is adjusted to an (n+1)-th order function, until the fitting parameters obtained meet the preset requirement, and the fitting function finally meeting the preset requirement is taken as the energy correction function.
[0095] After the fitting function is preliminarily determined, it can be verified, that is, the correction accuracy of the fitting function is judged. If the accuracy meets the preset requirement, the fitting function is directly taken as the energy correction function without adjustment. If the accuracy does not meet the preset requirement, the fitting function needs to be further adjusted, that is, the n-th order function is adjusted to an (n+1)-th order function, and the (n+1)-th order function is solved, and the (n+1)-th order function is verified again, until the fitting function meeting the requirement is obtained, which is taken as the energy correction function.
[0096] In one embodiment, with reference to Figure 9 , step S423, that is, verifying whether the fitting function meets the preset requirement, if not, adjusting the n-th order function to an (n+1)-th order function, until the fitting function obtained meets the preset requirement, and the fitting function finally meeting the preset requirement is taken as the energy correction function, comprises:
[0097] In step S423a, the error amount of the fitting function is determined according to the to-be-corrected energy values and the standard energy values corresponding to each position point in the scatter plot.
[0098] The error amount of the fitting function can be the error amount between the corrected values after correction by the fitting function and the standard energy values. Specifically, a plurality of position points in the scatter plot can be randomly selected, and the to-be-corrected energy values of each position point in the scatter plot are corrected by the fitting function to obtain the corrected values, that is, the to-be-corrected energy values of each position point, that is, each pulse signal, are substituted into the fitting function to obtain the corrected values, and then the corrected values corresponding to each position point are compared with the standard energy values, and the error amount of the fitting function is determined according to the comparison result. Specifically, the correction error values (that is, the difference between the corrected values and the standard energy values) corresponding to each position point can be obtained, and the error amount of the fitting function can be determined according to the correction error values of each position point.
[0099] In one embodiment, the maximum value in the correction error values of each position point can be screened out as the error amount of the fitting function.
[0100] For example, the linear function is solved as y = 0.8x + 0.3, x is the energy value to be corrected, and y is the corrected value obtained after correction. It is assumed that four points existing in the scatter plot are extracted, and the coordinates are (1, 1.5), (3, 3.5), (6, 5.5), and (10, 9.5). The x coordinates of the four points are substituted into the x of the linear function, and the y values obtained are 1.1, 2.7, 5.1, and 8.3, respectively. It can be seen that each y value (i.e., the corrected value) and the y coordinate (i.e., the standard energy value) of each point in the scatter plot differ, and the error values are 0.4, 0.8, 0.4, and 1.7, respectively. The maximum error value is 1.7, that is, the error amount of the fitting function is 1.7.
[0101] In step S423b, if the error amount exceeds the allowed range, a (n+1)th order function is solved according to the coordinates of the target position points to obtain a new fitting function. This is iterated until the error amount of the fitting function is within the allowed range.
[0102] After obtaining the error amount of the fitting function, it is determined whether the error amount exceeds the allowed range. In the above example, it is assumed that the allowed range of the error is 0-1.5. The error amount 1.7 of the fitting function exceeds the allowed range 0-1.5, and thus it is considered that the accuracy of the fitting function does not meet the requirements. The linear function cannot be used as the energy correction function, and a quadratic function needs to be solved.
[0103] The equation of the quadratic function is y = ax 2 +cx+d. Similar to the method of solving the linear function, the coordinates of the target position points obtained from the scatter plot are substituted into the equation of the quadratic function to solve the values of a, b, and c, and then the quadratic function is solved to serve as the fitting function. The accuracy of the fitting function is verified by the above verification method, which is not described herein again. If the accuracy meets the requirements, the fitting function is used as the energy correction function. If the accuracy does not meet the requirements, a cubic function is further solved, and this is iterated until the accuracy meets the requirements. The fitting function finally meeting the preset requirements is used as the energy correction function.
[0104] In this embodiment, the allowed range of the error can be set according to actual requirements. For example, in the logging scene, the allowed range of the error can be within one energy channel address when the total energy channel address is 256. If the error amount exceeds one energy channel address, the fitting function needs to be adjusted.
[0105] It should be understood that although the steps in the flowcharts involved in the above embodiments are shown in sequence according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above embodiments can include multiple steps or multiple stages, which are not necessarily executed at the same time but can be executed at different times, and the execution of the steps or stages is not necessarily sequential but can be performed alternately or alternately with at least part of other steps or stages.
[0106] Based on the same inventive concept, another embodiment of the present application also provides an energy correction device for implementing the above-mentioned energy correction method. The implementation scheme for solving the problem provided by the energy correction device is similar to the implementation scheme described in the above method, so the specific limitations in one or more energy correction device embodiments provided below can refer to the limitations of the energy correction method described above, which will not be repeated here.
[0107] Referring to Figure 10 The energy correction device provided by the embodiment includes a first acquisition module 200, a second acquisition module 400, and a correction module 600. Wherein:
[0108] The first acquisition module 200 is configured to synchronously collect pulse signals and respectively acquire the to-be-corrected energy value and the standard energy value of each pulse signal.
[0109] The second acquisition module 400 is configured to acquire an energy correction function according to the to-be-corrected energy value and the standard energy value of each pulse signal.
[0110] The correction module 600 is configured to correct the to-be-corrected energy value of each pulse signal based on the energy correction function.
[0111] In one embodiment, to achieve synchronous collection of pulse signals and respectively acquire the to-be-corrected energy value and the standard energy value of each pulse signal, the first acquisition module 200 is further configured to: control the first acquisition device and the second acquisition device to synchronously collect pulse signals; acquire the energy value of each pulse signal collected by the first acquisition device to obtain the to-be-corrected energy value, and acquire the energy value of each pulse signal collected by the second acquisition device to obtain the standard energy value.
[0112] In one embodiment, the first acquisition device is configured to output a trigger signal to the second acquisition device when the current pulse signal collection is completed, to instruct the second acquisition device to retain the currently collected pulse signal.
[0113] In one of the embodiments, the energy correction device further comprises a comparison unit configured to obtain a sampling threshold corresponding to the first acquisition device and set a comparison threshold according to the sampling threshold; when the target parameter value of the pulse signal is greater than the comparison threshold, output the pulse signal to the first acquisition device and the second acquisition device, and output a trigger signal to the second acquisition device to instruct the second acquisition device to retain the currently acquired pulse signal.
[0114] In one of the embodiments, the comparison threshold is greater than the sampling threshold.
[0115] In one of the embodiments, the first acquisition device comprises an MVT acquisition device, and the sampling threshold is the highest sampling threshold of the MVT acquisition device.
[0116] In one of the embodiments, the second acquisition device comprises an oscilloscope.
[0117] In one of the embodiments, to obtain an energy correction function according to the to-be-corrected energy value and the standard energy value of each pulse signal, the second obtaining module 400 is configured to obtain a scatter plot of the to-be-corrected energy value with respect to the standard energy value of each pulse signal according to the to-be-corrected energy value and the standard energy value of each pulse signal; and obtain the energy correction function according to the distribution law of each position point in the scatter plot.
[0118] In one of the embodiments, the second obtaining module 400 further comprises an extracting unit, a solving unit and a verifying unit, wherein the extracting unit is configured to extract a plurality of target position points in the scatter plot; the solving unit is configured to solve an n-th function according to the coordinates of the plurality of target position points, wherein n is a natural number excluding 0, to obtain a fitting function; and the verifying unit is configured to verify whether the fitting function meets a preset requirement, and if not, adjust the fitting function until the fitting function meets the preset requirement, so as to take the fitting function meeting the preset requirement as the energy correction function.
[0119] In one of the embodiments, the target position points comprise a plurality of trend points in the scatter plot, and the plurality of trend points comprise a plurality of gravity points or center points corresponding to different positions in the horizontal coordinates of the scatter plot.
[0120] In one of the embodiments, the target position points comprise all points in the scatter plot.
[0121] In one of the embodiments, the verification unit is further configured to: determine the error amount of the fitting function according to the to-be-corrected energy value and the standard energy value corresponding to each position point in the scatter plot; and if the error amount exceeds an allowed range, continue to solve the n+1 order function according to the coordinates of the target position point to obtain a new fitting function, and so on until the error amount of the fitting function is within the allowed range.
[0122] In one of the embodiments, to determine the error amount of the fitting function according to the to-be-corrected energy value and the standard energy value corresponding to each position point in the scatter plot, the verification unit is further configured to: correct the to-be-corrected energy value of each position point in the scatter plot through the fitting function to obtain a corrected value; compare the corrected value corresponding to each position point with the standard energy value; and determine the error amount of the fitting function according to the comparison result.
[0123] The modules in the energy correction device described above can be realized by software, hardware, and combinations thereof, in whole or in part. The modules described above can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the modules.
[0124] In one embodiment, a detection device is provided, which can include any component for implementing the energy correction device described in the foregoing embodiments of the present application. For example, the detection device can be implemented by hardware, software programs, firmware, or combinations thereof.
[0125] In one embodiment, an electronic device is provided, which includes a memory and a processor. The memory stores a computer program, and the processor implements the steps in the method embodiments described above when executing the computer program.
[0126] Figure 11 A structural schematic diagram of an electronic device provided in an embodiment of the present application is shown in FIG. 1. The electronic device can be a server, and its internal structure diagram can be as shown in FIG. 1. The electronic device includes a processor, a memory, and a network interface connected through a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the electronic device is used to store various types of data involved in the energy correction method. The network interface of the electronic device is used to communicate with external terminals through network connection. The computer program is executed by the processor to implement an energy correction method. Figure 11
[0127] Those skilled in the art can understand that, Figure 11 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0128] In one embodiment, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.
[0129] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, the processes of the above-mentioned embodiments can be included. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0130] Any combination of the technical features of the above-mentioned embodiments can be made. In order to make the description concise, all possible combinations of the technical features in the above-mentioned embodiments are not described, but as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0131] The above-mentioned embodiments only express several embodiments of the present application, which are described in detail and specifically, but should not be understood as a limitation on the scope of the patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.
Claims
1. An energy correction method, characterized by, The energy correction method comprises: synchronously collecting pulse signals and obtaining a to-be-corrected energy value and a standard energy value of each pulse signal respectively, so as to ensure that the to-be-corrected energy value corresponding to the first acquisition device and the standard energy value corresponding to the second acquisition device correspond to the pulse signals of the same time; obtaining an energy correction function according to the to-be-corrected energy value and the standard energy value of each pulse signal; correcting the to-be-corrected energy value of each pulse signal based on the energy correction function.
2. The energy correction method of claim 1, wherein, The step of synchronously collecting pulse signals and obtaining a to-be-corrected energy value and a standard energy value of each pulse signal respectively comprises: controlling the first acquisition device and the second acquisition device to synchronously collect pulse signals; obtaining the energy value of each pulse signal collected by the first acquisition device to obtain a to-be-corrected energy value, and obtaining the energy value of each pulse signal collected by the second acquisition device to obtain a standard energy value.
3. The energy correction method of claim 2, wherein, The step of controlling the first acquisition device and the second acquisition device to synchronously collect pulse signals comprises: when the first acquisition device finishes collecting the current pulse signal, outputting a trigger signal to the second acquisition device to instruct the second acquisition device to retain the current collected pulse signal.
4. The energy correction method of claim 2, wherein, The step of controlling the first acquisition device and the second acquisition device to synchronously collect pulse signals comprises: obtaining a sampling threshold value corresponding to the first acquisition device; setting a comparison threshold value according to the sampling threshold value; when the target parameter value of the pulse signal is greater than the comparison threshold value, outputting the pulse signal to the first acquisition device and the second acquisition device, and outputting a trigger signal to the second acquisition device to instruct the second acquisition device to retain the current collected pulse signal.
5. The energy correction method of claim 4, wherein, The comparison threshold value is greater than the sampling threshold value.
6. The energy correction method of claim 4, wherein, The first acquisition device comprises an MVT acquisition device, and the sampling threshold value is the highest sampling threshold value of the MVT acquisition device.
7. The energy correction method according to any one of claims 2-6, characterized in that, The second acquisition device comprises an oscilloscope.
8. The energy correction method of claim 1, wherein, The step of obtaining an energy correction function according to the to-be-corrected energy value and the standard energy value of each pulse signal comprises: obtaining a scatter plot of the to-be-corrected energy value with respect to the standard energy value according to the to-be-corrected energy value and the standard energy value of each pulse signal; obtaining an energy correction function according to the distribution law of each position point in the scatter plot.
9. The energy correction method of claim 8, wherein, The step of obtaining an energy correction function according to the distribution law of each position point in the scatter plot comprises: extracting a plurality of target position points in the scatter plot; solving an n-th function according to the coordinates of the plurality of target position points, wherein n is a natural number excluding 0, to obtain a fitting function; verifying whether the fitting function meets a preset requirement, and if not, adjusting the n-th function to an n+1-th function until the obtained fitting function meets the preset requirement, and taking the fitting function finally meeting the preset requirement as the energy correction function.
10. The energy correction method of claim 9, wherein, The target position points comprise a plurality of trend points in the scatter plot, and the plurality of trend points comprise a plurality of gravity points or center points corresponding to different positions in the horizontal coordinates in the scatter plot.
11. The energy correction method of claim 9, wherein, The target position points comprise all points in the scatter plot.
12. The energy correction method of claim 9, wherein, The step of verifying whether the fitting function meets the preset requirement, and if not, adjusting the n-th order function to an n+1-th order function until the fitting function meets the preset requirement, so as to take the fitting function meeting the preset requirement as the energy correction function comprises: According to the to-be-corrected energy value and the standard energy value corresponding to each position point in the scatter plot, the error amount of the fitting function is determined; If the error amount exceeds the allowable range, the n+1-th order function is continuously solved according to the coordinates of the target position point to obtain a new fitting function, and the process is repeated until the error amount of the fitting function is within the allowable range.
13. The energy correction method of claim 12, wherein, The step of determining the error amount of the fitting function according to the to-be-corrected energy value and the standard energy value corresponding to each position point in the scatter plot comprises: The to-be-corrected energy value of each position point in the scatter plot is corrected by the fitting function to obtain a corrected value; The corrected value corresponding to each position point is compared with the standard energy value; According to the comparison result, the error amount of the fitting function is determined.
14. An energy correction device, characterized by The energy correction device comprises: The first acquisition module is configured to synchronously acquire pulse signals and acquire to-be-corrected energy values and standard energy values of the pulse signals respectively, so as to ensure that the to-be-corrected energy value corresponding to the first acquisition device and the standard energy value corresponding to the second acquisition device correspond to pulse signals at the same time; The second acquisition module is configured to acquire an energy correction function according to the to-be-corrected energy values and the standard energy values of the pulse signals; The correction module is configured to correct the to-be-corrected energy values of the pulse signals based on the energy correction function.
15. The energy correction device of claim 14, wherein, To realize synchronous acquisition of pulse signals and acquisition of to-be-corrected energy values and standard energy values of the pulse signals respectively, the first acquisition module is further configured to: Control the first acquisition device and the second acquisition device to synchronously acquire pulse signals; Acquire energy values of the pulse signals acquired by the first acquisition device to obtain to-be-corrected energy values, and acquire energy values of the pulse signals acquired by the second acquisition device to obtain standard energy values.
16. The energy correction device of claim 15, wherein, The first acquisition device is configured to output a trigger signal to the second acquisition device when the current pulse signal acquisition is completed, so as to instruct the second acquisition device to retain the currently acquired pulse signal.
17. The energy correction device of claim 15, wherein, The energy correction device further comprises a comparison unit configured to acquire a sampling threshold value corresponding to the first acquisition device and set a comparison threshold value according to the sampling threshold value; when a target parameter value of the pulse signal is greater than the comparison threshold value, the pulse signal is output to the first acquisition device and the second acquisition device, and a trigger signal is output to the second acquisition device to instruct the second acquisition device to retain the currently acquired pulse signal.
18. The energy correction device of claim 17, wherein, The comparison threshold value is greater than the sampling threshold value.
19. The energy correction device of claim 17, wherein, The first acquisition device comprises an MVT acquisition device, and the sampling threshold value is the highest sampling threshold value of the MVT acquisition device.
20. The energy correction device of any of claims 15-19, wherein, The second acquisition device comprises an oscilloscope.
21. The energy correction device of claim 14, wherein, To realize acquisition of an energy correction function according to the to-be-corrected energy values and the standard energy values of the pulse signals, the second acquisition module is configured to: According to the to-be-corrected energy values of the pulse signals and the standard energy values, a scatter plot of the to-be-corrected energy values relative to the standard energy values is obtained; According to the distribution rule of each position point in the scatter plot, an energy correction function is obtained.
22. The energy correction device of claim 21, wherein, The second obtaining module further comprises: an extraction unit configured to extract a plurality of target position points in the scatter plot; a solving unit configured to solve an n-th order function according to the coordinates of the plurality of target position points, where n is a natural number excluding 0, to obtain a fitting function; a verification unit configured to verify whether the fitting function meets a preset requirement, and if not, adjust the n-th order function to an n+1-th order function until the fitting function that meets the preset requirement is obtained, and take the fitting function that finally meets the preset requirement as the energy correction function.
23. The energy correction device of claim 22, wherein, The verification unit is further configured to: determine the error amount of the fitting function according to the to-be-corrected energy values and the standard energy values of each position point in the scatter plot; if the error amount exceeds an allowable range, continue to solve an n+1-th order function according to the coordinates of the target position points to obtain a new fitting function, and so on, until the error amount of the fitting function is within the allowable range.
24. The energy correction device of claim 23, wherein, To achieve the determination of the error amount of the fitting function according to the to-be-corrected energy values and the standard energy values of each position point in the scatter plot, the verification unit is further configured to: correct the to-be-corrected energy values of each position point in the scatter plot by using the fitting function to obtain corrected values; compare the corrected values and the standard energy values corresponding to each position point; determine the error amount of the fitting function according to the comparison result.
25. An electronic device, comprising: It comprises: a memory, a processor, and a computer program stored on the memory and executable on the processor, which, when executed by the processor, implements the steps of the energy correction method according to any one of claims 1 to 13.
26. A detection device, characterized by It comprises: the energy correction device according to any one of claims 14 to 24.
27. A computer-readable storage medium, characterized in that, The computer program is stored on the computer readable storage medium and, when executed by the processor, implements the steps of the energy correction method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Digital PET energy feedback correcting method and system
CN105030263A
Flash pulse digitization method
CN105824817A