Test strip result analysis method, apparatus, and storage medium
By constructing a machine learning method based on binary classification and linear regression models, the problem of inaccurate detection caused by nonlinear changes in the color of urine test strips was solved, and more accurate urine test strip result analysis was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZYBIO INC
- Filing Date
- 2023-12-15
- Publication Date
- 2026-07-03
Smart Images

Figure CN118314223B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine learning technology, and more particularly to a method, device and storage medium for analyzing test strip results. Background Technology
[0002] Urine dry chemistry analysis is an analytical method that uses urine test strips to detect the concentration of various substances in urine. This method determines the concentration gradient of various substances in urine based on the reaction color of the urine test strip with a urine sample.
[0003] Currently, in test strip analysis, the qualitative assessment of test results is typically based on the difference between the reaction color of the urine test strip and a standard color. For example, Chinese patent CN201810371404 compares the test strip color value with a preset standard color value, calculates a weighted sum of multiple color difference values to obtain multiple comprehensive color differences, and determines the concentration represented by the preset standard color corresponding to the smallest comprehensive color difference value as the test result. Chinese patent CN106468661 normalizes the urine reaction test strip color and performs correlation analysis with the reaction color of a quality control test strip to determine the concentration corresponding to the test result.
[0004] During urine dry chemistry analysis, certain substances in urine may cause non-linear changes in the reaction color of urine test strips across color systems. In addition, in actual clinical testing, there may be cases where the color of the test strip is not in the standard color system. This may lead to errors in the qualitative test strip results based on the difference between the reaction color of the urine test strip and the standard color, thus resulting in inaccurate urine dry analysis. Summary of the Invention
[0005] The main objective of this invention is to provide a method, device, and storage medium for analyzing test strip results, aiming to improve the accuracy of urine dry analysis.
[0006] To achieve the above objectives, the present invention provides a method for analyzing test strip results, which includes the following steps:
[0007] Obtain the color feature values of the reaction color of the test strip to be analyzed, and obtain the target analysis model based on the binary classification model and the linear regression model;
[0008] The color feature value is input into the target analysis model to obtain the target analysis value output by the target analysis model;
[0009] The target concentration gradient corresponding to the test strip to be analyzed is determined based on the target analytical value and the preset threshold.
[0010] The test strip analysis results are determined based on the target concentration gradient.
[0011] Optionally, before the step of obtaining the color characteristic value of the reaction color of the test strip to be analyzed, the method further includes:
[0012] Obtain the detected feature values of the reaction colors of the tested test strips corresponding to each preset concentration gradient, and construct a training dataset based on the multiple detected feature values;
[0013] Obtain an initial analysis model based on a binary classification model and a linear regression model;
[0014] The training dataset is input into the binary classifier of the initial analysis model to extract features and obtain feature vectors;
[0015] The feature vector is input into the linear regressor of the initial analysis model to obtain the initial analysis values output by the linear regressor.
[0016] Based on the initial analysis values and preset thresholds, determine the test concentration gradient corresponding to each of the detected feature values in the training dataset;
[0017] Based on the loss function, the target analysis model is obtained by adjusting the model parameters of the initial analysis model according to the preset concentration gradient corresponding to each of the detected feature values and the test concentration gradient corresponding to each of the detected feature values.
[0018] Optionally, the binary classifier includes multiple binary classification models;
[0019] The step of inputting the training dataset into the binary classifier of the initial analysis model to extract features and obtain feature vectors includes:
[0020] The training dataset is input into each binary classifier in the initial analysis model to obtain the first class probability and the second class probability output by each binary classifier.
[0021] Feature vectors are constructed based on each of the first type of probabilities.
[0022] Optionally, the step of inputting the training dataset into each binary classifier in the initial analysis model to obtain the first class probability and the second class probability output by each binary classifier includes:
[0023] Based on the preset concentration gradient corresponding to each of the detected feature values in the training dataset, the training dataset is input into the first class model and the second class model of each of the binary classification models.
[0024] Each of the binary classification models outputs a first-class probability through its first-class model and a second-class probability through its second-class model.
[0025] Optionally, the step of inputting the training dataset into the first and second class models of each of the binary classification models according to the preset concentration gradient corresponding to each of the detected feature values in the training dataset includes:
[0026] For any target binary classification model among the various binary classification models, the training dataset is divided into a first-class feature set and a second-class feature set according to the preset concentration gradient corresponding to each of the detected feature values in the training dataset and the first-class model and the second-class model of the target binary classification model.
[0027] The first type of feature set is input into the first type of the target binary classification model, and the second type of feature set is input into the second type of the target binary classification model.
[0028] Optionally, before the steps of inputting the first type of feature set into the first class model of the target binary classification model and inputting the second type of feature set into the second class model of the target binary classification model, the method further includes:
[0029] By randomly copying the detected feature values in the first feature set, the number of detected feature values in the first feature set is expanded to be the same as the number of detected feature values in the second feature set;
[0030] The step of inputting the first type of feature set into the first type of model of the target binary classification model includes:
[0031] The expanded first-class feature set is input into the first-class model of the target binary classification model.
[0032] Optionally, the step of obtaining the color characteristic value of the reaction color of the test strip to be analyzed includes:
[0033] Obtain the R (red), G (green), and B (blue) values of the reaction colors of the test strip to be analyzed;
[0034] The RGB values are converted according to preset rules to obtain the color feature values of the reaction color of the test paper to be analyzed.
[0035] Optionally, the color feature values include: R / G value, G / R value, R / B value, B / R value, G / B value, B / G value, R / (R+G+B) value, R / (R+G+B) value, R / (R+G+B) value, L* value (the value of the brightness of the color), a* value (red-green value), and b* value (yellow-blue value).
[0036] Furthermore, to achieve the above objectives, the present invention also provides a test strip result analysis device, which includes:
[0037] The acquisition module is used to acquire the color feature values of the reaction color of the test strip to be analyzed, and to acquire the target analysis model based on the binary classification model and the linear regression model;
[0038] The analysis module is used to input the color feature values into the target analysis model to obtain the target analysis values output by the target analysis model;
[0039] The determination module is used to determine the target concentration gradient corresponding to the test strip to be analyzed based on the target analysis value and the preset threshold.
[0040] The determining module is further configured to determine the test strip analysis result of the test strip to be analyzed based on the target concentration gradient.
[0041] In addition, to achieve the above objectives, the present invention also provides a test strip result analysis device, which includes a memory, a processor, and a test strip result analysis program stored in the memory and executable on the processor. When the test strip result analysis program is executed by the processor, it implements the steps of the above-described test strip result analysis method.
[0042] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a test strip result analysis program, which, when executed by a processor, implements the steps of the test strip result analysis method described above.
[0043] In this invention, the color feature value of the reaction color of the test strip to be analyzed is obtained, and a target analysis model based on a binary classification model and a linear regression model is obtained. The color feature value is input into the target analysis model to obtain the target analysis value output by the target analysis model. The target concentration gradient corresponding to the test strip to be analyzed is determined according to the target analysis value and a preset threshold. The test strip analysis result of the test strip to be analyzed is determined according to the target concentration gradient.
[0044] In this invention, the results of urine test strip analysis are performed based on machine learning. Compared with the qualitative test strip detection results based on the difference between the reaction color of the urine test strip and the standard color, this invention can more accurately divide the concentration gradient of each substance in the urine based on the reaction color of the urine test strip, thereby making the detection results determined based on the concentration gradient more accurate and improving the accuracy of urine test strip result analysis, thus improving the accuracy of urine dry analysis. Attached Figure Description
[0045] Figure 1 This is a flowchart illustrating the first embodiment of the test strip result analysis method of the present invention;
[0046] Figure 2 This is a schematic flowchart illustrating an embodiment of the test strip result analysis method of the present invention;
[0047] Figure 3 This is a schematic diagram of the functional modules of the test strip result analysis device involved in the embodiment of the present invention;
[0048] Figure 4 This is a schematic diagram of the test strip result analysis device involved in the embodiment of the present invention;
[0049] Figure 5 This is a schematic diagram of the structure of a computer-readable storage medium involved in an embodiment of the present invention.
[0050] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0051] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0052] This invention provides a method for analyzing test strip results, referring to... Figure 1 As shown, Figure 1 This is a flowchart illustrating the first embodiment of the test strip result analysis method of the present invention.
[0053] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application.
[0054] In this embodiment, the device executing the test strip result analysis method of the present invention can be a urine test strip analysis device, or a mobile phone, PC (Personal Computer), tablet computer, portable computer, etc. For ease of description, the executing entity is omitted below. The test strip result analysis method of this embodiment includes:
[0055] Step S10: Obtain the color feature value of the reaction color of the test strip to be analyzed, and obtain the target analysis model based on the binary classification model and the linear regression model;
[0056] In this embodiment, a urine test strip containing the urine sample to be tested is used as the test strip to be analyzed, and the color characteristic value of the reaction color of the test strip to be analyzed is obtained.
[0057] In a specific implementation, the color feature value can be the RGB value of the color, the L*a*b* value of the color, or a value obtained by processing the RGB value or L*a*b* value of the color, such as R / G, G / R, etc., and there is no specific limitation here.
[0058] In this embodiment, a trained model based on a binary classification model and a linear regression model is obtained. For ease of description, this model will be referred to as the target analysis model. In this embodiment, the test strip to be analyzed is analyzed based on the target analysis model.
[0059] Step S20: Input the color feature value into the target analysis model to obtain the target analysis value output by the target analysis model;
[0060] In this embodiment, the color feature value of the reaction color of the test strip to be analyzed is obtained, and the target analysis model based on the binary classification model and the linear regression model is obtained. The color feature value is input into the target analysis model to obtain the analysis value output by the target analysis model (hereinafter referred to as the target analysis value for distinction). The test strip to be analyzed is then analyzed based on the target analysis model.
[0061] In a specific implementation, the process of inputting color feature values into the target analysis model to obtain the target analysis value output by the target analysis model can be as follows: inputting color feature values into the target analysis model, extracting features based on a binary classification model to obtain a feature vector, and inputting the feature vector into a linear regression model to obtain the analysis value. Further, in a specific implementation, after determining the target analysis value, the concentration gradient of the test strip to be analyzed can be determined based on the target analysis value, thereby determining the detection result of the urine sample.
[0062] Step S30: Determine the target concentration gradient corresponding to the test strip to be analyzed based on the target analysis value and the preset threshold;
[0063] In this embodiment, the value ranges corresponding to different concentration gradients can be preset. The maximum and minimum values of each concentration gradient range are referred to as preset thresholds. These preset thresholds can be set according to actual needs and are not limited here. In a specific implementation, the concentration gradients can be divided according to the types and concentrations of substances in the urine. For example, the first to third gradients can be different concentrations of glucose, and the fourth to fifth gradients can be different concentrations of protein. The specific gradients can be set according to actual needs and are not limited here.
[0064] Specifically, in this embodiment, after inputting the color feature value into the target analysis model and obtaining the target analysis value output by the target analysis model, the concentration gradient corresponding to the test strip to be analyzed (hereinafter referred to as the target concentration gradient for distinction) is determined according to the target analysis value and the preset threshold.
[0065] In a specific implementation, the process of determining the target concentration gradient corresponding to the test strip to be analyzed based on the target analytical value and the preset threshold can be as follows: compare the target analytical value with the preset threshold, iterate through each preset threshold, determine the value range corresponding to the target analytical value, and the concentration gradient corresponding to this value range is the target concentration gradient. For example, in one implementation, the target analytical value is 1.2, and the preset thresholds include 1 and 1.5. In this implementation, the target analytical value is determined to be in the range of 1-1.5, and the target concentration gradient is the concentration gradient corresponding to 1-1.5.
[0066] Step S40: Determine the test strip analysis result of the test strip to be analyzed based on the target concentration gradient.
[0067] In this embodiment, after determining the target concentration gradient corresponding to the test strip to be analyzed based on the target analysis value and the preset threshold, the test strip analysis result of the test strip to be analyzed is determined based on the target concentration gradient.
[0068] In a specific implementation, the different concentration gradients of the test strip correspond to the different contents of various substances in the urine sample. Therefore, the test strip analysis result can be determined based on the target concentration gradient of the test strip. For example, the normal urine glucose concentration is 0.1-0.8 mmol / L. In one implementation, the first gradient of the concentration gradient of the test strip is a glucose content of 0.8-1.0 mmol / L. In this case, the first gradient indicates that the urine glucose in the urine sample is positive. In this implementation, if the target concentration gradient of the test strip is determined to be the first gradient based on the target analysis model, then the urine glucose in the test strip analysis result can be determined to be positive.
[0069] Furthermore, in some feasible embodiments, step S10 above: obtaining the color characteristic value of the reaction color of the test strip to be analyzed may include:
[0070] Step S101: Obtain the RGB values of the reaction color of the test strip to be analyzed;
[0071] In this embodiment, the color feature value can be obtained by converting the RGB values of the reaction color. Specifically, in this embodiment, the RGB values of the reaction color of the test strip to be analyzed are obtained.
[0072] In a specific implementation, the RGB values of the reaction color can be collected by a color sensor. There are no restrictions on this, and the settings can be adjusted according to actual needs.
[0073] Step S102: Convert the RGB values according to preset rules to obtain the color feature values of the reaction color of the test paper to be analyzed.
[0074] In this embodiment, after obtaining the RGB values of the reaction color of the test strip to be analyzed, the RGB values are converted according to a preset rule to obtain the color feature values of the reaction color of the test strip to be analyzed.
[0075] In a specific implementation, the preset rules may include one or more processing rules for RGB values, which can be set according to actual needs and are not limited here. For example, in one implementation, the preset rules may include multiple processing rules, which may include: converting RGB values to L*a*b* values, calculating R / G values based on RGB values, calculating G / R values based on RGB values, calculating R / B values based on RGB values, calculating B / R values based on RGB values, calculating G / B values based on RGB values, calculating B / G values based on RGB values, calculating R / (R+G+B) values based on RGB values, calculating R / (R+G+B) values based on RGB values, and calculating R / (R+G+B) values based on RGB values.
[0076] It should be noted that in this embodiment, the color feature value is obtained by processing the RGB values of the reaction color of the test strip to be analyzed. Based on the color feature value and the target analysis model, the target concentration gradient of the test strip to be analyzed is determined. Compared with directly using the RGB values of the reaction color for analysis, this embodiment can expand the sample size of the test strip to be analyzed, making the determined analysis values more accurate, thereby making the urine test strip analysis results more accurate and improving the accuracy of urine dry analysis.
[0077] Furthermore, in some feasible embodiments, the color feature values include: R / G value, G / R value, R / B value, B / R value, G / B value, B / G value, R / (R+G+B) value, R / (R+G+B) value, R / (R+G+B) value, L* value, a* value, and b* value. The specific calculation method for converting RGB values to color feature values is not detailed here. This embodiment includes multiple color feature values, which can expand the sample size of the test strip to be analyzed, making the determined analytical values more accurate, thereby making the urine test strip analysis results more accurate and improving the accuracy of urine dry analysis.
[0078] In this embodiment, the color feature value of the reaction color of the test strip to be analyzed is obtained, and the target analysis model based on the binary classification model and the linear regression model is obtained. The color feature value is input into the target analysis model to obtain the target analysis value output by the target analysis model. The target concentration gradient corresponding to the test strip to be analyzed is determined according to the target analysis value and the preset threshold. The test strip analysis result of the test strip to be analyzed is determined according to the target concentration gradient.
[0079] In this embodiment, the urine test strip results are analyzed based on machine learning. Compared with the qualitative test strip detection results based on the difference between the reaction color of the urine test strip and the standard color, this embodiment can more accurately divide the concentration gradient of each substance in the urine based on the reaction color of the urine test strip, thereby making the detection results determined based on the concentration gradient more accurate and improving the accuracy of urine test strip result analysis, thus improving the accuracy of urine dry analysis.
[0080] Furthermore, based on the first embodiment described above, a second embodiment of the test strip result analysis method of the present invention is proposed. In this embodiment, before step S10 described above, the test strip result analysis method further includes:
[0081] Step S50: Obtain the detected feature values of the reaction colors of the tested test strips corresponding to each preset concentration gradient, and construct a training dataset based on the multiple detected feature values;
[0082] In this embodiment, the analysis model that has not been trained is referred to as the initial analysis model. In this embodiment, the initial analysis model is trained to obtain the target analysis model.
[0083] Specifically, in this embodiment, multiple concentration gradients are preset (hereinafter referred to as preset concentration gradients for distinction). In specific implementations, the preset concentration gradients can be divided according to the types and contents of substances in urine. The specific settings can be made according to actual needs and are not limited here.
[0084] Specifically, in this embodiment, the feature values of the reaction colors of the test strips corresponding to each preset concentration gradient are obtained (hereinafter referred to as detected feature values for distinction), and a training dataset is constructed based on multiple detected feature values to train the initial analysis model.
[0085] In a specific implementation, the detected feature value can be the RGB value of the reaction color, the L*a*b* value of the reaction color, or a value obtained by processing the RGB value or L*a*b* value of the reaction color, such as R / G, G / R, etc. There are no specific limitations here. For example, in one implementation, the detected feature value can be obtained by converting the RGB value of the reaction color according to a preset rule. For details, please refer to the first embodiment, which will not be elaborated here.
[0086] Step S60: Obtain the initial analysis model based on the binary classification model and the linear regression model;
[0087] In this embodiment, the initial analysis model is trained to obtain the target analysis model. Specifically, in this embodiment, the initial analysis model is obtained, which is constructed based on a binary classification model and a linear regression model.
[0088] In specific implementations, the algorithm for constructing the binary classifier can be a neural network, support vector machine, or Bayesian classifier, etc. The algorithm for constructing the linear regression model can be a neural network or support vector regression machine, etc. There are no specific limitations here; the algorithm can be set according to actual needs.
[0089] Step S70: Input the training dataset into the binary classifier of the initial analysis model to extract features and obtain feature vectors;
[0090] In this embodiment, after obtaining the detected feature values of the reaction colors of the test strips corresponding to each preset concentration gradient, constructing a training dataset based on multiple detected feature values, and obtaining an initial analysis model based on a binary classification model and a linear regression model, the initial analysis model is trained using the training dataset.
[0091] Specifically, in this embodiment, the training dataset is input into the binary classifier of the initial analysis model to extract features and obtain feature vectors.
[0092] In a specific implementation, the binary classifier includes multiple binary classification models. The specific process of inputting the training dataset into the binary classifier of the initial analysis model to extract features and obtain feature vectors can be as follows: input the training dataset into each binary classification model of the binary classifier in the initial analysis model, obtain the first-class probability and the second-class probability output by each binary classification model, and construct feature vectors based on each first-class probability. The specific details are not limited here and can be set according to actual needs.
[0093] Step S80: Input the feature vector into the linear regressor of the initial analysis model to obtain the initial analysis values output by the linear regressor;
[0094] In this embodiment, after the training dataset is input into the binary classifier of the initial analysis model to extract features and obtain feature vectors, the feature vectors are input into the linear regressor of the initial analysis model to obtain the analysis values output by the linear regressor (hereinafter referred to as the initial analysis values for distinction).
[0095] Step S90: Determine the test concentration gradient corresponding to each of the detected feature values in the training dataset based on the initial analysis values and the preset threshold;
[0096] In this embodiment, after inputting the feature vector into the linear regressor of the initial analysis model and obtaining the initial analysis values output by the linear regressor, the concentration gradient corresponding to each detected feature value in the training dataset (hereinafter referred to as the test concentration gradient for distinction) is determined based on the initial analysis values and a preset threshold. For details, please refer to the first embodiment, which will not be elaborated here.
[0097] Step A10: Based on the loss function, adjust the model parameters of the initial analysis model according to the preset concentration gradient corresponding to each of the detected feature values and the test concentration gradient corresponding to each of the detected feature values to obtain the target analysis model.
[0098] In this embodiment, after determining the test concentration gradient corresponding to each detected feature value in the training dataset based on the initial analysis values and preset thresholds, the model parameters of the initial analysis model are adjusted according to the preset concentration gradient and the test concentration gradient corresponding to each detected feature value based on the loss function to obtain the target analysis model.
[0099] Furthermore, in some feasible embodiments, the binary classifier includes multiple binary classification models. In this embodiment, step S70 above: inputting the training dataset into the binary classifier of the initial analysis model to extract features and obtain feature vectors, may include:
[0100] Step S701: Input the training dataset into each binary classifier in the initial analysis model to obtain the first class probability and the second class probability output by each binary classifier.
[0101] In this embodiment, the binary classifier includes multiple binary classification models. The number of binary classification models can be determined based on the number of preset concentration gradients. For example, in one embodiment, the number of binary classification models can be one less than the number of preset concentration gradients. The specific number can be set according to actual needs and is not limited here.
[0102] Specifically, in this embodiment, the training dataset is input into each binary classifier in the initial analysis model to obtain the first class probability and the second class probability output by each binary classifier.
[0103] In a specific implementation, the process of inputting the training dataset into the binary classification model can be either inputting the preset concentration gradient corresponding to the training dataset into the first and second class models of the binary classification model, or inputting the detected feature values in the training dataset into the first and second class models of the binary classification model in equal amounts. The specific settings can be made according to actual needs and are not limited here.
[0104] Step S702: Construct feature vectors based on each of the first type of probabilities.
[0105] In this embodiment, after inputting the training dataset into each binary classifier in the initial analysis model to obtain the first-class probability and the second-class probability output by each binary classifier, a feature vector is constructed based on each first-class probability.
[0106] Further, in some feasible embodiments, step S701 above: inputting the training dataset into each binary classification model of the binary classifier in the initial analysis model to obtain the first class probability and second class probability output by each of the binary classification models, may include:
[0107] S7011: Based on the preset concentration gradient corresponding to each of the detected feature values in the training dataset, input the training dataset into the first class model and the second class model of each of the binary classification models;
[0108] In this embodiment, further, in one implementation, the first and second class models of each binary classification model can also be determined according to a preset concentration gradient. For example, in one implementation, k preset concentration gradients can be preset, and the binary classifier in the target analysis model includes k-1 binary classification models. Among them, the first class model of binary classification model 1 corresponds to the first gradient, and the second class model corresponds to the second gradient to the k gradient; the first class model of binary classification model 2 corresponds to the first gradient and the second gradient, and the second class model corresponds to the third gradient to the k gradient, and so on.
[0109] Specifically, in this embodiment, the training dataset is input into the first and second class models of each binary classification model according to the preset concentration gradient corresponding to each detected feature value in the training dataset.
[0110] Specifically, according to each detected feature value and the corresponding preset concentration gradient binary classification model (first and second classes), in one embodiment, the detected feature values are input into the first or second class model according to the preset concentration gradients corresponding to the first and second classes, respectively. For example, the first class model of the binary classification model corresponds to the first gradient, and the second class model corresponds to the second and third gradients. In this case, the detected feature values corresponding to the first gradient in the training dataset are input into the first class model, and the detected feature values corresponding to the second and third gradients in the training dataset are input into the second class model. In another embodiment, the number of detected feature values corresponding to the preset concentration gradient of the first class model and the number of detected feature values corresponding to the preset concentration gradient of the second class model in the binary classification model can be determined, and the smaller number is taken as the target number. The target number of detected feature values corresponding to the preset concentration gradient is then input into the first and second classes of the binary classification model, respectively. Alternatively, the specific settings can be configured according to actual needs and are not limited here.
[0111] S7012: Output the first class probability through the first class model of each of the binary classification models, and output the second class probability through the second class model of each of the binary classification models.
[0112] In this embodiment, after inputting the training dataset into the first and second class models of each binary classification model according to the preset concentration gradient corresponding to each detected feature value in the training dataset, the first class probability is output through the first class model of each binary classification model, and the second class probability is output through the second class model of each binary classification model.
[0113] Further, in some feasible embodiments, the above step S7011: inputting the training dataset into the first and second class models of each of the binary classification models according to the preset concentration gradient corresponding to each of the detected feature values in the training dataset, includes:
[0114] Step S70111: For any target binary classification model among the binary classification models, the training dataset is divided into a first-class feature set and a second-class feature set according to the preset concentration gradient corresponding to each of the detected feature values in the training dataset and the first-class model and the second-class model of the target binary classification model.
[0115] In this embodiment, based on the preset concentration gradients corresponding to the first type of model and the second type of model, the detected feature values are input into the first type of model or the second type of model according to the corresponding preset concentration gradients. Specifically, for any binary classification model (hereinafter referred to as the target binary classification model for distinction) among the various binary classification models, the training dataset is divided into a first type feature set and a second type feature set according to the preset concentration gradients corresponding to each detected feature value in the training dataset and the first type and second type models of the target binary classification model.
[0116] Step S70112: Input the first type of feature set into the first type of the target binary classification model, and input the second type of feature set into the second type of the target binary classification model.
[0117] In this embodiment, after dividing the training dataset into a first type feature set and a second type feature set according to the preset concentration gradient corresponding to each detected feature value in the training dataset and the first type model and the second type model of the target binary classification model, the first type feature set is input into the first type model of the target binary classification model, and the second type feature set is input into the second type model of the target binary classification model.
[0118] It should be noted that in this embodiment, according to the preset concentration gradients corresponding to the first type of model and the second type of model, the detected feature values are input into the binary classification model according to the corresponding preset concentration gradients. Compared with inputting the detected feature values into the binary classification model in equal amounts, this embodiment can make the results obtained by the trained target analysis model more accurate, thereby improving the accuracy of urine dry analysis.
[0119] Further, in some feasible embodiments, before dividing the training dataset into a first-class feature set and a second-class feature set according to the preset concentration gradient corresponding to each of the detected feature values in the training dataset and the first-class and second-class models of the target binary classification model for any of the aforementioned binary classification models, the substantive result analysis method further includes:
[0120] Step S70113: A feature set to be expanded and a target feature set are determined from the first feature set and the second feature set, wherein the number of detected feature values included in the feature set to be expanded is less than the number of detected feature values included in the target feature set;
[0121] In this embodiment, before the steps of inputting the first type of feature set into the first type of the target binary classification model and inputting the second type of feature set into the second type of the target binary classification model, a feature set to be expanded and a target feature set are determined from the first type of feature set and the second type of feature set. The feature set to be expanded includes fewer detected feature values than the target feature set. That is, the feature set to be expanded includes fewer detected feature values than the first type of feature set and the second type of feature set, and the feature set to be expanded includes more detected feature values than the first type of feature set and the second type of feature set.
[0122] Step S70114: By randomly copying the detected feature values in the feature set to be expanded, the number of detected feature values in the first feature set is expanded to be the same as the number of detected feature values in the target feature set, thereby obtaining an expanded feature set;
[0123] In this embodiment, after determining the feature set to be expanded and the target feature set in the first feature set and the second feature set, the number of detected feature values in the first feature set is expanded to the same number as the number of detected feature values in the target feature set by randomly copying the detected feature values in the feature set to be expanded.
[0124] Step S70115: According to the correspondence between the first type of feature set and the second type of feature set and the feature set to be expanded and the target feature set, the expanded feature set and the target feature set are used as the first feature set and the second type of feature set.
[0125] In this embodiment, according to the correspondence between the first type of feature set, the second type of feature set, the feature set to be expanded, and the target feature set, the expanded feature set and the target feature set are used as the first type of feature set and the second type of feature set. For example, when the dataset to be expanded is the first type of feature set, the expanded feature set is used as the first type of feature set.
[0126] It should be noted that this embodiment expands the data of the feature sets to be expanded, which include fewer detected feature values in the first and second feature sets, making the trained target analysis model more accurate. At the same time, this embodiment expands the data by random copying. Compared with other data expansion methods, this embodiment expands the data based on real feature values, which can also make the trained target analysis model more accurate, thereby improving the accuracy of urine dry analysis.
[0127] In this embodiment, the detected feature values of the reaction colors of the test strips corresponding to each preset concentration gradient are obtained. A training dataset is constructed based on multiple detected feature values. The initial analysis model is trained using the training dataset to obtain the target analysis model, which is then used to analyze the results of the test strips to be analyzed.
[0128] In this embodiment, machine learning is used to analyze the results of urine test strips in urine dry analysis. Compared with the qualitative test strip detection results based on the difference between the reaction color of the urine test strip and the standard color, this embodiment can more accurately divide the concentration gradient of each substance in the urine based on the reaction color of the urine test strip. This makes the detection results determined based on the concentration gradient more accurate, improves the accuracy of urine test strip result analysis, and thus improves the accuracy of urine dry analysis.
[0129] Furthermore, in some feasible embodiments, k preset concentration gradients are preset, and the binary classifier in the target analysis model includes k-1 binary classification models, wherein the first class model of binary classification model 1 corresponds to the first gradient, and the second class model corresponds to the second gradient to the k gradient; the first class model of binary classification model 2 corresponds to the first gradient and the second gradient, and the second class model corresponds to the third gradient to the k gradient, and so on.
[0130] In this embodiment, refer to Figure 2 , Figure 2 This is a schematic flowchart illustrating an embodiment of the test strip result analysis method of the present invention. The specific process for analyzing the test strip results can be as follows:
[0131] Obtain the RGB values of the reaction color of the test strip to be analyzed (i.e., Figure 2 The image shows the RGB color of the test strip.
[0132] The RGB values are converted according to preset rules to obtain the color characteristic values of the reaction color of the test strip to be analyzed (i.e., Figure 2 (Calculated color features shown).
[0133] Input the color feature values into k-1 binary classification models in the target analysis model to obtain the feature vector (i.e., Figure 2 The input shown is K-1 binary classification models, and the probability feature vector is calculated. Specifically, in this embodiment, the feature vector is constructed based on the first class probability output by the first class model of the k-1 binary classification models.
[0134] The feature vector is input into the linear regression model to calculate the target analysis value (i.e.) Figure 2 The input regression model shown calculates the numerical gradient.
[0135] The target concentration gradient corresponding to the test strip to be analyzed is determined based on the target analysis value and the preset threshold. The test strip analysis result is then determined based on the target concentration gradient. Figure 2 The qualitative output result is calculated using the combined threshold partitioning scheme shown in the figure.
[0136] In this embodiment, qualitative analysis was performed on 100 collected clinical urine samples. In a comparative embodiment, qualitative analysis was performed on the same 100 clinical urine samples based on the results obtained from the analysis. The qualitative analysis results obtained in this embodiment and the comparative embodiment were compared with the experimental analysis results to obtain the accuracy of the qualitative analysis results of various substances in urine in this embodiment compared with the experimental analysis results, and the accuracy of the qualitative analysis results of various substances in urine in the comparative embodiment compared with the experimental analysis results. Specifically, the comparison results are shown in Table 1 below:
[0137]
[0138]
[0139] Table 1
[0140] As can be seen from Table 1, compared with the comparative example, the qualitative analysis of various substances in the urine sample in this embodiment has a higher probability of being consistent with the experimental analysis results. That is, the urine dry analysis detection results obtained in this embodiment are more accurate.
[0141] In addition, the present invention also provides a test strip result analysis device, referring to Figure 3 , Figure 3 This is a schematic diagram of the functional modules of the test strip result analysis device according to an embodiment of the present invention. The test strip result analysis device of the present invention includes:
[0142] The acquisition module 10 is used to acquire the color feature values of the reaction color of the test strip to be analyzed, and to acquire the target analysis model based on the binary classification model and the linear regression model.
[0143] Analysis module 20 is used to input the color feature value into the target analysis model to obtain the target analysis value output by the target analysis model;
[0144] The determination module 30 is used to determine the target concentration gradient corresponding to the test strip to be analyzed based on the target analysis value and the preset threshold.
[0145] The determining module 30 is also used to determine the test strip analysis result of the test strip to be analyzed based on the target concentration gradient.
[0146] Furthermore, the aforementioned test strip result analysis device also includes a training module, which is used for:
[0147] Obtain the detected feature values of the reaction colors of the tested test strips corresponding to each preset concentration gradient, and construct a training dataset based on the multiple detected feature values;
[0148] Obtain an initial analysis model based on a binary classification model and a linear regression model;
[0149] The training dataset is input into the binary classifier of the initial analysis model to extract features and obtain feature vectors;
[0150] The feature vector is input into the linear regressor of the initial analysis model to obtain the initial analysis values output by the linear regressor.
[0151] Based on the initial analysis values and preset thresholds, determine the test concentration gradient corresponding to each of the detected feature values in the training dataset;
[0152] Based on the loss function, the target analysis model is obtained by adjusting the model parameters of the initial analysis model according to the preset concentration gradient corresponding to each of the detected feature values and the test concentration gradient corresponding to each of the detected feature values.
[0153] Furthermore, the binary classifier includes multiple binary classification models, and the training module is also used for:
[0154] The training dataset is input into each binary classifier in the initial analysis model to obtain the first class probability and the second class probability output by each binary classifier.
[0155] Feature vectors are constructed based on each of the first type of probabilities.
[0156] Furthermore, the aforementioned training module is also used for:
[0157] Based on the preset concentration gradient corresponding to each of the detected feature values in the training dataset, the training dataset is input into the first class model and the second class model of each of the binary classification models.
[0158] Each of the binary classification models outputs a first-class probability through its first-class model and a second-class probability through its second-class model.
[0159] Furthermore, the aforementioned training module is also used for:
[0160] For any target binary classification model among the various binary classification models, the training dataset is divided into a first-class feature set and a second-class feature set according to the preset concentration gradient corresponding to each of the detected feature values in the training dataset and the first-class model and the second-class model of the target binary classification model.
[0161] The first type of feature set is input into the first type of the target binary classification model, and the second type of feature set is input into the second type of the target binary classification model.
[0162] Furthermore, the aforementioned training module is also used for:
[0163] By randomly copying the detected feature values in the first feature set, the number of detected feature values in the first feature set is expanded to be the same as the number of detected feature values in the second feature set;
[0164] The above training module is also used for:
[0165] The expanded first-class feature set is input into the first-class model of the target binary classification model.
[0166] Furthermore, the aforementioned acquisition module 10 is also used for:
[0167] Obtain the RGB values of the reaction color of the test strip to be analyzed;
[0168] The RGB values are converted according to preset rules to obtain the color feature values of the reaction color of the test paper to be analyzed.
[0169] Furthermore, the color feature values include: R / G value, G / R value, R / B value, B / R value, G / B value, B / G value, R / (R+G+B) value, R / (R+G+B) value, R / (R+G+B) value, L* value, a* value, and b* value.
[0170] Each functional module of the test strip result analysis device performs the steps of the test strip result analysis method described above during operation.
[0171] Furthermore, the present invention also provides a test strip result analysis device. (See reference...) Figure 4 , Figure 4 This is a schematic diagram of the test strip result analysis device according to an embodiment of the present invention. Specifically, the test strip result analysis device according to an embodiment of the present invention can be a device that runs a locally running test strip result analysis system.
[0172] like Figure 4 As shown, the test strip result analysis device of this embodiment may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0173] The memory 1005 is disposed on the main body of the test strip result analysis device. The memory 1005 stores a program that, when executed by the processor 1001, performs the corresponding operations. The memory 1005 is also used to store parameters used by the test strip result analysis device. The memory 1005 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk storage device. Optionally, the memory 1005 can also be a storage device independent of the aforementioned processor 1001.
[0174] Those skilled in the art will understand that Figure 4 The structure of the test strip result analysis device shown in the figure does not constitute a limitation on the test strip result analysis device. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0175] like Figure 4 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network processing module, a user interface module, and a test strip result analysis program.
[0176] exist Figure 4 In the test strip result analysis device shown, the processor 1001 can be used to call the test strip result analysis program stored in the memory 1005 and perform the following operations:
[0177] Obtain the color feature values of the reaction color of the test strip to be analyzed, and obtain the target analysis model based on the binary classification model and the linear regression model;
[0178] The color feature value is input into the target analysis model to obtain the target analysis value output by the target analysis model;
[0179] The target concentration gradient corresponding to the test strip to be analyzed is determined based on the target analytical value and the preset threshold.
[0180] The test strip analysis results are determined based on the target concentration gradient.
[0181] Furthermore, the processor 1001 can also be used to call the test strip result analysis program stored in the memory 1005 and perform the following operations:
[0182] Obtain the detected feature values of the reaction colors of the tested test strips corresponding to each preset concentration gradient, and construct a training dataset based on the multiple detected feature values;
[0183] Obtain an initial analysis model based on a binary classification model and a linear regression model;
[0184] The training dataset is input into the binary classifier of the initial analysis model to extract features and obtain feature vectors;
[0185] The feature vector is input into the linear regressor of the initial analysis model to obtain the initial analysis values output by the linear regressor.
[0186] Based on the initial analysis values and preset thresholds, determine the test concentration gradient corresponding to each of the detected feature values in the training dataset;
[0187] Based on the loss function, the target analysis model is obtained by adjusting the model parameters of the initial analysis model according to the preset concentration gradient corresponding to each of the detected feature values and the test concentration gradient corresponding to each of the detected feature values.
[0188] Furthermore, the binary classifier includes multiple binary classification models, and the processor 1001 can also be used to call the test strip result analysis program stored in the memory 1005 and perform the following operations:
[0189] The training dataset is input into each binary classifier in the initial analysis model to obtain the first class probability and the second class probability output by each binary classifier.
[0190] Feature vectors are constructed based on each of the first type of probabilities.
[0191] Furthermore, the processor 1001 can also be used to call the test strip result analysis program stored in the memory 1005 and perform the following operations:
[0192] Based on the preset concentration gradient corresponding to each of the detected feature values in the training dataset, the training dataset is input into the first class model and the second class model of each of the binary classification models.
[0193] Each of the binary classification models outputs a first-class probability through its first-class model and a second-class probability through its second-class model.
[0194] Furthermore, the processor 1001 can also be used to call the test strip result analysis program stored in the memory 1005 and perform the following operations:
[0195] For any target binary classification model among the various binary classification models, the training dataset is divided into a first-class feature set and a second-class feature set according to the preset concentration gradient corresponding to each of the detected feature values in the training dataset and the first-class model and the second-class model of the target binary classification model.
[0196] The first type of feature set is input into the first type of the target binary classification model, and the second type of feature set is input into the second type of the target binary classification model.
[0197] Furthermore, the processor 1001 can also be used to call the test strip result analysis program stored in the memory 1005 and perform the following operations:
[0198] By randomly copying the detected feature values in the first feature set, the number of detected feature values in the first feature set is expanded to be the same as the number of detected feature values in the second feature set;
[0199] The operation of inputting the first type of feature set into the first type of model of the target binary classification model includes:
[0200] The expanded first-class feature set is input into the first-class model of the target binary classification model.
[0201] Furthermore, the processor 1001 can also be used to call the test strip result analysis program stored in the memory 1005 and perform the following operations:
[0202] Obtain the RGB values of the reaction color of the test strip to be analyzed;
[0203] The RGB values are converted according to preset rules to obtain the color feature values of the reaction color of the test paper to be analyzed.
[0204] Furthermore, the color feature values include: R / G value, G / R value, R / B value, B / R value, G / B value, B / G value, R / (R+G+B) value, R / (R+G+B) value, R / (R+G+B) value, L* value, a* value, and b* value.
[0205] Furthermore, the present invention also provides a computer-readable storage medium. (See reference...) Figure 5 , Figure 5 This is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention. The computer-readable storage medium stores a test strip result analysis program, which, when executed by a processor, implements the steps of the test strip result analysis method described above.
[0206] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0207] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0208] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a test strip result analysis device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0209] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for analyzing test strip results, characterized in that, The method for analyzing the test strip results includes: Obtain the color feature value of the reaction color of the test strip to be analyzed, and obtain the target analysis model based on the binary classification model and the linear regression model; wherein, the binary classifier in the target analysis model includes k-1 binary classification models, where k is the number of preset concentration gradients, and for the Nth model in the k-1 binary classification models, the first class model of the Nth model corresponds to the first gradient to the Nth gradient, and the second class model of the Nth model corresponds to the N+1th gradient to the kth gradient; The color feature value is input into the target analysis model to obtain the target analysis value output by the target analysis model; The target concentration gradient corresponding to the test strip to be analyzed is determined based on the target analytical value and the preset threshold. The test strip analysis results are determined based on the target concentration gradient. The step of obtaining the color feature value of the reaction color of the test strip to be analyzed includes: Obtain the RGB values of the reaction color of the test strip to be analyzed, and convert the RGB values according to a preset rule to obtain the color feature values of the reaction color of the test strip to be analyzed. The color feature values include: R / G value, G / R value, R / B value, B / R value, G / B value, B / G value, R / (R+G+B) value, and L value, a value, and b value of Lab color space. Prior to the step of obtaining the color characteristic value of the reaction color of the test strip to be analyzed, the method further includes: Obtain the detected feature values of the reaction colors of the tested test strips corresponding to each of the preset concentration gradients, and construct a training dataset based on the multiple detected feature values; Obtain an initial analysis model based on a binary classification model and a linear regression model; Based on the preset concentration gradient corresponding to each of the detected feature values in the training dataset, for any target binary classification model among the binary classification models of the binary classifier in the initial analysis model, the training dataset is divided into a first-class feature set and a second-class feature set according to the preset concentration gradient corresponding to each of the detected feature values in the training dataset and the first-class and second-class models of the target binary classification model; the first-class feature set is input into the first-class model of the target binary classification model, and the second-class feature set is input into the second-class model of the target binary classification model; Each binary classification model outputs a first-class probability through its first-class model and a second-class probability through its second-class model, and constructs a feature vector based on each of the first-class probabilities. The feature vector is input into the linear regressor of the initial analysis model to obtain the initial analysis values output by the linear regressor. Based on the initial analysis values and preset thresholds, determine the test concentration gradient corresponding to each of the detected feature values in the training dataset; Based on the loss function, the target analysis model is obtained by adjusting the model parameters of the initial analysis model according to the preset concentration gradient corresponding to each of the detected feature values and the test concentration gradient corresponding to each of the detected feature values.
2. The test strip result analysis method as described in claim 1, characterized in that, Before the steps of inputting the first type of feature set into the first class model of the target binary classification model and inputting the second type of feature set into the second class model of the target binary classification model, the method further includes: The feature set with fewer detected feature values included in the first feature set and the second feature set is taken as the feature set to be expanded, and the feature set with more detected feature values included in the first feature set and the second feature set is taken as the target feature set. By randomly copying the detected feature values in the feature set to be expanded, the number of detected feature values in the feature set to be expanded is expanded to be the same as the number of detected feature values in the target feature set, thus obtaining an expanded feature set; Based on the correspondence between the first type of feature set and the second type of feature set and the feature set to be expanded and the target feature set, the expanded feature set and the target feature set are respectively used as the first type of feature set and the second type of feature set.
3. A test strip result analysis device, characterized in that, The test strip result analysis device includes: a memory, a processor, and a test strip result analysis program stored in the memory and executable on the processor, wherein the test strip result analysis program is configured to implement the steps of the test strip result analysis method as described in any one of claims 1 to 2.
4. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a test strip result analysis program, which, when executed by a processor, implements the steps of the test strip result analysis method as described in any one of claims 1 to 2.