Multi-quality parameter collaborative detection method and system based on near-infrared spectroscopy

By constructing a collaborative detection model of quality parameters based on near-infrared spectroscopy, the problems of high quality detection cost and low accuracy of mineral products are solved, and the collaborative detection of multiple quality parameters is realized, which improves the efficiency and accuracy of the detection.

CN120142228BActive Publication Date: 2025-08-01CHINA UNIV OF MINING & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510618822.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2025-08-01
Estimated Expiration
2045-05-14

AI Technical Summary

Technical Problem

The existing mineral product quality detection technology has high cost, long time, high instrument requirements, and it is difficult to comprehensively and accurately evaluate multi-quality parameters. It is difficult for existing near-infrared spectroscopy technology to achieve collaborative detection of multi-quality parameters.

Method used

A multi-quality parameter collaborative detection method based on near-infrared spectroscopy is adopted to build a quality parameter collaborative detection model, including an embedding layer, feature extraction module and a customized gated network, feature dimension expansion, feature extraction and feature fusion prediction are carried out to generate multi-quality parameter information.

Benefits of technology

It effectively reduces the cost and complexity of coordinated detection of multi-quality parameters, improves detection accuracy and reliability, and can obtain multiple quality parameter information at the same time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120142228B_ABST
    Figure CN120142228B_ABST
Patent Text Reader

Abstract

The present invention relates to a multi-quality parameter collaborative detection method and system based on near-infrared spectroscopy. It includes: providing the near-infrared spectral data to be detected of a substance to be detected, and loading the near-infrared spectral data to be detected into a constructed quality parameter collaborative detection model to perform collaborative detection processing by using the quality parameter collaborative detection model and generate multi-quality parameter information of the substance to be detected. Wherein, when performing collaborative detection processing, at least feature dimension expansion processing, feature extraction processing, and feature fusion prediction processing are performed on the near-infrared spectral data to be detected, and multi-quality parameter information of the substance to be detected is generated after the feature fusion prediction processing. The present invention can effectively realize the collaborative detection of multi-quality parameters, improve the accuracy and reliability of multi-quality parameter detection, and reduce the cost and complexity of multi-quality parameter collaborative detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a collaborative detection method and system, in particular to a multi-quality parameter collaborative detection method and system based on near-infrared spectroscopy. Background Art

[0002] Mineral products (such as coal, petroleum, bauxite) are important resources and play an indispensable role in the global economy and industry. The quality of mineral products directly affects the efficiency of various industrial productions and the quality of products. Therefore, accurate detection of the quality of mineral products is of great significance for improving resource utilization rate, optimizing technological processes, and reducing energy consumption. However, when using traditional methods to detect the quality of mineral products, there are often problems such as high cost, long time consumption, high requirements for instruments, and strict requirements for the skills of operators, which limit the wide application of the detection methods in the field of mineral resources.

[0003] Modern detection technologies have shown high efficiency and accuracy in the quality detection of mineral products and have great application potential, such as atomic absorption spectrometry, X-ray fluorescence spectroscopy, and laser-induced breakdown spectroscopy. Although these methods can provide high accuracy, they all have defects such as complex sample preparation and high instrument costs. In addition, most existing detection technologies focus on the detection of single quality parameters, ignoring the internal correlation between different quality parameters and making it difficult to comprehensively and accurately evaluate the overall quality of mineral products.

[0004] To solve these problems, near-infrared spectroscopy technology has gradually become an emerging technology for the quality detection of mineral products. Compared with traditional methods, near-infrared spectroscopy technology has the advantages of low cost, no need for complex sample preparation, fast detection speed, etc., and can obtain the quality information of mineral products in real time without destroying the samples. However, how to effectively achieve the collaborative detection of multi-quality parameters is still a technical problem that needs to be solved urgently at present. Summary of the Invention

[0005] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a multi-quality parameter collaborative detection method and system based on near-infrared spectroscopy, which can effectively achieve the collaborative detection of multi-quality parameters, improve the accuracy and reliability of multi-quality parameter detection, and reduce the cost and complexity of multi-quality parameter collaborative detection.

[0006] According to the technical solution provided by the present invention, a multi-quality parameter collaborative detection method based on near-infrared spectroscopy, the method includes:

[0007] Providing the near-infrared spectrum data to be detected of the substance to be detected, and loading the near-infrared spectrum data to be detected into the constructed quality parameter collaborative detection model to perform collaborative detection processing by using the quality parameter collaborative detection model and generate the multi-quality parameter information of the substance to be detected, wherein,

[0008] When performing collaborative detection processing, at least feature dimension expansion processing, feature extraction processing, and feature fusion prediction processing are performed on the near-infrared spectral data to be detected, and multi-quality parameter information of the substance to be detected is generated after the feature fusion prediction processing.

[0009] The quality parameter collaborative detection model includes an embedding layer, a feature extraction module, and a customized gating network connected in sequence, where

[0010] The embedding layer performs feature dimension expansion processing on the near-infrared spectral data to be detected and generates the spectral data after dimension expansion to be detected;

[0011] The feature extraction module performs feature extraction processing on the spectral data after dimension expansion to be detected and generates the multi-quality shared features to be detected;

[0012] The customized gating network performs feature fusion prediction processing on the multi-quality shared features to be detected and the near-infrared spectral data to be detected to generate multi-quality parameter information, where

[0013] When performing feature fusion prediction processing, first perform feature linear activation processing on the multi-quality shared features to be detected to generate a shared expert feature to be detected and several specific expert features to be detected. After that, each specific expert feature to be detected is respectively subjected to gated weighted fusion with the shared expert feature to be detected and the near-infrared spectral data to be detected, and the corresponding quality parameter prediction value is generated after regression prediction, where the number of specific expert features to be detected is consistent with the number of quality parameter prediction values in the multi-quality parameter information;

[0014] Based on all the quality parameter prediction values, multi-quality parameter information of the substance to be detected is formed.

[0015] The feature extraction module includes several feature extraction sub-modules connected in sequence, where

[0016] For any feature extraction sub-module, it includes a depthwise separable convolutional network and a spatial dimension feature weighting module connected in sequence, and the depthwise separable convolutional network and the spatial dimension feature weighting module are configured to form a residual connection;

[0017] When performing feature extraction processing, for any feature extraction sub-module, first use the depthwise separable convolutional network to perform single-channel long-distance feature extraction processing and channel fusion processing on the basic data for feature extraction to be detected in sequence, and generate the feature after extraction and fusion to be detected;

[0018] The spatial dimension feature weighting module performs spatial dimension feature weighting processing on the feature after extraction and fusion to be detected to generate the spatially dimensionally weighted feature to be detected; after that, the spatially dimensionally weighted feature to be detected and the basic data for feature extraction to be detected are subjected to residual connection processing, and the sub-module data feature to be detected is generated.

[0019] The depth point convolution network includes a depth convolution layer with a large-size convolution kernel, and a batch normalization layer, a first point convolution layer, a GeLU activation function, and a second point convolution layer connected to the depth convolution layer in sequence. Among them,

[0020] The depth convolution layer with a large-size convolution kernel performs single-channel long-distance feature extraction processing on the basic data of the feature to be detected;

[0021] The first point convolution layer and the second point convolution layer form an inverted bottleneck structure, and the formed inverted bottleneck structure is used to perform channel fusion processing. Among them, during the channel fusion processing, the channel dimension is first expanded by r times through the first point convolution layer, and then the expanded channel dimension is restored through the second point convolution layer.

[0022] The spatial dimension feature weighting module includes a spatial dimension convolution block, a spatial dimension Sigmoid layer, and a spatial dimension multiplier. Among them,

[0023] When performing spatial dimension feature weighting processing, for the feature to be detected after extraction and fusion, first use the spatial dimension convolution block to perform convolution operation to generate a single-channel feature sequence to be weighted, and then use the spatial dimension Sigmoid layer to convert the single-channel feature sequence to be weighted into a probability distribution to form single-channel probability distribution information. Among them, the feature to be detected after extraction and fusion is generated by the depth point convolution network within the same feature extraction sub-module;

[0024] The single-channel probability distribution information is multiplied by the feature to be detected after extraction and fusion through the spatial dimension multiplier to generate the feature to be detected with spatial dimension weighting.

[0025] The customized gating network includes a customized gating module and a tower network adaptively connected to the customized gating module. Among them,

