Spectral segment optimization method, device, equipment, storage medium, program product

By acquiring plasma spark images and determining spark parameters, and using the spectral optimization model to optimize spectral segments, the problem of large spectral fluctuations of soil samples in LIBS technology is solved, and the accuracy and repeatability of detection results are improved.

CN114528751BActive Publication Date: 2024-10-29TSINGHUA UNIVERSITY
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202111667943.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2024-10-29
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

Among existing spectral analysis technologies, the plasma excited by LIBS technology has low temperature and short life, which results in large fluctuations in the spectrum of soil samples and affects the accuracy and repeatability of detection results.

Method used

By acquiring the plasma spark image of the sample under the action of laser, the spark parameters are determined, and the spectral fragments, spark parameters and laser spectroscopic energy are input into the preset spectrum optimization model to optimize the spectral fragments and reduce fluctuations.

Benefits of technology

The accuracy and repeatability of soil sample detection results are improved, and the fluctuation of spectral fragments is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114528751B_ABST
    Figure CN114528751B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, device, equipment, storage medium, and program product for optimizing spectral segments, which relate to spectral analysis technology, including: obtaining a first spark image, a second spark image, and a spectrum to be detected of a sample plasma; determining spark parameters based on the first spark image and the second spark image; intercepting spectral segments corresponding to each preset element in the spectrum to be detected; inputting the spectral segments, spark parameters, and spectral energy of the preset elements into a preset spectral optimization model corresponding to the preset elements to obtain optimized spectral segments corresponding to the spectral segments. In this solution, spark parameters can be obtained based on the first spark image and the second spark image, and spectral segments, spark parameters, and spectral energy of the laser can be input into a preset spectral optimization model to obtain optimized spectral segments. The fluctuation of the optimized spectral segments obtained by this solution is reduced, which can improve the accuracy and repeatability of soil sample detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to spectral analysis technology, and in particular to a method, device, equipment, storage medium, and program product for optimizing spectral fragments. Background Art

[0002] Laser Induced Breakdown Spectroscopy (LIBS) refers to a method in which ultrashort pulse lasers are focused on the sample surface to form plasma, and then the plasma emission spectrum is analyzed to determine the material composition and content of the sample. LIBS is of great significance for the large-scale, multi-sample, rapid and accurate detection of soil elements.

[0003] However, due to the low temperature and short life of the plasma excited by the LIBS technology, the spectrum of the soil sample obtained has large fluctuations, which affects the accuracy and repeatability of the soil sample detection results. In the prior art, in order to solve the problem of large fluctuations in the spectrum, the commonly used methods for optimizing the spectrum include A20 average normalization method, full spectrum integral normalization method, Fe404.58 internal standard normalization method, SNV normalization method, etc. The existing method for optimizing the spectrum is used to process the spectrum fragments corresponding to the preset elements to obtain the optimized spectrum fragments. Among them, the spectrum fragments are fragments intercepted from the spectrum.

[0004] However, the relative standard deviation of the characteristic spectral lines of the preset elements calculated for the optimized spectral segments obtained by the above method is relatively large, indicating that the optimized spectral segments obtained by the existing spectrum optimization method still have large fluctuations. Summary of the invention

[0005] The present disclosure provides a method, device, equipment, storage medium, and program product for optimizing a spectrum segment to solve the problem in the prior art that the optimized spectrum obtained by the existing spectrum optimization method still has large fluctuations.

[0006] According to a first aspect of the present disclosure, a method for optimizing a spectrum segment is provided, comprising:

[0007] Acquire a first spark image, a second spark image, and a spectrum to be detected of plasma generated by the sample under the action of the laser; wherein the first spark image is an image of the plasma acquired in a first direction, and the second spark image is an image of the plasma acquired in a second direction;

[0008] Determining spark parameters of the sample according to the first spark image and the second spark image;

[0009] In the spectrum to be detected, a spectrum segment corresponding to each preset element is intercepted; wherein the sample includes the preset element;

[0010] Inputting the spectrum fragment of the preset element, the spark parameter, and the spectral energy of the laser into a preset spectrum optimization model corresponding to the preset element to obtain an optimized spectrum fragment corresponding to the spectrum fragment;

[0011] The spectrum optimization model is obtained by training using the spectrum of the training sample, the spectral energy of the laser used when collecting the spectrum of the training sample, and the spark parameters corresponding to the training sample.

[0012] According to a second aspect of the present disclosure, a model training method is provided, comprising:

[0013] Acquire a training data set; wherein the training data set includes multiple sets of training data, and the training data includes a first spectral segment, a second spectral segment obtained through multiple first spectral segments, and spark parameters and laser spectroscopic energy; wherein the laser spectroscopic energy is used to characterize the energy of the laser used when collecting the first spectral segment of the sample;

[0014] Inputting the first spectrum segment, spark parameters and laser spectroscopic energy in the training data into a preset model to obtain a predicted spectrum segment;

[0015] According to the second spectrum segment and the predicted spectrum segment, the parameters in the preset model are optimized to obtain the spectrum optimization model.

[0016] According to a third aspect of the present disclosure, there is provided a device for optimizing a spectrum segment, comprising:

[0017] An acquisition unit, used to acquire a first spark image, a second spark image and a spectrum to be detected of the plasma generated by the sample under the action of the laser; wherein the first spark image is an image of the plasma acquired in a first direction, and the second spark image is an image of the plasma acquired in a second direction;

[0018] a spark parameter determination unit, configured to determine the spark parameter of the sample according to the first spark image and the second spark image;

[0019] A spectrum segment determination unit, used for intercepting a spectrum segment corresponding to each preset element in the spectrum to be detected; wherein the sample includes the preset element;

[0020] A spectrum segment optimization unit, used for inputting the spectrum segment of the preset element, the spark parameter, and the spectral energy of the laser into a preset spectrum optimization model corresponding to the preset element to obtain an optimized spectrum segment corresponding to the spectrum segment;

[0021] The spectrum optimization model is obtained by training using the spectrum of the training sample, the spectral energy of the laser used when collecting the spectrum of the training sample, and the spark parameters corresponding to the training sample.

[0022] According to a fourth aspect of the present disclosure, a model training device is provided, comprising:

[0023] An acquisition unit, used for acquiring a training data set; wherein the training data set includes multiple sets of training data, and the training data includes a first spectrum segment, a second spectrum segment obtained through multiple first spectrum segments, and spark parameters and laser spectroscopic energy; wherein the laser spectroscopic energy is used to characterize the energy of the laser used when collecting the first spectrum segment of the sample;

