Intelligent detection device and method for oiling agent
By dividing the oiling agent sample into multiple detection intervals, using a spectral detection device for preliminary scanning and dynamic parameter adjustment, and combining convolutional neural networks and deep feature extraction, the problems of insufficient parameter fixation and intelligent control in oiling agent detection are solved, and high-precision quality assessment is achieved.
Patent Information
- Application Number
- CN202511001659.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-21
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-07-21
AI Technical Summary
Existing oil-refining agent detection technology has fixed detection parameters, resulting in inconsistent accuracy, difficulty in exploring deep features, and lack of intelligent control capabilities, making it unable to meet the needs of high-precision and high-efficiency quality control.
By dividing the oiling agent sample into multiple detection intervals, performing preliminary scanning using a spectral detection device, dynamically adjusting the detection parameters, and combining convolutional neural networks and deep feature extraction, an oiling agent quality assessment report is generated.
It has achieved comprehensive and detailed testing of oil-refining agent samples, improved the adaptability and intelligence level of the detection system, and generated high-precision quality assessment reports.
Smart Images

Figure CN120489989B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oiling agent detection, and in particular to an intelligent oiling agent detection device and method. Background Art
[0002] In the field of industrial production and quality control, oiling agents, as key raw materials or auxiliary agents, have a quality that directly affects product performance, production process stability, and subsequent application results. Traditional oiling agent detection methods rely primarily on manual sampling combined with laboratory instrument analysis, such as chemical titration and chromatography. These methods have significant limitations: on the one hand, the manual operation process is cumbersome and time-consuming, making it difficult to meet the needs of real-time online testing. Especially in large-scale production scenarios, delayed test results may lead to untimely production adjustments, increasing defective rates and production costs. On the other hand, traditional testing methods usually analyze a single indicator or local sample, which cannot fully reflect the overall quality characteristics of the oiling agent. They are also significantly affected by human operation errors, making it difficult to guarantee detection accuracy and repeatability.
[0003] With the development of industrial automation and intelligent technology, spectral analysis technology has gradually been applied to quality inspection in the chemical industry due to its advantages of rapid, non-destructive, and multi-index simultaneous detection. However, existing oil-based agent detection solutions based on spectroscopy still have the following problems: First, spectral detection parameters are usually fixed and cannot be dynamically optimized according to sample characteristics, resulting in uneven spectral data acquisition accuracy in different detection intervals. In particular, for oil-based agent samples with uneven composition distribution, fixed parameters cannot take into account the detection needs of various regions and may miss key quality information. Second, traditional spectral data processing methods often use simple threshold judgments or empirical models, which do not fully explore the deep feature correlations in spectral data, making it difficult to establish a high-precision quality assessment model, resulting in insufficient reliability of detection results. Third, existing detection systems lack the ability to intelligently control the detection process and are unable to adaptively adjust subsequent detection strategies based on preliminary detection results. The overall detection process is less flexible and intelligent, making it difficult to adapt to diverse oil-based agent detection scenarios.
[0004] Furthermore, in complex industrial environments, oil dispersants can experience compositional fluctuations due to factors such as storage conditions and production batches. Traditional detection methods struggle to quickly identify these subtle variations, potentially leading to substandard products entering the market or misidentification of qualified products, impacting a company's economic profitability and reputation. Therefore, there is an urgent need for an oil dispersant detection technology that can implement dynamic parameter optimization, deep feature extraction, and intelligent detection process control. This technology can improve detection efficiency, accuracy, and intelligence, meeting the high-precision and high-efficiency demands of modern industry for oil dispersant quality control. Summary of the Invention
[0005] The purpose of the present invention is to provide an intelligent detection device and method for oiling agent to solve the problems raised in the above background technology.
[0006] To achieve the above objectives, the present invention provides the following technical solution: an intelligent detection method for oiling agents, the method comprising:
[0007] Step 1: Divide the oilification agent sample to be tested into multiple testing intervals;
[0008] Step 2: performing a preliminary spectral scan on each of the plurality of detection intervals using a spectral detection device to obtain preliminary spectral data of the plurality of detection intervals, wherein the preliminary spectral data of the detection intervals includes absorbance values, turbidity values, transmittance, and characteristic wavelength peak values;
[0009] Step 3: Based on the preliminary spectral data of the plurality of detection intervals, dynamically adjusting the detection parameters of the spectrum detection device when rescanning each detection interval to obtain optimized spectral data of the plurality of detection intervals;
[0010] Step 4: Optimizing the spectral data based on the multiple detection intervals to generate an oilification agent quality assessment report.
[0011] Preferably, the step 3 comprises:
[0012] Performing feature embedding coding on each of the plurality of detection interval preliminary spectral data to obtain a plurality of detection interval spectral feature embedding coding vectors;
[0013] Extracting a first detection interval spectral feature embedding coding vector corresponding to a first detection interval from the plurality of detection interval spectral feature embedding coding vectors;
[0014] Embedding the plurality of detection interval spectral features into coding vectors and inputting them into a spectral intrinsic feature extractor to obtain a spectral intrinsic feature coding vector;
[0015] generating a dynamic adjustment value of a detection parameter based on a feature offset between the first detection interval spectral feature embedding coding vector and the spectral intrinsic feature coding vector;
[0016] Based on the dynamic adjustment value of the detection parameter, the detection parameter of the spectrum detection device is adjusted when scanning the first detection interval.
[0017] Preferably, performing feature embedding coding on each of the plurality of detection interval preliminary spectral data to obtain a plurality of detection interval spectral feature embedding coding vectors includes:
[0018] Each of the plurality of detection interval preliminary spectral data is input into an embedding encoder based on a convolution kernel to obtain the plurality of detection interval spectral feature embedding coding vectors.
[0019] Preferably, the plurality of detection interval spectral features are embedded into the coding vector and input into the spectral intrinsic feature extractor to obtain the spectral intrinsic feature coding vector, comprising:
[0020] Performing feature complementation analysis on the plurality of detection interval spectral feature embedded coding vectors with reference to a reference spectral feature to obtain a plurality of detection interval spectral feature-reference feature complementary information embedded coding vectors;
[0021] The plurality of detection interval spectral feature-reference feature complementary information embedded coding vectors are subjected to weighted dynamic modulation aggregation coding to obtain the spectral intrinsic feature coding vector.
[0022] Preferably, performing feature complementation analysis on the plurality of detection interval spectral feature embedded coding vectors with reference to the reference spectral feature to obtain a plurality of detection interval spectral feature-reference feature complementary information embedded coding vectors includes:
[0023] Embedding the plurality of detection interval spectral features into coding vectors and inputting them into a reference feature extraction network to obtain a detection interval spectral reference feature coding vector;
[0024] The complementary information of each detection interval spectral feature embedded coding vector relative to the detection interval spectral reference feature coding vector is extracted from the multiple detection interval spectral feature embedded coding vectors to obtain the multiple detection interval spectral feature-reference feature complementary information embedded coding vectors.
[0025] Preferably, performing weighted dynamic modulation aggregation coding on the multiple detection interval spectral feature-reference feature complementary information embedded coding vectors to obtain the spectral intrinsic feature coding vector includes:
[0026] Inputting each of the plurality of detection interval spectral feature-reference feature complementary information embedding coding vectors into a complementary information weight allocation module based on a gating mechanism to obtain a plurality of detection interval spectral feature complementary information weight coefficients;
[0027] Based on the weight coefficients of the multiple detection interval spectral feature complementary information, weighted modulate the multiple detection interval spectral feature-reference feature complementary information embedded coding vectors to obtain multiple weighted modulated detection interval spectral feature-reference feature complementary information embedded coding vectors;
[0028] The detection interval spectrum reference feature coding vector and the plurality of weighted modulation detection interval spectrum feature-reference feature complementary information embedding coding vectors are fused to obtain the spectrum intrinsic feature coding vector.
[0029] Preferably, generating a dynamic adjustment value of a detection parameter based on a feature offset between the first detection interval spectral feature embedding coding vector and the spectral intrinsic feature coding vector comprises:
[0030] Performing feature offset calculation on the first detection interval spectral feature embedded coding vector and the spectral intrinsic feature coding vector to obtain a first detection interval spectral feature offset coding vector;
[0031] The first detection interval spectral feature offset coding vector is input into a detection parameter dynamic adjuster based on a decoding network to obtain the detection parameter dynamic adjustment value.
[0032] Preferably, performing feature offset calculation on the first detection interval spectral feature embedded coding vector and the spectral intrinsic feature coding vector to obtain the first detection interval spectral feature offset coding vector includes:
[0033] An element-by-element difference vector between the first detection interval spectral feature embedding coding vector and the spectral intrinsic feature coding vector is calculated to obtain the first detection interval spectral feature offset coding vector.
[0034] Preferably, the present invention further comprises an intelligent detection device for oiling agent, the device comprising:
[0035] A detection interval division module is used to divide the oilification agent sample to be detected into multiple detection intervals;
[0036] a preliminary spectral scanning module, configured to perform preliminary spectral scanning on each of the plurality of detection intervals using a spectral detection device to obtain preliminary spectral data of the plurality of detection intervals, wherein the preliminary spectral data of the detection intervals include absorbance values, turbidity values, transmittance, and characteristic wavelength peak values;
[0037] a rescanning module for dynamically adjusting detection parameters of the spectrum detection device when rescanning each detection interval based on the preliminary spectrum data of the multiple detection intervals to obtain optimized spectrum data of the multiple detection intervals;
[0038] The quality assessment report generating module is used to optimize the spectral data based on the multiple detection intervals and generate a quality assessment report for the oilification agent.
[0039] Preferably, the re-scanning module includes:
[0040] a spectral feature embedding coding unit, configured to perform feature embedding coding on each of the plurality of detection interval preliminary spectral data to obtain a plurality of detection interval spectral feature embedding coding vectors;
[0041] a first detection interval vector extraction unit, configured to extract a first detection interval spectral feature embedding coding vector corresponding to a first detection interval from the plurality of detection interval spectral feature embedding coding vectors;
[0042] An intrinsic feature encoding unit, configured to embed the plurality of detection interval spectral features into encoding vectors and input them into a spectral intrinsic feature extractor to obtain a spectral intrinsic feature encoding vector;
[0043] a detection parameter adjustment value generating unit, configured to generate a dynamic adjustment value of a detection parameter based on a feature offset between the first detection interval spectral feature embedding coding vector and the spectral intrinsic feature coding vector;
[0044] A detection parameter adjustment unit is configured to adjust the detection parameter of the spectrum detection device when scanning the first detection interval based on the dynamic adjustment value of the detection parameter.
[0045] Compared with the prior art, the present invention has the following beneficial effects:
[0046] In terms of intelligent testing, the oil-refining agent sample to be tested is divided into multiple test zones. A preliminary spectral scan is performed using a spectral detection device to obtain preliminary spectral data containing multi-dimensional information such as absorbance, turbidity, transmittance, and characteristic wavelength peaks. Based on this data, the test parameters for the subsequent scan are dynamically adjusted. This phased detection method overcomes the limitations of traditional fixed-parameter testing, enabling the detection system to adaptively optimize the detection strategy based on the characteristics of different sample regions. For example, for test zones with complex spectral characteristics, the accuracy of spectral signal acquisition in that region can be enhanced by dynamically adjusting parameters such as light source intensity, scanning speed, and wavelength range, avoiding the omission of critical information caused by fixed parameters, thereby achieving comprehensive and refined testing of oil-refining agent samples.
[0047] For spectral data feature mining, a convolution kernel-based embedding encoder is used to embed features in the preliminary spectral data, converting the raw spectral signal into a high-dimensional feature vector, effectively extracting local features and spatial correlation information from the spectral data. Furthermore, through a baseline feature extraction network and a complementary information weight allocation module within the gating mechanism, the complementary information between the spectral features of each detection interval and the baseline features is dynamically weighted and aggregated to generate an encoding vector that represents the overall spectral intrinsic characteristics of the oil-refining agent. This multi-level feature extraction mechanism not only captures the unique spectral characteristics of each detection interval but also, through the reference of the baseline features, explores the complementary relationships between features across different intervals, avoiding the one-sidedness of single-interval detection and thus constructing a more comprehensive and accurate quality characteristic model for the oil-refining agent.
[0048] In terms of the dynamic adjustment mechanism of detection parameters, by calculating the element-by-element difference vector between the spectral feature embedding coding vector and the spectral intrinsic feature coding vector of the first detection interval, the characteristic offset degree of the interval is accurately quantified, and the decoding network is used to generate the dynamic adjustment value of the detection parameter. This parameter adjustment method based on characteristic offset gives the optimization of detection parameters clear physical meaning and data support, and can perform fine-grained regulation based on the actual characteristic differences of each detection interval. For example, when the characteristic wavelength peak of a certain detection interval deviates significantly from the baseline characteristic, the system can automatically adjust the wavelength scanning step of the spectral detection device and perform more intensive sampling of the peak area, thereby improving the accuracy of characteristic wavelength detection and providing a more reliable data basis for subsequent quality assessment.
[0049] Regarding quality assessment report generation, a highly accurate oil-refining agent quality assessment model is developed based on optimized spectral data and intrinsic feature encoding vectors generated by a deep feature extraction network. This model not only integrates traditional test indicators such as absorbance, turbidity, and transmittance, but also leverages nonlinear correlations between deep features to quantitatively analyze complex quality parameters such as oil-refining agent purity, compositional uniformity, and aging, generating a comprehensive and objective quality assessment report. Compared to traditional assessment methods based on single indicators or empirical formulas, this model is more sensitive to subtle quality changes in oil-refining agents, effectively improving the reliability and reference value of test results.
[0050] In addition, the detection device of the present application integrates the functions of detection interval division, preliminary spectral scanning, re-scanning parameter adjustment and quality evaluation report generation in a unified intelligent system through modular design, realizing the full-process automation from sample partitioning, data acquisition, feature analysis to result output. This not only greatly reduces the labor cost and error, but also significantly improves the adaptability and intelligent level of the detection system through dynamic control mechanism and deep feature analysis algorithm, which can be widely applied in the quality detection of oiling agents in the fields of petrochemical industry, paint, lubricating oil, etc., and provides an efficient and reliable technical solution for quality control in industrial production. BRIEF DESCRIPTION OF DRAWINGS
[0051] Figure 1 The working principle diagram of the oiling agent intelligent detection method of the present application;
[0052] Figure 2 The design diagram of the detection parameter dynamic adjustment method;
[0053] Figure 3 The design diagram of the reference feature complementary analysis method;
[0054] Figure 4 The design diagram of the weight dynamic modulation aggregation method. DETAILED DESCRIPTION
[0055] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0056] Please refer to Figures 1-4 The oiling agent intelligent detection method of the present application specifically realizes the following steps:
[0057] Step 1, detection interval division: the oiling agent sample to be detected is divided into multiple detection intervals by a sample partitioning module. The division of the detection interval is determined according to the geometric structure of the sample container and the spatial resolution of spectral detection. For example, for a cylindrical sample container, it can be divided into three detection intervals of central zone, intermediate zone and edge zone along the radial direction at equal intervals, each interval forms an independent annular detection area in the sample, ensuring that the subsequent spectral scanning can cover different spatial positions of the sample.
[0058] Step 2: Preliminary spectral scan: Perform a preliminary spectral scan of each detection interval using a spectral detection device (e.g., UV-Vis spectrophotometer). During the scan, the spectral detection device collects spectral data for each detection interval using fixed initial detection parameters, generating preliminary spectral data including absorbance, turbidity, transmittance, and characteristic wavelength peaks.
[0059] Step 3: Dynamically Adjust Detection Parameters and Rescan: Based on the preliminary spectral data from multiple detection intervals obtained in Step 2, the algorithmic model dynamically adjusts the detection parameters of the spectral detection device during the rescan of each detection interval. The specific adjustment logic is as follows: First, analyze the characteristic differences between the detection intervals in the preliminary spectral data. For example, if the absorbance value of a certain interval is higher than the preset threshold, it indicates that the concentration of the component in this area is high, and the light source intensity needs to be reduced to avoid detector saturation. If the turbidity value is abnormal, the integration time is increased to improve the accuracy of weak signal acquisition. The adjusted detection parameters include but are not limited to light source intensity, scanning speed, integration time, slit width, etc., and the optimized spectral data is obtained after rescanning.
[0060] Step 4: Quality Assessment Report Generation: The optimized spectral data from each test interval is fed into a pre-trained quality assessment model. This model, built using a support vector machine (SVM) or neural network algorithm, learns the mapping relationship between historical sample spectral data and quality indicators (such as acid value, viscosity index, and additive content). It then outputs an oilifier quality assessment report that includes sample uniformity analysis, component concentration distribution, and quality grade determination. For example, if the peak intensity of a characteristic wavelength in a test interval falls below the standard range, the report will indicate insufficient additive content in that area and pinpoint the specific test interval.
[0061] The present invention will be further described below in conjunction with Examples 1 to 5:
[0062] Example 1:
[0063] During the dynamic adjustment of detection parameters in step 3, the preliminary spectral data of each detection interval needs to be feature-embedded and encoded to achieve a mapping from the original spectral data to a high-dimensional feature space. A specific implementation method is to use the preliminary spectral data of each detection interval as input. This data contains multidimensional parameters such as absorbance, turbidity, transmittance, and characteristic wavelength peak values, forming an input vector with a specific dimension. For example, if the absorbance value corresponds to a measurement value at every 1nm interval within the wavelength range of 200-800nm, the absorbance data can form a 601-dimensional vector, with the turbidity value, transmittance, and characteristic wavelength peak value as independent dimensions, ultimately forming a 601+1+1+N-dimensional input vector (N is the number of characteristic wavelength peaks).
[0064] Embedded coding is implemented using a convolutional kernel-based embedding encoder, which employs a one-dimensional convolutional neural network (1D-CNN) architecture. Its core approach is to extract local feature correlations from spectral data through sliding window operations on the convolution kernels. The encoder comprises multiple convolutional layers, taking a three-layer convolutional architecture as an example: the first convolutional layer uses five convolutional kernels of size 5. Each kernel performs a sliding convolution on the input vector with a stride of 1 and padding of 2 to ensure that the vector length remains unchanged before and after the convolution. This layer captures the feature correlations between five adjacent data points (e.g., absorbance values at adjacent wavelengths) and outputs a 5-dimensional feature map vector. The second convolutional layer uses three convolutional kernels of size 3 to perform a second convolution on the feature map output by the first layer with a stride of 1 and padding of 1, further compressing the feature dimensionality and extracting more abstract local features, outputting a 3-dimensional feature map vector. The third convolutional layer uses a single convolutional kernel of size 1, equivalent to a fully connected operation, converting the feature map vector into a fixed-dimensional spectral feature embedding code vector, for example, 128 dimensions. Through this hierarchical convolutional structure, features of different scales in spectral data can be effectively extracted, and everything from subtle fluctuations in the original data to overall trends are encoded into the feature vector.
[0065] After the feature embedding coding is completed, the vector corresponding to the first detection interval is extracted from the spectral feature embedding coding vectors of multiple detection intervals. The definition of the first detection interval can be determined according to the division order of the detection intervals. For example, when the sample is divided into three intervals: the central area, the middle area, and the edge area, the first detection interval is the central area, and its corresponding spectral feature embedding coding vector is recorded as The extraction process is implemented through an indexing mechanism, that is, according to the preset order of each detection interval, the vector at the specified position is extracted from the list or matrix storing all interval feature vectors.
[0066] The spectral features of all detection intervals are embedded into encoding vectors and fed into the spectral intrinsic feature extractor to obtain an intrinsic feature encoding vector that characterizes the overall spectral characteristics of the sample. The processing of the spectral intrinsic feature extractor is divided into two stages: complementary analysis of the reference baseline features and dynamic weighted modulation aggregation coding.
[0067] In the complementary analysis phase of the reference feature, the reference feature extraction network is first used to calculate the detection interval spectral reference feature encoding vector. The reference feature extraction network can be implemented using a mean pooling layer, which specifically averages the spectral feature embedding encoding vectors of all detection intervals dimension by dimension. Assuming that there are detection intervals, and the feature vector of each interval is , then the benchmark feature encoding vector Each dimension of The value of ,in Indicates the The first detection interval feature vector The baseline feature encoding vector reflects the average level of spectral features of all detection intervals and serves as a benchmark for subsequent analysis.
[0068] Extract the complementary information of the spectral feature embedding coding vector of each detection interval relative to the reference feature coding vector. The specific method is: for each detection interval feature vector , calculate its The element-by-element difference of ,Right now Each element of this difference vector represents the difference between the detection interval and the overall benchmark on the corresponding characteristic dimension. For example, if the absorbance value of a certain interval at a wavelength of 400nm is higher than the benchmark value, the difference is positive, and vice versa. In this way, the unique characteristics of each detection interval (such as local concentration anomalies and turbidity fluctuations) are converted into complementary information, facilitating subsequent analysis of the differences in the contribution of each interval to the overall spectral characteristics.
[0069] In the weight dynamic modulation aggregation coding stage, each complementary information is first embedded in the coding vector Input is the complementary information weight distribution module based on the gating mechanism. This module consists of two layers of fully connected neural networks. The input of the first fully connected layer is , the number of neurons is 64, and the ReLU activation function is used to map the input vector to the 64-dimensional hidden space to achieve compression and nonlinear transformation of feature dimensions; the number of neurons in the second fully connected layer is 1, and the sigmoid activation function is used, and the output weight coefficient range is between 0 and 1 The physical meaning of the weight coefficient is the importance of the complementary information of the corresponding detection interval. For example, when the absolute value of the difference between multiple dimensions in the complementary information vector of a certain interval is large, it indicates that the spectral characteristics of the interval deviate significantly from the overall benchmark, and its weight coefficient is If the difference is small, the weight coefficient approaches 1. Conversely, if the difference is small, the weight coefficient approaches 0. This gating mechanism can adaptively identify the key detection interval and avoid the interference of secondary noise information on the extraction of intrinsic features.
[0070] Based on the obtained weight coefficient, the complementary information embedding coding vector is weighted modulated. The specific operation is to embed each complementary information vector The corresponding weight coefficient Multiply them together to get the weighted modulated vector This process achieves weighted importance of complementary information in each interval, highlights the characteristic differences of key intervals, and suppresses the noise influence of secondary intervals.
[0071] Then, the fusion detection interval spectral reference feature encoding vector The fusion process is achieved through the splicing operation, that is, and Concatenate by dimension to form a high-dimensional vector. Assume It is 128-dimensional, and each complementary information vector after weighted modulation is also 128-dimensional, with a total of detection intervals, the dimension of the concatenated vector is In order to compress it to the same dimension as the original feature vector for easy subsequent processing, a linear transformation is performed on the concatenated vector through a fully connected layer, and the output dimension is set to 128 dimensions, and finally the spectral intrinsic feature encoding vector is obtained. This vector not only contains the average spectral characteristics (baseline characteristics) of all detection intervals, but also integrates the differentiated characteristics of each interval through weighted complementary information. It can fully characterize the intrinsic spectral characteristics of the sample and provide a solid feature foundation for the subsequent dynamic adjustment of detection parameters.
[0072] From feature embedding and encoding of raw spectral data to extraction of intrinsic features, all processes are automated through a neural network architecture, avoiding the complexity and subjectivity of manual feature engineering. The hierarchical structure of the convolutional neural network effectively captures both local and global features of spectral data. The introduction of a gating mechanism enables adaptive assessment of the importance of detection intervals. The fusion strategy of baseline features and complementary information ensures that intrinsic features reflect overall trends while preserving local differences. This provides a precise feature basis for the dynamic adjustment of detection parameters, thereby improving the targetedness of subsequent spectral scans and the accuracy of detection results.
[0073] Example 2:
[0074] After completing the baseline feature complementary analysis of the multiple detection interval spectral features embedded in the coding vectors in Example 1, it is necessary to further perform weighted dynamic modulation aggregation coding on the obtained multiple detection interval spectral features-baseline feature complementary information embedded in the coding vectors to generate a coding vector that can comprehensively reflect the overall spectral intrinsic characteristics of the sample. The specific implementation method is as follows:
[0075] The complementary information of the spectral feature and the reference feature of each detection interval is embedded in the encoding vector Input is a complementary information weight distribution module based on a gating mechanism. The core structure of this module is a two-layer fully connected neural network, which is designed to evaluate the importance of each complementary information vector through nonlinear transformation. Taking the input vector dimension of 128 dimensions as an example, the first fully connected layer contains 64 neurons, and uses the ReLU activation function to map the input vector from 128 dimensions to a 64-dimensional hidden space. The nonlinear characteristics of the ReLU activation function can effectively extract significant features in the complementary information, suppress negative features (that is, parts with small differences from the baseline features), and thus highlight the key difference dimensions. The second fully connected layer contains 1 neuron, uses the sigmoid activation function, and outputs a weight coefficient ranging from 0 to 1. The calculation process of this coefficient can be expressed as:
[0076]
[0077] in, and is the weight matrix and bias vector of the first fully connected layer, and is the weight matrix and bias vector of the second fully connected layer, is a sigmoid function. Through this calculation process, the global characteristics (such as the degree of overall deviation from the baseline) and local characteristics (such as the significant difference in a specific dimension) of each complementary information vector are converted into numerical weight coefficients, achieving a quantitative assessment of the importance of complementary information in each detection interval.
[0078] Based on the obtained weight coefficient , weighted modulation is performed on the corresponding complementary information embedding coding vector. The specific operation is to multiply each dimension element of each complementary information vector by the weight coefficient to obtain the weighted modulated detection interval spectral feature-reference feature complementary information embedding coding vector The physical significance of this process is that for detection intervals with higher weight coefficients (such as areas with significant complementary information due to abnormal component concentrations), their complementary information vectors are amplified, thereby occupying a higher weight in the subsequent fusion process; for detection intervals with lower weight coefficients (such as uniform areas where spectral features are close to the benchmark), their complementary information vectors are suppressed, reducing the interference of noise on the overall features. For example, if the complementary information dimensions corresponding to the turbidity values of a certain detection interval are significantly different, the weight distribution module calculates and obtains , then after weighted modulation, the difference feature of the turbidity dimension of the complementary information vector in this interval will be enhanced by 90%, and the other dimensions will be amplified by the same proportion, keeping the relative relationship between the features unchanged.
[0079] After completing the weighted modulation, it is necessary to fuse the detection interval spectral reference feature coding vector The complementary information after all weighted modulation is embedded in the coding vector. The fusion process is divided into two steps: first, feature splicing is performed, and and By concatenating the dimensions, a high-dimensional vector containing the baseline features and the weighted complementary information of each interval is formed. Assuming that the number of detection intervals is , each vector dimension is (like ), then the dimension of the concatenated vector is Since high-dimensional vectors may lead to increased computational complexity and overfitting risks, they need to be reduced in dimension through a fully connected layer. The input dimension of this fully connected layer is , the output dimension is set to , through the weight matrix and the bias vector To achieve linear transformation, the calculation formula is:
[0080]
[0081] in, Represents the vector concatenation operation. Through this transformation, the high-dimensional concatenated vector is compressed back to the original feature dimension. , forming the spectrum intrinsic feature encoding vector .
[0082] During the fusion process, the detection interval spectral reference feature encoding vector As the average representation of the overall spectral characteristics of the sample, it ensures that the intrinsic characteristics contain the common information of the sample; while the complementary information embedded in the coding vector after weighted modulation retains the individual differences of each interval, so that the intrinsic characteristics can reflect the spatial heterogeneity of the sample. For example, when there is local deposition of additives in a certain detection interval of the sample, the characteristic wavelength peak dimension of its complementary information vector will produce a significant positive shift. After weighted modulation, the shift is strengthened in the fusion process, and finally in The corresponding dimension of is reflected as a feature higher than the benchmark value, so that the intrinsic feature can accurately capture the abnormal area information of the sample.
[0083] The introduction of a gating mechanism enables the weight assignment module to adaptively learn the importance of each detection interval, avoiding the limitations of traditional fixed-weight methods. For example, when testing different batches of oil-based agent samples, the criticality of each detection interval may change dynamically due to the uncertainty of the sample composition distribution. By training the neural network parameters of the weight assignment module, the system can automatically adjust the weight coefficients based on real-time input spectral data, improving the model's generalization ability for different samples. Furthermore, the dimensionality reduction operation of the fully connected layer is not a simple dimensionality compression. Instead, it achieves an organic integration of baseline features and complementary information by learning the linear combination relationship between sample features. This ensures that the generated intrinsic feature encoding vector is both globally representative and retains sufficient detailed information to support subsequent adjustment of detection parameters.
[0084] The entire weighted dynamic modulation aggregation encoding process is implemented through end-to-end neural network learning, eliminating the need for manually pre-set weighting rules or thresholds and reducing the complexity of algorithm design. The fully automated process, from the assessment of the importance of complementary information to feature fusion, ensures that the extraction of spectral intrinsic features closely relies on real-time detection data and adapts to practical issues such as compositional heterogeneity and batch variations in oil-refining agent samples. Through this implementation, the spectral intrinsic feature encoding vector effectively integrates the overall trends and local anomalies of the sample, providing accurate feature information for subsequent dynamic adjustment of detection parameters based on feature offsets, thereby improving the accuracy and reliability of intelligent oil-refining agent detection.
[0085] Example 3:
[0086] In Example 2, the spectral intrinsic feature encoding vector is completed After the generation of , embodiment 3 needs to embed the coding vector based on the spectral feature of the first detection interval and The feature offset between them generates a dynamic adjustment value of the detection parameter. The specific implementation is as follows:
[0087] The feature offset calculation is performed to obtain the first detection interval spectrum feature offset encoding vector. The feature offset calculation is implemented by element-by-element difference operation, that is, and The difference calculation of the corresponding dimension elements is expressed as follows:
[0088]
[0089] in, is the first detection interval spectral feature offset encoding vector, whose dimension is and Consistent (assuming Wei, such as ); Represents the first detection interval spectral feature embedding coding vector Dimensional elements, Represents the spectrum intrinsic feature encoding vector Dimensional elements, The physical meaning of the difference vector is that the elements of each dimension reflect the degree of deviation between the first detection interval and the intrinsic characteristics of the sample spectrum in the corresponding characteristic dimension. The dimension corresponds to the characteristic value of absorbance at a wavelength of 450nm, and , indicating that the absorbance of this interval is higher than the average level of the entire sample, which may indicate that the concentration of components in this area is high or there are impurities; if , it indicates that the characteristics of this interval are lower than the overall level, which may reflect uneven distribution of components or fluctuations in detection conditions.
[0090] The element-by-element operation of the feature shift calculation has a clear physical correspondence, enabling quantitative comparison of the local features of the detection interval with the overall characteristics of the sample. This comparison does not rely on manually set thresholds or rules, but instead automatically captures differences through a data-driven approach, making it suitable for the detection needs of different types of oil and chemical samples. For example, for different categories such as lubricants and fuel oils, the baseline distribution and shift patterns of their spectral features may differ significantly. However, the above calculation method can uniformly convert them into feature shift vectors, achieving universal detection logic.
[0091] The first detection interval spectral feature offset encoding vector Input the detection parameter dynamic adjuster based on the decoding network to generate specific dynamic adjustment values of the detection parameters. The detection parameter dynamic adjuster adopts a fully connected neural network architecture, and its design must meet the nonlinear mapping requirements from high-dimensional feature space to low-dimensional detection parameter space. Assume that the detection parameters include light source intensity, integration time, scanning speed, slit width, etc. parameters (such as ), the network structure of the adjuster can be divided into the following parts:
[0092] Input layer: Dimension and Consistent, that is dimension, directly receiving the feature offset encoding vector.
[0093] Hidden layer: Contains multiple layers of fully connected neurons, used to extract complex correlation features in the feature offset vector. Taking two hidden layers as an example, the number of neurons in the first hidden layer can be set to (such as 64), using the ReLU activation function to achieve nonlinear transformation and dimension compression of input features; the number of neurons in the second hidden layer can be set to (As shown in 32), the ReLU activation function is used to further extract abstract features. The introduction of the ReLU activation function can enhance the nonlinear expression ability of the network and capture the nonlinear relationship between feature offset and detection parameter adjustment, such as the logarithmic relationship between absorbance offset and light source intensity adjustment or the exponential relationship between integration time adjustment.
[0094] Output layer: The number of neurons is ,correspond detection parameters, using a linear activation function (such as the identity function) to output the dynamic adjustment value of the detection parameter ,in Indicates the Adjustment value of each detection parameter.
[0095] The training process of the dynamic detection parameter adjuster is driven by sample data, and the training data set is composed of the labeled spectral feature offsets and the corresponding optimal detection parameter adjustment values. For example, for an oil-refining agent sample with a known component distribution, the feature offset vector is calculated after the initial scan, and the detection parameter adjustment value that maximizes the signal-to-noise ratio of the re-scanned spectral data is determined manually or by simulation as the training label. The mean square error (MSE) is used as the loss function during the training process, and the network weight matrix is optimized through the back-propagation algorithm. (h is the hidden layer number) and the bias vector , minimizing the difference between the adjusted value output by the network and the label value.
[0096] In practical applications, the output value of the detection parameter dynamic adjuster needs to be scaled according to the physical meaning of the detection parameter. For example:
[0097] Light source intensity adjustment value :If the original light source intensity range is , the output value can be mapped to range to avoid exceeding the physical limits of the device after adjustment;
[0098] Integral time adjustment value :If the initial integration time is , the output value can be expressed as relative to The percentage change (e.g. Indicates that the integral time increases by 50%);
[0099] Scan speed adjustment value : The absolute speed value (such as nm / min) can be directly used as the unit, and the positive or negative output value indicates acceleration or deceleration;
[0100] Slit width adjustment value : According to the slit adjustment accuracy of the spectrometer (such as 0.1nm step), the output value is quantized into an integer multiple of the step size.
[0101] This scaling mechanism ensures that the adjustment value output by the network has actual physical meaning and can directly drive the hardware parameter adjustment of the spectral detection device. For example, when the feature offset vector shows that the feature dimension offset corresponding to the turbidity value of a certain detection interval is large, it means that the scattered light in this area is strong, which may cause the detector to be saturated or the weak signal to be submerged by noise. At this time, the detection parameter dynamic adjuster may output (reduces light intensity by 15%) and The former reduces the incident light intensity to avoid saturation, while the latter improves the acquisition accuracy of low-intensity signals by extending the integration time, thereby obtaining more reliable spectral data in the rescan of the detection interval.
[0102] The mapping relationship between characteristic offset vectors and detection parameter adjustment values is clearly supported by physical logic. For example, high absorbance values are often related to sample concentration or optical path length, and can be compensated by reducing light source intensity or narrowing the slit width (to reduce the amount of incident light). Abnormal turbidity values reflect issues with sample particle size or uniformity, and signal stability can be enhanced by increasing the integration time (increasing signal acquisition time) or reducing the scan speed (increasing the exposure time at each wavelength). By learning characteristic offset-adjustment value pairs from a large number of samples, the detection parameter dynamic adjuster can automatically summarize these physical laws and form a more adaptable adjustment strategy.
[0103] In hardware implementation, the dynamic adjustment of detection parameters can be deployed in a field-programmable gate array (FPGA) or graphics processing unit (GPU), leveraging its parallel computing capabilities to achieve real-time inference. The latency from feature offset vector input to adjustment value output can be controlled to milliseconds, meeting the real-time requirements of online detection scenarios. Furthermore, the adjustment network structure can be flexibly configured based on the computing resources of the detection device. For example, a lightweight network (e.g., reducing the number of hidden layers or neurons) can be used in embedded systems, while a deeper network can be used on the server side to improve mapping accuracy.
[0104] This embodiment integrates feature shift calculation with a decoding network to automatically derive detection parameter adjustments from spectral feature differences. Element-by-element differencing ensures the physical interpretability of feature shifts, while the decoding network's nonlinear mapping capabilities account for complex parameter adjustment logic. Together, these two elements form the core "data feature analysis-detection strategy generation" phase of the intelligent oil-refining agent detection system. This implementation eliminates the need for manual intervention in parameter setting and dynamically optimizes detection conditions based on real-time sample data. This significantly improves the adaptability of spectral detection and the accuracy of test results. It is particularly suitable for detecting oil-refining agent samples with uneven composition distribution or significant batch variations.
[0105] Example 4:
[0106] The intelligent oil-refining agent detection device of the present invention comprises a plurality of functional modules, each of which realizes automation and intelligence of the detection process through hardware integration and software collaboration.
[0107] Taking the testing of a certain type of lubricant sample as an example, the sample is contained in a cylindrical transparent container with a diameter of 50mm and a height of 100mm. After the detection device is activated, the detection interval division module first spatially partitions the sample. This module uses virtual partitioning technology, and through software settings, it divides the sample into three detection intervals in the radial direction: a center area (radius 0-10mm), a middle area (radius 10-20mm), and an edge area (radius 20-25mm). The implementation of virtual partitioning relies on the coordinate positioning system of the spectral detection device. This system uses a camera to capture an image of the sample container and, combined with an image recognition algorithm, determines the spatial coordinate range of each detection interval. For example, the center area corresponds to the spectral probe moving to the center axis of the container, while the middle area and edge area correspond to annular areas 15mm and 22.5mm from the center axis, respectively.
[0108] The preliminary spectral scanning module consists of a spectral detection device (such as a UV-visible spectrophotometer) and a motion control unit. Based on the detection interval division results, the motion control unit drives the spectral probe to move radially along the sample container to the center of each of the three detection intervals. For the central zone, the spectral device scans using initial parameters: the light source wavelength range is set to 200-800 nm, the scanning speed is 500 nm / min, the integration time is 100 ms, and the slit width is 2 nm. During the scan, the device collects absorbance data for this interval (e.g., absorbance values at 1 nm intervals from 200-800 nm), turbidity values (calculated using the intensity of scattered light at 90°), transmittance (the ratio of incident light intensity to transmitted light intensity), and characteristic wavelength peaks (e.g., the absorbance value of the additive ZDDP at approximately 280 nm). After completing the central zone scan, the probe automatically moves to the middle and edge zones and repeats the scan using the same initial parameters. Preliminary spectral data for the three detection intervals is obtained and stored as separate data files containing timestamps and interval identifiers.
[0109] The re-scanning module is the core processing unit of the device, which contains multiple functional sub-units. The spectral feature embedding coding unit receives the preliminary spectral data of the three detection intervals, and inputs the multi-dimensional data of each interval (such as 601-dimensional absorbance + 1-dimensional turbidity + 1-dimensional transmittance + 3-dimensional characteristic wavelength peak, a total of 606 dimensions) into the embedding encoder based on the convolution kernel. Taking the central area data as an example, the encoder performs three layers of one-dimensional convolution operations: the first layer uses 5 convolution kernels of size 5 to extract the feature associations of adjacent wavelength points and outputs a 5-dimensional feature map; the second layer uses 3 convolution kernels of size 3 to further compress the features and output 3 dimensions; the third layer uses a fully connected layer to map the features into a 128-dimensional spectral feature embedding coding vector. The unit processes the three interval data in parallel to generate the corresponding feature vectors (Central Area), (Middle Area), (edge area) and stored in the cache unit.
[0110] The first detection interval vector extraction unit extracts the vector corresponding to the central area according to a preset order (such as a scanning order) The intrinsic feature encoding unit performs baseline feature extraction and complementary information aggregation on the feature vectors of all intervals: first, the baseline feature vector is calculated by mean pooling (Right now 、 、 ), and then calculate the dimension-wise average of each interval vector and The complementary information vector is obtained by the difference between the two, and the weight distribution module based on the gating mechanism is used to generate a weight coefficient for each complementary information vector (for example, the middle area gets a higher weight of 0.8 due to abnormal turbidity, and the edge area gets a lower weight of 0.3 because the feature is close to the benchmark). Finally, the benchmark feature is fused with the weighted complementary information to generate the spectral intrinsic feature encoding vector .
[0111] Detection parameter adjustment value generation unit calculation and The element-by-element difference is used to obtain the feature offset vector, which reflects the difference between the characteristics of the central area and the overall characteristics of the sample (for example, the absorbance at 300nm is 0.1 higher and the turbidity is 0.05NTU lower). After the offset vector is input into the decoding network, the dynamic adjustment value of the detection parameters is output, such as a 10% reduction in light source intensity, a 20% increase in integration time, and a 100nm / min reduction in scanning speed. The detection parameter adjustment unit sends these values to the control module of the spectral device. After modifying the parameters in real time, the probe moves to the central area again to perform a scan and obtain optimized spectral data. Similarly, the above feature analysis and parameter adjustment process is repeated for the middle area and the edge area respectively. For example, because the middle area has a higher weight, its feature offset calculation and parameter adjustment priority is increased, and a finer adjustment step size may be used (for example, the light source intensity adjustment accuracy is 1% instead of the default 5%).
[0112] After receiving the optimized spectral data of all detection intervals, the quality assessment report generation module first performs a uniformity analysis: comparing the absorbance distribution of each interval, if the difference in the characteristic wavelength peak between the central area and the edge area exceeds the preset threshold (such as ±5%), the sample is marked as having component stratification. Next, a machine learning model (such as random forest) is used to predict the additive content of each interval. For example, the ZDDP content is predicted based on the absorbance value at 280nm. If the predicted value in the middle area is lower than the standard range, it indicates that the additive is insufficient in this area. The report is finally presented in a structured form, including a comparison chart of the spectral curves of each interval, a heat map of the component concentration, and a quality grade judgment (such as "qualified" or "needs to be re-blended"), and can be sent to the laboratory information management system (LIMS) via a USB interface or Ethernet.
[0113] In terms of hardware implementation, the image recognition function of the inspection interval division module is implemented by an embedded vision processing unit (such as the NVIDIA Jetson series). A convolutional neural network model is used to identify the sample container outline and scale lines, ensuring that the partition coordinate accuracy is better than 0.1mm. The motion control unit of the preliminary spectral scanning module uses a servo motor to drive a linear guide rail with a positioning accuracy of ±0.05mm. It is combined with a grating ruler to achieve closed-loop feedback, ensuring that the probe is accurately docked at the center of each inspection interval. The neural network calculation of the secondary scanning module is implemented by an FPGA acceleration chip (such as the Xilinx Zynq series). The processing delay of feature embedding coding and intrinsic feature extraction is less than 50ms, meeting the requirements of real-time inspection. The quality assessment report generation module integrates open source report generation libraries (such as Python's ReportLab) to automatically generate PDF format reports containing interactive vector charts, allowing inspectors to quickly locate abnormal areas.
[0114] In practical applications, the device can accommodate sample containers of varying sizes. For example, by changing the coordinate algorithm of the motion control unit, it can be compatible with the detection interval division of containers such as square bottles or test tubes. For high-viscosity oily samples (such as grease), a stirring function can be added to the detection interval division module. A micro-stirrer can be used to homogenize the sample before partitioning, thus avoiding detection deviations caused by static stratification. Furthermore, the device supports batch testing of multiple samples, automatically loading sample containers via a conveyor system, and sequentially completing the partitioning, scanning, parameter adjustment, and report generation of each sample, significantly improving detection efficiency.
[0115] The intelligent oil-removal agent detection device utilizes multiple modules working together to automate the entire process, from sample partitioning, spectral data acquisition, feature analysis, parameter adjustment, and quality assessment. Each module is designed closely to meet the practical needs of oil-removal agent testing. Through hardware precision assurance and software algorithm optimization, the device ensures the accuracy and reliability of test results. It is particularly suitable for online quality monitoring in industrial production and batch sample analysis in laboratories.
[0116] Example 5:
[0117] In the intelligent detection device for oil-refining agents of the present invention, the re-scanning module realizes dynamic adjustment of detection parameters and optimization of spectral data through the collaboration of multiple units.
[0118] Taking the testing of a fuel oil sample as an example, vibration during transportation caused localized sedimentation of additives, resulting in a high-concentration area at the bottom. After the detection device was activated, the detection interval division module divided the sample into three vertical intervals (0-30mm, 30-60mm, and 60-90mm, respectively), with each interval corresponding to a different longitudinal layer of the sample container. The preliminary spectral scanning module scanned the three intervals sequentially using initial parameters and found that the absorbance of the lower interval at characteristic wavelengths (such as the antioxidant characteristic peak at 254nm) was significantly higher than that of the upper interval, preliminarily judging the presence of uneven distribution of components.
[0119] The workflow of the rescan module begins with the spectral feature embedding encoding unit. This unit receives preliminary spectral data (including parameters such as absorbance, turbidity, and transmittance) for three intervals. Taking the middle interval data as an example, it converts it into a one-dimensional vector containing wavelength-absorbance values and then inputs it into the embedding encoder based on the convolution kernel. The encoder extracts features through multi-layer convolution operations. For example, the first layer of convolution kernels captures the absorbance variation trend of adjacent wavelength points, and the second layer of convolution kernels identifies the peak shape near the characteristic wavelength, and finally outputs a 128-dimensional spectral feature embedding encoding vector. Due to the abnormal absorbance of the lower interval, the dimension value corresponding to the 254nm wavelength in its feature vector is significantly higher than the vector values of the middle and upper layers.
[0120] The first detection interval vector extraction unit extracts the feature vector corresponding to the lower interval according to the preset rules (such as giving priority to the interval with the largest outlier value) The intrinsic feature coding unit performs baseline feature and complementary information analysis on the feature vectors of all intervals: first, the average value of the three interval feature vectors is calculated to obtain the detection interval spectrum baseline feature coding vector , which reflects the overall average spectral characteristics of the sample; then calculate the vectors of each interval and The complementary information embedding coding vector is obtained by the difference between the two intervals. The difference vector of the lower interval shows a significant positive offset in the 254nm dimension, indicating that the antioxidant concentration in this area is higher than the overall level.
[0121] The complementary information weight allocation module based on the gating mechanism evaluates the importance of the complementary information vectors of each interval. Because the offset of the lower interval is significant, its complementary information vector is input into the module and calculated by a two-layer fully connected network, and the output weight coefficient is 0.9 (close to the maximum value), indicating that the feature difference of this interval has a key impact on the sample quality assessment; the upper interval has a weight coefficient of only 0.2 because its features are close to the benchmark. After weighted modulation, the complementary information vector of the lower interval is amplified by 0.9 times, while the vector of the upper interval is suppressed to 20% of the original value. Subsequently, the baseline feature vector is fused with the weighted complementary information vector to generate the spectral intrinsic feature coding vector The value of the 254nm dimension in this vector combines the baseline concentration and the high concentration characteristics of the lower interval, reflecting the true component distribution trend of the sample.
[0122] Detection parameter adjustment value generation unit calculation and The element-by-element difference of is used to obtain the characteristic offset vector. In the 254nm dimension, the difference is 0.3 (assuming the eigenvector values are normalized and dimensionless), indicating that the absorbance in the lower interval is significantly higher than the intrinsic characteristic, potentially leading to saturation of the spectrometer detector. This offset vector is input into the dynamic detection parameter adjuster based on the decoding network, which outputs the detection parameter adjustment values for the lower interval: the light source intensity is reduced by 15% (to avoid signal saturation under strong light), the integration time is reduced by 10% (to shorten the signal acquisition time in high-concentration areas), and the scanning speed is reduced by 50nm / min (to increase the number of samples at each wavelength point to improve accuracy).
[0123] The detection parameter adjustment unit sends the adjusted values to the control system of the spectral detection device. After the parameters are modified in real time, the probe is repositioned to the lower interval and rescanned. The adjusted light source intensity allows the detector to operate within its linear response range. The reduced integration time avoids signal overload, while the slower scan speed ensures a high density of data points near the characteristic wavelength. The optimized spectral data obtained after the rescan shows that the absorbance peak at 254nm is now within the effective detection range of the spectrometer, and the noise level has not increased significantly, indicating that the parameter adjustment has effectively improved data quality.
[0124] The rescan module processes the middle and upper intervals sequentially using the same logic. For example, the middle interval has smaller feature offsets, so the adjuster outputs smaller parameter adjustments (e.g., a ±3% fine-tuning of light source intensity). However, the upper interval, due to its lower weight, may only undergo a rescan using default parameters to reduce computing resource consumption. This differentiated processing strategy enables the device to prioritize fine-tuning of abnormal areas, improving overall efficiency while maintaining detection accuracy.
[0125] In hardware implementation, the various units of the rescan module are integrated into a high-performance computing unit via a pipeline architecture. The spectral feature embedding and intrinsic feature encoding units utilize a parallel computing architecture, for example using the GPU's CUDA cores to simultaneously process feature vectors from multiple detection intervals, reducing processing time. The decoding network of the detection parameter adjustment value generation unit is deployed within an FPGA, leveraging its hardware parallelism for real-time inference. The latency from feature offset vector input to adjustment value output can be controlled to less than 10ms. The motion control unit and spectral detection device are connected via a high-speed serial bus (e.g., SPI) to ensure the rapid transmission and execution of parameter adjustment instructions.
[0126] In practical applications, the module's adaptive adjustment capabilities can handle a variety of detection scenarios. For example, when testing different batches of oil dispersant samples, if the characteristic wavelength peak position of a batch of samples shifts (e.g., due to differences in the additive structure caused by changes in the production process), the intrinsic feature encoding unit can automatically adapt to this change through dynamic calculation of the baseline feature, avoiding detection bias caused by fixed parameter settings. For samples with high turbidity, the gating mechanism assigns higher weight to the complementary information related to turbidity, and the driver prioritizes the integration time and light source intensity to optimize signal acquisition in scattered light environments.
[0127] Furthermore, the rescan module supports user-defined detection parameter adjustment strategies. For example, when detecting light-sensitive oily agents, the software interface allows you to set a maximum reduction in light intensity (e.g., no more than 20%) to avoid excessive reductions in light intensity that could lead to insufficient signal-to-noise ratio. For scenarios requiring rapid detection, "Fast Mode" can be enabled to skip some hidden layer calculations, sacrificing some accuracy in exchange for increased processing speed.
[0128] The rescanning module achieves differentiated and accurate detection of oil-refining agent samples through fully automated processes including feature encoding, weight assignment, offset calculation, and parameter adjustment. Its core advantage lies in its ability to dynamically adjust detection strategies based on real-time test data, effectively addressing spatial heterogeneity and batch variability in sample composition, improving the reliability and efficiency of test results. This module's design closely integrates the physical principles of spectral detection with the algorithmic advantages of neural networks, providing solid technical support for intelligent testing of oil-refining agent quality.
[0129] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.
[0130] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. An intelligent detection method for oiling agent, characterized in that: include: Step 1: Divide the oilification agent sample to be tested into multiple testing intervals; Step 2: performing a preliminary spectral scan on each of the plurality of detection intervals using a spectral detection device to obtain preliminary spectral data of the plurality of detection intervals, wherein the preliminary spectral data of the detection intervals includes absorbance values, turbidity values, transmittance, and characteristic wavelength peak values; Step 3: Based on the preliminary spectral data of the plurality of detection intervals, dynamically adjusting the detection parameters of the spectrum detection device when rescanning each detection interval to obtain optimized spectral data of the plurality of detection intervals; Step 4: Optimizing the spectral data based on the multiple detection intervals to generate an oilification agent quality assessment report; The step 3 comprises: Performing feature embedding coding on each of the plurality of detection interval preliminary spectral data to obtain a plurality of detection interval spectral feature embedding coding vectors; Extracting a first detection interval spectral feature embedding coding vector corresponding to a first detection interval from the plurality of detection interval spectral feature embedding coding vectors; Embedding the plurality of detection interval spectral features into coding vectors and inputting them into a spectral intrinsic feature extractor to obtain a spectral intrinsic feature coding vector; generating a dynamic adjustment value of a detection parameter based on a feature offset between the first detection interval spectral feature embedding coding vector and the spectral intrinsic feature coding vector; Based on the dynamic adjustment value of the detection parameter, the detection parameter of the spectrum detection device is adjusted when scanning the first detection interval.
2. The intelligent detection method for oilifying agent according to claim 1, characterized in that: Performing feature embedding coding on each of the plurality of detection interval preliminary spectral data to obtain a plurality of detection interval spectral feature embedding coding vectors, including: Each of the plurality of detection interval preliminary spectral data is input into an embedding encoder based on a convolution kernel to obtain the plurality of detection interval spectral feature embedding coding vectors.
3. The intelligent detection method for oilifying agent according to claim 2, characterized in that: Embedding the plurality of detection interval spectral features into the coding vectors and inputting them into a spectral intrinsic feature extractor to obtain a spectral intrinsic feature coding vector comprises: Performing feature complementation analysis on the plurality of detection interval spectral feature embedded coding vectors with reference to a reference spectral feature to obtain a plurality of detection interval spectral feature-reference feature complementary information embedded coding vectors; The plurality of detection interval spectral feature-reference feature complementary information embedded coding vectors are subjected to weighted dynamic modulation aggregation coding to obtain the spectral intrinsic feature coding vector.
4. The intelligent detection method for oilifying agent according to claim 3, characterized in that: Performing feature complementation analysis on the multiple detection interval spectral feature embedded coding vectors with reference to the reference spectral feature to obtain multiple detection interval spectral feature-reference feature complementary information embedded coding vectors, including: Embedding the plurality of detection interval spectral features into coding vectors and inputting them into a reference feature extraction network to obtain a detection interval spectral reference feature coding vector; The complementary information of each detection interval spectral feature embedded coding vector relative to the detection interval spectral reference feature coding vector is extracted from the multiple detection interval spectral feature embedded coding vectors to obtain the multiple detection interval spectral feature-reference feature complementary information embedded coding vectors.
5. The intelligent detection method for oilifying agent according to claim 4, characterized in that: Performing weighted dynamic modulation aggregation coding on the multiple detection interval spectral feature-reference feature complementary information embedded coding vectors to obtain the spectral intrinsic feature coding vector, including: Inputting each of the plurality of detection interval spectral feature-reference feature complementary information embedding coding vectors into a complementary information weight allocation module based on a gating mechanism to obtain a plurality of detection interval spectral feature complementary information weight coefficients; Based on the weight coefficients of the multiple detection interval spectral feature complementary information, weighted modulate the multiple detection interval spectral feature-reference feature complementary information embedded coding vectors to obtain multiple weighted modulated detection interval spectral feature-reference feature complementary information embedded coding vectors; The detection interval spectrum reference feature coding vector and the plurality of weighted modulation detection interval spectrum feature-reference feature complementary information embedding coding vectors are fused to obtain the spectrum intrinsic feature coding vector.
6. The intelligent detection method for oilifying agent according to claim 5, characterized in that: Generating a dynamic adjustment value of a detection parameter based on a feature offset between the first detection interval spectral feature embedding coding vector and the spectral intrinsic feature coding vector includes: Performing feature offset calculation on the first detection interval spectral feature embedded coding vector and the spectral intrinsic feature coding vector to obtain a first detection interval spectral feature offset coding vector; The first detection interval spectral feature offset coding vector is input into a detection parameter dynamic adjuster based on a decoding network to obtain the detection parameter dynamic adjustment value.
7. The intelligent detection method for oilifying agent according to claim 6, characterized in that: Performing feature offset calculation on the first detection interval spectral feature embedded coding vector and the spectral intrinsic feature coding vector to obtain a first detection interval spectral feature offset coding vector, including: An element-by-element difference vector between the first detection interval spectral feature embedding coding vector and the spectral intrinsic feature coding vector is calculated to obtain the first detection interval spectral feature offset coding vector.
8. An intelligent detection device for oiling agent, characterized in that: include: A detection interval division module is used to divide the oilification agent sample to be detected into multiple detection intervals; a preliminary spectral scanning module, configured to perform preliminary spectral scanning on each of the plurality of detection intervals using a spectral detection device to obtain preliminary spectral data of the plurality of detection intervals, wherein the preliminary spectral data of the detection intervals include absorbance values, turbidity values, transmittance, and characteristic wavelength peak values; a rescanning module for dynamically adjusting detection parameters of the spectrum detection device when rescanning each detection interval based on the preliminary spectrum data of the multiple detection intervals to obtain optimized spectrum data of the multiple detection intervals; a quality assessment report generating module, configured to generate a quality assessment report of the oilifying agent based on the optimized spectral data of the plurality of detection intervals; The re-scanning module includes: a spectral feature embedding coding unit, configured to perform feature embedding coding on each of the plurality of detection interval preliminary spectral data to obtain a plurality of detection interval spectral feature embedding coding vectors; a first detection interval vector extraction unit, configured to extract a first detection interval spectral feature embedding coding vector corresponding to a first detection interval from the plurality of detection interval spectral feature embedding coding vectors; An intrinsic feature encoding unit, configured to embed the plurality of detection interval spectral features into encoding vectors and input them into a spectral intrinsic feature extractor to obtain a spectral intrinsic feature encoding vector; a detection parameter adjustment value generating unit, configured to generate a dynamic adjustment value of a detection parameter based on a feature offset between the first detection interval spectral feature embedding coding vector and the spectral intrinsic feature coding vector; A detection parameter adjustment unit is configured to adjust the detection parameter of the spectrum detection device when scanning the first detection interval based on the dynamic adjustment value of the detection parameter.
Citation Information
Patent Citations
Big data-based origin traceability method and system
CN119757236A
A system and method for evaluating Xanthoceras sorbifolia oil quality based on spectral analysis
CN119760321A