[0026] The customized gating module includes an expert unit and a gating unit. The expert unit includes a shared expert module and several specific expert modules.

[0027] The gating unit includes several gating modules. The number of specific expert modules is the same as the number of gating modules, and the number of gating modules is not less than the number of quality parameter prediction values in the multi-quality parameter information;

[0028] The tower network includes several tower modules for regression prediction, and the tower modules are connected to the gating modules in a one-to-one correspondence;

[0029] During the feature fusion prediction processing, the expert unit performs feature linear activation processing on the feature to be detected with multiple qualities shared, to generate the feature to be detected with shared expert features through the shared expert module, and generate the corresponding feature to be detected with specific expert features through a specific expert module;

[0030] Load the to-be-tested shared expert features, the to-be-tested near-infrared spectral data, and the to-be-tested specific expert features into corresponding gating modules respectively, so as to perform gating weighted fusion using the gating modules and generate a to-be-tested gating weighted feature sequence, and load the to-be-tested gating weighted feature sequence into the corresponding connected tower module;

[0031] The tower module performs regression prediction on the received to-be-tested gating weighted feature sequence, so as to generate a corresponding quality parameter prediction value after the regression prediction.

[0032] The gating module includes a to-be-tested data processing unit, a gating first multiplier, a gating second multiplier, and a gating adder, where,

[0033] During gating weighted fusion, the to-be-tested data processing unit performs at least data linear activation processing on the to-be-tested near-infrared spectral data, so as to generate to-be-tested activation features after the data linear activation processing;

[0034] Use the gating first multiplier to perform a multiplication operation on the to-be-tested shared expert features and the to-be-tested activation features, so as to generate to-be-tested shared activation features; meanwhile, use the gating second multiplier to perform a multiplication operation on the to-be-tested specific expert features and the to-be-tested activation features, so as to generate to-be-tested specific activation features;

[0035] Use the gating adder to perform an addition operation on the to-be-tested shared activation features and the to-be-tested specific activation features, so as to generate a to-be-tested gating weighted feature sequence.

[0036] When constructing a quality parameter collaborative detection model, it includes:

[0037] Construct a quality parameter collaborative detection basic model and a basic model training dataset for training the quality parameter collaborative detection basic model, where,

[0038] The basic model training dataset includes several training samples. Each training sample includes a training near-infrared spectral data and several quality parameter labels. The number of quality parameter labels in the training sample is consistent with the number of quality parameter prediction values in the multi-quality parameter information, and the type of the quality parameter label corresponds one-to-one with the type of the quality parameter prediction value;

[0039] Configure the model training conditions for the quality parameter collaborative detection basic model until the quality parameter collaborative detection basic model is trained to a target state. After that, configure the quality parameter collaborative detection basic model trained to the target state as the quality parameter collaborative detection model.

[0040] The configured model training conditions include a training loss function, and the training loss function includes:

[0041]

[0042] Among them, is the training loss value, is the regression training loss, is the orthogonal training loss, is the number of training samples, is the number of tasks during collaborative detection, is the quality parameter label of the th training sample corresponding to the kth task, is the quality parameter predicted value of the th training sample corresponding to the kth task, is the batch number during model training, is the training shared expert feature matrix of the th batch of training samples, is the transposed matrix of the training shared expert feature matrix, is the th batch of training samples corresponding to the training specific expert feature matrix of the kth task, represents the square of the Frobenius norm.

[0043] A multi-quality parameter collaborative detection system based on near-infrared spectroscopy includes a multi-quality parameter collaborative detection device, and the above-mentioned quality parameter collaborative detection model is deployed inside the multi-quality parameter collaborative detection device. Among them,

[0044] For the near-infrared spectral data to be detected of any substance to be detected, the multi-quality parameter collaborative detection device performs collaborative detection processing using the above-mentioned method to obtain the multi-quality parameter information of the substance to be detected after the collaborative detection processing.

[0045] Advantages of the present invention: The near-infrared spectral data to be detected of the substance to be detected is collected and obtained. Thereafter, the quality parameter collaborative detection model is used for collaborative detection processing to obtain the multi-quality parameter information of the substance to be detected. It can be seen therefrom that during the collaborative detection processing, due to the use of the near-infrared spectral data to be detected collected by near-infrared spectroscopy, compared with the existing detection methods, the cost and complexity of the multi-quality parameter collaborative detection can be effectively reduced; through the collaborative detection processing by the quality parameter collaborative detection model, the multi-quality parameter information of the substance to be detected can be obtained, thereby effectively realizing the collaborative detection of multi-quality parameters and improving the accuracy and reliability of the multi-quality parameter detection.

[0046] Since orthogonal constraints are adopted in model training, the correlation between the multi-quality parameters of the substance to be detected is fully considered. Therefore, when the quality parameter collaborative detection model is used for collaborative detection processing, while maintaining high accuracy, the correlation between the multi-quality parameters of the substance to be detected can be fully considered, and the accuracy and reliability of generating the multi-quality parameter information can be improved. Description of the Drawings

[0047] Figure 1 This is a flowchart of an embodiment of the multi-quality parameter collaborative detection method of the present invention.

[0048] Figure 2 This is a schematic diagram of an embodiment of existing near-infrared spectral data.

[0049] Figure 3 This is a schematic diagram of an embodiment of the quality parameter collaborative detection model of the present invention.

[0050] Figure 4 This is a structural block diagram of an embodiment of the depth point convolutional network of the present invention.

[0051] Figure 5 This is a structural block diagram of an embodiment of the spatial dimension feature weighting module of the present invention.

[0052] Figure 6 This is a schematic diagram of an embodiment when the model of the present invention is trained.

[0053] Figure 7 This is a structural block diagram of an embodiment of the gating structure of the present invention.

[0054] Figure 8 This is a structural block diagram of an embodiment of the shared expert module of the present invention. Detailed implementation manners

[0055] The present invention will be further described below in conjunction with specific drawings and embodiments.

[0056] In order to effectively achieve the collaborative detection of multiple quality parameters, improve the accuracy and reliability of the detection of multiple quality parameters, and reduce the cost and complexity of the collaborative detection of multiple quality parameters, the present invention provides a multi-quality parameter collaborative detection method based on near-infrared spectroscopy. Specifically, the multi-quality parameter collaborative detection method includes:

[0057] Providing the to-be-detected near-infrared spectral data of the to-be-detected substance, and loading the to-be-detected near-infrared spectral data into the constructed quality parameter collaborative detection model to perform collaborative detection processing by using the quality parameter collaborative detection model and generate the multi-quality parameter information of the to-be-detected substance, wherein,

[0058] When performing collaborative detection processing, at least perform feature dimension expansion processing, feature extraction processing, and feature fusion prediction processing on the to-be-detected near-infrared spectral data, and generate the multi-quality parameter information of the to-be-detected substance after the feature fusion prediction processing.

[0059] It should be noted that the multi-quality parameter collaborative detection of the present invention specifically refers to the detection of multiple quality parameters that can be achieved simultaneously, that is, multiple quality parameters of the same substance can be obtained simultaneously. Figure 1FIG. 0 shows a flowchart of an embodiment for collaborative detection of multiple quality parameters according to the present invention. As can be seen from the figure, when performing collaborative detection of multiple quality parameters, near-infrared spectral data to be detected of the substance to be detected should be provided. It can be understood that the substance to be detected should be a substance suitable for near-infrared spectral acquisition. For example, the substance to be detected can be bauxite, coal, petroleum, etc. The type of the substance to be detected can be selected according to needs and is not limited here.

[0060] After determining the type of the substance to be detected, the corresponding near-infrared spectral data to be detected can be obtained by performing near-infrared spectral acquisition on the substance to be detected. For example, a MicroNIR Pro handheld near-infrared spectrometer produced by VIAVI can be used to perform near-infrared spectral acquisition on the substance to be detected. The acquisition wavelength range can be 908 nm - 1676 nm, the resolution is 6.24 nm, and the number of wavelength points is 125. Of course, when performing near-infrared spectral acquisition on the substance to be detected, the corresponding acquisition conditions can be configured according to the type of the substance to be detected, specifically based on being able to effectively acquire the near-infrared spectral data to be detected of the substance to be detected.

