Liquid temperature data acquisition method, device, storage medium and electronic device
By setting a temperature sensor at one end of the container and switching the shaking state in a preset cycle, the temperature data within the target time period is obtained, and the temperature data estimation formula is applied to predict the temperature. This solves the problem of inaccurate temperature control when the amount of reaction liquid is small and the equipment is shaking, and achieves high-precision temperature control.
Patent Information
- Application Number
- CN202210453062.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-27
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-04-27
AI Technical Summary
When the amount of reaction liquid is small and the device is shaking, it is difficult to accurately obtain the temperature of the measured liquid using existing technologies, resulting in inaccurate temperature control and complex device hardware installation.
By setting a temperature sensor at one end of the container and switching the shaking state at a preset period, the temperature data within the target time period is obtained. The temperature is estimated by applying the temperature data prediction formula, including linear interpolation and oscillation attenuation curve method, to achieve accurate temperature prediction.
Even if only one temperature sensor is used, the temperature data in each shaking cycle can be accurately obtained when the device is shaken, which improves the accuracy and stability of temperature control and avoids hardware complexity.
Smart Images

Figure CN114812859B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of temperature control, and more specifically, to a method, device, storage medium, and electronic device for acquiring liquid temperature data. Background Art
[0002] The fully automatic slide processing system is an instrument for processing cytological samples, histological samples (puncture or neutral formalin-fixed paraffin-embedded tissue sections) and blood samples before pathological analysis. Its working process generally includes: pretreatment process (dewaxing, boiling, digestion), denaturation / hybridization, and post-hybridization cleaning process, thereby realizing the automation of the FISH preparation process and greatly improving work efficiency.
[0003] During the processing of FISH preparation, the temperature needs to be repeatedly increased, decreased, and then increased again. For example, during the pretreatment, the water temperature for boiling the slices is set at around 88±1°C (maintained after the temperature is increased), and then it needs to be lowered to room temperature for washing; during hybridization, the temperature needs to be raised to 85±1°C, and then lowered to 37±1°C for washing. Simple temperature control falls within the scope of conventional methods, but during the temperature control process, the reaction tank needs to be shaken back and forth (one shaking cycle is about 6-7S), and the amount of reaction liquid used in each operation should be as small as possible. The amount of reaction liquid and the temperature value are set by the user, and then the system completes the automatic operation. The conventional temperature measurement method is that the temperature sensor contacts the liquid to be measured in real time, thereby directly sensing the measured value and obtaining the temperature value in real time. However, due to the small amount of reaction liquid, when the equipment is shaking, there is a period of time when the sensor cannot directly contact the liquid to be measured.
[0004] Therefore, how to accurately obtain the temperature of the measured liquid when the amount of reaction liquid is small and the equipment is shaking has become a difficult problem that needs to be solved urgently by those skilled in the art. Summary of the Invention
[0005] The purpose of this application is to provide a liquid temperature data acquisition method, device, storage medium and electronic device to at least partially improve the above-mentioned problems.
[0006] In order to achieve the above objectives, the technical solutions adopted in the embodiments of the present application are as follows:
[0007] In a first aspect, embodiments of the present application provide a method for acquiring liquid temperature data. The method is applied to an electronic device, wherein the electronic device is communicatively connected to a temperature sensor disposed at one end of a container. The container is shaken according to a preset period. During the preset period, the temperature sensor switches between being immersed in the liquid in the container and not immersed in the liquid in the container. The method includes:
[0008] Acquiring temperature data collected by the temperature sensor within a target time period, wherein the target time period is a preset time period after the end of the container provided with the temperature sensor swings to the lowest position;
[0009] Determining a temperature data prediction formula based on the temperature data within the target time period;
[0010] The temperature data within the prediction time period is estimated according to the temperature data estimation formula.
[0011] In a second aspect, an embodiment of the present application provides a liquid temperature data acquisition device, the device being applied to an electronic device, the electronic device being communicatively connected to a temperature sensor disposed at one end of a container, the container being shaken according to a preset period, and within the preset period, the temperature sensor switching between being immersed in the liquid in the container and not immersed in the liquid in the container, the device comprising:
[0012] an information acquisition unit, configured to acquire temperature data collected by the temperature sensor within a target time period, wherein the target time period is a preset time period after the end of the container provided with the temperature sensor swings to the lowest position;
[0013] a processing unit, configured to determine a temperature data prediction formula based on the temperature data within the target time period;
[0014] The processing unit is further configured to estimate the temperature data within a prediction time period according to the temperature data estimation formula.
[0015] In a third aspect, an embodiment of the present application provides a storage medium on which a computer program is stored, and the computer program implements the above method when executed by a processor.
[0016] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, wherein the memory is used to store one or more programs; when the one or more programs are executed by the processor, the above-mentioned method is implemented.
[0017] Compared to the prior art, the embodiments of the present application provide a method, device, storage medium, and electronic device for acquiring liquid temperature data, which are applied to electronic devices. The electronic device is in communication with a temperature sensor disposed at one end of a container. The container is shaken according to a preset cycle. During the preset cycle, the temperature sensor switches between being immersed in the liquid in the container and not being immersed in the liquid in the container. The method includes: acquiring temperature data collected by the temperature sensor within a target time period, where the target time period is a preset time period after the end of the container where the temperature sensor is disposed has shaken to the lowest position; determining a temperature data estimation formula based on the temperature data within the target time period; and estimating the temperature data within the time period to be predicted based on the temperature data estimation formula. Even if only one temperature sensor is provided, the temperature data in each shaking cycle can be accurately obtained without incurring additional costs.
[0018] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 A schematic diagram of a container provided in an embodiment of the present application;
[0021] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0022] Figure 3 A flow chart of a method for acquiring liquid temperature data provided in an embodiment of the present application;
[0023] Figure 4 A schematic diagram of the sub-steps of S104 provided in an embodiment of the present application;
[0024] Figure 5 A schematic diagram of the regression line provided in the embodiment of the present application;
[0025] Figure 6 This is one of the sub-step schematic diagrams of S104 provided in an embodiment of the present application;
[0026] Figure 7 A schematic diagram of the sub-steps of S104-3 provided in an embodiment of the present application;
[0027] Figure 8This is a flow chart of a method for obtaining liquid temperature data according to an embodiment of the present application;
[0028] Figure 9 This is a unit diagram of the liquid temperature data acquisition device provided in an embodiment of the present application.
[0029] In the figure: 10 - processor; 11 - memory; 12 - bus; 13 - communication interface; 201 - information acquisition unit; 202 - processing unit. DETAILED DESCRIPTION
[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Generally, the components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.
[0031] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in the present application without creative work are within the scope of protection of the present application.
[0032] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and should not be understood as indicating or implying relative importance.
[0033] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0034] In the description of this application, it should be noted that the terms "upper", "lower", "inside", "outside", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, or are the orientations or positional relationships in which the product of the application is usually placed when in use. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, they should not be understood as limitations on this application.
[0035] It should also be noted that, in the description of this application, unless otherwise expressly specified or limited, the terms "disposed" and "connected" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; mechanical connections, or electrical connections; direct connections, indirect connections through an intermediate medium, or internal connections between two components. Those skilled in the art will understand the specific meanings of the above terms in this application based on the specific circumstances.
[0036] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.
[0037] The fully automated slide processing system is designed for preparative analysis of cytology, histology (paraffin-embedded tissue sections fixed with puncture or neutral formalin), and blood samples. Its workflow generally includes pretreatment (dewaxing, boiling, and digestion), denaturation / hybridization, and post-hybridization washes, automating the FISH slide preparation process and significantly improving efficiency. During FISH slide preparation, the automated slide processing system repeatedly heats, cools, and heats up again. For example, during pretreatment, the boiling water temperature is set at approximately 88±1°C (maintained after heating), then lowered to room temperature for washing. During hybridization, the temperature is raised to 85±1°C and then lowered to 37±1°C for washing. Simple temperature control is standard, but during this process, the reaction chamber must be shaken back and forth (each shaking cycle lasts approximately 6-7 seconds). The amount of reaction liquid used for each operation must be kept to a minimum. The reaction liquid volume and temperature are user-configured, and the system automatically controls the temperature.
[0038] The temperature sensor can be set to contact the measured liquid in real time, so as to directly sense the measured liquid and obtain the temperature value in real time. However, when the amount of reaction liquid is small and the device is in a shaking state, the sensor may not be able to directly contact the measured liquid at some time. Since the amount of reaction liquid is unknown, it is also impossible to clearly define when it can directly contact the liquid or when it cannot contact the liquid. Figure 1Therefore, temperature sensors are often installed on either side of a shaking container (e.g., a reaction tank). In one possible implementation, two sensors can be installed on either side of a reaction tank, so that one side can always directly contact the liquid being measured. However, sensors must be installed to understand the real-time inclination of the reaction tank to determine which sensor outputs the data. This can easily lead to misjudgment when the liquid volume is low, complicating the hardware installation.
[0039] However, when only one temperature sensor is installed on a single side of the reaction tank, during a shaking cycle (6-7 seconds), a measurement sequence can be obtained half of the time, and no value is obtained half of the time (approximately 3-3.5 seconds). Due to the relatively small amount of reaction liquid (tens of milliliters at most), the reaction liquid has a certain thermal inertia when heating and cooling, which is significantly different from the high inertia of water temperature control in traditional industries. The system normally samples and implements control approximately once every 200ms, but in actual applications, there are no sample values for 3-3.5 seconds, which is an ultra-low sampling rate. This poses a great challenge to controlling and maintaining the high-precision temperature of the reaction tank.
[0040] After a lot of test experiments and effect comparison, the inventor found that the temperature control method can be divided into three stages: heating stage, cooling stage and temperature oscillation attenuation stage. Assuming the current sampling temperature is T i , the target temperature is T g , then consider the following definition:
[0041] (1) When T g -T i When it is greater than 5, it is determined that the current stage is heating up, and the temperature control strategy considered is linear interpolation;
[0042] (2) When T g -T i <-3, it is determined that the current temperature is in the cooling stage, and the temperature control strategy is linear interpolation;
[0043] (3) When -3<T g -T i When <5, it is determined that the current stage is temperature oscillation attenuation, and the temperature control method considered is the oscillation attenuation curve method.
[0044] After extensive preliminary calibration testing, the inventors discovered that when the heating element is driven at full power, the temperature increases by approximately one degree Celsius every one to two seconds; while cooling, the temperature decreases by one degree Celsius every two to four seconds. Based on this characteristic, extensive measurements have shown that the heating and cooling strategies are consistent. This article will only describe the temperature control method for unidirectional temperature changes and temperature changes during oscillation decay.
[0045] The present application provides an electronic device, which can be a control system of a slide processing system, a computer, a mobile phone, a server, or other terminal devices with computing and processing capabilities. Figure 2 , a schematic diagram of the structure of an electronic device. The electronic device includes a processor 10, a memory 11, and a bus 12. The processor 10 and the memory 11 are connected via the bus 12. The processor 10 is used to execute executable modules stored in the memory 11, such as computer programs.
[0046] The processor 10 can be an integrated circuit chip with signal processing capabilities. During the implementation process, each step of the liquid temperature data acquisition method can be completed by the hardware integrated logic circuit in the processor 10 or the instructions in the form of software. The above-mentioned processor 10 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0047] The memory 11 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory.
[0048] The bus 12 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus. Figure 2 Only one bidirectional arrow is used in the figure, but it does not mean that there is only one bus 12 or one type of bus 12.
[0049] Memory 11 is used to store programs, such as a program for a liquid temperature data acquisition device. The liquid temperature data acquisition device includes at least one software functional module, which can be stored in memory 11 in the form of software or firmware, or embedded in the operating system (OS) of the electronic device. Upon receiving an execution instruction, processor 10 executes the program to implement the liquid temperature data acquisition method.
[0050] Possibly, the electronic device provided in the embodiment of the present application further includes a communication interface 13. The communication interface 13 is connected to the processor 10 via a bus. For example, data transmitted by a temperature sensor is acquired via the communication interface 13.
[0051] Optionally, the electronic device is in communication with a temperature sensor disposed at one end of the container, such as Figure 2 As shown, the container is shaken according to a preset period, and within the preset period, the temperature sensor switches between being immersed in the liquid in the container and not immersed in the liquid in the container.
[0052] It should be understood that Figure 2 The structure shown is only a schematic diagram of a portion of the electronic device. The electronic device may also include Figure 2 More or fewer components than shown, or with Figure 2 Different configurations shown. Figure 2 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0053] The liquid temperature data acquisition method provided in the embodiment of the present application can be applied to, but not limited to, Figure 2 For detailed procedures, please refer to the electronic equipment shown in Figure 3 The liquid temperature data acquisition method includes: S101, S104 and S105, which are described in detail as follows.
[0054] S101, obtaining temperature data collected by a temperature sensor within a target time period.
[0055] The target time period is a preset time period after the end of the container provided with the temperature sensor swings to the lowest position.
[0056] like Figure 1 As shown, when the container (reaction tank) is shaken to the far left, that is, when the end of the container equipped with the temperature sensor reaches the lowest position, the device starts to collect temperature values as the initial condition for starting the control point. Optionally, the temperature value is collected by contact and belongs to the normal control sequence. The flag indicates that the temperature value is collected and controlled once every 200ms.
[0057] The length of the preset time period is related to the length of the container's rocking cycle and the volume of the liquid in the container. In one possible implementation, the length of the preset time period can be half of the rocking cycle. It should be understood that the liquid in the container (e.g., a reaction tank) is not in contact with the temperature sensor for at least part of the rocking cycle.
[0058] S104: Determine a temperature data estimation formula based on the temperature data within the target time period.
[0059] As mentioned above, the temperature control method can be divided into three stages: heating stage, cooling stage and temperature oscillation attenuation stage. Assume that the current sampling temperature is T i , the target temperature is T g , then consider the following definition: (1) when T g -T i >5, it is determined that the current stage is heating up, and the temperature control strategy considered is linear interpolation; (2) When T g -T i <-3, it is determined that the current stage is cooling, and the temperature control strategy is linear interpolation; (3) When -3 < T g -T i When <5, it is determined that the current stage is temperature oscillation attenuation, and the temperature control method considered is the oscillation attenuation curve method.
[0060] From this, we can see that temperature data changes according to certain rules. By obtaining temperature data within the target time period, we can derive a temperature data prediction formula. The temperature data prediction formula is used to predict subsequent temperature data.
[0061] S105 , estimating the temperature data within the prediction time period according to the temperature data estimation formula.
[0062] It can be understood that the time period to be predicted may be a time period during which the subsequent temperature sensor is not covered by the liquid, that is, there is no contact between the two.
[0063] In summary, an embodiment of the present application provides a method for acquiring liquid temperature data, which is applied to an electronic device. The electronic device is communicatively connected to a temperature sensor disposed at one end of a container. The container is shaken according to a preset cycle. During the preset cycle, the temperature sensor switches between being immersed in the liquid in the container and not immersed in the liquid in the container. The method includes: acquiring temperature data collected by the temperature sensor within a target time period, where the target time period is a preset time period after the end of the container where the temperature sensor is disposed has shaken to the lowest position; determining a temperature data estimation formula based on the temperature data within the target time period; and estimating the temperature data within the time period to be predicted based on the temperature data estimation formula. Even if only one temperature sensor is provided, the temperature data for each shaking cycle can be accurately obtained without incurring additional costs.
[0064] When the current temperature change trend is a single direction change, the temperature data estimation formula is a linear polynomial. Single direction change includes a heating stage and a cooling stage. On this basis, for Figure 3 In S104, how to determine the temperature data estimation formula, the embodiment of the present application also provides a possible implementation method, please refer to Figure 4 , S104 includes: S104-1 and S104-2, which are described in detail as follows.
[0065] S104-1, performing polynomial fitting based on the temperature data within the target time period to determine polynomial coefficients of the linear polynomial.
[0066] Optionally, the linear polynomial expression is:
[0067]
[0068] Among them, T i Represents the temperature data collected for the i-th time, x i represents the length of the interval between the time of the i-th acquisition and the time point of the cycle start. a0, a1, and a2 represent the polynomial coefficients. The time point of the cycle start is the time point when the end of the container equipped with the temperature sensor swings to the lowest position. 1≤i≤n, n is the number of temperature acquisitions in the target time period.
[0069] Optionally, during the sampling period when the temperature sensor is in direct contact with the liquid, N sampling sequences A can be formed. i (T i , x i ). Optionally, N=(5*T p ) / 2-1, T p is the rocking period of the container.
[0070] It should be understood that, depending on the actual sequence of the above-mentioned N points, polynomial fitting can be performed to find the optimal polynomial coefficients.
[0071] Optionally, the least squares method is combined with solving a system of linear equations (implemented by Gaussian elimination) to find the optimal polynomial coefficients. The STM32F4 can perform the calculation to find the optimal polynomial coefficients.
[0072] List the relationship between the curve to be fitted and the actual points based on the expression of the linear polynomial:
[0073]
[0074] The relationship between them is listed using matrix notation as follows:
[0075]
[0076] Therefore, the coefficients of the regression polynomial can be expressed as:
[0077]
[0078] Among them, X T is the conversion matrix of matrix X.
[0079] Since in the known sequence, the input time series matrix X and its conversion to matrix X T All are known, the current temperature in the sequence If the matrix is also known, the system of equations can be solved. By using the mathematical elimination method, the optimal solution of the partial derivative of the objective function can be directly optimized in one step, and the optimal coefficient matrix can be calculated.
[0080] S104-2, determining a temperature data estimation formula based on the polynomial coefficients.
[0081] Predict the next N temperature value sequences A based on the temperature data prediction formula i+N (T i+N , x i+N ). The actual sampling obtained in the above is A i (T i , x i ), and for this sequence, a quadratic polynomial interpolation is performed to obtain the coefficients of the polynomial. Based on the linear polynomial expression, Ai+N(Ti+N,xi+N) can be predicted and calculated, i=1,2…n+1. In the subsequent shaking half cycle, these predicted points are used for temperature control, such as Figure 5 shown.
[0082] When the current temperature change trend is oscillation attenuation change, the temperature data estimation formula is the attenuation oscillation curve expression. Oscillation attenuation change includes oscillation attenuation stage. On this basis, for Figure 3 In S104, how to determine the temperature data estimation formula, the embodiment of the present application also provides a possible implementation method, please refer to Figure 6 , S104 includes: S104-3 and S104-4, which are described in detail as follows.
[0083] S104-3, performing nonlinear oscillation attenuation curve fitting based on the temperature data within the target time period, and determining the coefficient of the attenuated oscillation curve.
[0084] Optionally, the decay oscillation curve expression is:
[0085]
[0086] Among them, T i Represents the temperature data collected for the i-th time, xi represents the length of the interval between the time of the i-th acquisition and the time point of the cycle start. b and c represent the coefficients of the attenuated oscillation curve. The time point of the cycle start is the time point when the end of the container equipped with the temperature sensor swings to the lowest position. 1≤i≤n, n is the number of temperature acquisitions in the target time period.
[0087] Regarding how to determine the coefficients of the decay oscillation curve, please refer to the description of sub-step S104-3 below.
[0088] S104-4, determining an expression of the attenuated oscillation curve according to the coefficients of the attenuated oscillation curve.
[0089] Optionally, the following N temperature value sequences A are predicted based on the decay oscillation curve expression: i+N (T i+N , x i+N ).
[0090] exist Figure 6 Based on the content in S104-3, the present application embodiment also provides a possible implementation method, please refer to Figure 7 , S104-3 includes: S104-3A, S104-3B and S104-3C, which are described in detail as follows.
[0091] S104-3A, determining the minimum mean square error function of the fitted nonlinear oscillation attenuation curve as the iterative target loss function.
[0092] According to the expression of the decay oscillation curve, the fitting curve can be obtained as follows: Then we can get the minimum mean square error after fitting: The minimum mean square error function of the fitted nonlinear oscillation decay curve is determined as the iterative target loss function.
[0093] S104-3B, determining the gradient value of the coefficient of the attenuated oscillation curve according to the target loss function.
[0094] In order to make each objective function optimal (i.e., minimum mean square error), the partial derivative of each coefficient is calculated to be 0, and we can get:
[0095]
[0096]
[0097] Therefore, the optimal gradient values corresponding to the optimal parameters c and b can be obtained as follows:
[0098]
[0099]
[0100] Therefore, the iterative update formula of the coefficients can be obtained as:
[0101] c k+1 =c k + learning_rate*gradient_c;
[0102] b k+1 =b k + learning_rate*gradient_b;
[0103] Where learning_rate represents the learning rate. If the learning rate is too high, convergence may fail after the specified number of iterations. If it is too low, convergence is too slow. After extensive calculations, a value of 0.01 is recommended. Each iteration calculates the gradient corresponding to each coefficient c and b, and then uses the gradient and learning rate to update the next coefficient. This ensures that the corresponding LOSS loss function value decreases after each coefficient update, meaning that the gradient is constantly decreasing.
[0104] S104-3C, iterate the coefficients of the decay oscillation curve according to the gradient value and the preset learning rate until the number of iterations is greater than the preset number or the target loss function is less than the preset loss value, and determine the current iteration result as the coefficient of the final decay oscillation curve.
[0105] The preset number of times may be 2000. For example, when the number of iterations exceeds 2000 and the value of the loss function is less than a certain set value, the iteration is terminated, thereby outputting the optimal coefficients c and b.
[0106] Optionally, through a series of temperature control operations such as continuous acquisition, regression, prediction, and re-acquisition, a reasonable control strategy can be maintained to the greatest extent, thereby effectively solving the problem of loss of control caused by ultra-low sampling rates or large-scale missing sampling values. During the test, it was found that when the amount of liquid in the reaction tank increased or decreased, or when the initial conditions were inconsistent (such as inconsistent initial conditions caused by the ambient temperature after startup), under the action of the temperature data acquisition method provided in the embodiment of the present application, there was no obvious control difference, and the accuracy of the results was high.
[0107] Regarding how to determine the current temperature change trend, the present application embodiment also provides a possible implementation method, please refer to Figure 8 After S101, the liquid temperature data acquisition method further includes: S102 and S103, which are described in detail as follows.
[0108] S102: Determine evaluation data based on temperature data within a target time period.
[0109] The evaluation data may be the maximum value, minimum value, or average value of the temperature data within the target time period.
[0110] S103: Determine the current temperature change trend based on the evaluation data and the target temperature value.
[0111] Alternatively, (1) when T g -T i >5, it is determined that the current stage is heating up, and the temperature control strategy considered is linear interpolation; (2) When T g -T i <-3, it is determined that the current stage is cooling, and the temperature control strategy is linear interpolation; (3) When -3 < T g -T i When <5, it is determined that the current stage is temperature oscillation attenuation, and the temperature control method considered is the oscillation attenuation curve method. g Indicates the target temperature value, T i Indicates evaluation data.
[0112] See also Figure 9 , Figure 9 An embodiment of the present application provides a liquid temperature data acquisition device. Optionally, the liquid temperature data acquisition device is applied to the electronic device described above.
[0113] The liquid temperature data acquisition device includes: an information acquisition unit 201 and a processing unit 202 .
[0114] The information acquisition unit 201 is used to acquire temperature data collected by the temperature sensor within a target time period, wherein the target time period is a preset time period after the end of the container provided with the temperature sensor swings to the lowest position;
[0115] The processing unit 202 is configured to determine a temperature data prediction formula based on the temperature data within the target time period;
[0116] The processing unit 202 is further configured to estimate the temperature data within the prediction time period according to the temperature data estimation formula.
[0117] Optionally, the information acquisition unit 201 may execute the above-mentioned S101 , and the processing unit 202 may execute the above-mentioned S102 to S104 .
[0118] It should be noted that the liquid temperature data acquisition device provided in this embodiment can execute the method flow shown in the above method flow embodiment to achieve the corresponding technical effects. For the sake of brevity, any part not mentioned in this embodiment can be referred to the corresponding content in the above embodiment.
[0119] The present application also provides a storage medium storing computer instructions and programs that, when read and executed, execute the liquid temperature data acquisition method of the above embodiment. The storage medium may include memory, flash memory, registers, or a combination thereof.
[0120] The following provides an electronic device, which can be a control system of a slide processing system, a computer, a mobile phone, a server, or other terminal equipment with computing and processing capabilities. Figure 2 As shown, the above-described method for acquiring liquid temperature data can be implemented. Specifically, the electronic device includes: a processor 10, a memory 11, and a bus 12. The processor 10 may be a CPU. The memory 11 is used to store one or more programs. When the one or more programs are executed by the processor 10, the above-described method for acquiring liquid temperature data is performed.
[0121] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.
[0122] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0123] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0124] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
[0125] It will be apparent to those skilled in the art that the present application is not limited to the details of the exemplary embodiments described above and that the present application can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the present application is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.
Claims
1. A method for acquiring liquid temperature data, characterized in that: The method is applied to an electronic device, wherein the electronic device is communicatively connected to a temperature sensor disposed at one end of a container, the container is shaken according to a preset period, and within the preset period, the temperature sensor switches between being immersed in liquid in the container and not immersed in the liquid in the container. The method includes: Acquiring temperature data collected by the temperature sensor within a target time period, wherein the target time period is a preset time period after the end of the container provided with the temperature sensor swings to the lowest position; Determining a temperature data prediction formula based on the temperature data within the target time period; Estimating the temperature data within the prediction time period according to the temperature data estimation formula; When the current temperature change trend is a single-direction change, the temperature data prediction formula is a linear polynomial, and determining the temperature data prediction formula based on the temperature data in the target time period includes: performing polynomial fitting based on the temperature data in the target time period to determine polynomial coefficients of the linear polynomial; and determining the temperature data prediction formula based on the polynomial coefficients; When the current temperature change trend is an oscillating attenuation change, the temperature data prediction formula is an attenuated oscillation curve expression. The temperature data prediction formula is determined based on the temperature data in the target time period, including: performing nonlinear oscillation attenuation curve fitting based on the temperature data in the target time period to determine the coefficient of the attenuated oscillation curve; and determining the attenuated oscillation curve expression based on the coefficient of the attenuated oscillation curve.
2. The method for acquiring liquid temperature data according to claim 1, wherein: The linear polynomial expression is: Among them, T i Represents the temperature data collected for the i-th time, x i represents the length of the interval between the time of the i-th acquisition and the time point of the cycle start. a0, a1, and a2 represent the polynomial coefficients. The time point of the cycle start is the time point when the end of the container equipped with the temperature sensor swings to the lowest position. 1≤i≤n, where n is the number of temperature acquisitions within the target time period.
3. The method for acquiring liquid temperature data according to claim 1, wherein: The decay oscillation curve expression is: Among them, T i Represents the temperature data collected for the i-th time, x i represents the length of the interval between the time of the i-th acquisition and the time point of the cycle start, b and c represent the coefficients of the attenuated oscillation curve, the time point of the cycle start is the time point when the end of the container equipped with the temperature sensor swings to the lowest position, 1≤i≤n, n is the number of temperature acquisitions in the target time period.
4. The method for acquiring liquid temperature data according to claim 1, wherein: The performing nonlinear oscillation attenuation curve fitting based on the temperature data within the target time period to determine the coefficient of the attenuated oscillation curve includes: The minimum mean square error function of the fitted nonlinear oscillation decay curve is determined as the iterative target loss function; Determining a gradient value of a coefficient of a damped oscillation curve according to the target loss function; The coefficients of the decay oscillation curve are iterated according to the gradient value and the preset learning rate until the number of iterations is greater than the preset number or the target loss function is less than the preset loss value, and the current iteration result is determined as the coefficient of the final decay oscillation curve.
5. The method for acquiring liquid temperature data according to any one of claims 1 to 4, wherein: After acquiring the temperature data collected by the temperature sensor within the target time period, the method further includes: Determining evaluation data based on temperature data within the target time period; The current temperature change trend is determined based on the evaluation data and the target temperature value.
6. A liquid temperature data acquisition device, characterized in that: The device is applied to an electronic device, wherein the electronic device is communicatively connected to a temperature sensor disposed at one end of a container. The container is shaken according to a preset period, and within the preset period, the temperature sensor switches between being immersed in liquid in the container and not immersed in the liquid in the container. The device comprises: an information acquisition unit, configured to acquire temperature data collected by the temperature sensor within a target time period, wherein the target time period is a preset time period after the end of the container provided with the temperature sensor swings to the lowest position; a processing unit, configured to determine a temperature data prediction formula based on the temperature data within the target time period; The processing unit is further configured to estimate the temperature data within the prediction time period according to the temperature data estimation formula; When the current temperature change trend is a single-direction change, the temperature data prediction formula is a linear polynomial, and determining the temperature data prediction formula based on the temperature data in the target time period includes: performing polynomial fitting based on the temperature data in the target time period to determine polynomial coefficients of the linear polynomial; and determining the temperature data prediction formula based on the polynomial coefficients; When the current temperature change trend is an oscillating attenuation change, the temperature data prediction formula is an attenuated oscillation curve expression. The temperature data prediction formula is determined based on the temperature data in the target time period, including: performing nonlinear oscillation attenuation curve fitting based on the temperature data in the target time period to determine the coefficient of the attenuated oscillation curve; and determining the attenuated oscillation curve expression based on the coefficient of the attenuated oscillation curve.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
8. An electronic device, characterized in that: include: a processor and a memory, the memory being configured to store one or more programs; When the one or more programs are executed by the processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Synchronous liquid surface tension coefficient and density measuring device and method
CN110736684A
Device and method for measuring temperature coefficient of permanent magnet material based on accelerometer
CN112798993A