[0024] A predicted spectrum segment determination unit, used for inputting the first spectrum segment, spark parameters and laser spectroscopic energy in the training data into a preset model to obtain a predicted spectrum segment;

[0025] The spectrum optimization model determination unit is used to optimize the parameters in the preset model according to the second spectrum segment and the predicted spectrum segment to obtain the spectrum optimization model.

[0026] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising a memory and a processor; wherein the memory is used to store a computer program; and the processor is used to read the computer program stored in the memory, and execute any one of the methods described in the first aspect and the second aspect according to the computer program in the memory.

[0027] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, any one of the methods described in the first aspect or the second aspect is implemented.

[0028] According to a seventh aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the computer program implements any one of the methods described in the first aspect or the second aspect.

[0029] The present disclosure provides a method, device, equipment, storage medium, and program product for optimizing spectral fragments, comprising: obtaining a first spark image, a second spark image, and a spectrum to be detected of a plasma generated by a sample under the action of a laser; wherein the first spark image is an image of the plasma obtained in a first direction, and the second spark image is an image of the plasma obtained in a second direction; determining the spark parameters of the sample according to the first spark image and the second spark image; in the spectrum to be detected, intercepting a spectral fragment corresponding to each preset element; wherein the sample includes the preset element; inputting the spectral fragment, spark parameter, and spectral energy of the preset element into a preset spectral optimization model corresponding to the preset element to obtain an optimized spectral fragment corresponding to the spectral fragment; wherein the spectral optimization model is trained using the spectrum of the training sample, the spectral energy of the laser used when collecting the spectrum of the training sample, and the spark parameter corresponding to the training sample. The scheme provided by the present disclosure can obtain the spark parameters of the sample according to the first spark image and the second spark image of the plasma generated by the sample under the action of the laser, and can input the spectrum fragments, spark parameters, and the spectral energy of the laser into the preset spectrum optimization model to obtain the optimized spectrum fragments. The fluctuation of the optimized spectrum fragments obtained by this scheme is reduced, which can improve the accuracy and repeatability of the soil sample detection results. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 A schematic diagram of an application scenario of a spectrum segment optimization method according to an exemplary embodiment of the present disclosure;

[0031] Figure 2 A schematic flow chart of a method for optimizing a spectrum segment according to an exemplary embodiment of the present disclosure;

[0032] Figure 3 A schematic flow chart of a method for optimizing a spectrum segment according to another exemplary embodiment of the present disclosure;

[0033] Figure 4 A flowchart of a model training method according to an exemplary embodiment of the present disclosure is shown;

[0034] Figure 5 A flowchart of a model training method according to another exemplary embodiment of the present disclosure is shown;

[0035] Figure 6 A structural diagram of a device for optimizing spectrum fragments shown as an exemplary embodiment of the present disclosure;

[0036] Figure 7 A structural diagram of a model training device shown as an exemplary embodiment of the present disclosure;

[0037] Figure 8The present invention is a structural diagram of an electronic device according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0038] Laser Induced Breakdown Spectroscopy (LIBS) refers to a method in which ultrashort pulse lasers are focused on the sample surface to form plasma, and then the plasma emission spectrum is analyzed to determine the material composition and content of the sample. LIBS is of great significance for the large-scale, multi-sample, rapid and accurate detection of soil elements.

[0039] However, due to the low temperature and short life of the plasma excited by the LIBS technology, the spectrum of the soil sample obtained has large fluctuations, which affects the accuracy and repeatability of the soil sample detection results. In the prior art, in order to solve the problem of large fluctuations in the spectrum, the commonly used methods for optimizing the spectrum include A20 average normalization method, full spectrum integral normalization method, Fe404.58 internal standard normalization method, SNV normalization method, etc. The existing method for optimizing the spectrum is used to process the spectrum fragments corresponding to the preset elements to obtain the optimized spectrum fragments. Among them, the spectrum fragments are fragments intercepted from the spectrum.

[0040] However, the relative standard deviation of the characteristic spectral lines of the preset elements calculated for the optimized spectral segments obtained by the above method is relatively large, indicating that the optimized spectral segments obtained by the existing spectrum optimization method still have large fluctuations.

[0041] In order to solve the above technical problems, the solution provided by the present disclosure includes a method for optimizing spectral fragments, which can obtain the spark parameters of the sample according to the first spark image and the second spark image of the plasma generated by the sample under the action of the laser, and can input the spectral fragments, spark parameters, and the spectral energy of the laser into a preset spectral optimization model to obtain the optimized spectral fragments. The fluctuation of the optimized spectral fragments obtained by this solution is reduced, which can improve the accuracy and repeatability of the soil sample detection results.

[0042] Figure 1 A schematic diagram of an application scenario of a method for optimizing spectral fragments shown in an exemplary embodiment of the present disclosure.

[0043] like Figure 1 As shown, this scheme needs to monitor the laser energy and plasma flame morphology each time the laser excites the plasma while realizing the basic functions of LIBS.

[0044] The system uses a laser to emit laser light, wherein the laser can be configured as follows: wavelength 1064nm, output energy 200mJ, pulse width 10ns, spot diameter 8mm, divergence angle less than 3mrad, and pointing stability less than 50μrad. Computer module 2 can control the laser to emit laser light. The laser can be coated with a Gaussian film layer on the light-emitting lens to make the laser spot energy present a Gaussian distribution. The pulsed light emitted by the laser can first pass through a 45° beam splitting sampling mirror, which can reflect about 1% of the laser's split energy to the energy meter to record the laser energy. Computer module 1 can obtain the split energy of the laser recorded by the energy meter. Most of the remaining laser light can pass through a UV fused quartz focusing lens with a focal length of 150mm and a clear aperture of 25mm, and then pass through a dichroic mirror to change direction and vertically incident on the sample surface on the sample stage, so that the sample converges to excite plasma.

[0045] The dichroic mirror can be pre-designed to have a reflectivity of >99.9% for 1064nm laser at a 45° angle. The weak laser light passing through the dichroic mirror can trigger the photoelectric switch to provide a trigger signal for camera 1 and camera 2. Camera 1 and camera 2 can respectively collect the first spark image and the second spark image of the plasma flame morphology excited by the sample, and send the collected images to computer module 1. Camera 1 can be placed perpendicular to the sample surface; camera 2 can be placed parallel to the sample surface. Plasma radiation light can be coupled into the optical fiber through a double-tube structure with an object focal length of 40mm and connected to a spectrometer. The spectrum of plasma radiation light excited by the sample collected by the spectrometer can be transmitted to computer module 2 through a sensor, and computer module 2 can send the obtained spectrum to computer module 1. The spectrometer can be dual-channel, its response band can be 230-450nm, and its resolution can be 0.1nm.