[0061] Figure 2 FIG. 7 shows an embodiment of near-infrared spectral data. As can be seen from the figure, the near-infrared spectrum to be detected can be characterized as a waveform diagram. Figure 2 In FIG. 9, the abscissa is the wavelength and the ordinate is the absorbance. Therefore, the characteristic dimension of the near-infrared spectral data to be detected can be 1×L, where L is the number of characteristic points of the near-infrared spectral data to be detected, and "1" is the channel dimension. It should be noted that when the above-mentioned 125 wavelength points are used, the number of characteristic points L of the near-infrared spectral data to be detected should be 125. Other cases can refer to the description here and will not be listed one by one here.

[0062] As Figure 1 can be seen, when performing collaborative detection of multiple quality parameters, the near-infrared spectral data to be detected should be loaded into the quality parameter collaborative detection model to perform collaborative detection processing using the quality parameter collaborative detection model, and after the collaborative detection processing, the multi-quality parameter information of the substance to be detected can be generated. Among them, the collaborative detection processing performed by the quality parameter collaborative detection model generally should include feature dimension expansion processing, feature extraction processing, and feature fusion prediction processing. After the feature fusion prediction processing, the multi-quality parameter information of the substance to be detected is generated.

[0063] As can be seen from the above description, the multi-quality parameter information should include multiple predicted values of quality parameters. The number of predicted values of quality parameters can generally be selected according to actual needs. The type of predicted value of quality parameters should be related to the type of the substance to be detected. For example, when the substance to be detected is bauxite, the multi-quality parameter information may include the predicted value of Al2O3 content, the predicted value of SiO2 content, and the predicted value of Fe2O3 content. That is, the Al2O3 content, SiO2 content, and Fe2O3 content are the quality parameters of bauxite. When the substance to be detected is coal, the quality parameters of coal can be moisture, ash, volatile matter, and / or calorific value. At this time, the obtained multi-quality parameter information can be the predicted value of moisture content, the predicted value of ash content, the predicted value of volatile matter, and / or the predicted value of calorific value. When the substance to be detected is petroleum, the quality parameters of petroleum can be density, sulfur content, and / or acid value. At this time, the obtained multi-quality parameter information can be the predicted value of density, the predicted value of sulfur content, or the predicted value of acid value. When the substance to be detected is of other types, corresponding multi-quality parameter information can be obtained, which will not be exemplified one by one here.

[0064] As can be seen from the above description, when the present invention performs co-detection of multi-quality parameters, the near-infrared spectral data of the substance to be detected collected by near-infrared spectroscopy can effectively reduce the cost and complexity of co-detection of multi-quality parameters compared with the existing detection methods. Through the co-detection model of quality parameters for co-detection processing, the multi-quality parameter information of the substance to be detected can be obtained, thereby effectively realizing the co-detection of multi-quality parameters and improving the accuracy and reliability of multi-quality parameter detection.

[0065] In an embodiment of the present invention, the co-detection model of quality parameters includes an embedding layer, a feature extraction module, and a customized gating network connected in sequence, wherein,

[0066] The feature dimension of the near-infrared spectral data of the substance to be detected is expanded through the embedding layer, and the spectral data after dimension expansion of the substance to be detected is generated;

[0067] The feature extraction processing is performed on the spectral data after dimension expansion of the substance to be detected through the feature extraction module, and the multi-quality shared feature of the substance to be detected is generated;

[0068] The feature fusion and prediction processing is performed on the multi-quality shared feature of the substance to be detected and the near-infrared spectral data of the substance to be detected through the customized gating network to generate multi-quality parameter information, wherein,

[0069] When performing the feature fusion and prediction processing, first, the feature linear activation processing is performed on the multi-quality shared feature of the substance to be detected to generate a shared expert feature of the substance to be detected and several specific expert features of the substance to be detected. Thereafter, each specific expert feature of the substance to be detected is respectively subjected to gating weighted fusion with the shared expert feature of the substance to be detected and the near-infrared spectral data of the substance to be detected, and the corresponding predicted value of the quality parameter is generated after regression prediction, wherein the number of specific expert features of the substance to be detected is consistent with the number of predicted values of quality parameters in the multi-quality parameter information;

[0070] Based on the predicted values of all quality parameters, multi-quality parameter information of the substance to be detected is formed.

[0071] Figure 3 An embodiment of the quality parameter detection model of the present invention is shown. As can be seen from the figure, the quality parameter collaborative detection model may include an embedding layer, a feature extraction module, and a customized gating network. The part where the customized gating module is located forms the customized gating network. The embedding layer is connected to the customized gating module through the feature extraction module. Specifically, feature dimension expansion processing can be performed through the embedding layer, feature extraction processing can be performed through the feature extraction module, and feature fusion prediction processing can be performed through the customized gating network. The specific situations of the embedding layer, the feature extraction module, and the customized gating network will be specifically described below.

[0072] It can be understood that when loading the near-infrared spectrum data to be detected into the quality parameter collaborative detection model, it specifically refers to loading the near-infrared spectrum data to be detected into the embedding layer. As described above, the near-infrared spectrum data to be detected is one-dimensional data. In order to meet the subsequent feature extraction processing and feature fusion prediction processing, feature dimension expansion processing should be performed through the embedding layer, and the spectrum data after dimension expansion to be detected is generated. Among them, the feature dimension of the spectrum data after dimension expansion to be detected can be C×L, where C is the channel dimension of the spectrum data after dimension expansion to be detected. Generally, C can take 128. Of course, C can also take other values, which can be specifically selected according to needs. The embedding layer can adopt the existing common form, and the method of feature dimension expansion is consistent with the prior art, so it will not be elaborated here.

[0073] After the embedding layer generates the spectrum data after dimension expansion to be detected, configure the feature extraction module to perform feature extraction processing on the spectrum data after dimension expansion to be detected, so as to obtain the multi-quality shared features to be detected after the feature extraction processing, and transmit the generated multi-quality shared features to be detected to the customized gating network.

[0074] After obtaining the multi-quality shared features to be detected, configure the customized gating network to perform feature fusion prediction processing. Among them, when performing feature fusion prediction processing, first perform feature linear activation processing on the multi-quality shared features to be detected, so as to generate a shared expert feature to be detected and several specific expert features to be detected after the feature linear activation processing. Thereafter, each specific expert feature to be detected is respectively subjected to gated weighted fusion with the shared expert feature to be detected and the near-infrared spectrum data to be detected, and after regression prediction, the corresponding quality parameter prediction value is generated. Therefore, based on multiple specific expert features to be detected, multiple quality parameter prediction values can be generated after gated weighted fusion and regression prediction. Thereafter, based on all the quality parameter prediction values, multi-quality parameter information of the substance to be detected can be formed, and thus the above-mentioned collaborative detection processing is completed.

[0075] In order to extract the above-mentioned multi-quality shared features to be detected, the present invention provides a feature extraction module. Specifically, the feature extraction module includes a plurality of sequentially connected feature extraction sub-modules. Among them,

[0076] For any feature extraction sub-module, it includes a depthwise point convolution network and a spatial dimension feature weighting module connected in sequence, and the depthwise point convolution network and the spatial dimension feature weighting module are configured to form a residual connection;

[0077] When performing feature extraction processing, for any feature extraction sub-module, first use the depthwise point convolution network to perform single-channel long-distance feature extraction processing and channel fusion processing on the basic data of the feature to be detected in sequence, and generate the feature after fusion of the feature to be detected;

[0078] Use the spatial dimension feature weighting module to perform spatial dimension feature weighting processing on the feature after fusion of the feature to be detected to generate the weighted feature of the spatial dimension to be detected; thereafter, perform residual connection processing on the weighted feature of the spatial dimension to be detected and the basic data of the feature to be detected, and generate the data feature of the sub-module to be detected.

[0079] Specifically, the feature extraction module includes a plurality of sequentially connected feature extraction sub-modules. At the same time, each feature extraction sub-module adopts a residual connection, Figure 3 Among them, "×7" in the feature extraction module specifically refers to that the feature extraction module includes 7 sequentially connected feature extraction sub-modules. The number of feature extraction sub-modules can be selected according to needs to meet the specific feature extraction requirements.

