Refined cotton whiteness detection system and method thereof
By calibrating the light source state using Kalman filtering and Bayesian inference techniques, the problems of light source attenuation and gain drift in the refined cotton whiteness detection system were solved, thus achieving stability and reliability of whiteness detection results and reducing the frequency of retesting and compliance audit costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-10
AI Technical Summary
In existing refined cotton whiteness testing systems, the attenuation of the light source over time, gain drift, and dark current baseline rise lead to inconsistent whiteness results, causing measurement deviations between batches. Process control relies on experience, resulting in unstable retesting frequency, which increases rework risk and compliance audit costs.
Using Kalman filtering and Bayesian inference techniques, the light source state is calibrated and the white reference plate response is compensated by calculating the difference between the reflected light signal and the dark response signal. Kalman filtering is combined with Bayesian inference to predict the state and Bayesian inference to update the reference offset, generating stable whiteness mean and dispersion, constructing batch judgment state and establishing detection traceability records.
This achieves stability and consistency in whiteness detection results, reduces the impact of light source drift on measurements, improves batch comparability and detection reliability, and reduces the frequency of retesting and compliance audit costs.
Smart Images

Figure BDA0005765678660000121 
Figure BDA0005765678660000151 
Figure HDA0005765678680000011
Abstract
Description
Technical Field
[0001] This invention relates to the field of whiteness measurement technology, and in particular to a system and method for detecting the whiteness of refined cotton. Background Technology
[0002] The field of whiteness measurement technology takes the reflective properties of a material surface after being irradiated with visible light as the object of measurement. Under specified light source conditions, observation conditions, and measurement geometry conditions, the intensity distribution of reflected light from the sample is converted into a whiteness value, which is then used for batch release judgment, bleaching process control, and quality traceability. Whiteness measurement is usually based on color metrology, using a standard illuminator, a standard observer, and fixed illumination and observation angles, combined with a white reference plate to establish a measurement benchmark. The sample reflective properties are then converted into a whiteness index, and color deviation and multi-point statistical results can be output. The core requirements of this field are that the results are repeatable, comparable, and traceable. Therefore, it is necessary to constrain the stability of the light source, the measurement aperture, the sample compaction method, light leakage control, benchmark calibration, and environmental interference to ensure that the whiteness measured at different times, with different equipment, and by different operators is consistent.
[0003] A refined cotton whiteness detection system refers to a hardware and software combination used to quantitatively measure the whiteness of refined cotton samples and output detection conclusions. The system includes an illumination component, a sample carrying and positioning component, a reflected light acquisition component, a signal conversion and calculation component, and a display and data storage component. The purpose of the system is to transform the whiteness of refined cotton from manual visual grading into a reproducible numerical index, which is used to identify unqualified batches, guide bleaching and washing process parameters, and reduce rework rates. To achieve an inspectable effect, the system output includes at least a whiteness index and a pass / fail judgment result, and outputs the average and dispersion of whiteness at multiple measurement points to characterize batch uniformity. The system also establishes a traceability link, recording sample number, detection time, calibration status, measurement conditions, and judgment thresholds to form a verifiable quality record.
[0004] Existing technologies establish measurement benchmarks using fixed light source conditions and a white reference plate, outputting whiteness indices and multi-point statistical results. However, in actual operation, periodic calibration plus single measurements are often the main approach. Differences in measurement points and fluctuations in dark response largely rely on static deduction. This leads to the gradual attenuation of the light source over time, the slow drift of gain due to temperature increases, and the baseline rise of dark current due to environmental changes being mixed into the whiteness results. The average values measured by different shifts and equipment in different batches exhibit systematic shifts, resulting in samples from the same batch being qualified in the morning but approaching the threshold in the afternoon. Process control is forced to be adjusted frequently, increasing the risk of rework. Release judgments often use fixed threshold comparisons, failing to fully express the historical fluctuation range and current uncertainty. When batches approach the threshold, the retesting strategy relies on experience. Too frequent retesting increases production line waiting time, while too infrequent retesting leads to risk spillover. When the field writing order and index structure are not uniformly constrained, issues such as missing entries, incorrect entries, and misaligned fields exported across systems are prone to occur. Post-event location of abnormal batches requires comparison of multiple records, reducing retrieval efficiency and increasing compliance audit costs. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the existing technology and to propose a refined cotton whiteness detection system and method.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a refined cotton whiteness detection system comprising:
[0007] Optical response construction module: By reading the original readings of the reflected light intensity electrical signal, the original readings of the dark response electrical signal, and the measurement point number identifier, the measurement points are read sequentially and the dark response values are subtracted. The single-point reflection difference is calculated and the single-point reflection difference sequence and the corresponding set of statistical characteristic parameters are output to generate a set of reflection response quantities.
[0008] The calibration state estimation module: Based on the set of reflection response quantities, combined with the set of statistical characteristic parameters to limit the stable range, Kalman filtering is used for prediction, boundary judgment and numerical correction, and outputs the light source attenuation, gain correction and reference offset to obtain the calibration state parameters;
[0009] Drift compensation calculation module: Based on the calibration state parameters, Bayesian inference of reflection difference is used to subtract reference offset and gain and attenuation correction are applied sequentially to complete the white board ratio conversion of white reference board response and uniformly calculate whiteness mean and dispersion based on the corrected whiteness sequence, and output whiteness calculation results;
[0010] Release inference module: Based on the whiteness calculation result, it matches batch attributes and introduces historical distribution parameters. After updating the axiom interval, it compares the confidence lower limit with the release threshold, outputs the release and retest judgment, and constructs the batch judgment status.
[0011] Quality traceability and solidification module: Based on the whiteness calculation result and the batch judgment status, it jointly organizes the whiteness value and judgment identifier and associates them with the device and time identifier, writes them into the storage in one go according to the predefined field order and simultaneously establishes an index structure to generate the detection traceability record.
[0012] As a further embodiment of the present invention, the reflection response set includes a single-point reflection difference sequence and a set of statistical characteristic parameters; the calibration status parameters include light source attenuation, gain correction, and reference offset; the whiteness calculation results include whiteness mean and whiteness dispersion; the batch judgment status includes release judgment and retest judgment; and the detection traceability record includes whiteness value, judgment identifier, equipment identifier, and time identifier.
[0013] As a further aspect of the present invention, the optical response construction module includes:
[0014] Signal difference submodule: Based on the original readings of the reflected light intensity electrical signal, the original readings of the dark response electrical signal, and the measurement point number identifier, the readings are read sequentially, the number is verified and the dark response value is subtracted and written into the single-point difference, generating a single-point reflection difference sequence;
[0015] The response aggregation submodule: Based on the single-point reflection difference sequence, the difference is aggregated according to the measurement point number, the mean and dispersion are calculated to form a set of statistical characteristic parameters, and the difference sequence and the set of statistical characteristic parameters are encapsulated to obtain the reflection response quantity set.
[0016] As a further aspect of the present invention, the calibration state estimation module includes:
[0017] Stable interval submodule: Based on the set of reflection response quantities, combined with the set of statistical feature parameters, the stable interval is defined. A continuous observation sequence is constructed in the order of measurement points, and Kalman filtering is introduced to recursively update and evaluate the reflection response quantities. The corresponding reflection response values are retrieved in the order of measurement points and compared with the upper and lower limits of statistical features to complete point-by-point comparison. Measurement points outside the interval are marked with exclusion status, and the measurement point numbers and value records inside the interval are retained to generate a stable interval identifier.
[0018] The benchmark reading submodule reads the white benchmark response and dark benchmark response of the corresponding measurement point based on the stable interval identifier. It aligns the two types of response values according to the measurement point number, subtracts the dark benchmark response value from the white benchmark response value of the same measurement point, and collects the measurement point results in sequence to obtain the benchmark difference set.
[0019] Parameter correction submodule: Based on the reference difference set, retrieve the reflection response values within the stable range and compare them point by point with the reference difference values to complete the formation of light source attenuation value, gain correction value, and reference offset value, and then organize and summarize them to obtain the calibration status parameters.
[0020] As a further aspect of the present invention, the Kalman filter sequentially reads the reflection response of each measuring point according to the measuring point number order, and forms a continuous observation sequence by combining the reflection response of adjacent measuring points according to time and sampling order. At each measuring point location, state prediction is performed based on the state estimate and covariance of the previous measuring point. The reflection response of the current measuring point is introduced as the observation input, the difference between the predicted state and the current observation value is calculated, and the state is updated based on the difference. At the same time, the deviation between the predicted value and the actual observation value before the update is recorded as residual data. The residual data is continuously updated with the measuring point sequence and participates in the recursive calculation of subsequent measuring points.
[0021] As a further aspect of the present invention, the drift compensation calculation module includes:
[0022] Offset sub-module: Based on the calibration status parameters, combined with Bayesian inference, the reference offset is constrained and updated. The reference offset is retrieved item by item and expanded in sequence according to the corresponding reflection difference. The difference is subtracted according to the measurement point number and kept in a consistent arrangement. The gain correction and light source attenuation are sequentially called to apply the subtracted value point by point to form a continuous correction value record and generate a correction reflection sequence.
[0023] Ratio conversion submodule: Based on the corrected reflection sequence, read the response values of the white reference plate according to the measurement point number and complete the sequence alignment, calculate the ratio of the corrected reflection value of each measurement point to the corresponding response value of the white reference plate, record the conversion results according to the measurement point order and collect them to form a continuous numerical sequence to obtain the whiteness sequence.
[0024] Whiteness Summary Submodule: Based on the whiteness sequence, expand each whiteness value in the order of measurement points and complete the validity screening. Perform centralized summation and measurement point counting on the retained whiteness values. After calculating the mean and dispersion, organize and output the whiteness sequence and statistical results to obtain the whiteness calculation result.
[0025] As a further aspect of the present invention, the Bayesian inference uses the existing reference offset in the calibration state parameters as prior information input, introduces the reflection difference corresponding to the current measurement point as observation information, and performs joint calculation on the prior information and observation information to form an update judgment basis. During the step-by-step measurement point expansion, the reference offset is probabilistically updated according to the reflection difference of the current measurement point and the corresponding update result is obtained. The updated reference offset is used as the prior input for the next measurement point processing. The prior introduction, observation combination and update judgment process is continuously executed according to the measurement point number sequence to form a reference offset update sequence that progresses with the measurement point sequence.
[0026] As a further aspect of the present invention, the release inference module includes:
[0027] Interval Update Submodule: Based on the whiteness calculation results, match batch attributes and introduce historical distribution parameters, collect the whiteness calculation results by batch identifier and expand the historical distribution parameters item by item, record the numerical alignment, interval boundary update and upper and lower limits, and obtain the posterior interval results;
[0028] Threshold determination submodule: Based on the posterior interval result, read the lower confidence limit of the posterior interval and compare it with the release threshold item by item, generate release and retest marks for each batch and collect them sequentially, bind the batch number and record the status, and construct the batch determination status.
[0029] As a further aspect of the present invention, the quality traceability and solidification module:
[0030] Data processing submodule: Based on the whiteness calculation result and the batch judgment status, retrieve the whiteness value and judgment identifier one by one and arrange them in batch order, read the device identifier and time identifier, perform field position mapping and order verification, and combine and arrange the whiteness value, judgment identifier, device identifier and time identifier in sequence to generate traceability dataset;
[0031] Index solidification submodule: Based on the traceability dataset, it verifies the field order and expands the record writing according to the predefined field order. After confirming the record position, it extracts the index field, generates index entries and binds them to the record address, and synchronously completes the storage writing and index establishment to generate the detection traceability record.
[0032] A method for detecting the whiteness of refined cotton, wherein the method is performed based on the aforementioned refined cotton whiteness detection system, and includes the following steps:
[0033] S1: Based on the original readings of the reflected light intensity electrical signal, the original readings of the dark response electrical signal, and the measurement point number, the readings are read according to the measurement point number and subtracted to obtain a single-point reflection difference sequence. The mean and dispersion are calculated to form a set of statistical characteristic parameters, and a set of reflection response quantities is generated.
[0034] S2: Based on the set of reflection response quantities and combined with the set of statistical characteristic parameters to limit the stable interval, the reflection response quantity of the measuring point is predicted, the boundary is judged and the value is corrected. The light source attenuation, gain correction and reference offset are output to obtain the calibration state parameters.
[0035] S3: Based on the calibration status parameters, subtract the reference offset from the reflection difference and apply the gain correction and light source attenuation according to the measurement point number to complete the white board ratio conversion of the white reference board response, form the corrected whiteness sequence, calculate the whiteness mean and dispersion, and output the whiteness calculation result.
[0036] S4: Based on the whiteness calculation results, match batch attributes and introduce historical distribution parameters, update the posterior interval of the whiteness results of each batch, read the confidence lower limit and compare it with the release threshold, output the release judgment and retest judgment, and construct the batch judgment status.
[0037] S5: Based on the whiteness calculation results and batch judgment status, jointly organize the whiteness values and judgment identifiers and associate them with the device identifier and time identifier. Write them into the storage in one go according to the predefined field order and simultaneously establish an index structure to generate detection traceability records.
[0038] Compared with the prior art, the advantages and positive effects of the present invention are as follows:
[0039] 1. In this invention, by introducing Kalman filtering to perform state prediction, residual update and boundary discrimination, the slow decay of the light source output over time and the gain drift of the amplification link due to temperature rise are separated from the reflection response and quantified into independent parameters. During the continuous calculation of multiple measurement points, random noise diffusion is suppressed and the transmission range of abnormal measurement points to the overall mean is limited, so that the whiteness sequence obtained at different measurement times and under different equipment states maintains a consistent statistical scale.
[0040] 2. In this invention, by introducing Bayesian inference and using the existing benchmark offset as a priori constraint and the current reflection difference of the measuring point as the observation information to perform point-by-point probability update, the benchmark offset forms a continuously evolving update trajectory in the measuring point sequence, reducing the sudden impact of local compaction unevenness and instantaneous light flux fluctuations on the whiteness sequence, making the corrected whiteness mean more stable and the dispersion more discriminative.
[0041] 3. In this invention, the update mechanism works synergistically on the same measurement point sequence, so that the whiteness calculation result has both short-term anti-interference capability and long-term consistency. The whiteness mean can be used for cross-batch comparison, and the dispersion can be used for batch uniformity evaluation, so that whiteness detection is transformed from static numerical output into a controlled and uncertain quantitative judgment process. Attached Figure Description
[0042] Figure 1 This is a system flowchart of the present invention;
[0043] Figure 2 This is a schematic diagram of the method steps of the present invention. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0045] Example 1
[0046] Please see Figure 1 This invention provides a technical solution: a refined cotton whiteness detection system comprising:
[0047] Optical response construction module: By reading the original readings of the reflected light intensity electrical signal, the original readings of the dark response electrical signal, and the measurement point number identifier, the measurement points are read sequentially and the dark response values are subtracted. The single-point reflection difference is calculated and the single-point reflection difference sequence and the corresponding set of statistical characteristic parameters are output to generate a set of reflection response quantities.
[0048] The calibration state estimation module: Based on the reflection response set and combined with the statistical characteristic parameter set to limit the stable range, Kalman filtering is used for prediction, boundary judgment and numerical correction, and outputs the light source attenuation, gain correction and reference offset to obtain the calibration state parameters.
[0049] Drift compensation calculation module: Based on calibration state parameters, Bayesian inference of reflection difference is used to subtract reference offset and gain and attenuation correction are applied sequentially to complete the white board ratio conversion of white reference board response and uniformly calculate whiteness mean and dispersion based on the corrected whiteness sequence, and output whiteness calculation results;
[0050] Release inference module: Based on the whiteness calculation result, it matches the batch attributes and introduces historical distribution parameters. After the a posteriori interval is updated, it compares the confidence lower limit with the release threshold, outputs the release and retest judgment, and constructs the batch judgment status.
[0051] Quality traceability and solidification module: Based on the whiteness calculation results and batch judgment status, it jointly organizes the whiteness values and judgment identifiers and associates them with the device and time identifiers. It writes them into the storage in one go according to the predefined field order and simultaneously establishes an index structure to generate test traceability records.
[0052] The reflection response set includes a single-point reflection difference sequence and a set of statistical characteristic parameters. The calibration status parameters include light source attenuation, gain correction, and reference offset. The whiteness calculation results include the whiteness mean and whiteness dispersion. The batch judgment status includes release judgment and retest judgment. The detection traceability record includes whiteness value, judgment mark, equipment mark, and time mark.
[0053] The optical response building block includes:
[0054] Signal difference submodule: Based on the original readings of the reflected light intensity electrical signal, the original readings of the dark response electrical signal, and the measurement point number identifier, the readings are read sequentially, the number is verified and the dark response value is subtracted and written into the single-point difference, generating a single-point reflection difference sequence;
[0055] Response aggregation submodule: Based on the single-point reflection difference sequence, the difference is aggregated according to the measurement point number, the mean and dispersion are calculated to form a set of statistical characteristic parameters, and the difference sequence and the set of statistical characteristic parameters are encapsulated to obtain the reflection response quantity set;
[0056] Signal difference submodule: Based on the original readings of reflected light intensity electrical signals, dark response electrical signals, and measurement point number identifiers, it adopts a sequential index comparison and fixed-length buffer writing method. During the system initialization phase, the measurement point number range is preset to 1 to 64, and a sequential buffer area with a length of 64 is established. The original readings of reflected light intensity electrical signals are read sequentially and recorded in millivolts. At the same time, the original readings of dark response electrical signals corresponding to the same measurement point number are read and recorded in the same unit. Only one number consistency check is performed for the two types of readings. If the numbers are inconsistent, the current measurement point is skipped directly. If the numbers are consistent, the difference is calculated according to the fixed deduction rule of subtracting the original reading of dark response electrical signals from the original reading of reflected light intensity electrical signals. The deduction result is subject to numerical boundary constraints, with a lower limit of 0 millivolts and an upper limit of 5000 millivolts. Values outside the boundary are replaced by the corresponding boundary values. After processing, the difference result is written to the corresponding buffer unit according to the measurement point number. After all measurement points are processed, the buffer content is exported in numerical order to generate a continuously arranged single-point reflection difference sequence.
[0057] The response aggregation submodule reads the single-point reflection difference sequence according to the measurement point numbers 1 to 64. During the reading process, the measurement point count and numerical accumulation are completed simultaneously. The initial value of the measurement point count is set to 0, and the initial value of the accumulated value is set to 0 millivolts. After the traversal, the average value is generated by the accumulated value and the measurement point count and retained to 3 decimal places. During the same traversal, the maximum difference and the minimum difference are maintained simultaneously. The maximum difference is initially set to 0 millivolts, and the minimum difference is initially set to 5000 millivolts. The values are updated in real time through numerical comparison. After the average value is generated, the deviation calculation traversal is performed only once for the single-point reflection difference sequence. The deviation of each difference from the average value is expanded into a non-negative number and accumulated. After the accumulation is completed, the dispersion value is generated by normalizing according to the measurement point count and retained to 3 decimal places. Finally, the single-point reflection difference sequence, average value, dispersion, measurement point count, maximum difference, and minimum difference are encapsulated in the order of the preset fields in the system deployment stage to generate a reflection response set.
[0058] The calibration status estimation module includes:
[0059] Stable interval submodule: Based on the set of reflection response quantities, combined with the set of statistical feature parameters, the stable interval is defined. A continuous observation sequence is constructed according to the measurement point order, and Kalman filtering is introduced to recursively update the reflection response quantities and evaluate the residuals. The corresponding reflection response values are retrieved according to the measurement point order and compared with the upper and lower limits of statistical features to complete point-by-point comparison. Measurement points outside the interval are marked with the exclusion status, and the measurement point numbers and value records inside the interval are retained to generate a stable interval identifier.
[0060] Benchmark Reading Submodule: Based on the stable interval identifier, reads the white benchmark plate response and dark benchmark response of the corresponding measurement point, aligns the two types of response values according to the measurement point number, subtracts the dark benchmark response value from the white benchmark plate response value of the same measurement point, and sequentially collects the measurement point results to obtain the benchmark difference set.
[0061] Parameter correction submodule: Based on the reference difference set, it retrieves the reflection response values within the stable range and compares them point by point with the reference difference values. It completes the formation of light source attenuation value, gain correction value, and reference offset value, and summarizes them in a unified manner to obtain the calibration status parameters.
[0062] The stable interval submodule: Based on the reflection response set and combined with the statistical characteristic parameter set, a discrete Kalman filter algorithm is used to construct a continuous observation sequence with the measurement point number as the time step index. During system initialization, the preset initial state value is the single-point reflection difference value corresponding to the first measurement point in the reflection response set, with a preset initial covariance value of 0.25. The process noise covariance value is fixed at 0.05, and the observation noise covariance value is fixed at 0.10. Reflection response values are read point by point in sequence as observation input. Before and after state updates, the difference between the predicted and observed values is recorded as residual records. After the residual records are generated, the reflection response at the current measurement point is... The numerical values should be synchronously compared with the preset lower and upper limits in the statistical feature parameter set. The lower limit is obtained by subtracting the dispersion by 2 from the mean, and the upper limit is obtained by adding the dispersion by 2 to the mean. The statistical feature parameters are fixed and stored during the generation stage of the reflection response set and can be directly called in this stage. If the reflection response value falls within the upper or lower limit range, the measurement point number is written into the list of valid measurement points and the corresponding reflection response value is recorded. If the reflection response value exceeds the upper or lower limit range, the measurement point number is written into the exclusion list and marked with an exclusion label. After all measurement points are processed, the list of valid measurement points, the exclusion list and the corresponding labels are encapsulated in the order of measurement point number to generate a stable interval label.
[0063] The benchmark reading submodule reads the response values of the white benchmark board and the dark benchmark board according to the measurement point number in the system's preset benchmark data storage area based on the stable interval identifier. The response values of the white benchmark board are stored in millivolts (mV) in a preset manner, while the response values of the dark benchmark board are collected under the light-shielding condition of the device and stored in mV. During the reading process, the operation is only performed on the measurement point numbers marked as valid in the stable interval identifier. The corresponding white benchmark board response value and dark benchmark response value are read for each valid measurement point. The two types of values are checked for number consistency. If the numbers are consistent, the value is processed according to the fixed deduction rule of subtracting the dark benchmark response value from the white benchmark board response value. The deduction result is limited to a minimum value of 0 mV and a maximum value of 5000 mV. After processing, the values are written to the sequential buffer in the order of measurement point number. The length of the sequential buffer is consistent with the number of valid measurement points. After all valid measurement points are processed, the contents of the buffer are exported to generate a benchmark difference set.
[0064] The parameter correction submodule, based on the reference difference set and combined with the stable interval identifier, simultaneously reads the reflection response value and the corresponding reference difference value within the stable interval according to the measurement point number sequence. It performs value alignment verification on each measurement point. When the numbers match, it records both types of values and enters the calculation process. The light source attenuation is calculated by comparing the current measurement point's reference difference value with the initial reference difference value preset during the system deployment phase. The initial reference difference value is collected and fixedly stored during the equipment factory calibration phase. The gain correction is obtained by proportionally expanding the current measurement point's reflection response value with the reference difference value and uniformly retaining 4 decimal places. The reference offset is obtained by subtracting the product of the reference difference value and the gain correction value from the reflection response value and limiting the value range to -200 mV to +200 mV. After the above three types of values are calculated at each measurement point, they are written into the parameter cache according to the measurement point number. The field order of the parameter cache is preset in the system configuration file and loaded during the initialization phase. After all stable interval measurement points are processed, the light source attenuation, gain correction, and reference offset are uniformly sorted and summarized according to the field order to generate calibration status parameters.
[0065] Kalman filtering reads the reflection response of each measuring point in sequence according to the measuring point number. The reflection response of adjacent measuring points is formed into a continuous observation sequence according to time and sampling order. At each measuring point, the state is predicted based on the state estimate and covariance of the previous measuring point. The reflection response of the current measuring point is introduced as the observation input. The difference between the predicted state and the current observation value is calculated, and the state is updated according to the difference. At the same time, the deviation between the predicted value and the actual observation value before the update is recorded as residual data. The residual data is continuously updated with the measuring point sequence and participates in the recursive calculation of subsequent measuring points.
[0066] Kalman filtering, according to the formula:
[0067]
[0068] Where: x k Let x represent the state estimate corresponding to the k-th measurement point. k-1 z represents the state estimate corresponding to the (k-1)th measuring point. k P represents the observed value of the reflection response at the k-th measuring point. k-1 Q represents the estimated covariance value corresponding to the (k-1)th measurement point. k R represents the updated value of the process noise covariance corresponding to the k-th measurement point. k w represents the updated observation noise covariance value corresponding to the k-th measurement point. k The weighting coefficient corresponding to the k-th measurement point is represented by g, which represents the observation scaling factor for uniformly adjusting the observed values of the reflection response. kThis represents the offset compensation term corresponding to the k-th measuring point, where k represents the measuring point number index and takes values from 1 to 64 in sequence, and r k-1 σ represents the residual term corresponding to the (k-1)th measurement point, Δt represents the sampling time interval set by the system, ΔT represents the temperature rise value of the light source recorded during the detection process, t represents the cumulative lighting time of the light source, and σ represents the residual term corresponding to the (k-1)th measurement point. k This represents the discrete input value corresponding to the k-th measurement point;
[0069] Execution process: Read the observed values of the reflection response z in sequence from 1 to 64 according to the measurement point number index k. k Before calculating the kth measuring point, retrieve the state estimate x of the (k-1)th measuring point. k-1 And retrieve the covariance estimate P of the (k-1)th measurement point. k-1 For the observed value z k Applying the observation scaling factor g yields gz k For offset compensation term b k The generation and loading process involves reading the sampling interval Δt (5 milliseconds), the temperature rise ΔT (8 degrees Celsius), and the light source illumination duration t (120 minutes) from the device operating parameter area and writing these values into the calculation register. Then, ΔT and t are combined according to a system-preset proportional coefficient to obtain b. k And for b k The value range is limited to -200 mV to +200 mV, and then the residual input gz is calculated. k -x k-1 -b k And confirm the weighting coefficient w k The confirmation method is to read the absolute value of the residual input and compare it with the threshold of 50 millivolts. If the absolute value does not exceed 50 millivolts, then w k When the value is 1, and the absolute value exceeds 50 millivolts, w will... k The value is set to the ratio of 50 millivolts to the absolute value of the residual input, with the ratio limited to a lower bound of 0.20 and an upper bound of 1.00. Simultaneously, a residual term r is generated. k-1 The generation method is to read the observation value z of the (k-1)th measuring point when k is greater than or equal to 2. k-1 And read the state estimate x of the (k-2)th measuring point. k-2 And form r k-1 When k equals 1, r0 is set to 0 millivolts, and then the process noise covariance update value Q is calculated. k During the calculation, Δt and r are retrieved. k-1 The absolute value is combined with the system's preset update coefficients to obtain Q. k Then calculate the updated value R of the observed noise covariance. k During calculation, the discreteness input value σ of the kth measurement point is retrieved. k The value is taken as 20 millivolts, and Δt is retrieved and combined with the system's preset update coefficients to obtain R. k Complete wk P k-1 Q k R k Calculate the molecule w after loading k (P k-1 +Q k And calculate the denominator P. k -1+Q k +R k The updated coefficients are obtained by performing division between the numerator and denominator, and then multiplied by the updated coefficients and the residual input, and then multiplied by x. k-1 The summation yields the state estimate x for the kth measuring point. k and x k Write the state sequence and use parameter sets g and b for this calculation. k ,w k Q k R k The index k is written to the record area in field order for subsequent measurement point numbering.
[0070] The drift compensation calculation module includes:
[0071] Offset sub-module: Based on calibration status parameters, combined with Bayesian inference, the reference offset is constrained and updated. The reference offset is retrieved item by item and expanded in sequence according to the corresponding reflection difference. The difference is subtracted according to the measurement point number and kept in a consistent arrangement. The gain correction and light source attenuation are sequentially called to apply the subtracted value point by point to form a continuous correction value record and generate a correction reflection sequence.
[0072] The proportional conversion submodule reads the response values of the white reference plate according to the measurement point number and completes the sequence alignment. It calculates the ratio of the corrected reflection value of each measurement point to the corresponding response value of the white reference plate, records the conversion results according to the measurement point order, and collects them to form a continuous numerical sequence to obtain the whiteness sequence.
[0073] Whiteness Summary Submodule: Based on the whiteness sequence, expand each whiteness value in the order of measurement points and complete the validity screening. Perform centralized summation and measurement point counting on the retained whiteness values. After calculating the mean and dispersion, organize and output the whiteness sequence and statistical results to obtain the whiteness calculation result.
[0074] Offset Submodule: Based on calibration status parameters, using Bayesian inference, the initial prior value of the reference offset is set to 0 mV and the prior variance to 25 mV squared during system initialization. The prior is derived from statistical results obtained from multiple samplings under shading conditions during the equipment's factory calibration phase and is stored in a fixed manner. The reflection difference is retrieved sequentially according to the measurement point number, and the corresponding prior value of the reference offset for the current measurement point is read. Simultaneously, the reflection difference of the measurement point is read as the observation input. The observation noise variance is fixed at 16 mV squared, and the value is preset based on the historical fluctuation range during the equipment's stable operation phase. At each measurement point location, a weighted allocation calculation is performed based on the prior variance and the observation noise variance. After obtaining the updated weights, the reference offset is calculated. The value is updated, and the updated reference offset is limited to the range of -200 mV to +200 mV and used as the prior input for the next measurement point. After the reference offset is updated, the reflection difference is subtracted according to the measurement point number. The subtraction method is to subtract the corresponding updated reference offset value from the reflection difference value. The subtraction result is limited to a lower bound of 0 mV and an upper bound of 5000 mV. Then, the gain correction and light source attenuation are read sequentially according to the measurement point number. The subtracted value is first expanded by multiplication of the gain correction, and then the light source attenuation is scaled proportionally. All operations adopt the fixed-point operation rule of retaining 4 decimal places. After point-by-point processing is completed, the results are written into the continuous buffer according to the measurement point number to generate the corrected reflection sequence.
[0075] Ratio conversion submodule: Based on the corrected reflection sequence, the white reference plate response value is read from the system's preset reference storage area according to the measurement point number. The white reference plate response value is collected under standard illumination conditions during the equipment calibration phase and stored in millivolts. During reading, the operation is only performed on the measurement point numbers that exist in the corrected reflection sequence. The consistency of the numbers of the corrected reflection value and the white reference plate response value is checked for each measurement point. If the numbers are consistent, the ratio is calculated by dividing the corrected reflection value by the white reference plate response value. The ratio is limited to a minimum of 0 and a maximum of 1.2. Values exceeding the range are replaced by boundary values. The ratio result is uniformly retained to 4 decimal places and written into the sequential buffer according to the measurement point number. The length of the sequential buffer is the same as the length of the corrected reflection sequence. After all measurement points are processed, the contents of the buffer are exported to obtain the whiteness sequence.
[0076] The whiteness summary submodule reads the whiteness sequence according to the measurement point number and writes it into the statistical buffer. During the reading process, a validity filter is performed simultaneously. The validity rule is that the whiteness value is greater than or equal to 0 and less than or equal to 1.2. When the condition is met, the whiteness value is included in the statistics and the measurement point count is incremented by 1. At the same time, the whiteness value is accumulated to the cumulative value variable. After the traversal, the cumulative value and the measurement point count are used to generate the mean value and retain 4 decimal places. Then, only the retained whiteness values are traversed once for deviation calculation. The difference between each whiteness value and the mean value is calculated, expanded to a non-negative number, and then accumulated. After the accumulation is completed, the measurement point count is normalized and a dispersion value is generated. The dispersion result retains 4 decimal places. Finally, the whiteness sequence, mean, dispersion, and measurement point count are sorted and output according to the preset field order of the system deployment stage to obtain the whiteness calculation result.
[0077] Bayesian inference uses the existing reference offset in the calibration state parameters as prior information input, introduces the reflection difference corresponding to the current measurement point as observation information, and performs joint calculation on the prior information and observation information to form the basis for update judgment. In the process of unfolding point by point, the reference offset is probabilistically updated according to the reflection difference of the current measurement point and the corresponding update result is obtained. The updated reference offset is used as the prior input when processing the next measurement point. The prior introduction, observation combination and update judgment process is continuously executed in the order of measurement point number, forming a reference offset update sequence that progresses with the measurement point sequence.
[0078] Bayesian inference, according to the formula:
[0079]
[0080] Where: p(λ) j |η j ,μ,ν,ρ,κ j ) represents the posterior probability of the reference offset candidate value for the j-th measuring point under given reflection difference observations and operating parameters, λ j η represents the candidate value of the reference offset corresponding to the j-th measurement point. j Let μ represent the reflection difference observation corresponding to the j-th measurement point, μ represent the observation scaling parameter used to uniformly adjust the reflection difference observation, ν represent the light source temperature rise parameter recorded during the detection process, ρ represent the cumulative working time parameter of the light source, and κ represent the cumulative working time parameter of the light source. j p(η) represents the prior weight coefficient corresponding to the j-th measurement point. j |λ j ,μ,ν,ρ) represents the baseline offset candidate value as λ j The probability distribution of observed reflection difference under the conditions of observation scaling parameter, temperature rise parameter, and illumination duration parameter is introduced, p(λ) j|μ,ν) represents the prior probability distribution of the candidate baseline offset value for the j-th measuring point under the constraints of the observation scaling parameter and the temperature rise parameter. This indicates the summation sign for normalized accumulation of the probability term within the range of -200 mV to +200 mV for the baseline offset candidate values; j represents the measurement point number index, which takes values from 1 to 64 in sequence.
[0081] Execution process: The measurement point number index j increases sequentially from 1 to 64, and the reflection difference observation η is read point by point. j The data is written to the current measurement point buffer. Simultaneously, the observation scaling parameter μ (value 1.006), temperature rise parameter ν (value 8 degrees Celsius), and cumulative light source working time parameter ρ (value 120 minutes) are read from the operating parameter area and written to the parameter register. Then, a reference offset candidate set is generated in 1-mV steps within the candidate interval from -200 mV to +200 mV, and λ is assigned to each candidate. j For each candidate λ j Calling the prior probability term p(λ) j |μ,ν) and generate prior center values according to μ and ν, and expand the prior probability values according to a preset discrete scale, for the same candidate λ j Call the observation probability term p(η) j |λ j ,μ,ν,ρ) and η j Scale by μ and match with λ j The difference calculation is performed, and ν and ρ are introduced as discrete scale adjustment inputs to generate observation probability values. Then, the weighting coefficient κ is confirmed. j The confirmation step involves calculating the difference between the scaled observation and the prior central value and comparing it with a 50 mV threshold. If the difference does not exceed 50 mV, then κ... j When the value is 1, κ is greater than 50 millivolts. j The value is set to 50 millivolts and the ratio of the difference amplitude, with the comparison value limited to 0.20 to 1.00, to complete κ. j After assignment, a power operation is performed on the prior probability term to obtain p(λ). j ∣μ,ν)κ j This is multiplied by the observed probability term to form the numerator, and then summed term by term across the entire candidate set to obtain the normalized denominator. Finally, a division is performed between the numerator and denominator to obtain the posterior probability p(λ). j |η j ,μ,ν,ρ,κ j ), select λ corresponding to the highest posterior probability from the candidate set. j The updated value of the current measurement point is written into the baseline offset update sequence and used as the prior input for the next measurement point.
[0082] The release inference module includes:
[0083] Interval Update Submodule: Based on the whiteness calculation results, it matches batch attributes and introduces historical distribution parameters. It collects the whiteness calculation results by batch identifier and expands the historical distribution parameters item by item. It records the numerical alignment, interval boundary update and upper and lower limits to obtain the posterior interval results.
[0084] Threshold determination submodule: Based on the posterior interval results, read the lower confidence limit of the posterior interval and compare it with the release threshold item by item, generate release and retest marks for each batch and collect them sequentially, bind batch numbers and record status, and construct batch determination status;
[0085] The interval update submodule, based on whiteness calculation results, presets batch attributes as integer batch numbers and writes them to the batch mapping table during system initialization. This batch mapping table is imported through the production management system and permanently stored before testing begins. Whiteness calculation results are read sequentially according to the testing order, and the corresponding batch numbers are parsed. Using the batch number as an index key, the whiteness mean and whiteness dispersion are written to the corresponding batch cache. Simultaneously, historical distribution parameters matching the batch number are read from the historical parameter storage area. These historical distribution parameters include the historical mean value, historical variance value, and historical sample count. The historical mean and historical variance values are continuously accumulated batch by batch and periodically written to storage during system operation. The historical sample count is recorded in integer form and updated with each batch. In the incremental detection process, within a single batch buffer, a weighted update operation is performed on the current whiteness mean value and the historical mean value. The weighting coefficient is calculated by the sum of the historical sample count and the current sample count and is fixed to 4 decimal places. The current whiteness dispersion value and the historical variance value are merged and written into the update buffer. Then, the upper and lower limits of the interval are generated based on the updated mean value and the updated variance value. The calculation rules for the upper and lower limits are preset in the system deployment phase as the mean value minus 2 times the square root of the variance and the mean value plus 2 times the square root of the variance. The interval boundary values are uniformly retained to 4 decimal places. After the whiteness calculation results are processed, the lower and upper limits of the intervals corresponding to each batch are arranged in the order of the batch number to generate the posterior interval results.
[0086] Threshold determination submodule: Based on the posterior interval results, the release threshold value is preset as a single floating-point number and written to the threshold configuration table during the system configuration phase. The threshold configuration table remains read-only during the detection process. The lower limit value of the interval in the posterior interval results is read one by one according to the batch number, and the corresponding release threshold value is read synchronously. A size comparison operation is performed on the two types of values. When the lower limit value of the interval is greater than or equal to the release threshold value, the batch status mark is written as the release mark. When the lower limit value of the interval is less than the release threshold value, the batch status mark is written as the retest mark. The status mark is recorded using an integer encoding method, where the release mark is encoded as 1 and the retest mark is encoded as 0. After the mark is generated, the batch number and the corresponding status mark are written to the status cache in sequence. The field order of the status cache is preset by the configuration file during the system deployment phase and loaded during the initialization phase. After all batches are processed, the status cache is sorted and output once to construct the batch determination status.
[0087] Quality traceability solidification module:
[0088] Data processing submodule: Based on the whiteness calculation results and batch judgment status, retrieve the whiteness value and judgment identifier one by one and arrange them in batch order. Read the device identifier and time identifier, perform field position mapping and order verification, and combine and arrange the whiteness value, judgment identifier, device identifier and time identifier in sequence to generate traceability dataset;
[0089] Index solidification submodule: Based on the traceability dataset, it verifies the field order and expands the record writing according to the predefined field order. After confirming the record location, it extracts the index field, generates index entries and binds them to the record address, and synchronously completes the storage writing and index establishment to generate the detection traceability record.
[0090] Please see Figure 2 A method for detecting the whiteness of refined cotton, comprising the following steps:
[0091] S1: Based on the original readings of the reflected light intensity electrical signal, the original readings of the dark response electrical signal, and the measurement point number, the readings are read according to the measurement point number and subtracted to obtain a single-point reflection difference sequence. The mean and dispersion are calculated to form a set of statistical characteristic parameters, and a set of reflection response quantities is generated.
[0092] S2: Based on the set of reflection response quantities and combined with the set of statistical characteristic parameters to limit the stable interval, the reflection response quantity of the measuring point is predicted, the boundary is judged and the value is corrected. The light source attenuation, gain correction and reference offset are output to obtain the calibration state parameters.
[0093] S3: Based on the calibration status parameters, subtract the reference offset from the reflection difference and apply the gain correction and light source attenuation according to the measurement point number to complete the white board ratio conversion of the white reference board response, form the corrected whiteness sequence, calculate the whiteness mean and dispersion, and output the whiteness calculation result.
[0094] S4: Based on the whiteness calculation results, match batch attributes and introduce historical distribution parameters, update the posterior interval of the whiteness results of each batch, read the confidence lower limit and compare it with the release threshold, output the release judgment and retest judgment, and construct the batch judgment status.
[0095] S5: Based on the whiteness calculation results and batch judgment status, jointly organize the whiteness values and judgment identifiers and associate them with the device identifier and time identifier. Write them into the storage in one go according to the predefined field order and simultaneously establish an index structure to generate detection traceability records.
[0096] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A refined cotton whiteness detection system, characterized in that, The system includes: Optical response construction module: By reading the original readings of the reflected light intensity electrical signal, the original readings of the dark response electrical signal, and the measurement point number identifier, the measurement points are read sequentially and the dark response values are subtracted. The single-point reflection difference is calculated and the single-point reflection difference sequence and the corresponding set of statistical characteristic parameters are output to generate a set of reflection response quantities. The calibration state estimation module: Based on the set of reflection response quantities, combined with the set of statistical characteristic parameters to limit the stable range, Kalman filtering is used for prediction, boundary judgment and numerical correction, and outputs the light source attenuation, gain correction and reference offset to obtain the calibration state parameters; Drift compensation calculation module: Based on the calibration state parameters, Bayesian inference of reflection difference is used to subtract reference offset and gain and attenuation correction are applied sequentially to complete the white board ratio conversion of white reference board response and uniformly calculate whiteness mean and dispersion based on the corrected whiteness sequence, and output whiteness calculation results; Release inference module: Based on the whiteness calculation result, it matches batch attributes and introduces historical distribution parameters. After updating the axiom interval, it compares the confidence lower limit with the release threshold, outputs the release and retest judgment, and constructs the batch judgment status. Quality traceability and solidification module: Based on the whiteness calculation result and the batch judgment status, it jointly organizes the whiteness value and judgment identifier and associates them with the device and time identifier, writes them into the storage in one go according to the predefined field order and simultaneously establishes an index structure to generate the detection traceability record.
2. The refined cotton whiteness detection system according to claim 1, characterized in that, The reflection response set includes a single-point reflection difference sequence and a set of statistical characteristic parameters. The calibration status parameters include light source attenuation, gain correction, and reference offset. The whiteness calculation results include whiteness mean and whiteness dispersion. The batch judgment status includes release judgment and retest judgment. The detection traceability record includes whiteness value, judgment identifier, equipment identifier, and time identifier.
3. The refined cotton whiteness detection system according to claim 1, characterized in that, The optical response construction module includes: Signal difference submodule: Based on the original readings of the reflected light intensity electrical signal, the original readings of the dark response electrical signal, and the measurement point number identifier, the readings are read sequentially, the number is verified and the dark response value is subtracted and written into the single-point difference, generating a single-point reflection difference sequence; The response aggregation submodule: Based on the single-point reflection difference sequence, the difference is aggregated according to the measurement point number, the mean and dispersion are calculated to form a set of statistical characteristic parameters, and the difference sequence and the set of statistical characteristic parameters are encapsulated to obtain the reflection response quantity set.
4. The refined cotton whiteness detection system according to claim 1, characterized in that, The calibration status estimation module includes: Stable interval submodule: Based on the set of reflection response quantities, combined with the set of statistical feature parameters, the stable interval is defined. A continuous observation sequence is constructed in the order of measurement points, and Kalman filtering is introduced to recursively update and evaluate the reflection response quantities. The corresponding reflection response values are retrieved in the order of measurement points and compared with the upper and lower limits of statistical features to complete point-by-point comparison. Measurement points outside the interval are marked with exclusion status, and the measurement point numbers and value records inside the interval are retained to generate a stable interval identifier. The benchmark reading submodule reads the white benchmark response and dark benchmark response of the corresponding measurement point based on the stable interval identifier. It aligns the two types of response values according to the measurement point number, subtracts the dark benchmark response value from the white benchmark response value of the same measurement point, and collects the measurement point results in sequence to obtain the benchmark difference set. Parameter correction submodule: Based on the reference difference set, retrieve the reflection response values within the stable range and compare them point by point with the reference difference values to complete the formation of light source attenuation value, gain correction value, and reference offset value, and then organize and summarize them to obtain the calibration status parameters.
5. The refined cotton whiteness detection system according to claim 1, characterized in that, The Kalman filter reads the reflection response of each measuring point in sequence according to the measuring point number. It forms a continuous observation sequence of the reflection response of adjacent measuring points according to time and sampling order. At each measuring point, it predicts the state based on the state estimate and covariance of the previous measuring point. It introduces the reflection response of the current measuring point as the observation input, calculates the difference between the predicted state and the current observation value, and completes the state update based on the difference. At the same time, it records the deviation between the predicted value and the actual observation value before the update as residual data. The residual data is continuously updated with the measuring point sequence and participates in the recursive calculation of subsequent measuring points.
6. The refined cotton whiteness detection system according to claim 1, characterized in that, The drift compensation calculation module includes: Offset sub-module: Based on the calibration status parameters, combined with Bayesian inference, the reference offset is constrained and updated. The reference offset is retrieved item by item and expanded in sequence according to the corresponding reflection difference. The difference is subtracted according to the measurement point number and kept in a consistent arrangement. The gain correction and light source attenuation are sequentially called to apply the subtracted value point by point to form a continuous correction value record and generate a correction reflection sequence. Ratio conversion submodule: Based on the corrected reflection sequence, read the response values of the white reference plate according to the measurement point number and complete the sequence alignment, calculate the ratio of the corrected reflection value of each measurement point to the corresponding response value of the white reference plate, record the conversion results according to the measurement point order and collect them to form a continuous numerical sequence to obtain the whiteness sequence. Whiteness Summary Submodule: Based on the whiteness sequence, expand each whiteness value in the order of measurement points and complete the validity screening. Perform centralized summation and measurement point counting on the retained whiteness values. After calculating the mean and dispersion, organize and output the whiteness sequence and statistical results to obtain the whiteness calculation result.
7. The refined cotton whiteness detection system according to claim 1, characterized in that, The Bayesian inference uses the existing reference offset in the calibration state parameters as prior information input, introduces the reflection difference corresponding to the current measurement point as observation information, and performs joint calculation on the prior information and observation information to form an update judgment basis. During the step-by-step measurement point expansion, the reference offset is probabilistically updated according to the reflection difference of the current measurement point and the corresponding update result is obtained. The updated reference offset is used as the prior input for the next measurement point processing. The prior introduction, observation combination and update judgment process is continuously executed in the order of measurement point number to form a reference offset update sequence that progresses with the measurement point sequence.
8. The refined cotton whiteness detection system according to claim 1, characterized in that, The release inference module includes: Interval Update Submodule: Based on the whiteness calculation results, match batch attributes and introduce historical distribution parameters, collect the whiteness calculation results by batch identifier and expand the historical distribution parameters item by item, record the numerical alignment, interval boundary update and upper and lower limits, and obtain the posterior interval results; Threshold determination submodule: Based on the posterior interval result, read the lower confidence limit of the posterior interval and compare it with the release threshold item by item, generate release and retest marks for each batch and collect them sequentially, bind the batch number and record the status, and construct the batch determination status.
9. The refined cotton whiteness detection system according to claim 1, characterized in that, The quality traceability and solidification module: Data processing submodule: Based on the whiteness calculation result and the batch judgment status, retrieve the whiteness value and judgment identifier one by one and arrange them in batch order, read the device identifier and time identifier, perform field position mapping and order verification, and combine and arrange the whiteness value, judgment identifier, device identifier and time identifier in sequence to generate traceability dataset; Index solidification submodule: Based on the traceability dataset, it verifies the field order and expands the record writing according to the predefined field order. After confirming the record position, it extracts the index field, generates index entries and binds them to the record address, and synchronously completes the storage writing and index establishment to generate the detection traceability record.
10. A method for detecting the whiteness of refined cotton, characterized in that, The refined cotton whiteness detection system according to any one of claims 1-9 includes the following steps: S1: Based on the original readings of the reflected light intensity electrical signal, the original readings of the dark response electrical signal, and the measurement point number, the readings are read according to the measurement point number and subtracted to obtain a single-point reflection difference sequence. The mean and dispersion are calculated to form a set of statistical characteristic parameters, and a set of reflection response quantities is generated. S2: Based on the set of reflection response quantities and combined with the set of statistical characteristic parameters to limit the stable interval, the reflection response quantity of the measuring point is predicted, the boundary is judged and the value is corrected. The light source attenuation, gain correction and reference offset are output to obtain the calibration state parameters. S3: Based on the calibration status parameters, subtract the reference offset from the reflection difference and apply the gain correction and light source attenuation according to the measurement point number to complete the white board ratio conversion of the white reference board response, form the corrected whiteness sequence, calculate the whiteness mean and dispersion, and output the whiteness calculation result. S4: Based on the whiteness calculation results, match batch attributes and introduce historical distribution parameters, update the posterior interval of the whiteness results of each batch, read the confidence lower limit and compare it with the release threshold, output the release judgment and retest judgment, and construct the batch judgment status. S5: Based on the whiteness calculation results and batch judgment status, jointly organize the whiteness values and judgment identifiers and associate them with the device identifier and time identifier. Write them into the storage in one go according to the predefined field order and simultaneously establish an index structure to generate detection traceability records.