[0046] The computer module 1 can process the obtained spectrum, the spectral energy of the laser, the first spark image, and the second spark image according to the preset elements, and input the processed data into the preset spectrum optimization model corresponding to the preset elements to obtain the optimized spectrum fragment.

[0047] Figure 2 A schematic flow chart of a method for optimizing spectral segments according to an exemplary embodiment of the present disclosure.

[0048] like Figure 2 As shown, the optimization method of the spectrum fragment provided in this embodiment includes:

[0049] Step 201, obtaining a first spark image, a second spark image and a spectrum to be detected of plasma generated by a sample under the action of a laser; wherein the first spark image is an image of the plasma obtained in a first direction, and the second spark image is an image of the plasma obtained in a second direction.

[0050] The method provided in the present disclosure may be executed by an electronic device with specific computing capabilities, such as a computer or other device.

[0051] The electronic device can acquire a first spark image, a second spark image and a spectrum to be detected.

[0052] The sample may be a soil sample to be tested.

[0053] Among them, a laser can be used to emit laser light. The laser can be vertically incident on the surface of the sample, so that the sample converges to excite plasma, thereby exciting the sample to emit light. A camera can be used to capture an image of the plasma flame morphology. A spectrometer can be used to capture the spectrum of plasma radiation light, which is the spectrum to be detected.

[0054] Among them, plasma is the fourth state of matter, different from solid, liquid and gas. Matter is composed of molecules, molecules are composed of atoms, and atoms are composed of positively charged nuclei and negatively charged electrons surrounding them. When heated to a high enough temperature or for other reasons, the outer electrons break free from the constraints of the nucleus and become free electrons. The process of electrons leaving the nucleus is called "ionization". At this time, the matter becomes a uniform "paste" composed of positively charged nuclei and negatively charged electrons, so it is called ion plasma. The total amount of positive and negative charges in these ion plasmas is equal, so it is approximately electrically neutral, so it is called plasma.

[0055] Specifically, a first spark image of the plasma flame morphology can be obtained by using a pre-set camera 1; and a second spark image of the plasma flame morphology can be obtained by using a pre-set camera 2. The first direction can be a direction perpendicular to the sample surface. Camera 1 can be placed in a direction perpendicular to the sample surface. The second direction can be a horizontal direction of the sample surface. Camera 2 can be placed in a horizontal direction of the sample surface.

[0056] Step 202: determining spark parameters of the sample according to the first spark image and the second spark image.

[0057] Specifically, the spark parameters of the sample may include spark area and spark intensity. For each spark image of the sample, the spark area and spark intensity of the spark image may be determined, thereby obtaining multiple sets of spark area and spark intensity data of the sample.

[0058] In this solution, the first spark area and the first spark intensity can be obtained according to the first spark image, and the second spark area and the second spark intensity can be obtained according to the second spark image.

[0059] Specifically, the first spark image may be processed to obtain an image boundary of the first spark image, which is recorded as the first spark boundary. Similarly, the second spark image may be processed to obtain an image boundary of the second spark image, which is recorded as the second spark boundary.

[0060] Specifically, according to the first spark image and the first spark boundary, the total number of pixels of the first spark image within the first spark boundary can be determined, recorded as the first spark area; the sum of the intensities of the pixels of the first spark image within the first spark boundary can be determined, recorded as the first spark intensity.

[0061] Similarly, the total number of pixels of the second spark image within the second spark boundary can be determined based on the second spark image and the second spark boundary, recorded as the second spark area; the sum of the intensities of the pixels of the second spark image within the second spark boundary can be determined, recorded as the second spark intensity.

[0062] Specifically, the spark parameters of the sample may include a first spark area, a first spark intensity, a second spark area, and a second spark intensity.

[0063] Step 203: intercepting a spectrum segment corresponding to each preset element in the spectrum to be detected; wherein the sample includes the preset elements.

[0064] The preset elements are the elements that need to be detected in the sample to be detected.

[0065] The sample may include elements such as aluminum, silicon, and zinc. Each element will generate a spectrum with a wavelength corresponding to the element. The spectrum segment corresponding to the preset element can be intercepted from the spectrum to be detected according to the wavelength of the preset element. For example, the wavelength of the spectrum generated by the aluminum element may include 260.85nm. The spectrum segment near 260.85nm can be intercepted.

[0066] Step 204, inputting the spectral fragments, spark parameters, and spectral energy of the preset elements into a preset spectral optimization model corresponding to the preset elements, to obtain optimized spectral fragments corresponding to the spectral fragments; wherein the spectral optimization model is trained using the spectrum of the training sample, the spectral energy of the laser used when collecting the spectrum of the training sample, and the spark parameters corresponding to the training sample.

[0067] The spectral energy of the laser may be the spectral energy of the laser that excites the sample collected by the energy meter. The spectral energy of the laser may be a portion of the laser energy, such as one percent. The spectral energy of the laser may be used to characterize the laser energy. The energy meter may send the spectral energy of the laser to the electronic device, so that the electronic device can obtain the spectral energy of the laser corresponding to each first spark image and the second spark image.

[0068] Specifically, the spectrum fragments, spark parameters, and spectral energy of the laser are data obtained when the laser is used to process the sample once.

[0069] The preset spectrum optimization model is obtained by pre-training using the spectrum of the training sample, the spectral energy of the laser used when collecting the spectrum of the training sample, and the spark parameters corresponding to the training sample.

[0070] Specifically, different preset elements correspond to different preset spectrum optimization models.