[0080] In addition, Figure 3 An embodiment of the feature extraction sub-module is also shown in the figure. It can be seen from the figure that each feature extraction sub-module may include a depthwise point convolution network and a spatial dimension feature weighting module connected in sequence. When the feature extraction sub-module adopts a residual connection, the input end of the depthwise point convolution network is correspondingly connected to the output end of the spatial dimension feature weighting module. Generally, the adaptation connection between the input end of the depthwise point convolution network and the output end of the spatial dimension feature weighting module can be realized through a feature extraction adder, that is, the residual connection processing can be realized through the feature extraction adder. It should be noted that the feature extraction adder is not shown in Figure 3 the figure.

[0081] It should be noted that when each feature extraction sub-module adopts a residual connection, the ability of each feature extraction sub-module to capture detailed information can be improved, ensuring that each feature extraction sub-module can retain and strengthen the information obtained, thereby effectively promoting the feature fusion in the deep network in the feature extraction module. When the quality parameter collaborative detection model captures the key information in the near-infrared spectrum data to be detected, it maintains sensitivity to the near-infrared spectrum data to be detected, thereby improving the feature extraction ability.

[0082] Within the feature extraction module, the feature extraction sub-module at the concatenated head should be connected to the input end of the embedding layer to receive the corresponding spectral data after dimension expansion for inspection. The feature extraction sub-module at the concatenated tail should serve as the output layer of the current feature extraction module, that is, the corresponding specific expert features for inspection or specific expert features for inspection can be output through the feature extraction sub-module at the concatenated tail. In addition, along the concatenation direction of the feature extraction sub-modules, the output end of the feature extraction adder of the previous feature extraction sub-module is connected to the input end of the depthwise point convolution network in the next feature extraction sub-module. Here, the concatenation direction of the feature extraction sub-modules specifically refers to the direction from the concatenated head to the concatenated tail.

[0083] When performing feature extraction processing, for any feature extraction sub-module within a feature extraction module, first use the depthwise point convolution network to sequentially perform single-channel long-distance feature extraction processing and channel fusion processing on the basic data for feature extraction to be inspected, and generate the fused features after extraction to be inspected; thereafter, use the spatial dimension feature weighting module to perform spatial dimension feature weighting processing on the fused features after extraction to be inspected to generate the weighted features in the spatial dimension to be inspected. When using residual connection, load the basic data for feature extraction to be inspected and the weighted features in the spatial dimension to be inspected into the feature extraction adder, and after performing addition operations by the feature extraction adder, the data features of the sub-module to be inspected can be generated. Therefore, the above-mentioned residual connection processing is the addition operation processing performed by the feature extraction adder.

[0084] It can be seen from the above description that within the feature extraction module, for the feature extraction sub-module at the concatenated head, the basic data for feature extraction to be inspected should be the spectral data after dimension expansion for inspection generated by the embedding layer; the remaining basic data for feature extraction to be inspected should be the data features of the sub-module to be inspected output by the previous feature extraction sub-module. Based on the data features of the sub-module to be inspected generated by the feature extraction sub-module at the concatenated tail, the corresponding multi-quality shared features to be inspected can be formed. After forming the multi-quality shared features to be inspected, the above-mentioned feature extraction processing is achieved.

[0085] In an embodiment of the present invention, the depthwise point convolution network includes a depth convolution layer with a large-size convolution kernel, a batch normalization layer, a first point convolution layer, a GeLU activation function, and a second point convolution layer connected to the depth convolution layer in sequence, where,

[0086] Perform single-channel long-distance feature extraction processing on the basic data for feature extraction to be inspected through the depth convolution layer with a large-size convolution kernel;

[0087] A bottleneck structure is formed by the first point convolution layer and the second point convolution layer, and channel fusion processing is performed using the formed bottleneck structure. During channel fusion processing, the channel dimension is first expanded by a factor of r through the first point convolution layer, and then the expanded channel dimension is restored through the second point convolution layer.

[0088] Figure 4 FIG. shows a schematic diagram of an embodiment of a depthwise point convolution network. Depthwise convolution can be performed using depthwise convolution, which is a lightweight convolution operation that only performs independent convolution processing on each input channel to effectively extract feature information for each channel. In a specific implementation, the depthwise convolution layer uses a large-size convolution kernel, which can not only effectively capture long-range dependencies but also improve the feature extraction ability. The large convolution kernel can cover a larger spectral range in a single operation and effectively capture the relevant features between multiple bands. Figure 4 FIG. shows an embodiment where the size of the convolution kernel in the depthwise convolution layer is 51 (k = 51). Therefore, the large-size convolution kernel here specifically refers to a relatively large size of the convolution kernel. When the size of the convolution kernel in the depthwise convolution layer is 51, it can accurately capture the peak regions in the near-infrared spectral data and activate concentratedly at these key bands. In addition, the number of convolution kernels in the depthwise convolution layer can be selected according to needs. Compared with the currently popular Transformer model, configuring the depthwise convolution layer with a large-size convolution kernel has the advantages of simple design, fewer parameters, and helping to reduce the risk of overfitting.

[0089] As can be seen from the above description, the depthwise convolution layer is used to perform single-channel long-range feature extraction processing on the basic data of the feature to be detected, so that the single-channel long-range related features to be detected can be generated after the single-channel long-range feature extraction processing. Among them, the channel dimension of the single-channel long-range related features to be detected is still C.

[0090] From Figure 4 After the single-channel long-range related features to be detected are obtained, batch normalization processing is performed through the batch normalization layer, and the features after batch normalization to be detected are generated after the batch normalization processing. The channel dimension of the batch normalization layer to be detected is C. Figure 4 In FIG., the connection relationship between the batch normalization layer and the depthwise convolution layer is not shown. Figure 4 BN in FIG. represents the batch normalization layer. It can be understood that when the batch normalization layer is set in the depthwise point convolution network, it can effectively stabilize the learning process of training and generating the quality parameter collaborative detection basic model, improve the convergence speed of the quality parameter collaborative detection basic model. For the situation of the quality parameter collaborative detection basic model, reference can be made to the corresponding description below.

[0091] The point convolution operation can be performed on the features after batch normalization to be inspected through the first point convolution layer, so that the first point convolution features to be inspected can be generated after the point convolution operation. Among them, the channel dimension of the first point convolution features to be inspected is r×C. When the channel dimension of the first point convolution features to be inspected is expanded to r×C, the expression ability of the features can be enhanced. Generally, r can take the value of 7. According to the multiple r of the channel dimension expansion, the corresponding first point convolution layer can be selected and determined.

[0092] After obtaining the first point convolution features to be inspected, activation processing is performed through the GeLU activation function to improve the learning ability of non-linear features. It should be noted that Figure 4 the connection between the GeLU activation function and the first point convolution layer and the second point convolution layer is not shown in Figure 4 The GeLU in is the GeLU activation function here. It can be understood that after the activation processing by the GeLU activation function, the features after the GeLU activation function to be inspected can be obtained, and the channel dimension of the features after the GeLU activation function to be inspected is still r×C.

[0093] After obtaining the features after the GeLU activation function to be inspected, the second point convolution layer is used to perform the point convolution operation to obtain the second point convolution features to be inspected. The channel dimension of the second point convolution features to be inspected is restored to C, so that the important features can be selectively retained through the point convolution operation of the second point convolution layer. It can be understood that the features after the second point convolution to be inspected can form the features after extraction and fusion to be inspected.

[0094] As can be seen from the above description, although the depth convolution layer can independently extract the information of each channel, it cannot achieve the information fusion between channels. The second point convolution layer integrates the information of different channels through a convolution kernel with a size of 1 (k = 1), so as to achieve the effective fusion of different channel information and generate a more representative feature expression. Specifically, the first point convolution layer also uses a convolution kernel with a size of 1 (k = 1). In addition, according to the above situation of the channel dimension, the number of corresponding convolution kernels in the first point convolution layer and the second point convolution layer can be determined.

[0095] It should be noted that the channel expansion can be achieved through the first point convolution layer, so as to capture more fine-grained information. The channel compression can be achieved through the second point convolution layer, and the channel compression selectively retains important features by learning adaptive weights, avoiding the loss of useful information. It can be seen that an inverted bottleneck structure is formed by the first point convolution layer and the second point convolution layer. This inverted bottleneck structure ensures high-quality feature extraction while maintaining high computational efficiency, and achieves high-quality feature fusion effects at low computational costs.

[0096] In an embodiment of the present invention, the spatial dimension feature weighting module includes a spatial dimension convolutional block, a spatial dimension Sigmoid layer, and a spatial dimension multiplier. Among them,

