Glucose sensor performance detection method, device, system, equipment and medium
By extracting the process data of the glucose sensor and training the anomaly detection model, the problem of automatically detecting the performance of the glucose sensor is solved and efficient and accurate performance detection is achieved.
Patent Information
- Application Number
- CN202310929409.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-26
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2043-07-26
AI Technical Summary
It is difficult to automatically detect the performance of glucose sensors with existing technology, resulting in increased detection complexity and difficulty.
By obtaining the process data of the glucose sensor, extracting electrode features, and using these features to train anomaly detection models, automated detection of glucose sensor performance is achieved.
It realizes the automatic detection of glucose sensor performance without in vitro experiments, reduces detection complexity and cost, and improves detection efficiency and accuracy.
Smart Images

Figure CN117007807B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of intelligent medical data processing, and in particular to a performance detection method, device, system, equipment and medium for a glucose sensor. Background Art
[0002] With the development of social economy and the advancement of science and technology, medical device-related technologies are gradually developing in the direction of intelligence and informationization. Among them, glucose sensors are widely used in continuous glucose monitoring (CGM), which is of great significance to the blood sugar control of diabetics. The quality of their performance directly affects the blood sugar detection effect and thus affects the blood sugar control effect of users.
[0003] Calibration-free glucose sensors have attracted widespread attention because they do not require users to perform additional fingertip blood sampling and only require factory calibration before shipment. During the research and development process of calibration-free sensors, high requirements are placed on the consistency of materials, processes, and production, which increases the complexity and difficulty of sensor performance judgment.
[0004] Therefore, how to automatically detect the performance of a glucose sensor is a technical problem that those skilled in the art currently need to solve. Summary of the invention
[0005] The purpose of the present application is to provide a performance detection method for a glucose sensor, a performance detection device for a glucose sensor, a performance detection system for a glucose sensor, an electronic device and a storage medium, which can automatically detect the performance of a glucose sensor.
[0006] In order to solve the above technical problems, the present application provides a performance detection method of a glucose sensor, comprising:
[0007] Acquiring process data of the glucose sensor; wherein the process data includes electrode glucose gradient experimental data and electrode anti-interference experimental data;
[0008] Extracting features from the process data to obtain electrode features, and adding annotations to the electrode features according to the type of the glucose sensor to obtain electrode samples;
[0009] The electrode samples are used to train an electrode anomaly detection model, and the electrode anomaly detection model is used to detect the performance of other glucose sensors.
[0010] Optionally, extracting features from the process data to obtain electrode features includes:
[0011] Obtaining a linear relationship between solution concentration and signal current from the electrode glucose gradient experimental data, and determining a goodness of fit of the linear relationship between the solution concentration and the signal current;
[0012] The average anti-interference rate for the target interfering substance is extracted from the electrode anti-interference experimental data.
[0013] Optionally, the process data also includes temperature experimental data and / or electrode hydration data;
[0014] Correspondingly, the process of extracting features from the process data to obtain electrode features also includes:
[0015] Obtaining a linear mapping relationship between temperature and sensor sensitivity from the temperature experimental data, and obtaining a current change rate when a preset temperature is changed relative to a calibration temperature according to the linear mapping relationship between temperature and sensor sensitivity;
[0016] And / or, extracting the background current when hydration is complete and the impedance value of the electrode at a fixed frequency when hydration is complete from the electrode hydration data.
[0017] Optionally, the process data also includes any one or a combination of electrode size data, electrode enzyme spot image and outer film thickness:
[0018] Correspondingly, the process of extracting features from the process data to obtain electrode features also includes:
[0019] Extracting the actual size margin from the electrode size data, and determining the maximum difference between the actual size margin and the standard size margin;
[0020] and / or, identifying enzyme spot regions from the electrode enzyme spot image and counting the pixel area of each enzyme spot region, and calculating the variance and total area of the pixel areas of all enzyme spot regions;
[0021] And / or, the absolute value of the difference between the measured film thickness and the standard film thickness is calculated based on the outer film thickness data.
[0022] Optionally, the process data also includes electrode OCP (Open Circuit Potential Method) test data, square resistance data, enzyme solution viscosity data and electrode outer film viscosity data;
[0023] Correspondingly, the process of extracting features from the process data to obtain electrode features also includes:
[0024] Extracting the absolute value of the deviation between the fluctuation amplitude of the open circuit voltage within a preset time period and the standard control threshold value from the electrode OCP test data;
[0025] and / or, extracting the coefficient of variation of all the sheet resistances of the substrate where the electrode is located from the sheet resistance data;
[0026] and / or, extracting the difference between the mean of the measured enzyme solution viscosity value and the standard control viscosity value from the enzyme solution viscosity data;
[0027] And / or, extracting the difference between the mean of the measured outer film viscosity values and the standard control viscosity value from the electrode outer film viscosity data.
[0028] Optionally, before using the electrode sample to train the electrode anomaly detection model, the method further includes:
[0029] Dividing the electrode samples into a first type of electrode samples and a second type of electrode samples according to the marking; wherein the number of the first type of electrode samples is greater than the number of the second type of electrode samples;
[0030] If the deviation of the ratio of the number of the first type of electrode samples to the number of the second type of electrode samples from 1 is greater than a first preset value, the ENN algorithm is used to reduce the number of the first type of electrode samples, and the Smote algorithm is used to increase the number of the second type of electrode samples to obtain a training sample set;
[0031] Calculating a ratio of the first type of electrode samples to the second type of electrode samples in the training sample set, and setting a first penalty weight and a second penalty weight according to the ratio; wherein the first penalty weight is negatively correlated with the ratio, and the second penalty weight is positively correlated with the ratio;
[0032] A first penalty weight is assigned to the first type of electrode samples in the training sample set, and a second penalty weight is assigned to the second type of electrode samples in the training sample set.
[0033] Optionally, before using the electrode sample to train the electrode anomaly detection model, the method further includes:
[0034] Using a random forest model to rank the importance of all electrode features in the electrode sample;
[0035] Deleting electrode features whose importance is less than or equal to a second preset value in the electrode sample;
[0036] Setting an electrode feature whose importance is greater than a second preset value and less than a third preset value as a candidate electrode feature;
[0037] The K-fold cross validation algorithm is used to calculate the influence of the candidate electrode features on the accuracy of the random forest model, and the candidate electrode features in the electrode samples whose influence on the accuracy of the random forest model is less than a fourth preset value are deleted.
[0038] Optionally, using the electrode sample to train an electrode anomaly detection model includes:
[0039] Using the electrode samples to train a stacking ensemble learning model and a bagging ensemble learning model respectively;
[0040] Performing K-fold cross validation on the stacking ensemble learning model and the bagging ensemble learning model to obtain an ROC curve;
[0041] The model with the largest AUC area corresponding to the ROC curve in the stacking ensemble learning model and the bagging ensemble learning model is set as the electrode abnormality detection model.
[0042] The present application also provides a performance detection device for a glucose sensor, comprising:
[0043] A data acquisition module, used to acquire process data of the glucose sensor; wherein the process data includes electrode glucose gradient experimental data and electrode anti-interference experimental data;
[0044] A sample generation module, used for extracting features from the process data to obtain electrode features, and adding annotations to the electrode features according to the type of the glucose sensor to obtain electrode samples;
[0045] The model training module is used to train an electrode anomaly detection model using the electrode samples, and use the electrode anomaly detection model to detect the performance of other glucose sensors.
[0046] The present application also provides a performance detection system for a glucose sensor, including a master node server, a node node server and an image warehouse server; the master node server is a control node of a Kubernetes container cluster, and the node node server is a computing node of the Kubernetes container cluster;
[0047] The master node server is used to control the node node server to download containers from the image warehouse server; the image warehouse server includes a database container, a feature extraction and selection container, a model training container and a model calling container;
[0048] The node server is used to train the electrode anomaly detection model by starting the container downloaded from the image warehouse server or to detect the performance of other glucose sensors using the electrode anomaly detection model;
[0049] Among them, the database container is used to obtain the process data of the glucose sensor, and the process data includes electrode glucose gradient experimental data and electrode anti-interference experimental data; the feature extraction and selection container is used to extract features from the process data to obtain electrode features, and add annotations to the electrode features according to the type of the glucose sensor to obtain electrode samples; the model training container is used to train the electrode anomaly detection model using the electrode samples; and the model calling container is used to use the electrode anomaly detection model to detect the performance of other glucose sensors.
[0050] Furthermore, the performance detection system of the glucose sensor also includes a user terminal and an administrator server connected to the master node server;
[0051] The user terminal is used to upload the process data and the electrode performance data to the database of the database container;
[0052] The administrator server is used to control the master node server to generate node creation instructions and / or image deployment instructions.
[0053] The present application also provides a storage medium on which a computer program is stored. When the computer program is executed, the steps of the performance detection method of the glucose sensor are implemented.
[0054] The present application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, the steps of the performance detection method of the glucose sensor are implemented.
[0055] The present application provides a performance detection method for a glucose sensor, comprising: obtaining process data of the glucose sensor; wherein the process data comprises electrode glucose gradient experimental data and electrode anti-interference experimental data; performing feature extraction on the process data to obtain electrode features, and adding annotations to the electrode features according to the type of the glucose sensor to obtain electrode samples; using the electrode samples to train an electrode anomaly detection model, and using the electrode anomaly detection model to detect the performance of other glucose sensors.
[0056] After acquiring the process data of the glucose sensor, the present application extracts electrode features from the process data and adds labels to the electrode features to obtain electrode samples. The present application uses the above electrode samples to train an electrode anomaly detection model. Since the above electrode features include features extracted from electrode glucose gradient experimental data and electrode anti-interference experimental data, the trained electrode anomaly detection model has the ability to detect whether the electrode of the glucose sensor is abnormal. After training the electrode anomaly detection model, the electrode anomaly detection model can be used to perform performance detection operations on the glucose sensor without the need for in vitro experiments. Therefore, the present application can automatically detect the performance of the glucose sensor. The present application also provides a performance detection device for a glucose sensor, a performance detection system for a glucose sensor, a storage medium, and an electronic device, which have the above beneficial effects and are not described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0058] Figure 1 A flow chart of a performance detection method for a glucose sensor provided in an embodiment of the present application;
[0059] Figure 2 A flow chart of an enzyme spot detection algorithm provided in an embodiment of the present application;
[0060] Figure 3 A schematic diagram of a glucose sensor electrode enzyme point detection process provided in an embodiment of the present application;
[0061] Figure 4 A flow chart of a method for analyzing the auxiliary performance of a glucose sensor provided in an embodiment of the present application;
[0062] Figure 5 A structural diagram of a Kubernetes-based system for assisting performance analysis of a glucose sensor provided in an embodiment of the present application. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0064] See below Figure 1 , Figure 1 This is a flow chart of a method for detecting performance of a glucose sensor provided in an embodiment of the present application.
[0065] Specific steps may include:
[0066] S101: Acquire process data of the glucose sensor;
[0067] The process data is data used to describe the process of the glucose sensor. The process data may include electrode glucose gradient experimental data and electrode anti-interference experimental data measured by an electrochemical workstation. Of course, the process data may also include data detected by other measuring equipment, which is not specifically limited here. After obtaining the process data, the process data may be stored in a cloud database. Therefore, this step can obtain the process data of multiple glucose sensors from the motion database.
[0068] S102: extracting features from the process data to obtain electrode features, and adding annotations to the electrode features according to the type of the glucose sensor to obtain electrode samples;
[0069] Among them, after obtaining the process data of the glucose sensor, the present embodiment can perform a feature extraction operation on the above process data to obtain electrode features. The glucose sensor corresponding to the process data obtained in S101 can be a sensor of a known type, and then the electrode features can be labeled with the type of glucose sensor. The above types include performance that meets the standard or performance that does not meet the standard. The present application uses the electrode features with the annotations added as electrode samples so as to perform a model training process based on the above electrode samples. The types of the above glucose sensors can be manually labeled.
[0070] S103: Using the electrode samples to train an electrode anomaly detection model, and using the electrode anomaly detection model to detect the performance of other glucose sensors.
[0071] Among them, after obtaining the electrode samples, the electrode anomaly detection model can be trained by machine learning, and then the trained electrode anomaly detection model can be used to detect the performance of other glucose sensors of unknown types.
[0072] After acquiring the process data of the glucose sensor, this embodiment extracts electrode features from the process data and adds labels to the electrode features to obtain electrode samples. This embodiment uses the above electrode samples to train the electrode anomaly detection model. Since the above electrode features include features extracted from the electrode glucose gradient experimental data and the electrode anti-interference experimental data, the trained electrode anomaly detection model has the ability to detect whether the electrode of the glucose sensor is abnormal. After training the electrode anomaly detection model, the electrode anomaly detection model can be used to perform the performance detection operation of the glucose sensor without the need for in vitro experiments. Therefore, this embodiment can automatically detect the performance of the glucose sensor.
[0073] As for Figure 1 Further introduction to the corresponding embodiment, the feature extraction operation can be performed on the process data in the following manner: obtaining the linear relationship between the solution concentration and the signal current from the electrode glucose gradient experimental data, and determining the goodness of fit of the linear relationship between the solution concentration and the signal current ; Extracting the average anti-interference rate of the target interfering substance from the electrode anti-interference experimental data.
[0074] An example to illustrate the above process:
[0075] The linear relationship between solution concentration C and signal current is obtained from the electrode glucose gradient experimental data measured by the electrochemical workstation, the sensor electrode sensitivity K is extracted, and the goodness of fit of the linear relationship is obtained. , the obtained linear relationship is as follows:
[0076]
[0077] Among them, I 0 is the background current, I is the concentration gradient current measured by the electrochemical workstation, and I sub The current representing the glucose concentration after subtracting the background current.
[0078] The corresponding goodness of fit The calculation formula is as follows:
[0079]
[0080] Where n is the total number of measured data, i is the index of the data, C i is the actual solution concentration corresponding to the i-th data, f(I sub ) i is the concentration value calculated according to the linear mapping relationship for the i-th data, C mean is the average concentration value of the data set.
[0081] Extract the average anti-interference rate X of the target interfering substances (such as any one or a combination of ascorbic acid, uric acid and acetaminophen) from the electrode anti-interference experimental data r_anti :
[0082]
[0083] Among them, R_anti i It represents the ratio of the electrode's response current increment to the interfering substance and the response current of the solution glucose, where n is the number of interfering substances.
[0084] As for Figure 1 As a further introduction to the corresponding embodiment, the above-mentioned electrode glucose gradient experimental data and electrode anti-interference experimental data belong to chemical characteristic data in the process data, and the chemical characteristic data may also include temperature experimental data and / or electrode hydration data.
[0085] If the process data used in this embodiment includes temperature experimental data, the process of extracting features from the temperature experimental data to obtain electrode features includes: obtaining a linear mapping relationship between temperature and sensor sensitivity from the temperature experimental data, and obtaining a current change rate X when the preset temperature is changed relative to the calibration temperature according to the linear mapping relationship between the temperature and the sensor sensitivity. r_temp .
[0086] If the process data used in this embodiment includes electrode hydration data, the process of extracting the electrode features from the electrode hydration data includes: extracting the background current when the electrode is fully hydrated from the electrode hydration data And the impedance value X of the electrode at a fixed frequency when hydration is completed eis .
[0087] An example to illustrate the above process:
[0088] The temperature experimental data can be obtained through the temperature gradient delay, and the linear mapping relationship between temperature and sensor sensitivity can be obtained from the temperature experimental data. The general linear relationship is as follows:
[0089] K = a*T + b = f(T);
[0090] Where T is the in vitro solution temperature, K is the sensor sensitivity, a and b are the fitting coefficients of temperature and sensor sensitivity, then the relative calibration temperature T norm (For example, 32.5℃), the current change rate is X for every 1℃ change r_temp for:
[0091]
[0092] Extracting the background current when fully hydrated from the electrode hydration data measured by the electrochemical workstation And the impedance value X of the electrode at a fixed frequency when hydration is completed eis In this embodiment, the impedance value X can be directly eis As an electrode characteristic, the impedance value X eis The results after logarithmic processing are used as electrode characteristics.
[0093] Among them, the background current when hydration is complete Take the average value of the signal current whose coefficient of variation CV of the signal current in the reciprocal 100s section is less than the agreed CV threshold; the impedance value X eis It is the median impedance of the fixed frequency point sampled within the 100s segment.
[0094] As for Figure 1 As a further introduction to the corresponding embodiment, the above process data may also include shape data, and the above shape data may be any one or a combination of any several of the electrode size data, electrode enzyme spot image and outer film thickness.
[0095] If the process data used in this embodiment includes electrode size data, the process of extracting features from the electrode size data to obtain electrode features includes: extracting the actual size margin from the electrode size data, determining the maximum difference X between the actual size margin and the standard size margin err .
[0096] If the process data used in this embodiment includes an electrode enzyme spot image, the process of extracting features from the electrode enzyme spot image to obtain electrode features includes: identifying enzyme spot areas from the electrode enzyme spot image and counting the pixel area of each enzyme spot area, calculating the variance X of the pixel area of all enzyme spot areas s2 and the total area X s_total .
[0097] If the process data used in this embodiment includes outer film thickness data, the process of extracting the features of the outer film thickness data to obtain electrode features includes: calculating the absolute value X of the difference between the measured film thickness and the standard film thickness according to the outer film thickness data. l .
[0098] The standard process parameters in this embodiment, such as standard film thickness, standard size margin, standard size, etc., are determined by the process parameters of the actual production batch.
[0099] An example to illustrate the above process:
[0100] Extract the maximum difference X between the size margin measured by the two-dimensional measuring instrument and the standard size margin from the electrode size data measured by the two-dimensional measuring instrumenterr :
[0101] Xerr=max({err 1 , err 2 , ... err n});
[0102] Among them, err n It is the difference between the length of each dimension and the length of the standard template dimension.
[0103] Identify the enzyme spot area from the electrode enzyme spot image taken by the dispenser, count the pixel area of each enzyme spot area, and extract the variance X of all detected enzyme spot pixel areas. s2 And the total area of all enzyme spots X s_total , the steps are as follows:
[0104] Step A1: Load the electrode enzyme spot image, determine the image size to be 1280×1024, enhance the sharpness of the electrode enzyme spot image that meets the conditions, and remove the sample if the size does not meet the conditions;
[0105] Among them, the sharpness enhancement coefficient is set to 3.0.
[0106] Step 2: Extract the ROI (region of interest) and convert it into a grayscale image. Binarize the electrode enzyme point image, detect the electrode contour through contour detection, make a circumscribed rectangle of the contour and crop it;
[0107] Among them, according to the empirical method, the binarization threshold of the image is set to 130, and the area range of the contour is set to [4000, 60000].
[0108] Step A3: Perform median filtering on the ROI area cropped in step A2, and perform binarization processing on the image.
[0109] Among them, the size of the filter kernel ksize is set to 5, and the binarization threshold is set to 127.
[0110] Step A4: Perform morphological processing on the image binarized in step A3, first dilating and then eroding.
[0111] Among them, the kernel shape passed is a rectangular structure area and the kernel size is 3×3.
[0112] Step A5: Perform Hough detection on the ROI area that has been morphologically processed in step A4 to identify the enzyme spots in the electrode.
[0113] Among them, Hough circle detection uses the HoughCircles method of opencv (a cross-platform computer vision library), setting param1 = 50, param2 = 30, minRadius = 3, maxRadius = 30. Param1 represents the high threshold of the Canny detector; param2 represents the accumulator threshold of the center of the circle in the detection stage; minRadius represents the radius of the smallest circle detected; maxRadius represents the radius of the largest circle detected.
[0114] Step A6: Count the number of enzyme spots detected in step A5. If the number of enzyme spots is less than the set standard number of enzyme spots, the electrode sample is discarded. If the number of enzyme spots counted is greater than or equal to the set standard number of enzyme spots, the enzyme spot verification is started.
[0115] Step A7: Verify whether the identified enzyme spots meet the standards. If so, record the area of the enzyme spots. If not, discard the enzyme spots. Compare the number of compliant enzyme spots finally detected with the number of standard enzyme spots (i.e., the number of dispensing enzyme spots, for example, 3). If it is inconsistent with the standard number, discard the electrode sample.
[0116] Among them, the inspection standard for the detected enzyme spots is that the difference in the horizontal coordinates of the enzyme spot centers is less than a certain threshold (such as 4 pixel units), the vertical coordinates of the center of the circle are sorted from small to large, and all intervals between the center of the circle are calculated to meet a certain threshold range (such as [70,80] pixel units).
[0117] Step A8: Calculate the variance X of the area of all enzyme points that meet the standard electrode s2 And the total area of all enzyme spots X s_total ,as follows:
[0118]
[0119]
[0120] Among them, S i is the area of the enzyme spot that meets the standard, S mean is the average area of all enzyme spots that meet the criteria, n is the number of enzyme spots, norm is the number of standard enzyme spots.
[0121] See also Figure 2 , Figure 2A flow chart of an enzyme spot detection algorithm provided in an embodiment of the present application, the process is as follows: after loading the image, determine whether the size meets the requirements (e.g., the preset constraint is that the image size is greater than or equal to 1280*1024); if the image size does not meet the requirements, the sample is removed; if it meets the requirements, the image sharpness enhancement operation is performed. The ROI area is extracted and converted into a grayscale image, the cropped ROI area is filtered and binarized, and the binarized ROI area is subjected to morphological processing by first dilating and then corroding. Hough detection (enzyme spot initial screening) is performed on the morphologically processed ROI area. Determine whether the number of detected enzyme spots meets the standard; if it does not meet the standard, the sample is removed; if it meets the standard, verify whether the detected enzyme spots meet the verification standard; if it does not meet the verification standard, the enzyme spot is removed; if it meets the verification standard, determine whether the number of enzyme spots that have passed the verification is equal to the set number. If it is not equal to the set number, the sample is removed; if it is equal to the set number, the area of each enzyme spot is calculated, and the enzyme spot features (area variance and total area) are calculated. Please refer to Figure 3 , Figure 3 A schematic diagram of the enzyme point detection process of a glucose sensor electrode provided in an embodiment of the present application shows image sharpness enhancement, ROI area extraction and grayscale conversion, expansion and corrosion after binarization, and enzyme point detection operations.
[0122] Extract the absolute value X of the difference between the outer film thickness data measured by the film thickness instrument and the standard film thickness l :
[0123] X l =|X L -X L_norm |.
[0124] Among them, X L is the film thickness measured by the film thickness instrument, X L_norm It is the standard film thickness.
[0125] As for Figure 1 For further introduction to the corresponding embodiment, the above-mentioned process data may also include physical characteristic data, and the above-mentioned physical characteristic data may be any one or a combination of any several of the electrode OCP test data, square resistance data, enzyme solution viscosity data, and electrode outer film viscosity data.
[0126] If the process data used in this embodiment includes electrode OCP test data, the process of extracting features from the electrode OCP test data to obtain electrode features includes: extracting the absolute value X of the deviation between the fluctuation amplitude of the open circuit voltage within a preset time period and the standard control threshold from the electrode OCP test data. ocp .
[0127] If the process data used in this embodiment includes square resistance data, the process of extracting features from the square resistance data to obtain electrode features includes: extracting the coefficient of variation X of all square resistances of the substrate where the electrode is located from the square resistance data. cv .
[0128] If the process data used in this embodiment includes enzyme solution viscosity data, the process of extracting the characteristics of the enzyme solution viscosity data to obtain electrode characteristics includes: extracting the difference X between the mean value of the measured enzyme solution viscosity value and the standard control viscosity value from the enzyme solution viscosity data. cp1 .
[0129] If the process data used in this embodiment includes electrode outer film viscosity data, the process of extracting the electrode outer film viscosity data to obtain electrode features includes: extracting the difference X between the average value of the measured outer film viscosity value and the standard control viscosity value from the electrode outer film viscosity data. cp2 .
[0130] An example to illustrate the above process:
[0131] Extract the absolute value of the deviation between the fluctuation amplitude of the open circuit voltage in the reciprocal 400s section and the standard control threshold from the electrode OCP test data measured by the electrochemical workstation. ocp :
[0132] X ocp =|(U mαx U min )-U norm |;
[0133] Among them, U max , U min is the maximum and minimum open circuit voltage in the reciprocal 400s section, U norm is the standard control threshold.
[0134] Extract the coefficient of variation X of all square resistances of the substrate where the electrode is located from the square resistance data tested by the thin film resistance tester cv :
[0135]
[0136] Among them, R i is the square resistance of the thin film substrate, R mean is the average value of square resistance, and n represents the amount of square resistance data.
[0137] Extract the difference X between the mean value of the measured enzyme solution viscosity and the standard control viscosity value from the enzyme solution viscosity data measured by the viscometer cp1 :
[0138]
[0139] Among them, cP i is the viscosity value of the enzyme solution obtained in this test, n is the number of tests, cP norm is the standard control viscosity threshold.
[0140] Extract the difference X between the mean value of the measured outer film viscosity and the standard reference viscosity value from the electrode outer film viscosity data measured by the viscometer cp2 , calculate X cp2 The method and calculation of X cp1 The same way.
[0141] As a feasible implementation method, if the process data includes electrode size data measured by a two-dimensional measuring instrument, square resistance data tested by a thin film resistance tester, electrode OCP test data measured by an electrochemical workstation, enzyme solution viscosity data measured by a viscometer, electrode enzyme spot pictures taken by a dispensing machine, electrode outer film viscosity data measured by a viscometer, outer film thickness measured by a film thickness meter, electrode hydration data measured by an electrochemical workstation, electrode glucose gradient experimental data (goodness of fit) and temperature experimental data measured by an electrochemical workstation, and electrode anti-interference experimental data, etc., the electrode feature X that can be obtained by feature extraction of the above process data list as follows:
[0142]
[0143] As a feasible implementation, this embodiment can obtain a first type of electrode sample by adding a first type of annotation to the electrode feature, and can also obtain a second type of electrode sample by adding a second type of annotation to the electrode feature. The first type of electrode sample can be an electrode sample corresponding to a glucose sensor with performance that meets the standard, and the second type of electrode sample can be an electrode sample corresponding to a glucose sensor with performance that does not meet the standard; conversely, the second type of electrode sample can be an electrode sample corresponding to a glucose sensor with performance that meets the standard, and the first type of electrode sample can be an electrode sample corresponding to a glucose sensor with performance that does not meet the standard.
[0144] Before using the electrode samples to train the electrode anomaly detection model, the electrode samples can also be divided into a first type of electrode samples and a second type of electrode samples according to the annotations; wherein the number of the first type of electrode samples is greater than the number of the second type of electrode samples; in this embodiment, the ratio (i.e., the quantity ratio) between the number of the first type of electrode samples and the number of the second type of electrode samples can be calculated, and then it can be determined whether the deviation of the ratio from 1 is greater than a first preset value (e.g., 0.1). If the deviation of the ratio of the number of the first type of electrode samples to the second type of electrode samples from 1 is greater than the first preset value (e.g., 0.1), it indicates that there is a sample imbalance problem. In this embodiment, the number of the first type of electrode samples and the second type of electrode samples can be balanced in the following manner: the number of the first type of electrode samples is reduced by using the ENN (Edited Nearest Neighbor) algorithm, and the number of the second type of electrode samples is amplified by using the Smote (Synthetic Minority Oversampling Technique) algorithm to obtain a training sample set. The training sample set includes the reduced first type of electrode samples and the amplified second type of electrode samples.
[0145] In order to reduce the impact of the imbalance in the number of first-category electrode samples and second-category electrode samples, the present embodiment can also calculate the ratio of the first-category electrode samples to the second-category electrode samples in the training sample set, and set the first penalty weight and the second penalty weight according to the ratio; wherein the first penalty weight is negatively correlated with the ratio, and the second penalty weight is positively correlated with the ratio; the first penalty weight is assigned to the first-category electrode samples in the training sample set, and the second penalty weight is assigned to the second-category electrode samples in the training sample set.
[0146] For example, this embodiment can use a combination of data enhancement and loss function to balance the difference in sample quantity:
[0147] Step B1: Calculate the number of samples of the majority class of electrodes that meet the performance standards and the minority class of electrodes that do not meet the performance standards;
[0148] Step B2: For electrode samples that meet the performance standards, use the ENN method to reduce the number of samples:
[0149] For the electrode sample that meets the performance standard, calculate the Euclidean distance between it and all sample features:
[0150]
[0151] Among them, d x_listij is the characteristic Euclidean distance between electrode sample i and electrode sample j.
[0152] X erriis the maximum difference between the actual size margin and the standard size margin of electrode sample i, X cvi is the coefficient of variation of the square resistance of electrode sample i, X r_antii is the average anti-interference rate of electrode sample i, X errj is the maximum difference between the actual size margin and the standard size margin of electrode sample j, X cvj is the coefficient of variation of the square resistance of electrode sample j, X r_antij is the average anti-interference rate of electrode sample j.
[0153] For each sample, find its k nearest neighbor samples; the k value is determined by empirical method, and here it is 5. For each electrode sample with qualified performance, if there are more than a certain threshold (the threshold is determined by empirical method, which can be 3) of the k nearest neighbor samples belonging to the category of electrodes that do not meet the performance standards, then the electrode sample is removed from the training set.
[0154] Step B3: For electrode samples that do not meet the performance standards, the Smote method is used to increase the sample quantity.
[0155] For electrode samples that do not meet the performance standards, the distance between the electrode sample and all other electrode samples of the same type is calculated. For each electrode sample that does not meet the performance standards, its k nearest neighbor samples are found, and a neighbor sample j is randomly selected from the k nearest neighbors; all features of the current sample i and its selected neighbor sample j are subtracted to obtain a feature difference list d_list.
[0156] d_list=Xi list -Xj list ;
[0157] Among them, Xi list is a list containing all electrode features of electrode sample i, Xj list is a list containing all electrode features of electrode sample j.
[0158] Multiply d_list by a random number range in the range of (0,1) and add it to the feature list of the current sample i to obtain a new augmented sample. ;
[0159]
[0160] Step B4: Count the number of electrode samples that meet the performance standards after reduction and the number of electrode samples that do not meet the performance standards after expansion, use cost-sensitive learning, and use the following formula to assign class penalty weights w to different classes ci , multiply the corresponding category penalty weight before the loss function.
[0161] w ci =N / (C num*ci num);
[0162] Among them, w ci The class penalty weight assigned to a certain class, N is the total number of all electrode samples, C num is the total number of sample categories, ci num is the number of electrode samples of a certain class, which can be achieved by setting class_weight in model training.
[0163] For example, after sample balancing, the number of first-class electrode samples is 60, the number of second-class electrode samples is 40, the ratio of first-class electrode samples to second-class electrode samples is 1.5, the first penalty weight corresponding to the first-class electrode samples is 100 / (2×60)=0.83, and the second penalty weight corresponding to the second-class electrode samples is 100 / (2×40)=1.25. After sample balancing, the number of first-class electrode samples is 80, the number of second-class electrode samples is 40, the ratio of first-class electrode samples to second-class electrode samples is 2, the first penalty weight corresponding to the first-class electrode samples is 120 / (2×80)=0.75, and the second penalty weight corresponding to the second-class electrode samples is 120 / (2×40)=1.5. It can be seen that when the ratio of first-class electrode samples to second-class electrode samples increases, the first penalty weight decreases (that is, the first penalty weight is negatively correlated with the ratio), and the second penalty weight increases (that is, the second penalty weight is positively correlated with the ratio).
[0164] As a feasible implementation, before using the electrode samples to train the electrode anomaly detection model, electrode features with lower importance in the electrode samples may be removed to optimize the electrode samples, and then the electrode anomaly detection model may be trained based on the optimized electrode samples.
[0165] Specifically, this embodiment can use the random forest model to sort the importance of all electrode features in the electrode sample; delete the electrode features in the electrode sample whose importance is less than or equal to the second preset value; set the electrode features whose importance is greater than the second preset value and less than the third preset value as alternative electrode features; use the K-fold cross-validation algorithm to calculate the influence of the alternative electrode features on the accuracy of the random forest model, and delete the alternative electrode features in the electrode sample whose influence on the accuracy of the random forest model is less than the fourth preset value.
[0166] An example to illustrate the above process:
[0167] The random forest method is used to construct a random forest model using giniimportance, and the feature importance of the output model is sorted; features with low feature importance are deleted at a certain threshold, and the threshold is determined by empirical method such as 0.5; for features near the threshold, the average accuracy reduction method is used to shuffle the feature value sorting of the corresponding feature attribute, and the K-fold cross-validation method is used to calculate the degree of influence on the accuracy of the random forest model before and after the shuffle, and whether to retain the feature is determined based on the degree of influence.
[0168] As a feasible implementation method, the electrode abnormality detection model can be trained in the following manner: using the electrode samples to respectively train a stacking ensemble learning model and a bagging ensemble learning model; performing K-fold cross validation on the stacking ensemble learning model and the bagging ensemble learning model to obtain a ROC (receiver operating characteristic) curve; and setting the model with the largest AUC area (Area Under Curve, the area under the ROC curve and enclosed by the coordinate axis) corresponding to the ROC curve in the stacking ensemble learning model and the bagging ensemble learning model as the electrode abnormality detection model.
[0169] An example to illustrate the above process:
[0170] The electrode features of the electrode samples are normalized (such as using min-max standardization), and the test set and the training set are divided into 8:2; the stacking ensemble learning model is trained: the first layer of the model uses LR and RF models, and the second layer uses the LR model, and the output of the first layer is used as the input of the second layer to train the electrode anomaly detection model; the bagging ensemble learning model is trained: the classification probabilities of the single models of logistic regression (LR), decision tree, and random forest (RF) are multiplied by a certain weight coefficient (such as the weight coefficients are equal, that is, 1 / 3) to obtain the weighted classification probability and obtain the final classification result; the above two ensemble learning models are subjected to K-fold cross validation, and the results are judged using the ROC curve AUC area to obtain the optimal model as the final electrode anomaly detection model.
[0171] The process described in the above embodiment is explained below through an embodiment in actual application.
[0172] Existing factory calibration usually randomly samples a certain proportion of glucose sensors in the same batch for in vitro experiments, and obtains calibration parameters for sensors that meet performance requirements and applies them to the same batch of sensors. If a few of the sampled sensors fail to meet performance requirements, the entire batch of sensors will be unqualified, and the reasons for the failure are difficult to trace. This application provides an auxiliary performance analysis solution for glucose sensors, which analyzes the sensor performance data generated in the process flow, facilitates sensor anomaly detection, and reduces the complexity of sensor performance analysis and the cost of manual analysis. Please refer to Figure 4 , Figure 4 A flow chart of a method for analyzing the auxiliary performance of a glucose sensor provided in an embodiment of the present application, the specific process is as follows:
[0173] S401: storing the process data in a cloud database.
[0174] S402: Retrieving process data from the database for feature extraction, and converting it into structured data and storing it in the database.
[0175] S403: Manual annotation added to the electrode sample.
[0176] The selected electrode samples were subjected to a 15-day in vitro long-term experiment to verify the performance of the electrode. The performance that met the standard was marked as 0, and the performance that did not meet the standard was marked as 1. Among them, the electrode performance verification includes the verification of the sensor electrode's hydration time, repeatability, long-term sensitivity change range, stability, linearity, response time, and anti-interference.
[0177] S404: Solution to the sample imbalance problem.
[0178] Electrode samples with no missing features in the above feature list are selected. For the problem of imbalance in the number of samples that meet the performance standards and those that do not meet the performance standards in the electrode samples, a data imbalance processing method combining data enhancement and loss function can be used.
[0179] S405: Feature selection.
[0180] S406: Building an electrode anomaly detection model.
[0181] S407: Use the above electrode anomaly detection model to perform electrode anomaly detection, and perform feature comparison on the abnormal electrodes to perform problem backtracking.
[0182] Specifically, the electrode anomaly detection model is used to detect the sampled electrodes of the new batch. If the electrode detection is abnormal, the difference between the average feature value list of the abnormal electrode and the historical normal electrode is compared to trace the problem in the relevant process flow. The input to the electrode anomaly detection model is the characteristics of the process data, that is, the structured data.
[0183] The development of cloud computing, computer vision and artificial intelligence technologies has provided new ideas for sensor anomaly detection. Applying the above technologies to auxiliary performance analysis of glucose sensors has increased the convenience of storage and analysis of sensor process data, reduced the complexity and threshold of sensor performance analysis and discrimination, made the sensor performance analysis process more standardized, and shortened the R&D cycle of glucose sensors.
[0184] The present application also provides a performance detection system for a glucose sensor, which includes a master node server, a node node server and an image warehouse server. The master node server is a control node of a Kubernetes container cluster, and the node node server is a computing node of the Kubernetes container cluster.
[0185] The master node server is used to control the node node server to download containers from the image warehouse server; the image warehouse server includes a database container, a feature extraction and selection container, a model training container and a model calling container;
[0186] The node server is used to train the electrode anomaly detection model by starting the container downloaded from the image warehouse server or to detect the performance of other glucose sensors using the electrode anomaly detection model;
[0187] Among them, the database container is used to obtain the process data of the glucose sensor, and the process data includes electrode glucose gradient experimental data and electrode anti-interference experimental data; the feature extraction and selection container is used to extract features from the process data to obtain electrode features, and add annotations to the electrode features according to the type of the glucose sensor to obtain electrode samples; the model training container is used to train the electrode anomaly detection model using the electrode samples; and the model calling container is used to use the electrode anomaly detection model to detect the performance of other glucose sensors.
[0188] The performance detection system of the above-mentioned glucose sensor also includes a user terminal and an administrator server connected to the master node server; the user terminal is used to upload the process data and the electrode performance data to the database of the database container; the administrator server is used to control the master node server to generate node creation instructions and / or mirror deployment instructions.
[0189] This embodiment implements performance detection of the glucose sensor based on the Kubernetes container cluster, further improving the detection efficiency and accuracy.
[0190] Furthermore, the process of extracting features and selecting containers to extract features from the process data to obtain electrode features includes: obtaining the linear relationship between solution concentration and signal current from the electrode glucose gradient experimental data, and determining the goodness of fit of the linear relationship between the solution concentration and the signal current; and extracting the average anti-interference rate for the target interfering substance from the electrode anti-interference experimental data.
[0191] Furthermore, the process data also includes temperature experimental data and / or electrode hydration data;
[0192] Correspondingly, the process of extracting features and selecting containers to extract features from the process data to obtain electrode features also includes:
[0193] A linear mapping relationship between temperature and sensor sensitivity is obtained from the temperature experimental data, and based on the linear mapping relationship between temperature and sensor sensitivity, the current change rate when the preset temperature is changed relative to the calibration temperature is obtained; and / or, the background current when hydration is complete and the impedance value of the electrode at a fixed frequency point when hydration is complete are extracted from the electrode hydration data.
[0194] Furthermore, the process data also includes any one or a combination of electrode size data, electrode enzyme point image and outer film thickness:
[0195] Correspondingly, the process of extracting features and selecting containers to extract features from the process data to obtain electrode features also includes:
[0196] Extract the actual size margin from the electrode size data, and determine the maximum difference between the actual size margin and the standard size margin; and / or, identify the enzyme spot area from the electrode enzyme spot image and count the pixel area of each enzyme spot area, and calculate the variance and total area of the pixel area of all the enzyme spot areas; and / or, calculate the absolute value of the difference between the measured membrane thickness and the standard membrane thickness based on the outer membrane thickness data.
[0197] Furthermore, the process data also includes electrode OCP test data, square resistance data, enzyme solution viscosity data and electrode outer film viscosity data;
[0198] Correspondingly, the process of extracting features and selecting containers to extract features from the process data to obtain electrode features also includes:
[0199] The absolute value of the deviation between the fluctuation amplitude of the open circuit voltage within a preset time period and the standard control threshold is extracted from the electrode OCP test data; and / or, the coefficient of variation of all square resistances of the substrate where the electrode is located is extracted from the square resistance data; and / or, the difference between the mean of the measured enzyme solution viscosity value and the standard control viscosity value is extracted from the enzyme solution viscosity data; and / or, the difference between the mean of the measured outer film viscosity value and the standard control viscosity value is extracted from the electrode outer film viscosity data.
[0200] Furthermore, it also includes:
[0201] A model training container is used to divide the electrode samples into a first type of electrode samples and a second type of electrode samples according to the annotation; wherein the number of the first type of electrode samples is greater than the number of the second type of electrode samples; and is also used to reduce the number of the first type of electrode samples by an ENN algorithm and expand the number of the second type of electrode samples by a Smote algorithm to obtain a training sample set if the deviation of the ratio of the number of the first type of electrode samples to the number of the second type of electrode samples is greater than a first preset value, and to calculate the ratio of the first type of electrode samples to the second type of electrode samples in the training sample set, and set a first penalty weight and a second penalty weight according to the ratio; wherein the first penalty weight is negatively correlated with the ratio, and the second penalty weight is positively correlated with the ratio; and is also used to assign a first penalty weight to the first type of electrode samples in the training sample set, and assign a second penalty weight to the second type of electrode samples in the training sample set.
[0202] Furthermore, the model training container is also used to use the random forest model to sort the importance of all electrode features in the electrode sample; it is also used to delete the electrode features in the electrode sample whose importance is less than or equal to the second preset value; it is also used to set the electrode features whose importance is greater than the second preset value and less than the third preset value as alternative electrode features; it is also used to calculate the influence of the alternative electrode features on the accuracy of the random forest model using the K-fold cross-validation algorithm, and delete the alternative electrode features in the electrode sample whose influence on the accuracy of the random forest model is less than the fourth preset value.
[0203] Furthermore, the process of the model training container using the electrode samples to train the electrode anomaly detection model includes: using the electrode samples to respectively train the stacking ensemble learning model and the bagging ensemble learning model; performing K-fold cross validation on the stacking ensemble learning model and the bagging ensemble learning model to obtain an ROC curve; and setting the model with the largest AUC area corresponding to the ROC curve in the stacking ensemble learning model and the bagging ensemble learning model as the electrode anomaly detection model.
[0204] The process described in the above embodiment is explained below through an embodiment in actual application.
[0205] See also Figure 5 , Figure 5 A structure diagram of a glucose sensor-assisted performance analysis system based on Kubernetes (a container orchestration engine) provided in an embodiment of the present application is used to implement the performance detection solution of any of the glucose sensors mentioned above.
[0206] like Figure 5 As shown, the above-mentioned system for assisting performance analysis of glucose sensors includes a container cluster system based on Kubernetes, including a user terminal 1, an administrator server 2, a master node (control node) server 3 connected thereto, a node node (computing node) server 4 connected to the master node server 3, and a mirror warehouse server 5 to which the node node server 4 can be connected. The node node server 4 includes a node1 node server 4-1, a node2 node server 4-2, and an extensible server 4-3. The containers in the mirror warehouse server 5 include a database container 5-1, a backend data processing container 5-2, a feature extraction and selection container 5-3, a model training container 5-4, a model call container 5-5, and an extensible container 5-6.
[0207] Among them, user terminals include mobile terminals and computer PCs, and users realize data interaction through mobile and PC APPs.
[0208] Among them, the administrator server integrated command line tool can perform operations such as creating, deleting, expanding and shrinking Kubernetes deployments, Pods and storage volumes.
[0209] Among them, the user terminal and administrator server interact with the master node server through API.
[0210] Among them, the master node server is the Kubernetes cluster control node, which is responsible for the management and control of the entire cluster and for allocating workloads to the node nodes.
[0211] The node servers include node1 server, node2 server and expandable servers that can be expanded according to actual working status.
[0212] Among them, the node server pulls containers related to business functions from the image warehouse server to ensure the implementation of business functions. If the server load is large, a new node server can be added for expansion.
[0213] Among them, the image warehouse server includes a database container, a backend data processing container, a feature extraction and selection container, a model training container, a model calling container and an expandable container.
[0214] The database container includes the MySQL component, which can be used to store sensor process data from the APP, manual annotation result data, structured data of feature lists stored after feature extraction, and related user data collected from the APP.
[0215] The back-end data processing container contains SpringBoot components, which are used to implement the interaction between front-end and back-end data and the processing of business data.
[0216] The feature extraction and selection container includes components such as pandas, numpy, opencv, and sklearn, which are used to extract process data features and perform feature selection and sample processing, and convert the selected features into structured data and store them in the database.
[0217] The model training container includes components such as pandas, numpy, and sklearn, which can load feature data and manually labeled result data from the database for model training.
[0218] Model call container: contains components such as pandas, numpy, and sklearn. It automatically downloads the latest and best electrode anomaly detection model and inputs electrode process characteristics to judge electrode performance.
[0219] The extensible container contains the basic components of the above containers and is used for secondary development, testing, and function expansion.
[0220] Combine the following Figure 5 Describe the workflow of the system:
[0221] Step C1: The system administrator transmits the command for creating a node and image deployment to the master server 3 through the command line tool on the administrator server 2;
[0222] Step C2: the master server 3 controls the node server 4 to download and run the container required for the glucose sensor auxiliary performance analysis system from the image warehouse server 5;
[0223] The node1 server 4-1 and the node2 server 4-2 download the same image, and the master server 3 controls and distributes the balanced workload to the node1 server and the node2 server. If the workload of the node1 and node2 is large, the system administrator transmits the command to create the scalable server 4-3 to the master server 3 through the command line tool on the administrator server 2 to expand the node to balance the workload.
[0224] The image downloaded from the image warehouse server 5 includes: a database container 5-1, a backend data processing container 5-2, a feature extraction and selection container 5-3, a model training container 5-4, and a model calling container 5-5.
[0225] Step C3: The master server 3 controls the container on the node server to be in running state;
[0226] Step C4: obtaining process data and manually marked electrode performance data from the APP of the user terminal 1, and storing them in the database of the database container 5-1 on the node server 4;
[0227] Step C5: Feature extraction and selection container 5-3 is used to extract process data feature list X from database container 5-1 list , performing sample balancing processing on the electrode samples and selecting features of the electrode samples, and converting the finally selected features into structured data and storing them in the database container 5 - 1 ;
[0228] Step C6: The model training container 5-4 can load feature data and manually labeled result data from the database container 5-1, normalize the sample features, allocate training sets and test sets of electrode samples, build an electrode anomaly detection model (ensemble learning model 1 and ensemble learning model 2, etc.), and use the AUC indicator to screen the model with better performance through K-fold cross validation and save it to the local model library of the node server 4.
[0229] Step C7: The model calling container 5-5 loads the trained model from the local model library and loads the process data feature list X of a numbered electrode from the database. list_new As the input of the electrode anomaly detection model, the final result of electrode performance judgment is obtained.
[0230] Among them, if it is an abnormal electrode, the difference between the average characteristic value list of the abnormal electrode and the historical normal electrode is compared to trace the problem in the relevant process flow; if the electrode detection result is normal, the normal electrode detection result is stored in the database.
[0231] The above embodiments have strong consistency, load balancing and strong portability.
[0232] The present application also provides a performance detection device for a glucose sensor, comprising:
[0233] A data acquisition module, used to acquire process data of the glucose sensor; wherein the process data includes electrode glucose gradient experimental data and electrode anti-interference experimental data;
[0234] A sample generation module, used for extracting features from the process data to obtain electrode features, and adding annotations to the electrode features according to the type of the glucose sensor to obtain electrode samples;
[0235] The model training module is used to train an electrode anomaly detection model using the electrode samples, and use the electrode anomaly detection model to detect the performance of other glucose sensors.
[0236] After acquiring the process data of the glucose sensor, this embodiment extracts electrode features from the process data and adds labels to the electrode features to obtain electrode samples. This embodiment uses the above electrode samples to train the electrode anomaly detection model. Since the above electrode features include features extracted from the electrode glucose gradient experimental data and the electrode anti-interference experimental data, the trained electrode anomaly detection model has the ability to detect whether the electrode of the glucose sensor is abnormal. After training the electrode anomaly detection model, the electrode anomaly detection model can be used to perform the performance detection operation of the glucose sensor without the need for in vitro experiments. Therefore, this embodiment can automatically detect the performance of the glucose sensor.
[0237] Furthermore, the process of extracting features from the process data to obtain electrode features by the sample generation module includes:
[0238] The linear relationship between solution concentration and signal current is obtained from the electrode glucose gradient experimental data, and the goodness of fit of the linear relationship between the solution concentration and the signal current is determined; and the average anti-interference rate for the target interfering substance is extracted from the electrode anti-interference experimental data.
[0239] Furthermore, the process data also includes temperature experimental data and / or electrode hydration data;
[0240] Correspondingly, the process of extracting features from the process data to obtain electrode features by the sample generation module also includes:
[0241] Obtaining a linear mapping relationship between temperature and sensor sensitivity from the temperature experimental data, and obtaining a current change rate when a preset temperature is changed relative to a calibration temperature according to the linear mapping relationship between temperature and sensor sensitivity;
[0242] And / or, extracting the background current when hydration is complete and the impedance value of the electrode at a fixed frequency when hydration is complete from the electrode hydration data.
[0243] Furthermore, the process data also includes any one or a combination of electrode size data, electrode enzyme point image and outer film thickness:
[0244] Correspondingly, the process of extracting features from the process data to obtain electrode features by the sample generation module also includes:
[0245] Extracting the actual size margin from the electrode size data, and determining the maximum difference between the actual size margin and the standard size margin;
[0246] and / or, identifying enzyme spot regions from the electrode enzyme spot image and counting the pixel area of each enzyme spot region, and calculating the variance and total area of the pixel areas of all enzyme spot regions;
[0247] And / or, the absolute value of the difference between the measured film thickness and the standard film thickness is calculated based on the outer film thickness data.
[0248] Furthermore, the process data also includes electrode OCP test data, square resistance data, enzyme solution viscosity data and electrode outer film viscosity data;
[0249] Correspondingly, the process of extracting features from the process data to obtain electrode features by the sample generation module also includes:
[0250] Extracting the absolute value of the deviation between the fluctuation amplitude of the open circuit voltage within a preset time period and the standard control threshold value from the electrode OCP test data;
[0251] and / or, extracting the coefficient of variation of all the sheet resistances of the substrate where the electrode is located from the sheet resistance data;
[0252] and / or, extracting the difference between the mean of the measured enzyme solution viscosity value and the standard control viscosity value from the enzyme solution viscosity data;
[0253] And / or, extracting the difference between the mean of the measured outer film viscosity values and the standard control viscosity value from the electrode outer film viscosity data.
[0254] Furthermore, it also includes:
[0255] A preprocessing module, used to divide the electrode samples into a first type of electrode samples and a second type of electrode samples according to the annotations; wherein the number of the first type of electrode samples is greater than the number of the second type of electrode samples; and also used to reduce the number of the first type of electrode samples by an ENN algorithm and expand the number of the second type of electrode samples by a Smote algorithm to obtain a training sample set if the deviation of the ratio of the number of the first type of electrode samples to the number of the second type of electrode samples is greater than a first preset value from 1; and also used to calculate the ratio of the first type of electrode samples to the second type of electrode samples in the training sample set, and set a first penalty weight and a second penalty weight according to the ratio; wherein the first penalty weight is negatively correlated with the ratio, and the second penalty weight is positively correlated with the ratio; and also used to assign a first penalty weight to the first type of electrode samples in the training sample set, and assign a second penalty weight to the second type of electrode samples in the training sample set.
[0256] Furthermore, the preprocessing module is also used to use the random forest model to sort the importance of all electrode features in the electrode sample; it is also used to delete the electrode features in the electrode sample whose importance is less than or equal to the second preset value; it is also used to set the electrode features whose importance is greater than the second preset value and less than the third preset value as alternative electrode features; it is also used to calculate the influence of the alternative electrode features on the accuracy of the random forest model using the K-fold cross-validation algorithm, and delete the alternative electrode features in the electrode sample whose influence on the accuracy of the random forest model is less than the fourth preset value.
[0257] Furthermore, the process of the model training module using the electrode samples to train the electrode anomaly detection model includes: using the electrode samples to respectively train the stacking ensemble learning model and the bagging ensemble learning model; performing K-fold cross validation on the stacking ensemble learning model and the bagging ensemble learning model to obtain the ROC curve; and setting the model with the largest AUC area corresponding to the ROC curve in the stacking ensemble learning model and the bagging ensemble learning model as the electrode anomaly detection model.
[0258] Since the embodiments of the system part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the system part, which will not be repeated here.
[0259] The present application also provides a storage medium on which a computer program is stored, and when the computer program is executed, the steps provided in the above embodiment can be implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0260] The present application also provides an electronic device, which may include a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps provided in the above embodiment may be implemented. Of course, the electronic device may also include various network interfaces, power supplies and other components.
[0261] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of this application.
[0262] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A performance detection method for a glucose sensor, It is characterized in that include: Obtaining process data of the glucose sensor; wherein the process data includes shape data, physical characteristic data and chemical characteristic data, the shape data includes electrode size data, electrode enzyme point image and outer film thickness, the physical characteristic data includes electrode OCP test data, square resistance data, enzyme solution viscosity data and electrode outer film viscosity data, and the chemical characteristic data includes electrode glucose gradient experiment data and electrode anti-interference experiment data; Extracting features from the process data to obtain electrode features, and adding annotations to the electrode features according to the type of the glucose sensor to obtain electrode samples; Using the electrode samples to train an electrode anomaly detection model, and using the electrode anomaly detection model to detect the performance of other glucose sensors; The process of extracting features from the process data to obtain electrode features includes: Extracting the actual size margin from the electrode size data, and determining the maximum difference between the actual size margin and the standard size margin; Identify enzyme spot regions from the electrode enzyme spot image and count the pixel area of each enzyme spot region, and calculate the variance and total area of the pixel areas of all enzyme spot regions; Calculating the absolute value of the difference between the measured film thickness and the standard film thickness according to the outer film thickness data; Extracting the absolute value of the deviation between the fluctuation amplitude of the open circuit voltage within a preset time period and the standard control threshold value from the electrode OCP test data; Extracting the coefficient of variation of all the square resistances of the substrate where the electrode is located from the square resistance data; Extracting the difference between the mean of the measured enzyme solution viscosity value and the standard control viscosity value from the enzyme solution viscosity data; Extract the difference between the mean value of the measured outer film viscosity value and the standard control viscosity value from the electrode outer film viscosity data; Wherein, using the electrode samples to train an electrode anomaly detection model includes: Using the electrode samples to train a stacking ensemble learning model and a bagging ensemble learning model respectively; Performing K-fold cross validation on the stacking ensemble learning model and the bagging ensemble learning model to obtain an ROC curve; The model with the largest AUC area corresponding to the ROC curve in the stacking ensemble learning model and the bagging ensemble learning model is set as the electrode abnormality detection model.
2. The performance detection method of the glucose sensor according to claim 1, It is characterized in that Extracting features from the process data to obtain electrode features includes: Obtaining a linear relationship between solution concentration and signal current from the electrode glucose gradient experimental data, and determining a goodness of fit of the linear relationship between the solution concentration and the signal current; The average anti-interference rate for the target interfering substance is extracted from the electrode anti-interference experimental data.
3. The performance detection method of the glucose sensor according to claim 2, It is characterized in that The process data also includes temperature experimental data and / or electrode hydration data; Correspondingly, the process of extracting features from the process data to obtain electrode features also includes: Obtaining a linear mapping relationship between temperature and sensor sensitivity from the temperature experimental data, and obtaining a current change rate when a preset temperature is changed relative to a calibration temperature according to the linear mapping relationship between temperature and sensor sensitivity; And / or, extracting the background current when hydration is complete and the impedance value of the electrode at a fixed frequency when hydration is complete from the electrode hydration data.
4. The performance detection method of the glucose sensor according to claim 1, It is characterized in that Before using the electrode sample to train the electrode anomaly detection model, the method further includes: Dividing the electrode samples into a first type of electrode samples and a second type of electrode samples according to the marking; wherein the number of the first type of electrode samples is greater than the number of the second type of electrode samples; If the deviation of the ratio of the number of the first type of electrode samples to the number of the second type of electrode samples from 1 is greater than a first preset value, the ENN algorithm is used to reduce the number of the first type of electrode samples, and the Smote algorithm is used to increase the number of the second type of electrode samples to obtain a training sample set; Calculating a ratio of the first type of electrode samples to the second type of electrode samples in the training sample set, and setting a first penalty weight and a second penalty weight according to the ratio; wherein the first penalty weight is negatively correlated with the ratio, and the second penalty weight is positively correlated with the ratio; A first penalty weight is assigned to the first type of electrode samples in the training sample set, and a second penalty weight is assigned to the second type of electrode samples in the training sample set.
5. The performance detection method of the glucose sensor according to claim 1, It is characterized in that Before using the electrode sample to train the electrode anomaly detection model, the method further includes: Using a random forest model to rank the importance of all electrode features in the electrode sample; Deleting electrode features whose importance is less than or equal to a second preset value in the electrode sample; Setting an electrode feature whose importance is greater than a second preset value and less than a third preset value as a candidate electrode feature; The K-fold cross validation algorithm is used to calculate the influence of the candidate electrode features on the accuracy of the random forest model, and the candidate electrode features in the electrode samples whose influence on the accuracy of the random forest model is less than a fourth preset value are deleted.
6. A performance detection device for a glucose sensor, It is characterized in that include: A data acquisition module, used to acquire process data of the glucose sensor; wherein the process data includes shape data, physical characteristic data and chemical characteristic data, the shape data includes electrode size data, electrode enzyme point image and outer film thickness, the physical characteristic data includes electrode OCP test data, square resistance data, enzyme solution viscosity data and electrode outer film viscosity data, and the chemical characteristic data includes electrode glucose gradient experiment data and electrode anti-interference experiment data; A sample generation module, used for extracting features from the process data to obtain electrode features, and adding annotations to the electrode features according to the type of the glucose sensor to obtain electrode samples; A model training module, used to train an electrode anomaly detection model using the electrode samples, and to detect the performance of other glucose sensors using the electrode anomaly detection model; The process of extracting features from the process data to obtain electrode features by the sample generation module includes: Extracting the actual size margin from the electrode size data, and determining the maximum difference between the actual size margin and the standard size margin; Identify enzyme spot regions from the electrode enzyme spot image and count the pixel area of each enzyme spot region, and calculate the variance and total area of the pixel areas of all enzyme spot regions; Calculating the absolute value of the difference between the measured film thickness and the standard film thickness according to the outer film thickness data; Extracting the absolute value of the deviation between the fluctuation amplitude of the open circuit voltage within a preset time period and the standard control threshold value from the electrode OCP test data; Extracting the coefficient of variation of all the square resistances of the substrate where the electrode is located from the square resistance data; Extracting the difference between the mean of the measured enzyme solution viscosity value and the standard control viscosity value from the enzyme solution viscosity data; Extract the difference between the mean value of the measured outer film viscosity value and the standard control viscosity value from the electrode outer film viscosity data; The process of the model training module using the electrode samples to train the electrode anomaly detection model includes: using the electrode samples to respectively train a stacking ensemble learning model and a bagging ensemble learning model; performing K-fold cross validation on the stacking ensemble learning model and the bagging ensemble learning model to obtain an ROC curve; and setting the model with the largest AUC area corresponding to the ROC curve in the stacking ensemble learning model and the bagging ensemble learning model as the electrode anomaly detection model.
7. A performance detection system for a glucose sensor, It is characterized in that It includes a master node server, a node node server and an image warehouse server; the master node server is the control node of the Kubernetes container cluster, and the node node server is the computing node of the Kubernetes container cluster; The master node server is used to control the node node server to download containers from the image warehouse server; the image warehouse server includes a database container, a feature extraction and selection container, a model training container and a model calling container; The node server is used to train the electrode anomaly detection model by starting the container downloaded from the image warehouse server or to detect the performance of other glucose sensors using the electrode anomaly detection model; The database container is used to obtain process data of the glucose sensor, the process data includes shape data, physical feature data and chemical feature data, the shape data includes electrode size data, electrode enzyme point image and outer film thickness, the physical feature data includes electrode OCP test data, square resistance data, enzyme solution viscosity data and electrode outer film viscosity data, the chemical feature data includes electrode glucose gradient experimental data and electrode anti-interference experimental data; the feature extraction and selection container is used to extract features from the process data to obtain electrode features, and add annotations to the electrode features according to the type of the glucose sensor to obtain electrode samples; the model training container is used to train an electrode anomaly detection model using the electrode samples; the model calling container is used to detect the performance of other glucose sensors using the electrode anomaly detection model; The process of extracting features and selecting a container to extract features from the process data to obtain electrode features includes: Extracting the actual size margin from the electrode size data, and determining the maximum difference between the actual size margin and the standard size margin; Identify enzyme spot regions from the electrode enzyme spot image and count the pixel area of each enzyme spot region, and calculate the variance and total area of the pixel areas of all enzyme spot regions; Calculating the absolute value of the difference between the measured film thickness and the standard film thickness according to the outer film thickness data; Extracting the absolute value of the deviation between the fluctuation amplitude of the open circuit voltage within a preset time period and the standard control threshold value from the electrode OCP test data; Extracting the coefficient of variation of all the square resistances of the substrate where the electrode is located from the square resistance data; Extracting the difference between the mean of the measured enzyme solution viscosity value and the standard control viscosity value from the enzyme solution viscosity data; Extract the difference between the mean value of the measured outer film viscosity value and the standard control viscosity value from the electrode outer film viscosity data; Among them, the process of the model training container using the electrode samples to train the electrode anomaly detection model includes: using the electrode samples to respectively train the stacking ensemble learning model and the bagging ensemble learning model; performing K-fold cross validation on the stacking ensemble learning model and the bagging ensemble learning model to obtain an ROC curve; and setting the model with the largest AUC area corresponding to the ROC curve in the stacking ensemble learning model and the bagging ensemble learning model as the electrode anomaly detection model.
8. The performance detection system of the glucose sensor according to claim 7, It is characterized in that Also included are a user terminal and an administrator server connected to the master node server; The user terminal is used to upload the process data and the electrode performance data to the database of the database container; The administrator server is used to control the master node server to generate node creation instructions and / or image deployment instructions.
9. An electronic device, It is characterized in that The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the performance detection method of the glucose sensor according to any one of claims 1 to 5 when calling the computer program in the memory.
10. A storage medium, It is characterized in that The storage medium stores computer executable instructions, and when the computer executable instructions are loaded and executed by the processor, the steps of the performance detection method of the glucose sensor according to any one of claims 1 to 5 are implemented.
