Method and apparatus for constructing temperature compensation model
By deploying two temperature sensors and an environmental sensor within a small weather station, a temperature compensation model was constructed. Real-time compensation was then performed using a linear regression model, which solved the problem of inaccurate temperature measurements at small weather stations under extreme weather conditions and improved the accuracy of the measurements.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2026-04-16
AI Technical Summary
Small weather stations may not measure temperatures accurately under extreme weather conditions, especially when heat sources are concentrated in high temperatures, or when there is snow or ice cover in winter or when temperatures change rapidly. This can cause temperature sensors to measure too high or too low, affecting the accuracy of the measurements.
Two temperature sensors are deployed in a small weather station, one close to the large mass and the other far away. Combined with environmental sensor data, a temperature compensation model is constructed using a linear regression model, and real-time compensation is performed using offset temperature data and environmental data.
This method improves the accuracy of temperature measurement at small weather stations under extreme weather conditions and solves the measurement error problems caused by interference from internal heat source devices and environmental changes in traditional methods.
Smart Images

Figure CN2024140876_16042026_PF_FP_ABST
Abstract
Description
A method and apparatus for constructing a temperature compensation model
[0001] This invention claims priority to Chinese patent application filed on October 12, 2024, with application number 202411421802.X and title "A method and apparatus for constructing a temperature compensation model". Technical Field
[0002] This application relates to the field of temperature measurement technology, and in particular to a method and apparatus for constructing a temperature compensation model. Background Technology
[0003] A small weather station is a small device used to detect and record environmental parameters. Due to its convenience, ease of installation, and low cost, small weather stations are widely used in meteorological, agricultural, and other technical fields.
[0004] Due to the structural characteristics of small weather stations, under high-temperature conditions or direct sunlight, heat sources accumulate inside the station, causing the temperature sensors to measure higher temperatures. In snowy winter conditions, snow and ice covering the station can hinder good contact between the temperature sensors and the surrounding air, causing them to measure the temperature of the snow and ice covering the station instead of the surrounding air, resulting in lower temperature readings. Furthermore, during rapid temperature changes (increases or decreases), the large mass of the weather station cannot respond quickly to these changes, leading to temperature sensor readings that are either too low or too high.
[0005] This indicates that small weather stations are inaccurate in temperature measurements under extreme weather conditions, thus affecting the overall accuracy of temperature measurements at small weather stations. Summary of the Invention
[0006] To address the aforementioned issues, this application provides a method and apparatus for constructing a temperature compensation model. The temperature compensation model constructed using this method, along with two temperature sensors and an environmental sensor within a small weather station, can provide real-time compensation for the detected temperature, thereby resolving the problem of inaccurate temperature measurements at small weather stations under extreme weather conditions and improving the overall accuracy of temperature measurements at the small weather station.
[0007] The embodiments of this application disclose the following technical solutions:
[0008] In a first aspect, this application discloses a method for constructing a temperature compensation model, applied to a small weather station. The weather station includes: a large mass body, an environmental sensor, and two temperature sensors. The two temperature sensors are placed at different locations on the same medium, with one temperature sensor close to the large mass body and the other temperature sensor far from the large mass body. The method includes:
[0009] The system acquires two current temperature data points and two offset temperature data points corresponding to the two temperature sensors, as well as environmental data within the offset time period corresponding to the environmental sensor; wherein, the current temperature data is the temperature data collected by the temperature sensor at the current time; the offset temperature data is the temperature data collected by the temperature sensor at the offset time, the offset time being the time corresponding to a preset time interval past the current time; and the offset time period is the time period between the current time and the offset time.
[0010] Based on the two current temperature data and the environmental data, multiple current combination data corresponding to the two current temperature data are obtained; and based on the two offset temperature data and the environmental data, multiple offset combination data corresponding to the two offset temperature data are obtained.
[0011] A training dataset is constructed based on the two current temperature data, the multiple current combination data, the multiple offset combination data, and the corresponding target temperature data; wherein, the training dataset includes multiple data subsets consisting of two current temperature data, multiple current combination data, multiple offset combination data, and the corresponding target temperature data;
[0012] Based on the training dataset, a linear regression model is trained to obtain a temperature compensation model.
[0013] Optionally, the environmental sensor includes a wind speed sensor; the environmental data within the offset time period corresponding to the environmental sensor includes wind speed data within the offset time period corresponding to the wind speed sensor.
[0014] The process involves combining the two current temperature data and the environmental data to obtain multiple current combined data corresponding to each of the two current temperature data; and combining the two offset temperature data and the environmental data to obtain multiple offset combined data corresponding to each of the two offset temperature data, including:
[0015] Based on the two current temperature data and the wind speed data, two current combined data corresponding to the two current temperature data are obtained respectively; and based on the two offset temperature data and the wind speed data, two offset combined data corresponding to the two offset temperature data are obtained respectively.
[0016] The training dataset is constructed based on the two current temperature data, the multiple current combination data, the multiple offset combination data, and the corresponding target temperature data, including:
[0017] A training dataset is constructed based on the two current temperature data, the two current combined data, the two offset combined data, and the corresponding target temperature data; wherein, the training dataset includes multiple data subsets consisting of the two current temperature data, the two current combined data, the two offset combined data, and the corresponding target temperature data.
[0018] Optionally, the step of constructing a training dataset based on the two current temperature data, the two current combined data, the two offset combined data, and the corresponding target temperature data includes:
[0019] Based on the two current temperature data, the two current combined data, and the two offset combined data, construct the corresponding six-variable quadratic polynomial feature;
[0020] A training dataset is constructed based on the corresponding six-variable quadratic polynomial features and the corresponding target temperature data; wherein the training dataset includes multiple data subsets consisting of six-variable quadratic polynomial features and the corresponding target temperature data.
[0021] Optionally, the wind speed data within the offset time period includes: the average wind speed within the offset time period.
[0022] Optionally, the average wind speed during the offset time period is obtained in the following way:
[0023] Multiple wind speeds within the offset time period are obtained using a wind speed sensor;
[0024] Based on the multiple wind speeds, the average wind speed within the offset time period is calculated.
[0025] Optionally, the step of combining the two current temperature data and the wind speed data to obtain two current combined data corresponding to the two current temperature data respectively includes:
[0026] Based on the two current temperature data and the wind speed data, two current combination data corresponding to the two current temperature data are obtained by combining them using a first preset formula;
[0027] The first preset formula is as follows:
[0028] Among them, E c T represents the current combination of data corresponding to the current temperature data. c Here is the current temperature data, and v is the wind speed data within the offset time period;
[0029] The process of combining the two offset temperature data and the wind speed data to obtain two offset combination data corresponding to the two offset temperature data respectively includes:
[0030] Based on the two offset temperature data and the wind speed data, two offset combination data corresponding to the two offset temperature data are obtained by combining them using the second preset formula;
[0031] The second preset formula is as follows:
[0032] Among them, E p For the offset combination data corresponding to the offset temperature data, T p v represents the offset temperature data, and v represents the wind speed data within the offset time period.
[0033] Optionally, the preset time interval is a time interval corresponding to a preset number of interval units.
[0034] Optionally, training a linear regression model based on the training dataset to obtain a temperature compensation model includes:
[0035] Based on the training dataset, a linear regression model is trained, and the corresponding root mean square error and coefficient of determination are recorded.
[0036] When the corresponding root mean square error and coefficient of determination meet the preset requirements, the training of the linear regression model ends, and the temperature compensation model is obtained.
[0037] Optionally, after training the linear regression model based on the training dataset to obtain the temperature compensation model, the method further includes:
[0038] Acquire the current temperature data corresponding to the two temperature sensors, and the environmental data corresponding to the offset time period of the environmental sensor;
[0039] Based on the two current temperature data and the environmental data of the offset time period, the actual temperature data is obtained through the temperature compensation model.
[0040] Secondly, this application discloses a device for constructing a temperature compensation model, applied to a small weather station. The small weather station includes: a large mass body, an environmental sensor, and two temperature sensors. The two temperature sensors are placed at different locations on the same medium, with one temperature sensor close to the large mass body and the other temperature sensor far away from the large mass body. The device includes:
[0041] The acquisition module is used to acquire two current temperature data and two offset temperature data corresponding to the two temperature sensors, and environmental data within the offset time period corresponding to the environmental sensor; wherein, the current temperature data is the temperature data collected by the temperature sensor at the current time; the offset temperature data is the temperature data collected by the temperature sensor at the offset time, the offset time is the time corresponding to the preset time interval past the current time; and the offset time period is the time period between the current time and the offset time.
[0042] The combination module is used to combine the two current temperature data and the environmental data to obtain multiple current combination data corresponding to the two current temperature data respectively; and to combine the two offset temperature data and the environmental data to obtain multiple offset combination data corresponding to the two offset temperature data respectively.
[0043] A construction module is used to construct a training dataset based on the two current temperature data, the multiple current combination data, the multiple offset combination data, and the corresponding target temperature data; wherein, the training dataset includes multiple data subsets consisting of two current temperature data, multiple current combination data, multiple offset combination data, and the corresponding target temperature data;
[0044] The training module is used to train a linear regression model based on the training dataset to obtain a temperature compensation model.
[0045] Optionally, the acquisition module is specifically used to acquire two current temperature data and two offset temperature data corresponding to the two temperature sensors, as well as the wind speed data within the offset time period corresponding to the wind speed sensor.
[0046] The combination module is specifically used to combine the two current temperature data and the wind speed data to obtain two current combination data corresponding to the two current temperature data respectively; and to combine the two offset temperature data and the wind speed data to obtain two offset combination data corresponding to the two offset temperature data respectively.
[0047] The construction module is specifically used to construct a training dataset based on the two current temperature data, the two current combined data, the two offset combined data, and the corresponding target temperature data.
[0048] Optionally, the building module is specifically used for:
[0049] Based on the two current temperature data, the two current combined data, and the two offset combined data, construct the corresponding six-variable quadratic polynomial feature;
[0050] A training dataset is constructed based on the corresponding six-variable quadratic polynomial features and the corresponding target temperature data; wherein the training dataset includes multiple data subsets consisting of six-variable quadratic polynomial features and the corresponding target temperature data.
[0051] Optionally, the construction module is specifically used to construct the corresponding six-variable quadratic polynomial feature based on two current temperature data, two current combination data, and two offset combination data; and to construct the training dataset based on the corresponding six-variable quadratic polynomial feature and the corresponding target temperature data; wherein the training dataset includes multiple data subsets consisting of the six-variable quadratic polynomial feature and the corresponding target temperature data.
[0052] Optionally, the combination module is specifically used to combine two current temperature data and wind speed data according to a first preset formula to obtain two current combination data corresponding to the two current temperature data respectively; and to combine two offset temperature data and wind speed data according to a second preset formula to obtain two offset combination data corresponding to the two offset temperature data respectively.
[0053] Optionally, the training module is used to train a linear regression model based on the training dataset and record the corresponding root mean square error and coefficient of determination. When the corresponding root mean square error and coefficient of determination meet the preset requirements, the training of the linear regression model ends and the temperature compensation model is obtained.
[0054] Compared with existing technologies, this application has the following advantages: This application considers the effects of temperature conduction delay and other environmental parameters, thereby enabling offset temperature data and environmental data to participate in the construction of the temperature compensation model and improving the performance of the temperature compensation model; Furthermore, this application considers that the temperature curve of a single temperature sensor exhibits second-order Fourier curve characteristics due to the periodic switching of the internal heat source device, making it impossible to achieve a one-to-one mapping relationship between the temperature sensor output value and the target value. Therefore, by adding a temperature sensor at different locations on the same medium, that is, there are two temperature sensors inside the small weather station participating in temperature measurement, the temperature compensation model constructed by the method of this application, as well as the two temperature sensors and environmental sensors inside the small weather station, can perform real-time compensation for the detected temperature, solving the problem of inaccurate temperature measurement in small weather stations under extreme weather conditions, thereby improving the accuracy of temperature measurement in small weather stations. Attached Figure Description
[0055] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0056] Figure 1 is a schematic diagram of the distribution of two temperature sensors provided in an embodiment of this application;
[0057] Figure 2 is a flowchart illustrating a method for constructing a temperature compensation model according to an embodiment of this application;
[0058] Figure 3 is a schematic diagram of the process of temperature measurement through a temperature compensation model provided in an embodiment of this application;
[0059] Figure 4 is a flowchart illustrating another method for constructing a temperature compensation model provided in an embodiment of this application;
[0060] Figure 5 is a schematic diagram of a device for constructing a temperature compensation model according to an embodiment of this application. Detailed Implementation
[0061] As described earlier, current small weather stations suffer from inaccurate temperature measurements under extreme weather conditions due to their structural characteristics. In high-temperature environments or under direct sunlight, heat accumulates inside the small weather station, causing temperature sensors to measure temperatures inaccurately (too high). In snowy winter conditions, in addition to the snow and ice covering the small weather station causing the temperature sensors to measure the temperature of the snow and ice, the snow and ice cover also affects the performance of its internal sensors, especially the temperature sensors, leading to inaccurate readings.
[0062] Furthermore, current technology incorporates heat source devices inside small weather stations to mitigate the impact of snow and ice cover on their sensor performance. These devices increase the internal temperature, thereby melting the snow and ice. For example, a heating plate can be added inside the small weather station; when covered by snow and ice, the internal heat source device increases the temperature, thus melting the snow and ice.
[0063] However, the addition of a heat source device inside the small weather station introduces new heat source interference to the sensors inside the station, especially the temperature sensor. As a result, the temperature sensor inside the small weather station cannot accurately measure the actual outdoor temperature in snowy winter conditions.
[0064] The following example, using a small weather station with an internal heating plate, illustrates the impact of an internal heat source device on temperature measurement. It should be noted that the effects of adding an internal heat source device are similar under high-temperature conditions or direct sunlight.
[0065] The opening and closing of the heating plate (i.e., the internal heat source device) is affected by the ambient temperature and heat dissipation. In other words, the heating plate's operating characteristics are influenced by ambient temperature and heat dissipation conditions, and it does not perform specific heating at a fixed temperature point. For example, in a relatively enclosed environment, the heat generated by the heating plate is less likely to dissipate, resulting in a more significant heating effect. Under high wind speed conditions, heat is more easily carried away, so the heating plate needs to input more heat to maintain the set temperature. Furthermore, the heating plate has a built-in energy-saving mode, meaning it stops heating when a certain temperature is reached and restarts when the temperature drops to a certain threshold. The energy-saving mode of the heating plate has a critical temperature range within which the heating plate will periodically turn on and off. Under the periodic switching action of the heating plate, the temperature curve recorded by the temperature sensor in the small weather station exhibits second-order Fourier curve characteristics.
[0066] Typically, a small weather station is equipped with a single temperature sensor. However, due to the addition of heat source devices inside the small weather station, and the periodic switching of these internal heat source devices within the critical temperature range, heat conduction modeling using a single temperature sensor within the small weather station—that is, mapping the current temperature sensor output value to the actual (target) value—cannot be achieved within certain temperature ranges due to the periodic switching of the internal heat source devices. This results in a one-to-one mapping relationship between the output value and the target value, making it impossible for the small weather station to accurately measure the temperature.
[0067] This application provides a method for constructing a temperature compensation model, comprising: acquiring two current temperature data and two offset temperature data corresponding to two temperature sensors, and environmental data within an offset time period corresponding to an environmental sensor; combining the two current temperature data and the environmental data to obtain multiple current combination data corresponding to the two current temperature data; and combining the two offset temperature data and the environmental data to obtain multiple offset combination data corresponding to the two offset temperature data; constructing a training dataset based on the two current temperature data, multiple current combination data, multiple offset combination data, and corresponding target temperature data; and training a linear regression model based on the training dataset to obtain a temperature compensation model. This application considers the influence of temperature conduction delay and other environmental parameters, thereby enabling the offset temperature data and environmental data to participate in the construction of the temperature compensation model, improving the performance of the temperature compensation model. This allows the temperature compensation model constructed using the method of this application, as well as the two temperature sensors and the environmental sensor in a small weather station, to perform real-time compensation for the detected temperature, solving the problem of inaccurate temperature measurement at small weather stations under extreme weather conditions, and thus improving the accuracy of temperature measurement at small weather stations.
[0068] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0069] Example 1:
[0070] The following section, with reference to Figures 1-3, details a method for constructing a temperature compensation model provided in this application.
[0071] First, the method for constructing a temperature compensation model provided in this application is applied to a small weather station. This small weather station includes a large mass body, an environmental sensor, and two temperature sensors. The two temperature sensors are positioned at different locations within the same medium, with one temperature sensor close to the large mass body and the other far away.
[0072] In this context, an environmental sensor refers to a device used to detect and measure environmental data. In this embodiment, an environmental sensor refers to any device other than a temperature sensor used to detect and measure environmental data. Examples of environmental sensors include wind speed sensors, light sensors, and barometric pressure sensors.
[0073] From a thermodynamic perspective, a small weather station is an unsteady heat conduction system with an internal heat source device, but without control over this internal heat source. Therefore, the heat source inside a small weather station is uncontrollable or unknown. Using traditional partial differential equations for heat conduction in mathematical modeling is unusable due to the uncontrollable nature of the variables or the difficulty in obtaining locational factors. Numerical methods in real-world scenarios would consume significant computational resources, be slow, and have low accuracy, failing to address current technological challenges and being unsuitable for the application scope of small weather stations.
[0074] Furthermore, based on the first-type boundary conditions in the traditional partial differential equation of heat conduction, it can be seen that for a simple first-order heat conduction system without a heat source (i.e., a weather station without a heat source), obtaining the temperatures at the two endpoints allows for the derivation of the analytical solution to the partial differential equation of heat conduction. Therefore, in this embodiment, two temperature sensors are arranged inside the small weather station to obtain temperature data collected by the two sensors for mathematical modeling, thereby achieving real-time temperature compensation.
[0075] In this embodiment, a temperature sensor is added at a different location on the same medium. One of the two temperature sensors is close to the large mass body, and the other is far away from the large mass body (i.e., both temperature sensors are in the main heat conduction direction). This allows for two current output values and one actual (target) value, which can greatly reduce the ambiguity of the mapping and increase the availability of data features, thereby improving the accuracy and versatility of temperature testing.
[0076] Furthermore, the two temperature sensors are placed at different locations within the same medium, with one sensor closer to the large mass and the other farther away. This arrangement effectively distributes / places the two sensors along the main heat conduction direction of the small weather station, allowing for the capture of temperature gradient information and significantly increasing the usability of the temperature data. This enables subsequent data modeling based on the temperature data collected by the two sensors, resulting in accurate and reliable compensation for the actual temperature.
[0077] To facilitate understanding, the following detailed explanation will be provided in conjunction with the distribution of the two temperature sensors in the main heat conduction direction shown in Figure 1.
[0078] As shown in Figure 1, the system includes temperature sensor S1 and temperature sensor S2. Both temperature sensors S1 and S2 are arranged / positioned along the heat conduction direction. Temperature sensor S1 is closer to the large mass object, while temperature sensor S2 is closer to the external environment (which can also be understood as ambient air). Because temperature sensor S1 is closer to the large mass object, it is more affected by the temperature changes of the large mass object; temperature sensor S2 is closer to the external environment, i.e., farther from the large mass object, and is less affected by the temperature changes of the large mass object.
[0079] The large mass body refers to the device or structure within a small weather station used for stable temperature measurement. These devices or structures are designed to reduce the impact of rapid fluctuations in ambient temperature on the temperature sensor, thereby improving the accuracy and stability of the measurement. As shown in Figure 1, in this embodiment, the large mass body includes a heat source device, thus temperature sensor s1 is close to the heat source device, and temperature sensor s2 is far from the heat source device.
[0080] It should be noted that, in addition to being located within the main body of the large mass, the heat source device can also be arranged / set in other locations of the small weather station, depending on the actual structure of the small weather station. This application does not impose any specific limitations.
[0081] As shown in Figure 1, the thermal conductivity of temperature sensors s1 and s2 along the main heat conduction direction (thermal temperature gradient) is different. This is because the relationship between thermal conductivity and heat transfer distance is approximately linear and inversely proportional. That is, under the same conditions (such as the same material and the same cross-sectional area), the shorter the heat transfer distance, the higher the heat transfer efficiency, and vice versa.
[0082] Thermal conductivity refers to the ability of heat to be transferred from a high-temperature region to a low-temperature region through a solid material (i.e., along the main direction of heat conduction); heat transfer distance refers to the distance that heat is transferred during the heat conduction process. Under the same conditions, the shorter the heat transfer distance, the higher the heat transfer efficiency, because a shorter heat transfer distance means lower thermal resistance, and heat is more easily transferred from the high-temperature region to the low-temperature region.
[0083] Due to the above concepts, the relationship between heat conduction efficiency and heat transfer distance is nearly linear in the main heat conduction direction. Therefore, the temperature data collected by temperature sensors s1 and s2, which are distributed in the main heat conduction direction, can capture the temperature gradient information (i.e., temperature gradient). Thus, the temperature distribution between the two points s1 and s2 can be calculated using relevant physical parameters and the heat conduction equation. This allows for subsequent data modeling based on the temperature data collected by the two temperature sensors, thereby achieving accurate and reliable compensation of the actual temperature.
[0084] In one possible implementation, two temperature sensors are fixed / mounted on a temperature and humidity panel of a small weather station, spaced at a predetermined distance. One temperature sensor is closer to the main body, where airflow is poor; the other temperature sensor is farther away from the main body, where airflow is good. The temperature and humidity panel of the small weather station typically refers to the sensor module used to measure temperature and humidity. This module usually contains one or more sensor chips capable of simultaneously measuring air temperature and humidity.
[0085] For example, two temperature sensor chips are placed on a temperature and humidity plate, with a spacing of about 8 mm, one temperature sensor chip close to the heating plate and the other temperature sensor chip away from the heating plate.
[0086] In this embodiment, two temperature sensors placed in the same medium but at different locations exhibit consistency. Regardless of whether the environment is high-temperature, under direct sunlight, or in low-temperature conditions during winter or when the heating plate is on, the temperature data collected by the sensor closer to the large mass within the small weather station will be higher than the temperature data collected by the sensor farther away. Because the two temperature sensors are placed in the same medium but at different locations, with one sensor close to the large mass and the other far away (i.e., both sensors are in the main heat conduction direction), they exhibit consistency, which is helpful for subsequently constructing a temperature compensation model.
[0087] Furthermore, since the two temperature sensors are on the same medium, by controlling the variables, the uncertainties encountered when the two temperature sensors collect / measure temperature data are reduced, thereby making the temperature data collected / measured by the temperature sensors more effective.
[0088] As shown in Figure 2, the method for constructing a temperature compensation model provided in this embodiment of the application includes the following steps:
[0089] S201. Obtain two current temperature data and two offset temperature data corresponding to the two temperature sensors, as well as environmental data within the offset time period corresponding to the environmental sensor.
[0090] The current temperature data is the temperature data collected by the temperature sensor at the current time; the offset temperature data is the temperature data collected by the temperature sensor at an offset time, which is the time corresponding to a preset time interval past the current time.
[0091] The offset time period is the time period between the current time and the offset time, which is a preset time interval.
[0092] The environmental sensors include wind speed sensors, light intensity sensors, air pressure sensors, and rainfall sensors. The corresponding environmental data includes wind speed data, light intensity data, air pressure data, and rainfall data.
[0093] In one possible implementation, if an interval unit is preset, the preset time interval is the time interval corresponding to a preset number of interval units.
[0094] For example, assuming the interval unit is 8.75s and the preset quantity is 28, the preset time interval is the time interval corresponding to 28 interval units, that is, 28 * 8.75 = 245s; the offset time period is 245s; the offset time is the time corresponding to 245s before the current time.
[0095] In one possible implementation, the environmental data within the offset time period is the average data within the offset time period.
[0096] For example, assuming the offset time period is the time interval corresponding to a preset number of interval units, the environmental data corresponding to the time of each interval unit within the offset time period is obtained through the environmental sensor, that is, the preset number of environmental data is obtained; based on the preset number of environmental data, the average data within the offset time period is calculated.
[0097] S202. Based on two current temperature data and environmental data, combine them to obtain multiple current combination data corresponding to the two current temperature data respectively; and based on two temperature offset temperature data and environmental data, combine them to obtain multiple offset combination data corresponding to the two offset temperature data respectively.
[0098] In one possible implementation, when the environmental data within the offset time period corresponding to the environmental sensor is one type of environmental data (e.g., wind speed data), two current combined data corresponding to the two current temperature data are obtained by combining two current temperature data and one environmental data; and two offset combined data corresponding to the two offset temperature data are obtained by combining two temperature offset data and one environmental data.
[0099] In another possible implementation, when the environmental data within the offset time period corresponding to the environmental sensor consists of two types of environmental data (e.g., wind speed data and illumination data), based on the two current temperature data and the two environmental data, four current combination data corresponding to the two current temperature data are obtained respectively (e.g., including two current combination data obtained by combining with wind speed data and two current combination data obtained by combining with illumination data); and based on the two temperature offset temperature data and the two environmental data, four offset combination data corresponding to the two offset temperature data are obtained respectively.
[0100] In summary, when the environmental data within the offset time period corresponding to the environmental sensor consists of n (n types) environmental data, based on two current temperature data and n environmental data, 2n current combination data corresponding to the two current temperature data are obtained; and based on two temperature offset data and n environmental data, 2n offset combination data corresponding to the two offset temperature data are obtained. Here, n is a positive integer.
[0101] S203. Construct a training dataset based on two current temperature data, multiple current combination data, multiple offset combination data, and the corresponding target temperature data.
[0102] The training dataset includes multiple subsets of data consisting of two current temperature data, multiple current combination data, multiple offset combination data, and the corresponding target temperature data.
[0103] The target temperature data is the standard temperature data at the current time. For example, a standard thermometer can be placed, which is not affected by the internal heat source device (heating plate), and the temperature data collected by the standard thermometer at the current time is used as the standard temperature data (i.e., the target temperature data).
[0104] S204. Based on the training dataset, train a linear regression model to obtain a temperature compensation model.
[0105] Among them, the linear regression model is a widely used statistical method to establish a mathematical relationship between a dependent variable (usually called the response variable or target variable) and one or more independent variables.
[0106] In one possible implementation, a linear regression model is trained based on the training dataset, and the corresponding root mean square error and coefficient of determination are recorded. When the corresponding root mean square error and coefficient of determination meet the preset requirements, the training of the linear regression model is terminated, and the temperature compensation model is obtained.
[0107] The root mean square error (RMSE) is an important metric for evaluating the performance of a regression model. It measures the difference between the regression model's output value and the actual value (target value). Specifically, the RMSE is the square root of the average of the squared prediction errors. The smaller the RMSE, the closer the regression model's output value is to the actual value, and the better the regression model's performance.
[0108] Among them, the coefficient of determination (R²) 2 The coefficient of determination (COD) is an important metric for evaluating the performance of regression models, providing a quantitative way to measure the model's ability to explain the variance in the dependent variable. Specifically, the COD represents the proportion of the difference between the output values of the regression model and the actual values (i.e., the sum of squared residuals) to the total variance (i.e., the sum of squared differences between the actual values and their mean). In other words, the COD indicates how well the regression model fits the data; a larger COD value indicates a better fit and thus better model performance.
[0109] Specifically, when the corresponding root mean square error and coefficient of determination meet the preset requirements, the corresponding root mean square error is less than the first preset value, and the corresponding coefficient of determination is greater than the second preset value.
[0110] In the method for constructing a temperature compensation model provided in this application embodiment, considering the time delay in temperature conduction, offset temperature data is used to participate in the training of the temperature compensation model.
[0111] The delay in temperature conduction refers to the fact that when heat is transferred from one object to another, the temperature change is not immediately reflected in the adjacent object, but requires a certain amount of time to travel to a more distant location. This delay is determined by the physical characteristics of heat conduction. For example, when the heating plate switches on and off periodically, the minimum and maximum values of the two temperature sensors in a small weather station are not completely synchronized, with a time delay of approximately 3-6 seconds.
[0112] Furthermore, other environmental data / parameters affect the measured temperature, so other environmental data are added and combined with temperature data to participate in the training of the temperature compensation model.
[0113] The embodiment of this application provides a method for constructing a temperature compensation model. After obtaining the temperature compensation model, a small weather station uses the temperature compensation model to measure temperature.
[0114] To make it easier to understand, the following section, with reference to Figure 3, will explain in detail how to implement temperature measurement based on the temperature compensation model.
[0115] S301. Obtain the current temperature data corresponding to the two temperature sensors and the environmental data of the offset time period corresponding to the environmental sensor.
[0116] Specifically, temperature data collected by two temperature sensors at the same time is acquired. The method for acquiring environmental data during the offset time period is the same as that in S201, and will not be repeated here.
[0117] S302. Based on the two current temperature data and the environmental data of the offset time period, the actual temperature data is obtained through the temperature compensation model.
[0118] Specifically, two current temperature data points and environmental data from a shifted time period are input into the temperature compensation model. Based on these two current temperature data points and the environmental data from the shifted time period, the temperature compensation model outputs the corresponding target temperature data (i.e., the actual temperature data). The temperature compensation model achieves real-time compensation for the two current temperature data points, thereby obtaining the actual temperature data and improving the accuracy of temperature measurements at small weather stations.
[0119] This application provides a method for constructing a temperature compensation model, comprising: acquiring two current temperature data and two offset temperature data corresponding to two temperature sensors, and environmental data within an offset time period corresponding to an environmental sensor; combining the two current temperature data and environmental data to obtain multiple current combination data corresponding to the two current temperature data; and combining the two offset temperature data and environmental data to obtain multiple offset combination data corresponding to the two offset temperature data; constructing a training dataset based on the two current temperature data, multiple current combination data, multiple offset combination data, and corresponding target temperature data; and training a linear regression model based on the training dataset to obtain a temperature compensation model. This application considers the effects of temperature conduction delay and other environmental parameters, thereby enabling the offset temperature data and environmental data to participate in the construction of the temperature compensation model, improving the performance of the temperature compensation model. This allows the temperature compensation model constructed using the method of this application, along with the two temperature sensors and the environmental sensor in a small weather station, to perform real-time compensation for the detected temperature, solving the problem of inaccurate temperature measurement at small weather stations under extreme weather conditions, and thus improving the accuracy of temperature measurement at small weather stations.
[0120] Furthermore, the consistency between two temperature sensors placed in the same medium but at different locations further facilitates the construction of a temperature compensation model; and placing them in the same medium reduces uncertainties when the two temperature sensors acquire / measure temperature data, thereby making the temperature data acquired / measured by the temperature sensors more effective.
[0121] Example 2:
[0122] The following section, with reference to Figure 4, details a method for constructing a temperature compensation model provided in this application. The environmental sensor includes a wind speed sensor, and the corresponding environmental data is wind speed data.
[0123] S401. Obtain two current temperature data and two offset temperature data corresponding to the two temperature sensors, as well as the wind speed data within the offset time period corresponding to the wind speed sensor.
[0124] Wind speed data within the offset time period is one of the meteorological parameters affecting temperature balance, and it has a significant impact on the measurements of the two temperature sensors. For example, increased wind speed enhances heat conduction between the air and the temperature sensors. When the wind speed is high, airflow is faster, allowing heat to be transferred more quickly from higher-temperature areas to lower-temperature areas, thus increasing the heat conduction rate and causing the two temperature sensors to perceive different ambient temperatures. Therefore, in this embodiment, the impact of wind speed needs to be considered, and wind speed data within the offset time period corresponding to the wind speed sensor is obtained.
[0125] In one possible implementation, the wind speed data within the offset time period is the average wind speed within the offset time period.
[0126] Specifically, the average wind speed within the offset time period is obtained as follows: multiple wind speeds within the offset time period are acquired using a wind speed sensor; based on these multiple wind speeds, the average wind speed within the offset time period is calculated.
[0127] For example, assuming the offset time period is the time interval corresponding to a preset number of interval units, the wind speed at each interval unit within the offset time period is obtained through the wind speed sensor, that is, the preset number of wind speeds are obtained; based on the preset number of wind speeds, the average wind speed within the offset time period is calculated.
[0128] In one possible implementation, the environmental sensor also includes a light sensor, and the corresponding environmental data is light data. Then, the system acquires two current temperature data points and two offset temperature data points corresponding to the two temperature sensors, wind speed data within the offset time period corresponding to the wind speed sensor, and light data within the offset time period corresponding to the light sensor.
[0129] Among these parameters, the illumination data within the offset time period is one of the meteorological parameters affecting temperature balance. For example, sunlight can directly illuminate the temperature sensor, causing it to absorb this energy and convert it into heat. This direct radiation from sunlight will raise the temperature of the temperature sensor, thus affecting its reading. Therefore, in this embodiment, the influence of illumination can also be considered, and thus illumination data within the offset time period corresponding to the illumination sensor can also be obtained.
[0130] S402. Based on two current temperature data and wind speed data, combine them to obtain two current combined data corresponding to the two current temperature data respectively; and based on two temperature offset data and wind speed data, combine them to obtain two offset combined data corresponding to the two offset temperature data respectively.
[0131] In one possible implementation, based on two current temperature data and wind speed data, two current combined data corresponding to the two current temperature data are obtained by combining them using a first preset formula.
[0132] Specifically, the first preset formula is shown in formula (1):
[0133] Among them, E c T represents the current combination of data corresponding to the current temperature data. c represents the current temperature data, and v represents the wind speed data within the offset time period.
[0134] Similarly, based on two offset temperature data and wind speed data, two offset combination data corresponding to the two offset temperature data are obtained by combining them using the second preset formula.
[0135] Specifically, the second preset formula is shown in formula (2):
[0136] Among them, E p For the offset combination data corresponding to the offset temperature data, T p v represents the offset temperature data, and v represents the wind speed data within the offset time period.
[0137] Because wind speed data and temperature data show a similar inverse relationship, that is, the higher the wind speed data, the lower the temperature data; and the lower the wind speed data, the higher the temperature data.
[0138] Furthermore, in one possible implementation, the environmental data within the offset time period also includes: when the illumination data is used, the two current temperature data and illumination data are combined using a third preset formula to obtain two combined data corresponding to the two current temperature data respectively.
[0139] Specifically, the third preset formula is shown in formula (3): E c=Tc×k×I (3)
[0140] Among them, E c T represents the current combination of data corresponding to the current temperature data. c The current temperature data is given, k is the preset scaling factor, and I is the illumination data (unit: W / m²). 2 (watts per square meter).
[0141] The preset scaling factor k is used to quantify the degree of influence of light intensity on the temperature sensor reading.
[0142] Similarly, based on the two offset temperature data and the illumination data, the two offset combination data corresponding to the two offset temperature data are obtained by combining them through the fourth preset formula.
[0143] Specifically, the fourth preset formula is shown in formula (4): Ep =T p ×k×I (4)
[0144] Among them, E p For the offset combination data corresponding to the offset temperature data, T p The data represents the offset temperature, k is the preset scaling factor, and I is the illumination data (unit: W / m²). 2 (watts per square meter).
[0145] S403. Construct a training dataset based on two current temperature data, two current combined data, two offset combined data, and the corresponding target temperature data.
[0146] The training dataset includes multiple subsets of data consisting of two current temperature data, two current combined data, two offset combined data, and the corresponding target temperature data.
[0147] In one possible implementation, a corresponding six-variable quadratic polynomial feature is constructed based on two current temperature data points, two current combined data points, and two offset combined data points; a training dataset is then constructed based on the corresponding six-variable quadratic polynomial feature and the corresponding target temperature data. In this case, the training dataset includes multiple subsets of data consisting of the six-variable quadratic polynomial feature and the corresponding target temperature data.
[0148] Specifically, based on two current temperature data, two current combination data, and two offset combination data, the corresponding six-variable quadratic polynomial characteristics are obtained through the general formula of the six-variable quadratic polynomial.
[0149] To facilitate understanding, the general formula of a six-variable quadratic polynomial will be explained in detail below with reference to formula (5).
[0150] Where F is the characteristic polynomial of the corresponding six-variable quadratic polynomial, and P is the general formula of the six-variable quadratic polynomial. x is a variable, T c1 For one of the two current temperature data, T c2 For the other of the two current temperature data, E c1 For one of the two current combination data, E c2 For the other of the two current combined data, E p1 For one of the two offset combination data, E p2 For the other of the two offset combination data. x i Indicates (T) c1 T c2 E c1 E c2 E p1 E p2 The i-th, x j Indicates (T) c1 T c2E c1 E c2 E p1 E p2 The j-th element in ). Where a ij b i And c are the weighting coefficients set. It should be noted that a ij b i The values of 'i' and 'c' are set according to the actual situation. Furthermore, when i = j, it represents the squared term of a single variable.
[0151] Multinomial features create new features by exponentiation and cross-product operations on the original features. These new features can capture non-linear relationships in the data. For regression models, if the data itself has non-linear relationships, linear features alone may not fit the data well. Multinomial features can help the model capture these non-linear relationships, thereby improving the model's predictive performance.
[0152] Since the relationship between the current temperature data, the current combined data, and the offset combined data is non-linear, the non-linear relationship between them can be captured by a six-variable quadratic polynomial, thereby improving the predictive ability of the model.
[0153] Furthermore, in one possible implementation, the environmental data within the offset time period also includes: when the illumination data is used, the training dataset includes multiple subsets of data consisting of two current temperature data, four current combination data (current combination data corresponding to two wind speed data and current combination data corresponding to two illumination data), four offset combination data (offset combination data corresponding to two wind speed data and offset combination data corresponding to two illumination data), and the corresponding target temperature data.
[0154] S404. Based on the training dataset, train a linear regression model to obtain a temperature compensation model.
[0155] The above-mentioned S404 is the same as S204 in Embodiment 1. Therefore, for details of the specific implementation of S404, please refer to the specific implementation of S204 in Embodiment 1, which will not be repeated here.
[0156] Furthermore, after obtaining the temperature compensation model based on the above S401-S404 (i.e., the temperature compensation model obtained when the environmental data is wind speed data), the two current temperature data corresponding to the two temperature sensors and the wind speed data of the offset time period corresponding to the wind speed sensor are obtained; based on the two current temperature data and the wind speed data of the offset time period, the actual temperature data is obtained through the temperature compensation model.
[0157] Furthermore, based on the temperature compensation model obtained from S401-S404 above when the environmental data is wind speed data and light intensity data, the model acquires the two current temperature data corresponding to the two temperature sensors, the wind speed data corresponding to the offset time period corresponding to the wind speed sensor, and the light intensity data corresponding to the offset time period corresponding to the light intensity sensor. Based on the two current temperature data, the wind speed data of the offset time period, and the light intensity data of the offset time period, the actual temperature data is obtained through the temperature compensation model.
[0158] This application provides a method for constructing a temperature compensation model, including: acquiring two current temperature data and two offset temperature data corresponding to two temperature sensors, as well as wind speed data within the offset time period; combining the two current temperature data and wind speed data to obtain two current combination data corresponding to the two current temperature data; and combining the two offset temperature data and wind speed data to obtain two offset combination data corresponding to the two offset temperature data; constructing a training dataset based on the two current temperature data, the two current combination data, the two offset combination data, and the corresponding target temperature data; and training a linear regression model based on the training dataset to obtain a temperature compensation model. This application focuses on the influence of temperature conduction delay and wind speed, thereby enabling the offset temperature data and wind speed data to participate in the construction of the temperature compensation model, improving the performance of the temperature compensation model. This allows the temperature compensation model constructed using the method of this application, along with the two temperature sensors and the environmental sensor in the small weather station, to perform real-time compensation for the detected temperature, solving the problem of inaccurate temperature measurement at small weather stations under extreme weather conditions, and thus improving the accuracy of temperature measurement at small weather stations.
[0159] Example 3:
[0160] The following, with reference to Figure 5, details a device for constructing a temperature compensation model provided in an embodiment of this application.
[0161] As shown in Figure 5, the device for constructing a temperature compensation model provided in this embodiment of the application includes the following modules:
[0162] The acquisition module 501 is used to acquire two current temperature data and two offset temperature data corresponding to two temperature sensors, as well as environmental data within the offset time period corresponding to the environmental sensor; wherein, the current temperature data is the temperature data collected by the temperature sensor at the current time; the offset temperature data is the temperature data collected by the temperature sensor at the offset time, the offset time is the time corresponding to the preset time interval past the current time; the offset time period is the time period between the current time and the offset time.
[0163] The combination module 502 is used to combine two current temperature data and environmental data to obtain multiple current combination data corresponding to the two current temperature data respectively; and to combine two offset temperature data and environmental data to obtain multiple offset combination data corresponding to the two offset temperature data respectively.
[0164] Module 503 is used to construct a training dataset based on two current temperature data, multiple current combination data, multiple offset combination data, and the corresponding target temperature data; wherein, the training dataset includes multiple data subsets consisting of two current temperature data, multiple current combination data, multiple offset combination data, and the corresponding target temperature data;
[0165] Training module 504 is used to train a linear regression model based on the training dataset to obtain a temperature compensation model.
[0166] In one possible implementation, the acquisition module 501 is specifically used to acquire two current temperature data and two offset temperature data corresponding to two temperature sensors, and wind speed data within the offset time period corresponding to the wind speed sensor; the combination module 502 is specifically used to combine the two current temperature data and the wind speed data to obtain two current combination data corresponding to the two current temperature data; and to combine the two offset temperature data and the wind speed data to obtain two offset combination data corresponding to the two offset temperature data; the construction module 503 is specifically used to construct a training dataset based on the two current temperature data, the two current combination data, the two offset combination data, and the corresponding target temperature data.
[0167] In one possible implementation, the construction module 503 is specifically used to construct the corresponding six-variable quadratic polynomial feature based on two current temperature data, two current combination data, and two offset combination data; and to construct a training dataset based on the corresponding six-variable quadratic polynomial feature and the corresponding target temperature data; wherein the training dataset includes multiple data subsets consisting of the six-variable quadratic polynomial feature and the corresponding target temperature data.
[0168] In one possible implementation, the combination module 502 is specifically used to combine two current temperature data and wind speed data according to a first preset formula to obtain two current combination data corresponding to the two current temperature data respectively; and to combine two offset temperature data and wind speed data according to a second preset formula to obtain two offset combination data corresponding to the two offset temperature data respectively.
[0169] In one possible implementation, the training module 504 is specifically used to train a linear regression model based on the training dataset and record the corresponding root mean square error and coefficient of determination; when the corresponding root mean square error and coefficient of determination meet the preset requirements, the training of the linear regression model ends and the temperature compensation model is obtained.
[0170] This application provides a device for constructing a temperature compensation model, comprising: an acquisition module 501, used to acquire two current temperature data and two offset temperature data corresponding to two temperature sensors, and environmental data within an offset time period corresponding to an environmental sensor; a combination module 502, used to combine the two current temperature data and environmental data to obtain multiple current combination data corresponding to the two current temperature data; and to combine the two offset temperature data and environmental data to obtain multiple offset combination data corresponding to the two offset temperature data; a construction module 503, used to construct a training dataset based on the two current temperature data, multiple current combination data, multiple offset combination data, and corresponding target temperature data; and a training module 504, used to train a linear regression model based on the training dataset to obtain a temperature compensation model. This application considers the effects of temperature conduction delay and other environmental parameters, thereby enabling the offset temperature data and environmental data to participate in the construction of the temperature compensation model, improving the performance of the temperature compensation model. This allows the temperature compensation model constructed using the method of this application, along with the two temperature sensors and the environmental sensor in the small weather station, to perform real-time compensation for the detected temperature, solving the problem of inaccurate temperature measurement at the small weather station under extreme weather conditions, and thus improving the accuracy of temperature measurement at the small weather station.
[0171] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the method and apparatus embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The method and apparatus embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components indicated as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0172] The above description is merely one specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for constructing a temperature compensation model, characterized in that, An application is made to a small weather station, the small weather station comprising: a large mass body, an environmental sensor, and two temperature sensors, the two temperature sensors being placed at different locations on the same medium, one temperature sensor being close to the large mass body and the other temperature sensor being far from the large mass body; the method includes: The system acquires two current temperature data points and two offset temperature data points corresponding to the two temperature sensors, as well as environmental data within the offset time period corresponding to the environmental sensor; wherein, the current temperature data is the temperature data collected by the temperature sensor at the current time; the offset temperature data is the temperature data collected by the temperature sensor at the offset time, the offset time being the time corresponding to a preset time interval past the current time; and the offset time period is the time period between the current time and the offset time. Based on the two current temperature data and the environmental data, multiple current combination data corresponding to the two current temperature data are obtained; and based on the two offset temperature data and the environmental data, multiple offset combination data corresponding to the two offset temperature data are obtained. A training dataset is constructed based on the two current temperature data, the multiple current combination data, the multiple offset combination data, and the corresponding target temperature data; wherein, the training dataset includes multiple data subsets consisting of two current temperature data, multiple current combination data, multiple offset combination data, and the corresponding target temperature data; Based on the training dataset, a linear regression model is trained to obtain a temperature compensation model.
2. The method according to claim 1, characterized in that, The environmental sensor includes a wind speed sensor; the environmental data within the offset time period corresponding to the environmental sensor includes wind speed data within the offset time period corresponding to the wind speed sensor. The process involves combining the two current temperature data and the environmental data to obtain multiple current combined data corresponding to each of the two current temperature data; and combining the two offset temperature data and the environmental data to obtain multiple offset combined data corresponding to each of the two offset temperature data, including: Based on the two current temperature data and the wind speed data, two current combination data corresponding to the two current temperature data are obtained respectively; and based on the two offset temperature data and the wind speed data, two offset combination data corresponding to the two offset temperature data are obtained respectively. The training dataset is constructed based on the two current temperature data, the multiple current combination data, the multiple offset combination data, and the corresponding target temperature data, including: A training dataset is constructed based on the two current temperature data, the two current combined data, the two offset combined data, and the corresponding target temperature data; wherein, the training dataset includes multiple data subsets consisting of the two current temperature data, the two current combined data, the two offset combined data, and the corresponding target temperature data.
3. The method according to claim 2, characterized in that, The training dataset is constructed based on the two current temperature data, the two current combined data, the two offset combined data, and the corresponding target temperature data, including: Based on the two current temperature data, the two current combined data, and the two offset combined data, construct the corresponding six-variable quadratic polynomial feature; A training dataset is constructed based on the corresponding six-variable quadratic polynomial features and the corresponding target temperature data; wherein the training dataset includes multiple data subsets consisting of six-variable quadratic polynomial features and the corresponding target temperature data.
4. The method according to claim 2, characterized in that, The wind speed data within the offset time period includes: the average wind speed within the offset time period.
5. The method according to claim 4, characterized in that, The average wind speed during the offset time period was obtained in the following way: Multiple wind speeds within the offset time period are obtained using a wind speed sensor; Based on the multiple wind speeds, the average wind speed within the offset time period is calculated.
6. The method according to claim 2, characterized in that, The process of combining the two current temperature data and the wind speed data to obtain two current combined data corresponding to the two current temperature data includes: Based on the two current temperature data and the wind speed data, two current combination data corresponding to the two current temperature data are obtained by combining them using a first preset formula; The first preset formula is as follows: Among them, E c T represents the current combination of data corresponding to the current temperature data. c Here is the current temperature data, and v is the wind speed data within the offset time period; The process of combining the two offset temperature data and the wind speed data to obtain two offset combination data corresponding to the two offset temperature data respectively includes: Based on the two offset temperature data and the wind speed data, two offset combination data corresponding to the two offset temperature data are obtained by combining them using the second preset formula; The second preset formula is as follows: Among them, E p For the offset combination data corresponding to the offset temperature data, T p v represents the offset temperature data, and v represents the wind speed data within the offset time period.
7. The method according to claim 2, characterized in that, The preset time interval is the time interval corresponding to a preset number of interval units.
8. The method according to claim 1, characterized in that, The step of training a linear regression model based on the training dataset to obtain a temperature compensation model includes: Based on the training dataset, a linear regression model is trained, and the corresponding root mean square error and coefficient of determination are recorded. When the corresponding root mean square error and coefficient of determination meet the preset requirements, the training of the linear regression model ends, and the temperature compensation model is obtained.
9. The method according to any one of claims 1-8, characterized in that, After training the linear regression model based on the training dataset to obtain the temperature compensation model, the method further includes: Acquire the current temperature data corresponding to the two temperature sensors, and the environmental data corresponding to the offset time period of the environmental sensor; Based on the two current temperature data and the environmental data of the offset time period, the actual temperature data is obtained through the temperature compensation model.
10. A device for constructing a temperature compensation model, characterized in that, An application is made in a small weather station, which includes: a large mass body, an environmental sensor, and two temperature sensors. The two temperature sensors are placed at different locations on the same medium, with one temperature sensor close to the large mass body and the other far away from it. The device includes: The acquisition module is used to acquire two current temperature data and two offset temperature data corresponding to the two temperature sensors, and environmental data within the offset time period corresponding to the environmental sensor; wherein, the current temperature data is the temperature data collected by the temperature sensor at the current time; the offset temperature data is the temperature data collected by the temperature sensor at the offset time, the offset time is the time corresponding to the preset time interval past the current time; and the offset time period is the time period between the current time and the offset time. The combination module is used to combine the two current temperature data and the environmental data to obtain multiple current combination data corresponding to the two current temperature data respectively; and to combine the two offset temperature data and the environmental data to obtain multiple offset combination data corresponding to the two offset temperature data respectively. A construction module is used to construct a training dataset based on the two current temperature data, the multiple current combination data, the multiple offset combination data, and the corresponding target temperature data; wherein, the training dataset includes multiple data subsets consisting of two current temperature data, multiple current combination data, multiple offset combination data, and the corresponding target temperature data; The training module is used to train a linear regression model based on the training dataset to obtain a temperature compensation model.
Citation Information
Patent Citations
A method and apparatus for constructing a temperature compensation model
CN118962862B
Cloud-based automatic meteorological station sensor on-line calibration device
CN107976722A
Ground-based SAR environment error correction method and device
CN117949907A
Multi-point temperature measuring method and system based on digital temperature sensor
CN118551176A
Method and device for constructing temperature compensation model
CN118962862A