[0071] The optimization method of spectral fragments provided by the present disclosure includes: obtaining a first spark image, a second spark image and a spectrum to be detected of a plasma generated by a sample under the action of a laser; wherein the first spark image is an image of the plasma obtained in a first direction, and the second spark image is an image of the plasma obtained in a second direction; determining the spark parameters of the sample according to the first spark image and the second spark image; intercepting the spectral fragments corresponding to each preset element in the spectrum to be detected; wherein the sample includes the preset element; inputting the spectral fragments, spark parameters and spectral energy of the preset element into a preset spectral optimization model corresponding to the preset element to obtain an optimized spectral fragment corresponding to the spectral fragment; wherein the spectral optimization model is trained using the spectrum of the training sample, the spectral energy of the laser used when collecting the spectrum of the training sample, and the spark parameters corresponding to the training sample. The scheme provided by the present disclosure can obtain the spark parameters of the sample according to the first spark image and the second spark image of the plasma generated by the sample under the action of the laser, and can input the spectral fragments, spark parameters and spectral energy of the laser into the preset spectral optimization model to obtain the optimized spectral fragments. The fluctuation of the optimized spectral fragments obtained by this scheme is reduced, which can improve the accuracy and repeatability of soil sample detection results.

[0072] Figure 3 A schematic flow chart of a method for optimizing spectral segments according to another exemplary embodiment of the present disclosure.

[0073] like Figure 3 As shown, the optimization method of the spectrum fragment provided in this embodiment includes:

[0074] Step 301, obtaining a first spark image, a second spark image and a spectrum to be detected of plasma generated by a sample under the action of a laser; wherein the first spark image is an image of the plasma obtained in a first direction, and the second spark image is an image of the plasma obtained in a second direction.

[0075] Specifically, the principle and implementation of step 301 are similar to those of step 201 and will not be described in detail.

[0076] Step 302, obtaining a first spark boundary in the first spark image, determining a first spark area and a first spark intensity according to the first spark boundary and the first spark image; obtaining a second spark boundary in the second spark image, determining a second spark area and a second spark intensity according to the second spark boundary and the second spark image. The spark parameters include the first spark area, the first spark intensity, the second spark area, and the second spark intensity.

[0077] Specifically, the spark parameters of the sample may include spark area and spark intensity. For each spark image of the sample, the spark area and spark intensity of the spark image may be determined, thereby obtaining multiple sets of spark area and spark intensity data of the sample.

[0078] In this solution, the first spark area and the first spark intensity can be obtained according to the first spark image, and the second spark area and the second spark intensity can be obtained according to the second spark image.

[0079] Specifically, the first spark image can be processed using an adaptive binarization method to obtain a processed result, and the largest neighborhood is selected from the processed result, and stray light spots are removed to obtain a first spark boundary. Similarly, the second spark image can be processed to obtain an image boundary of the second spark image, which is recorded as the second spark boundary.

[0080] Specifically, according to the first spark image and the first spark boundary, the total number of pixels of the first spark image within the first spark boundary can be determined, recorded as the first spark area; the sum of the intensities of the pixels of the first spark image within the first spark boundary can be determined, recorded as the first spark intensity.

[0081] Similarly, the total number of pixels of the second spark image within the second spark boundary can be determined based on the second spark image and the second spark boundary, recorded as the second spark area; the sum of the intensities of the pixels of the second spark image within the second spark boundary can be determined, recorded as the second spark intensity.

[0082] Optionally, the area within the range covered by the first spark image boundary is determined, and the area within the range covered by the first spark image boundary is used to characterize the first spark area; the integral of the spark image intensity within the range covered by the first spark image boundary is determined as the first spark intensity; the area within the range covered by the second spark image boundary is determined, and the area within the range covered by the second spark image boundary is used to characterize the second spark area; the integral of the spark image intensity within the range covered by the second spark image boundary is determined as the second spark intensity.

[0083] In one implementable method, the value of the pixel points within the first spark boundary in the first spark image is set to 1, and the value of the pixel points outside the first spark boundary in the first spark image is set to 0 to obtain a processed image, and the processed image is integrated to obtain an integral result, and the integral result is used to determine the area within the range covered by the first spark image boundary, that is, the total number of pixels of the first spark image within the first spark boundary, which is recorded as the first spark area.

[0084] In one implementable method, the value of the pixel points within the first spark boundary in the first spark image is set to 1, and the value of the pixel points outside the first spark boundary in the first spark image is set to 0 to obtain a processed image, and the integral of the product of the processed image and the first spark image is determined to be the integral of the spark image intensity within the range covered by the first spark image boundary, that is, the sum of the intensities of the pixel points of the first spark image within the first spark boundary, which is recorded as the first spark intensity.

[0085] Likewise, a second spark area and a second spark intensity can be obtained.

[0086] Step 303, obtaining the characteristic spectrum line wavelength point corresponding to the preset element.

[0087] Specifically, each element has a corresponding characteristic spectral line wavelength point. The preset elements and the characteristic spectral line wavelength points corresponding to each element can be summarized into a table and saved in the electronic device. The electronic device can obtain the characteristic spectral line wavelength point corresponding to the preset element from the table when needed.

[0088] For example, the wavelength of the spectrum produced by aluminum element may include 260.85nm.

[0089] Step 304 , intercepting a spectrum in the spectrum to be detected according to the wavelength point of the characteristic spectrum line as a spectrum segment corresponding to the preset element.

[0090] Specifically, the spectrum corresponding to the characteristic spectral line wavelength point can be intercepted in the spectrum to be detected, and the spectra corresponding to the first or last wavelength points of the characteristic spectral line wavelength point can also be intercepted to form spectrum fragments as the spectrum fragments corresponding to the preset elements.

[0091] For example, the wavelength of the spectrum generated by aluminum element may include 260.85nm, and the spectrum fragment near 260.85nm can be intercepted.

[0092] Optionally, a spectrum corresponding to the wavelength point of the characteristic spectrum line and a spectrum corresponding to S points before and after the wavelength point of the characteristic spectrum line are intercepted from the spectrum to be detected.

[0093] Specifically, this solution does not restrict the selection of S.

[0094] Optional, S is 10.

[0095] Step 305, input the spectral fragments, spark parameters, and spectral energy of the preset elements into a preset spectral optimization model corresponding to the preset elements to obtain optimized spectral fragments corresponding to the spectral fragments; wherein the spectral optimization model is trained using the spectrum of the training sample, the spectral energy of the laser used when collecting the spectrum of the training sample, and the spark parameters corresponding to the training sample.

[0096] Specifically, the principle and implementation of step 305 are similar to those of step 204 and will not be described in detail.

[0097] Figure 4 A flowchart of a model training method shown in an exemplary embodiment of the present disclosure.

[0098] like Figure 4 As shown, the training method of the model provided in this embodiment includes:

[0099] Step 401, obtaining a training data set; wherein the training data set includes multiple groups of training data, and the training data includes a first spectral segment, a second spectral segment obtained through multiple first spectral segments, and spark parameters and laser spectroscopic energy; wherein the laser spectroscopic energy is used to characterize the energy of the laser used when collecting the first spectral segment of the sample.

