Temperature compensation method for electrochemical sensors and related devices
By constructing a temperature compensation space and optimizing the temperature compensation scheme of the electrochemical sensor according to priority and cumulative number of times, the problem of high computational complexity of traditional methods is solved, and efficient and accurate temperature compensation effect is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-17
- Publication Date
- 2026-03-24
AI Technical Summary
Traditional temperature compensation methods for electrochemical sensors are computationally complex and cannot quickly and effectively determine the optimal temperature compensation circuit, resulting in poor performance and a large workload. Furthermore, temperature compensation schemes for different electrochemical sensors cannot be adapted to each other, affecting detection accuracy.
By constructing a temperature compensation space, the target solution is quickly located according to the priority of the temperature compensation solution. The priority is dynamically updated by combining the cumulative number of times and the degree of fit, thereby optimizing the temperature compensation scheme, reducing computational complexity and improving fit.
This method enables the rapid and efficient determination of temperature compensation schemes for electrochemical sensors, improving detection accuracy and adaptability while reducing computational complexity and design costs.
Smart Images

Figure CN121347618B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electrochemical sensor technology, and in particular to a temperature compensation method and related apparatus for an electrochemical sensor. Background Technology
[0002] An electrochemical sensor is a device for detecting the concentration of an analyte based on electrochemical principles. It converts the relationship between redox reactions and the concentration of the analyte into an electrical signal output, enabling rapid and accurate detection of the analyte concentration. However, electrochemical reactions are affected by temperature; temperature influences the initial current output, thus affecting the relationship between the output current and the analyte concentration. To further improve the accuracy of analyte concentration measurement, a temperature compensation circuit is needed. This circuit compensates for the temperature characteristics of the electrochemical sensor, ensuring a constant output voltage across different temperatures and offsetting the influence of operating temperature or ambient temperature on the output current.
[0003] The key to the temperature compensation circuit lies in the selection of the thermistor and the fixed resistor. Traditional resistor selection methods are mostly exhaustive methods, such as repeated enumeration. Due to the huge space of resistor combinations and high computational complexity, exhausting all combinations is not practical. Moreover, the optimal temperature compensation circuit obtained may not be practical, resulting in poor performance of electrochemical sensors and a large workload. Summary of the Invention
[0004] This application provides a temperature compensation method and related apparatus for an electrochemical sensor to improve the efficiency and accuracy of determining the temperature compensation scheme for the electrochemical sensor.
[0005] In a first aspect, embodiments of this application provide a temperature compensation method for an electrochemical sensor, comprising:
[0006] If the first temperature compensation space is detected to be non-empty, determine whether there is a temperature compensation solution for the current current sample data group in the first temperature compensation space according to the priority sorting of each temperature compensation solution in the first temperature compensation space. The temperature compensation solution includes a first resistor, a second resistor, a thermistor, and a thermistor index for constructing a temperature compensation loop. The current current sample data group includes multiple current values at different operating temperatures.
[0007] If a temperature compensation solution for the current current sample data group exists in the first temperature compensation space, then the temperature compensation solution for the current current sample data group is determined as the target solution.
[0008] Within the first temperature compensation space, the temperature compensation solution of the current current sample data group is determined as the cumulative number of times the target solution is obtained;
[0009] Determine the degree of fit of the target solution, wherein the degree of fit is used to characterize the comprehensive adaptability of the target solution to the current current sample data set and the historical current sample data set;
[0010] The priority of the target solution is determined based on the degree of fit and the cumulative number of times.
[0011] The first temperature compensation space is updated according to the priority of the target solution to obtain the second temperature compensation space, so as to perform temperature compensation on the corresponding electrochemical sensor by using the temperature compensation solution of the subsequent current sample data group determined in the second temperature compensation space.
[0012] Wherein, determining the fitness level of the target solution includes:
[0013] Based on the target solution, determine multiple first output voltages for the current current sample data group;
[0014] Based on the maximum and minimum output voltages among the plurality of first output voltages, the relative fluctuation error among the plurality of first output voltages is determined, and the first fitness of the target solution is obtained;
[0015] Obtain the fitness of at least one historical current sample data group corresponding to the target solution, and obtain at least one second fitness;
[0016] The degree of fit is determined based on the first fitness and the at least one second fitness.
[0017] Wherein, determining the fitness level based on the first fitness and the at least one second fitness includes:
[0018] The adaptation effect of the first fitness and the at least one second fitness is evaluated according to the preset rules to obtain a first score and at least one second score.
[0019] The first score and the at least one second score are fused together to obtain the third score of the target solution;
[0020] The scores of each temperature compensation solution in the first temperature compensation space are merged to obtain the fourth score;
[0021] The degree of fit is determined based on the third and fourth scores.
[0022] The step of detecting that the first temperature compensation space is not empty, and determining whether there is a temperature compensation solution for the current current sample data group in the first temperature compensation space according to the priority order of each temperature compensation solution in the first temperature compensation space, includes:
[0023] If the first temperature compensation solution is not the temperature compensation solution of the current current sample data group, then based on the second temperature compensation solution, multiple second output voltages of the current current sample data group are determined, with the first temperature compensation solution having a higher priority than the second temperature compensation solution.
[0024] Based on the plurality of second output voltages, determine the third fitness of the second temperature compensation solution;
[0025] Based on the plurality of second output voltages and the third fitness, determine whether the second temperature-compensated solution is the temperature-compensated solution of the current current sample data set.
[0026] The step of determining whether the second temperature-compensated solution is a temperature-compensated solution of the current current sample data group based on the plurality of second output voltages and the third fitness includes:
[0027] If each of the plurality of second output voltages is detected to be within the voltage threshold range, and the third fitness is less than the fitness threshold, then the second temperature compensation solution is determined to be the temperature compensation solution of the current current sample data group.
[0028] The step of determining the priority of the target solution based on the degree of fit and the cumulative number of iterations includes:
[0029] Obtain the number of historical current sample data sets;
[0030] The generality of the target solution is determined based on the cumulative number of times and the quantity.
[0031] The priority of the target solution is determined based on the degree of adaptability and the degree of generality.
[0032] The method further includes:
[0033] If the first temperature compensation space is detected to be empty or there is no temperature compensation solution for the current current sample data group in the first temperature compensation space, then according to the engineering feasible constraints, the first resistor, the second resistor, the thermistor and the thermistor index are combined to construct at least one reference temperature compensation solution.
[0034] The reference temperature compensation solution that first satisfies the range constraint and stability constraint of the output voltage among the at least one reference temperature compensation solution is determined as the target temperature compensation solution of the current current sample data group.
[0035] Determine the priority of the target temperature compensation solution;
[0036] Based on the target temperature compensation solution and its priority, the first temperature compensation space is updated to obtain the third temperature compensation space.
[0037] Secondly, embodiments of this application provide a temperature compensation device for an electrochemical sensor, comprising:
[0038] The first determining unit is used to detect that the first temperature compensation space is not empty, and to determine whether there is a temperature compensation solution for the current current sample data group in the first temperature compensation space according to the priority sorting of each temperature compensation solution in the first temperature compensation space. The temperature compensation solution includes a first resistor, a second resistor, a thermistor, and a thermistor index for constructing a temperature compensation loop. The current current sample data group includes multiple current values at different operating temperatures.
[0039] The second determining unit is configured to determine the temperature compensation solution of the current current sample data group as the target solution if a temperature compensation solution of the current current sample data group exists in the first temperature compensation space; and to determine the cumulative number of times the temperature compensation solution of the current current sample data group is determined as the target solution in the first temperature compensation space.
[0040] The third determining unit is used to determine the cumulative number of times the temperature compensation solution of the current current sample data group is determined as the target solution in the first temperature compensation space;
[0041] The fourth determining unit is used to determine the degree of fit of the target solution, wherein the degree of fit is used to characterize the comprehensive adaptability of the target solution to the current current sample data group and the historical current sample data group;
[0042] The fifth determining unit is used to determine the priority of the target solution based on the degree of fit and the cumulative number of times.
[0043] An update unit is used to update the first temperature compensation space according to the priority of the target solution to obtain a second temperature compensation space, so as to perform temperature compensation on the corresponding electrochemical sensor by using the temperature compensation solution of the subsequent current sample data group determined in the second temperature compensation space.
[0044] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and executable program code stored in the memory and executable on the processor, wherein the processor executes the executable program code and performs the steps of the method described in the first aspect.
[0045] Fourthly, embodiments of this application provide a computer-readable storage medium storing executable program code, the executable program code including execution instructions for performing the steps of the method as described in the first aspect.
[0046] Fifthly, embodiments of this application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in the first aspect of embodiments of this application. The computer program product may be a software installation package.
[0047] As can be seen, in this embodiment, firstly, it is detected that the first temperature compensation space is not empty. Based on the priority ranking of each temperature compensation solution in the first temperature compensation space, it is determined whether a temperature compensation solution for the current current sample data group exists in the first temperature compensation space. The temperature compensation solution includes a first resistor, a second resistor, a thermistor, and a thermistor index for constructing a temperature compensation loop. The current current sample data group includes multiple current values at different operating temperatures. Then, if a temperature compensation solution for the current current sample data group exists in the first temperature compensation space, the temperature compensation solution for the current current sample data group is determined as the target solution. The determination is made in the first... In a temperature compensation space, the temperature compensation solution of the current current sample data set is determined as the cumulative number of times the target solution is obtained. Next, the fit degree of the target solution is determined, which characterizes the comprehensive adaptability of the target solution to the current current sample data set and historical current sample data sets. Then, based on the fit degree and the cumulative number of times, the priority of the target solution is determined. Finally, the first temperature compensation space is updated according to the priority of the target solution to obtain a second temperature compensation space, so that temperature compensation can be performed on the corresponding electrochemical sensor using the temperature compensation solution of the subsequent current sample data set determined in the second temperature compensation space.
[0048] This application constructs a temperature compensation space and quickly locates the target solution corresponding to the current current sample data group according to the priority of temperature compensation solutions, without needing to traverse the entire dataset, thus reducing computational complexity. Furthermore, by iteratively optimizing the priority of each temperature compensation solution and the temperature compensation space based on the cumulative number of times the target solution is selected and the degree of dynamic adaptation, subsequent samples can quickly and efficiently determine a temperature compensation scheme that meets the compensation requirements of the electrochemical sensor, while ensuring the practical adaptability and feasibility of the temperature compensation scheme, thereby improving the temperature compensation effect of the electrochemical sensor. Attached Figure Description
[0049] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 This is a system architecture diagram of a temperature compensation system provided in an embodiment of this application;
[0051] Figure 2 This is a schematic flowchart of a temperature compensation method for an electrochemical sensor provided in an embodiment of this application;
[0052] Figure 3 This is a flowchart illustrating the process of determining the fit of a target solution according to an embodiment of this application;
[0053] Figure 4 This is a flowchart illustrating a method for determining the priority of a target solution, as provided in an embodiment of this application.
[0054] Figure 5 This is a schematic flowchart of another temperature compensation method for an electrochemical sensor provided in an embodiment of this application;
[0055] Figure 6 This is a functional unit block diagram of a temperature compensation device for an electrochemical sensor provided in an embodiment of this application;
[0056] Figure 7 This is a functional unit block diagram of another electrochemical sensor temperature compensation device provided in the embodiments of this application;
[0057] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0058] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0059] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0060] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0061] An electrochemical sensor is a device for detecting the concentration of an analyte based on electrochemical principles, such as the concentration of a gas, liquid, or ion. It converts the relationship between a redox reaction and the concentration of the analyte into an electrical signal output, enabling rapid and accurate detection. However, electrochemical reactions are affected by temperature; temperature influences the initial current output, thus affecting the relationship between the output current and the concentration of the analyte. To further improve the accuracy of analyte concentration measurement, a temperature compensation circuit is needed. This circuit compensates for the temperature characteristics of the electrochemical sensor, ensuring a constant output voltage across different temperatures and offsetting the influence of operating or ambient temperature on the output current.
[0062] The key to the temperature compensation circuit lies in the selection of the thermistor and the fixed resistor. Traditional resistor selection methods are mostly exhaustive methods, such as repeated enumeration. Due to the huge space of resistor combinations and high computational complexity, exhausting all combinations is not practical. Moreover, the optimal temperature compensation circuit obtained may not be practical, resulting in poor performance of electrochemical sensors and a large workload.
[0063] Furthermore, there are certain differences between individual electrochemical sensors. Under static conditions with the same analyte concentration and the same operating temperature, the output current amplitude of different electrochemical sensors will be discrete. When the temperature changes, the response law of the output current of each electrochemical sensor to temperature adjustment will also be different. The determined temperature compensation scheme cannot be adapted to all electrochemical sensors. This not only easily leads to poor compensation effect and insufficient detection accuracy of analyte concentration, but also significantly increases the selection workload and design cost.
[0064] To address the aforementioned issues, this application provides a temperature compensation method and related apparatus for an electrochemical sensor. The embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0065] Please see Figure 1 , Figure 1 This is a system architecture diagram of a temperature compensation system provided in an embodiment of this application. For example... Figure 1 As shown, the temperature compensation system 100 includes a data acquisition module 101, a solution space module 102, a temperature compensation determination module 103, and a data update module 104; wherein the data acquisition module 101, the solution space module 102, the temperature compensation determination module 103, and the data update module 104 are interconnected.
[0066] The data acquisition module 101 is used to acquire a set of current sample data groups obtained from actual testing. Each current sample data group in the set contains data measured at multiple temperatures.
[0067] The solution space module 102 is used to store the temperature compensation solutions of the current sample data group that has been calculated. Each temperature compensation solution consists of a series resistor, a parallel resistor, a thermistor, and a thermistor index. Each temperature compensation solution corresponds to a priority. Based on the priority order, the temperature compensation solutions are stored in the solution space module 102.
[0068] The values of series resistance, parallel resistance, thermistor, and thermistor index are all limited to the E-96 series standards and the discrete compliant sets sold by manufacturers.
[0069] The temperature compensation determination module 103 is used to determine whether a solution in the solution space module 102 is a solution for the current current sample data group according to the priority of each solution. If it is, the solution is output so that the corresponding electrochemical sensor can perform temperature compensation. If not, an exhaustive search method can be used as a fallback solution to quickly obtain an effective temperature compensation solution and output it so that the corresponding electrochemical sensor can perform temperature compensation.
[0070] Furthermore, if the solution space module 102 is empty, an exhaustive method can be used to determine the effective temperature compensation solution for the current current sample data group.
[0071] Specifically, each compliant combination of series resistance, parallel resistance, thermistor, and thermistor index is selected one by one to calculate the output voltage and the relative fluctuation error of the output voltage. It is not necessary to traverse all combinations. Once the first parameter combination that can satisfy all constraints is found, that is, the parameter combination in which the output voltage satisfies the interval constraint and the relative fluctuation error satisfies the stability constraint, the traversal stops and the combination is determined as the temperature compensation solution of the current electrochemical sensor.
[0072] The data update module 104 is used to update the solution space module 102.
[0073] Specifically, for the effective temperature compensation solution obtained by exhaustive search, the fitness rate of the solution is determined based on the fitness of the output voltage corresponding to the solution; and the generality of the solution is determined based on the number of historical current sample data groups and the cumulative number of times the solution appears. Then, based on the fitness rate and the generality, the priority of the effective temperature compensation solution is calculated, and the effective temperature compensation solution is added to the solution space module 102 according to the priority of the effective temperature compensation solution.
[0074] Specifically, if the solution space module 102 has a solution for the current current sample data group, then the adaptability and universality of the solution are updated, and then the priority of the solution is updated. The solution space module 102 is updated based on the updated priority.
[0075] Based on this, this application provides a temperature compensation method and related apparatus for an electrochemical sensor, which will be described in detail below with reference to the accompanying drawings.
[0076] Please see Figure 2 , Figure 2 This is a schematic flowchart of a temperature compensation method for an electrochemical sensor provided in an embodiment of this application, as shown below. Figure 2 As shown, the method includes the following steps:
[0077] S210, if the first temperature compensation space is not empty, determine whether there is a temperature compensation solution for the current current sample data group in the first temperature compensation space according to the priority order of each temperature compensation solution in the first temperature compensation space.
[0078] The temperature compensation solution includes a first resistor, a second resistor, a thermistor, and a thermistor index for constructing the temperature compensation loop, and the current current sample data set includes current values at multiple different operating temperatures.
[0079] In one possible embodiment, the thermistor is connected in series with the first resistor to form a series branch; this series branch and the second resistor form a parallel structure to form a temperature compensation circuit. The temperature compensation circuit and the electrochemical sensor are connected in series to the power supply circuit, forming a voltage divider system. Specifically, when the temperature changes, the resistance of the thermistor will change linearly or non-linearly with the temperature. The total resistance of the branch is adjusted by the first resistor connected in series, and the voltage division ratio is optimized by the parallel structure with the second resistor, thereby dynamically correcting the voltage division across the electrochemical sensor, offsetting the drift of the electrochemical sensor output signal caused by temperature changes, and ensuring the stability and accuracy of the electrochemical sensor output.
[0080] The first resistor can be a series resistor R. CThe first resistor is used to set the reference current limiting or voltage division ratio of the circuit; the second resistor can be a parallel resistor R. B Thermistors are used to fine-tune the equivalent resistance of the circuit and optimize the compensation accuracy. Thermistors can be negative temperature coefficient (NTC) thermistors, whose resistance decreases significantly with increasing temperature and increases with decreasing temperature. They are the benchmark for calculating the actual resistance of thermistors at different temperatures. The thermistor index B is a key parameter characterizing the rate of change of NTC thermistors with temperature. The larger the B value, the faster the resistance decreases with temperature. Its value directly determines the response sensitivity of the compensation circuit to temperature changes.
[0081] Among them, different electrochemical sensors have individual differences, and the relationship between current and temperature of each electrochemical sensor has unique deviations. By using current values at multiple different operating temperatures, the current-temperature characteristic curve of the electrochemical sensor can be accurately determined, providing data basis for subsequent screening of suitable combinations of first resistor, second resistor, thermistor and thermistor index, ensuring that the temperature compensation solution can be specifically matched to the individual characteristics of the electrochemical sensor.
[0082] The interval between multiple different operating temperatures is T. For example, the different operating temperatures include (273.15K, 298.15K, 323.15K), which is (0℃, 25℃, 50℃), and T is 25℃.
[0083] The first temperature compensation space is used to store the temperature compensation solutions for the calculated current sample data set. Each temperature compensation solution is a first resistance R that satisfies all constraints. C Second resistor R B Thermistor R 25 The permutations and combinations of the thermal index B. All constraints include engineering feasibility constraints, range constraints on the output voltage, and stability constraints.
[0084] Among the constraints that the project can achieve are the limitations on the value of the fixed resistor and the NTC thermistor R. 25 And the limiting conditions for the value of the thermistor index B. The fixed resistor includes a first resistor and a second resistor, and the limiting conditions for their values are used to indicate that the resistance values are within the national resistance nominal value standard E-96 series. Specifically, the values of the first resistor and the second resistor are limited to the following ranges:
[0085] [1.00,1.02,1.05,1.07,1.10,1.13,1.15,1.18,1.21,1.24,1.27,1.30,1.33,1.37,1.40,1.43,1.47,1.50,1.54,1.58,1.62,1.65,1.69,1.74,1.78,1.82,1.87,1.91,1.96,2.00,2.05,2.10,2.15,2.21,2.26,2.32,2.37,2.43,2.49,2.55,2.61,2.67,2.74,2.80,2.87,2.94,3.01,3.09, 3.16,3.24,3.32,3.40,3.48,3.57,3.65,3.74,3.83,3.92,4.02,4.12,4.22,4.32,4.42,4.53,4.64,4.75,4.87,4.99,5.11,5.23,5.36,5.49,5.62,5.76,5.90,6.04,6.19,6.34,6.49,6.65,6.81,6.98,7.15,7.32,7.50,7.68,7.87,8.06,8.25,8.45,8.66,8.87,9.09,9.31,9.53,9.76).
[0086] Among them, NTC thermistor R 25 Thermistor index B is within the standard series provided by resistor manufacturers and has high versatility, fitting over 80% or 90% of devices. For example, [R 25 =100Ω, B 25 / 50 =3000K; R 25 =150Ω, B 25 / 50 =3000K; R 25 =150Ω, B 25 / 50 =3200K; R 25 =220Ω, B 25 / 50 =3000K; R 25 =220Ω, B 25 / 50 =3250K]. Among them, B 25 / 50 B is calculated based on 25℃ (298.15K) and 50℃ (323.15K).
[0087] Among them, all temperature compensation solutions in the first temperature compensation space satisfy the engineering realizability constraints.
[0088] Among them, the range constraint of output voltage refers to the numerical range limitation of the output voltage of the electrochemical sensor under a specific concentration of analyte; the stability constraint of output voltage refers to the relative fluctuation error threshold limitation of the output voltage of the electrochemical sensor within a specific concentration of analyte and a specified temperature range.
[0089] Specifically, under specific analyte concentration conditions, the output voltage V of the electrochemical sensor within a specified temperature range must fall within a preset numerical range, such as 10mV~20mV, to ensure that the output voltage of the electrochemical sensor is within a reasonable and effective numerical range under specific analyte concentration conditions.
[0090] Specifically, under specific analyte concentration conditions, the relative fluctuation error of the output voltage of the electrochemical sensor at different temperature points within a specified temperature range needs to be controlled within a preset threshold, such as 3%, 5%, or 10%. Based on the degree of influence of temperature changes on the output voltage, the consistency and reliability of the output voltage of the electrochemical sensor under temperature fluctuation scenarios are ensured, avoiding deviations from the true value in measurement results due to temperature differences.
[0091] In one possible embodiment, detecting that the first temperature compensation space is not empty, and determining whether there is a temperature compensation solution for the current current sample data group in the first temperature compensation space according to the priority order of each temperature compensation solution in the first temperature compensation space, includes: detecting that the first temperature compensation solution is not a temperature compensation solution for the current current sample data group, then determining multiple second output voltages of the current current sample data group according to the second temperature compensation solution, wherein the priority of the first temperature compensation solution is higher than the priority of the second temperature compensation solution; determining a third fitness of the second temperature compensation solution according to the multiple second output voltages; and determining whether the second temperature compensation solution is a temperature compensation solution for the current current sample data group according to the multiple second output voltages and the third fitness.
[0092] If the first temperature compensation space is not empty, it is determined whether each solution in the first temperature compensation space is a solution of the current current sample data group according to its priority.
[0093] In this process, the highest priority solution is extracted from the first temperature compensation space to obtain the combined values of the first resistor, the second resistor, the thermistor, and the thermistor index. The theoretical resistance value of the NTC thermistor at temperature T is then calculated. The specific formula (1) is as follows:
[0094] ,
[0095] in, This is the zero-power resistance value of the NTC thermistor at 25°C, i.e., the nominal resistance value. The thermistor index is the thermistor index of the NTC thermistor. The possible values are (273.15K, 298.15K, 323.15K). The value of can be extended to other ranges according to the temperature gradient.
[0096] Among them, based on the theoretical resistance value of NTC thermistors First resistor Second resistor Calculate the total resistance of the temperature compensation circuit. The specific formula (2) is as follows:
[0097] ,
[0098] in, and The value of the resistor conforms to the national standard for E-96 series resistor values.
[0099] Among them, based on the total resistance of the temperature compensation circuit and the current sample data set, the output voltage of the electrochemical sensor at each operating temperature is calculated to obtain multiple output voltages, and the specific formula (3) is as follows:
[0100] ,
[0101] in, The output voltage of the electrochemical sensor at different temperatures, This refers to the raw output current, i.e., the current sample data set. The specific values are obtained through experimental testing, such as measurements taken by an electrochemical sensor at temperatures of (273.15K, 298.15K, 323.15K). [20, 60, 180].
[0102] Furthermore, the relative fluctuation error of the solution, i.e., the fitness, is determined based on multiple output voltages. Specifically, it is determined based on the maximum and minimum output voltages among the multiple output voltages, as shown in the following formula (4):
[0103] ,
[0104] in, For fitness, This represents the minimum output voltage at different temperatures. This represents the maximum output voltage at different temperatures.
[0105] This involves determining whether multiple output voltages satisfy interval constraints and stability constraints.
[0106] In one possible embodiment, determining whether the second temperature-compensated solution is a temperature-compensated solution of the current current sample data group based on the plurality of second output voltages and the third fitness includes: detecting that each of the plurality of second output voltages is within a voltage threshold range, and that the third fitness is less than a fitness threshold, then determining that the second temperature-compensated solution is a temperature-compensated solution of the current current sample data group.
[0107] Specifically, for each current sample data set, its temperature compensation solution must satisfy both interval constraints and stability constraints for multiple output voltages. If both interval constraints and stability constraints are satisfied simultaneously, then the solution is the effective temperature compensation solution for the current current sample data set.
[0108] For example, at operating temperatures of 273.15K, 298.15K, and 323.15K, the range constraint specifically refers to setting the output voltage... Limited to a range of 10mV to 20mV; stability requirements limit the fitness level to no more than the fitness threshold. The fitness threshold can be 3%, 5%, 10%, etc. The specific formula (5) is as follows:
[0109] .
[0110] Specifically, for the current temperature compensation solution to be evaluated, if it does not simultaneously satisfy the interval constraint and the stability constraint (i.e., it only satisfies the interval constraint but not the stability constraint, or it only satisfies the stability constraint but not the interval constraint), then the next priority temperature compensation solution is extracted from the first temperature compensation space. Based on the next priority temperature compensation solution, the theoretical resistance value of the NTC thermistor, the total resistance of the temperature compensation circuit, and multiple output voltages of the electrochemical sensor at each operating temperature are calculated sequentially at temperature T. The fitness of these output voltages is calculated to determine whether the solution simultaneously satisfies the interval constraint and the stability constraint, and finally, it is determined whether it is an effective temperature compensation solution for the current sample data set.
[0111] The above steps are repeated in order of priority until the temperature compensation solution for the current sample data group is determined in the first temperature compensation space.
[0112] In one possible embodiment, to improve matching efficiency and engineering applicability, this solution can further support batch synchronous matching of multiple electrochemical sensor data sets, rather than being limited to processing individual samples one by one. Specifically, during the batch matching process, based on multiple constraints such as engineering feasibility constraints, interval constraints, and stability constraints, the validity of each temperature compensation solution is verified sequentially from high to low priority. Once the optimal solution that satisfies all constraints is found, the traversal process can be terminated without having to calculate all solutions in the temperature compensation space one by one. This enables rapid optimization of multiple sets of data, significantly improving the matching efficiency and engineering feasibility of the temperature compensation scheme.
[0113] As can be seen, in this embodiment, the traversal method from high to low priority significantly shortens the matching time between the current sample data set and the compensation solution, thus significantly improving the optimization efficiency. Simultaneously, the judgment process verifies the output voltage range compliance and the relative fluctuation error threshold. Multiple constraints form a closed-loop verification, ensuring that the electrochemical sensor outputs stable and accurate across the entire operating temperature range after temperature compensation, effectively avoiding compensation deviations caused by a single constraint.
[0114] Furthermore, this application takes into account the practical constraints of NTC parameters and resistance parameters, and uses measured data as the basis for compensation, which is highly feasible, improves the engineering versatility of the solution, avoids the limitation of special-specification devices on batch applications, and achieves a balance between efficiency, accuracy and practicality, providing a reliable guarantee for the accurate detection of the concentration of the analyte.
[0115] S220, if a temperature compensation solution for the current current sample data group exists in the first temperature compensation space, then the temperature compensation solution for the current current sample data group is determined as the target solution.
[0116] S230, it is determined that in the first temperature compensation space, the temperature compensation solution of the current current sample data group is determined as the cumulative number of times the target solution is obtained.
[0117] If there is a temperature compensation solution for the current current sample data group in the first temperature compensation space, that is, a solution that satisfies the interval constraint and stability constraint for the first time in the first temperature compensation space, it is determined as the target solution for the current current sample data group. Then, the total number of times the solution is determined as the target solution is calculated, and the priority of the solution is updated according to the total number of times.
[0118] S240, determine the degree of fit of the target solution.
[0119] The degree of adaptation is used to characterize the comprehensive adaptation capability of the target solution to the current current sample data group and the historical current sample data group.
[0120] In one possible embodiment, determining the fitness of the target solution includes: determining a plurality of first output voltages of the current current sample data group based on the target solution; determining the relative fluctuation error between the plurality of first output voltages based on the maximum and minimum output voltages among the plurality of first output voltages to obtain a first fitness of the target solution; obtaining the fitness of at least one historical current sample data group corresponding to the target solution to obtain at least one second fitness; and determining the fitness based on the first fitness and the at least one second fitness.
[0121] The fitness of the target solution for the current current sample data group is calculated according to formulas (1), (2), (3) and (4), which is the first fitness.
[0122] The target solution is located within the first temperature compensation space, indicating that it has been used as an effective temperature compensation solution for at least one historical current sample data group. The fitness of the target solution for the corresponding at least one historical current sample data group is further obtained to obtain at least one second fitness.
[0123] Specifically, the fitness of all solutions in the first temperature compensation space is obtained to obtain the fourth fitness. Based on the first fitness, at least one second fitness, and the fourth fitness, the fitness of the target solution is determined.
[0124] In one possible embodiment, please refer to Figure 3 , Figure 3 This is a flowchart illustrating the process of determining the fitness level of a target solution according to an embodiment of this application. Figure 3 The flowchart illustrates the steps for determining the fitness of the target solution based on a first fitness and at least one second fitness. The specific steps are as follows:
[0125] S310, evaluate the adaptation effect of the first fitness and the at least one second fitness according to the preset rules, and obtain a first score and at least one second score.
[0126] Each fitness level is evaluated for its fit, resulting in a corresponding score. Specifically, the higher the fitness level, the lower the corresponding score.
[0127] For example, if the fitness is less than or equal to 0.01, the score is 1; if the fitness is greater than 0.01 and less than or equal to 0.03, the score is 0.8; if the fitness is greater than 0.03 and less than or equal to 0.05, the score is 0.6; if the fitness is greater than 0.05 and less than or equal to 0.08, the score is 0.4; if the fitness is greater than 0.08 and less than or equal to 0.10, the score is 0.2; and if the fitness is greater than 0.10, the score is 0.1.
[0128] Specifically, a first score is determined based on a first fitness, and at least one second score is determined based on at least one second fitness.
[0129] S320, the first score and the at least one second score are fused to obtain the third score of the target solution.
[0130] The third score is obtained by adding the first score and each of the at least one second score.
[0131] S330, the scores of each temperature compensation solution in the first temperature compensation space are merged to obtain the fourth score.
[0132] Specifically, the fitness corresponding to each temperature compensation solution in the first temperature compensation space is obtained, the score corresponding to each fitness is determined, multiple fifth scores are obtained, and each fifth score is added together to obtain the fourth score.
[0133] S340, determine the degree of adaptation based on the third and fourth scores.
[0134] The ratio of the third score to the fourth score is calculated to obtain the degree of fit. The specific formula (6) is as follows:
[0135] ,
[0136] in, To ensure compatibility, Assign points to the third person. The size of the first temperature compensation space. Assign points to the fifth.
[0137] As can be seen, in this embodiment, the adaptation performance is refined by using a reverse quantization logic where the lower the fitness, the higher the score, and a hierarchical scoring standard, thus avoiding fuzzy evaluation bias. Considering both immediate and long-term adaptation performance, the first and second scores are integrated to improve the comprehensiveness of the evaluation. A fourth score is introduced from the global first temperature compensation space, and the ratio of the third score to the fourth score is used to determine the degree of adaptation and the global relative advantage of the target solution.
[0138] S250, determine the priority of the target solution based on the degree of fit and the cumulative number of times.
[0139] In one possible embodiment, please refer to Figure 4 , Figure 4 This is a flowchart illustrating a method for determining the priority of a target solution, provided in an embodiment of this application. Figure 4 The flowchart illustrates the steps for determining the priority of the target solution based on the degree of fitness and the cumulative number of iterations. The specific steps are as follows:
[0140] S410, obtain the number of historical current sample data sets.
[0141] The number of historical current sample data sets refers to the capacity of the calculated sample data, which increases as the number of calculated samples increases.
[0142] S420, determine the generality of the target solution based on the cumulative number of times and the quantity.
[0143] The ratio of cumulative number of occurrences to sample data size is used to determine the degree of generality, as shown in formula (7) below:
[0144] ,
[0145] in, The cumulative probability of the objective solution, i.e., the degree of generality. The frequency of the target solution occurring within the sample data volume, i.e., the cumulative count. This represents the sample data capacity.
[0146] S430, determine the priority of the target solution based on the degree of adaptation and the degree of universality.
[0147] The priority of the solution is obtained by calculating the product of the generality and the adaptability, as shown in the following formula (8):
[0148] ,
[0149] in, Priority of the objective solution To ensure compatibility, To determine the degree of universality.
[0150] As can be seen, in this embodiment, the reusability of the target solution is intuitively reflected by the degree of generality, and the comprehensive adaptability of the target solution is intuitively reflected by the degree of adaptability. Based on the dual dimensions of adaptability and generality, the priority of each sample group is continuously learned and iterated to optimize, ensuring that the priority is highly consistent with the actual application requirements, significantly improving the scientific nature and dynamic adaptability of the sorting, thereby improving the efficiency of temperature-compensated solution screening and quickly locking in the optimal solution with strong adaptability and high reusability.
[0151] S260, update the first temperature compensation space according to the priority of the target solution to obtain the second temperature compensation space.
[0152] Specifically, based on the priority of the updated target solutions, the order of the target solutions is updated in the first temperature compensation space to obtain the second temperature compensation space.
[0153] Specifically, for the subsequent current sample data set to be calculated, it is first determined whether there is a corresponding temperature compensation solution in the second temperature compensation space. If a temperature compensation solution for the subsequent current sample data set is determined in the second temperature compensation space, the electrochemical sensor is temperature compensated based on the solution, and the priority is updated simultaneously.
[0154] In one possible embodiment, if the first temperature compensation space is detected to be empty or there is no temperature compensation solution for the current current sample data group in the first temperature compensation space, then according to the engineering feasible constraints, the first resistor, the second resistor, the thermistor, and the thermistor index are combined to construct at least one reference temperature compensation solution; the reference temperature compensation solution that first satisfies the range constraint and stability constraint of the output voltage among the at least one reference temperature compensation solution is determined as the target temperature compensation solution for the current current sample data group; the priority of the target temperature compensation solution is determined; and the first temperature compensation space is updated according to the target temperature compensation solution and its priority to obtain a third temperature compensation space.
[0155] If the first temperature compensation space is empty, or if it is determined that there is no temperature compensation solution for the current current sample data group in the first temperature compensation space, the target solution can be constructed and the space updated by parameter combination traversal and constraint verification.
[0156] Specifically, based on the engineering realizability constraints, traverse R... C R B R 25 All possible combinations of values for B are used to generate at least one reference temperature compensation solution, ensuring that each solution is feasible for practical engineering applications. Then, for each reference temperature compensation solution, the output voltage corresponding to the current current sample data group is calculated to verify whether the output voltage simultaneously satisfies the preset interval constraints and stability constraints. The reference temperature compensation solution that first simultaneously satisfies both constraints is selected as the target temperature compensation solution for the current current sample data group, ensuring the efficiency and practicality of solution selection.
[0157] The process involves determining the generality and adaptability of the solution, calculating the priority of the target temperature compensation solution, and finally incorporating the target temperature compensation solution and its corresponding priority into the original first temperature compensation space. This completes the space update to obtain the third temperature compensation space, providing reusable temperature compensation solutions for subsequent new current sample data sets, and realizing the dynamic expansion and iterative optimization of the solution space.
[0158] As can be seen, in this embodiment, by constructing a temperature compensation space, the target solution corresponding to the current current sample data group is quickly located according to the priority of the temperature compensation solutions, without the need for a full traversal, thus reducing computational complexity. Furthermore, by iteratively optimizing the priority of each temperature compensation solution and the temperature compensation space based on the cumulative number of times the target solution is selected and the degree of dynamic adaptation, subsequent samples can quickly and efficiently determine a temperature compensation scheme that meets the compensation requirements of the electrochemical sensor, while ensuring the practical adaptability and feasibility of the temperature compensation scheme, thereby improving the temperature compensation effect of the electrochemical sensor.
[0159] In one possible embodiment, the set of sample data obtained from the actual test is acquired. , , Each element in It contains data measured at three temperatures, and the number of samples N is dynamic, increasing by 1 for each sample calculated.
[0160] For each sample data Calculate the solution , That is, the appropriate temperature compensation circuit. From series resistor R C Parallel resistor R B NTC thermistor R 25 Composed of the thermal index B, the solution space , For all R that satisfy the conditions C R B R 25 Permutations and combinations with B, .
[0161] Specifically, please refer to Figure 5 , Figure 5 This is a schematic flowchart of another temperature compensation method for an electrochemical sensor provided in an embodiment of this application, as shown below. Figure 5 As shown, input data obtained from an experiment. Then, the first judgment is made to determine whether the solution space is empty, which is used to determine whether the solution space includes temperature-compensated solutions.
[0162] Among them, if the solution space If the value is not empty, meaning the first judgment result is negative, then proceed to the second judgment, and check whether the solution in the solution space is empty according to the priority H. The solution. If the judgment is... If the solution is found, i.e., the result of the second judgment is yes, then output the solution R and update the priority H.
[0163] Among them, if the solution space If the solution space is empty (i.e., the first judgment result is yes), then solve R using an exhaustive method, output the solution R, and update the priority H. Also, if the solution space... It does not exist in If the solution is no, then the solution R is obtained by exhaustive search, the solution R is output, and the priority H is updated.
[0164] Specifically, traversing R C R B R 25 Given all possible values of B, the first solution that satisfies the condition is determined as the target solution. Priority H is calculated simultaneously, and solution R is added to the solution space according to priority H, so that subsequent samples can find temperature-compensated solutions.
[0165] Among them, the set of sample data can be calculated simultaneously. The temperature compensation solution for each sample data set is obtained, meaning that multiple electrochemical sensor data sets can be matched at once.
[0166] As can be seen, in this embodiment, a large amount of temperature and current data from a given electrochemical sensor circuit can be processed and analyzed. Through intelligent computer optimization, a circuit combination that meets the requirements of output voltage range, error threshold, and actual resistive element parameters can be quickly found. Furthermore, this solution significantly reduces computational complexity, improves the efficiency of resistive parameter selection, and simultaneously achieves fast matching speed and high accuracy. It optimizes circuit adaptation and can accurately address the complex circuit design needs under multiple constraints.
[0167] For examples consistent with the above embodiments, please refer to... Figure 6 , Figure 6 This is a functional unit block diagram of a temperature compensation device for an electrochemical sensor provided in an embodiment of this application, as shown below. Figure 6As shown, the temperature compensation device 60 of the electrochemical sensor includes: a first determining unit 61, configured to detect that the first temperature compensation space is not empty, and determine whether there is a temperature compensation solution for the current current sample data group in the first temperature compensation space according to the priority order of each temperature compensation solution in the first temperature compensation space, wherein the temperature compensation solution includes a first resistor, a second resistor, a thermistor, and a thermistor index for constructing a temperature compensation loop, and the current current sample data group includes multiple current values at different operating temperatures; a second determining unit 62, configured to determine the temperature compensation solution of the current current sample data group as the target solution if there is a temperature compensation solution for the current current sample data group in the first temperature compensation space; and a third determining unit 63, configured to... The system determines the cumulative number of times the temperature compensation solution of the current current sample data group is determined as the target solution within the first temperature compensation space; a fourth determining unit 64 determines the fitting degree of the target solution, which characterizes the comprehensive fitting ability of the target solution to the current current sample data group and historical current sample data groups; a fifth determining unit 65 determines the priority of the target solution based on the fitting degree and the cumulative number of times; and an updating unit 66 updates the first temperature compensation space according to the priority of the target solution to obtain a second temperature compensation space, so as to perform temperature compensation on the corresponding electrochemical sensor using the temperature compensation solution of the subsequent current sample data group determined in the second temperature compensation space.
[0168] In one possible embodiment, in determining the fitness of the target solution, the fourth determining unit 64 is specifically configured to: determine a plurality of first output voltages of the current current sample data group based on the target solution; determine the relative fluctuation error between the plurality of first output voltages based on the maximum and minimum output voltages among the plurality of first output voltages, and obtain a first fitness of the target solution; obtain the fitness of at least one historical current sample data group corresponding to the target solution, and obtain at least one second fitness; and determine the fitness based on the first fitness and the at least one second fitness.
[0169] In one possible embodiment, in determining the degree of fit based on the first fitness and the at least one second fitness, the fourth determining unit 64 is further configured to: evaluate the fit effect of the first fitness and the at least one second fitness according to preset rules to obtain a first score and at least one second score; fuse the first score and the at least one second score to obtain a third score of the target solution; fuse the scores of each temperature compensation solution in the first temperature compensation space to obtain a fourth score; and determine the degree of fit based on the third score and the fourth score.
[0170] In one possible embodiment, regarding determining whether a temperature compensation solution for the current current sample data group exists in the first temperature compensation space based on the priority ranking of each temperature compensation solution in the first temperature compensation space when the first temperature compensation space is detected to be non-empty, the first determining unit 61 is specifically configured to: detect that the first temperature compensation solution is not a temperature compensation solution for the current current sample data group, then determine a plurality of second output voltages for the current current sample data group based on the second temperature compensation solution, wherein the priority of the first temperature compensation solution is higher than the priority of the second temperature compensation solution; determine a third fitness of the second temperature compensation solution based on the plurality of second output voltages; and determine whether the second temperature compensation solution is a temperature compensation solution for the current current sample data group based on the plurality of second output voltages and the third fitness.
[0171] In one possible embodiment, in determining whether the second temperature-compensated solution is a temperature-compensated solution of the current current sample data group based on the plurality of second output voltages and the third fitness, the first determining unit 61 is further configured to: if each of the plurality of second output voltages is within a voltage threshold range and the third fitness is less than a fitness threshold, then determine that the second temperature-compensated solution is a temperature-compensated solution of the current current sample data group.
[0172] In one possible embodiment, in determining the priority of the target solution based on the degree of fit and the cumulative number of times, the fifth determining unit 65 is further configured to: acquire the number of historical current sample data groups; determine the generality of the target solution based on the cumulative number of times and the number; and determine the priority of the target solution based on the degree of fit and the generality.
[0173] In one possible embodiment, the temperature compensation device 60 of the electrochemical sensor is further configured to: if the detected first temperature compensation space is empty or there is no temperature compensation solution for the current current sample data group in the first temperature compensation space, then, according to engineering feasible constraints, combine the first resistor, the second resistor, the thermistor, and the thermistor index to construct at least one reference temperature compensation solution; determine the reference temperature compensation solution that first satisfies the range constraint and stability constraint of the output voltage among the at least one reference temperature compensation solution as the target temperature compensation solution for the current current sample data group; determine the priority of the target temperature compensation solution; and update the first temperature compensation space according to the target temperature compensation solution and its priority to obtain a third temperature compensation space.
[0174] It is understood that since the method embodiments and the device embodiments are different presentations of the same technical concept, the content of the method embodiment section in this application should be adapted to the device embodiment section in a synchronous manner, and will not be repeated here.
[0175] In the case of using integrated units, please refer to Figure 7 , Figure 7 This is a functional unit block diagram of another electrochemical sensor temperature compensation device provided in the embodiments of this application, such as... Figure 7 As shown, the temperature compensation device 60 of the electrochemical sensor includes a processing module 602 and a communication module 601. The processing module 602 controls and manages the operation of the temperature compensation device 60, for example, executing the steps of the first determining unit 61, the second determining unit 62, the third determining unit 63, the fourth determining unit 64, the fifth determining unit 65, and the updating unit 66, and / or executing other processes of the technology described herein. The communication module 601 is used for interaction between the temperature compensation device 60 and other devices.
[0176] Among them, such as Figure 7 As shown, the temperature compensation device 60 of the electrochemical sensor may further include a storage module 603, which is used to store the program code and data of the temperature compensation device 60 of the electrochemical sensor.
[0177] The processing module 602 can be a processor or controller, such as a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0178] The communication module 601 can be a transceiver, RF circuit, or communication interface, etc. The storage module 603 can be a memory.
[0179] All relevant content in each scenario involved in the above method embodiments can be referenced from the functional descriptions of the corresponding functional modules, and will not be repeated here. The temperature compensation device 60 of the above electrochemical sensor can perform the above... Figure 2 The temperature compensation method for the electrochemical sensor is shown.
[0180] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 8 As shown, the electronic device 800 includes a processor 810, a memory 820, a communication interface 830, and one or more programs 821. The one or more programs 821 are stored in the memory and configured to be executed by the processor. When the program is executed, it includes some or all of the steps of the temperature compensation method for any electrochemical sensor described in the above method embodiments. The processor, memory, and communication interface are interconnected and perform communication with each other.
[0181] The memory can be volatile memory such as Dynamic Random Access Memory (DRAM) or non-volatile memory such as a hard disk drive. The memory stores a set of executable program code, and the processor calls the executable program code stored in the memory to execute some or all of the steps of any electrochemical sensor temperature compensation method described in the above embodiments of the electrochemical sensor temperature compensation method.
[0182] As can be seen, the electronic device 800 described in this embodiment first detects that the first temperature compensation space is not empty. Based on the priority order of each temperature compensation solution in the first temperature compensation space, it determines whether there is a temperature compensation solution for the current current sample data group in the first temperature compensation space. The temperature compensation solution includes a first resistor, a second resistor, a thermistor, and a thermistor index for constructing a temperature compensation loop. The current current sample data group includes multiple current values at different operating temperatures. Then, if there is a temperature compensation solution for the current current sample data group in the first temperature compensation space, the temperature compensation solution for the current current sample data group is determined as the target solution. In the first temperature compensation space, the temperature compensation solution of the current current sample data group is determined as the cumulative number of times the target solution is identified. Next, the fit degree of the target solution is determined, which characterizes the comprehensive adaptability of the target solution to the current current sample data group and historical current sample data groups. Then, based on the fit degree and the cumulative number of times, the priority of the target solution is determined. Finally, the first temperature compensation space is updated according to the priority of the target solution to obtain a second temperature compensation space, so that temperature compensation can be performed on the corresponding electrochemical sensor using the temperature compensation solution of the subsequent current sample data group determined in the second temperature compensation space.
[0183] This application constructs a temperature compensation space and quickly locates the target solution corresponding to the current current sample data group according to the priority of temperature compensation solutions, without needing to traverse the entire dataset, thus reducing computational complexity. Furthermore, by iteratively optimizing the priority of each temperature compensation solution and the temperature compensation space based on the cumulative number of times the target solution is selected and the degree of dynamic adaptation, subsequent samples can quickly and efficiently determine a temperature compensation scheme that meets the compensation requirements of the electrochemical sensor, while ensuring the practical adaptability and feasibility of the temperature compensation scheme, thereby improving the temperature compensation effect of the electrochemical sensor.
[0184] This application also provides a computer storage medium storing a computer program for electronic data interchange, which causes a computer to perform some or all of the steps of any of the methods described in the above method embodiments, wherein the computer includes an electronic device.
[0185] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments. The computer program product may be a software installation package, and the computer may include an electronic device.
[0186] It should be noted that, for the sake of simplicity, the aforementioned methods are described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are optional, and the actions and modules involved are not necessarily essential to this application.
[0187] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0188] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.
[0189] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0190] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software program module.
[0191] If the integrated unit is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0192] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage device, which may include: a flash drive, a read-only memory, a random access memory, a magnetic disk, or an optical disk, etc.
[0193] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The above description of the embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A temperature compensation method for an electrochemical sensor, characterized in that, include: If the first temperature compensation space is detected to be non-empty, determine whether there is a temperature compensation solution for the current current sample data group in the first temperature compensation space according to the priority sorting of each temperature compensation solution in the first temperature compensation space. The temperature compensation solution includes a first resistor, a second resistor, a thermistor, and a thermistor index for constructing a temperature compensation loop. The current current sample data group includes multiple current values at different operating temperatures. If a temperature compensation solution for the current current sample data group exists in the first temperature compensation space, then the temperature compensation solution for the current current sample data group is determined as the target solution. Within the first temperature compensation space, the temperature compensation solution of the current current sample data group is determined as the cumulative number of times the target solution is obtained; The fitness of the target solution is determined based on its fitness to the current current sample data set and the historical current sample data set. The fitness is used to characterize the relative fluctuation error of the output voltage of the current sample data set at different temperatures. The priority of the target solution is determined based on the degree of fit and the cumulative number of times. The first temperature compensation space is updated according to the priority of the target solution to obtain the second temperature compensation space, so as to perform temperature compensation on the corresponding electrochemical sensor by using the temperature compensation solution of the subsequent current sample data group determined in the second temperature compensation space.
2. The method according to claim 1, characterized in that, The step of determining the fitness level of the target solution based on its fitness to the current current sample data set and the historical current sample data set includes: Based on the target solution, determine multiple first output voltages for the current current sample data group; Based on the maximum and minimum output voltages among the plurality of first output voltages, the relative fluctuation error among the plurality of first output voltages is determined, and the first fitness of the target solution is obtained; Obtain the fitness of at least one historical current sample data group corresponding to the target solution, and obtain at least one second fitness; The degree of fit is determined based on the first fitness and the at least one second fitness.
3. The method according to claim 2, characterized in that, Determining the fitness level based on the first fitness and the at least one second fitness includes: The adaptation effect of the first fitness and the at least one second fitness is evaluated according to the preset rules to obtain a first score and at least one second score. The first score and the at least one second score are fused together to obtain the third score of the target solution; The scores of each temperature compensation solution in the first temperature compensation space are merged to obtain the fourth score; The degree of fit is determined based on the third and fourth scores.
4. The method according to claim 1, characterized in that, The step of detecting that the first temperature compensation space is not empty, and determining whether there is a temperature compensation solution for the current current sample data group in the first temperature compensation space according to the priority order of each temperature compensation solution in the first temperature compensation space, includes: If the first temperature compensation solution is not the temperature compensation solution of the current current sample data group, then based on the second temperature compensation solution, multiple second output voltages of the current current sample data group are determined, with the first temperature compensation solution having a higher priority than the second temperature compensation solution. Based on the plurality of second output voltages, determine the third fitness of the second temperature compensation solution; Based on the plurality of second output voltages and the third fitness, determine whether the second temperature-compensated solution is the temperature-compensated solution of the current current sample data set.
5. The method according to claim 4, characterized in that, The step of determining whether the second temperature-compensated solution is the temperature-compensated solution of the current current sample data group based on the plurality of second output voltages and the third fitness includes: If each of the plurality of second output voltages is detected to be within the voltage threshold range, and the third fitness is less than the fitness threshold, then the second temperature compensation solution is determined to be the temperature compensation solution of the current current sample data group.
6. The method according to any one of claims 1-5, characterized in that, Determining the priority of the target solution based on the degree of fit and the cumulative number of iterations includes: Obtain the number of historical current sample data sets; The generality of the target solution is determined based on the cumulative number of times and the quantity. The priority of the target solution is determined based on the degree of adaptability and the degree of generality.
7. The method according to any one of claims 1-5, characterized in that, The method further includes: If the detected first temperature compensation space is empty or there is no temperature compensation solution for the current current sample data group in the first temperature compensation space, then according to the engineering feasible constraints, the first resistor, the second resistor, the thermistor and the thermistor index are combined to construct at least one reference temperature compensation solution. The reference temperature compensation solution that first satisfies the range constraint and stability constraint of the output voltage among the at least one reference temperature compensation solution is determined as the target temperature compensation solution of the current current sample data group. Determine the priority of the target temperature compensation solution; Based on the target temperature compensation solution and its priority, the first temperature compensation space is updated to obtain the third temperature compensation space.
8. A temperature compensation device for an electrochemical sensor, characterized in that, include: The first determining unit is used to detect that the first temperature compensation space is not empty, and to determine whether there is a temperature compensation solution for the current current sample data group in the first temperature compensation space according to the priority sorting of each temperature compensation solution in the first temperature compensation space. The temperature compensation solution includes a first resistor, a second resistor, a thermistor, and a thermistor index for constructing a temperature compensation loop. The current current sample data group includes multiple current values at different operating temperatures. The second determining unit is used to determine the temperature compensation solution of the current current sample data group as the target solution if a temperature compensation solution of the current current sample data group exists in the first temperature compensation space. The third determining unit is used to determine the cumulative number of times the temperature compensation solution of the current current sample data group is determined as the target solution in the first temperature compensation space; The fourth determining unit is used to determine the fitness degree of the target solution based on the fitness of the target solution to the current current sample data group and the historical current sample data group. The fitness degree is used to characterize the relative fluctuation error of the output voltage of the current sample data group at different temperatures. The fifth determining unit is used to determine the priority of the target solution based on the degree of fit and the cumulative number of times. An update unit is used to update the first temperature compensation space according to the priority of the target solution to obtain a second temperature compensation space, so as to perform temperature compensation on the corresponding electrochemical sensor through the temperature compensation solution of the subsequent current sample data group determined in the second temperature compensation space.
9. An electronic device, characterized in that, The device includes: The device includes a memory, a processor, and executable program code stored in the memory and executable on the processor, wherein the processor executes the executable program code to perform the steps of the temperature compensation method for the electrochemical sensor as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores executable program code, the executable program code including execution instructions for performing the steps of the temperature compensation method for the electrochemical sensor as described in any one of claims 1-7.
Citation Information
Patent Citations
FET amplifier with temperature-compensating circuit
US20030141931A1
Common reference crystal systems
US20130321048A1