[0097] When performing spatial dimension feature weighting processing, for the to-be-detected extracted and fused features, first use the spatial dimension convolutional block to perform a convolutional operation to generate a single-channel to-be-weighted feature sequence. Thereafter, use the spatial dimension Sigmoid layer to convert the single-channel to-be-weighted feature sequence into a probability distribution to form single-channel probability distribution information. Among them, the to-be-detected extracted and fused features are generated by the depth point convolutional network within the same feature extraction sub-module;

[0098] Multiply the single-channel probability distribution information by the to-be-detected extracted and fused features through the spatial dimension multiplier to generate the to-be-detected spatial dimension weighted features.

[0099] Figure 5 FIG. shows a schematic diagram of an embodiment of the spatial dimension feature weighting module. It can be seen from the figure that the spatial dimension feature weighting module may include a spatial dimension convolutional block, a spatial dimension Sigmoid layer, and a spatial dimension multiplier. Among them, the number of convolutional kernels in the spatial dimension convolutional block is 1. At this time, the channel dimension of the generated single-channel to-be-weighted feature sequence is 1. Use the spatial dimension Sigmoid layer to convert the single-channel to-be-weighted feature sequence into a probability distribution to form single-channel probability distribution information and weight the importance of each band.

[0100] Figure 5 Among them, E0 is the to-be-detected extracted and fused features, E1 is the single-channel to-be-weighted feature sequence, E2 is the single-channel probability distribution information, E3 is the to-be-detected spatial dimension weighted features, and the feature dimension of the to-be-detected spatial dimension weighted features is C×L.

[0101] It can be seen from the above description that the spatial dimension feature weighting module can enhance the response to the significant features in the to-be-detected near-infrared spectral data through the learned weights, especially the peak and trough regions closely related to the quality parameters. This not only maintains the sensitivity of the quality parameter co-detection model to key features but also improves the prediction accuracy of the regression task.

[0102] In an embodiment of the present invention, the customized gating network includes a customized gating module and a tower network adaptively connected to the customized gating module. Among them,

[0103] The customized gating module includes an expert unit and a gating unit. Among them, the expert unit includes a shared expert module and several specific expert modules.

[0104] The gating unit includes a number of gating modules. The number of specific expert modules is consistent with the number of gating modules, and the number of gating modules is not less than the number of predicted values of the quality parameters within the multi-quality parameter information;

[0105] The tower network includes a number of tower modules for regression prediction, and the tower modules are connected to the gating modules in a one-to-one correspondence;

[0106] During feature fusion prediction processing, the expert unit is used to perform feature linear activation processing on the multi-quality shared features to be tested, so as to generate the shared expert features to be tested through the shared expert module, and generate the corresponding specific expert features to be tested through a specific expert module;

[0107] The shared expert features to be tested, the near-infrared spectral data to be tested, and the specific expert features to be tested are respectively loaded into the corresponding gating modules, so as to use the gating modules to perform gating weighted fusion and generate the gating weighted feature sequence to be tested, and load the gating weighted feature sequence to be tested into the corresponding connected tower module;

[0108] The tower module performs regression prediction on the received gating weighted feature sequence to be tested, so as to generate a corresponding predicted value of the quality parameter after regression prediction.

[0109] Figure 3 An embodiment of the customized gating network is shown. It can be seen from the figure that the customized gating network may include a customized gating module and a tower network. Among them, the customized gating module may include an expert unit and a gating unit. The expert unit can perform the above-mentioned feature linear activation processing, and the gating unit can perform the above-mentioned gating weighted fusion. In addition, the customized gating module is connected to the tower network to perform the above-mentioned regression prediction using the tower network.

[0110] Specifically, the expert unit generally should include a shared expert module and a number of specific expert modules. The number of specific expert modules should not be less than the number of predicted values of the quality parameters. Preferably, the number of specific expert modules should be consistent with the number of predicted values of the quality parameters. During the execution of feature fusion prediction processing, the multi-quality shared features to be tested should be loaded into the shared expert module and all specific expert modules at the same time. Thereafter, the shared expert module can be used to generate the shared expert features to be tested, and a specific expert module can be used to generate a specific expert feature to be tested. That is, the specific expert features to be tested are in a one-to-one correspondence with the specific expert modules, and the specific expert features to be tested are also in a one-to-one correspondence with the predicted values of the quality parameters.

[0111] It can be seen from the above description that when the expert unit performs feature linear activation processing, it specifically includes the linear activation processing performed by the shared expert module and the linear activation processing performed by each specific expert module.

[0112] It should be noted that Figure 3An embodiment is shown in which the number of predicted values of quality parameters is 3. At this time, the expert unit should include at least 3 specific expert modules. Figure 3 Among them, the specific expert module A, the specific expert module B, and the specific expert module C are respectively the 3 corresponding specific expert modules in the expert unit. When the multi-quality shared feature to be detected is other situations, reference can be made to the description here, and no further examples will be given one by one.

[0113] The gating unit may include multiple gating modules. Generally, the number of gating modules should be no less than the number of predicted values of quality parameters, and the number of gating modules should be at least consistent with the number of specific expert modules, that is, the number of gating modules should be no less than the number of specific expert modules, so that a one-to-one correspondence connection can be formed between the specific expert modules and the gating modules. From the above description, when the number of predicted values of quality parameters is 3, the number of gating modules in the gating unit should be no less than 3. Figure 3 An embodiment is shown in which the gating unit includes 3 gating modules. In the figure, the 3 gating modules are respectively the gating module G1, the gating module G2, and the gating module G3. In addition, Figure 3 The situation of 3 predicted values of quality parameters is also shown. The 3 predicted values of quality parameters are respectively the predicted value of quality parameter Pz1, the predicted value of quality parameter Pz2, and the predicted value of quality parameter Pz3. Among them, the predicted value of quality parameter Pz1 corresponds to the gating module G1, the predicted value of quality parameter Pz2 corresponds to the gating module G2, and the predicted value of quality parameter Pz3 corresponds to the gating module G3.

[0114] In specific implementation, the tower network generally should include several tower modules. The number of tower modules should be no less than the number of gating modules. Preferably, the number of tower modules is configured to be consistent with the number of gating modules. Generally, a one-to-one correspondence connection should be adopted between the gating modules and the tower modules. When Figure 3 An embodiment is shown in which there are three gating modules, then the number of tower modules should also be 3. Figure 3 Among them, the 3 tower modules are respectively the tower module TowerA, the tower module TowerB, and the tower module TowerC. Among them, the tower module TowerA is connected to the gating module G1 in a corresponding manner, the tower module TowerB is connected to the gating module G2 in a corresponding manner, and the tower module TowerC is connected to the gating module G3 in a corresponding manner.

[0115] As can be seen from the above description, for each multi-quality shared feature to be detected, after the expert module performs feature linear activation processing, a shared expert feature to be detected and several specific expert features to be detected can be obtained. Thereafter, for each specific expert feature to be detected, the specific expert feature to be detected, the shared expert feature to be detected, and the near-infrared spectral data to be detected should be subjected to gated weighted fusion. Among them, when performing gated weighted fusion, a specific expert feature to be detected, a shared expert feature to be detected, and near-infrared spectral data to be detected should be loaded into a corresponding gated module, and then the gated module is used to perform gated weighted fusion.

[0116] Figure 3 An implementation example of gated weighted fusion in AVIC is shown in the figure. In the figure, the shared expert feature to be detected generated by the shared expert module, the near-infrared spectral data to be detected, and the specific expert feature to be detected generated by the specific expert module ExpertsA are simultaneously loaded into the gated module G1; at the same time, the shared expert feature to be detected generated by the shared expert module, the near-infrared spectral data to be detected, and the specific expert feature to be detected generated by the specific expert module ExpertsB are simultaneously loaded into the gated module G2, and further, the shared expert feature to be detected generated by the shared expert module, the near-infrared spectral data to be detected, and the specific expert feature to be detected generated by the specific expert module ExpertsC are simultaneously loaded into the gated module G3. Thereafter, the gated module G1, the gated module G2, and the gated module G3 are respectively used to perform corresponding gated weighted fusion.