[0100] Specifically, a set of training data can be obtained by laser stimulating a sample once, and multiple sets of training data can be obtained by laser stimulating the sample multiple times in sequence.

[0101] The first spectrum segment is intercepted from the spectrum of the plasma radiation light of the acquired sample. Specifically, the first spectrum can be intercepted from the spectrum according to the characteristic spectrum line wavelength point corresponding to the preset element.

[0102] The laser spectral energy is the spectral energy of the laser collected by an energy meter when collecting the first spectral segment, and is used to characterize the energy of the laser used when collecting the first spectral segment of the sample.

[0103] Specifically, the spark parameters are obtained based on a first spark image and a second spark image of the plasma flame morphology of the sample obtained when collecting the first spectral segment.

[0104] Specifically, the spark parameters of the sample may include spark area and spark intensity. For each spark image of the sample, the spark area and spark intensity of the spark image may be determined, thereby obtaining multiple sets of spark area and spark intensity data of the sample.

[0105] In this solution, the first spark area and the first spark intensity can be obtained according to the first spark image, and the second spark area and the second spark intensity can be obtained according to the second spark image.

[0106] Specifically, the first spark image may be processed to obtain an image boundary of the first spark image, which is recorded as the first spark boundary. Similarly, the second spark image may be processed to obtain an image boundary of the second spark image, which is recorded as the second spark boundary.

[0107] Specifically, according to the first spark image and the first spark boundary, the total number of pixels of the first spark image within the first spark boundary can be determined, recorded as the first spark area; the sum of the intensities of the pixels of the first spark image within the first spark boundary can be determined, recorded as the first spark intensity.

[0108] Similarly, the total number of pixels of the second spark image within the second spark boundary can be determined based on the second spark image and the second spark boundary, recorded as the second spark area; the sum of the intensities of the pixels of the second spark image within the second spark boundary can be determined, recorded as the second spark intensity.

[0109] Specifically, the spark parameters may include a first spark area, a first spark intensity, a second spark area, and a second spark intensity.

[0110] Specifically, the second spectrum segment may be obtained by averaging a plurality of first spectrum segments.

[0111] Step 402: input the first spectrum segment, spark parameters and laser spectroscopic energy in the training data into a preset model to obtain a predicted spectrum segment.

[0112] Specifically, a first spectral segment, spark parameters and laser spectroscopic energy in a group of training data may be input into a preset model to obtain a predicted spectral segment corresponding to the first spectral segment of the group.

[0113] Among them, the preset model is a pre-set network model.

[0114] Step 403: Optimize the parameters in the preset model according to the second spectrum segment and the predicted spectrum segment to obtain a spectrum optimization model.

[0115] Specifically, the second spectrum segment corresponding to the first spectrum segment can be used as a label for predicting the spectrum segment, and the preset model can be trained to optimize the parameters in the preset model, so that the predicted spectrum segment is closer and closer to the second spectrum segment. When the preset conditions are met, such as the similarity between the predicted spectrum segment and the second spectrum segment reaches 90%, the training is stopped to obtain the spectrum optimization model.

[0116] Specifically, the spectrum optimization model may output an optimized spectrum segment corresponding to the first spectrum segment.

[0117] Figure 5 A flowchart of a model training method shown in another exemplary embodiment of the present disclosure.

[0118] like Figure 5 As shown, the training method of the model provided in this embodiment includes:

[0119] Step 501, obtaining a first spark image, a second spark image, a spectrum to be detected, and laser spectral energy of a plasma generated by a sample under the action of a laser; wherein the first spark image is an image of the plasma obtained in a first direction, and the second spark image is an image of the plasma obtained in a second direction.

[0120] The sample is a training sample, such as a soil sample.

[0121] Among them, a laser can be used to emit laser light. The laser can be vertically incident on the sample surface, so that the sample converges to excite plasma, thereby exciting the sample to emit light. A camera can be used to capture an image of the plasma flame morphology. A spectrometer can be used to capture the spectrum of plasma radiation, which is the spectrum to be detected.

[0122] The spectral energy of the laser may be the spectral energy of the laser that excites the sample collected by the energy meter. The spectral energy of the laser may be a portion of the laser energy, such as one percent. The spectral energy of the laser may be used to characterize the laser energy. The energy meter may send the spectral energy of the laser to the electronic device, so that the electronic device can obtain the spectral energy of the laser corresponding to each first spark image and the second spark image.

[0123] Specifically, the spectrum to be detected, the spark parameters, and the spectral energy of the laser are data obtained when the sample is processed once using the laser.

[0124] Specifically, a first spark image of the plasma flame morphology can be obtained by using a pre-set camera 1; and a second spark image of the plasma flame morphology can be obtained by using a pre-set camera 2. The first direction can be a direction perpendicular to the sample surface. Camera 1 can be placed in a direction perpendicular to the sample surface. The second direction can be a horizontal direction of the sample surface. Camera 2 can be placed in a horizontal direction of the sample surface.

[0125] Step 502: Determine spark parameters of the sample according to the first spark image and the second spark image.

[0126] Specifically, the spark parameters of the sample may include spark area and spark intensity. For each spark image of the sample, the spark area and spark intensity of the spark image may be determined, thereby obtaining multiple sets of spark area and spark intensity data of the sample.

[0127] In this solution, the first spark area and the first spark intensity can be obtained according to the first spark image, and the second spark area and the second spark intensity can be obtained according to the second spark image.

[0128] Specifically, the first spark image may be processed to obtain an image boundary of the first spark image, which is recorded as the first spark boundary. Similarly, the second spark image may be processed to obtain an image boundary of the second spark image, which is recorded as the second spark boundary.

[0129] Specifically, according to the first spark image and the first spark boundary, the total number of pixels of the first spark image within the first spark boundary can be determined, recorded as the first spark area; the sum of the intensities of the pixels of the first spark image within the first spark boundary can be determined, recorded as the first spark intensity.

[0130] Similarly, the total number of pixels of the second spark image within the second spark boundary can be determined based on the second spark image and the second spark boundary, recorded as the second spark area; the sum of the intensities of the pixels of the second spark image within the second spark boundary can be determined, recorded as the second spark intensity.

[0131] Specifically, the spark parameters of the sample may include a first spark area, a first spark intensity, a second spark area, and a second spark intensity.

