Reaction curve correction method, sample analyzer, and storage medium
By filtering, downsampling, and differential processing the reaction curve in whole blood testing, outliers are identified and corrected, thus solving the problem of reaction curve interference in whole blood testing and improving the accuracy of the test.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZYBIO INC
- Filing Date
- 2023-03-29
- Publication Date
- 2026-07-03
AI Technical Summary
In existing technologies, when using whole blood to detect CRP and SAA, various factors can interfere with the reaction curve, resulting in low accuracy of the test results and making it easy to misdiagnose or miss the diagnosis.
By acquiring the filtered response curve, performing downsampling processing, determining the target first-order and second-order difference curves, identifying and correcting outliers, and correcting the original response curve to eliminate interference.
It improves the accuracy of whole blood CRP and SAA testing, preventing misdiagnosis and missed diagnosis.
Smart Images

Figure CN116364298B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of curve data processing technology, and in particular to a method for correcting reaction curves, a sample analyzer, and a storage medium. Background Technology
[0002] C-reactive protein (CRP) and serum amyloid A (SAA) are acute-phase proteins that exhibit characteristic changes highly sensitively during the body's inflammatory response. Therefore, the detection of CRP and SAA is of significant clinical value.
[0003] In practical applications, to meet testing needs and reduce patient burden, a single tube of whole blood is often used to simultaneously test for complete blood count (CBC), CRP, and SAA. CRP and SAA testing commonly employs immunoturbidimetry, which utilizes an antigen-antibody reaction to generate immunocomplex particles. These particles are then illuminated with light of a specific wavelength, and the change in reflected light signal intensity before and after illumination yields concentration information. However, when using whole blood to test for CRP and SAA, the blood cells need to be processed to avoid interference. This may introduce incomplete hemolysis, thus requiring the addition of specific reagents to the sample to facilitate the antigen-antibody reaction. However, bubbles can be generated during reagent addition, mixing, and sample transport to the testing device. These bubbles can scatter or refract light, interfering with the detection signal and affecting the accuracy and repeatability of the results. Furthermore, the presence of precipitates or impurities in the reagents can also cause interference. In summary, using whole blood for CRP and SAA testing presents various factors that interfere with the reaction curve, leading to low accuracy and a high risk of misdiagnosis and missed diagnosis. Summary of the Invention
[0004] The main objective of this invention is to provide a method for correcting reaction curves, a sample analyzer, and a storage medium, aiming to solve the technical problem in the prior art where various factors interfere with the reaction curves and affect the accuracy of the test results when using whole blood for CRP and SAA detection.
[0005] To achieve the above objectives, the present invention provides a method for correcting a reaction curve, the method comprising the following steps:
[0006] Obtain the filtered response curve, wherein the filtered response curve is obtained by filtering the original response curve;
[0007] The filtered response curve is downsampled to obtain the target response curve;
[0008] Determine the target first-order difference curve and the target second-order difference curve of the target reaction curve;
[0009] Identify a first outlier on the target first-order difference curve and a second outlier on the target second-order difference curve, and determine the target outlier of the filter response curve based on the first outlier and the second outlier.
[0010] The filtered response curve is corrected based on the target anomaly to obtain the corrected response curve of the original response curve.
[0011] Optionally, identifying the first outlier on the target first-order difference curve includes:
[0012] S301. Determine the first mean and first standard deviation of the target first-order difference curve based on the first target point on the target first-order difference curve, and construct a first target deviation threshold interval based on the first mean and the first standard deviation.
[0013] S302. Sequentially identify target identification anomalies in the first target points, wherein the target identification anomalies are points in the first target points whose reaction values are not within the first target deviation threshold range;
[0014] S303. Remove the target identification anomalies on the target first-order difference curve to obtain a new target first-order difference curve;
[0015] S304. If the termination condition is not met, the new target first-order difference curve is used as the target first-order difference curve in step S301, and steps S301-S304 are repeated until the termination condition is met. After the termination condition is met, all identified target identification anomalies are used as the first anomalies on the target first-order difference curve.
[0016] Optionally, the termination conditions include:
[0017] If the ratio of the identified anomaly point to the first target point is greater than a preset ratio, then the termination condition is determined to be met; or,
[0018] If, during the identification of target identification anomalies among the first target points, a preset number of consecutive first target points are not identified as target identification anomalies, then the termination condition is deemed met; or...
[0019] If the number of iterations for filtering the first target normal point is greater than the preset number, then the termination condition is met.
[0020] Optionally, identifying the second outlier on the target second-order difference curve includes:
[0021] The second mean and the second standard deviation of the target second-order difference curve are determined based on the second target point on the target second-order difference curve, and a second target deviation threshold interval is constructed based on the second mean and the second standard deviation.
[0022] Points in the second target point whose reaction values are not within the range of the second target deviation threshold are designated as second anomalies.
[0023] Optionally, before correcting the filtered response curve based on the target outlier to obtain the corrected response curve of the original response curve, the method further includes:
[0024] Determine the first-order difference curve of the filter response curve;
[0025] Based on the target anomaly point, determine the third anomaly point on the first-order difference curve of the filter, and based on the third anomaly point, determine the normal filtering point on the first-order difference curve of the filter.
[0026] The filter mean and filter standard deviation of the first-order difference curve are determined based on the filter normal point, and a filter deviation threshold interval is constructed based on the filter mean and the filter standard deviation.
[0027] Points that are not within the filtering deviation threshold range among the normal filtering points are considered as first-order filtering outliers.
[0028] Based on the first-order filter outliers, the filter outliers of the filter response curve are determined, and the filter outliers are used as the target outliers of the filter response curve.
[0029] Optionally, the step of correcting the filtered response curve based on the target outlier to obtain the corrected response curve of the original response curve includes:
[0030] Determine the sampling time of the target anomaly point, and divide the filtered response curve into several segments based on the sampling time;
[0031] Determine the effective normal segment on the filtered response curve, and determine the effective abnormal segment on the filtered response curve based on the effective normal segment, wherein the number of target normal points in the effective normal segment is greater than the preset number of samples;
[0032] Determine the positional relationship between the valid normal segment and the valid abnormal segment;
[0033] The correction rules for the filter response curve are determined based on the positional relationship.
[0034] The filtered response curve is corrected based on the correction rule to obtain the corrected response curve of the original response curve.
[0035] Optionally, before determining the positional relationship between the valid normal segment and the valid abnormal segment, the method further includes:
[0036] Based on the first-order filter anomaly points, determine the first-order filter normal points on the first-order filter difference curve;
[0037] Determine the fitting model;
[0038] Based on the first-order filter normal points and the fitting model, fit a first-order difference trend line;
[0039] Determine the time corresponding point of the first-order filter anomaly point on the first-order difference trend line.
[0040] Replace the first-order filtering outlier on the first-order filtering difference curve with the corresponding time point to obtain a new first-order filtering difference curve.
[0041] Optionally, the correction rules include a first correction rule, a second correction rule, and a third correction rule; wherein,
[0042] The step of determining the correction rule for the filter response curve based on the positional relationship includes:
[0043] When it is determined that there are valid normal segments before and after the valid abnormal segment, the correction rule of the filter response curve is determined to be the first correction rule. The first correction rule is to determine a preset number of points from the two valid normal segments before and after the effective abnormal segments, fit them to obtain a fitted curve segment, and replace the valid abnormal segment on the filter response curve with the fitted curve segment.
[0044] When the positional relationship is determined to be such that there is only a valid normal segment before the valid abnormal segment, the correction rule for the filter response curve is determined to be a second correction rule, wherein the second correction rule is to determine the closest point on the valid normal segment to the valid abnormal segment, and use a new first-order difference filter curve to correct the valid abnormal segment point by point from front to back according to the closest point;
[0045] When the positional relationship is determined to be such that a valid normal segment exists only after the valid abnormal segment, the correction rule for the filter response curve is determined to be the third correction rule. The third correction rule is to determine the closest point on the valid normal segment to the valid abnormal segment, and use a new first-order difference filter curve to correct the valid abnormal segment point by point from the back to the front according to the closest point.
[0046] Furthermore, to achieve the above objectives, the present invention also proposes a reaction curve correction device, the reaction curve correction device comprising:
[0047] An acquisition module is used to acquire a filtered response curve, wherein the filtered response curve is obtained by filtering the original response curve;
[0048] The processing module is used to downsample the filtered response curve to obtain the target response curve;
[0049] The determination module is used to determine the target first-order difference curve and the target second-order difference curve of the target reaction curve;
[0050] The identification module is used to identify a first outlier on the target first-order difference curve and a second outlier on the target second-order difference curve, and to determine the target outlier of the filter response curve based on the first outlier and the second outlier.
[0051] The correction module is used to correct the filtered response curve based on the target anomaly point to obtain a corrected response curve of the original response curve.
[0052] In addition, to achieve the above objectives, the present invention also proposes a sample analyzer that applies the reaction curve correction method described above.
[0053] Furthermore, to achieve the above objectives, the present invention also proposes a storage medium storing a reaction curve correction program, wherein when the reaction curve correction program is executed by a processor, it implements the steps of the reaction curve correction method as described above.
[0054] The proposed method for correcting reaction curves involves: acquiring a filtered reaction curve, where the filtered reaction curve is obtained by filtering the original reaction curve; downsampling the filtered reaction curve to obtain a target reaction curve; determining the target first-order difference curve and the target second-order difference curve of the target reaction curve; identifying a first abnormal point on the target first-order difference curve and a second abnormal point on the target second-order difference curve, and determining the target abnormal point of the filtered reaction curve based on the first and second abnormal points; and correcting the filtered reaction curve based on the target abnormal point to obtain a corrected reaction curve of the original reaction curve. By identifying abnormal points on the original reaction curve and correcting the original reaction curve based on these abnormal points, the corrected original reaction curve is closer to the normal original reaction curve, thereby effectively improving the accuracy of whole blood testing for CRP and SAA and preventing misdiagnosis and missed diagnosis. Attached Figure Description
[0055] Figure 1 This is a schematic diagram of the structure of the device for correcting the response curve of the hardware operating environment involved in the embodiments of the present invention;
[0056] Figure 2 This is a schematic flowchart of the first embodiment of the reaction curve correction method of the present invention;
[0057] Figure 3 This is a schematic diagram of the original reaction curve under normal conditions in the first embodiment of the reaction curve correction method of the present invention;
[0058] Figure 4 This is a schematic diagram of the original reaction curve under an abnormal state in the first embodiment of the reaction curve correction method of the present invention;
[0059] Figure 5 This is a schematic diagram of the original reaction curve after correction in the first embodiment of the reaction curve correction method of the present invention;
[0060] Figure 6 This is a schematic flowchart of the second embodiment of the reaction curve correction method of the present invention;
[0061] Figure 7 This is a structural block diagram of the first embodiment of the reaction curve correction device of the present invention.
[0062] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0063] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0064] Reference Figure 1 , Figure 1 This is a schematic diagram of the sample analyzer of the hardware operating environment involved in the embodiments of the present invention.
[0065] like Figure 1As shown, the sample analyzer may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0066] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the sample analyzer and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0067] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a program for correcting the response curve.
[0068] exist Figure 1 In the sample analyzer shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and memory 1005 in the reaction curve correction device of the present invention can be set in the reaction curve correction device. The sample analyzer calls the reaction curve correction program stored in the memory 1005 through the processor 1001 and executes the reaction curve correction method provided in the embodiment of the present invention.
[0069] Based on the above hardware structure, an embodiment of the method for correcting the reaction curve of the present invention is proposed.
[0070] Reference Figure 2 , Figure 2 This is a schematic flowchart of the first embodiment of a method for correcting a reaction curve according to the present invention.
[0071] In this embodiment, the method for correcting the reaction curve includes the following steps:
[0072] Step S10: Obtain the filtered response curve, wherein the filtered response curve is obtained by filtering the original response curve.
[0073] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a mobile phone, tablet computer, or personal computer, or an electronic device or sample analyzer capable of performing the above functions. The following description uses the sample analyzer as an example to illustrate this embodiment and the subsequent embodiments.
[0074] It should be noted that the original reaction curve is a sequence of sampling point data arranged according to sampling time. The horizontal axis represents the sampling time, and the vertical axis represents the reaction value (i.e., the optical electrical signal value) of the reaction sample at the corresponding sampling time point under the illumination of light of a specified wavelength.
[0075] In practical implementation, the original reaction curve under normal conditions is as follows: Figure 3 As shown, the original reaction curve under abnormal conditions is as follows: Figure 4 As shown.
[0076] It should be noted that methods such as median filtering and mean filtering can be used to filter the original reaction curve, and this embodiment does not limit the filtering method.
[0077] It is understandable that the time length of the filtered reaction curve is the same as that of the original reaction curve.
[0078] In the specific implementation, the i-th time point T of the filter response curve can be... i The reaction value is denoted as A. i Let i = 1, 2, ..., N, and let P be the point on the filter response curve. i (T i A i ).
[0079] Step S20: Downsample the filtered response curve to obtain the target response curve.
[0080] In the specific implementation, the total number of sampling points of the filtered sampling curve is determined to be N, and the downsampling step size is selected as M, where N is divisible by M. When downsampling the filtered response curve, the average value is taken every M points starting from the first sampling point of the filtered response curve, i.e., a1 = AV(A1 ~ A M ),a2=AV(A M+1 ~A 2M ),…,a n =AV(A N-M+1 ~A N ), AV is calculated as the mean, a iThe reaction value at the i-th point on the target reaction curve is used to obtain the target reaction curve with n = N / M sampling points after processing. The point on the target reaction curve is denoted as p. i (t i ,a i ), i = 1, 2, ..., n.
[0081] Understandably, downsampling the filtered response curve can effectively reduce the computational load of correcting the original response curve, thus reducing time complexity.
[0082] Step S30: Determine the target first-order difference curve and the target second-order difference curve of the target reaction curve.
[0083] It should be noted that the target first-order difference curve refers to the curve obtained by performing first-order difference processing on the target response curve, and the target second-order difference curve refers to the curve obtained by performing second-order difference processing on the target response curve. In this case, performing second-order difference processing on the target response curve is equivalent to performing first-order difference processing on the target first-order difference curve.
[0084] In the specific implementation, a first-order difference is performed on the target response curve. The first-order difference is the response value at the next sampling point on the target response curve minus the response value at the current sampling point, i.e., a′. i =a i+1 -a i ,a′ i Let a be the first-order difference value of the current sampling point. i a is the reaction value at the current sampling point. i+1 The reaction value at the next sampling point is obtained by performing a first-order difference on the target reaction curve to obtain the target first-order difference curve. The point on the target first-order difference curve is denoted as p′. i (t′ i ,a′ i ), i = 1, 2, ..., n-1.
[0085] In practical implementation, performing second-order differencing on the target response curve is equivalent to performing first-order differencing on the target first-order differencing curve again. The second-order differencing is the response value at the next sampling point on the target first-order differencing curve minus the response value at the current sampling point, i.e., a″. i =a′ i+1 -a′ i ,a″ i Let a′ be the second difference value of the current sampling point. i Let a′ be the first-order difference value of the current sampling point. i+1 The first-order difference value of the next sampling point is used as the basis for the above processing to obtain the target second-order difference curve. The points on the target second-order difference curve are denoted as p″. i (t″ i ,a″i ), i = 1, 2, ..., n-2.
[0086] Step S40: Identify the first outlier on the target first-order difference curve and the second outlier on the target second-order difference curve, and determine the target outlier of the filter response curve based on the first outlier and the second outlier.
[0087] In the specific implementation, the first outlier on the target first-order difference curve is identified as p. i (t i ,a i Therefore, based on the first outlier, the target outlier on the filter response curve can be determined as P. i*+1 (T i*+1 A i* )~P i** (T i** A i** The second outlier on the target second-order difference curve was identified as p″. i (t″ i ,a″ i Then, based on the second anomaly, point P on the filter response curve is determined. i*+1 (T i*+1 A i* )~P (+1)** (T ()** A ()** This is also a target anomaly.
[0088] In one embodiment, identifying the first outlier on the target first-order difference curve includes:
[0089] S301. Determine the first mean and first standard deviation of the target first-order difference curve based on the first target point on the target first-order difference curve, and construct a first target deviation threshold interval based on the first mean and the first standard deviation.
[0090] S302. Sequentially identify target identification anomalies in the first target points, wherein the target identification anomalies are points in the first target points whose reaction values are not within the first target deviation threshold range;
[0091] S303. Remove the target identification anomalies on the target first-order difference curve to obtain a new target first-order difference curve;
[0092] S304. If the termination condition is not met, the new target first-order difference curve is used as the target first-order difference curve in step S301, and steps S301-S304 are repeated until the termination condition is met. After the termination condition is met, all identified target identification anomalies are used as the first anomalies on the target first-order difference curve.
[0093] It should be noted that the first target point refers to all points on the first-order difference curve of the target, and the first mean and the first standard deviation refer to the mean and standard deviation of the response values at the first target point.
[0094] In the specific implementation, the first target deviation threshold interval is constructed as follows:
[0095] [av1-k1×sd1,av1+k1×sd1]
[0096] In the formula, k1 is a user-defined parameter.
[0097] In practice, the first target point can be identified as an anomaly in sequence according to the sampling time of the first-order difference curve of the target. When the reaction value of the first target point is not within the first target deviation threshold range, the first target point can be judged as an anomaly in target identification.
[0098] Understandably, each iteration can identify some target identification anomalies. After removing the target identification anomalies from the target first-order difference curve, a new target first-order difference curve is obtained. The first target deviation threshold range is updated based on the mean and standard deviation of the first target point on the new target first-order difference curve until the termination condition is met. Alternatively, all identified target identification anomalies can be used as the first anomaly points on the target first-order difference curve.
[0099] In this embodiment, an adaptive threshold is used to identify anomalies, which avoids the limitations of using a fixed threshold and thus effectively improves the accuracy of identifying target anomalies.
[0100] In one embodiment, satisfying the termination condition includes:
[0101] If the ratio of the identified anomaly point to the first target point is greater than a preset ratio, then the termination condition is determined to be met; or,
[0102] If, during the identification of target identification anomalies among the first target points, a preset number of consecutive first target points are not identified as target identification anomalies, then the termination condition is deemed met; or...
[0103] If the number of iterations for filtering the first target normal point is greater than the preset number, then the termination condition is met.
[0104] In the specific implementation, the preset ratio can be set to 0.75, the preset quantity can be 2 times, and the preset number of times can be 4 times. Here, there are no limitations on the preset ratio, preset quantity, and preset number of times.
[0105] In one embodiment, identifying the second outlier on the target second-order difference curve includes:
[0106] The second mean and the second standard deviation of the target second-order difference curve are determined based on the second target point on the target second-order difference curve, and a second target deviation threshold interval is constructed based on the second mean and the second standard deviation.
[0107] Points in the second target point whose reaction values are not within the range of the second target deviation threshold are designated as second anomalies.
[0108] It should be noted that the second target point refers to all points on the target second-order difference curve, and the second mean and second standard deviation refer to the mean and standard deviation of the response values at the second target point.
[0109] In the specific implementation, the constructed second target deviation threshold range is as follows:
[0110] [av2-k2×sd2,av2+k2×sd2]
[0111] In the formula, k2 is a user-defined parameter.
[0112] In practice, the second target point can be identified as an anomaly in sequence according to the sampling time of the second-order difference curve of the target. When the reaction value of the second target point is not within the second target deviation threshold range, the second target point can be judged as the second anomaly.
[0113] Step S50: Correct the filtered response curve based on the target anomaly point to obtain the corrected response curve of the original response curve.
[0114] In practical implementation, the reaction curve is modified as follows: Figure 5 As shown, according to Figure 3 , Figure 4 as well as Figure 5 It can be determined that the corrected reaction curve is close to the original reaction curve under normal conditions.
[0115] This embodiment obtains a filtered response curve, which is obtained by filtering the original response curve; downsampling the filtered response curve to obtain a target response curve; determining the target first-order difference curve and the target second-order difference curve of the target response curve; identifying a first abnormal point on the target first-order difference curve and a second abnormal point on the target second-order difference curve, and determining the target abnormal point of the filtered response curve based on the first and second abnormal points; correcting the filtered response curve based on the target abnormal point to obtain a corrected response curve of the original response curve. Through this method, abnormal points on the original response curve are identified, and the original response curve is corrected based on these abnormal points, making the corrected original response curve closer to the normal original response curve. This effectively improves the accuracy of whole blood testing for CRP and SAA, preventing misdiagnosis and missed diagnosis.
[0116] refer to Figure 6 , Figure 6 This is a schematic flowchart of a second embodiment of a method for correcting a reaction curve according to the present invention.
[0117] Based on the first embodiment described above, the method for correcting the reaction curve in this embodiment further includes, before step S50:
[0118] Step S401: Determine the first-order difference curve of the filter response curve.
[0119] In the specific implementation, the filter response curve is subjected to first-order difference processing. The first-order difference is the response value of the next sampling point on the filter response curve minus the response value of the current sampling point, i.e., A′. i =A i+1 -A i A′ i Let A be the first difference value of the current sampling point. i A represents the reaction value at the current sampling point. i+1 The response value at the next sampling point is used to obtain the filtered first-order difference curve by performing a first-order difference processing on the filtered response curve. The point on the filtered first-order difference curve is denoted as P′. i (T′ i ,A′ i ), i = 1, 2, ..., N-1.
[0120] Step S402: Determine the third anomaly point on the first-order difference curve of the filter based on the target anomaly point, and determine the normal filter point on the first-order difference curve of the filter based on the third anomaly point.
[0121] It is understandable that, since the first-order difference curve of the filter is obtained by processing the filter response curve through the first-order difference, the corresponding point obtained by performing the first-order difference on the target outlier during the first-order processing is the third outlier on the first-order difference curve of the filter; the point on the first-order difference curve that is not the third outlier is the normal point of the filter on the first-order difference curve of the filter.
[0122] Step S403: Determine the filter mean and filter standard deviation of the first-order difference curve based on the filter normal point, and construct the filter deviation threshold interval based on the filter mean and the filter standard deviation.
[0123] It should be noted that the filter mean and filter standard deviation refer to the mean and standard deviation of the response values at the normal filtering points.
[0124] In the specific implementation, the constructed third target deviation threshold range is as follows:
[0125] [av3-k3×sd3,av3+k3×sd3]
[0126] In the formula, k3 is a user-defined parameter.
[0127] Step S404: Points among the normal filtering points that are not within the filtering deviation threshold range are designated as first-order filtering outliers.
[0128] In practice, the normal filtering points can be identified as abnormal points in sequence according to the sampling time of the first-order difference curve. When the response value of the normal filtering point is not within the third target deviation threshold range, the normal filtering point can be judged as a first-order filtering abnormal point.
[0129] Step S405: Determine the filter anomaly point of the filter response curve based on the first-order filter anomaly point, and use the filter anomaly point as the target anomaly point of the filter response curve.
[0130] In the specific implementation, the first-order filtering outlier point P′ on the first-order difference curve is identified. i (T′ i ,A′ i Then, based on the anomalies in the first-order filter, point P on the filter response curve is determined. i (T i A i ), P i+1 (T i+1 A i+1 ), i = 1, 2, ..., N-1 are also target anomalies.
[0131] In one embodiment, correcting the filtered response curve based on the target outlier to obtain a corrected response curve of the original response curve includes:
[0132] Determine the sampling time of the target anomaly point, and divide the filtered response curve into several segments based on the sampling time;
[0133] Determine the effective normal segment on the filtered response curve, and determine the effective abnormal segment on the filtered response curve based on the effective normal segment, wherein the number of target normal points in the effective normal segment is greater than the preset number of samples;
[0134] Determine the positional relationship between the valid normal segment and the valid abnormal segment;
[0135] The correction rules for the filter response curve are determined based on the positional relationship.
[0136] The filtered response curve is corrected based on the correction rule to obtain the corrected response curve of the original response curve.
[0137] In practice, the preset number of samples can be set in advance according to the actual situation. Preferably, the preset number of samples can be set to 100.
[0138] It should be noted that there are no target outliers in the valid normal segments, and when two or more valid outlier segments are connected together, these valid outlier segments can be regarded as one large valid outlier segment.
[0139] In practice, there are three possible positional relationships between valid abnormal segments and valid normal segments: the first is that valid normal segments exist both before and after the valid abnormal segment; the second is that valid normal segments exist only before the valid abnormal segment; and the third is that valid normal segments exist only after the valid abnormal segment. Different positional relationships correspond to different correction rules.
[0140] In this embodiment, the correction rule is determined based on the positional relationship between the valid abnormal segment and the valid normal segment, which can effectively improve the accuracy of the correction response curve.
[0141] In one embodiment, before determining the positional relationship between the valid normal segment and the valid abnormal segment, the method further includes:
[0142] Based on the first-order filter anomaly points, determine the first-order filter normal points on the first-order filter difference curve;
[0143] Determine the fitting model;
[0144] Based on the first-order filter normal points and the fitting model, fit a first-order difference trend line;
[0145] Determine the time corresponding point of the first-order filter anomaly point on the first-order difference trend line.
[0146] Replace the first-order filtering outlier on the first-order filtering difference curve with the corresponding time point to obtain a new first-order filtering difference curve.
[0147] It should be noted that the fitting model can be one of the following: a linear function, a polynomial function, an exponential function, a logarithmic function, or a power function, and the appropriate model can be selected based on the specific circumstances.
[0148] In the specific implementation, the first-order difference trend line is fitted based on the normal points of the first-order filter and the fitting model.
[0149] It should be noted that the time correspondence point on the first-order difference trend line can be determined based on the sampling time of the first-order filter outlier; the time correspondence point has the same sampling time as the first-order filter outlier, but the response value is different.
[0150] It is understandable that when replacing the first-order filtering outlier on the first-order filtering difference curve with the corresponding time point, the normal filtering point on the first-order filtering difference curve can be obtained without processing it.
[0151] In one embodiment, the correction rule includes a first correction rule, a second correction rule, and a third correction rule; wherein,
[0152] The step of determining the correction rule for the filter response curve based on the positional relationship includes:
[0153] When it is determined that there are valid normal segments before and after the valid abnormal segment, the correction rule of the filter response curve is determined to be the first correction rule. The first correction rule is to determine a preset number of points from the two valid normal segments before and after the effective abnormal segments, fit them to obtain a fitted curve segment, and replace the valid abnormal segment on the filter response curve with the fitted curve segment.
[0154] When the positional relationship is determined to be such that there is only a valid normal segment before the valid abnormal segment, the correction rule for the filter response curve is determined to be a second correction rule, wherein the second correction rule is to determine the closest point on the valid normal segment to the valid abnormal segment, and use a new first-order difference filter curve to correct the valid abnormal segment point by point from front to back according to the closest point;
[0155] When the positional relationship is determined to be such that a valid normal segment exists only after the valid abnormal segment, the correction rule for the filter response curve is determined to be the third correction rule. The third correction rule is to determine the closest point on the valid normal segment to the valid abnormal segment, and use a new first-order difference filter curve to correct the valid abnormal segment point by point from the back to the front according to the closest point.
[0156] It should be noted that the number of preset points can be set in advance according to the actual situation, and the number of preset points is greater than 100.
[0157] In a specific implementation, when the positional relationship between the effective abnormal segment and the effective normal segment is such that there are effective normal segments before and after the effective abnormal segment, at least 100 points are selected from the effective normal segments before and after the effective abnormal segment for fitting to obtain a fitted curve segment, and the fitted curve segment is used to replace the effective abnormal segment.
[0158] In the specific implementation, when the positional relationship between the effective outlier segment and the effective normal segment is such that the effective normal segment only exists before the effective outlier segment, the point on the effective normal segment closest to the effective outlier segment is taken as the nearest point. The new first-order difference curve is then used to correct the effective outlier segment point by point from front to back. The correction response value is: R i =R i-1 +d i-1 ,i=1,2,…,m, where m represents the number of points in the valid outlier segment, R0 represents the response value of the point in the valid normal segment closest to the valid outlier segment, and d i-1 R represents the response value of the i-th sampling point in the effective outlier segment on the new first-order filter difference curve. i This represents the corrected response value at the i-th sampling point in the valid anomaly segment.
[0159] In the specific implementation, when the positional relationship between the valid outlier segment and the valid normal segment is such that the valid normal segment only exists after the valid outlier segment, the point on the valid normal segment closest to the valid outlier segment is taken as the nearest point. The valid outlier segment is then corrected point by point from back to front using the new first-order difference curve of the filter. The correction response value is: R i =R i+1 -d i+1 ,i=1,2,…,m, where m represents the number of points in the valid outlier segment, R0 represents the response value of the point in the valid normal segment closest to the valid outlier segment, and d i+1 R represents the response value of the i-th sampling point in the effective outlier segment on the new first-order filter difference curve. i This represents the corrected response value at the i-th sampling point in the valid anomaly segment.
[0160] This embodiment identifies target anomalies by directly using the filtered response curve, thus identifying target anomalies that were missed on the filtered response curve. By filling in the gaps, the accuracy of anomaly identification can be further improved, avoiding missed identification. This makes the corrected response curve more accurate, thereby effectively improving the accuracy of CRP and SAA detection using whole blood.
[0161] Furthermore, embodiments of the present invention also propose a storage medium storing a reaction curve correction program, wherein when the reaction curve correction program is executed by a processor, the steps of the reaction curve correction method described above are implemented.
[0162] Reference Figure 7 , Figure 7 This is a structural block diagram of the first embodiment of the reaction curve correction device of the present invention.
[0163] like Figure 7 As shown, the reaction curve correction device proposed in this embodiment of the invention includes:
[0164] The acquisition module 10 is used to acquire the filtered response curve, wherein the filtered response curve is obtained by filtering the original response curve.
[0165] The processing module 20 is used to downsample the filtered response curve to obtain the target response curve.
[0166] The determination module 30 is used to determine the target first-order difference curve and the target second-order difference curve of the target reaction curve.
[0167] The identification module 40 is used to identify a first outlier on the target first-order difference curve and a second outlier on the target second-order difference curve, and to determine the target outlier of the filter response curve based on the first outlier and the second outlier.
[0168] The correction module 50 is used to correct the filtered response curve based on the target anomaly point to obtain the corrected response curve of the original response curve.
[0169] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.
[0170] This embodiment obtains a filtered response curve, which is obtained by filtering the original response curve; downsampling the filtered response curve to obtain a target response curve; determining the target first-order difference curve and the target second-order difference curve of the target response curve; identifying a first abnormal point on the target first-order difference curve and a second abnormal point on the target second-order difference curve, and determining the target abnormal point of the filtered response curve based on the first and second abnormal points; correcting the filtered response curve based on the target abnormal point to obtain a corrected response curve of the original response curve. Through this method, abnormal points on the original response curve are identified, and the original response curve is corrected based on these abnormal points, making the corrected original response curve closer to the normal original response curve. This effectively improves the accuracy of whole blood testing for CRP and SAA, preventing misdiagnosis and missed diagnosis.
[0171] In one embodiment, the identification module 40 is further configured to:
[0172] S301. Determine the first mean and first standard deviation of the target first-order difference curve based on the first target point on the target first-order difference curve, and construct a first target deviation threshold interval based on the first mean and the first standard deviation.
[0173] S302. Sequentially identify target identification anomalies in the first target points, wherein the target identification anomalies are points in the first target points whose reaction values are not within the first target deviation threshold range;
[0174] S303. Remove the target identification anomalies on the target first-order difference curve to obtain a new target first-order difference curve;
[0175] S304. If the termination condition is not met, the new target first-order difference curve is used as the target first-order difference curve in step S301, and steps S301-S304 are repeated until the termination condition is met. After the termination condition is met, all identified target identification anomalies are used as the first anomalies on the target first-order difference curve.
[0176] In one embodiment, the identification module 40 is further configured to:
[0177] If the ratio of the identified anomaly point to the first target point is greater than a preset ratio, then the termination condition is determined to be met; or,
[0178] If, during the identification of target identification anomalies among the first target points, a preset number of consecutive first target points are not identified as target identification anomalies, then the termination condition is deemed met; or...
[0179] If the number of iterations for filtering the first target normal point is greater than the preset number, then the termination condition is met.
[0180] In one embodiment, the identification module 40 is further configured to:
[0181] The second mean and the second standard deviation of the target second-order difference curve are determined based on the second target point on the target second-order difference curve, and a second target deviation threshold interval is constructed based on the second mean and the second standard deviation.
[0182] Points in the second target point whose reaction values are not within the range of the second target deviation threshold are designated as second anomalies.
[0183] In one embodiment, the correction module 50 is further configured to:
[0184] Determine the first-order difference curve of the filter response curve;
[0185] Based on the target anomaly point, determine the third anomaly point on the first-order difference curve of the filter, and based on the third anomaly point, determine the normal filtering point on the first-order difference curve of the filter.
[0186] The filter mean and filter standard deviation of the first-order difference curve are determined based on the filter normal point, and a filter deviation threshold interval is constructed based on the filter mean and the filter standard deviation.
[0187] Points that are not within the filtering deviation threshold range among the normal filtering points are considered as first-order filtering outliers.
[0188] Based on the first-order filter outliers, the filter outliers of the filter response curve are determined, and the filter outliers are used as the target outliers of the filter response curve.
[0189] In one embodiment, the correction module 50 is further configured to:
[0190] Determine the sampling time of the target anomaly point, and divide the filtered response curve into several segments based on the sampling time;
[0191] Determine the effective normal segment on the filtered response curve, and determine the effective abnormal segment on the filtered response curve based on the effective normal segment, wherein the number of target normal points in the effective normal segment is greater than the preset number of samples;
[0192] Determine the positional relationship between the valid normal segment and the valid abnormal segment;
[0193] The correction rules for the filter response curve are determined based on the positional relationship.
[0194] The filtered response curve is corrected based on the correction rule to obtain the corrected response curve of the original response curve.
[0195] In one embodiment, the correction module 50 is further configured to:
[0196] Based on the first-order filter anomaly points, determine the first-order filter normal points on the first-order filter difference curve;
[0197] Determine the fitting model;
[0198] Based on the first-order filter normal points and the fitting model, fit a first-order difference trend line;
[0199] Determine the time corresponding point of the first-order filter anomaly point on the first-order difference trend line.
[0200] Replace the first-order filtering outlier on the first-order filtering difference curve with the corresponding time point to obtain a new first-order filtering difference curve.
[0201] In one embodiment, the correction rule includes a first correction rule, a second correction rule, and a third correction rule; wherein, the correction module 50 is further configured to:
[0202] When it is determined that there are valid normal segments before and after the valid abnormal segment, the correction rule of the filter response curve is determined to be the first correction rule. The first correction rule is to determine a preset number of points from the two valid normal segments before and after the effective abnormal segments, fit them to obtain a fitted curve segment, and replace the valid abnormal segment on the filter response curve with the fitted curve segment.
[0203] When the positional relationship is determined to be such that there is only a valid normal segment before the valid abnormal segment, the correction rule for the filter response curve is determined to be a second correction rule, wherein the second correction rule is to determine the closest point on the valid normal segment to the valid abnormal segment, and use a new first-order difference filter curve to correct the valid abnormal segment point by point from front to back according to the closest point;
[0204] When the positional relationship is determined to be such that a valid normal segment exists only after the valid abnormal segment, the correction rule for the filter response curve is determined to be the third correction rule. The third correction rule is to determine the closest point on the valid normal segment to the valid abnormal segment, and use a new first-order difference filter curve to correct the valid abnormal segment point by point from the back to the front according to the closest point.
[0205] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.
[0206] In addition, for technical details not described in detail in this embodiment, please refer to the reaction curve correction method provided in any embodiment of the present invention, which will not be repeated here.
[0207] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0208] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0209] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0210] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method of modifying a reaction curve, characterized by, The method for correcting the reaction curve includes: Obtain the filtered response curve, wherein the filtered response curve is obtained by filtering the original response curve; The filtered response curve is downsampled to obtain the target response curve; Determine the target first-order difference curve and the target second-order difference curve of the target reaction curve; Identify a first outlier on the target first-order difference curve and a second outlier on the target second-order difference curve, and determine the target outlier of the filter response curve based on the first outlier and the second outlier. The filtered response curve is corrected based on the target anomaly point to obtain the corrected response curve of the original response curve; Before correcting the filtered response curve based on the target outlier to obtain the corrected response curve of the original response curve, the method further includes: Determine the first-order difference curve of the filter response curve; Based on the target anomaly point, determine the third anomaly point on the first-order difference curve of the filter, and based on the third anomaly point, determine the normal filtering point on the first-order difference curve of the filter. The filter mean and filter standard deviation of the first-order difference curve are determined based on the filter normal point, and a filter deviation threshold interval is constructed based on the filter mean and the filter standard deviation. Points that are not within the filtering deviation threshold range among the normal filtering points are considered as first-order filtering outliers. Based on the first-order filter outliers, the filter outliers of the filter response curve are determined, and the filter outliers are used as the target outliers of the filter response curve.
2. The method of claim 1, wherein, The identification of the first outlier on the target first-order difference curve includes: S301. Determine the first mean and first standard deviation of the target first-order difference curve based on the first target point on the target first-order difference curve, and construct a first target deviation threshold interval based on the first mean and the first standard deviation. S302. Sequentially identify target identification anomalies in the first target points, wherein the target identification anomalies are points in the first target points whose reaction values are not within the first target deviation threshold range; S303. Remove the target identification anomalies on the target first-order difference curve to obtain a new target first-order difference curve; S304. If the termination condition is not met, the new target first-order difference curve is used as the target first-order difference curve in step S301, and steps S301-S304 are repeated until the termination condition is met. After the termination condition is met, all identified target identification anomalies are used as the first anomalies on the target first-order difference curve.
3. The method of claim 2, wherein, The termination conditions are met, including: If the ratio of the identified anomaly point to the first target point is greater than a preset ratio, then the termination condition is determined to be met; or, If, during the identification of target identification anomalies among the first target points, a preset number of consecutive first target points are not identified as target identification anomalies, then the termination condition is deemed met; or... If the number of iterations for filtering the first target normal point is greater than the preset number, then the termination condition is met.
4. The method of claim 1, wherein, The identification of the second outlier on the target second-order difference curve includes: The second mean and the second standard deviation of the target second-order difference curve are determined based on the second target point on the target second-order difference curve, and a second target deviation threshold interval is constructed based on the second mean and the second standard deviation. Points in the second target point whose reaction values are not within the range of the second target deviation threshold are designated as second anomalies.
5. The method of claim 4, wherein, The step of correcting the filtered response curve based on the target outlier to obtain the corrected response curve of the original response curve includes: Determine the sampling time of the target anomaly point, and divide the filtered response curve into several segments based on the sampling time; Determine the effective normal segment on the filtered response curve, and determine the effective abnormal segment on the filtered response curve based on the effective normal segment, wherein the number of target normal points in the effective normal segment is greater than the preset number of samples; Determine the positional relationship between the valid normal segment and the valid abnormal segment; The correction rules for the filter response curve are determined based on the positional relationship. The filtered response curve is corrected based on the correction rule to obtain the corrected response curve of the original response curve.
6. The method of claim 5, wherein, Before determining the positional relationship between the valid normal segment and the valid abnormal segment, the method further includes: Based on the first-order filter anomaly points, determine the first-order filter normal points on the first-order filter difference curve; Determine the fitting model; Based on the first-order filter normal points and the fitting model, fit a first-order difference trend line; Determine the time corresponding point of the first-order filter anomaly point on the first-order difference trend line. Replace the first-order filtering outlier on the first-order filtering difference curve with the corresponding time point to obtain a new first-order filtering difference curve.
7. The method according to any one of claims 5 or 6, wherein, The correction rules include a first correction rule, a second correction rule, and a third correction rule; wherein... The step of determining the correction rule for the filter response curve based on the positional relationship includes: When it is determined that there are valid normal segments before and after the valid abnormal segment, the correction rule of the filter response curve is determined to be the first correction rule. The first correction rule is to determine a preset number of points from the two valid normal segments before and after the effective abnormal segments, fit them to obtain a fitted curve segment, and replace the valid abnormal segment on the filter response curve with the fitted curve segment. When the positional relationship is determined to be such that there is only a valid normal segment before the valid abnormal segment, the correction rule for the filter response curve is determined to be a second correction rule, wherein the second correction rule is to determine the closest point on the valid normal segment to the valid abnormal segment, and use a new first-order difference filter curve to correct the valid abnormal segment point by point from front to back according to the closest point; When the positional relationship is determined to be such that a valid normal segment exists only after the valid abnormal segment, the correction rule for the filter response curve is determined to be the third correction rule. The third correction rule is to determine the closest point on the valid normal segment to the valid abnormal segment, and use a new first-order difference filter curve to correct the valid abnormal segment point by point from the back to the front according to the closest point.
8. A sample analyzer characterized by, The sample analyzer uses the method for correcting the reaction curve according to any one of claims 1 to 7.
9. A storage medium, characterized by The storage medium stores a correction program for the reaction curve, which, when executed by a processor, implements the steps of the reaction curve correction method as described in any one of claims 1 to 7.