[0117] Figure 3 In the figure, after the gated module G1 performs gated weighted fusion processing, a gated weighted feature sequence A to be detected can be generated and loaded into the tower module TowerA; at the same time, after the gated module G2 performs gated weighted fusion processing, a corresponding gated weighted feature sequence B to be detected can be generated and loaded into the tower module TowerB; after the gated module G3 performs gated weighted fusion processing, a corresponding gated weighted feature sequence C to be detected can be generated and loaded into the tower module TowerC.

[0118] In specific implementation, the tower module can be composed of multiple cascaded regression prediction heads. The regression prediction head can adopt the commonly used structural forms in the prior art. The way of cascading the regression prediction heads to form the tower module can be consistent with the prior art. When the tower module is formed by the regression prediction heads, the tower module performs regression prediction on the received gated weighted feature sequence to generate a corresponding predicted quality parameter value after the regression prediction. For example, the tower module TowerA performs regression prediction on the gated weighted feature sequence A and obtains the predicted quality parameter value Pz1 after the regression prediction. At the same time, the tower module TowerB performs regression prediction on the gated weighted feature sequence B and obtains the predicted quality parameter value Pz2 after the regression prediction. The tower module TowerC performs regression prediction on the gated weighted feature sequence C and obtains the predicted quality parameter value Pz3 after the regression prediction.

[0119] It should be noted that the shared expert module and the specific expert module can adopt the same structural form. Of course, the shared expert module and the specific expert module can also adopt different forms. Preferably, the shared expert module and the specific expert module adopt the same form. When the shared expert module and the specific expert module adopt the same form, Figure 8 An embodiment of the shared expert module is shown in. In the figure, the shared expert module includes a first linear layer of the expert module, a ReLU activation function layer, and a second linear layer of the expert module that are connected in sequence. Specifically, when performing the above linear activation processing, it specifically means using the first linear layer of the expert module, the ReLU activation function layer, and the second linear layer of the expert module to process the to-be-detected multi-quality shared features in sequence.

[0120] In specific implementation, the shared expert module can also adopt other implementation forms, which can be specifically selected according to needs. According to the forms adopted by the shared expert module and the specific expert module, the corresponding linear activation processing method can be determined, that is, the forms corresponding to generating the corresponding to-be-detected shared expert features and to-be-detected specific expert features can be determined.

[0121] In an embodiment of the present invention, the gated module includes a to-be-detected data processing unit, a first gated multiplier, a second gated multiplier, and a gated adder, where

[0122] During gated weighted fusion, the to-be-detected data processing unit performs at least data linear activation processing on the to-be-detected near-infrared spectral data to generate to-be-detected activation features after the data linear activation processing;

[0123] The first gated multiplier is used to multiply the to-be-detected shared expert features by the to-be-detected activation features to generate to-be-detected shared activation features; at the same time, the second gated multiplier is used to multiply the to-be-detected specific expert features by the to-be-detected activation features to generate to-be-detected specific activation features;

[0124] Use a gated adder to perform an addition operation on the to-be-tested shared activation feature and the to-be-tested specific activation feature to generate a to-be-tested gated weighted feature sequence.

[0125] It should be noted that the gated modules of the customized gated module preferably adopt the same structural form. For example, it may include a to-be-tested data processing unit, a first gated multiplier, a second gated multiplier, and a gated adder. Among them, the to-be-tested near-infrared spectral data can be linearly activated through the to-be-tested data processing unit. Figure 7 An embodiment of the gated module of the present invention is shown in. It can be seen from the figure that Figure 7 in corresponds to Figure 3 the gated module G1 in, Figure 7 the Input in specifically refers to the to-be-tested near-infrared spectral data, the specific expert module A is the to-be-tested specific expert feature, and the shared expert module is the to-be-tested shared expert feature.

[0126] Figure 7 An embodiment of the to-be-tested data processing unit is shown in. It can be seen from the figure that the to-be-tested data processing unit may include a data activation linear layer and a Softmax activation function. Among them, the to-be-tested near-infrared spectral data can be linearly transformed through the data activation linear layer, and the activation processing is realized by using the Softmax activation function. The to-be-tested near-infrared spectral data is sequentially processed by the data activation linear layer and the Softmax activation function, and the to-be-tested activation feature can be generated through the Softmax activation function. Of course, the to-be-tested data processing unit can also adopt other forms, as long as it can realize the same linear activation processing for the to-be-tested near-infrared spectral data, and will not be listed one by one here.

[0127] Specifically in implementation, the first gated multiplier is used to perform a multiplication operation on the to-be-tested shared expert feature and the to-be-tested activation feature to generate a to-be-tested shared activation feature; at the same time, the second gated multiplier multiplies the to-be-tested specific expert feature and the to-be-tested activation feature to generate a to-be-tested specific activation feature; thereafter, the gated adder is used to perform an addition operation on the to-be-tested shared activation feature and the to-be-tested specific activation feature to generate a to-be-tested gated weighted feature sequence. It can be seen from the above description that the generated to-be-tested gated weighted feature sequence should be loaded into the corresponding tower module, such as Figure 7 in the example shown, the to-be-tested gated weighted feature sequence should be loaded into the tower module TowerA. Figure 7 in, CF2 is the first gated multiplier, CF3 is the second gated multiplier, and Ad1 is the gated adder.

[0128] It can be seen from the above description that based on the dynamic fusion mechanism of the customized gated module, the balance between quality parameter prediction tasks can be effectively achieved, task conflicts and sample correlations can be better handled, the knowledge transfer and sharing of different quality parameter prediction tasks are promoted, and thus better performance is achieved in multi-quality parameter prediction.

[0129] In one embodiment of the present invention, when constructing the quality parameter collaborative detection model, it includes:

[0130] Construct a quality parameter collaborative detection basic model and a basic model training dataset for training the quality parameter collaborative detection basic model, where

[0131] the basic model training dataset includes a number of training samples. For each training sample, it includes a training near-infrared spectrum data and a number of quality parameter labels. The number of quality parameter labels in the training sample is consistent with the number of quality parameter predicted values in the multi-quality parameter information, and the types of the quality parameter labels and the quality parameter predicted values are in one-to-one correspondence;

[0132] Configure the model training conditions for the quality parameter collaborative detection basic model until the quality parameter collaborative detection basic model is trained to the target state. After that, configure the quality parameter collaborative detection basic model trained to the target state as the quality parameter collaborative detection model.

[0133] It can be understood that the quality parameter collaborative detection basic model should adopt the same structure as the above-mentioned quality parameter collaborative detection model. Therefore, the corresponding quality parameter collaborative detection basic model can be constructed according to the description of the above quality parameter collaborative detection model. After constructing the quality parameter collaborative detection basic model, a basic model training dataset should also be constructed, and the constructed basic model training dataset is used to train the quality parameter collaborative detection basic model. The model training process for the quality parameter collaborative detection basic model can refer to the corresponding description below.

[0134] In order to construct the required basic model training dataset, training substances should be provided. Among them, the training substances should be of the same type as the substances to be detected. As can be seen from the above description, when the substance to be detected is bauxite, the training substances should also be bauxite. When the substance to be detected is other types of substances, the training substances can be correspondingly selected and determined. After selecting and determining the training substances, the near-infrared spectrum of the training substances can be collected by referring to the method of obtaining the near-infrared spectrum data of the substance to be detected above, so that the corresponding training near-infrared spectrum data can be obtained after the near-infrared spectrum data is collected. In addition, according to the type of the training substances, the quality parameter labels of the training substances can be measured by the methods in the technical field. It should be noted that the quality parameter labels are the measured values of the corresponding quality parameters of the training substances.

[0135] In order to achieve the collaborative detection of multiple quality parameters, multiple quality parameters of the training substance should be measured, from which multiple quality parameter labels can be obtained, and the types of quality parameters of the multiple quality parameter labels are completely different. It should be noted that after obtaining multiple quality parameter labels and the corresponding training near-infrared spectral data, a training sample can be formed. For each training sample, the number of quality parameter labels is consistent with the number of quality parameter predicted values in the multi-quality parameter information, and the type of quality parameter label corresponds one-to-one with the type of quality parameter predicted value.

[0136] Taking bauxite as an example of the substance to be detected and the training substance, the method and process of constructing the basic model training dataset will be illustrated by examples.