[0132] Optionally, a first spark boundary is obtained in the first spark image, and a first spark area and a first spark intensity are determined according to the first spark boundary and the first spark image; a second spark boundary is obtained in the second spark image, and a second spark area and a second spark intensity are determined according to the second spark boundary and the second spark image. The spark parameters include the first spark area, the first spark intensity, the second spark area, and the second spark intensity.

[0133] Specifically, the first spark image can be processed using an adaptive binarization method to obtain a processed result, and the largest neighborhood is selected from the processed result, and stray light spots are removed to obtain a first spark boundary. Similarly, the second spark image can be processed to obtain an image boundary of the second spark image, which is recorded as the second spark boundary.

[0134] Optionally, the area within the range covered by the first spark image boundary is determined, and the area within the range covered by the first spark image boundary is used to characterize the first spark area; the integral of the spark image intensity within the range covered by the first spark image boundary is determined as the first spark intensity; the area within the range covered by the second spark image boundary is determined, and the area within the range covered by the second spark image boundary is used to characterize the second spark area; the integral of the spark image intensity within the range covered by the second spark image boundary is determined as the second spark intensity.

[0135] In one implementable method, the value of the pixel points within the first spark boundary in the first spark image is set to 1, and the value of the pixel points outside the first spark boundary in the first spark image is set to 0 to obtain a processed image, and the processed image is integrated to obtain an integral result, and the integral result is used to determine the area within the range covered by the first spark image boundary, that is, the total number of pixels of the first spark image within the first spark boundary, which is recorded as the first spark area.

[0136] In one implementable method, the value of the pixel points within the first spark boundary in the first spark image is set to 1, and the value of the pixel points outside the first spark boundary in the first spark image is set to 0 to obtain a processed image, and the integral of the product of the processed image and the first spark image is determined to be the integral of the spark image intensity within the range covered by the first spark image boundary, that is, the sum of the intensities of the pixel points of the first spark image within the first spark boundary, which is recorded as the first spark intensity.

[0137] Likewise, a second spark area and a second spark intensity can be obtained.

[0138] Step 503, intercepting a first spectrum segment from the spectrum to be detected; wherein the first spectrum segment corresponds to a preset element; wherein the sample includes the preset element.

[0139] The preset elements are the elements that need to be detected in the sample to be detected.

[0140] The sample may include elements such as aluminum, silicon, and zinc. Each element will generate a spectrum with a wavelength corresponding to the element. The first spectrum segment corresponding to the preset element can be intercepted from the spectrum to be detected according to the wavelength of the preset element. For example, the wavelength of the spectrum generated by the aluminum element may include 260.85nm. The spectrum segment near 260.85nm can be intercepted.

[0141] Optionally, obtaining a characteristic spectrum line wavelength point corresponding to a preset element;

[0142] Specifically, each element has a corresponding characteristic spectral line wavelength point. The preset elements and the characteristic spectral line wavelength points corresponding to each element can be summarized into a table and stored in the electronic device. The electronic device can obtain the characteristic spectral line wavelength point corresponding to the preset element from the table when needed.

[0143] For example, the wavelength of the spectrum produced by aluminum element may include 260.85nm.

[0144] A spectrum is intercepted from the spectrum to be detected according to the wavelength point of the characteristic spectrum line as a first spectrum segment corresponding to the preset element.

[0145] Specifically, the spectrum corresponding to the characteristic spectral line wavelength point can be intercepted in the spectrum to be detected, and the spectra corresponding to the first or last wavelength points of the characteristic spectral line wavelength point can also be intercepted to form spectrum fragments as the first spectrum fragment corresponding to the preset element.

[0146] Optionally, a spectrum corresponding to the wavelength point of the characteristic spectrum line and a spectrum corresponding to S points before and after the wavelength point of the characteristic spectrum line are intercepted from the spectrum to be detected.

[0147] Specifically, this solution does not restrict the selection of S.

[0148] Optional, S is 10.

[0149] Step 504: Determine a second spectrum segment corresponding to the preset element according to a plurality of first spectrum segments corresponding to the same preset element.

[0150] Specifically, a set of training data can be obtained by laser excitation of a sample once. Multiple sets of training data arranged in time can be obtained by laser excitation of the sample multiple times. Each set of training data includes a first spectrum segment.

[0151] The second spectrum segment corresponding to the preset element may be determined according to a plurality of first spectrum segments corresponding to the same preset element and arranged in time.

[0152] Optionally, an average value of N first spectrum segments corresponding to the same preset element is determined as a second spectrum segment corresponding to the preset element.

[0153] Specifically, the N first spectrum segments corresponding to the same preset element may be the current first spectrum segment corresponding to the same preset element and the next N-1 first spectrum segments adjacent to the current spectrum segment. The next N-1 spectrum segments are cycled forward and the first N-1 spectrum segments can be used to calculate the average. This sliding window averaging method is recorded as the A20 averaging method, and the number of spectrum segments used for averaging is recorded as N. This solution does not restrict the selection of N.

[0154] Optional, N is 20.

[0155] Step 505: input the first spectrum segment, spark parameters and laser spectroscopic energy in the training data into a preset model to obtain a predicted spectrum segment.

[0156] Specifically, the principle and implementation of step 505 are similar to those of step 402 and will not be described in detail.

[0157] Step 506: Optimize the parameters in the preset model according to the second spectrum segment and the predicted spectrum segment to obtain a spectrum optimization model.

[0158] Specifically, the principle and implementation of step 506 are similar to those of step 403 and will not be described in detail.

[0159] Figure 6 A structural diagram of a device for optimizing spectral segments shown as an exemplary embodiment of the present disclosure.

[0160] like Figure 6 As shown, the spectral segment optimization device 600 provided by the present disclosure includes:

[0161] An acquisition unit 610 is used to acquire a first spark image, a second spark image, and a spectrum to be detected of the plasma generated by the sample under the action of the laser; wherein the first spark image is an image of the plasma acquired in a first direction, and the second spark image is an image of the plasma acquired in a second direction;

[0162] A spark parameter determination unit 620, configured to determine the spark parameters of the sample according to the first spark image and the second spark image;

[0163] The spectrum segment determination unit 630 is used to intercept the spectrum segment corresponding to each preset element in the spectrum to be detected; wherein the sample includes the preset element;

[0164] The spectral segment optimization unit 640 is used to input the spectral segment of the preset element, the spark parameters, and the spectral energy of the laser into the preset spectral optimization model corresponding to the preset element, so as to obtain the optimized spectral segment corresponding to the spectral segment; wherein the spectral optimization model is trained using the spectrum of the training sample, the spectral energy of the laser used when collecting the spectrum of the training sample, and the spark parameters corresponding to the training sample.

