Coal detection method and system
By fusing near-infrared spectroscopy and X-ray fluorescence spectroscopy signals and combining them with a deep neural network optimization model, the problem of low accuracy in existing coal component detection has been solved, achieving efficient and accurate coal component analysis, and promoting the sustainable development of the coal industry and the achievement of environmental protection goals.
Patent Information
- Application Number
- CN202410597883.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-05-14
AI Technical Summary
Existing methods for detecting coal composition are not accurate enough to meet industrial needs.
By combining near-infrared spectral signals and X-ray fluorescence spectral signals, and after preprocessing, downsampling, scaling to a normal distribution, and stitching, a deep neural network is used to detect coal composition. A PLS model is constructed for training and fine-tuning, and the neural network structure is optimized to improve detection accuracy.
It improves the accuracy and efficiency of coal composition detection, reduces errors, and enables accurate analysis of coal composition, supporting the sustainable development and environmental protection goals of the coal industry.
Smart Images

Figure CN118624559B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of coal detection, and in particular to a coal detection method, a coal detection system and a storage medium. BACKGROUND
[0002] Coal, as one of the main fossil fuels for thermal power generation, is of vital importance for its effective and safe utilization in the context of increasingly severe global environmental problems. With the growing demand for energy and the increasing awareness of environmental protection, the utilization and monitoring of coal have attracted increasing attention. The quality and composition of coal samples vary significantly among different sources and production processes. Such differences directly affect the energy utilization efficiency and environmental impact of coal. Different compositions of coal release different gas compositions and solid residues during combustion, so accurate knowledge of the composition of coal is crucial for assessing its combustion characteristics and environmental impact. The accuracy and efficiency of real-time measurement of coal composition are of great significance for optimizing energy utilization, improving production efficiency and reducing environmental pollution. By monitoring the composition of coal in real time, combustion parameters can be adjusted in a timely manner to improve combustion efficiency and reduce energy waste. At the same time, understanding the content of elements such as sulfur and nitrogen in coal helps to control the emission of gaseous pollutants during combustion and reduce the adverse effects on the environment. Therefore, the establishment of an efficient real-time monitoring system for the composition of coal not only improves energy utilization efficiency, but also reduces production costs and environmental pollution. The establishment of such a monitoring system will provide important support for the sustainable development of the coal industry and the realization of environmental protection goals.
[0003] Near-infrared spectroscopy (NIRS) is a valuable non-destructive analytical technique for detecting organic materials, which has been widely used and recognized in multiple research works. Since coal is mainly composed of organic matter, containing various functional groups and minerals, NIRS is very suitable for coal quality analysis. Specifically, the spectral range of NIRS includes a broad absorption band sensitive to hydrogen-containing organic functional groups, which helps to accurately and reliably analyze coal quality. In contrast, X-ray fluorescence spectroscopy (XRF) is commonly used for elemental analysis. In this process, high-energy X-rays are used to irradiate the material, exciting atoms and inducing energy absorption. When the excited atoms undergo electronic transitions back to the ground state, they release energy in the form of fluorescent radiation. This fluorescent radiation can be used to detect inorganic ash-forming elements such as aluminum (Al), silicon (Si), calcium (Ca) and other similar elements.
[0004] It is evident that NIRS or XRF spectroscopy is a relatively ideal solution for coal quality inspection. Currently, some schemes exist for coal detection based on single or dual spectral signals, such as the patent application CN117740845A ("A Method for Detecting Coal Ash Content Based on X-ray Diffraction and Fourier Transform Infrared Spectroscopy") and CN114112976A ("A High-Repeatability Detection Method for Coal Calorific Value Combined with XRF-NIRS"). These schemes generate detection results from a single spectral signal and then couple multiple detection results. This approach cannot unify the characteristic standards of various spectral signals, making the coupling results highly susceptible to errors. These schemes combine traditional machine learning methods or utilize deep neural networks to build predictive models for detection, such as using partial least squares regression (PLS) to determine the relationship between spectra and coal composition. However, this approach cannot guarantee that the selected neural network structure is compatible with the corresponding spectral signal features, resulting in compromised training efficiency and accuracy. Therefore, the detection accuracy of existing methods cannot meet industrial requirements. Consequently, a new coal composition detection scheme is needed. Summary of the Invention
[0005] The purpose of this invention is to provide a coal detection method and system to at least solve the problem of low accuracy in existing coal composition detection schemes.
[0006] To achieve the above objectives, the first aspect of the present invention provides a coal detection method, the method comprising: in response to a trigger signal that a coal sample has reached a detection position, acquiring spectral data of the coal sample; processing the near-infrared spectral signal and X-ray fluorescence spectral signal in the spectral data to obtain target spectral data; and performing inference based on the target spectral data using a coal sample detection model to obtain a coal detection result.
[0007] Optionally, the detection data includes: near-infrared spectral signals and X-ray fluorescence spectral signals; the processing of the near-infrared spectral signals and X-ray fluorescence spectral signals in the detection data to obtain target spectral data includes: performing preprocessing on the near-infrared spectral signals and X-ray fluorescence spectral signals respectively; performing downsampling processing on the preprocessed near-infrared spectral signals and X-ray fluorescence spectral signals respectively, and scaling the downsampled near-infrared spectral signals and X-ray fluorescence spectral signals to a normal distribution; and performing splicing processing on the normally distributed near-infrared spectral signals and normally distributed X-ray fluorescence spectral signals to obtain target spectral data.
[0008] Optionally, Savitzky-Golay convolution smoothing is performed on the near-infrared spectral signal and the X-ray fluorescence spectral signal respectively to obtain the near-infrared spectral signal and the X-ray fluorescence spectral signal after Savitzky-Golay convolution smoothing; the near-infrared spectral signal after Savitzky-Golay convolution smoothing is then subjected to area normalization.
[0009] Optionally, the step of performing Savitzky-Golay convolution smoothing on the near-infrared spectral signal and the X-ray fluorescence spectral signal includes: calculating the coefficients of the Savitzky-Golay convolution kernel based on a preset window size and polynomial order; performing a weighted average of the coefficients in the convolution kernel with adjacent data points in each spectral signal to obtain smoothed data points; performing symmetric expansion or zero-padding on the boundaries of each spectral signal; and obtaining the Savitzky-Golay convolution smoothed spectral signal based on the smoothed data points and the processed boundaries.
[0010] Optionally, the area normalization processing of the near-infrared spectral signals after convolution smoothing includes: performing area normalization processing on each near-infrared spectral signal after Savitzky-Golay convolution smoothing, and calculating the area-normalized near-infrared spectral signal.
[0011] Optionally, the calculation rule for the area-normalized signal is as follows:
[0012]
[0013] in, X represents the NIR reflectance corresponding to the m-th wavelength point of the near-infrared spectral signal; NIR This is the near-infrared spectral signal before area normalization. This is the near-infrared spectral signal after area normalization.
[0014] Optionally, the downsampling processing of the preprocessed near-infrared spectral signal and X-ray fluorescence spectral signal includes: performing downsampling processing on the X-ray fluorescence spectral signal after Savitzky-Golay convolution smoothing and the near-infrared spectral signal after area normalization, including: performing filtering processing on each spectral signal, retaining one sampling point at fixed intervals in the filtered spectral signal to obtain multiple sampling points; or truncating multiple segments of the filtered spectral signal, and performing averaging processing on each sampling point in each segment to obtain one sampling point in each segment to obtain multiple sampling points; and performing signal reconstruction based on each sampling point to obtain the downsampled spectral signal.
[0015] Optionally, the statistical characteristics of the spectral signals in the training set are calculated; wherein the statistical characteristics are the mean and variance; based on the statistical characteristics, standardization or normalization processing is performed on each spectral signal to scale the value of each spectral signal to a preset value range to obtain the scaled value of each spectral signal; based on the preset transformation algorithm and the scaled value of each spectral signal, each spectral signal is converted into a normal distribution.
[0016] Optionally, the normally distributed near-infrared spectral signal and the normally distributed X-ray fluorescence spectral signal are spliced together to obtain target spectral data. This includes: performing weight allocation on the normally distributed near-infrared spectral signal and the normally distributed X-ray fluorescence spectral signal and splicing the two spectral signals to obtain initial target spectral data; verifying the initial target spectral data based on the normally distributed near-infrared spectral signal and / or the normally distributed X-ray fluorescence spectral signal, and using the verified initial target spectral data as the target spectral data.
[0017] Optionally, the coal sample detection model is:
[0018]
[0019] Where f(·|θ) is a deep neural network with θ as a parameter; For target spectral data; It is a component of coal.
[0020] Optionally, the method further includes: pre-training a coal sample detection model, including: acquiring historical near-infrared spectral signals and historical X-ray fluorescence spectral signals, and constructing corresponding historical target spectral data based on the historical near-infrared spectral signals and the historical X-ray fluorescence spectral signals; using the historical target spectral data as training data to initialize PLS model parameters; generating simulated samples based on the initialized PLS model, performing model training based on the simulated samples to obtain an initial model for component detection; and fine-tuning the initial model for component detection based on reserved historical target spectral data to obtain a coal sample detection model.
[0021] Optionally, the PLS model parameters include: weights, biases, the mean and variance of the training set input data, and the mean and variance of the output data.
[0022] Optionally, generating simulated samples based on the initialized PLS model includes: adaptively determining the signal type and signal parameters that match the target spectral data; generating a basic signal based on the signal type and the signal parameters; adaptively selecting an augmentation scheme and performing a data augmentation operation on the basic signal based on the selected augmentation scheme to obtain an augmented signal set; filtering out bias data from the augmented signal set and using the filtered augmented signal set as simulated samples.
[0023] Optionally, the adaptive selection of augmentation scheme includes: in
[0024] One or more schemes are randomly selected from noise addition, translation, and preset rules as pre-selected schemes; wherein, the preset rules are:
[0025] X aug =X1 + (1 -)X2, α∈[0,1]
[0026] y aug = PLS ( aug )
[0027] Among them, f PLS Represents the PLS mapping function; X aug and y aug α represents the synthesized NIRS-XRF signal and the corresponding pseudo-label, respectively; α represents the interpolation weight of random sampling in the range [0,1]; X1 and X2 are signal samples randomly selected from the historical target spectral data of the coal sample; the adjustment parameters are randomly executed within the preset adjustable parameter range of each pre-selected scheme to obtain the parameter-determined pre-selected scheme; if there is only one pre-selected scheme with determined parameters, the basic signal is directly processed based on the scheme to obtain an augmented signal; if there are multiple pre-selected schemes with determined parameters, each scheme is executed in sequence to obtain an augmented signal.
[0028] Optionally, the step of performing model training based on the simulated samples to obtain an initial model for component detection includes: performing pseudo-labeling on the simulated samples based on the parameter-initialized PLS model, and using the labeled simulated samples as training samples; and performing model training in a neural network based on the target spectral data search based on the training samples to obtain an initial model for component detection.
[0029] Optionally, the step of fine-tuning the initial component detection model based on reserved historical target spectral data to obtain a coal sample detection model includes: replacing the simulated sample with reserved historical target spectral data, and performing a performance evaluation of the initial component monitoring model based on the actual results of the reserved historical target spectral data; if the performance evaluation of the initial component monitoring model fails, then adjusting hyperparameters, optimizing the model structure, and / or adding regularization operations to obtain an updated initial component monitoring model; and re-evaluating the performance of the updated initial component monitoring model based on the reserved historical target spectral data until an initial component monitoring model that meets the preset performance requirements is obtained, which is then used as the coal sample detection model.
[0030] Optionally, the initial performance evaluation of the component monitoring model based on the prediction results and the actual results of the corresponding reserved historical target spectral data includes: comparing the prediction results and the actual results of the corresponding reserved historical target spectral data, and evaluating the accuracy and recall of the model based on the deviation between the two; if either the accuracy or recall evaluation result fails, the initial performance evaluation of the component monitoring model fails.
[0031] Optionally, the method further includes: performing a neural network search based on the target spectral data, including: dividing the neural network into multiple optimization dimensions based on neural network structure parameters; adaptively adjusting the parameters within the corresponding neural network structure of each optimization dimension and calculating the MAE index after each adjustment; comparing the MAE indices corresponding to each parameter to determine the optimal parameter combination for the MAE index as the optimization result within the corresponding optimization dimension; performing a greedy search among the optimization dimensions to obtain the optimization results for each optimization dimension; and determining the structural parameters corresponding to each neural network structure based on the optimization results of each optimization dimension, and constructing the neural network corresponding to the search results.
[0032] Optionally, the optimization dimensions include: the basic operator dimension of the neural network layer, the resolution dimension of the input data, the network depth dimension, and the network width dimension.
[0033] Optionally, within the basic operator dimension of the neural network layer, the corresponding optimization result acquisition rules include: traversing the linear layer type and the activation function type of the nonlinear layer, adaptively combining the activation function types of the linear and nonlinear layers, calculating the MAE index after each combination; comparing the MAE index after each combination, selecting the combination corresponding to the optimal MAE index, and determining the activation function types of the linear and nonlinear layers corresponding to this combination, as the optimization result within the basic operator dimension of the neural network layer.
[0034] Optionally, performing a greedy search among the optimization dimensions to obtain the optimization results of each optimization dimension includes: determining a search order and performing a greedy search among the optimization dimensions based on the determined search order to obtain the optimization results of each optimization dimension.
[0035] Optionally, the search order is: search for basic operators, search for input resolution, search for network depth, and search for network width. Determining the search order and performing a greedy search across each optimization dimension based on that order to obtain optimization results for each dimension includes: determining the search range for basic operators; randomly selecting N sets of different configurations for input resolution, network depth, and network width; for each configuration, determining the optimal operator for each set; outputting N optimal operators from the N configurations; and selecting the operator that appears most frequently among the N optimal operators as the searched basic operator; determining the search range for input resolution; fixing the searched basic operator as the optimal configuration; randomly selecting M sets of different configurations for network depth and network width; and for each configuration, determining the optimal operator for each set of input resolution, input resolution, network depth, and network width. For each of the M optimal input resolutions, the most frequently occurring input resolution among the M optimal input resolutions is selected as the searched input resolution. The network depth search range is determined by fixing the searched basic operator and the searched input resolution as the optimal configuration. For each of the L randomized network widths, the optimal network depth for each configuration is determined. The L optimal network depths among the L configurations are selected as the searched network depth. Finally, the network width search range is determined by fixing the searched basic operator, the searched input resolution, and the searched network depth as the optimal configuration and searching for the optimal network width.
[0036] Optionally, the convolution type of the linear layer is: a fully connected layer, a 1D convolutional layer with a kernel size of 5, a 1D convolutional layer with a kernel size of 10, or a 1D convolutional layer with a kernel size of 15.
[0037] Optionally, the activation function type of the nonlinear layer is: TanH function, ELU function, Sigmoid activation function, or Softmax function.
[0038] Optionally, the calculation rules for the MAE indicator are as follows:
[0039]
[0040] in, Let y be the true value of the coal composition corresponding to the i-th training data; i is the model prediction value corresponding to the i-th training data; m is the size of the dataset.
[0041] Optionally, the coal composition test results include one or more of the following: ash content, ash amount, volatile matter, hydrocarbons, ash fusion point, total water, total sulfur, and calorific value.
[0042] Optionally, the method further includes visualizing the coal testing results, including: responding to a user data query command, determining the corresponding testing result object; selecting a preset data visualization scheme based on the corresponding testing result object, and pushing the visualized data to the user terminal.
[0043] A second aspect of the present invention provides a coal detection system, the system comprising: a detection unit for acquiring spectral data of a coal sample in response to a trigger signal that the coal sample has reached a detection position; a processing unit for processing near-infrared spectral signals and X-ray fluorescence spectral signals in the spectral data to obtain target spectral data; and an analysis unit for performing inference based on a coal sample detection model using the target spectral data to obtain coal detection results.
[0044] Optionally, the detection data includes: near-infrared spectral signals and X-ray fluorescence spectral signals; the processing unit is configured to: perform preprocessing on the near-infrared spectral signals and X-ray fluorescence spectral signals respectively; perform downsampling processing on the preprocessed near-infrared spectral signals and X-ray fluorescence spectral signals respectively, and scale the downsampled near-infrared spectral signals and X-ray fluorescence spectral signals to a normal distribution; and perform splicing processing on the normally distributed near-infrared spectral signals and normally distributed X-ray fluorescence spectral signals to obtain target spectral data.
[0045] Optionally, the preprocessing of the near-infrared spectral signal and the X-ray fluorescence spectral signal includes: performing Savitzky-Golay convolution smoothing on the near-infrared spectral signal and the X-ray fluorescence spectral signal respectively to obtain the Savitzky-Golay convolution smoothed near-infrared spectral signal and the Savitzky-Golay convolution smoothed X-ray fluorescence spectral signal; and performing area normalization on the Savitzky-Golay convolution smoothed near-infrared spectral signal.
[0046] Optionally, the downsampling processing of the preprocessed near-infrared spectral signal and the X-ray fluorescence spectral signal includes: performing downsampling processing on the X-ray fluorescence spectral signal after Savitzky-Golay convolution smoothing and the near-infrared spectral signal after area normalization, including: performing filtering processing on each spectral signal, retaining one sampling point at fixed intervals in the filtered spectral signal to obtain multiple sampling points; or, truncating multiple segments in the filtered spectral signal, and performing averaging processing on each sampling point in each segment to obtain one sampling point in each segment to obtain multiple sampling points; and performing signal reconstruction based on each sampling point to obtain the downsampled spectral signal.
[0047] Optionally, scaling the downsampled near-infrared spectral signal and X-ray fluorescence spectral signal to a normal distribution includes: calculating the statistical characteristics of each spectral signal; wherein the statistical characteristics are variance and / or standard deviation; performing standardization or normalization processing on each spectral signal based on the statistical characteristics of each spectral signal to scale the values of each spectral signal to a preset value range, thereby obtaining the scaled values of each spectral signal; and converting each spectral signal into a normal distribution based on a preset transformation algorithm and the scaled values of each spectral signal.
[0048] Optionally, a splicing process is performed on the normally distributed near-infrared spectral signal and the normally distributed X-ray fluorescence spectral signal to obtain target spectral data, including: performing an alignment operation on the normally distributed near-infrared spectral signal and the normally distributed X-ray fluorescence spectral signal; after completing the alignment of the normally distributed near-infrared spectral signal and the normally distributed X-ray fluorescence spectral signal, splicing the two spectral signals based on a weighted average to obtain initial target spectral data; verifying the initial target spectral data based on the normally distributed near-infrared spectral signal and / or the normally distributed X-ray fluorescence spectral signal, and using the verified initial target spectral data as the target spectral data.
[0049] Optionally, the training unit is also used to pre-train the coal sample detection model, including: acquiring historical near-infrared spectral signals and historical X-ray fluorescence spectral signals, and constructing corresponding historical target spectral data based on the historical near-infrared spectral signals and the historical X-ray fluorescence spectral signals; using the historical target spectral data as training data to initialize PLS model parameters; generating simulated samples based on the initialized PLS model, performing model training based on the simulated samples to obtain an initial model for component detection; and performing verification on the initial model for component detection based on reserved historical target spectral data to obtain a coal sample detection model.
[0050] Optionally, generating simulated samples based on the initialized PLS model includes: adaptively determining the signal type and signal parameters that match the target spectral data; generating a basic signal based on the signal type and signal parameters; adaptively selecting an augmentation scheme and performing data augmentation operation on the basic signal based on the selected augmentation scheme to obtain an augmented signal set; filtering out bias data from the augmented signal set and using the filtered augmented signal set as simulated samples.
[0051] Optionally, the adaptive selection of augmentation schemes includes: randomly selecting one or more schemes from noise addition, translation, scaling, rotation, shearing, and transformation as pre-selected schemes; randomly executing adjustment parameters within the preset adjustable parameter range of each pre-selected scheme to obtain a parameter-determined pre-selected scheme; if there is only one parameter-determined pre-selected scheme, then processing is directly performed on the basic signal based on that scheme to obtain an augmented signal; if there are multiple parameter-determined pre-selected schemes, then each scheme is executed sequentially to obtain an augmented signal.
[0052] Optionally, the training unit is further configured to perform neural network search based on the target spectral data, including: dividing the neural network into multiple optimization dimensions based on the structural parameters of the neural network; adaptively adjusting the parameters within the corresponding neural network structure within each optimization dimension, and calculating the MAE index after each adjustment; comparing the MAE indexes corresponding to each parameter, determining the optimal parameter combination for the MAE index as the optimization result within the corresponding optimization dimension; performing a greedy search among the optimization dimensions to obtain the optimization results for each optimization dimension; and determining the structural parameters corresponding to each neural network structure based on the optimization results of each optimization dimension, and constructing the neural network corresponding to the search results.
[0053] Optionally, the optimization dimensions include: the basic operator dimension of the neural network layer, the resolution dimension of the input data, the network depth dimension, and the network width dimension; within the basic operator dimension of the neural network layer, the corresponding optimization result acquisition rules include: traversing the linear layer types and traversing the activation function types of the nonlinear layers, adaptively combining the activation function types of the linear and nonlinear layers, calculating the MAE index after each combination; comparing the MAE index after each combination, selecting the combination corresponding to the optimal MAE index, and determining the activation function types of the linear and nonlinear layers corresponding to this combination, as the optimization result within the basic operator dimension of the neural network layer.
[0054] Optionally, the coal composition test results include one or more of the following: ash content, ash amount, volatile matter, hydrocarbons, ash fusion point, total water, total sulfur, and calorific value.
[0055] Optionally, the system further includes an output unit for visualizing the coal testing results; visualizing the coal testing results includes: responding to a user data query command, determining the corresponding testing result object; selecting a preset data visualization scheme based on the corresponding testing result object, and pushing the visualized data to the user terminal.
[0056] On the other hand, the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the aforementioned coal detection method.
[0057] Through the above technical solution, the present invention responds to the trigger signal when the coal sample arrives at the detection position to acquire spectral data of the coal sample; it fuses and processes near-infrared spectral signals and X-ray fluorescence spectral signals to obtain target spectral data; it uses a pre-trained coal sample detection model to train the target spectral data to obtain accurate inference results; the coal sample detection model uses a neural network based on the target spectral data for inference, improving detection accuracy; and it outputs the coal composition detection results for the corresponding coal sample, achieving precise component analysis. The present invention performs a suitable neural network search based on specific coal detection spectral signals, ensuring the adaptability of the neural network and improving the accuracy of coal composition detection.
[0058] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0059] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings:
[0060] Figure 1 This is a flowchart of the steps of a coal detection method provided in one embodiment of the present invention;
[0061] Figure 2 This is a flowchart of the spectral signal fusion process provided in one embodiment of the present invention;
[0062] Figure 3 This is a flowchart of a coal detection method including an output step provided by one embodiment of the present invention;
[0063] Figure 4 This is a system structure diagram of a coal detection system provided in one embodiment of the present invention;
[0064] Figure 5 This is a system structure diagram of a coal detection system including an output unit provided by one embodiment of the present invention. Detailed Implementation
[0065] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0066] Near-infrared spectroscopy (NIRS) is a valuable non-destructive analytical technique for detecting organic materials, and it has been widely applied and recognized in numerous research studies. Since coal is primarily composed of organic matter, containing various functional groups and minerals, NIRS is well-suited for coal quality analysis. Specifically, the spectral range of NIRS includes a broad absorption band sensitive to hydrogen-containing organic functional groups, which facilitates accurate and reliable analysis of coal quality. In contrast, X-ray fluorescence spectroscopy (XRF) is typically used for elemental analysis. In this process, high-energy X-rays are used to irradiate the material, exciting atoms and inducing energy absorption. When the excited atoms undergo electronic transitions back to their ground state, they release energy in the form of fluorescence. This fluorescence can be used to detect inorganic ash-forming elements such as aluminum (Al), silicon (Si), calcium (Ca), and other similar elements. By combining NIRS and XRF techniques, we can gain a more comprehensive understanding of the organic and inorganic composition of coal, thereby more accurately assessing its quality. This integrated approach will help improve the efficiency and accuracy of coal quality testing and promote the sustainable development of the coal industry.
[0067] Recent studies have explored coal composition detection using NIRS-XRF dual-spectral fusion, but these approaches typically employ simple network structures that lack precise adaptation to the specific coal composition detection task. Near-infrared spectroscopy (NIRS) excels at detecting molecular-level information, while X-ray fluorescence spectroscopy (XRF) is adept at extracting atomic-level information. Combining these two sensors with their distinct material sensing capabilities presents a significant challenge for linear techniques (such as partial least squares regression) and simple network structures.
[0068] To address this issue and ensure the accuracy of coal composition detection using dual-spectral signals, this invention proposes a dual-spectral signal fusion scheme and an adaptive neural network training scheme, achieving the technical effect of accurate coal composition prediction based on target spectral data.
[0069] In this embodiment of the invention, X-ray fluorescence spectral signal can also be called X-ray fluorescence spectral data, near-infrared spectral signal can also be called near-infrared spectral data, and target spectral data can also be called target spectral data.
[0070] Figure 1 This is a flowchart of a coal detection method provided in one embodiment of the present invention.Figure 1 As shown, an embodiment of the present invention provides a coal detection method, the method comprising:
[0071] Step S10: In response to the trigger signal that the coal sample has reached the detection position, the spectral data of the coal sample is acquired.
[0072] Specifically, the conveyor belt system of this invention will be integrated into the component detection equipment and connected to the detection module and coal sample detection model. When the coal sample reaches the preset detection position, the sensor will detect a trigger signal, and the conveyor belt will stop running to ensure accurate sample placement. Next, each detection module will automatically acquire spectral data from the coal sample, including near-infrared spectral signals and X-ray fluorescence spectral signals. This data will be transmitted to the data processing unit for fusion processing to obtain target spectral data. Subsequently, the pre-trained coal sample detection model will be trained using the target spectral data to obtain highly accurate inference results. The coal sample detection model is obtained through neural network training based on the target spectral data search, improving the model's learning ability and detection accuracy. Finally, based on the inference results, the system will output the coal component detection results for the corresponding coal sample. This automated process will greatly simplify the operation process, improve detection efficiency and accuracy, and reduce human error and time waste.
[0073] In this embodiment of the invention, the automated sample testing process reduces manual intervention and improves testing and production efficiency. Utilizing target spectral data and a coal sample testing model trained with a neural network improves testing accuracy and precision. The automatic conveyor belt stopping and automated testing process simplify operations, reducing operation time and the possibility of human error. Through automation, this invention enables real-time monitoring and data recording of coal samples, improving the controllability and traceability of the production process.
[0074] Furthermore, the detection data includes: near-infrared spectral signals, X-ray fluorescence spectral signals, and visual image data.
[0075] In this embodiment of the invention, fusing NIRS and X-ray fluorescence spectroscopic signals yields richer information. Combining the advantages of both technologies improves the comprehensive understanding and prediction capabilities of coal composition. NIRS and XRF technologies are complementary in information acquisition; NIRS is mainly used for the analysis of organic components and functional groups, while XRF is mainly used for elemental analysis. Fusion can overcome the limitations of each technology. Fusing NIRS and X-ray fluorescence spectroscopic signals improves the accuracy and stability of the prediction model. Combining the information from both technologies allows for more accurate prediction of various components and properties in coal. By fusing signals, the errors and uncertainties that may exist with a single technology can be reduced, improving the reliability and accuracy of the prediction results. The method of fusing NIRS and X-ray fluorescence spectroscopic signals is applicable to coal samples of different types and properties, exhibiting strong versatility and applicability. Based on this, the present invention predicts coal composition based on the splicing and fusion of NIRS and X-ray fluorescence spectroscopic signals. When acquiring coal composition data, it is necessary to simultaneously acquire both spectral signals.
[0076] Step S20: Process the near-infrared spectral signal and X-ray fluorescence spectral signal in the detection data to obtain the target spectral data.
[0077] Specifically, preprocessing is performed on the near-infrared spectral signals and X-ray fluorescence spectral signals respectively; downsampling is then performed on the preprocessed near-infrared spectral signals and X-ray fluorescence spectral signals respectively, and the downsampled near-infrared spectral signals and X-ray fluorescence spectral signals are scaled to a normal distribution; finally, the normally distributed near-infrared spectral signals and normally distributed X-ray fluorescence spectral signals are stitched together to obtain the target spectral data. Specifically, such as... Figure 2 This includes the following steps:
[0078] Step S201: Perform preprocessing on the near-infrared spectral signal and the X-ray fluorescence spectral signal respectively.
[0079] Specifically, Savitzky-Golay convolution smoothing was performed on the near-infrared spectral signal and the X-ray fluorescence spectral signal, respectively; and area normalization was performed on the near-infrared spectral signal after convolution smoothing.
[0080] Preferably, the step of performing Savitzky-Golay convolution smoothing on the near-infrared spectral signal and the X-ray fluorescence spectral signal includes: calculating the coefficients of the Savitzky-Golay convolution kernel based on a preset window size and polynomial order; performing a weighted average of the coefficients in the convolution kernel with adjacent data points in each spectral signal to obtain smoothed data points; performing symmetric expansion or zero-padding on the boundaries of each spectral signal; and obtaining the Savitzky-Golay convolution smoothed spectral signal based on the smoothed data points and the processed boundaries.
[0081] In this embodiment of the invention, Savitzky-Golay convolutional smoothing is a linear smoothing method. By locally fitting the data, it can effectively smooth data curves, eliminate spikes and fluctuations in the data, and make the data more stable and continuous. Savitzky-Golay convolutional smoothing can effectively smooth the noisy parts of the data while preserving the characteristics and trends of the signal. It helps reduce the interference of high-frequency noise in the data, improving data readability and analytical accuracy. Compared with other smoothing methods, Savitzky-Golay convolutional smoothing can better maintain the overall shape and trend of the data while smoothing it, without causing distortion or shift in the data shape, thus preserving the original characteristics of the data. Savitzky-Golay convolutional smoothing is a simple and efficient data smoothing method with fast computation speed, suitable for processing large-scale datasets. It can complete the data smoothing operation in a short time, making it suitable for large-scale coal sample testing, ensuring detection accuracy while improving detection efficiency.
[0082] Furthermore, the area normalization processing of the near-infrared spectral signal after convolution smoothing includes: determining the signal set of the near-infrared spectral signal after convolution smoothing; the signal set includes multiple signal samples and the reflectance of each signal sample at the corresponding preset wavelength point and the corresponding spectral type; and calculating the area-normalized signal based on the signal set of the near-infrared spectral signal.
[0083] In this embodiment of the invention, near-infrared spectral signals are prone to baseline drift. Therefore, this invention also eliminates baseline drift in near-infrared spectral signals through area normalization. Baseline drift is a signal shift caused by factors such as instrument drift, environmental changes, or sample differences, affecting the accuracy and stability of the spectral signal. Area normalization can shift the signal upwards or downwards, making the baseline level more stable. Differences in optical path length in near-infrared spectral signals lead to differences in signal intensity, affecting signal comparison and analysis. Area normalization can normalize the overall signal intensity, reducing the impact of optical path length differences on the signal, making comparisons between different samples more accurate. Area normalization can highlight characteristic peaks or troughs in near-infrared spectral signals, making the signal characteristics more obvious and prominent, which helps to more accurately identify and analyze specific components or features in the spectrum.
[0084] Specifically, the calculation rules for the signal after area normalization are as follows:
[0085]
[0086] in, This represents the NIR reflectance corresponding to the m-th wavelength point of the n-th sample; This is the signal after area normalization.
[0087] Step S202: Perform downsampling processing on the preprocessed near-infrared spectral signal and X-ray fluorescence spectral signal respectively.
[0088] Specifically, filtering is performed on each spectral signal. In the filtered spectral signal, a sampling point is retained at fixed intervals to obtain multiple sampling points; or multiple segments are extracted from the filtered spectral signal, and averaging is performed on each sampling point in each segment to obtain one sampling point in each segment to obtain multiple sampling points; signal reconstruction is performed based on each sampling point to obtain the downsampled spectral signal.
[0089] In this embodiment of the invention, downsampling can reduce the amount of data, i.e., reduce the sampling rate or the number of sampling points, thereby saving storage space and computing resources. Especially for large-scale datasets or high-frequency sampled data, downsampling can effectively reduce the data volume, facilitating storage and processing. Downsampling can simplify the data analysis process, reduce data complexity and dimensionality, making the data easier to understand and process. By reducing the resolution of the data, some detailed information can be removed, highlighting the main features of the data and simplifying the model building and analysis process. Downsampling can help remove noise and interference from the data, smooth data curves, and improve data quality and stability. By reducing the sampling rate or averaging sampling points, data volatility can be reduced, making the data clearer and more reliable. The solution of this invention, through interval sampling point retention and multi-segment averaging, can reduce data complexity and dimensionality, reduce data volume, and make the data easier to process and analyze. Furthermore, by reducing noise and interference in the signal, interval sampling point retention and averaging can further smooth the signal curve, reduce data volatility, and improve signal quality and stability.
[0090] Step S203: Scale the downsampled near-infrared spectral signal and X-ray fluorescence spectral signal to a normal distribution.
[0091] Specifically, the statistical characteristics of each spectral signal are calculated; wherein the statistical characteristics are variance and / or standard deviation; based on the statistical characteristics of each spectral signal, standardization or normalization processing is performed on each spectral signal to scale the values of each spectral signal to a preset range, thereby obtaining the scaled values of each spectral signal; based on the preset transformation algorithm and the scaled values of each spectral signal, each spectral signal is converted into a normal distribution.
[0092] In this embodiment of the invention, converting the signal to a normal distribution simplifies the data analysis process, making the data easier to understand and process. Converting the signal to a normal distribution improves the model's fitting effect and prediction accuracy. It also better meets the requirements of hypothesis testing, ensuring the validity of the test results. Furthermore, the normal distribution has the characteristic of standardization, with a mean of 0 and a standard deviation of 1. Converting the signal to a normal distribution standardizes the data, making different signals comparable and facilitating subsequent stitching of two spectral signals.
[0093] Step S204: Perform splicing processing on the normally distributed near-infrared spectral signal and the normally distributed X-ray fluorescence spectral signal to obtain the target spectral data.
[0094] Specifically, the process involves aligning normally distributed near-infrared spectral signals and normally distributed X-ray fluorescence spectral signals; after alignment, the two spectral signals are spliced together based on a weighted average to obtain initial target spectral data; the initial target spectral data is then verified based on the normally distributed near-infrared spectral signals and / or normally distributed X-ray fluorescence spectral signals, and the verified initial target spectral data is used as the target spectral data.
[0095] Furthermore, the alignment operation of the normally distributed near-infrared spectral signal and the normally distributed X-ray fluorescence spectral signal includes: selecting the same reference point in the normally distributed near-infrared spectral signal and the normally distributed X-ray fluorescence spectral signal, and calculating the time difference between the corresponding reference point and other data points in each spectral signal to obtain a time difference sequence; and performing time axis adjustment of one of the spectral signals based on random interpolation and the corresponding time difference sequence until the time axes of the two spectral signals are aligned.
[0096] Furthermore, the random interpolation method is as follows:
[0097] X aug =X1 + (1 -)X2, α∈[0,1]
[0098] y aug = PLS ( aug )
[0099] Among them, f PLS Represents the PLS mapping function; X aug and y aug X1 and X2 represent the synthesized NIRS-XRF signal and the corresponding pseudo-label, respectively; α represents the interpolation weight for random sampling in the range [0,1]; X1 and X2 are signal samples randomly selected from the historical NIRS-XRF signals of the coal sample.
[0100] In this embodiment of the invention, the solution performs two spectral signal splicing based on random interpolation. This preserves the characteristics and information of the original data during the splicing process, avoiding data loss or distortion. Splicing signals through interpolation better maintains data integrity. Random interpolation enables smooth transitions in the signal splicing transition region, avoiding abrupt changes or discontinuities, which helps improve the continuity and stability of the signal splicing. Random interpolation parameters, such as the number of interpolation points and the selection of the interpolation function, can be adjusted as needed, allowing for flexible control of the signal splicing effect. This makes the signal splicing process more customizable, allowing for customized settings based on user testing requirements. Random interpolation effectively reduces artifacts and distortions that may occur during signal splicing, improving the quality and accuracy of the splicing. By appropriately selecting interpolation methods and parameters, errors introduced by signal splicing can be reduced, thereby improving subsequent detection accuracy.
[0101] Step S30: Perform target spectral data inference based on the pre-trained coal sample detection model to obtain the inference results.
[0102] Specifically, the coal sample detection model is as follows:
[0103]
[0104] Where f(·|θ) is a deep neural network with θ as a parameter; For target spectral data; It is a component of coal.
[0105] In one possible implementation, the present invention utilizes a deep neural network to construct a prediction model for coal composition prediction, and establishes a mapping between the input NIRS-XRF fused spectrum and the corresponding real component labels through an end-to-end training method. Let... This indicates the input signal after preprocessing. This represents the true value of the corresponding coal composition. X n ∈R D It is a splicing of NIRS and XRF spectra after preprocessing in step S20. n It is a non-negative scalar label. N and D are the number of training set samples and the input resolution, respectively. Note that since X... nDownsampling can be performed on the original data, so D can be smaller than the resolution of the original data. f(·|θ) is a deep neural network with θ as a parameter, which can consist of multiple linear and nonlinear layers. The nonlinear layers here are also called activation layers. A linear layer is usually followed by a nonlinear layer, and their combination forms a module. In this paper, the network consists of multiple identical modules stacked sequentially, ending with a fully connected layer that outputs a scalar value y. Specifically, the basic operators of the linear layers can be fully connected layers or 1D convolutional layers with different kernel sizes, while the basic operators of the nonlinear layers can be hyperbolic tangent (TanH), exponential linear unit (ELU), or sigmoid function, etc.
[0106] Preferably, the method further includes: pre-training a coal sample detection model, including: acquiring historical near-infrared spectral signals and historical X-ray fluorescence spectral signals, and constructing corresponding historical target spectral data based on the historical near-infrared spectral signals and the historical X-ray fluorescence spectral signals; using the historical target spectral data as training data to initialize PLS model parameters; generating simulated samples based on the initialized PLS model, performing model training based on the simulated samples to obtain an initial model for component detection; and performing verification on the initial model for component detection based on reserved historical target spectral data to obtain a coal sample detection model.
[0107] In this embodiment of the invention, obtaining an accurate detection model requires a large amount of historical data as training samples for model training. However, it is difficult to obtain comprehensive historical data due to issues of historical data retention and data interoperability. Therefore, it is difficult to train an accurate detection model based on existing historical data. Based on this, the present invention proposes a pre-training scheme based on the PLS model.
[0108] In this embodiment of the invention, historical target spectral data is used as training data to initialize the parameters of the partial least squares regression (PLS) model, laying the foundation for subsequent model training. Based on the initialized PLS model, simulated sample data is generated for model training, expanding the training dataset and improving the model's generalization ability. Using the simulated sample data for model training, an initial component detection model is established by learning the patterns and features of historical data.
[0109] Preferably, the PLS model parameters include: weights, biases, mean and variance of the training set input data, and mean and variance of the output data.
[0110] In one possible implementation, first, the covariance matrix between the training data X and Y is calculated. Then, typically using NIPALS (or other algorithms), an initial principal component set is extracted to cleverly capture the relationship between X and Y. The extracted principal components are used as new input variables (independent variables) to construct a linear regression model for Y (here, a least squares linear model is sufficient). New principal components are then extracted from the remaining X residuals, and the regression in step 2 is performed until predetermined stopping criteria are met, such as the cumulative explained variance reaching a set threshold, the number of extracted principal components reaching a preset value, or the number of iterations reaching a preset limit.
[0111] Preferably, the step of generating simulated samples based on the initialized PLS model includes: adaptively determining the signal type and signal parameters that match the target spectral data, generating a basic signal based on the signal type and the signal parameters; adaptively selecting an augmentation scheme, and performing a data augmentation operation on the basic signal based on the selected augmentation scheme to obtain an augmented signal set; filtering out bias data from the augmented signal set, and using the filtered augmented signal set as simulated samples.
[0112] In this embodiment of the invention, adaptive algorithms and machine learning techniques are used to determine the optimal signal type and parameter combination to match the characteristics and variations of different spectral signals. Based on the determined signal type and parameters, a basic signal is generated as the basis for the augmented signal set. According to data characteristics and model requirements, an augmentation scheme is adaptively selected, including data interpolation and noise reduction, to improve data quality and model performance. The selected augmentation scheme, such as data interpolation and noise addition, is performed on the basic signal to generate a diverse augmented signal set. After completing the data augmentation operation, an augmented signal set containing diverse signals is obtained to enrich the training data and improve the model's generalization ability and robustness. Bias data is filtered within the augmented signal set to identify and remove data points that may introduce errors, ensuring the accuracy and reliability of the training data. Model training and validation improve the model's adaptability to uncertainty and noise.
[0113] In this embodiment of the invention, the adaptive selection of augmentation scheme includes: randomly selecting one or more schemes as pre-selected schemes from noise addition, translation, scaling, rotation, shearing, and transformation; randomly executing adjustment parameters within the preset adjustable parameter range of each pre-selected scheme to obtain a parameter-determined pre-selected scheme; if there is only one parameter-determined pre-selected scheme, then processing is directly performed on the basic signal based on that scheme to obtain an augmented signal; if there are multiple parameter-determined pre-selected schemes, then each scheme is executed sequentially to obtain an augmented signal.
[0114] Furthermore, the step of filtering out deviation data from the augmented signal set and using the filtered augmented signal set as a simulation sample includes: calculating the Euclidean distance between each augmented signal and the base signal in each augmented signal set; filtering out augmented signals with an Euclidean distance greater than a preset Euclidean distance threshold; and using the filtered augmented signal set as a simulation sample.
[0115] In this embodiment of the invention, the present invention adaptively determines the augmentation scheme, which can randomly generate a large number of simulated signals to simulate detection signals under various coal quality conditions, ensuring data comprehensiveness and making up for the problem that insufficient historical data makes it impossible to train an accurate detection model.
[0116] Furthermore, the step of performing model training based on the simulated samples to obtain an initial model for component detection includes: performing pseudo-labeling on the simulated samples based on the parameter-initialized PLS model, and using the labeled simulated samples as training samples; and performing model training in a neural network based on the target spectral data search based on the training samples to obtain an initial model for component detection.
[0117] In this embodiment of the invention, after obtaining the augmented dataset, it is also necessary to label the coal components corresponding to the dataset to facilitate model training based on the simulated signals corresponding to the coal components. Therefore, the augmented signals in the augmented signal set need to be labeled with coal components, so that each augmented signal corresponds to a simulated coal component prediction result. After annotation, the corresponding training samples are obtained. Model training is then performed based on these training samples to obtain the corresponding detection model. However, to ensure the accuracy of the model, it is also necessary to validate the model.
[0118] Furthermore, the step of validating the initial component detection model based on reserved historical target spectral data to obtain a coal sample detection model includes: constructing a validation set based on the reserved historical target spectral data and inputting the validation set into the initial component monitoring model to obtain corresponding prediction results; performing a performance evaluation of the initial component monitoring model based on the prediction results and the actual results of the corresponding reserved historical target spectral data; if the performance evaluation of the initial component monitoring model fails, adjusting hyperparameters, optimizing the model structure, and / or adding regularization operations are performed to obtain an updated initial component monitoring model; and re-evaluating the performance of the updated initial component monitoring model based on the reserved historical target spectral data until an initial component monitoring model that meets the preset performance requirements is obtained, which serves as the coal sample detection model.
[0119] In this embodiment of the invention, a validation set is input into the initial model for component detection to obtain prediction results, which are then compared with actual results for performance evaluation and error analysis. Based on the performance evaluation results, if the model fails to meet preset performance requirements, hyperparameters are adjusted, model structure is optimized, and regularization operations are added to improve the model's accuracy and stability. The performance evaluation is repeated based on the adjusted model until an initial model for component detection that meets the preset performance requirements is obtained, which serves as the updated coal sample detection model. This invention achieves continuous optimization and iteration of the coal sample detection model through repeated verification, evaluation, and adjustment, improving the model's performance and accuracy. A validation set based on reserved historical target spectral data allows for more accurate evaluation of the model's performance and generalization ability, improving the reliability of model evaluation. Based on the performance evaluation results, hyperparameters and model structure are adjusted in a timely manner to better adapt the model to data characteristics and task requirements, improving the accuracy of component detection. By adding regularization operations and other methods, the model's stability and generalization ability are improved, reducing the risk of overfitting and enhancing its robustness.
[0120] Preferably, the initial performance evaluation of the component monitoring model based on the prediction results and the actual results of the corresponding reserved historical target spectral data includes: comparing the prediction results and the actual results of the corresponding reserved historical target spectral data, and evaluating the accuracy and recall of the model based on the deviation between the two; if either the accuracy or recall evaluation result fails, the initial performance evaluation of the component monitoring model fails.
[0121] Preferably, the neural network search based on the target spectral data includes: dividing the neural network into multiple optimization dimensions based on the neural network structure parameters; adaptively adjusting the parameters within the corresponding neural network structure of each optimization dimension and calculating the MAE index after each adjustment; comparing the MAE indices corresponding to each parameter to determine the optimal parameter combination for the MAE index as the optimization result within the corresponding optimization dimension; performing a greedy search among the optimization dimensions to obtain the optimization results for each optimization dimension; and determining the structural parameters corresponding to each neural network structure based on the optimization results of each optimization dimension, and constructing the neural network corresponding to the search results.
[0122] Furthermore, the optimization dimensions include: the basic operator dimension of the neural network layer, the resolution dimension of the input data, the network depth dimension, and the network width dimension.
[0123] In one possible implementation, the following steps are specifically included:
[0124] 1) Determine the search order, such as basic operators, input resolution, network depth, and network width.
[0125] 2) Search for basic operators and determine the search range for basic operators (combination of linear and nonlinear layers). Randomly select 10 (or more) different configurations of input resolution, network depth and network width. For each configuration, determine the optimal operator for each configuration. The 10 configurations will output 10 optimal operators (these 10 optimal operators are not necessarily the same operator). Finally, the operator that appears most frequently among the 10 optimal operators is selected as the basic operator.
[0126] 3) Search for input resolution and determine the search range for input resolution. Since the optimal operator has been determined in step 2, we fix the basic operator to the optimal configuration, randomly select 10 different network depths and network widths, and determine the optimal input resolution for each configuration. The 10 configurations will output 10 optimal input resolutions. Finally, the input resolution that appears most frequently among the 10 optimal input resolutions is taken as the searched input resolution.
[0127] 4) Search for network depth and determine the search range. Since the optimal operator and optimal input resolution have been determined in steps 2 and 3, we fix the basic operator and input resolution to the optimal configuration, randomly select 10 different network widths, and determine the optimal network depth for each configuration. The 10 configurations will output 10 optimal network depths. Finally, the network depth that appears most frequently among the 10 optimal network depths is taken as the searched network depth.
[0128] 5) Search for network width and determine the search range for network width. Since the optimal operator, optimal input resolution, and optimal network depth have been determined in steps 2, 3, and 4, we fix the basic operator, input resolution, and network depth to the optimal configuration, search for the optimal network width, and finally determine the optimal network width.
[0129] In this embodiment of the invention, the proposed inherited greedy search is as follows: assuming there are N dimensions to be searched, and the i-th dimension has been searched, we fix the 0-i-1 dimension as the optimal configuration that has been searched, randomly select M groups of configurations for the i+1 to N dimensions, output the optimal configuration for the i-th dimension in the M groups, and select the configuration that appears most frequently among the M optimal configurations for the i-th dimension as the optimal configuration.
[0130] Based on the scheme of this invention, assuming that there are No, Nr, Nd and Nw candidates for basic operators, input resolution, network depth and network width respectively, the complexity of the exhaustive search method by enumeration is O(No Nr NdNw). Our proposed greedy search method can reduce this complexity to O(No+Nr+Nd+Nw), thereby significantly improving the search efficiency and benefiting model updates and deployments in practical applications.
[0131] In this embodiment of the invention, the neural network dimensions affecting NIRS-XRF dual-spectral fusion include the basic operators of linear and nonlinear layers, the resolution of the input data, the network depth (the number of stacked modules), and the network width (the output channels of the linear layer). The present invention decomposes the search process for these four dimensions into four stages, with each stage searching a single dimension and performing a greedy search across all dimensions.
[0132] In this embodiment of the invention, within the basic operator dimension of the neural network layer, the corresponding optimization result acquisition rules include: traversing the convolution type of the linear layer and the activation function type of the nonlinear layer, adaptively combining the convolution type of the fully connected layer and the activation function type of the nonlinear layer, calculating the MAE index after each combination; comparing the MAE index after each combination, selecting the combination corresponding to the largest MAE index, and determining the convolution type of the fully connected layer and the activation function type of the nonlinear layer corresponding to this combination, as the optimization result within the basic operator dimension of the neural network layer.
[0133] Furthermore, the convolution type of the linear layer is: a fully connected layer, a 1D convolutional layer with a kernel size of 5, a 1D convolutional layer with a kernel size of 10, or a 1D convolutional layer with a kernel size of 15.
[0134] Furthermore, the activation function type of the nonlinear layer is: TanH function, ELU function, Sigmoid activation function, or Softmax function.
[0135] Furthermore, the calculation rules for the MAE indicator are as follows:
[0136]
[0137] in, Let y be the true value of the coal composition corresponding to the i-th training data; i is the model prediction value corresponding to the i-th training data; m is the size of the dataset.
[0138] In this embodiment of the invention, the scheme generates N (N=10) different initial network configurations to repeat the search process multiple times. These configurations have different input resolutions, network depths, and network widths. The cross-validation MAE is calculated for each of the different random network initialization configurations. These N results are used to vote on the optimal settings for the first-stage basic operators to determine the final search result.
[0139] Furthermore, the present invention freezes the basic operator settings for both linear and nonlinear operations in several other dimensions. A similar process to the first stage is employed in the search of the remaining three dimensions. Ultimately, a network configuration with optimal basic operator, input resolution, network depth, and network width settings is generated to model target spectral data for coal composition prediction.
[0140] In this embodiment of the invention, an automated neural network structure search strategy is proposed to automatically search for the optimal configuration for predicting coal composition from target spectral data. This method avoids manual network design, enabling the output of the optimal neural network structure without requiring extensive knowledge of the specialized features of the target spectral data. This neural network structure can fully capture the complex features in NIRS and XRF data and effectively fuse information from these two different sources. Notably, the automated neural network search strategy is also highly efficient. Assuming there are No, Nr, Nd, and Nw candidate basic operators, input resolution, network depth, and network width, respectively, the complexity of the exhaustive search method through enumeration is O(n log n). Our proposed greedy search method can reduce this complexity to [value missing]. This significantly improves search efficiency and is beneficial for model updates and deployment in practical applications.
[0141] In another possible implementation, such as Figure 3 The method further includes:
[0142] Step S40: Output the coal composition detection results of the corresponding coal sample based on the reasoning results.
[0143] Preferably, or optionally, the test results of the coal sample include one or more of the following: ash composition, ash content, volatile matter, hydrocarbons, ash fusion point, total water, total sulfur, and calorific value.
[0144] In this embodiment of the invention, the invention can achieve the following coal detection target detection:
[0145] 1) Ash composition analysis: Coal is a complex organic material containing various elements and compounds. Ash is the inorganic substance remaining after coal combustion, including minerals, soil, and metal oxides. The ash content has a significant impact on the combustion characteristics and utilization value of coal.
[0146] 2) Ash content analysis: Ash content is the content of non-combustible substances in coal, which can be inferred from specific characteristic peaks in the spectral signal. Accurate determination of ash content is crucial for assessing the purity and combustion characteristics of coal.
[0147] 3) Volatile matter analysis: Volatile matter content refers to the amount of gas and liquid that evaporates from coal during the heating process. The volatile matter content in a coal sample can be inferred by changes in the spectral signal, which is crucial for understanding the combustion characteristics and stability of coal.
[0148] 4) Carbon-hydrogen analysis: Carbon-hydrogen analysis of coal refers to the process of quantitatively analyzing the carbon (C) and hydrogen (H) content in coal samples. Through carbon-hydrogen analysis, the ratio of carbon and hydrogen elements in coal can be understood, thereby inferring the calorific value, combustion characteristics and chemical properties of coal.
[0149] 5) Ash Fusion Point Analysis: The ash fusion point of coal refers to the temperature at which the ash in coal melts during heating. A high ash fusion point reflects the solubility of the ash in the coal. Coal with a lower ash fusion point is more prone to forming slag during combustion, which adversely affects combustion equipment and the environment. Coal with a higher ash fusion point is more suitable for combustion, reducing ash and slag problems during combustion. Ash fusion point analysis can help researchers and engineers select appropriate coal types, optimize combustion processes, reduce environmental pollution, and improve energy efficiency.
[0150] 6) Total Moisture Analysis: Total moisture analysis of coal refers to the process of analyzing and determining the total moisture content in a coal sample. The results of total moisture analysis help researchers and engineers understand the moisture content of coal, which in turn affects the coal's combustion performance, combustion efficiency, and temperature control during combustion. Coal with high moisture content consumes more heat to evaporate moisture during combustion, reducing combustion efficiency and increasing flue gas emissions.
[0151] 7) Total Sulfur Analysis: Total sulfur analysis of coal refers to the process of analyzing and determining the content of all sulfur elements in a coal sample. The results of total sulfur analysis can help researchers and engineers understand the sulfur content in coal, thereby assessing the combustion characteristics of coal, the sulfur emissions in combustion products, and the potential environmental impacts during combustion. High-sulfur coal produces sulfur oxides and sulfuric acid mist during combustion, which have negative impacts on the environment and health.
[0152] 8) Calorific Value Analysis: Calorific value analysis of coal refers to the process of measuring and analyzing the heat released during coal combustion. The calorific value of coal is one of the important indicators for evaluating coal combustion performance and energy utilization efficiency. Coal with higher calorific value usually has higher combustion efficiency, providing more heat energy and reducing energy consumption costs. Therefore, calorific value analysis of coal is of great significance for selecting suitable fuels, optimizing combustion processes, and assessing energy utilization efficiency.
[0153] Preferably, the method further includes visualizing the coal testing results. Visualizing the coal testing results includes: responding to a user data query command, determining the corresponding testing result object; selecting a preset data visualization scheme based on the corresponding testing result object, and pushing the visualized data to the user terminal.
[0154] Furthermore, for different test result objects, the system can select a preset data visualization scheme to display the test results in intuitive charts, curves, or images, making it easier for users to understand and analyze. After data visualization processing, the system pushes the visualized data to the user's end, allowing users to intuitively view the various test results of the coal sample through the interface, helping them make decisions and assessments.
[0155] Specifically, this invention, based on the reasoning results, organizes and stores the coal composition detection results output by the model for subsequent display and analysis. Utilizing data visualization technology, the coal composition detection results are displayed in the form of charts, images, etc., intuitively presenting the composition information of the coal sample. A result display interface is designed, allowing users to input coal sample information and view the corresponding composition detection results, enabling personalized display and querying of results. Real-time result updates are implemented; when new coal samples are tested, the displayed composition detection results are updated promptly to maintain data timeliness and accuracy. Result interpretation and analysis functions are provided, explaining the content and significance of each component to help users better understand the composition and characteristics of the coal sample.
[0156] In this embodiment of the invention, coal composition testing results are displayed through data visualization, making complex data intuitive and easy to understand, thus improving users' understanding and analytical capabilities regarding coal sample composition. A user-friendly results display interface is designed, allowing users to easily and quickly query and view coal composition testing results, enhancing user experience and operational efficiency. Real-time updates of the displayed results allow users to stay informed about the latest coal composition testing information, providing timely feedback and support for decision-making. Through result interpretation and analysis functions, users gain a deeper understanding of the content and influencing factors of coal components, providing scientific basis and guidance for coal production and utilization. This invention enables the output and display of coal sample composition testing results, providing the coal industry with more intelligent and convenient composition testing services, and promoting the effective management and utilization of coal resources.
[0157] Figure 4 This is a system structure diagram of a coal detection system provided in one embodiment of the present invention. Figure 4As shown, this embodiment of the invention provides a coal detection system, the system comprising: a detection unit for acquiring spectral data of the coal sample in response to a trigger signal that the coal sample has reached the detection position; a processing unit for processing the near-infrared spectral signal and X-ray fluorescence spectral signal in the spectral data to obtain target spectral data; and an analysis unit for performing target spectral data inference based on a coal sample detection model to obtain coal detection results.
[0158] Optionally, the processing unit is configured to: perform preprocessing on the near-infrared spectral signal and the X-ray fluorescence spectral signal respectively; perform downsampling on the preprocessed near-infrared spectral signal and the X-ray fluorescence spectral signal respectively, and scale the downsampled near-infrared spectral signal and the X-ray fluorescence spectral signal to a normal distribution; and perform splicing on the normally distributed near-infrared spectral signal and the normally distributed X-ray fluorescence spectral signal to obtain the target spectral data.
[0159] Optionally, preprocessing is performed on the near-infrared spectral signal and the X-ray fluorescence spectral signal, including: performing Savitzky-Golay convolution smoothing on the near-infrared spectral signal and the X-ray fluorescence spectral signal after Savitzky-Golay convolution smoothing to obtain the near-infrared spectral signal and the X-ray fluorescence spectral signal after Savitzky-Golay convolution smoothing; and performing area normalization on the near-infrared spectral signal after Savitzky-Golay convolution smoothing.
[0160] Optionally, downsampling processing is performed on the preprocessed near-infrared spectral signal and X-ray fluorescence spectral signal, including: performing downsampling processing on the X-ray fluorescence spectral signal after Savitzky-Golay convolution smoothing and the near-infrared spectral signal after area normalization, including: performing filtering processing on each spectral signal, retaining one sampling point at fixed intervals in the filtered spectral signal to obtain multiple sampling points; or, truncating multiple segments in the filtered spectral signal, and performing averaging processing on each sampling point in each segment to obtain one sampling point in each segment to obtain multiple sampling points; and performing signal reconstruction based on each sampling point to obtain the downsampled spectral signal.
[0161] Optionally, the downsampled near-infrared spectral signal and X-ray fluorescence spectral signal are scaled to a normal distribution, including: calculating the statistical characteristics of each spectral signal respectively; wherein the statistical characteristics are variance and / or standard deviation; based on the statistical characteristics of each spectral signal, performing standardization or normalization processing on each spectral signal to scale the value of each spectral signal to a preset value range, and obtaining the scaled value of each spectral signal; based on a preset transformation algorithm and the scaled value of each spectral signal, converting each spectral signal into a normal distribution.
[0162] Optionally, a stitching process is performed on the normally distributed near-infrared spectral signal and the normally distributed X-ray fluorescence spectral signal to obtain target spectral data, including: performing an alignment operation on the normally distributed near-infrared spectral signal and the normally distributed X-ray fluorescence spectral signal; after completing the alignment of the normally distributed near-infrared spectral signal and the normally distributed X-ray fluorescence spectral signal, stitching the two spectral signals based on a weighted average to obtain initial target spectral data; verifying the initial target spectral data based on the normally distributed near-infrared spectral signal and / or the normally distributed X-ray fluorescence spectral signal, and using the verified initial target spectral data as the target spectral data.
[0163] Optionally, the training unit is also used for pre-training the coal sample detection model, including: acquiring historical near-infrared spectral signals and historical X-ray fluorescence spectral signals, and constructing corresponding historical target spectral data based on the historical near-infrared spectral signals and historical X-ray fluorescence spectral signals; using the historical target spectral data as training data to initialize the PLS model parameters; generating simulated samples based on the initialized PLS model, performing model training based on the simulated samples to obtain the initial model for component detection; and performing verification on the initial model for component detection based on the reserved historical target spectral data to obtain the coal sample detection model.
[0164] Optionally, generating simulation samples based on the initialized PLS model includes: adaptively determining the signal type and signal parameters that match the target spectral data, generating a basic signal based on the signal type and signal parameters; adaptively selecting an augmentation scheme, and performing data augmentation operation on the basic signal based on the selected augmentation scheme to obtain an augmented signal set; filtering out bias data from the augmented signal set, and using the filtered augmented signal set as simulation samples.
[0165] Optionally, the adaptive selection of augmentation schemes includes: randomly selecting one or more schemes from noise addition, translation, scaling, rotation, shearing, and transformation as pre-selected schemes; randomly executing adjustment parameters within the preset adjustable parameter range of each pre-selected scheme to obtain a parameter-determined pre-selected scheme; if there is only one parameter-determined pre-selected scheme, then processing is directly performed on the basic signal based on that scheme to obtain an augmented signal; if there are multiple parameter-determined pre-selected schemes, then each scheme is executed sequentially to obtain an augmented signal.
[0166] Optionally, the training unit is also used to perform neural network search based on the target spectral data, including: dividing the neural network into multiple optimization dimensions based on the structural parameters of the neural network; adaptively adjusting the parameters within the corresponding neural network structure within each optimization dimension, and calculating the MAE index after each adjustment; comparing the MAE indexes corresponding to each parameter, determining the optimal parameter combination for the MAE index as the optimization result within the corresponding optimization dimension; performing a greedy search between each optimization dimension to obtain the optimization result for each optimization dimension; and determining the structural parameters of each neural network structure based on the optimization results of each optimization dimension, and constructing the neural network corresponding to the search result.
[0167] Optionally, the optimization dimensions include: the basic operator dimension of the neural network layer, the resolution dimension of the input data, the network depth dimension, and the network width dimension. Within the basic operator dimension of the neural network layer, the corresponding optimization result acquisition rules include: traversing the convolution type of the linear layer and the activation function type of the nonlinear layer, adaptively combining the convolution type of the fully connected layer and the activation function type of the nonlinear layer, and calculating the MAE index after each combination; comparing the MAE index after each combination, selecting the combination corresponding to the maximum MAE index, and determining the convolution type of the fully connected layer and the activation function type of the nonlinear layer corresponding to this combination, as the optimization result within the basic operator dimension of the neural network layer.
[0168] Preferably, or optionally, the test results of the coal sample include one or more of the following: ash composition, ash content, volatile matter, hydrocarbons, ash fusion point, total water, total sulfur, and calorific value.
[0169] In this embodiment of the invention, the invention can achieve the following coal detection target detection:
[0170] 1) Ash composition analysis: Coal is a complex organic material containing various elements and compounds. Ash is the inorganic substance remaining after coal combustion, including minerals, soil, and metal oxides. The ash content has a significant impact on the combustion characteristics and utilization value of coal.
[0171] 2) Ash content analysis: Ash content is the content of non-combustible substances in coal, which can be inferred from specific characteristic peaks in the spectral signal. Accurate determination of ash content is crucial for assessing the purity and combustion characteristics of coal.
[0172] 3) Volatile matter analysis: Volatile matter content refers to the amount of gas and liquid that evaporates from coal during the heating process. The volatile matter content in a coal sample can be inferred by changes in the spectral signal, which is crucial for understanding the combustion characteristics and stability of coal.
[0173] 4) Carbon-hydrogen analysis: Carbon-hydrogen analysis of coal refers to the process of quantitatively analyzing the carbon (C) and hydrogen (H) content in coal samples. Through carbon-hydrogen analysis, the ratio of carbon and hydrogen elements in coal can be understood, thereby inferring the calorific value, combustion characteristics and chemical properties of coal.
[0174] 5) Ash Fusion Point Analysis: The ash fusion point of coal refers to the temperature at which the ash in coal melts during heating. A high ash fusion point reflects the solubility of the ash in the coal. Coal with a lower ash fusion point is more prone to forming slag during combustion, which adversely affects combustion equipment and the environment. Coal with a higher ash fusion point is more suitable for combustion, reducing ash and slag problems during combustion. Ash fusion point analysis can help researchers and engineers select appropriate coal types, optimize combustion processes, reduce environmental pollution, and improve energy efficiency.
[0175] 6) Total Moisture Analysis: Total moisture analysis of coal refers to the process of analyzing and determining the total moisture content in a coal sample. The results of total moisture analysis help researchers and engineers understand the moisture content of coal, which in turn affects the coal's combustion performance, combustion efficiency, and temperature control during combustion. Coal with high moisture content consumes more heat to evaporate moisture during combustion, reducing combustion efficiency and increasing flue gas emissions.
[0176] 7) Total Sulfur Analysis: Total sulfur analysis of coal refers to the process of analyzing and determining the content of all sulfur elements in a coal sample. The results of total sulfur analysis can help researchers and engineers understand the sulfur content in coal, thereby assessing the combustion characteristics of coal, the sulfur emissions in combustion products, and the potential environmental impacts during combustion. High-sulfur coal produces sulfur oxides and sulfuric acid mist during combustion, which have negative impacts on the environment and health.
[0177] 8) Calorific Value Analysis: Calorific value analysis of coal refers to the process of measuring and analyzing the heat released during coal combustion. The calorific value of coal is one of the important indicators for evaluating coal combustion performance and energy utilization efficiency. Coal with higher calorific value usually has higher combustion efficiency, providing more heat energy and reducing energy consumption costs. Therefore, calorific value analysis of coal is of great significance for selecting suitable fuels, optimizing combustion processes, and assessing energy utilization efficiency.
[0178] Preferred, such as Figure 5 The system further includes an output unit for visualizing the coal testing results. Visualizing the coal testing results includes: responding to a user data query command, determining the corresponding testing result object; selecting a preset data visualization scheme based on the corresponding testing result object, and pushing the visualized data to the user terminal.
[0179] Furthermore, for different test result objects, the system can select a preset data visualization scheme to display the test results in intuitive charts, curves, or images, making it easier for users to understand and analyze. After data visualization processing, the system pushes the visualized data to the user's end, allowing users to intuitively view the various test results of the coal sample through the interface, helping them make decisions and assessments.
[0180] The present invention also provides a computer-readable storage medium storing instructions which, when executed on a computer, cause the computer to perform the coal detection method described above.
[0181] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a microcontroller, chip, or processor to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0182] The optional embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the embodiments of the present invention are not limited to the specific details described above. Within the scope of the technical concept of the embodiments of the present invention, various simple modifications can be made to the technical solutions of the embodiments of the present invention, and these simple modifications all fall within the protection scope of the embodiments of the present invention. It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the embodiments of the present invention will not further describe the various possible combinations.
[0183] Furthermore, various different embodiments of the present invention can be combined in any way, as long as they do not violate the spirit of the embodiments of the present invention, they should also be regarded as the content disclosed by the embodiments of the present invention.
Claims
1. A method for detecting coal, characterized in that, The method includes: In response to the trigger signal that the coal sample has reached the detection position, the spectral data of the coal sample is acquired; Preprocessing was performed on the near-infrared spectral signals and the X-ray fluorescence spectral signals respectively; The preprocessed near-infrared spectral signals and X-ray fluorescence spectral signals were downsampled and then scaled to a normal distribution. The target spectral data is obtained by splicing normally distributed near-infrared spectral signals and normally distributed X-ray fluorescence spectral signals. Based on the coal sample detection model, target spectral data inference is performed to obtain coal detection results; among which... Before performing target spectral data inference based on the coal sample detection model, the method further includes pre-training the coal sample detection model, including: acquiring historical near-infrared spectral signals and historical X-ray fluorescence spectral signals, and constructing corresponding historical target spectral data based on the historical near-infrared spectral signals and historical X-ray fluorescence spectral signals; using the historical target spectral data as training data to initialize PLS model parameters; generating simulated samples based on the initialized PLS model, performing model training based on the simulated samples to obtain an initial model for component detection; and fine-tuning the initial model for component detection based on reserved historical target spectral data to obtain the coal sample detection model. The PLS model parameters include: weights, biases, mean and variance of the training set input data, and mean and variance of the output data; The process of generating simulated samples based on the initialized PLS model includes: adaptively determining the signal type and signal parameters that match the target spectral data; generating a basic signal based on the signal type and signal parameters; the basic signal includes real data and virtual data; adaptively selecting an augmentation scheme and performing data augmentation operation on the basic signal based on the selected augmentation scheme to obtain an augmented signal set; filtering out biased data from the augmented signal set and using the filtered augmented signal set as simulated samples.
2. The method according to claim 1, characterized in that, The preprocessing of the near-infrared spectral signal and the X-ray fluorescence spectral signal includes: Savitzky-Golay convolution smoothing was performed on the near-infrared spectral signal and the X-ray fluorescence spectral signal, respectively, to obtain the near-infrared spectral signal and the X-ray fluorescence spectral signal after Savitzky-Golay convolution smoothing. Area normalization was performed on the near-infrared spectral signal after Savitzky-Golay convolution smoothing.
3. The method according to claim 2, characterized in that, The Savitzky-Golay convolution smoothing process performed on the near-infrared spectral signal and the X-ray fluorescence spectral signal includes: The coefficients of the Savitzky-Golay convolution kernel are calculated based on the preset window size and polynomial order. For near-infrared spectral signals and X-ray fluorescence spectral signals respectively, the coefficients of the Savitzky-Golay convolution kernel are used to perform a weighted average of adjacent data points in each spectral signal to obtain smoothed data points; Symmetric expansion or zero-padding is performed on the boundaries of each spectral signal; The spectral signal after Savitzky-Golay convolution smoothing is obtained based on the smoothed data points and the processed boundaries.
4. The method according to claim 2, characterized in that, The area normalization process for the near-infrared spectral signal after Savitzky-Golay convolution smoothing includes: Area normalization was performed on each near-infrared spectral signal after Savitzky-Golay convolution smoothing to calculate the area-normalized near-infrared spectral signal.
5. The method according to claim 4, characterized in that, The calculation rules for the near-infrared spectral signal after area normalization are as follows: ; in, This represents the NIR reflectance corresponding to the m-th wavelength point of the near-infrared spectral signal; This is the near-infrared spectral signal before area normalization. This is the near-infrared spectral signal after area normalization.
6. The method according to claim 1, characterized in that, The downsampling processing of the preprocessed near-infrared spectral signal and X-ray fluorescence spectral signal includes: Downsampling was performed on the X-ray fluorescence spectrum signal after Savitzky-Golay convolution smoothing and the near-infrared spectrum signal after area normalization, including: Each spectral signal is filtered separately. In the filtered spectral signal, one sampling point is retained at fixed intervals to obtain multiple sampling points; or, multiple segments are extracted from the filtered spectral signal, and the sampling points in each segment are averaged to obtain one sampling point in each segment to obtain multiple sampling points. Signal reconstruction is performed based on each sampling point to obtain the downsampled spectral signal.
7. The method according to claim 1, characterized in that, The downsampled near-infrared spectral signals and X-ray fluorescence spectral signals were scaled to a normal distribution, including: Calculate the statistical characteristics of the spectral signals in the training set; wherein the statistical characteristics are the mean and variance; Based on the aforementioned statistical characteristics, standardization or normalization processing is performed on each spectral signal to scale the values of each spectral signal to a preset range, thereby obtaining the scaled values of each spectral signal. Based on a preset transformation algorithm and the scaling values of each spectral signal, each spectral signal is converted into a normal distribution.
8. The method according to claim 1, characterized in that, The normally distributed near-infrared spectral signal and the normally distributed X-ray fluorescence spectral signal are spliced together to obtain the target spectral data, including: Weighting is performed on the normally distributed near-infrared spectral signal and the normally distributed X-ray fluorescence spectral signal, and the two spectral signals are spliced together to obtain the initial target spectral data; The initial target spectral data are verified based on normally distributed near-infrared spectral signals and / or normally distributed X-ray fluorescence spectral signals, and the verified initial target spectral data are used as the target spectral data.
9. The method according to claim 1, characterized in that, The adaptive selection of augmentation schemes includes: One or more schemes are randomly selected from noise addition, translation, and preset rules as pre-selected schemes; wherein, the preset rules are: in, Indicates PLS mapping functions; and These represent the synthesized NIRS-XRF signal and the corresponding pseudo-tag, respectively. This represents the interpolation weights randomly sampled within the range [0,1]. and Signal samples randomly selected from historical target spectral data of coal samples; Randomly adjust the parameters within the preset adjustable parameter range of each pre-selected scheme to obtain a pre-selected scheme with determined parameters; If there is only one pre-selected scheme with defined parameters, then the basic signal is directly processed based on that scheme to obtain an augmented signal; If there are multiple options for the pre-selected scheme with defined parameters, then each scheme is executed sequentially to obtain an augmented signal.
10. The method according to claim 9, characterized in that, The step of training the model based on the simulated samples to obtain an initial model for component detection includes: The simulated samples are pseudo-labeled based on the PLS model after parameter initialization, and the labeled simulated samples are used as training samples. Based on the training samples, model training is performed in a neural network searched based on the target spectral data to obtain an initial model for component detection.
11. The method according to claim 10, characterized in that, The process of fine-tuning the initial component detection model based on reserved historical target spectral data to obtain a coal sample detection model includes: The simulated samples were replaced with reserved historical target spectral data, and the performance of the initial component monitoring model was evaluated based on the actual results of the reserved historical target spectral data. If the initial model for component monitoring fails the performance evaluation, then perform hyperparameter adjustment, model structure optimization, and / or regularization operations to obtain an updated initial model for component monitoring. The performance of the updated initial model for component monitoring is re-evaluated based on the reserved historical target spectral data until an initial model for component monitoring that meets the preset performance requirements is obtained, which is then used as the coal sample detection model.
12. The method according to claim 11, characterized in that, The initial performance evaluation of the component monitoring model is conducted based on the predicted results and the actual results of the corresponding reserved historical target spectral data, including: By comparing the predicted results with the actual results, the accuracy and recall of the model are evaluated based on the deviation between the two. If either accuracy or recall fails the evaluation, the initial performance evaluation of the component monitoring model fails.
13. The method according to claim 1, characterized in that, The method further includes: Neural network search based on the target spectral data includes: Multiple optimization dimensions are defined based on the structural parameters of the neural network; Within each optimization dimension, the parameters within the corresponding neural network structure are adaptively adjusted, and the MAE index is calculated after each adjustment. By comparing the MAE indices corresponding to each parameter, the optimal parameter combination for the MAE indices is determined and used as the optimization result within the corresponding optimization dimension. Perform a greedy search across each optimization dimension to obtain the optimization results for each optimization dimension; Based on the optimization results of each optimization dimension, the structural parameters of the corresponding neural network structure are determined, and the neural network corresponding to the search results is constructed.
14. The method according to claim 13, characterized in that, The step of performing a greedy search across each optimization dimension to obtain the optimization results for each optimization dimension includes: Determine the search order and perform a greedy search across each optimization dimension based on the determined search order to obtain the optimization results for each optimization dimension.
15. The method according to claim 14, characterized in that, The search order is: search basic operator, search input resolution, search network depth, and search network width; The process of determining the search order and performing a greedy search across each optimization dimension based on that order to obtain the optimization results for each optimization dimension includes: Determine the search range of basic operators, randomly select N sets of different configurations of input resolution, network depth and network width, determine the optimal operator for each set of configurations, output N optimal operators from N sets of configurations, and take the operator that appears most frequently among the N optimal operators as the searched basic operator; Determine the search range for input resolution, fix the searched basic operator as the optimal configuration, randomly select M groups of different network depths and widths, determine the optimal input resolution for each group of configurations, output M optimal input resolutions from the M groups of configurations, and take the input resolution that appears most frequently among the M optimal input resolutions as the searched input resolution; Determine the network depth search range, fix the searched basic operators and the searched input resolution as the optimal configuration, randomly select L groups of different network widths, determine the optimal network depth for each group of configurations, output L optimal network depths from the L groups of configurations, and take the network depth that appears most frequently among the L optimal network depths as the searched network depth. Determine the search range for network width, fix the searched basic operators, searched input resolution, and searched network depth as the optimal configuration, and search for the optimal network width.
16. The method according to claim 15, characterized in that, Within the basic operator dimension of the neural network layer, the corresponding optimization result acquisition rules include: Iterate through the types of linear layers and the activation function types of nonlinear layers, adaptively combine the activation function types of linear and nonlinear layers, and calculate the MAE index after each combination. By comparing the MAE index after each combination, the combination with the best MAE index is selected, and the activation function types of the linear and nonlinear layers corresponding to this combination are determined as the optimization result within the basic operator dimension of the neural network layer.
17. The method according to claim 16, characterized in that, The linear layer comprises: Fully connected layers, 1D convolutional layers with a kernel size of 5, 1D convolutional layers with a kernel size of 10, or 1D convolutional layers with a kernel size of 15.
18. The method according to claim 17, characterized in that, The activation function of the nonlinear layer includes: TanH function, ELU function, Sigmoid activation function, or Softmax function.
19. The method according to claim 17, characterized in that, The calculation rules for the MAE indicator are as follows: ; in, Let be the true value of the coal composition corresponding to the i-th training data; This is the model prediction value corresponding to the i-th training data; m is the size of the dataset.
20. The method according to claim 1, characterized in that, The coal testing results include: One or more of the following: ash content, volatile matter, hydrocarbons, ash melting point, total water, total sulfur, and calorific value.
21. The method according to claim 1, characterized in that, The method also includes visualizing the coal testing results, including: In response to a user's data query command, determine the corresponding detection result object; Based on the corresponding detection result object, a preset data visualization scheme is selected, and the visualized data is pushed to the user terminal.
22. A coal detection system, characterized in that, The system is applied to the coal detection method according to any one of claims 1-21, and the system comprises: The detection unit is used to acquire spectral data of the coal sample in response to a trigger signal that the coal sample has reached the detection position. Processing unit, used for: Preprocessing was performed on the near-infrared spectral signals and the X-ray fluorescence spectral signals respectively; The preprocessed near-infrared spectral signals and X-ray fluorescence spectral signals were downsampled and then scaled to a normal distribution. The target spectral data is obtained by splicing normally distributed near-infrared spectral signals and normally distributed X-ray fluorescence spectral signals. The analysis unit is used to perform target spectral data inference based on the coal sample detection model to obtain coal detection results.
23. The system according to claim 22, characterized in that, The preprocessing of the near-infrared spectral signal and the X-ray fluorescence spectral signal includes: Savitzky-Golay convolution smoothing was performed on the near-infrared spectral signal and the X-ray fluorescence spectral signal, respectively, to obtain the near-infrared spectral signal and the X-ray fluorescence spectral signal after Savitzky-Golay convolution smoothing. Area normalization was performed on the near-infrared spectral signal after Savitzky-Golay convolution smoothing.
24. The system according to claim 23, characterized in that, The downsampling processing of the preprocessed near-infrared spectral signal and X-ray fluorescence spectral signal includes: Downsampling was performed on the X-ray fluorescence spectrum signal after Savitzky-Golay convolution smoothing and the near-infrared spectrum signal after area normalization, including: Each spectral signal is filtered separately. In the filtered spectral signal, one sampling point is retained at fixed intervals to obtain multiple sampling points; or, multiple segments are extracted from the filtered spectral signal, and the sampling points in each segment are averaged to obtain one sampling point in each segment to obtain multiple sampling points. Signal reconstruction is performed based on each sampling point to obtain the downsampled spectral signal.
25. The system according to claim 22, characterized in that, The downsampled near-infrared spectral signals and X-ray fluorescence spectral signals were scaled to a normal distribution, including: Calculate the statistical characteristics of each spectral signal; wherein the statistical characteristics are variance and / or standard deviation. Based on the statistical characteristics of each spectral signal, standardization or normalization processing is performed on each spectral signal to scale the values of each spectral signal to a preset range, thereby obtaining the scaled values of each spectral signal. Based on a preset transformation algorithm and the scaling values of each spectral signal, each spectral signal is converted into a normal distribution.
26. The system according to claim 22, characterized in that, The normally distributed near-infrared spectral signal and the normally distributed X-ray fluorescence spectral signal are spliced together to obtain the target spectral data, including: Perform alignment operations on normally distributed near-infrared spectral signals and normally distributed X-ray fluorescence spectral signals; After aligning the normally distributed near-infrared spectral signal and the normally distributed X-ray fluorescence spectral signal, the two spectral signals are spliced based on a weighted average to obtain the initial target spectral data. The initial target spectral data are verified based on normally distributed near-infrared spectral signals and / or normally distributed X-ray fluorescence spectral signals, and the verified initial target spectral data are used as the target spectral data.
27. The system according to claim 22, characterized in that, The system also includes a training unit for pre-training the coal sample detection model, including: Historical near-infrared spectral signals and historical X-ray fluorescence spectral signals are collected, and corresponding historical target spectral data are constructed based on the historical near-infrared spectral signals and the historical X-ray fluorescence spectral signals; The historical target spectral data is used as training data to initialize the PLS model parameters. Based on the initialized PLS model, simulated samples are generated, and model training is performed based on the simulated samples to obtain the initial model for component detection. The initial model for component detection is validated based on reserved historical target spectral data to obtain a coal sample detection model.
28. The system according to claim 27, characterized in that, The generation of simulation samples based on the initialized PLS model includes: Adaptively determine the signal type and signal parameters that match the target spectral data, and generate a basic signal based on the signal type and signal parameters; An augmentation scheme is adaptively selected, and a data augmentation operation is performed on the basic signal based on the selected augmentation scheme to obtain an augmented signal set; Deviation data are filtered out from the augmented signal set, and the filtered augmented signal set is used as the simulation sample.
29. The system according to claim 22, characterized in that, The system further includes a training unit, which performs neural network search based on the target spectral data, including: Multiple optimization dimensions are defined based on the structural parameters of the neural network; Within each optimization dimension, the parameters within the corresponding neural network structure are adaptively adjusted, and the MAE index is calculated after each adjustment. By comparing the MAE indices corresponding to each parameter, the optimal parameter combination for the MAE indices is determined and used as the optimization result within the corresponding optimization dimension. Perform a greedy search across each optimization dimension to obtain the optimization results for each optimization dimension; Based on the optimization results of each optimization dimension, the structural parameters of each corresponding neural network structure are determined, and the neural network corresponding to the search results is constructed.
30. The system according to claim 29, characterized in that, The optimization dimensions include: The dimensions of the basic operators of a neural network layer, the resolution dimension of the input data, the network depth dimension, and the network width dimension; Within the basic operator dimension of the neural network layer, the corresponding optimization result acquisition rules include: It iterates through the convolution types of linear layers and the activation function types of nonlinear layers, adaptively combining the convolution types of fully connected layers and the activation function types of nonlinear layers, and calculating the MAE index after each combination. By comparing the MAE index after each combination, the combination with the largest MAE index is selected, and the type of fully connected layer convolution and the type of activation function of nonlinear layer corresponding to this combination are determined as the optimization result within the basic operator dimension of the neural network layer.
31. The system according to claim 22, characterized in that, The coal testing results include: One or more of the following: ash content, volatile matter, hydrocarbons, ash melting point, total water, total sulfur, and calorific value.
32. The system according to claim 22, characterized in that, The system also includes an output unit for visualizing the coal detection results. The visualization output of the coal testing results includes: In response to a user's data query command, determine the corresponding detection result object; Based on the corresponding detection result object, a preset data visualization scheme is selected, and the visualized data is pushed to the user terminal.
33. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the coal detection method according to any one of claims 1-21.
Citation Information
Patent Citations
XRF-NIRS combined coal calorific value high-repeatability detection method
CN114112976A
Coal ash content detection method based on X-ray diffraction and Fourier infrared spectroscopy
CN117740845A
Method for quickly detecting near infrared spectrum coal volatile components based on Gaussian process
CN105606563A
Coal quality measurement method based on laser-induced breakdown spectroscopy and near infrared spectroscopy information fusion
CN111044503A