[0137] Specifically, 424 bauxite samples with a particle size of 0.15 mm after drying, crushing, grinding, and screening are collected. Based on the standard "Chemical Analysis Methods for Bauxite Ores", the X-ray fluorescence spectrometry is used to determine the corresponding contents of Al2O3, SiO2, and Fe2O3 in the bauxite samples, that is, the measured values of the corresponding quality parameters are obtained, and the corresponding multi-quality parameter labels can be formed accordingly. As can be seen from the above description, for each bauxite sample, the near-infrared spectrum should also be collected to obtain the near-infrared spectral data of each bauxite sample.

[0138] After obtaining the near-infrared spectral data and the corresponding quality parameter measured values of each bauxite sample, in order to improve the quality of the constructed basic model training dataset, data cleaning processing should also be carried out. For example, the criterion based on Mahalanobis distance can be used to eliminate abnormal data and the data preprocessing method of SNV method. The methods of abnormal data elimination based on the criterion based on Mahalanobis distance and the data preprocessing method of SNV method can be consistent with the existing technologies, which will not be elaborated here. After data cleaning processing, the corresponding basic model training dataset can be constructed.

[0139] It should be understood that when training the model of the quality parameter collaborative detection basic model, the model training conditions should also be configured. The configured model training conditions generally include the training loss function and the training configuration parameters. Specifically, when implemented, the configured training configuration parameters can include: using the Adam optimizer with a regularization weight of 0.001, setting the initial learning rate to 0.00025, using the ReduceLROnPlateau learning rate decay strategy, and dynamically adjusting the learning rate according to the loss value of the basic model training validation set. The size of each batch is 32, and the maximum number of iterations is set to 150.

[0140] It should be noted that when constructing the training dataset of the basic model, a validation set for training the basic model should also be constructed. The method of constructing the validation set for training the basic model can refer to the corresponding description of the training dataset of the basic model above, and the learning rate can be dynamically adjusted based on the loss value of the validation set for training the basic model. When the above model training conditions are adopted and the maximum number of iterations of model training reaches 150, the training of the basic model for collaborative detection of quality parameters reaches the target state. After that, the basic model for collaborative detection of quality parameters with 150 generations of model training is configured as the model for collaborative detection of quality parameters.

[0141] In one embodiment of the present invention, the configured model training conditions include a training loss function, and the training loss function includes:

[0142]

[0143] wherein, is the training loss value, is the regression training loss, is the orthogonal training loss, is the number of training samples, is the number of tasks during collaborative detection, is the quality parameter label of the k-th task corresponding to the i-th training sample, is the quality parameter prediction value of the k-th task corresponding to the i-th training sample, is the batch size during model training, is the training shared expert feature matrix of the j-th batch of training samples, is the transpose matrix of the training shared expert feature matrix, is the training specific expert feature matrix of the j-th batch of training samples corresponding to the k-th task, represents the square of the Frobenius norm.

[0144] Specifically, during implementation, the number of tasks during collaborative detection is the number of quality parameter prediction values that need to be generated during collaborative detection processing. For example, in the Figure 3 illustrated embodiment, the number of tasks during collaborative detection should be 3. It should be noted that for the quality parameter prediction value of the k-th task corresponding to the i-th training sample, it can be directly obtained through the basic model for collaborative detection of quality parameters. After constructing the training dataset of the basic model, the batch size during model training can be determined according to the number of training samples in the training dataset of the basic model and the size of each batch in the above description. .

[0145] It should be noted that since it includes multiple specific expert modules, gating modules, and tower modules, during initial training, it is necessary to specify a tower module to predict the corresponding quality parameter to satisfy the calculation of the above training loss function. For example, tower module TowerA can be specified to predict a quality parameter. During inference, the corresponding quality parameter prediction value can be obtained through the output of tower module TowerA.

[0146] In order to decompose the near-infrared spectral data to be detected to the greatest extent and obtain the specific expert features to be detected and the shared expert features to be detected, the present invention introduces an orthogonal constraint, that is, adding an orthogonal training loss to the training loss function. to ensure that the quality parameter collaborative detection model obtained through training can focus on the specific expert features to be detected while avoiding redundant information.

[0147] It should be noted that since an orthogonal constraint is adopted in model training, the correlation between multiple quality parameters of the substance to be detected is fully considered. Therefore, when using the quality parameter collaborative detection model for collaborative detection processing, while maintaining high precision, the correlation between multiple quality parameters of the substance to be detected can be fully considered, improving the accuracy and reliability of generating multi-quality parameter information. In addition, when using the quality parameter collaborative detection model of the present invention for collaborative detection processing, it can also overcome the limitations of traditional detection methods, such as complex preprocessing of the substance to be detected, expensive analytical instruments, and the ability to only detect a single quality parameter.

[0148] During model training, for each batch of training samples, the training shared expert features and the corresponding training specific expert features of each training sample can be obtained through the feature extraction module in the quality parameter collaborative detection basic model. The situations of the training shared expert features and the training specific expert features can refer to the descriptions of the shared expert features to be detected and the specific expert features to be detected. The difference is that here they are generated based on the training near-infrared spectral data of the training samples, while the above-mentioned shared expert features to be detected and specific expert features to be detected are generated based on the near-infrared spectral data to be detected.

[0149] When the number of training samples in each batch is 32, for each batch of training samples, 32 corresponding training shared expert features can be obtained. At this time, a training shared expert feature matrix can be constructed based on the 32 training shared expert features. Similarly, a training specific expert feature matrix for each task of the current batch of training samples can be obtained. Figure 6 An embodiment of introducing an orthogonal constraint is shown in. As can be seen from the figure, when introducing an orthogonal constraint, the orthogonal constraint between the training shared expert features of each training sample and each training specific expert feature is mainly calculated. In the figure, ZJ1 and ZJ2 represent the orthogonal constraint.

[0150] Based on the above description of orthogonal constraints, the orthogonal training loss of each batch of training samples and the orthogonal training loss of all training samples can be calculated. It can be understood that for the loss value of the training and validation set of the basic model, the above training loss value can be referred to. The corresponding description will not be elaborated here.

[0151] It should be understood that for the constructed basic model for collaborative detection of quality parameters, after training using the above model training method to obtain the quality parameter collaborative detection model, for the near-infrared spectral data of the substance to be detected, when the quality parameter collaborative detection model performs collaborative detection processing, the corresponding multi-quality shared features to be detected can be effectively decomposed, and then after feature fusion prediction processing, all quality parameter prediction values can be obtained simultaneously, that is, the collaborative detection processing of multiple quality parameters is realized.

[0152] In summary, a multi-quality parameter collaborative detection system based on near-infrared spectroscopy can be obtained. Specifically, it includes a multi-quality parameter collaborative detection device, and the above quality parameter collaborative detection model is deployed inside the multi-quality parameter collaborative detection device, where

[0153] For the near-infrared spectral data of any substance to be detected, the multi-quality parameter collaborative detection device uses the above-mentioned method for collaborative detection processing to obtain the multi-quality parameter information of the substance to be detected after collaborative detection processing.

[0154] It should be noted that the multi-quality parameter collaborative detection device can use existing common computer terminal devices, and the quality parameter collaborative detection model can be deployed in the multi-quality parameter collaborative detection device by using common methods in this technical field. After that, for the near-infrared spectral data of any substance to be detected, the multi-quality parameter collaborative detection device uses the above-mentioned method for collaborative detection processing to obtain the multi-quality parameter information of the substance to be detected. The manner and process of the multi-quality parameter collaborative detection device for collaborative detection processing can refer to the above description, which will not be elaborated here.

[0155] The above has schematically described the present invention and its implementation manners. This description is not restrictive. Without departing from the spirit or basic features of the present invention, the present invention can be implemented in other specific forms. What is shown in the drawings is only one of the implementation manners of the present invention, and the actual structure is not limited thereto. Any reference signs should not limit the claimed rights involved. Therefore, if those of ordinary skill in the art are inspired by it and, without departing from the purpose of this creation, design structures and embodiments similar to this technical solution without creative efforts, they should all fall within the protection scope of this application. In addition, the term "including" does not exclude other elements or steps, and the word "a" before an element does not exclude including "a plurality of" such elements. The multiple elements stated in the product claims can also be implemented by one element through software or hardware. Words such as first and second are used to indicate names and do not indicate any particular order.

Claims

