Test paper detection result error correction and precision improvement method and system
By constructing a systematic, closed-loop error correction framework for test strip detection, and comprehensively considering environmental changes, differences in test strip matrix, liquid diffusion characteristics, and instrument drift, the accuracy and reliability of test strip detection results are improved, enabling stable operation in different environments and scenarios.
Patent Information
- Application Number
- CN202511272140.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies cannot effectively take into account factors such as environmental changes, differences in test strip matrix, liquid diffusion characteristics, and instrument drift, which makes it difficult to guarantee the accuracy of test strip test results, especially limiting their application in scenarios with high precision requirements.
By acquiring test strip microenvironment data and microscopic RGB-D images, a spatiotemporal map is constructed, and node features are reconstructed using a self-supervised mask-transfer attention network. Combined with a multi-reference segmentation depth network and a multi-feature fusion network, comprehensive correction of environmental factors and liquid diffusion characteristics is performed. Drift correction is performed by measuring the ultrasonic propagation time of the liquid front using a MEMS ultrasonic transducer.
It improves the accuracy and reliability of test strip detection, ensures the stability of the system during long-term operation, and adapts to changes in different environments and scenarios.
Smart Images

Figure CN121656231A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to test strip detection methods, and more specifically to methods and systems for error correction and accuracy improvement of test strip detection results. Background Technology
[0002] Test strips, as a rapid and convenient testing method, are widely used in many fields such as medical diagnosis, environmental monitoring, and food safety. They can quickly provide test results, providing a basis for decision-making. However, the accuracy of test strips faces many challenges. Changes in the testing environment, such as fluctuations in temperature, humidity, and light intensity, directly affect the reaction process and result reading of the test strip. The physical and chemical properties of the test strip matrix may differ depending on the usage scenario, such as in laboratory, field, or vehicle environments. The diffusion characteristics of liquids on the test strip, including diffusion speed and diffusion pattern, also vary depending on environmental conditions and test strip material. In addition, drift phenomena of the testing instrument itself, such as performance changes due to long-term use, can also introduce errors. These factors intertwine, making it difficult to guarantee the accuracy of test strip results.
[0003] While existing technologies employ individual methods to address these error factors, they are typically fragmented and independent, lacking a systematic, closed-loop solution to comprehensively consider and correct these errors. Existing correction methods often only address errors caused by a single factor, failing to handle the coupled effects of multiple factors simultaneously. Therefore, when multiple error factors coexist, current technologies struggle to comprehensively improve test strip detection accuracy. This not only limits the application of test strip detection in high-precision scenarios but also increases the risks associated with inaccurate detection.
[0004] Therefore, it is necessary to design a method to overcome the limitations of the dispersed and independent processing of errors in the existing technology, and to comprehensively consider various factors such as environmental changes, differences in test strip matrix, liquid diffusion characteristics and instrument drift, so as to not only improve the accuracy and reliability of test strip detection, but also ensure the long-term stable operation of the system through a continuous optimization mechanism. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method and system for error correction and accuracy improvement of test strip detection results.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a method for error correction and accuracy improvement of test strip detection results, comprising:
[0007] Acquire test strip microenvironment data and microscopic RGB-D images of the test strip, construct a spatiotemporal graph and reconstruct node features using a self-supervised mask-transfer attention network to obtain the environment-matrix joint perturbation vector;
[0008] The microscopic RGB-D image is input into the modified multi-reference segmentation depth network to calculate the true depth distribution of the liquid. The environment-matrix joint perturbation vector is used as a parameter and mapped to the initial concentration value to perform comprehensive correction of environmental factors and liquid diffusion characteristics.
[0009] A multi-feature fusion network is used to identify the substrate scene of the test strip, output a scene compensation matrix, correct the initial concentration value, and write the scene category back into the spatiotemporal map;
[0010] MEMS ultrasonic transducers are placed on both sides of the test strip membrane to measure the ultrasonic propagation time at the liquid front, calculate the coupling index and trigger the drift correction coefficient, and calculate the final concentration.
[0011] The environment-matrix joint perturbation vector, the true depth distribution of the liquid, the scene category, and the drift correction coefficient are written into the instance library as quadruples. After accumulating a number of instances, the quadruples are jointly fine-tuned using a Bayesian approach.
[0012] Its further technical solution is as follows: The acquisition of test strip microenvironment data and microscopic RGB-D images of the test strip, the construction of a spatiotemporal graph, and the reconstruction of node features using a self-supervised mask-transfer attention network to obtain the environment-matrix joint perturbation vector include:
[0013] Inside the test strip reading chamber, data from a miniature spectral sensor, infrared array data from the test strip surface, and a microscopic RGB-D image are simultaneously acquired. The test strip microenvironment data includes data from the miniature spectral sensor and infrared array data from the test strip surface. The miniature spectral sensor data includes temperature, humidity, light intensity, and air pressure. The infrared array data from the test strip surface refers to the temperature distribution on the test strip surface. The microscopic RGB-D image includes test strip fibers and liquid diffusion profiles.
[0014] Each pixel on the surface of the test strip is defined as a node. A spatiotemporal map of the test strip microenvironment is constructed based on the spatial adjacency and temporal continuity of the pixels to obtain the spatiotemporal map.
[0015] The node features of the randomly masked parts are reconstructed using a self-supervised mask-passing attention network by using information from surrounding nodes, generating an environment-matrix joint perturbation vector.
[0016] The further technical solution is as follows: The modified multi-reference segmentation depth network inputs the microscopic RGB-D image to calculate the true depth distribution of the liquid. The environment-matrix joint perturbation vector is used as a parameter and mapped to an initial concentration value to perform comprehensive correction of environmental factors and liquid diffusion characteristics, including:
[0017] The microscopic RGB-D image is preprocessed, including denoising, normalization, and resizing, to obtain the preprocessed result;
[0018] The preprocessing results are input into the modified multi-reference segmentation depth network to select the scale lines and fiber intersections on the test strip as background references, segment the preprocessing results, identify the liquid diffusion area, calculate the true depth distribution of each area, and perform correction.
[0019] The environment-matrix joint perturbation vector is incorporated into the diffusion model as a parameter, mapping the true depth distribution to the initial concentration value. The mapping process has adjusted for concentration deviations caused by environmental changes.
[0020] The further technical solution is as follows: the diffusion model describes the diffusion process of liquid in test paper fibers through physical principles, introduces environmental factor correction terms to ensure the accuracy of the model under different environmental conditions; the diffusion model considers the diffusion characteristics of liquid in test paper fibers, including diffusion rate and morphology.
[0021] The further technical solution is as follows: the modified multi-reference object segmentation depth network includes an input layer, a feature extraction layer, a reference object segmentation layer, a depth estimation layer, a depth correction layer, and an output layer;
[0022] The input layer receives the preprocessing results.
[0023] The feature extraction layer adopts the Transformer architecture and extracts global features of the preprocessed results through a multi-head self-attention mechanism to capture long-distance dependencies and form a feature image;
[0024] The reference object segmentation layer uses a convolutional neural network to process the feature map and outputs a segmentation mask for the reference object;
[0025] The depth estimation layer is based on the Transformer architecture and combines a reference object segmentation mask to calculate the true depth distribution of the liquid diffusion region to form the depth estimation result;
[0026] The depth correction layer uses the depth information of the background reference to correct the depth of the liquid diffusion area, ensuring the accuracy of the depth distribution;
[0027] The output layer outputs the true depth distribution of the corrected liquid diffusion region.
[0028] The further technical solution is as follows: the preprocessing result is input into the modified multi-reference segmentation depth network, and the scale lines and fiber intersections on the test strip are selected as background references to segment the preprocessing result, identify the liquid diffusion area, calculate the true depth distribution of each area, and perform correction, including:
[0029] The preprocessing results are input into the modified multi-reference segmentation depth network. The scale lines and fiber intersections on the test paper are selected as background references to calculate the relative depth of liquid diffusion. The preprocessing results are segmented to identify the liquid diffusion area and calculate the true depth distribution of each area. The depth of the liquid diffusion area is corrected using the depth information of the background references.
[0030] The further technical solution is as follows: The method of incorporating the environment-matrix joint perturbation vector as a parameter into the diffusion model to map the true depth distribution to an initial concentration value includes:
[0031] Each component of the environment-matrix joint perturbation vector is used as a correction factor for the diffusion coefficient in the diffusion model to obtain the corrected diffusion model.
[0032] The modified diffusion model is used to map the true depth distribution to the initial concentration value.
[0033] The further technical solution is as follows: The method employs a multi-feature fusion network to identify the substrate scene of the test strip, outputs a scene compensation matrix, corrects the initial concentration value, and writes the scene category back into the spatiotemporal graph, including:
[0034] A multi-feature fusion network is used to identify the substrate scene of the test strip and output the scene category and scene compensation matrix. The substrate scene includes experimental table, field ground and vehicle bracket.
[0035] The initial concentration value is corrected using the scene compensation matrix to obtain the compensated concentration value;
[0036] The scene category is written back into the spatiotemporal graph, and the base node attributes are dynamically updated.
[0037] The further technical solution is as follows: MEMS ultrasonic transducers are arranged on both sides of the test strip membrane to measure the ultrasonic propagation time at the liquid front, calculate the coupling index and trigger the drift correction coefficient, and calculate the final concentration, including:
[0038] MEMS ultrasonic transducers are arranged on both sides of the test strip membrane to measure the ultrasonic propagation time of the liquid front in both directions in real time.
[0039] The diffusion-ultrasound coupling index is calculated based on the forward and reverse ultrasound propagation times at the liquid front.
[0040] When the diffusion-ultrasound coupling index exceeds a threshold, a drift correction coefficient is calculated, and the compensated concentration value is corrected using the drift correction coefficient to obtain the final concentration.
[0041] This invention also provides a system for error correction and accuracy improvement of test strip detection results, including:
[0042] The vector determination unit is used to acquire the microenvironment data of the test strip and the microscopic RGB-D image of the test strip, construct a spatiotemporal graph, and reconstruct node features using a self-supervised mask-transfer attention network to obtain the joint perturbation vector of the environment and matrix.
[0043] The integrated correction unit is used to input the microscopic RGB-D image into the modified multi-reference segmentation depth network, calculate the true depth distribution of the liquid, and use the environment-matrix joint perturbation vector as a parameter to map it into an initial concentration value in order to perform integrated correction of environmental factors and liquid diffusion characteristics.
[0044] The compensation unit is used to identify the substrate scene of the test strip using a multi-feature fusion network, output the scene compensation matrix, correct the initial concentration value, and write the scene category back into the spatiotemporal map.
[0045] The drift correction unit is used to arrange MEMS ultrasonic transducers on both sides of the test strip membrane to measure the ultrasonic propagation time at the liquid front, calculate the coupling index and trigger the drift correction coefficient to calculate the final concentration.
[0046] The fine-tuning unit is used to write the environment-matrix joint perturbation vector, the true depth distribution of the liquid, the scene category, and the drift correction coefficient as a quadruple into the instance library, and to fine-tune the quadruple in a Bayesian manner for every accumulated number of instances.
[0047] The advantages of this invention compared to existing technologies are as follows: This invention acquires test strip microenvironment data and microscopic RGB-D images, constructs a spatiotemporal graph, and reconstructs node features using a self-supervised mask-transfer attention network to obtain the environment-matrix joint perturbation vector. Next, the microscopic RGB-D image is input into a modified multi-reference segmentation depth network to calculate the true liquid depth distribution. The environment-matrix joint perturbation vector is then incorporated as a parameter into the diffusion model, mapped to an initial concentration value, achieving comprehensive correction of environmental factors and liquid diffusion characteristics. Then, a multi-feature fusion network is used to identify the substrate scene supporting the test strip, outputting a scene compensation matrix and correcting the initial concentration value, while simultaneously writing the scene category back into the spatiotemporal graph. Furthermore, MEMS ultrasonic transducers are arranged on both sides of the test strip membrane to measure the ultrasonic propagation time at the liquid front, calculate the coupling index, trigger the drift correction coefficient, and calculate the final concentration. Finally, the environment-matrix joint perturbation vector, the true liquid depth distribution, the scene category, and the drift correction coefficient are written as a quadruple into an instance library. For every accumulated number of instances, the quadruple is jointly fine-tuned using a Bayesian approach. This series of steps not only comprehensively considers various factors such as environmental changes, differences in test strip matrix, liquid diffusion characteristics, and instrument drift, thus improving the accuracy and reliability of test strip detection, but also ensures the long-term stable operation of the system through a continuous optimization mechanism.
[0048] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. Attached Figure Description
[0049] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 A flowchart illustrating the method for error correction and accuracy improvement of test strip detection results provided in an embodiment of the present invention;
[0051] Figure 2 A schematic block diagram of a test strip detection result error correction and accuracy improvement system provided in an embodiment of the present invention;
[0052] Figure 3 A schematic block diagram of a computer device provided for an embodiment of the present invention. Detailed Implementation
[0053] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0054] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0055] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0056] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0057] Please see Figure 1 , Figure 1This is a schematic flowchart illustrating the method for error correction and accuracy improvement of test strip detection results provided in this embodiment of the invention. This method, applied in a server, overcomes the limitations of existing technologies that handle errors in a scattered and independent manner by constructing a systematic, closed-loop error correction framework. Specifically, firstly, microenvironmental data and microscopic RGB-D images of the test strip are acquired. A spatiotemporal graph is constructed, and node features are reconstructed using a self-supervised mask-transfer attention network to obtain the environment-matrix joint perturbation vector. Next, the microscopic RGB-D image is input into a modified multi-reference segmentation depth network to calculate the true depth distribution of the liquid. The environment-matrix joint perturbation vector is then incorporated as a parameter into the diffusion model, mapped to an initial concentration value, achieving comprehensive correction of environmental factors and liquid diffusion characteristics. Then, a multi-feature fusion network is used to identify the substrate scene supporting the test strip, outputting a scene compensation matrix and correcting the initial concentration value. Simultaneously, the scene category is written back into the spatiotemporal graph. Furthermore, MEMS ultrasonic transducers are arranged on both sides of the test strip membrane to measure the ultrasonic propagation time at the liquid front, calculate the coupling index, trigger the drift correction coefficient, and calculate the final concentration. Finally, the environment-matrix joint perturbation vector, the true liquid depth distribution, the scene category, and the drift correction coefficient are written into the instance library as a quadruple. After accumulating a certain number of instances, the quadruple is jointly fine-tuned using a Bayesian approach. This series of steps not only comprehensively considers multiple factors such as environmental changes, differences in the test strip matrix, liquid diffusion characteristics, and instrument drift, improving the accuracy and reliability of the test strip detection, but also ensures the long-term stable operation of the system through a continuous optimization mechanism.
[0058] Figure 1 This is a flowchart illustrating the method for error correction and accuracy improvement of test strip detection results provided in an embodiment of the present invention. Figure 1 As shown, the method includes the following steps S110 to S150.
[0059] S110. Acquire test strip microenvironment data and microscopic RGB-D images of the test strip, construct a spatiotemporal graph, and use a self-supervised mask-transfer attention network to reconstruct node features to obtain the environment-matrix joint perturbation vector.
[0060] In this embodiment, the environment-matrix joint perturbation vector refers to a vector that integrates the test strip microenvironment data (including temperature, humidity, light, and air pressure) and the surface temperature distribution of the test strip. It is used to describe the overall perturbation of the current detection environment and the differences in the test strip matrix. This vector reflects the influence of environmental factors and the test strip matrix on the detection results.
[0061] In one embodiment, step S110 may include steps S111 to S113.
[0062] S111. Inside the test strip reading chamber, simultaneously acquire data from a miniature spectral sensor, infrared array data from the test strip surface, and a microscopic RGB-D image. The test strip microenvironment data includes data from the miniature spectral sensor and infrared array data from the test strip surface. The miniature spectral sensor data includes temperature, humidity, light intensity, and air pressure. The infrared array data from the test strip surface refers to the temperature distribution on the test strip surface. The microscopic RGB-D image includes test strip fibers and liquid diffusion profiles.
[0063] In this embodiment, the data from the miniature spectral sensor includes temperature, humidity, light intensity, and air pressure. These data reflect the basic physical conditions of the test strip's detection environment.
[0064] Infrared array data of the test strip surface: refers to the temperature distribution on the surface of the test strip. Temperature distribution data can reflect the thermal changes of the test strip during the detection process, which is crucial for understanding the thermal effects during liquid diffusion.
[0065] Microscopic RGB-D images: including test strip fibers and liquid diffusion profiles. RGB images are used to capture color changes in the test strip, and depth images are used to measure the diffusion depth of the liquid within the test strip fibers.
[0066] S112. Define each pixel on the surface of the test strip as a node, and construct a spatiotemporal map of the test strip microenvironment based on the spatial adjacency and temporal continuity of the pixels to obtain the spatiotemporal map.
[0067] In this embodiment, the node is defined as follows: each pixel on the surface of the test strip is defined as a node, and each node contains micro-spectral sensor data, infrared temperature data, and microscopic RGB-D image data.
[0068] Edge definition:
[0069] Spatial edges: Based on the spatial adjacency between pixels, adjacent pixels are connected to form spatial edges. This reflects the local spatial relationships on the surface of the test strip.
[0070] Time edge: Based on the data of a pixel at different time frames, connect the data of the same pixel at different times to form a time edge. This reflects the changes on the surface of the test strip over time.
[0071] Spatiotemporal graph construction: By combining all nodes and edges, a "spatiotemporal graph of the test strip microenvironment" is constructed. This graph not only contains spatial information of the test strip surface but also temporal series information, which can comprehensively reflect the dynamic changes of the test strip during the detection process.
[0072] S113. Randomly masked node features are reconstructed using a self-supervised mask-transfer attention network by using information from surrounding nodes to generate an environment-matrix joint perturbation vector.
[0073] Randomly select 15-30% of the nodes and mask their feature values. These masked nodes will be used as targets for network training to test the network's reconstruction ability.
[0074] A self-supervised mask-passing attention network is used to reconstruct the feature values of the masked node using information from surrounding nodes. The network automatically adjusts the attention weights by learning the spatial and temporal relationships between nodes to improve the accuracy of the reconstruction.
[0075] Through self-supervised training, the network outputs a joint environment-matrix perturbation vector, Feb. This vector integrates the effects of environmental changes (temperature, humidity, light, air pressure) and differences in the test strip matrix (different usage scenarios), providing an important reference for subsequent error correction.
[0076] By simultaneously acquiring test strip microenvironment data and microscopic RGB-D images, a spatiotemporal graph is constructed, and node features are reconstructed using a self-supervised mask-transfer attention network to generate the environment-matrix joint perturbation vector F. eb This process not only captures the dynamic changes in the test strip's detection environment but also comprehensively considers the differences in environmental factors and the test strip matrix, providing comprehensive background information for subsequent error correction. This method achieves one-time modeling of microenvironmental disturbances, improving the accuracy and reliability of test strip detection.
[0077] S120. Input the microscopic RGB-D image into the modified multi-reference segmentation depth network, calculate the true depth distribution of the liquid, and use the environment-matrix joint perturbation vector as a parameter to map it into an initial concentration value, so as to perform comprehensive correction of environmental factors and liquid diffusion characteristics.
[0078] In this embodiment, the initial concentration value refers to the concentration obtained through the true depth distribution D of the liquid. vis The initial concentration value is calculated using a diffusion model that takes environmental factors into account. This value will be further corrected in subsequent steps to improve accuracy.
[0079] In one embodiment, step S120 described above may include steps S121 to S123.
[0080] S121. The microscopic RGB-D image is preprocessed, including denoising, normalization and size adjustment, to obtain the preprocessed result.
[0081] In this embodiment, the preprocessing result refers to the microscopic RGB-D image after denoising, normalization, and size adjustment. These processing steps aim to improve image quality, reduce noise interference, and unify image size to facilitate subsequent deep learning network processing.
[0082] Denoising: Removes random noise from an image using filtering algorithms to improve image quality.
[0083] Normalization: Adjusting the pixel values of an image to a standard range (such as 0 to 1) to facilitate network learning.
[0084] Resizing: Adjust the image to the size required for network input to ensure consistency of input data.
[0085] S122. Input the preprocessing results into the modified multi-reference segmentation depth network, select the scale lines and fiber intersections on the test paper as background references, segment the preprocessing results, identify the liquid diffusion area, calculate the true depth distribution of each area, and perform correction.
[0086] Specifically, the modified multi-reference object segmentation deep network includes an input layer, a feature extraction layer, a reference object segmentation layer, a depth estimation layer, a depth correction layer, and an output layer;
[0087] The input layer receives the preprocessing results.
[0088] The feature extraction layer adopts the Transformer architecture and extracts global features of the preprocessed results through a multi-head self-attention mechanism to capture long-distance dependencies and form a feature image;
[0089] The reference object segmentation layer uses a convolutional neural network to process the feature map and outputs a segmentation mask for the reference object;
[0090] The depth estimation layer is based on the Transformer architecture and combines a reference object segmentation mask to calculate the true depth distribution of the liquid diffusion region to form the depth estimation result;
[0091] The depth correction layer uses the depth information of the background reference to correct the depth of the liquid diffusion area, ensuring the accuracy of the depth distribution;
[0092] The output layer outputs the true depth distribution of the corrected liquid diffusion region.
[0093] Specifically, the input layer receives preprocessed microscopic RGB-D images. These images contain details of the test strip fibers, the outline of liquid diffusion, and depth information. The input image format is typically (H, W, C), where H and W are the height and width of the image, respectively, and C is the number of channels (3 for RGB images and 1 for depth images).
[0094] The feature extraction layer employs a Transformer architecture, utilizing a multi-head self-attention mechanism to extract global features from the input image. This architecture captures long-range dependencies in the image, aiding in the identification of boundaries and internal structures of liquid diffusion regions. The output of the feature extraction layer is a high-dimensional feature map containing rich semantic information.
[0095] The reference segmentation layer uses a convolutional neural network (CNN) to process the feature map and output a segmentation mask for background references such as scale lines and fiber intersections on the test paper. These references play a crucial role in subsequent depth correction because they provide a relative depth reference for the liquid diffusion area.
[0096] The depth estimation layer, based on the Transformer architecture, combines a reference-based segmentation mask to calculate the true depth distribution D of the liquid diffusion region. vis This layer generates depth estimates for each region by analyzing the depth information of the liquid diffusion area. The depth estimates reflect the actual diffusion of the liquid within the test paper fibers.
[0097] The depth correction layer uses depth information from a background reference to correct the depth of the liquid diffusion area. Specifically, by comparing the depth of the liquid diffusion area with the depth of the background reference, the depth estimation result is adjusted to ensure the accuracy of the depth distribution. This correction process can reduce depth estimation errors caused by factors such as image noise and changes in illumination.
[0098] The output layer outputs the corrected true depth distribution D of the liquid diffusion region. vis This depth distribution data will be used in subsequent steps to calculate initial concentration values.
[0099] In one embodiment, step S122 described above may include:
[0100] The preprocessing results are input into the modified multi-reference segmentation depth network. The scale lines and fiber intersections on the test paper are selected as background references to calculate the relative depth of liquid diffusion. The preprocessing results are segmented to identify the liquid diffusion area and calculate the true depth distribution of each area. The depth of the liquid diffusion area is corrected using the depth information of the background references.
[0101] Specifically, the preprocessed microscopic RGB-D images are input into the modified multi-reference segmentation depth network. This network, through multi-reference segmentation and depth estimation, can accurately identify liquid diffusion regions and calculate their true depth distribution.
[0102] The network selects markings, fiber intersections, and other features on the test strip as background references. The positions and depths of these references on the test strip are known and can be used as a benchmark for calculating the depth of the liquid diffusion zone.
[0103] The network segments the preprocessed RGB-D microscopic image to identify the liquid diffusion region. The segmentation process uses a convolutional neural network to generate a segmentation mask to distinguish the liquid diffusion region from the background region.
[0104] By segmenting the mask, the network can accurately identify liquid diffusion regions. The boundaries and internal structure of these regions are crucial for subsequent depth calculations.
[0105] The network calculates the true depth distribution D of each liquid diffusion region. vis This process utilizes the depth estimation layer of the Transformer architecture, combined with a reference object segmentation mask, to generate high-precision depth estimation results.
[0106] Finally, the network uses depth information from background references to correct the depth of the liquid diffusion area. This correction process ensures the accuracy of the depth distribution and reduces the impact of environmental factors and image noise on depth estimation.
[0107] By inputting preprocessed microscopic RGB-D images into a modified multi-reference segmentation depth network, the method in this embodiment accurately identifies liquid diffusion regions and calculates their true depth distribution. The network utilizes depth information from background references for correction, ensuring the accuracy of the depth distribution. This method not only improves the accuracy of depth estimation but also provides a reliable data foundation for subsequent concentration calculations.
[0108] S123. The environment-matrix joint perturbation vector is used as a parameter and incorporated into the diffusion model to map the true depth distribution to the initial concentration value. The mapping process has adjusted for concentration deviations caused by environmental changes.
[0109] In one embodiment, step S123 described above may include steps S1231 to S1232.
[0110] S1231. Use each component of the environment-matrix joint perturbation vector as a correction factor for the diffusion coefficient in the diffusion model to obtain the corrected diffusion model.
[0111] S1232. The true depth distribution is mapped to the initial concentration value using the modified diffusion model.
[0112] Specifically, each component of the environment-matrix joint perturbation vector is used as a correction factor for the diffusion coefficient in the diffusion model to obtain the corrected diffusion model. Specifically, the environment-matrix joint perturbation vector F... eb Environmental factors, including temperature, humidity, light, and air pressure, influence the diffusion process of the liquid on the test strip. By using F... eb The component of can be used as a correction factor to adjust the diffusion coefficient D in the diffusion model, making it more accurately reflect the actual diffusion situation.
[0113] Using the modified diffusion model to calculate the true depth distribution D vis Mapped to initial concentration value C visThis process takes into account the influence of environmental factors on liquid diffusion, thereby improving the accuracy of the initial concentration value.
[0114] Through the above steps, this invention not only calculates the true depth distribution of the liquid but also considers environmental factors and differences in the test strip matrix, thus obtaining a more accurate initial concentration value. This method effectively improves the accuracy and reliability of test strip detection.
[0115] In this embodiment, the diffusion model describes the diffusion process of liquid in test paper fibers through physical principles, and introduces an environmental factor correction term to ensure the accuracy of the model under different environmental conditions; the diffusion model considers the diffusion characteristics of liquid in test paper fibers, including diffusion rate and morphology.
[0116] The joint perturbation vector F between the environment and the matrix is obtained from the multi-source data acquisition and perturbation modeling steps of the test strip microenvironment. eb This vector integrates environmental factors such as temperature, humidity, light, and air pressure, as well as differences in the test strip matrix, reflecting the overall disturbance of the current testing environment.
[0117] A diffusion model is defined to describe the diffusion process of liquid in test paper fibers based on Fick's second law. The model takes the following form: Where C is the concentration, t is the time, D is the diffusion coefficient, and x is the spatial coordinate.
[0118] F eb The various components (such as temperature, humidity, light intensity, and air pressure) are used as correction factors for the diffusion coefficient D. The specific formula is: D effective =D·f(E eb ), where f(F) eb ) is a correction function, according to F eb The value of adjusts the diffusion coefficient D. The correction function can be obtained by fitting experimental data to ensure the accuracy of the model under different environmental conditions. For example, the correction function can be defined as: f(F eb )=1+α·F eb,temp +β·F eb,humidity +γ·F eb,light +δ·F eb,pressure ;
[0119] Using the calibrated diffusion model, combined with the corrected diffusion coefficient D effective The true depth distribution of the liquid D vis Mapped to initial concentration value C vis The specific formula is: C vis =h(D vis D effective ), where h is a mapping function, and the initial concentration value is calculated based on the depth distribution and the corrected diffusion coefficient.
[0120] Specifically, since the environment-matrix joint perturbation vector F has already been considered in the mapping process... eb The influence of the initial concentration C vis The calculation already includes comprehensive corrections for environmental factors and liquid diffusion characteristics. Therefore, no additional correction steps are required.
[0121] Initial output concentration C vis This provides basic data for subsequent scene correction and drift correction.
[0122] By using the environment-matrix joint perturbation vector F eb By incorporating these correction factors as parameters into the diffusion model and directly considering them during the mapping process, accurate calculation of initial concentration values is achieved. This method not only improves the accuracy of initial concentration values but also simplifies the entire process, avoiding redundant correction steps. The correction function f(F) is fitted using experimental data. eb This ensures the model's adaptability and accuracy under different environmental conditions.
[0123] S130. The multi-feature fusion network is used to identify the substrate scene of the test strip, output the scene compensation matrix, correct the initial concentration value, and write the scene category back into the spatiotemporal map.
[0124] In this embodiment, the scene compensation matrix refers to a matrix used to correct the initial concentration value. This matrix provides corresponding correction factors based on the different substrate environments on which the test strip is placed (such as laboratory benches, outdoor ground, vehicle mounts, etc.). These correction factors can compensate for concentration measurement errors caused by scene differences, thereby improving the accuracy of the detection results.
[0125] In one embodiment, step S130 described above may include steps S131 to S133.
[0126] S131. Use a multi-feature fusion network to identify the substrate scene of the test strip, and output the scene category and scene compensation matrix. The substrate scene includes the experimental table, the field ground, and the vehicle bracket.
[0127] The input data includes preprocessed microscopic RGB-D images and the environment-matrix joint perturbation vector F. eb This data provides comprehensive information about the test strip testing environment. The multi-feature fusion network extracts shallow and deep features from the input data through convolutional layers and a Transformer architecture. Shallow features primarily capture local information of the image, while deep features capture global information. The network utilizes the extracted features to identify the substrate environment on which the test strip is located through a classification layer. Common environments include laboratory benches, outdoor ground, and vehicle mounts. The network outputs the environment category L of the test strip and the corresponding environment compensation matrix W. sceneThe scene compensation matrix is a correction matrix associated with a scene category, used for subsequent concentration correction. Each scene category has a unique compensation matrix, which is obtained by fitting experimental data and can compensate for concentration measurement errors caused by scene differences.
[0128] S132. The scene compensation matrix corrects the initial concentration value to obtain the compensated concentration value.
[0129] The initial concentration value Cvis is corrected using the scene compensation matrix Wscene. The correction process is achieved through matrix multiplication, with the specific formula being: C scene =C vis ×W scene , where C scene This is the corrected concentration value, C. vis This is the initial concentration value, W. scene This is the scene compensation matrix. The corrected concentration value C scene It more accurately reflects the actual concentration detected by the test strip, reducing errors caused by differences in the environment.
[0130] S133. Write the scene category back into the spacetime graph and dynamically update the base node attributes.
[0131] In this embodiment, the identified scene category L is written back into the spatiotemporal map of the test strip's microenvironment. Each node (pixel) in the spatiotemporal map contains environmental and matrix information, and the update of the scene category can dynamically reflect the actual environment in which the test strip is located.
[0132] Based on scenario category L, the properties of the matrix nodes in the spatiotemporal graph are dynamically updated. These properties include matrix type, environmental conditions, etc., and the updated properties can more accurately describe the microenvironment of the test strip detection.
[0133] Different substrate environments (such as laboratory benches, outdoor ground, and vehicle mounts) present varying environmental conditions that can affect test strip results. By identifying the environment type and applying a corresponding compensation matrix, the system can adapt to these differences and improve the accuracy of the test results.
[0134] The reverse writing of scene categories and the dynamic updating of base node attributes enable the system to adjust its understanding of the detection environment in real time, thereby better adapting to environmental changes. This dynamic adjustment mechanism ensures the stability and adaptability of the system during long-term operation.
[0135] The scene compensation matrix can correct concentration measurement errors caused by scene differences, thereby improving the accuracy of the detection results. In this way, the system can more accurately reflect the actual concentration detected by the test strip and reduce errors.
[0136] By employing a multi-feature fusion network to identify the substrate scene of the test strip and outputting a scene compensation matrix, this embodiment can accurately correct the initial concentration value. Simultaneously, by writing the scene category back into the spatiotemporal graph and dynamically updating the substrate node attributes, the accuracy and reliability of the detection results are further improved. This method not only considers the environmental differences of the test strip but also ensures the long-term stability and adaptability of the system through a dynamic update mechanism.
[0137] S140. MEMS ultrasonic transducers are arranged on both sides of the test paper membrane to measure the ultrasonic propagation time at the liquid front, calculate the coupling index and trigger the drift correction coefficient, and calculate the final concentration.
[0138] Specifically, by arranging MEMS ultrasonic transducers on both sides of the test strip membrane, the ultrasonic propagation time at the liquid front is measured in real time, the diffusion-ultrasonic coupling index is calculated, and the drift correction coefficient is triggered when the coupling index exceeds the threshold, and finally the corrected concentration value is calculated.
[0139] In one embodiment, step S140 described above may include steps S141 to S143.
[0140] S141. MEMS ultrasonic transducers are arranged on both sides of the test paper membrane to measure the forward and reverse ultrasonic propagation time of the liquid front in real time.
[0141] In this embodiment, MEMS ultrasonic transducers are arranged on both sides of the test strip membrane. These transducers are capable of emitting and receiving ultrasonic signals. The transducer placement should ensure that the ultrasonic propagation signal at the liquid front can be captured.
[0142] The transducer measures the forward and reverse ultrasonic propagation time T at the liquid front in real time. f and T r Forward propagation time refers to the time it takes for an ultrasonic wave to travel from one transducer to another, while backward propagation time refers to the time it takes for an ultrasonic wave to return from another transducer.
[0143] S142. Calculate the diffusion-ultrasound coupling index based on the forward and reverse ultrasound propagation time at the liquid front.
[0144] In this embodiment, based on the measured forward and reverse ultrasonic propagation times T... f and T r Calculate the diffusion-ultrasound coupling index κ. The formula for calculating the coupling index is: Wherein, α(F eb ) is the environment-matrix joint perturbation vector F eb An environmental correction factor is calculated in real time. This correction factor takes into account the influence of environmental factors (such as temperature, humidity, light, and air pressure) on the ultrasound propagation time.
[0145] Specifically, the environmental correction factor α (F eb The coupling index was obtained by fitting experimental data to ensure its accuracy under different environmental conditions. The introduction of a correction factor allows the coupling index to more accurately reflect the relationship between liquid diffusion and ultrasonic propagation.
[0146] S143. When the diffusion-ultrasound coupling index exceeds the threshold, calculate the drift correction coefficient, and use the drift correction coefficient to correct the compensated concentration value to obtain the final concentration.
[0147] The calculated coupling index κ is compared with a preset threshold κth. If κ exceeds the threshold κth, significant instrument drift is considered to exist.
[0148] When the coupling index exceeds the threshold, the drift correction coefficient k is calculated. drift The formula for calculating the drift correction factor is: Among them, C calibrated The calibration concentration, C, is calculated using a calibration model. measured The compensated concentration value C obtained from the current measurement. scene .
[0149] Using drift correction coefficient k drift The corrected concentration value C scene The final concentration C was obtained. final The correction formula is: C final =C scene ×k drift .
[0150] By arranging MEMS ultrasonic transducers on both sides of the test strip membrane, the ultrasonic propagation time at the liquid front is measured in real time, and the diffusion-ultrasonic coupling index is calculated. This embodiment can detect instrument drift. When the coupling index exceeds a threshold, a drift correction coefficient is calculated, and the compensated concentration value is corrected to obtain a more accurate concentration result. This method not only improves the accuracy of concentration measurement but also ensures the stability and reliability of the system during long-term operation.
[0151] S150. Write the environment-matrix joint perturbation vector, the true depth distribution of the liquid, the scene category, and the drift correction coefficient as a quadruple into the instance library. After accumulating a number of instances, fine-tune the quadruple in a Bayesian manner.
[0152] In this embodiment, a quadruple is defined as follows:
[0153] Environment-matrix joint perturbation vector F eb This vector combines test strip microenvironment data (temperature, humidity, light, air pressure) and test strip surface temperature distribution to describe the overall disturbance of the current detection environment.
[0154] True depth distribution of liquid D vis The true depth distribution of the liquid diffusion region is obtained by calculating the depth network through multi-reference segmentation.
[0155] Scene category L: The scene category of the test strip carrier substrate identified by the multi-feature fusion network (such as laboratory table, field ground, vehicle bracket).
[0156] Drift correction factor k drift The correction coefficient, calculated using the ultrasonic drift correction model, is used to correct concentration deviations caused by instrument drift.
[0157] The above quadruple (F) eb D vis L, k drift The data is written to the instance library. The instance library is a database that stores multiple detection data sets for subsequent model optimization.
[0158] The system continuously accumulates detected instances during operation. When the number of instances in the instance library reaches a preset threshold N, a joint fine-tuning process is triggered.
[0159] The Bayesian method is used to jointly fine-tune the quadruples. The Bayesian method dynamically adjusts model parameters through statistical analysis and probabilistic models to optimize model performance. The specific steps are as follows:
[0160] Data preprocessing: Extract accumulated quadruple data from the instance library.
[0161] Model update: The parameters of the self-supervised mask transfer attention network, multi-reference segmentation depth network, multi-feature fusion network, and ultrasonic drift correction model are updated using Bayesian methods.
[0162] Performance evaluation: The performance of the updated model is evaluated through methods such as cross-validation to ensure the accuracy and stability of the model under different environments and scenarios.
[0163] Through Bayesian joint fine-tuning, the system can automatically adjust model parameters based on accumulated instance data, ensuring long-term stable operation. This continuous optimization mechanism enables the system to adapt to detection needs under different environmental conditions, improving the accuracy and reliability of detection results.
[0164] By writing the environment-matrix joint perturbation vector, the true depth distribution of the liquid, the scene category, and the drift correction coefficient as a quadruple into the instance library, and then fine-tuning the quadruple using a Bayesian approach after accumulating a certain number of instances, this embodiment achieves continuous optimization of the detection model. This method not only improves the accuracy of the detection results but also ensures the stability and adaptability of the system during long-term operation. Through dynamic adjustment using the Bayesian method, the system can better cope with the detection needs under different environments and scenes, providing a high-precision and high-reliability solution for test strip detection.
[0165] Specifically, the purpose of fine-tuning is to improve the accuracy and adaptability of the detection system by continuously optimizing model parameters, ensuring long-term stable operation of the system under different environments and scenarios. In particular, fine-tuning can achieve the following key objectives:
[0166] By fine-tuning on accumulated instance data, the model can learn more diverse data features, thereby improving its performance on unseen data. This helps reduce overfitting in new environments or scenarios and enhances the model's generalization ability.
[0167] Changes in the testing environment (such as temperature, humidity, light, and air pressure) can affect the accuracy of test results. Fine-tuning allows for dynamic adjustment of model parameters to better adapt to these environmental changes, thereby improving the reliability of test results.
[0168] Different substrate environments (such as laboratory benches, outdoor ground, vehicle mounts, etc.) have varying effects on test strip detection. Through fine-tuning, the model can adjust calibration parameters according to different scenario categories, thereby improving scenario-specific detection accuracy.
[0169] Testing instruments that have been in operation for a long time may experience drift, affecting the accuracy of test results. Fine-tuning can utilize accumulated drift correction coefficient data to dynamically adjust model parameters, correct instrument drift, and ensure the stability of test results.
[0170] By jointly fine-tuning multiple key parameters (such as the environment-matrix joint perturbation vector, the true depth distribution of the liquid, the scene category, and the drift correction coefficient), the system can more comprehensively consider various error factors, thereby improving the overall detection accuracy.
[0171] The system continuously accumulates detection instances during operation, including the environment-matrix joint perturbation vector, the true depth distribution of the liquid, scene category, and drift correction coefficient.
[0172] Data preprocessing: Extract the accumulated quadruple data from the instance library and perform necessary preprocessing, such as data cleaning and normalization, to ensure data quality.
[0173] Bayesian methods: Bayesian methods dynamically adjust model parameters through statistical analysis and probabilistic models. Specifically, Bayesian methods use accumulated data to calculate the posterior distribution of parameters, thereby updating the model parameters.
[0174] Joint fine-tuning: The parameters of the self-supervised mask-transfer attention network, the multi-reference segmentation depth network, the multi-feature fusion network, and the ultrasonic drift correction model are jointly fine-tuned. This includes:
[0175] The generation model of the environment-matrix joint perturbation vector is updated to more accurately reflect environmental changes.
[0176] Optimize the calculation model for the true depth distribution of liquids to improve the accuracy of depth estimation.
[0177] Adjust the generation model of the scene compensation matrix to better adapt it to different scenarios.
[0178] Update the calculation model for drift correction coefficients to correct instrument drift.
[0179] The performance of the updated model is evaluated through methods such as cross-validation to ensure the accuracy and stability of the model under different environments and scenarios.
[0180] Use multiple performance metrics (such as mean squared error, accuracy, recall, etc.) to evaluate the model's performance and ensure that the fine-tuned model has significant improvements in all aspects.
[0181] Based on accumulated instance data, the model parameters are dynamically updated to ensure that the system maintains high performance during long-term operation.
[0182] The fine-tuned model parameters are fed back into the detection system, forming a closed-loop optimization mechanism that continuously improves the system's detection accuracy and stability.
[0183] Through Bayesian joint fine-tuning, the system can dynamically adjust model parameters to adapt to detection needs in different environments and scenarios. Fine-tuning not only improves the model's generalization ability but also optimizes scenario-specific corrections and corrects instrument drift, thereby enhancing overall detection accuracy. This continuous optimization mechanism ensures the system's stability and reliability during long-term operation, providing a high-precision, high-reliability solution for test strip detection.
[0184] In step S150, the Bayesian joint fine-tuning mainly adjusts the parameters of the following four models:
[0185] Self-supervised mask-transfer attention network;
[0186] Multi-reference segmentation depth network;
[0187] Multi-feature fusion network;
[0188] Ultrasonic drift correction model;
[0189] The parameter tuning of these models aims to optimize the performance of the entire detection system, ensuring high-precision detection results under different environments and scenarios. The parameter tuning details for each model are explained below:
[0190] Self-supervised mask-transfer attention network: optimizes the generation of environment-matrix joint perturbation vectors to more accurately reflect environment changes and matrix differences.
[0191] Adjusted parameters:
[0192] Mask generation layer: Adjusts the mask generation strategy and parameters to optimize the process of randomly masking node features.
[0193] Feature Reconstruction Layer: Optimizes the self-supervised learning mechanism and adjusts the weights and bias parameters for reconstructing the features of the masked nodes.
[0194] Attention mechanism: Adjust the parameters of the multi-head self-attention mechanism, such as attention weights and the number of heads, to better capture long-distance dependencies between nodes.
[0195] Specific adjustment methods:
[0196] The parameters for mask generation and feature reconstruction are updated using a Bayesian method to ensure that the network can more accurately reconstruct the features of the masked nodes.
[0197] By accumulating instance data, the parameters of the attention mechanism are dynamically adjusted to improve the network's adaptability to environmental changes.
[0198] Multi-reference segmentation depth network: Optimizes the calculation of the true depth distribution of liquids and improves the accuracy of depth estimation.
[0199] Adjusted parameters:
[0200] Feature extraction layer: Adjust parameters in the Transformer architecture, such as the weights and biases of the multi-head self-attention mechanism, to optimize the extraction of global features.
[0201] Reference object segmentation layer: Adjust the parameters of the convolutional neural network to optimize the generation of the reference object segmentation mask.
[0202] Depth estimation layer: Adjusts the parameters in the Transformer architecture to optimize the calculation of the true depth distribution of the liquid diffusion region.
[0203] Depth correction layer: Adjusts the correction parameters of the background reference object's depth information to ensure the accuracy of the depth distribution.
[0204] Specific adjustment methods:
[0205] The parameters of the feature extraction layer and depth estimation layer are updated using a Bayesian method to improve the network's ability to identify and estimate the depth of liquid diffusion regions.
[0206] By accumulating instance data, the parameters of the depth correction layer are dynamically adjusted to reduce the impact of environmental factors and image noise on depth estimation.
[0207] Multi-feature fusion network: Optimizes the generation of scene compensation matrix and improves scene-specific concentration correction accuracy.
[0208] Adjusted parameters:
[0209] Feature extraction layer: Adjust the parameters in the convolutional layer and Transformer architecture to optimize the extraction of shallow and deep features.
[0210] Feature fusion layer: Adjusts the parameters of feature fusion, such as weights and biases, to optimize the generation of feature maps.
[0211] Scene recognition layer: Adjust the parameters of the classification layer to optimize the recognition of scene categories.
[0212] Compensation Matrix Generation Layer: Adjusts the generation parameters of the scene compensation matrix to ensure that the compensation matrix can more accurately reflect scene differences.
[0213] Specific adjustment methods:
[0214] The parameters of the feature extraction layer and the feature fusion layer are updated using the Bayesian method to improve the network's ability to recognize features in different scenarios.
[0215] By accumulating instance data, the parameters of the compensation matrix generation layer are dynamically adjusted to optimize scene-specific concentration correction.
[0216] Ultrasonic drift correction model: Optimizes the calculation of drift correction coefficients, corrects instrument drift, and ensures the stability of test results.
[0217] Adjusted parameters:
[0218] Coupling index calculation layer: Adjusts the parameters for calculating the coupling index, such as the weights and biases of the environmental correction factor.
[0219] Drift detection layer: Adjust the setting of the coupling index threshold to optimize the accuracy of drift detection.
[0220] Drift correction coefficient calculation layer: Adjusts the parameters for calculating drift correction coefficients, such as the weights and biases of the calibration model.
[0221] Specific adjustment methods:
[0222] The parameters of the coupling index calculation layer and the drift correction coefficient calculation layer are updated using a Bayesian method to improve the network's ability to detect and correct instrument drift.
[0223] By accumulating instance data, the threshold setting of the drift detection layer is dynamically adjusted to ensure accurate detection of instrument drift under different environmental conditions.
[0224] Through Bayesian joint fine-tuning, the system can dynamically adjust the parameters of the self-supervised mask-transfer attention network, the multi-reference segmentation depth network, the multi-feature fusion network, and the ultrasonic drift correction model. These adjustments not only improve the model's generalization ability but also optimize scene-specific corrections and correct instrument drift, thereby enhancing overall detection accuracy. This continuous optimization mechanism ensures the system's stability and reliability during long-term operation, providing a high-precision and high-reliability solution for test strip detection.
[0225] For example: Suppose a test strip system for detecting blood glucose levels is being developed. This system needs to accurately measure blood glucose concentration under different environmental conditions (such as a hospital laboratory, home environment, outdoors, etc.). To improve detection accuracy, the following steps are adopted:
[0226] Acquire test strip microenvironment data and microscopic RGB-D images of the test strip, construct a spatiotemporal graph and reconstruct node features using a self-supervised mask-transfer attention network to obtain the environment-matrix joint perturbation vector;
[0227] Inside the test strip reading chamber, the following data are simultaneously collected: data from a miniature spectral sensor (temperature, humidity, light intensity, and air pressure); infrared array data from the test strip surface (temperature distribution on the test strip surface); and a microscopic RGB-D image (test strip fibers and liquid diffusion profile). For example, in a home environment, the temperature and humidity sensor measures a temperature of 25°C, humidity of 60%, light intensity of 500 lux, and air pressure of 101.3 kPa. Simultaneously, the infrared array measures the temperature distribution on the test strip surface, and the microscopic RGB-D image captures details of the test strip fibers and liquid diffusion.
[0228] Each pixel on the test strip surface is defined as a node, and a spatiotemporal map of the test strip's microenvironment is constructed based on the spatial adjacency and temporal continuity of pixels. For example, each node contains the data collected above, forming a graph structure that includes both temporal and spatial information.
[0229] By randomly masking some node features, a self-supervised mask-passing attention network is used to reconstruct the features of the masked nodes using information from surrounding nodes, generating an environment-matrix joint perturbation vector Feb. Assuming 20% of the nodes are masked, the network learns the relationships between these nodes and their surroundings, reconstructing their features and ultimately outputting the joint perturbation vector F. eb .
[0230] The microscopic RGB-D image is input into the modified multi-reference segmentation depth network to calculate the true depth distribution of the liquid. The environment-matrix joint perturbation vector is used as a parameter and mapped to an initial concentration value for comprehensive correction of environmental factors and liquid diffusion characteristics. The microscopic RGB-D image is preprocessed, including denoising, normalization, and resizing. For example, random noise in the image is removed using a filtering algorithm, pixel values are normalized to the range of 0 to 1, and the image size is adjusted to fit the network input. The preprocessed image is then input into the modified multi-reference segmentation depth network. The network selects the scale lines and fiber intersections on the test strip as background references to segment the image, identify the liquid diffusion region, and calculate the true depth distribution D of each region. vis For example, the network identified the depth distribution of the liquid diffusion region as ranging from 0.5 mm to 1.2 mm. The environment-matrix joint perturbation vector F... eb As a parameter, it is incorporated into the diffusion model, representing the true depth distribution D. vis Mapped to initial concentration value C vis Assuming the diffusion model takes environmental factors into account, the initial concentration value calculated is 5.8 mmol / L.
[0231] A multi-feature fusion network is used to identify the substrate scene of the test strip, outputting a scene compensation matrix and correcting the initial concentration value. The scene category is then written back into the spatiotemporal graph: the multi-feature fusion network identifies the substrate scene in which the test strip is located. For example, if the network identifies the test strip as being in a home environment, the output scene category L is "home environment". The network outputs a scene compensation matrix W corresponding to "home environment". scene Assume the matrix is a 2x2 matrix containing the correction factor. Use the scene compensation matrix W. scene Initial value of correction concentration C vis For example, the corrected concentration value C scene It was 6.0 mmol / L.
[0232] The scenario category L is written back into the spatiotemporal graph, and the matrix node attributes are dynamically updated. For example, the updated spatiotemporal graph reflects that the test strip is in a home environment, and the matrix node attributes include environmental conditions and matrix type.
[0233] MEMS ultrasonic transducers are placed on both sides of the test strip membrane to measure the ultrasonic propagation time at the liquid front, calculate the coupling index and trigger the drift correction coefficient, and calculate the final concentration. MEMS ultrasonic transducers are also placed on both sides of the test strip membrane to measure the forward and reverse ultrasonic propagation time T at the liquid front in real time. f and T r For example, measuring T f For 100 μs, T r The value is 102 μs. Calculate the diffusion-ultrasound coupling index κ. Assume an environmental correction factor α (F ebThe coefficient is 1.02, and the calculated coupling index is 0.01. When the coupling index exceeds the threshold (assuming the threshold is 0.015), the drift correction coefficient k is calculated. drift For example, the calculated drift correction factor is 0.98. Using the drift correction factor k... drift The corrected concentration value C scene The final concentration C was obtained. final For example, the final concentration was 5.9 mmol / L.
[0234] The environment-matrix joint perturbation vector, the true depth distribution of the liquid, the scene category, and the drift correction coefficient are written into the instance library as a quadruple. After accumulating a certain number of instances, the quadruple is jointly fine-tuned using a Bayesian method. When the instance library reaches a certain number (e.g., 100 instances), the above quadruple is further fine-tuned using a Bayesian method. For example, through Bayesian updates, the parameters of the self-supervised mask-transfer attention network, the multi-reference segmentation depth network, the multi-feature fusion network, and the ultrasonic drift correction model are adjusted to optimize model performance.
[0235] The aforementioned method for error correction and accuracy improvement of test strip detection results involves acquiring test strip microenvironment data and microscopic RGB-D images, constructing a spatiotemporal graph, and reconstructing node features using a self-supervised mask-transfer attention network to obtain the environment-matrix joint perturbation vector. Next, the microscopic RGB-D image is input into a modified multi-reference segmentation depth network to calculate the true liquid depth distribution. The environment-matrix joint perturbation vector is then incorporated as a parameter into the diffusion model, mapped to an initial concentration value, achieving comprehensive correction of environmental factors and liquid diffusion characteristics. Then, a multi-feature fusion network is used to identify the substrate scene supporting the test strip, outputting a scene compensation matrix and correcting the initial concentration value, while simultaneously writing the scene category back into the spatiotemporal graph. Furthermore, MEMS ultrasonic transducers are placed on both sides of the test strip membrane to measure the ultrasonic propagation time at the liquid front, calculate the coupling index, trigger the drift correction coefficient, and calculate the final concentration. Finally, the environment-matrix joint perturbation vector, the true liquid depth distribution, the scene category, and the drift correction coefficient are written as a quadruple into an instance library. After accumulating several instances, the quadruple is jointly fine-tuned using a Bayesian approach. This series of steps not only comprehensively considers various factors such as environmental changes, differences in test strip matrix, liquid diffusion characteristics, and instrument drift, thus improving the accuracy and reliability of test strip detection, but also ensures the long-term stable operation of the system through a continuous optimization mechanism.
[0236] Figure 2 This is a schematic block diagram of a test strip detection result error correction and accuracy improvement system 300 provided in an embodiment of the present invention. Figure 2As shown, corresponding to the above-described method for correcting and improving the accuracy of test strip detection results, the present invention also provides a system 300 for correcting and improving the accuracy of test strip detection results. This system 300 includes a unit for executing the above-described method for correcting and improving the accuracy of test strip detection results, and can be configured in a server. Specifically, please refer to... Figure 2 The test strip detection result error correction and accuracy improvement system 300 includes a vector determination unit 301, a comprehensive correction unit 302, a compensation unit 303, a drift correction unit 304, and a fine-tuning unit 305.
[0237] Vector determination unit 301 is used to acquire microenvironmental data of the test strip and a microscopic RGB-D image of the test strip, construct a spatiotemporal map, and reconstruct node features using a self-supervised mask-transfer attention network to obtain the environment-matrix joint perturbation vector; comprehensive correction unit 302 is used to input the microscopic RGB-D image into the modified multi-reference segmentation depth network, calculate the true depth distribution of the liquid, and map the environment-matrix joint perturbation vector as a parameter to an initial concentration value for comprehensive correction of environmental factors and liquid diffusion characteristics; compensation unit 303 is used to employ multiple features The fusion network identifies the substrate scene of the test strip, outputs a scene compensation matrix, corrects the initial concentration value, and writes the scene category back into the spatiotemporal graph; the drift correction unit 304 is used to arrange MEMS ultrasonic transducers on both sides of the test strip membrane to measure the ultrasonic propagation time of the liquid front, calculate the coupling index and trigger the drift correction coefficient, and calculate the final concentration; the fine-tuning unit 305 is used to write the environment-substrate joint perturbation vector, the true depth distribution of the liquid, the scene category, and the drift correction coefficient as a quadruple into the instance library, and fine-tunes the quadruple in a Bayesian manner for every accumulated number of instances.
[0238] In one embodiment, the vector determination unit 301 is configured to:
[0239] Inside the test strip reading chamber, data from a miniature spectral sensor, infrared array data from the test strip surface, and microscopic RGB-D images are simultaneously acquired. The test strip microenvironment data includes data from the miniature spectral sensor and the infrared array data from the test strip surface. The miniature spectral sensor data includes temperature, humidity, light intensity, and air pressure. The infrared array data from the test strip surface refers to the temperature distribution on the test strip surface. The microscopic RGB-D images include test strip fibers and liquid diffusion profiles. Each pixel on the test strip surface is defined as a node. A spatiotemporal map of the test strip microenvironment is constructed based on the spatial adjacency and temporal continuity of pixels to obtain the spatiotemporal map. Node features are randomly masked, and a self-supervised mask-transfer attention network is used to reconstruct the masked node features using information from surrounding nodes, generating an environment-matrix joint perturbation vector.
[0240] In one embodiment, the integrated correction unit 302 is used for:
[0241] The microscopic RGB-D image is preprocessed, including denoising, normalization, and resizing, to obtain a preprocessed result. This preprocessed result is then input into a modified multi-reference segmentation depth network. The scale lines and fiber intersections on the test strip are selected as background references to segment the preprocessed result, identify the liquid diffusion region, calculate the true depth distribution of each region, and perform corrections. The environment-matrix joint perturbation vector is used as a parameter and incorporated into the diffusion model to map the true depth distribution to an initial concentration value. The mapping process adjusts for concentration deviations caused by environmental changes.
[0242] In one embodiment, the integrated correction unit 302 is further configured to: input the preprocessing result into the modified multi-reference segmentation depth network, select the scale lines and fiber intersections on the test paper as background references to calculate the relative depth of liquid diffusion, segment the preprocessing result, identify the liquid diffusion area, calculate the true depth distribution of each area, and use the depth information of the background references to correct the depth of the liquid diffusion area.
[0243] In one embodiment, the integrated correction unit 302 is further configured to use each component of the environment-matrix joint perturbation vector as a correction factor for the diffusion coefficient in the diffusion model to obtain a corrected diffusion model; and to use the corrected diffusion model to map the true depth distribution to an initial concentration value.
[0244] In one embodiment, the compensation unit 303 is used to identify the substrate scene of the test strip using a multi-feature fusion network, outputting a scene category and a scene compensation matrix. The substrate scene includes an experimental table, an outdoor ground, and a vehicle-mounted bracket. The initial concentration value is corrected using the scene compensation matrix to obtain a compensated concentration value. The scene category is written back into the spatiotemporal graph to dynamically update the substrate node attributes.
[0245] In one embodiment, the drift correction unit 304 is used to arrange MEMS ultrasonic transducers on both sides of the test strip membrane to measure the forward and reverse ultrasonic propagation time of the liquid front in real time; calculate the diffusion-ultrasonic coupling index based on the forward and reverse ultrasonic propagation time of the liquid front; when the diffusion-ultrasonic coupling index exceeds a threshold, calculate the drift correction coefficient, and use the drift correction coefficient to correct the compensated concentration value to obtain the final concentration.
[0246] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned test strip detection result error correction and accuracy improvement system 300 and each unit can be referred to the corresponding description in the foregoing method embodiments. For the sake of convenience and brevity, it will not be repeated here.
[0247] The aforementioned test strip detection result error correction and accuracy improvement system 300 can be implemented as a computer program, which can, for example, Figure 3 It runs on the computer device shown.
[0248] Please see Figure 3 , Figure 3 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a server, wherein the server can be a standalone server or a server cluster composed of multiple servers.
[0249] See Figure 3 The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.
[0250] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform a method for correcting errors and improving the accuracy of test paper detection results.
[0251] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.
[0252] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can perform a method for error correction and accuracy improvement of test paper detection results.
[0253] This network interface 505 is used for network communication with other devices. Those skilled in the art will understand that... Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0254] The processor 502 is used to run the computer program 5032 stored in the memory to implement all the steps of the test strip detection result error correction and accuracy improvement method.
[0255] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0256] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0257] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program, wherein when executed by a processor, the computer program causes the processor to perform all the steps of the test strip detection result error correction and accuracy improvement method.
[0258] The storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0259] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0260] In the embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of each unit is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0261] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the system of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0262] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0263] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for error correction and accuracy improvement of test strip detection results, characterized in that, include: Acquire test strip microenvironment data and microscopic RGB-D images of the test strip, construct a spatiotemporal graph and reconstruct node features using a self-supervised mask-transfer attention network to obtain the environment-matrix joint perturbation vector; The microscopic RGB-D image is input into the modified multi-reference segmentation depth network to calculate the true depth distribution of the liquid. The environment-matrix joint perturbation vector is used as a parameter and mapped to the initial concentration value to perform comprehensive correction of environmental factors and liquid diffusion characteristics. A multi-feature fusion network is used to identify the substrate scene of the test strip, output a scene compensation matrix, correct the initial concentration value, and write the scene category back into the spatiotemporal map; MEMS ultrasonic transducers are placed on both sides of the test strip membrane to measure the ultrasonic propagation time at the liquid front, calculate the coupling index and trigger the drift correction coefficient, and calculate the final concentration. The environment-matrix joint perturbation vector, the true depth distribution of the liquid, the scene category, and the drift correction coefficient are written into the instance library as quadruples. After accumulating a number of instances, the quadruples are jointly fine-tuned using a Bayesian approach.
2. The method for error correction and accuracy improvement of test strip detection results according to claim 1, characterized in that, The process involves acquiring microenvironmental data of the test strip and a microscopic RGB-D image of the test strip, constructing a spatiotemporal graph, and reconstructing node features using a self-supervised mask-transfer attention network to obtain a joint environment-matrix perturbation vector, including: Inside the test strip reading chamber, data from a miniature spectral sensor, infrared array data from the test strip surface, and a microscopic RGB-D image are simultaneously acquired. The test strip microenvironment data includes data from the miniature spectral sensor and infrared array data from the test strip surface. The miniature spectral sensor data includes temperature, humidity, light intensity, and air pressure. The infrared array data from the test strip surface refers to the temperature distribution on the test strip surface. The microscopic RGB-D image includes test strip fibers and liquid diffusion profiles. Each pixel on the surface of the test strip is defined as a node. A spatiotemporal map of the test strip microenvironment is constructed based on the spatial adjacency and temporal continuity of the pixels to obtain the spatiotemporal map. The node features of the randomly masked parts are reconstructed using a self-supervised mask-passing attention network by using information from surrounding nodes, generating an environment-matrix joint perturbation vector.
3. The method for error correction and accuracy improvement of test strip detection results according to claim 2, characterized in that, The process involves inputting the microscopic RGB-D image into a modified multi-reference segmentation depth network to calculate the true depth distribution of the liquid. The environment-matrix joint perturbation vector is used as a parameter and mapped to an initial concentration value for comprehensive correction of environmental factors and liquid diffusion characteristics. This includes: The microscopic RGB-D image is preprocessed, including denoising, normalization, and resizing, to obtain the preprocessed result; The preprocessing results are input into the modified multi-reference segmentation depth network to select the scale lines and fiber intersections on the test strip as background references, segment the preprocessing results, identify the liquid diffusion area, calculate the true depth distribution of each area, and perform correction. The environment-matrix joint perturbation vector is incorporated into the diffusion model as a parameter, mapping the true depth distribution to the initial concentration value. The mapping process has adjusted for concentration deviations caused by environmental changes.
4. The method for error correction and accuracy improvement of test strip detection results according to claim 3, characterized in that, The diffusion model describes the diffusion process of liquid in test paper fibers using physical principles, and introduces an environmental factor correction term to ensure the accuracy of the model under different environmental conditions. The diffusion model considers the diffusion characteristics of liquid in test paper fibers, including diffusion rate and morphology.
5. The method for error correction and accuracy improvement of test strip detection results according to claim 3, characterized in that, The modified multi-reference object segmentation deep network includes an input layer, a feature extraction layer, a reference object segmentation layer, a depth estimation layer, a depth correction layer, and an output layer. The input layer receives the preprocessing results. The feature extraction layer adopts the Transformer architecture and extracts global features of the preprocessed results through a multi-head self-attention mechanism to capture long-distance dependencies and form a feature image; The reference object segmentation layer uses a convolutional neural network to process the feature map and outputs a segmentation mask for the reference object; The depth estimation layer is based on the Transformer architecture and combines a reference object segmentation mask to calculate the true depth distribution of the liquid diffusion region to form the depth estimation result; The depth correction layer uses the depth information of the background reference to correct the depth of the liquid diffusion area, ensuring the accuracy of the depth distribution; The output layer outputs the true depth distribution of the corrected liquid diffusion region.
6. The method for error correction and accuracy improvement of test strip detection results according to claim 3, characterized in that, The preprocessing result is input into the modified multi-reference segmentation depth network, using the scale lines and fiber intersections on the test strip as background references to segment the preprocessing result, identify the liquid diffusion region, calculate the true depth distribution of each region, and perform correction, including: The preprocessing results are input into the modified multi-reference segmentation depth network. The scale lines and fiber intersections on the test paper are selected as background references to calculate the relative depth of liquid diffusion. The preprocessing results are segmented to identify the liquid diffusion area and calculate the true depth distribution of each area. The depth of the liquid diffusion area is corrected using the depth information of the background references.
7. The method for error correction and accuracy improvement of test strip detection results according to claim 3, characterized in that, The step of incorporating the environment-matrix joint perturbation vector as a parameter into the diffusion model to map the true depth distribution to an initial concentration value includes: Each component of the environment-matrix joint perturbation vector is used as a correction factor for the diffusion coefficient in the diffusion model to obtain the corrected diffusion model. The modified diffusion model is used to map the true depth distribution to the initial concentration value.
8. The method for error correction and accuracy improvement of test strip detection results according to claim 1, characterized in that, The process of using a multi-feature fusion network to identify the substrate scene of the test strip, outputting a scene compensation matrix, correcting the initial concentration value, and writing the scene category back into the spatiotemporal graph includes: A multi-feature fusion network is used to identify the substrate scene of the test strip and output the scene category and scene compensation matrix. The substrate scene includes experimental table, field ground and vehicle bracket. The initial concentration value is corrected using the scene compensation matrix to obtain the compensated concentration value; The scene category is written back into the spatiotemporal graph, and the base node attributes are dynamically updated.
9. The method for error correction and accuracy improvement of test strip detection results according to claim 1, characterized in that, The process of arranging MEMS ultrasonic transducers on both sides of the test strip membrane to measure the ultrasonic propagation time at the liquid front, calculating the coupling index and triggering the drift correction coefficient, and calculating the final concentration includes: MEMS ultrasonic transducers are arranged on both sides of the test strip membrane to measure the ultrasonic propagation time of the liquid front in both directions in real time. The diffusion-ultrasound coupling index is calculated based on the forward and reverse ultrasound propagation times at the liquid front. When the diffusion-ultrasound coupling index exceeds a threshold, a drift correction coefficient is calculated, and the compensated concentration value is corrected using the drift correction coefficient to obtain the final concentration.
10. A test strip detection result error correction and accuracy improvement system, characterized in that, include: The vector determination unit is used to acquire the microenvironment data of the test strip and the microscopic RGB-D image of the test strip, construct a spatiotemporal graph, and reconstruct node features using a self-supervised mask-transfer attention network to obtain the joint perturbation vector of the environment and matrix. The integrated correction unit is used to input the microscopic RGB-D image into the modified multi-reference segmentation depth network, calculate the true depth distribution of the liquid, and use the environment-matrix joint perturbation vector as a parameter to map it into an initial concentration value in order to perform integrated correction of environmental factors and liquid diffusion characteristics. The compensation unit is used to identify the substrate scene of the test strip using a multi-feature fusion network, output the scene compensation matrix, correct the initial concentration value, and write the scene category back into the spatiotemporal map. The drift correction unit is used to arrange MEMS ultrasonic transducers on both sides of the test strip membrane to measure the ultrasonic propagation time at the liquid front, calculate the coupling index and trigger the drift correction coefficient to calculate the final concentration. The fine-tuning unit is used to write the environment-matrix joint perturbation vector, the true depth distribution of the liquid, the scene category, and the drift correction coefficient as a quadruple into the instance library, and to fine-tune the quadruple in a Bayesian manner for every accumulated number of instances.