A method and system for classifying light absorbing impurities
By employing a feature enhancement strategy that combines dynamic local background baseline calculation with inverse interpolation compensation, along with morphological clustering and parameter transfer mechanisms, spectral data processing is optimized. This addresses the problem of insufficient automation in the classification of absorbent impurities in existing technologies, achieving efficient and accurate impurity classification.
Patent Information
- Application Number
- CN202511516368.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-23
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2045-10-23
AI Technical Summary
The existing classification process for light-absorbing impurities lacks automation and intelligence. Directly inputting raw spectral data into the model without optimization leads to wasted computational resources and unstable classification performance.
By employing a feature enhancement strategy that combines dynamic local background baseline calculation with inverse interpolation compensation, along with morphological clustering and parameter transfer mechanisms, spectral data processing is optimized to eliminate interference from complex matrices and the effects of instrument range saturation, thereby improving the signal-to-noise ratio and fidelity.
It significantly improves the signal-to-noise ratio and fidelity of impurity characteristic signals, enables batch, efficient, and consistent processing of impurity peaks of the same type, and improves analysis efficiency and classification accuracy.
Smart Images

Figure CN120992534B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of impurity classification technology, and particularly relates to a method and system for classifying light-absorbing impurities. Background Technology
[0002] Snow cover, a key component of the cryosphere, plays a crucial role in regulating the global energy balance due to its high albedo. Light-absorbing impurities (LAIs) deposited on snow surfaces, such as black carbon (BC) and dust, can significantly reduce snow and ice albedo, enhance the absorption of solar radiation, and thus accelerate snowmelt, impacting regional water cycles and climate. The High Mountain Asia (HMA), known as the "Water Tower of Asia," has a decisive impact on the water security of billions of people downstream due to changes in its snow cover. Therefore, accurately identifying and classifying light-absorbing impurities over the HMA is a crucial prerequisite for assessing its climate and environmental effects and predicting future water resource changes.
[0003] The existing classification processes for absorbable impurities lack sufficient automation and intelligence. Traditional pattern recognition methods heavily rely on the professional experience of analysts for manual peak identification, feature selection, and threshold setting, a process that is cumbersome, subjective, and inefficient. Although some studies have introduced machine learning models to achieve automatic classification, their feature engineering steps are often disconnected from the aforementioned signal preprocessing steps. Directly inputting unoptimized and reconstructed raw spectral data into the model forces it to consume significant computational resources to learn irrelevant noise and distortion features, rather than essential chemical information. This results in weak generalization ability, poor adaptability to instrument fluctuations, changes in operating conditions, and the emergence of new impurities, making it difficult to maintain stable and reliable classification performance in complex real-world applications. Summary of the Invention
[0004] This invention provides a method and system for classifying light-absorbing impurities, which addresses the technical problem of directly inputting unoptimized and unreconstructed raw spectral data into a model, forcing the model to consume a large amount of computational resources to learn irrelevant noise and distortion features.
[0005] In a first aspect, the present invention provides a method for classifying light-absorbing impurities, comprising:
[0006] Acquire absorbance data sequences of the sample under test at multiple wavelengths;
[0007] Based on a preset impurity response peak detection strategy, it is determined whether there is at least one impurity response peak data segment in the absorbance data sequence, wherein the impurity response peak data segment corresponds to the characteristic absorption of a specific impurity in the sample to be tested.
[0008] If there is at least one impurity response peak data segment, then at least one background absorbance subsequence and at least one impurity response peak subsequence are segmented from the absorbance data sequence, and morphological clustering is performed on the at least one impurity response peak subsequence to obtain at least one set of impurity response peak subsequences.
[0009] Each impurity response peak subsequence is associated with at least one adjacent background absorption subsequence to construct a peak-background association set;
[0010] A benchmark impurity response peak subsequence is selected from a certain set of impurity response peak subsequences. Based on the peak-back correlation relationship with the benchmark impurity response peak subsequence, a preset first feature enhancement strategy is used for processing to obtain the enhanced impurity response peak subsequence and the corresponding feature enhancement parameters.
[0011] Based on the feature enhancement parameters, batch feature enhancement is performed on the remaining impurity response peak subsequences in the set of a certain impurity response peak subsequences to obtain a consistency enhancement subsequence set.
[0012] The enhanced impurity response peak subsequence, the remaining impurity response peak subsequences in the uniform enhancement subsequence set, and the background absorption subsequence are reconstructed into a feature sequence to be classified in wavelength order, and then input into a preset impurity classification model to output the category information of impurities in the sample to be tested.
[0013] In a second aspect, the present invention provides a light-absorbing impurity classification system, comprising:
[0014] The acquisition module is configured to acquire absorbance data sequences of the sample under test at multiple wavelengths;
[0015] The judgment module is configured to determine whether there is at least one impurity response peak data segment in the absorbance data sequence based on a preset impurity response peak detection strategy, wherein the impurity response peak data segment corresponds to the characteristic absorption of a specific impurity in the sample to be tested.
[0016] The segmentation module is configured to, if there is at least one impurity response peak data segment, segment at least one background absorbance subsequence and at least one impurity response peak subsequence from the absorbance data sequence, and perform morphological clustering on the at least one impurity response peak subsequence to obtain at least one set of impurity response peak subsequences.
[0017] The association module is configured to associate each impurity response peak subsequence with at least one adjacent background absorption subsequence to construct a peak-background association set.
[0018] The first enhancement module is configured to select a reference impurity response peak subsequence from a certain set of impurity response peak subsequences, combine the peak-back correlation relationship with the reference impurity response peak subsequence, and process it using a preset first feature enhancement strategy to obtain the enhanced impurity response peak sequence and the corresponding feature enhancement parameters.
[0019] The second enhancement module is configured to perform batch feature enhancement on the remaining impurity response peak subsequences in the set of a certain impurity response peak subsequences based on the feature enhancement parameters, so as to obtain a consistency enhancement subsequence set.
[0020] The classification module is configured to reconstruct the enhanced impurity response peak sub-sequence, the remaining impurity response peak sub-sequences in the uniform enhancement sub-sequence set, and the background absorption sub-sequence into a feature sequence to be classified in wavelength order, and input it into a preset impurity classification model to output the category information of impurities in the sample to be tested.
[0021] Thirdly, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of the light-absorbing impurity classification method of any embodiment of the present invention.
[0022] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor performs the steps of the light-absorbing impurity classification method of any embodiment of the present invention.
[0023] The absorbing impurity classification method and system of this application effectively eliminates peak truncation distortion caused by complex matrix interference and instrument range saturation through a first feature enhancement strategy of dynamic local background baseline calculation and inverse difference compensation, significantly improving the signal-to-noise ratio and fidelity of impurity feature signals. Through morphological clustering and parameter transfer mechanisms, it achieves batch, efficient and consistent processing of impurity peaks of the same type, greatly improving analysis efficiency while ensuring correction accuracy. Attached Figure Description
[0024] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 A flowchart illustrating a method for classifying light-absorbing impurities according to an embodiment of the present invention;
[0026] Figure 2 A structural block diagram of a light-absorbing impurity classification system provided in one embodiment of the present invention;
[0027] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] Please see Figure 1 The diagram shows a flowchart of a method for classifying light-absorbing impurities according to this application.
[0030] like Figure 1 As shown, the method for classifying light-absorbing impurities specifically includes the following steps:
[0031] Step S101: Obtain the absorbance data sequence of the sample under test at multiple wavelengths.
[0032] In this step, standardized preparation is performed based on the physical state of the sample to be tested (such as liquid, solid, or gas) and the analytical requirements.
[0033] For liquid samples, dilution or volume adjustment is typically performed using a suitable solvent (such as ultrapure water or organic solvents), and the sample is then transferred to a quartz or glass cuvette with a standard optical path (e.g., 1 cm). If the sample is turbid, centrifugation or filtration is required to eliminate interference from scattered light.
[0034] For solid samples, diffuse reflectance measurements can be performed using an integrating sphere attachment, or the sample can be dissolved, compressed, and then processed.
[0035] For specific impurities that require derivatization reactions, derivatization reagents must be added according to standard operating procedures, and the reaction must be carried out at a specified temperature and time to enhance their absorbance or change their characteristic absorption wavelength.
[0036] Use a UV-Vis spectrophotometer or spectrometer as the core measurement equipment.
[0037] Perform instrument self-test and warm-up to ensure that the light source (deuterium lamp / tungsten lamp), monochromator, and detector (such as CCD or photomultiplier tube) are in a stable working state.
[0038] Baseline calibration: Place a cuvette containing a blank reference solution (i.e., a pure solvent or matrix without the sample to be tested) into the sample chamber, scan within the set wavelength range, and correct the instrument's absorbance zero point to the background of the reference, thereby eliminating the influence of light absorption by the solvent and the cuvette itself.
[0039] Based on the known characteristic absorption bands of the target impurity, a continuous scanning range is set, and the cuvette containing the sample to be tested is precisely placed into the optical path of the sample chamber.
[0040] The instrument controls the monochromator to change gradually at preset wavelength intervals, and at each wavelength point λi, measures the transmitted light intensity I(λi) of the sample relative to the reference and the reference light intensity I0(λi).
[0041] The instrument’s built-in processor calculates the absorbance value A(λi)=log10[I0(λi) / I(λi)] at each wavelength point in real time according to the Lambert-Beer law.
[0042] After the scan is completed, the instrument outputs an ordered set of data pairs {(λ1, A1), (λ2, A2), ..., (λn, An)}, which is the absorbance data sequence at multiple wavelengths.
[0043] Step S102: Based on the preset impurity response peak detection strategy, determine whether there is at least one impurity response peak data segment in the absorbance data sequence, wherein the impurity response peak data segment corresponds to the characteristic absorption of a specific impurity in the sample to be tested.
[0044] In this step, the first derivative of the absorbance data sequence at adjacent wavelengths is calculated to obtain the absorbance change gradient sequence; a sliding window of preset width is used to traverse the absorbance change gradient sequence to identify regions within the window whose gradient values exceed a preset gradient threshold; when a region exceeding the threshold is identified, the relative gradient change rate of several consecutive points in the region is calculated; if the number of points that continuously exceed the change rate threshold reaches a preset number, the region and its neighborhood are determined to constitute an impurity response peak data segment.
[0045] In one specific embodiment, the first derivative (i.e., the gradient of change) of absorbance between adjacent wavelength points is calculated sequentially for the ordered absorbance data sequence {(λ1, A1), (λ2, A2), ..., (λn, An)} obtained in step S101.
[0046] The central difference method is used for calculation to reduce errors. For the i-th wavelength point λi, the gradient Gi is calculated using the following formula:
[0047] Gi=(A(i+1)-A(i-1)) / (λ(i+1)-λ(i-1)),
[0048] The value of i typically ranges from 2 to n-1.
[0049] This yields an absorbance gradient sequence {(λ2, G2), (λ3, G3), ..., (λ(n-1), G(n-1))} that is almost as long as the original sequence. This sequence amplifies the rate of absorbance change with wavelength, with the peak beginning (rising edge) exhibiting a positive gradient pulse and the peak ending (falling edge) exhibiting a negative gradient pulse.
[0050] Define a sliding window of a preset width. The window width W can be set empirically based on the half-width of a typical impurity peak, for example, to cover 5-10 data points (corresponding to a wavelength range of approximately 5-10 nm).
[0051] Starting from the beginning of the gradient sequence, slide the window with a single data point step. For each window position, examine the absolute value |G| of all gradient values within the window.
[0052] Set a preset gradient threshold. This threshold is used to distinguish significant peak changes from background noise. For example, the preset gradient threshold can be set by analyzing the gradient sequences of a large number of pure solvents or low-concentration samples and taking the average of the absolute values of the gradients plus three times the standard deviation.
[0053] If, within the same window, there are at least M consecutive data points (e.g., M=3) whose absolute gradient values |G| are all greater than a preset gradient threshold, then the window region is determined to be a potential over-threshold region, and the start and end wavelength indices of the region are recorded. This "continuous M points" condition can effectively filter out isolated noise spikes.
[0054] For example, suppose there is a real impurity absorption peak in the wavelength range of 250 nm to 260 nm. After calculating the gradient, a positive gradient pulse and a negative gradient pulse will appear near 251 nm (peak start) and 259 nm (peak end), respectively.
[0055] The sliding window identifies a region (rising edge) near 251nm where multiple consecutive gradient values exceed a preset gradient threshold. Using the peak gradient point in this rising edge region as a reference, the relative rate of change for multiple points near 259nm (falling edge) is calculated. Because the gradient decays drastically at the falling edge, the relative rate of change continuously exceeds the rate of change threshold. Therefore, the system ultimately classifies the entire interval between 251nm and 259nm as a "segmentation response peak data segment".
[0056] In one specific implementation, after determining whether there is at least one impurity response peak data segment in the absorbance data sequence, if there is no at least one impurity response peak data segment, the absorbance data sequence is directly input into the impurity classification model, and the category information of the impurities in the sample to be tested is output.
[0057] Step S103: If there is at least one impurity response peak data segment, then at least one background absorbance subsequence and at least one impurity response peak subsequence are segmented from the absorbance data sequence, and morphological clustering is performed on the at least one impurity response peak subsequence to obtain at least one impurity response peak subsequence set.
[0058] In this step, the background absorbance subsequence refers to the portion of the spectrum that does not belong to any of the identified impurity response peak data segments. The complete absorbance data sequence is treated as a whole, and then the wavelength ranges covered by all impurity response peak data segments are removed. The remaining data points will automatically form one or more discontinuous segments; these segments constitute the background absorbance subsequence.
[0059] Extract the morphological feature vector of each impurity response peak subsequence. The morphological feature vector includes at least three of the following: peak width, peak height, symmetry, and top curvature. Use an unsupervised clustering algorithm to cluster the morphological feature vectors, grouping impurity response peak subsequences with similar morphologies into the same set, to obtain at least one set of impurity response peak subsequences.
[0060] Step S104: Associate each impurity response peak subsequence with at least one adjacent background absorption subsequence to construct a peak-background association set.
[0061] Step S105: Select a reference impurity response peak subsequence from a certain set of impurity response peak subsequences, combine it with the peak-back correlation relationship corresponding to the reference impurity response peak subsequence, and process it using a preset first feature enhancement strategy to obtain the enhanced impurity response peak subsequence and the corresponding feature enhancement parameters.
[0062] In this step, the signal-to-noise ratio (SNR) of each impurity response peak subsequence in a given set of impurity response peak subsequences is calculated, and the impurity response peak subsequence with the highest SNR is selected as the benchmark impurity response peak subsequence. A high SNR means that the sequence is least affected by random noise, and its characteristics are the clearest and most reliable. Using it as a benchmark ensures that the parameters calculated subsequently are the most accurate.
[0063] Signal-to-noise ratio (SNR) calculation: ,
[0064] In the formula, This represents the maximum absorbance value in the impurity response peak subsequence. , These are the average absorbance and standard deviation calculated from the adjacent background absorbance subsequences based on the peak-back correlation of the impurity response peak subsequences.
[0065] Based on the peak-background correlation, the background absorption subsequence segment adjacent to the reference impurity response peak subsequence is extracted; the average absorbance of the background absorption subsequence segment is calculated as the local background baseline; the reference impurity response peak subsequence is scanned along the direction of increasing wavelength to locate the cutoff wavelength point where its absorbance value first falls below the local background baseline; the difference between the absorbance value at the cutoff wavelength point and the absorbance value at the peak point is calculated as the reference compensation amount, which is the characteristic enhancement parameter; the reference compensation amount is inversely superimposed on each data point in the reference impurity response peak subsequence located before the cutoff wavelength point to obtain the enhanced impurity response peak subsequence.
[0066] It should be noted that the forward and backward background absorption subsequences directly adjacent to the reference impurity response peak subsequence are obtained.
[0067] To ensure that the baseline and peak shape are comparable in "scale", a matching cut is performed:
[0068] Obtain the wavelength span L = λe - λs of the reference impurity response peak subsequence.
[0069] A first sequence segment of length L is truncated from the tail of the forward background absorption subsequence (the end closest to the peak start point λs). A second sequence segment of length L is truncated from the head of the backward background absorption subsequence (the end closest to the peak end point λe).
[0070] The average value of all absorbance data in the first and second sequence segments is calculated and defined as the dynamic local background baseline. This dynamic local background baseline dynamically reflects the most relevant background level around the specific peak, rather than a globally fixed value, effectively overcoming the interference caused by baseline drift in complex samples.
[0071] Furthermore, along the direction of increasing wavelength (from λs to λe), each data point (λi, Ai) in the reference impurity response peak subsequence is scanned sequentially.
[0072] Location logic: Find the first data point that satisfies the condition that Ai is not greater than the dynamic local background baseline. That is, the point where the absorbance value first falls back to or below the dynamic local background baseline.
[0073] Define this point as the cutoff point, and denote its wavelength and absorbance as (λcutoff, Acutoff).
[0074] After finding the cutoff point (λcutoff, Acutoff), obtain its immediately preceding data point (λ(cutoff-1), A(cutoff-1)). This point is usually the last point above the baseline on the falling edge of the peak.
[0075] The formula for calculating the baseline compensation amount is:
[0076] Baseline compensation amount = A(cutoff-1) - Acutoff,
[0077] This baseline compensation is a core feature enhancement parameter. It quantifies the magnitude of the "signal drop" caused by signal truncation or rapid decline.
[0078] The range of data to be compensated is defined as all data points in the reference impurity response peak subsequence with wavelengths less than λcutoff (i.e., all points before the cutoff point).
[0079] For each data point (λx, Ax) within this range, perform a compensation operation (Ax + baseline compensation amount).
[0080] After performing this operation on all eligible points, a enhanced subsequence of baseline impurity response peaks is generated. Data points located at and after λcutoff (typically considered as portions of the regressed baseline or noise) remain unchanged.
[0081] Step S106: Based on the feature enhancement parameters, perform batch feature enhancement on the remaining impurity response peak subsequences in the set of a certain impurity response peak subsequences to obtain a consistency enhancement subsequence set.
[0082] In this step, the remaining impurity response peak subsequences are aligned with the reference impurity response peak subsequences by wavelength index; the corresponding cutoff point with the same relative position as the cutoff wavelength point is located in the remaining impurity response peak subsequences; the reference compensation amount is inversely superimposed onto each data point in the remaining impurity response peak subsequences located before its corresponding cutoff point to obtain the enhanced remaining impurity response peak subsequences, which is the uniformity enhanced subsequence set.
[0083] Step S107: The enhanced impurity response peak sub-sequence, the remaining impurity response peak sub-sequences in the uniform enhancement sub-sequence set, and the background absorption sub-sequence are reconstructed into a feature sequence to be classified in wavelength order, and input into a preset impurity classification model to output the category information of impurities in the sample to be tested.
[0084] In this step, the enhanced impurity response peak subsequence, the remaining impurity response peak subsequences in the uniform enhancement subsequence set, and the background absorption subsequence are spliced together in ascending order of their original wavelength coordinates. This ensures that the splicing process does not change the original wavelength order of any data points, thereby reconstructing a continuous and complete spectral curve on the wavelength axis. This reconstructed curve retains the full spectral information of the original data, but each impurity peak has been corrected and enhanced, significantly improving the signal-to-noise ratio and feature fidelity.
[0085] It should be noted that the impurity classification model is trained based on a one-dimensional convolutional neural network.
[0086] In summary, the method of this application, through the first feature enhancement strategy of dynamic local background baseline calculation and inverse difference compensation, effectively eliminates peak truncation distortion caused by complex matrix interference and instrument range saturation, and significantly improves the signal-to-noise ratio and fidelity of impurity feature signals; through morphological clustering and parameter transfer mechanisms, it achieves batch, efficient and consistent processing of impurity peaks of the same type, and greatly improves analysis efficiency while ensuring correction accuracy.
[0087] Please see Figure 2 The diagram shows a structural block diagram of a light-absorbing impurity classification system according to this application.
[0088] like Figure 2 As shown, the light-absorbing impurity classification system 200 includes an acquisition module 210, a judgment module 220, a segmentation module 230, an association module 240, a first enhancement module 250, a second enhancement module 260, and a classification module 270.
[0089] The absorption module 210 is configured to acquire absorbance data sequences of the sample under test at multiple wavelengths; the judgment module 220 is configured to determine whether at least one impurity response peak data segment exists in the absorbance data sequence based on a preset impurity response peak detection strategy, wherein the impurity response peak data segment corresponds to the characteristic absorption of a specific impurity in the sample under test; the segmentation module 230 is configured to segment at least one background absorption subsequence and at least one impurity response peak subsequence from the absorbance data sequence if at least one impurity response peak data segment exists, and perform morphological clustering on the at least one impurity response peak subsequence to obtain at least one set of impurity response peak subsequences; the association module 240 is configured to associate each impurity response peak subsequence with at least one adjacent background absorption subsequence to construct a peak-background association set; the first enhancement Module 250 is configured to select a baseline impurity response peak subsequence from a set of impurity response peak subsequences, and process it using a preset first feature enhancement strategy in conjunction with the peak-background correlation relationship corresponding to the baseline impurity response peak subsequence, to obtain enhanced impurity response peak subsequences and corresponding feature enhancement parameters; second enhancement module 260 is configured to perform batch feature enhancement on the remaining impurity response peak subsequences in the set of impurity response peak subsequences based on the feature enhancement parameters, to obtain a set of consistent enhanced subsequences; classification module 270 is configured to reconstruct the enhanced impurity response peak subsequences, the remaining impurity response peak subsequences in the set of consistent enhanced subsequences, and the background absorption subsequences into a feature sequence to be classified in wavelength order, and input it into a preset impurity classification model to output the category information of impurities in the sample to be tested.
[0090] It should be understood that Figure 2The modules and references described in the document Figure 1 The steps described in the text correspond to those in the method described above. Therefore, the operations, features, and corresponding technical effects described above also apply to the method described in the text. Figure 2 The various modules in the document will not be described in detail here.
[0091] In other embodiments, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor performs the light-absorbing impurity classification method in any of the above method embodiments.
[0092] In one embodiment, the computer-readable storage medium of the present invention stores computer-executable instructions, which are configured as follows:
[0093] Acquire absorbance data sequences of the sample under test at multiple wavelengths;
[0094] Based on a preset impurity response peak detection strategy, it is determined whether there is at least one impurity response peak data segment in the absorbance data sequence, wherein the impurity response peak data segment corresponds to the characteristic absorption of a specific impurity in the sample to be tested.
[0095] If there is at least one impurity response peak data segment, then at least one background absorbance subsequence and at least one impurity response peak subsequence are segmented from the absorbance data sequence, and morphological clustering is performed on the at least one impurity response peak subsequence to obtain at least one set of impurity response peak subsequences.
[0096] Each impurity response peak subsequence is associated with at least one adjacent background absorption subsequence to construct a peak-background association set;
[0097] A benchmark impurity response peak subsequence is selected from a certain set of impurity response peak subsequences. Based on the peak-back correlation relationship with the benchmark impurity response peak subsequence, a preset first feature enhancement strategy is used for processing to obtain the enhanced impurity response peak subsequence and the corresponding feature enhancement parameters.
[0098] Based on the feature enhancement parameters, batch feature enhancement is performed on the remaining impurity response peak subsequences in the set of a certain impurity response peak subsequences to obtain a consistency enhancement subsequence set.
[0099] The enhanced impurity response peak subsequence, the remaining impurity response peak subsequences in the uniform enhancement subsequence set, and the background absorption subsequence are reconstructed into a feature sequence to be classified in wavelength order, and then input into a preset impurity classification model to output the category information of impurities in the sample to be tested.
[0100] Computer-readable storage media may include a stored program area and a stored data area, wherein the stored program area may store an operating system and an application program required for at least one function; the stored data area may store data created based on the use of the light-absorbing impurity classification system, etc. Furthermore, the computer-readable storage medium may include high-speed random access memory, and may also include memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the computer-readable storage medium may optionally include memory remotely disposed relative to a processor, which can be connected to the light-absorbing impurity classification system via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0101] Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present invention, such as... Figure 3 As shown, the device includes a processor 310 and a memory 320. The electronic device may also include an input device 330 and an output device 340. The processor 310, memory 320, input device 330, and output device 340 can be connected via a bus or other means. Figure 3 Taking a bus connection as an example, the memory 320 is the computer-readable storage medium described above. The processor 310 executes various server functions and data processing by running non-volatile software programs, instructions, and modules stored in the memory 320, thereby implementing the light-absorbing impurity classification method described in the above embodiment. The input device 330 can receive input digital or character information and generate key signal inputs related to user settings and function control of the light-absorbing impurity classification system. The output device 340 may include a display screen or other display device.
[0102] The aforementioned electronic device can execute the method provided in the embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in this embodiment can be found in the method provided in the embodiments of the present invention.
[0103] In one embodiment, the above-described electronic device is applied in a light-absorbing impurity classification system for a client, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0104] Acquire absorbance data sequences of the sample under test at multiple wavelengths;
[0105] Based on a preset impurity response peak detection strategy, it is determined whether there is at least one impurity response peak data segment in the absorbance data sequence, wherein the impurity response peak data segment corresponds to the characteristic absorption of a specific impurity in the sample to be tested.
[0106] If there is at least one impurity response peak data segment, then at least one background absorbance subsequence and at least one impurity response peak subsequence are segmented from the absorbance data sequence, and morphological clustering is performed on the at least one impurity response peak subsequence to obtain at least one set of impurity response peak subsequences.
[0107] Each impurity response peak subsequence is associated with at least one adjacent background absorption subsequence to construct a peak-background association set;
[0108] A benchmark impurity response peak subsequence is selected from a certain set of impurity response peak subsequences. Based on the peak-back correlation relationship with the benchmark impurity response peak subsequence, a preset first feature enhancement strategy is used for processing to obtain the enhanced impurity response peak subsequence and the corresponding feature enhancement parameters.
[0109] Based on the feature enhancement parameters, batch feature enhancement is performed on the remaining impurity response peak subsequences in the set of a certain impurity response peak subsequences to obtain a consistency enhancement subsequence set.
[0110] The enhanced impurity response peak subsequence, the remaining impurity response peak subsequences in the uniform enhancement subsequence set, and the background absorption subsequence are reconstructed into a feature sequence to be classified in wavelength order, and then input into a preset impurity classification model to output the category information of impurities in the sample to be tested.
[0111] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.
[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method of classifying light absorbing impurities, characterized by, The method comprises the following steps: obtaining a sequence of absorbance data of a sample to be tested at multiple wavelengths; determining whether at least one impurity response peak data segment exists in the sequence of absorbance data based on a preset impurity response peak detection strategy, wherein the impurity response peak data segment corresponds to the characteristic absorption of a specific impurity in the sample to be tested; if at least one impurity response peak data segment exists, segmenting at least one background absorption sub-sequence and at least one impurity response peak sub-sequence from the sequence of absorbance data, and performing morphological clustering on the at least one impurity response peak sub-sequence to obtain at least one impurity response peak sub-sequence set; associating each impurity response peak sub-sequence with at least one adjacent background absorption sub-sequence to construct a peak-back association relationship set; selecting a reference impurity response peak sub-sequence from a certain impurity response peak sub-sequence set, combining the peak-back association relationship corresponding to the reference impurity response peak sub-sequence, and processing using a preset first feature enhancement strategy to obtain an enhanced impurity response peak sub-sequence and a corresponding feature enhancement parameter, wherein the processing using the preset first feature enhancement strategy to obtain the enhanced impurity response peak sub-sequence and the corresponding feature enhancement parameter comprises: extracting a background absorption sub-sequence segment adjacent to the reference impurity response peak sub-sequence according to the peak-back association relationship; calculating the average absorbance of the background absorption sub-sequence segment as a local background baseline; scanning the reference impurity response peak sub-sequence in the direction of increasing wavelength, and locating the cutoff wavelength point at which the absorbance value first falls below the local background baseline; calculating the difference between the absorbance value at the cutoff wavelength point and the absorbance value of the immediately preceding data point at the cutoff wavelength point as a reference compensation amount, i.e., obtaining the feature enhancement parameter; superimposing the reference compensation amount in reverse to each data point before the cutoff wavelength point in the reference impurity response peak sub-sequence to obtain the enhanced impurity response peak sub-sequence; performing batch feature enhancement on the remaining impurity response peak sub-sequences in the certain impurity response peak sub-sequence set based on the feature enhancement parameter to obtain a consistent enhancement sub-sequence set; reconstructing the enhanced impurity response peak sub-sequence, the remaining impurity response peak sub-sequences in the consistent enhancement sub-sequence set, and the background absorption sub-sequence into a feature sequence to be classified in the order of wavelength, and inputting the feature sequence to be classified into a preset impurity classification model to output the category information of the impurities in the sample to be tested.
2. The method of classifying light absorbing impurities according to claim 1, wherein The determination of whether at least one impurity response peak data segment exists in the sequence of absorbance data based on the preset impurity response peak detection strategy comprises: calculating the first derivative of the sequence of absorbance data at adjacent wavelength points to obtain a sequence of absorbance change gradients; traversing the sequence of absorbance change gradients using a sliding window of a preset width to identify regions within the window where the gradient value exceeds a preset gradient threshold value; when a certain region exceeding the threshold value is identified, calculating the relative gradient change rate of a subsequent continuous number of points of the certain region, and if the number of points continuously exceeding the change rate threshold value reaches a preset number, determining that the certain region and its neighborhood constitute an impurity response peak data segment.
3. The method of classifying light absorbing impurities according to claim 1, wherein The morphological clustering of the at least one impurity response peak sub-sequence includes: extracting a morphological feature vector of each impurity response peak sub-sequence, the morphological feature vector including at least three of peak width, peak height, symmetry, and top curvature; using an unsupervised clustering algorithm to cluster the morphological feature vectors, and grouping impurity response peak sub-sequences with similar morphologies into the same set to obtain at least one impurity response peak sub-sequence set.
4. The method of classifying light absorbing impurities according to claim 1, wherein The batch feature enhancement of the remaining impurity response peak sub-sequences in the certain impurity response peak sub-sequence set based on the feature enhancement parameter includes: aligning the remaining impurity response peak sub-sequences with the reference impurity response peak sub-sequence according to the wavelength index; locating the corresponding cutoff point in the remaining impurity response peak sub-sequence that has the same relative position as the cutoff wavelength point; superimposing the reference compensation amount in reverse to each data point in the remaining impurity response peak sub-sequence located before the corresponding cutoff point to obtain the enhanced remaining impurity response peak sub-sequence, i.e., to obtain the consistency enhanced sub-sequence set.
5. The method of classifying light absorbing impurities according to claim 1, wherein After determining whether there is at least one impurity response peak data segment in the absorbance data sequence, the method further includes: If there is no at least one impurity response peak data segment, the absorbance data sequence is directly input into the impurity classification model to output the category information of the impurities in the sample to be tested.
6. A system for classifying light absorbing impurities, characterized by includes: an acquisition module configured to acquire an absorbance data sequence of a sample to be tested at multiple wavelengths; a determination module configured to determine, based on a preset impurity response peak detection strategy, whether there is at least one impurity response peak data segment in the absorbance data sequence, wherein the impurity response peak data segment corresponds to the characteristic absorption of a specific impurity in the sample to be tested; a segmentation module configured to, if there is at least one impurity response peak data segment, segment at least one background absorption sub-sequence and at least one impurity response peak sub-sequence from the absorbance data sequence, and perform morphological clustering on the at least one impurity response peak sub-sequence to obtain at least one impurity response peak sub-sequence set; an association module configured to associate each impurity response peak sub-sequence with at least one adjacent background absorption sub-sequence to construct a peak-back association relationship set; a first enhancement module configured to select a reference impurity response peak sub-sequence in a certain impurity response peak sub-sequence set, combine the peak-back association relationship corresponding to the reference impurity response peak sub-sequence, and use a preset first feature enhancement strategy to process to obtain an enhanced impurity response peak sub-sequence and a corresponding feature enhancement parameter, wherein the processing using the preset first feature enhancement strategy to obtain the enhanced impurity response peak sub-sequence and the corresponding feature enhancement parameter includes: extracting a background absorption sub-sequence segment adjacent to the reference impurity response peak sub-sequence according to the peak-back association relationship; calculating the average absorbance of the background absorption sub-sequence segment as a local background baseline; scanning the reference impurity response peak sub-sequence in the direction of increasing wavelength, and locating a cutoff wavelength point at which the absorbance value first falls below the local background baseline; a difference between the absorbance value at the cutoff wavelength point and an absorbance value of a data point immediately preceding the cutoff wavelength point is calculated as a reference compensation amount, i.e., a feature enhancement parameter is obtained; the reference compensation amount is inversely superimposed on each data point before the cutoff wavelength point in the reference impurity response peak subsequence, to obtain an enhanced impurity response peak subsequence; a second enhancement module is configured to perform batch feature enhancement on the remaining impurity response peak subsequences in the certain impurity response peak subsequence set based on the feature enhancement parameter, to obtain a consistent enhancement subsequence set; a classification module is configured to reconstruct the enhanced impurity response peak subsequence, the remaining impurity response peak subsequences in the consistent enhancement subsequence set and the background absorption subsequence into a to-be-classified feature sequence in a wavelength order, and input the to-be-classified feature sequence into a preset impurity classification model to output category information of impurities in the sample to be tested.
7. An electronic device, comprising: comprise: at least one processor, and a memory connected in communication with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 5.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the method of any one of claims 1 to 5.
Citation Information
Patent Citations
Method for realizing carbon powder purity intelligent analysis by using deep learning
CN119961572A
Soil pollutant detection system and method
CN120801282A