[0165] The spark parameters include a first spark area, a first spark intensity, a second spark area, and a second spark intensity. The spark parameter determination unit 620 is specifically used to obtain a first spark boundary in the first spark image, determine the first spark area and the first spark intensity according to the first spark boundary and the first spark image; obtain a second spark boundary in the second spark image, and determine the second spark area and the second spark intensity according to the second spark boundary and the second spark image.

[0166] The spark parameter determination unit 620 is specifically used to determine the area within the range covered by the first spark image boundary, and the area within the range covered by the first spark image boundary is used to characterize the first spark area; the integral of the spark image intensity within the range covered by the first spark image boundary is determined as the first spark intensity; the area within the range covered by the second spark image boundary is determined, and the area within the range covered by the second spark image boundary is used to characterize the second spark area; the integral of the spark image intensity within the range covered by the second spark image boundary is determined as the second spark intensity.

[0167] The spectrum segment determination unit 630 is specifically used to obtain the characteristic spectrum line wavelength point corresponding to the preset element; and intercept the spectrum in the spectrum to be detected according to the characteristic spectrum line wavelength point as the spectrum segment corresponding to the preset element.

[0168] The spectrum segment determination unit 630 is specifically used to intercept the spectrum corresponding to the characteristic spectrum line wavelength point and the spectrum corresponding to S points before and after the characteristic spectrum line wavelength point in the spectrum to be detected.

[0169] Among them, S is 10.

[0170] Figure 7 A structural diagram of a model training device shown as an exemplary embodiment of the present disclosure.

[0171] like Figure 7 As shown, the training device 700 of the model provided by the present disclosure includes:

[0172] The acquisition unit 710 is used to acquire a training data set; wherein the training data set includes multiple sets of training data, and the training data includes a first spectrum segment, a second spectrum segment obtained by multiple first spectrum segments, and spark parameters and laser spectroscopic energy; wherein the laser spectroscopic energy is used to characterize the energy of the laser used when collecting the first spectrum segment of the sample;

[0173] The predicted spectrum segment determination unit 720 is used to input the first spectrum segment, spark parameters and laser spectroscopic energy in the training data into a preset model to obtain the predicted spectrum segment;

[0174] The spectrum optimization model determination unit 730 is used to optimize the parameters in the preset model according to the second spectrum segment and the predicted spectrum segment to obtain the spectrum optimization model.

[0175] The acquisition unit 710 includes: an acquisition module 711, which is used to acquire a first spark image, a second spark image, a spectrum to be detected, and a laser spectroscopic energy of the plasma generated by the sample under the action of the laser; wherein the first spark image is an image of the plasma acquired in a first direction, and the second spark image is an image of the plasma acquired in a second direction;

[0176] A spark parameter determination module 712, for determining the spark parameters of the sample according to the first spark image and the second spark image;

[0177] The first spectrum segment determination module 713 is used to intercept a first spectrum segment in the spectrum to be detected; wherein the first spectrum segment corresponds to a preset element; wherein the sample includes the preset element;

[0178] The second spectrum segment determining module 714 is configured to determine a second spectrum segment corresponding to a preset element according to a plurality of first spectrum segments corresponding to the same preset element.

[0179] The spark parameters include a first spark area, a first spark intensity, a second spark area, and a second spark intensity. The spark parameter determination module 712 is specifically used to obtain a first spark boundary in the first spark image, determine a first spark area and a first spark intensity according to the first spark boundary and the first spark image; obtain a second spark boundary in the second spark image, and determine a second spark area and a second spark intensity according to the second spark boundary and the second spark image.

[0180] The spark parameter determination module 712 is specifically used to determine the area within the range covered by the first spark image boundary, and the area within the range covered by the first spark image boundary is used to characterize the first spark area; the integral of the spark image intensity within the range covered by the first spark image boundary is determined as the first spark intensity; the area within the range covered by the second spark image boundary is determined, and the area within the range covered by the second spark image boundary is used to characterize the second spark area; the integral of the spark image intensity within the range covered by the second spark image boundary is determined as the second spark intensity.

[0181] The first spectrum segment determination module 713 is specifically used to obtain a characteristic spectrum line wavelength point corresponding to a preset element; and intercept a spectrum in the spectrum to be detected according to the characteristic spectrum line wavelength point as a first spectrum segment corresponding to the preset element.

[0182] The first spectrum segment determination module 713 is specifically used to intercept the spectrum corresponding to the characteristic spectrum line wavelength point and the spectrum corresponding to S points before and after the characteristic spectrum line wavelength point in the spectrum to be detected.

[0183] Among them, S is 10.

[0184] The second spectrum segment determining module 714 is specifically configured to determine an average value of N first spectrum segments corresponding to the same preset element as a second spectrum segment corresponding to the preset element.

[0185] Among them, N is 20.

[0186] Figure 8 The present invention is a structural diagram of an electronic device according to an exemplary embodiment of the present invention.

[0187] like Figure 8 As shown, the electronic device provided in this embodiment includes:

[0188] Memory 801;

[0189] Processor 802; and

[0190] Computer programs;

[0191] The computer program is stored in the memory 801 and is configured to be executed by the processor 802 to implement any of the above-mentioned spectral segment optimization methods or model training methods.

[0192] This embodiment also provides a computer-readable storage medium having a computer program stored thereon.

[0193] The computer program is executed by a processor to implement any of the above-mentioned spectral segment optimization methods or model training methods.

[0194] This embodiment also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned spectral segment optimization methods or model training methods.

[0195] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0196] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for optimizing spectral fragments, characterized in that: include: Acquire a first spark image, a second spark image, and a spectrum to be detected of plasma generated by the sample under the action of the laser; wherein the first spark image is an image of the plasma acquired in a first direction, and the second spark image is an image of the plasma acquired in a second direction; Determining spark parameters of the sample according to the first spark image and the second spark image; In the spectrum to be detected, a spectrum segment corresponding to each preset element is intercepted; wherein the sample includes the preset element; Inputting the spectrum fragment of the preset element, the spark parameter, and the spectral energy of the laser into a preset spectrum optimization model corresponding to the preset element to obtain an optimized spectrum fragment corresponding to the spectrum fragment; The spectrum optimization model is obtained by training using the spectrum of the training sample, the spectral energy of the laser used when collecting the spectrum of the training sample, and the spark parameters corresponding to the training sample; The spark parameters include a first spark area, a first spark intensity, a second spark area, and a second spark intensity; Determining the spark parameters of the sample according to the first spark image and the second spark image includes: Acquire a first spark boundary in the first spark image, determine an area within a range covered by the first spark image boundary, and the area within the range covered by the first spark image boundary is used to characterize a first spark area; Determine the integral of the spark image intensity within the range covered by the first spark image boundary as the first spark intensity; Acquire a second spark boundary in the second spark image, determine an area within a range covered by the second spark image boundary, and the area within the range covered by the second spark image boundary is used to characterize a second spark area; The integral of the spark image intensity within the range covered by the second spark image boundary is determined as the second spark intensity.