1. A multi-quality parameter collaborative detection method based on near-infrared spectroscopy, characterized in that The method includes: providing the near-infrared spectrum data to be detected of the substance to be detected, and loading the near-infrared spectrum data to be detected into the constructed co-detection model of quality parameters, so as to perform co-detection processing by using the co-detection model of quality parameters and generate the multi-quality parameter information of the substance to be detected, where when performing co-detection processing, at least perform feature dimension expansion processing, feature extraction processing and feature fusion prediction processing on the near-infrared spectrum data to be detected, and generate the multi-quality parameter information of the substance to be detected after feature fusion prediction processing; the co-detection model of quality parameters includes an embedding layer, a feature extraction module and a customized gating network connected in sequence, where perform feature dimension expansion processing on the near-infrared spectrum data to be detected through the embedding layer, and generate the spectrum data after dimension expansion to be detected; perform feature extraction processing on the spectrum data after dimension expansion to be detected through the feature extraction module, and generate the multi-quality shared features to be detected; perform feature fusion prediction processing on the multi-quality shared features to be detected and the near-infrared spectrum data to be detected through the customized gating network to generate multi-quality parameter information, where when performing feature fusion prediction processing, first perform feature linear activation processing on the multi-quality shared features to be detected to generate a shared expert feature to be detected and several specific expert features to be detected. Thereafter, perform gated weighted fusion on each specific expert feature to be detected with the shared expert feature to be detected and the near-infrared spectrum data to be detected respectively, and generate the corresponding quality parameter prediction value after regression prediction, where the number of specific expert features to be detected is consistent with the number of quality parameter prediction values in the multi-quality parameter information; form the multi-quality parameter information of the substance to be detected based on all the quality parameter prediction values; the customized gating network includes a customized gating module and a tower network adaptively connected to the customized gating module, where the customized gating module includes an expert unit and a gating unit, where the expert unit includes a shared expert module and several specific expert modules, the gating unit includes several gating modules, the number of specific expert modules is consistent with the number of gating modules, and the number of gating modules is not less than the number of quality parameter prediction values in the multi-quality parameter information; the tower network includes several tower modules for regression prediction, and the tower modules are connected in one-to-one correspondence with the gating modules; when performing feature fusion prediction processing, use the expert unit to perform feature linear activation processing on the multi-quality shared features to be detected, so as to generate the shared expert feature to be detected through the shared expert module and generate the corresponding specific expert feature to be detected through a specific expert module; load the shared expert feature to be detected, the near-infrared spectrum data to be detected and the specific expert feature to be detected into the corresponding gating modules respectively, so as to perform gated weighted fusion by using the gating modules and generate the gated weighted feature sequence to be detected, and load the gated weighted feature sequence to be detected into the corresponding connected tower module; the tower module performs regression prediction on the received gated weighted feature sequence to be detected, so as to generate a corresponding quality parameter prediction value after regression prediction.

2. The multi-quality parameter collaborative detection method based on near-infrared spectroscopy according to claim 1, characterized in that: the feature extraction module includes several feature extraction sub-modules connected in series in sequence, where For any feature extraction sub-module, it includes a depthwise point convolution network and a spatial dimension feature weighting module connected in series in sequence, and configures the depthwise point convolution network and the spatial dimension feature weighting module to form a residual connection; When performing feature extraction processing, for any feature extraction sub-module, first use the depthwise point convolution network to perform single-channel long-distance feature extraction processing and channel fusion processing on the basic data of the feature to be detected in sequence, and generate the fused feature after extraction of the feature to be detected; Use the spatial dimension feature weighting module to perform spatial dimension feature weighting processing on the fused feature after extraction of the feature to be detected to generate the weighted feature in the spatial dimension of the feature to be detected; thereafter, perform residual connection processing on the weighted feature in the spatial dimension of the feature to be detected and the basic data of the feature extraction to be detected, and generate the data feature of the sub-module to be detected.

3. The multi-quality parameter collaborative detection method based on near-infrared spectroscopy according to claim 2, characterized in that: The depthwise point convolution network includes a depth convolution layer using a large-size convolution kernel and a batch normalization layer, a first point convolution layer, a GeLU activation function, and a second point convolution layer connected to the depth convolution layer in sequence, where Perform single-channel long-distance feature extraction processing on the basic data of the feature to be detected through the depth convolution layer with a large-size convolution kernel; Form an inverted bottleneck structure through the first point convolution layer and the second point convolution layer, and use the formed inverted bottleneck structure to perform channel fusion processing. During channel fusion processing, first expand the channel dimension by r times through the first point convolution layer, and then restore the expanded channel dimension through the second point convolution layer.

4. The multi-quality parameter collaborative detection method based on near-infrared spectroscopy according to claim 2, characterized in that: the spatial dimension feature weighting module includes a spatial dimension convolution block, a spatial dimension Sigmoid layer, and a spatial dimension multiplier, where When performing spatial dimension feature weighting processing, for the fused feature after extraction of the feature to be detected, first perform convolution operation using the spatial dimension convolution block to generate a single-channel feature sequence to be weighted, and then use the spatial dimension Sigmoid layer to convert the single-channel feature sequence to be weighted into a probability distribution to form single-channel probability distribution information, where the fused feature after extraction of the feature to be detected is generated by the depthwise point convolution network within the same feature extraction sub-module; Multiply the single-channel probability distribution information by the fused feature after extraction of the feature to be detected through the spatial dimension multiplier to generate the weighted feature in the spatial dimension of the feature to be detected.

5. The collaborative detection method for multiple quality parameters based on near-infrared spectroscopy according to claim 1, characterized in that: The gating module includes a data processing unit to be detected, a first gating multiplier, a second gating multiplier, and a gating adder, where During gating weighted fusion, the data processing unit to be detected performs at least data linear activation processing on the near-infrared spectroscopy data to be detected to generate an activated feature to be detected after data linear activation processing; Multiply the shared expert feature to be detected by the activated feature to be detected using the first gating multiplier to generate a shared activated feature to be detected; at the same time, multiply the specific expert feature to be detected by the activated feature to be detected using the second gating multiplier to generate a specific activated feature to be detected; Perform an addition operation on the shared activated feature to be detected and the specific activated feature to be detected using the gating adder to generate a gating weighted feature sequence to be detected.

6. The multi-quality parameter collaborative detection method based on near-infrared spectroscopy according to claim 1, wherein When constructing a quality parameter collaborative detection model, it includes: Construct a basic model for collaborative detection of quality parameters and a basic model training dataset for training the basic model for collaborative detection of quality parameters, where the basic model training dataset includes a number of training samples, and each training sample includes a training near-infrared spectrum data and a number of quality parameter labels. The number of quality parameter labels in the training sample is consistent with the number of quality parameter prediction values in the multi-quality parameter information, and the types of the quality parameter labels and the quality parameter prediction values are in one-to-one correspondence; Configure the model training conditions for the basic model for collaborative detection of quality parameters until the basic model for collaborative detection of quality parameters is trained to a target state. Thereafter, configure the basic model for collaborative detection of quality parameters trained to the target state as the quality parameter collaborative detection model.

7. The multi-quality parameter collaborative detection method based on near-infrared spectroscopy according to claim 1, characterized in that The configured model training conditions include a training loss function, and the training loss function includes: in, is the training loss value, is the regression training loss, is the orthogonal training loss, is the number of training samples, is the number of tasks in collaborative detection, For the The quality parameter label of the k-th task corresponding to the training sample, For the The quality parameter prediction value of the k-th task corresponding to the training sample, is the batch size during model training, For the The training shared expert feature matrix of batch training samples, is the transposed matrix of the training shared expert feature matrix, For the The batch of training samples corresponds to the training-specific expert feature matrix of the k-th task, is the square of the Frobenius norm.

8. A multi-quality parameter collaborative detection system based on near-infrared spectroscopy, characterized in that, Include a multi-quality parameter collaborative detection device and deploy the above-mentioned quality parameter collaborative detection model inside the multi-quality parameter collaborative detection device, where For the near-infrared spectrum data to be detected of any substance to be detected, the multi-quality parameter collaborative detection device performs collaborative detection processing by using the method described in any one of claims 1 to 7 above to obtain the multi-quality parameter information of the substance to be detected after the collaborative detection processing.

Citation Information

Patent Citations

  • Coal sampling method based on near infrared spectroscopy

    CN119131323A

  • Method and system for rapidly detecting content of aluminum in bauxite based on near infrared spectrum

    CN119413751A