2. The method according to claim 1, characterized in that The method of intercepting a spectrum segment corresponding to each preset element in the spectrum to be detected includes: Acquire a characteristic spectral line wavelength point corresponding to the preset element; A spectrum is intercepted in the spectrum to be detected according to the wavelength point of the characteristic spectrum line as a spectrum segment corresponding to the preset element.

3. The method according to claim 2, characterized in that The intercepting of a spectrum in the spectrum to be detected according to the wavelength point of the characteristic spectrum line comprises: The spectrum corresponding to the wavelength point of the characteristic spectrum line and the spectrum corresponding to S points before and after the wavelength point of the characteristic spectrum line are intercepted from the spectrum to be detected.

4. A model training method, characterized in that: include: Acquire a training data set; wherein the training data set includes multiple sets of training data, and the training data includes a first spectral segment, a second spectral segment obtained through multiple first spectral segments, and spark parameters and laser spectroscopic energy; wherein the laser spectroscopic energy is used to characterize the energy of the laser used when collecting the first spectral segment of the sample; Inputting the first spectrum segment, spark parameters and laser spectroscopic energy in the training data into a preset model to obtain a predicted spectrum segment; According to the second spectrum segment and the predicted spectrum segment, optimizing the parameters in the preset model to obtain a spectrum optimization model; The step of obtaining a training data set includes: Acquire a first spark image, a second spark image, a spectrum to be detected, and laser spectroscopic energy of the laser of the plasma generated by the sample under the action of the laser; wherein the first spark image is an image of the plasma acquired in a first direction, and the second spark image is an image of the plasma acquired in a second direction; Determining spark parameters of the sample according to the first spark image and the second spark image; In the spectrum to be detected, a first spectrum segment is intercepted; wherein the first spectrum segment corresponds to a preset element; wherein the sample includes the preset element; An average value of N first spectrum segments corresponding to the same preset element is determined as a second spectrum segment corresponding to the preset element.

5. A device for optimizing a spectrum segment, characterized in that: include: An acquisition unit, used to acquire a first spark image, a second spark image and a spectrum to be detected of the plasma generated by the sample under the action of the laser; wherein the first spark image is an image of the plasma acquired in a first direction, and the second spark image is an image of the plasma acquired in a second direction; a spark parameter determination unit, configured to determine the spark parameter of the sample according to the first spark image and the second spark image; A spectrum segment determination unit, used for intercepting a spectrum segment corresponding to each preset element in the spectrum to be detected; wherein the sample includes the preset element; A spectrum segment optimization unit, used for inputting the spectrum segment of the preset element, the spark parameter, and the spectral energy of the laser into a preset spectrum optimization model corresponding to the preset element to obtain an optimized spectrum segment corresponding to the spectrum segment; The spectrum optimization model is obtained by training using the spectrum of the training sample, the spectral energy of the laser used when collecting the spectrum of the training sample, and the spark parameters corresponding to the training sample; The spark parameters include a first spark area, a first spark intensity, a second spark area, and a second spark intensity; The spark parameter determination unit is specifically used for: Acquire a first spark boundary in the first spark image, determine an area within a range covered by the first spark image boundary, and the area within the range covered by the first spark image boundary is used to characterize a first spark area; Determine the integral of the spark image intensity within the range covered by the first spark image boundary as the first spark intensity; Acquire a second spark boundary in the second spark image, determine an area within a range covered by the second spark image boundary, and the area within the range covered by the second spark image boundary is used to characterize a second spark area; The integral of the spark image intensity within the range covered by the second spark image boundary is determined as the second spark intensity.

6. A model training device, characterized in that: include: An acquisition unit, used for acquiring a training data set; wherein the training data set includes multiple sets of training data, and the training data includes a first spectrum segment, a second spectrum segment obtained through multiple first spectrum segments, and spark parameters and laser spectroscopic energy; wherein the laser spectroscopic energy is used to characterize the energy of the laser used when collecting the first spectrum segment of the sample; A predicted spectrum segment determination unit, used for inputting the first spectrum segment, spark parameters and laser spectroscopic energy in the training data into a preset model to obtain a predicted spectrum segment; a spectrum optimization model determination unit, configured to optimize the parameters in the preset model according to the second spectrum segment and the predicted spectrum segment to obtain the spectrum optimization model; The acquisition unit is specifically used for: Acquire a first spark image, a second spark image, a spectrum to be detected, and laser spectroscopic energy of the laser of the plasma generated by the sample under the action of the laser; wherein the first spark image is an image of the plasma acquired in a first direction, and the second spark image is an image of the plasma acquired in a second direction; Determining spark parameters of the sample according to the first spark image and the second spark image; In the spectrum to be detected, a first spectrum segment is intercepted; wherein the first spectrum segment corresponds to a preset element; wherein the sample includes the preset element; An average value of N first spectrum segments corresponding to the same preset element is determined as a second spectrum segment corresponding to the preset element.

7. An electronic device, characterized in that: comprising a memory and a processor; wherein, The memory is used to store computer programs; The processor is used to read the computer program stored in the memory and execute the method according to any one of claims 1 to 4 according to the computer program in the memory.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method described in any one of claims 1 to 4 is implemented.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Detection time and position controllable laser induced breakdown spectroscopy detection device

    CN102128815A

  • Integrated laser-induced enhanced plasma spectrum acquisition system

    CN102841078A

  • LIBS soil detection method, system and equipment for realizing self-adaptive spectral line balance

    CN111855643A

  • Method And System For Characterizing An Aggregate Sample By Using Laser-Induced Breakdown Spectroscopy

    US20190346370A1

  • Method and system for hyperspectral inversion of phosphorus content of rubber tree leaves

    US20210056424A1