An environmental temperature calculation method, device, electronic device, medium and product
By calculating the temperature and power-on state of the equipment at different historical moments, the mapping relationship is used to calculate the temperature appreciation, which solves the problem of how to accurately calculate the ambient temperature of electronic equipment, and accurately monitor and adjust the ambient temperature to ensure the normal operation of the equipment and products.
Patent Information
- Application Number
- CN202510338626.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-03-20
AI Technical Summary
In the field of temperature measurement technology, how to accurately calculate the ambient temperature of the environment in which the electronic device is located is an urgent problem, especially in precision electronic devices, product production, temperature control and high temperature scenarios.
By obtaining the equipment temperature and power-on state time of the specified equipment at different historical moments, calculating the temperature change rate and power-on state value, using the predetermined temperature appreciation mapping relationship, calculating the temperature appreciation value at the current moment, and finally obtaining the ambient temperature.
This method can accurately calculate the ambient temperature of the specified equipment environment, help to monitor and adjust the ambient temperature, ensure that the electronic equipment operates at an appropriate temperature, and ensure product quality and equipment performance.
Smart Images

Figure CN119880194B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of temperature measurement, and particularly to a method, device, electronic device, medium and product for calculating ambient temperature. Background Art
[0002] In the technical field of temperature measurement, measuring the temperature of the environment where an electronic device is located (which can be simply referred to as ambient temperature) is of great significance in various scenarios. For example, in scenarios where there are precision electronic devices, precision electronic devices often have high requirements for ambient temperature, and it is necessary to measure the ambient temperature to monitor and adjust the ambient temperature to ensure that the precision electronic devices operate at an appropriate ambient temperature; in the production scenarios of some products, the ambient temperature will affect the quality of the products, and it is necessary to measure the ambient temperature to ensure the product quality; in temperature control scenarios, it is necessary to determine the direction of temperature adjustment in combination with the ambient temperature. For example, for an air conditioning system, it is necessary to determine the working mode (cooling or heating) in combination with the ambient temperature; in high-temperature scenarios, it is often necessary to use a pyrometer to measure the temperature of the object to be measured. In this scenario, the electronic device can be a pyrometer, and the electronic device can be brought close to the object to be measured to obtain the temperature of the object to be measured by measuring the ambient temperature of the electronic device; in some other scenarios, the performance and lifespan of the electronic device are often affected by the ambient temperature, and a suitable heat dissipation system can be designed for the electronic device in combination with the ambient temperature to effectively prevent the electronic device from suffering performance degradation or damage due to overheating. For example, the CPU (Central Processing Unit) of a computer generates heat during operation, and in combination with the ambient temperature, the size of the heat sink and the rotation speed of the fan can be reasonably designed.
[0003] Therefore, how to accurately calculate the ambient temperature of the environment where the electronic device is located has become an urgent problem to be solved. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide a method, device, electronic device, medium and product for calculating ambient temperature to accurately calculate the ambient temperature of the environment where a specified device is located. The specific technical solutions are as follows:
[0005] In the first aspect of the present application, a method for calculating ambient temperature is provided. The method includes:
[0006] Obtaining the device temperatures of a specified device at a first historical moment and the current moment as a first temperature and a second temperature respectively, and obtaining the time when the specified device is in the powered-on state within a historical period with the current moment as the end moment;
[0007] Calculating the temperature change rate of the specified device at the current moment based on the difference between the first temperature and the second temperature;
[0008] Calculate the power-on state value of the specified device at the current moment based on the time when the device was powered on during the obtained historical time period; wherein, the power-on state value of the specified device represents the duration of the specified device being powered on during the historical time period.
[0009] Based on the pre-determined mapping relationship between the temperature rise value, the temperature change rate, and the power-on state value, use the temperature change rate and the power-on state value of the specified device at the current moment to calculate the temperature rise value of the specified device at the current moment; wherein, the mapping relationship is obtained based on the temperature rise value, the temperature change rate, and the power-on state value of the sample device at the second historical moment; the sample device has the same model as the specified device.
[0010] Calculate the difference between the second temperature and the temperature rise value of the specified device at the current moment to obtain the ambient temperature of the environment where the specified device is located at the current moment.
[0011] Optionally, the calculating the power-on state value of the specified device at the current moment based on the time when the device was powered on during the obtained historical time period includes:
[0012] Based on the time when the device was powered on during the obtained historical time period, determine the duration of the specified device being powered on in each sub-time period included in the historical time period as the power-on duration corresponding to the sub-time period; wherein, there is no intersection among the sub-time periods, and the union of the sub-time periods is the historical time period.
[0013] Calculate the ratio of each power-on duration to the duration of the corresponding sub-time period respectively to obtain the power-on duration proportion corresponding to each sub-time period.
[0014] Based on the calculated power-on duration proportions, calculate the power-on state value of the specified device at the current moment.
[0015] Optionally, the calculating the power-on state value of the specified device at the current moment based on the calculated power-on duration proportions includes:
[0016] Calculate the weighted sum of the power-on duration proportions corresponding to each sub-time period according to the preset weights of each sub-time period to obtain the power-on state value of the specified device at the current moment.
[0017] Optionally, for each sub-time period, the preset weight of the sub-time period is positively correlated with the duration of the sub-time period, and / or, the preset weight of the sub-time period is negatively correlated with the interval duration of the sub-time period; the interval duration of a sub-time period represents the interval duration between the sub-time period and the current moment.
[0018] Optionally, the mapping relationship is determined through the following steps:
[0019] Obtain the temperature rise value, temperature change rate, and power-on state value of the sample device at multiple second historical moments;
[0020] Based on the obtained temperature rise value, temperature change rate, and power-on state value of the sample device at multiple second historical moments, perform function fitting to obtain the mapping relationship.
[0021] Optionally, the calculating the temperature rise value of the specified device at the current moment by using the temperature change rate and power-on state value of the specified device at the current moment based on the mapping relationship between the predetermined temperature rise value, temperature change rate, and power-on state value includes:
[0022] Input the temperature change rate and power-on state value of the specified device at the current moment into a pre-trained mapping model to obtain the temperature rise value of the specified device at the current moment; wherein, the mapping model is trained based on the temperature change rate, power-on state value, and temperature rise value of the sample device at multiple second historical moments.
[0023] Optionally, the temperature rise value, temperature change rate, and power-on state value of the sample device at multiple second historical moments are obtained through the following steps:
[0024] For each second historical moment, obtain the device temperature of the sample device at the third historical moment before the second historical moment and at the second historical moment, respectively, as the third temperature and the fourth temperature, and obtain the ambient temperature of the environment where the sample device is located at the second historical moment, and obtain the time when the sample device is in the power-on state within the sample time period with the second historical moment as the end moment;
[0025] Calculate the difference between the fourth temperature and the ambient temperature of the environment where the sample device is located at the second historical moment to obtain the temperature rise value of the sample device at the second historical moment;
[0026] Based on the difference between the third temperature and the fourth temperature, calculate the temperature change rate of the sample device at the second historical moment;
[0027] Based on the obtained time when the sample device is in the power-on state within the sample time period, calculate the power-on state value of the sample device at the second historical moment; wherein, the power-on state value of the sample device represents the length of time the sample device is in the power-on state within the sample time period.
[0028] Optionally, there are multiple first historical moments;
[0029] Based on the difference between the first temperature and the second temperature, calculating the temperature change rate of the specified device at the current moment includes:
[0030] For each first historical moment, calculate the temperature difference between the second temperature and the first temperature at this first historical moment, and calculate the time interval between the current moment and this first historical moment;
[0031] Calculate the ratio of the calculated temperature difference to the time interval to obtain the temperature change rate corresponding to this first historical moment;
[0032] Based on the temperature change rates corresponding to each first historical moment, determine the temperature change rate of the specified device at the current moment.
[0033] In the second aspect of the implementation of this application, an environmental temperature calculation device is also provided. The device includes:
[0034] A data acquisition module, configured to acquire the device temperatures of the specified device at the first historical moment and the current moment, respectively as the first temperature and the second temperature, and acquire the time when the specified device is in the on state within the historical time period with the current moment as the end moment;
[0035] A temperature change rate calculation module, configured to calculate the temperature change rate of the specified device at the current moment based on the difference between the first temperature and the second temperature;
[0036] An on-state value calculation module, configured to calculate the on-state value of the specified device at the current moment based on the acquired time when the device is in the on state within the historical time period; wherein, the on-state value of the specified device represents: the length of time when the specified device is in the on state within the historical time period;
[0037] A temperature rise value calculation module, configured to calculate the temperature rise value of the specified device at the current moment based on the pre-determined mapping relationship between the temperature rise value, the temperature change rate, and the on-state value, using the temperature change rate and the on-state value of the specified device at the current moment; wherein, the mapping relationship is obtained based on the temperature rise value, the temperature change rate, and the on-state value of the sample device at the second historical moment; the sample device has the same model as the specified device;
[0038] An environmental temperature calculation module, configured to calculate the difference between the second temperature and the temperature rise value of the specified device at the current moment to obtain the environmental temperature of the environment where the specified device is located at the current moment.
[0039] Optionally, the on-state value calculation module includes:
[0040] The power-on duration determination sub-module is used to determine the power-on duration of the specified device in each sub-time period included in the historical time period based on the time in the historical time period when the device is in the power-on state, as the power-on duration corresponding to the sub-time period; wherein, there is no intersection among the sub-time periods, and the union of the sub-time periods is the historical time period;
[0041] The power-on duration ratio calculation sub-module is used to calculate the ratio of each power-on duration to the duration of the corresponding sub-time period respectively, to obtain the power-on duration ratio corresponding to each sub-time period;
[0042] The power-on state value calculation sub-module is used to calculate the power-on state value of the specified device at the current moment based on the calculated power-on duration ratios of each sub-time period.
[0043] Optionally, the power-on state value calculation sub-module is specifically used to calculate the weighted sum of the power-on duration ratios corresponding to each sub-time period according to the preset weights of each sub-time period, to obtain the power-on state value of the specified device at the current moment.
[0044] Optionally, for each sub-time period, the preset weight of the sub-time period is positively correlated with the duration of the sub-time period, and / or, the preset weight of the sub-time period is negatively correlated with the interval duration of the sub-time period; the interval duration of a sub-time period represents the interval duration between the sub-time period and the current moment.
[0045] Optionally, the mapping relationship is determined through the following steps:
[0046] Obtain the temperature rise value, temperature change rate and power-on state value of the sample device at multiple second historical moments;
[0047] Based on the obtained temperature rise value, temperature change rate and power-on state value at multiple second historical moments, perform function fitting to obtain the mapping relationship.
[0048] Optionally, the temperature rise value calculation module is specifically used to input the temperature change rate and power-on state value of the specified device at the current moment into a pre-trained mapping model to obtain the temperature rise value of the specified device at the current moment; wherein, the mapping model is trained based on the temperature change rate, power-on state value and temperature rise value of the sample device at multiple second historical moments.
[0049] Optionally, the device further includes:
[0050] A sample acquisition module, configured to, for each second historical moment, acquire the device temperature of the sample device at a third historical moment before the second historical moment and at the second historical moment, respectively, as the third temperature and the fourth temperature, and acquire the ambient temperature of the environment where the sample device is located at the second historical moment, and acquire the time when the sample device is in the powered-on state within a sample time period with the second historical moment as the end moment; calculate the difference between the fourth temperature and the ambient temperature of the environment where the sample device is located at the second historical moment to obtain the temperature rise value of the sample device at the second historical moment; calculate the temperature change rate of the sample device at the second historical moment based on the difference between the third temperature and the fourth temperature; calculate the powered-on state value of the sample device at the second historical moment based on the obtained time when the sample device is in the powered-on state within the sample time period; wherein, the powered-on state value of the sample device represents: the length of time when the sample device is in the powered-on state within the sample time period.
[0051] Optionally, there are multiple first historical moments; the temperature change rate calculation module is specifically configured to, for each first historical moment, calculate the temperature difference between the second temperature and the first temperature at the first historical moment, and calculate the time interval between the current moment and the first historical moment; calculate the ratio of the obtained temperature difference to the time interval to obtain the temperature change rate corresponding to the first historical moment; determine the temperature change rate of the specified device at the current moment based on the temperature change rates corresponding to each first historical moment.
[0052] In a third aspect of the implementation of this application, an electronic device is further provided, including:
[0053] A memory for storing a computer program;
[0054] A processor, configured to implement the ambient temperature calculation method described in any one of the above when executing the program stored in the memory.
[0055] The embodiments of this application further provide a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the ambient temperature calculation method described in any one of the above.
[0056] The embodiments of this application further provide a computer program product containing instructions, which, when running on a computer, causes the computer to execute the ambient temperature calculation method described in any one of the above.
[0057] Advantages of the embodiments of this application:
[0058] An environmental temperature calculation method provided by an embodiment of the present application can obtain the device temperatures of a specified device at a first historical moment and the current moment, respectively as a first temperature and a second temperature, and obtain the time when the specified device is in the powered-on state within a historical time period with the current moment as the end moment; calculate the temperature change rate of the specified device at the current moment based on the difference between the first temperature and the second temperature; calculate the powered-on state value of the specified device at the current moment based on the time when the specified device is in the powered-on state within the obtained historical time period; wherein, the powered-on state value of the specified device represents: the length of time when the specified device is in the powered-on state within the historical time period; calculate the temperature rise value of the specified device at the current moment based on the pre-determined mapping relationship between the temperature rise value, the temperature change rate, and the powered-on state value, using the temperature change rate and the powered-on state value of the specified device at the current moment; wherein, the mapping relationship is obtained based on the temperature rise value, the temperature change rate, and the powered-on state value of a sample device at a second historical moment; the sample device has the same model as the specified device; calculate the difference between the second temperature and the temperature rise value of the specified device at the current moment to obtain the environmental temperature of the environment where the specified device is located at the current moment.
[0059] Based on the above processing, the device temperature (i.e., the first temperature) of the specified device at a historical moment (i.e., the first historical moment) before the current moment and the device temperature (i.e., the second temperature) at the current moment can be obtained. That is, the temperature change rate of the specified device at the current moment can be calculated according to the difference between the second temperature and the first temperature. And the time when the specified device is in the powered-on state within a historical time period with the current moment as the end moment can be obtained, so as to calculate the powered-on state value representing the length of time when the specified device is in the powered-on state within the historical time period based on the obtained data.
[0060] The temperature rise value of a specified device at any moment can be expressed as the difference between the device temperature of the specified device at that moment and the ambient temperature of the environment where it is located. Since heat is generated when the specified device is in the on state, the length of time the specified device has been in the on state before any moment will affect the device temperature of the specified device at that moment, and thus will also affect the temperature rise value of the specified device at that moment. That is, the temperature rise value of the specified device at any moment is related to the length of time the specified device has been in the on state before that moment. And the rate of temperature change of the specified device at any moment can represent how fast the device temperature of the specified device changes, and thus can also represent how fast the temperature rise value changes. That is, the temperature rise value of the specified device at any moment is related to the rate of temperature change of the specified device at that moment. That is to say, there is a mapping relationship among the temperature rise value at any moment, the rate of temperature change at that moment, and the on-state value at that moment. The mapping relationship can be determined in advance. Correspondingly, according to the mapping relationship and the rate of temperature change and the on-state value of the specified device at the current moment, the temperature rise value of the specified device at the current moment can be calculated. Furthermore, by calculating the difference between the device temperature (i.e., the second temperature) of the specified device at the current moment and the temperature rise value, the ambient temperature of the environment where the specified device is located at the current moment can be obtained. In this way, the ambient temperature of the environment where the specified device is located can be accurately calculated.
[0061] Of course, it is not necessary for any product or method implementing the present application to achieve all the above-mentioned advantages simultaneously. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other embodiments can also be obtained according to these drawings.
[0063] Figure 1 It is the first flowchart of the ambient temperature calculation method provided by the embodiment of the present application;
[0064] Figure 2 It is the second flowchart of the ambient temperature calculation method provided by the embodiment of the present application;
[0065] Figure 3 It is the flowchart of determining the mapping relationship in the ambient temperature calculation method provided by the embodiment of the present application;
[0066] Figure 4 It is the third flowchart of the ambient temperature calculation method provided by the embodiment of the present application;
[0067] Figure 5 It is the structural schematic diagram of an ambient temperature calculation device provided by the embodiment of the present application;
[0068] Figure 6 A schematic structural diagram of an electronic device provided by an embodiment of the present application. Specific embodiments
[0069] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art based on the present application belong to the scope of protection of the present application.
[0070] In the field of temperature measurement technology, measuring the ambient temperature of an electronic device is of great significance in various scenarios. For example, in scenarios where there are precision electronic devices, it is often necessary to measure the ambient temperature of the precision electronic devices to ensure that the precision electronic devices operate at an appropriate ambient temperature; in the production scenarios of some products that are susceptible to ambient temperature, it is necessary to measure the ambient temperature to ensure product quality; in temperature control scenarios, it is necessary to determine the direction of temperature adjustment in combination with the ambient temperature; in high-temperature scenarios, the electronic device can be a pyrometer, and the electronic device can be brought close to the object to be measured to obtain the temperature of the object to be measured by measuring the ambient temperature of the electronic device; in some other scenarios, an appropriate heat dissipation system can be designed for the electronic device in combination with the ambient temperature to prevent the electronic device from deteriorating or being damaged due to overheating.
[0071] To accurately calculate the ambient temperature of the environment where the electronic device is located, an embodiment of the present application provides an ambient temperature calculation method. See Figure 1 , Figure 1 which is the first flow schematic diagram of the ambient temperature calculation method provided by the embodiment of the present application. The ambient temperature calculation method includes:
[0072] Step S101: Obtain the device temperatures of the specified device at the first historical moment and the current moment as the first temperature and the second temperature respectively, and obtain the time when the specified device is in the powered-on state within the historical time period with the current moment as the end moment.
[0073] Step S102: Calculate the temperature change rate of the specified device at the current moment based on the difference between the first temperature and the second temperature.
[0074] Step S103: Calculate the powered-on state value of the specified device at the current moment based on the obtained time when the specified device is in the powered-on state within the historical time period.
[0075] Among them, the powered-on state value of the specified device represents the length of time when the specified device is in the powered-on state within the historical time period.
[0076] Step S104: Based on the mapping relationship between the pre-determined temperature rise value, temperature change rate, and power-on state value, use the temperature change rate and power-on state value of the specified device at the current moment to calculate the temperature rise value of the specified device at the current moment.
[0077] Among them, the mapping relationship is obtained based on the temperature rise value, temperature change rate, and power-on state value of the sample device at the second historical moment; the model of the sample device is the same as that of the specified device.
[0078] Step S105: Calculate the difference between the second temperature and the temperature rise value of the specified device at the current moment to obtain the ambient temperature of the environment where the specified device is located at the current moment.
[0079] Based on the above processing, the device temperature (i.e., the first temperature) of the specified device at the historical moment (i.e., the first historical moment) before the current moment, and the device temperature (i.e., the second temperature) of the specified device at the current moment can be obtained. That is, the temperature change rate of the specified device at the current moment can be calculated according to the difference between the second temperature and the first temperature. And the time when the specified device is in the power-on state within the historical time period with the current moment as the end moment can be obtained, so as to calculate the power-on state value representing the length of time the specified device is in the power-on state within the historical time period based on the obtained data.
[0080] The temperature rise value of the specified device at any moment can represent the difference between the device temperature of the specified device at that moment and the ambient temperature of the environment where it is located. Since heat is generated when the specified device is in the power-on state, the length of time the specified device is in the power-on state before any moment will affect the device temperature of the specified device at that moment, and thus will affect the temperature rise value of the specified device at that moment. That is, the temperature rise value of the specified device at any moment is related to the length of time the specified device is in the power-on state before that moment. And the temperature change rate of the specified device at any moment can represent how fast the device temperature of the specified device changes, and thus can represent how fast the temperature rise value changes. That is, the temperature rise value of the specified device at any moment is related to the temperature change rate of the specified device at that moment. That is to say, there is a mapping relationship among the temperature rise value at any moment, the temperature change rate at that moment, and the power-on state value at that moment. The mapping relationship can be determined in advance. Correspondingly, according to the mapping relationship and the temperature change rate and power-on state value of the specified device at the current moment, the temperature rise value of the specified device at the current moment can be calculated. Furthermore, by calculating the difference between the device temperature (i.e., the second temperature) of the specified device at the current moment and the temperature rise value, the ambient temperature of the environment where the specified device is located at the current moment can be obtained. In this way, the ambient temperature of the environment where the specified device is located can be accurately calculated.
[0081] For step S101, the designated device can be an electronic device for which the ambient temperature of the environment where it is located needs to be determined currently. For example, the designated device can be a pyrometer, and the designated device can be brought close to the object to be measured in a high-temperature state. Correspondingly, the ambient temperature of the environment where the designated device is located is also the temperature of the object to be measured. That is, the temperature of the object to be measured can be measured by measuring the temperature of the environment where the designated device is located; or, the designated device can also be a temperature control device, such as a TEC (ThermoElectric Cooler), and the designated device can measure the ambient temperature of the environment where it is located to achieve a specific function through the temperature control device. For example, the specific function can be a temperature adjustment function (such as cooling or heating), a switching function, or an alarm function, etc. One or more historical moments before the current moment can be preselected as the first historical moment. The time interval between the first historical moment and the current moment can be the first preset duration. The first preset duration can be set as needed and is not specifically limited. For example, the first preset duration can be 10 seconds or 15 seconds.
[0082] The device temperature of the designated device at the first historical moment can be obtained as the first temperature, and the device temperature of the designated device at the current moment can be obtained as the second temperature. For example, a temperature sensor for measuring the device temperature of the designated device can be provided inside the designated device. Correspondingly, the device temperature measured by the temperature sensor at the first historical moment can be obtained to get the first temperature, and the device temperature measured at the current moment can be obtained to get the second temperature. That is to say, the internal temperature (i.e., the chamber temperature) obtained according to the above scheme can be used as the device temperature.
[0083] And a historical time period with the current moment as the end moment can be pre-determined. The time interval between the start moment of the historical time period and the current moment can be the second preset duration. The second preset duration can be set as needed and is not specifically limited. For example, the second preset duration can be 1 hour or 2 hours. And the historical power-on data of the designated device within the historical time period can be obtained, that is, the time when the designated device is in the power-on state within the historical time period can be obtained. For example, the moments when the designated device is powered on and off within the historical time period can be obtained. Correspondingly, according to the obtained moments of power-on and off, the time when the designated device is in the power-on state within the historical time period can be determined.
[0084] For step S102, the difference between the first temperature and the second temperature can reflect the magnitude of the change in the device temperature of the designated device from the first historical moment to the current moment. Based on the difference between the first temperature and the second temperature, combined with the time interval between the first historical moment and the current moment, the temperature change rate (which can also be called the temperature change speed) of the designated device at the current moment can be calculated.
[0085] When there is only one first historical moment, the temperature difference between the first temperature and the second temperature can be calculated, as well as the time interval between the first historical moment and the current moment, and the ratio of the calculated temperature difference to the time interval is obtained to get the temperature change rate of the specified device at the current moment.
[0086] When there are multiple first historical moments, step S102 may include:
[0087] Step 1: For each first historical moment, calculate the temperature difference between the second temperature and the first temperature at that first historical moment, and calculate the time interval between the current moment and that first historical moment.
[0088] Step 2: Calculate the ratio of the obtained temperature difference to the time interval to get the temperature change rate corresponding to that first historical moment.
[0089] Step 3: Based on the temperature change rates corresponding to each first historical moment, determine the temperature change rate of the specified device at the current moment.
[0090] In this case, for each first historical moment, the temperature difference between the second temperature and the first temperature at that first historical moment can be calculated, and the time interval between the current moment and that first historical moment can be calculated. The ratio of the obtained temperature difference to the time interval is obtained to get the temperature change rate corresponding to that first historical moment. Furthermore, based on the temperature change rates corresponding to each first historical moment, the temperature change rate of the specified device at the current moment can be determined. For example, the weighted sum of the temperature change rates corresponding to each first historical moment can be calculated to get the temperature change rate of the specified device at the current moment, and the weight of the temperature change rate corresponding to each first historical moment can be negatively correlated with the time interval from that first historical moment to the current moment. Or, the average value of the temperature change rates corresponding to each first historical moment can also be calculated, and the calculated average value is used as the temperature change rate of the specified device at the current moment.
[0091] In this way, the temperature change situation from multiple first historical moments to the current moment can be combined to determine the temperature change rate of the specified device at the current moment. Compared with the method of determining the temperature change rate of the specified device at the current moment by only using the temperature change situation from one first historical moment to the current moment, the accuracy of the temperature change rate of the specified device obtained at the current moment can be improved, and thus the accuracy of calculating the temperature rise value of the specified device at the current moment according to the temperature change rate of the specified device at the current moment can also be improved. Furthermore, the accuracy of calculating the ambient temperature of the environment where the specified device is located at the current moment according to the temperature rise value of the specified device at the current moment can be improved, further ensuring that the ambient temperature of the environment where the specified device is located can be accurately calculated.
[0092] Regarding step S103, based on the time when the specified device was in the powered-on state within the historical time period obtained, it is possible to determine the time when the specified device was in the powered-on state within the historical time period, and thus the powered-on state value representing the length of time the specified device was in the powered-on state within the historical time period can be calculated.
[0093] In one implementation, the ratio of the duration when the specified device was in the powered-on state within the historical time period to the duration of the historical time period can be directly calculated to obtain the powered-on state value of the specified device at the current moment.
[0094] In another implementation, the historical time period can be pre-divided into multiple sub-time periods, and based on the proportion of the duration when the specified device was in the powered-on state within the multiple sub-time periods, the powered-on state value of the specified device at the current moment can be calculated. Specifically, reference can be made to the relevant descriptions of steps S1031 - S1033 in the subsequent embodiments.
[0095] Regarding step S104, sample devices with the same model as the specified device can be pre-selected, and the temperature rise values, temperature change rates, and powered-on state values of the sample devices at multiple second historical moments can be obtained. The second historical moments can be selected as needed without specific limitations. The specific acquisition method can be referred to the relevant descriptions of steps 1 - 4 in the subsequent embodiments. Furthermore, based on the temperature rise values, temperature change rates, and powered-on state values of the sample devices at multiple second historical moments, the mapping relationship between the temperature rise value, temperature change rate, and powered-on state value can be determined. Correspondingly, according to the mapping relationship, using the temperature change rate and powered-on state value of the specified device at the current moment, the temperature rise value of the specified device at the current moment can also be calculated. Specifically, reference can be made to the relevant descriptions of Method 1 and Method 2 in the subsequent embodiments.
[0096] Regarding step S105, the temperature rise value of the specified device at any moment can represent the difference between the device temperature of the specified device at that moment and the ambient temperature of the environment where it is located. Correspondingly, the difference between the device temperature (i.e., the second temperature) of the specified device at the current moment and the temperature rise value can be calculated to obtain the ambient temperature of the environment where the specified device is located at the current moment.
[0097] Correspondingly, when the specified device is a precision electronic device with high requirements for ambient temperature, the obtained ambient temperature can be combined to monitor and adjust the ambient temperature to ensure that the specified device operates at an appropriate ambient temperature. In the production scenarios of some products whose quality is easily affected by ambient temperature, the obtained ambient temperature can also ensure the quality of the products. In the temperature control scenario, the magnitude relationship between the obtained ambient temperature and the currently set standard temperature can be combined to determine whether cooling or heating is required currently. When the specified device is a pyrometer, the obtained ambient temperature is the temperature of the currently measured high-temperature object. In some other scenarios, the obtained ambient temperature can also be combined to design a suitable heat dissipation system for the specified device to prevent the specified device from suffering performance degradation or damage due to overheating.
[0098] In one embodiment, referring to Figure 2 , Figure 2 which is the second process schematic diagram of the ambient temperature calculation method provided by the embodiment of the present application, step S103 includes:
[0099] Step S1031: Based on the time in the historical period when the device is in the powered-on state, determine the duration when the specified device is in the powered-on state in each sub-period included in the historical period, as the power-on duration corresponding to the sub-period.
[0100] Among them, there is no intersection among the sub-periods, and the union of the sub-periods is the historical period.
[0101] Step S1032: Calculate the ratio of each power-on duration to the duration of the corresponding sub-period respectively to obtain the power-on duration ratio corresponding to each sub-period.
[0102] Step S1033: Based on the calculated power-on duration ratios of each sub-period, calculate the power-on state value of the specified device at the current moment.
[0103] In the embodiment of the present application, the historical period can be divided into multiple sub-periods in advance. There is no intersection among the sub-periods, and the union of the sub-periods is the historical period. The duration of each sub-period can be set as needed without specific limitation. For example, the historical period can be from 9:00 to 10:00, and the historical period can be divided into 6 sub-periods with the same duration, which are [10:00, 9:50], [9:50, 9:40], ……, [9:10, 9:00]; or, the historical period can also be divided into 5 sub-periods with different durations, which are [10:00, 9:45], [9:45, 9:32], [9:32, 9:21], [9:21, 9:09], [9:09, 9:00]. The durations of the sub-periods can be the same or different.
[0104] For each sub - time period, the duration for which the specified device is in the on - state within the sub - time period can be determined based on the time when the specified device was in the on - state during the historical time period, and used as the on - duration corresponding to the sub - time period. Furthermore, the ratio of each on - duration to the duration of the corresponding sub - time period can be calculated respectively to obtain the on - duration proportion corresponding to each sub - time period. Combining the calculated on - duration proportions, the on - state value of the specified device at the current moment can be calculated.
[0105] In one implementation, the median of the on - duration proportions can be selected as the on - state value of the specified device at the current moment.
[0106] In another implementation, the maximum and minimum values of the calculated on - duration proportions can be removed, and then the average value of the remaining on - duration proportions can be calculated to obtain the on - state value of the specified device at the current moment.
[0107] In yet another implementation, step S1033 includes: calculating the weighted sum of the on - duration proportions corresponding to each sub - time period according to the preset weights of each sub - time period to obtain the on - state value of the specified device at the current moment.
[0108] In this implementation, the preset weights of each sub - time period can be obtained in advance to calculate the weighted sum of the on - duration proportions corresponding to each sub - time period according to the preset weights of each sub - time period, so as to obtain the on - state value of the specified device at the current moment. The preset weights of each sub - time period can be the same, that is, the average value of the on - duration proportions corresponding to each sub - time period can be calculated as the on - state value of the specified device at the current moment.
[0109] Alternatively, for each sub - time period, the preset weight of the sub - time period can be set according to the duration of the sub - time period and / or the interval duration between the sub - time period and the current moment (which can also be referred to as the interval duration of the sub - time period). For example, for each sub - time period, the preset weight of the sub - time period is positively correlated with the duration of the sub - time period, and / or the preset weight of the sub - time period is negatively correlated with the interval duration of the sub - time period. The shorter the interval duration of a sub - time period, the closer the sub - time period is to the current moment, and the on - duration proportion of the sub - time period can better reflect the on - state value of the specified device at the current moment. The longer the duration of a sub - time period, the larger the proportion of the sub - time period in the historical time period. Correspondingly, the closer the sub - time period is to the current moment, the more it can reflect the length of time the specified device was in the on - state during the historical time period, and correspondingly, the more it can reflect the on - state value of the specified device at the current moment.
[0110] Thus, by combining the duration and the interval duration of each sub-time period to determine the preset weight of the sub-time period, the accuracy of calculating the power-on state value of the specified device at the current moment can be improved. Furthermore, the accuracy of calculating the temperature rise value of the specified device at the current moment based on the power-on state value of the specified device at the current moment can be improved. Furthermore, the accuracy of calculating the ambient temperature of the environment where the specified device is located at the current moment based on the temperature rise value of the specified device at the current moment can be improved, further ensuring that the ambient temperature of the environment where the specified device is located can be accurately calculated.
[0111] For example, the weighted sum of the power-on duration ratios corresponding to each sub-time period can be calculated according to a preset formula to obtain the power-on state value of the specified device at the current moment. The preset formula is as follows:
[0112]
[0113] where, represents the power-on state value of the specified device at the current moment, represents the current moment, represents the start moment of the historical time period; in the chronological order from the back to the front, 、 、…、 respectively represent multiple moments before the current moment and within the historical time period. Correspondingly, 、 、…、 respectively represent multiple sub-time periods included in the historical time period; 、 、…、 respectively represent 、 、…、 the preset weights of the sub-time periods, 、 、…、 respectively represent 、 、…、 the power-on durations corresponding to the sub-time periods.
[0114] In an embodiment of the present application, the mapping relationship between the temperature rise value, the temperature change rate, and the power-on state value can be determined in the following two ways:
[0115] In the first way, the mapping relationship can be obtained by performing function fitting. Refer to Figure 3 , Figure 3 which is the flow chart of determining the mapping relationship in the ambient temperature calculation method provided by the embodiment of the present application. The mapping relationship is determined through the following steps:
[0116] Step S301: Obtain the temperature rise values, temperature change rates, and power-on status values of the sample device at multiple second historical moments.
[0117] Step S302: Based on the obtained temperature rise values, temperature change rates, and power-on status values at multiple second historical moments, perform function fitting to obtain a mapping relationship.
[0118] In this method, the temperature rise values, temperature change rates, and power-on status values of the sample device at multiple second historical moments can be obtained, and the obtained data can be used for function fitting to obtain a mapping relationship. For example, for each second historical moment, the temperature change rate and power-on status value of the sample device at this second historical moment can be used as independent variables, and the temperature rise value of the sample device at this second historical moment can be used as the dependent variable, and function fitting can be performed according to a preset function relationship to obtain the mapping relationship. The preset function relationship can be set as needed and is not specifically limited. For example, the preset function relationship can be a binary quadratic function or a binary linear function.
[0119] The mapping relationship can be expressed by the following formula:
[0120]
[0121] Among them, represents the temperature rise value of the specified device at a moment, represents the power-on status value of the specified device at this moment, represents the temperature change rate of the specified device at this moment.
[0122] Based on the above processing, the mapping relationship can be determined by using the method of function fitting. In this way, it can be ensured that subsequently, according to the mapping relationship, the temperature rise value of the specified device at the current moment can be calculated by using the temperature change rate and power-on status value of the specified device at the current moment. Furthermore, it can be ensured that the ambient temperature of the environment where the specified device is located at the current moment can be calculated according to the temperature rise value of the specified device at the current moment. That is, it is further ensured that the ambient temperature of the environment where the specified device is located can be accurately calculated.
[0123] In Method 2, step S104 includes: inputting the temperature change rate and power-on status value of the specified device at the current moment into a pre-trained mapping model to obtain the temperature rise value of the specified device at the current moment.
[0124] Among them, the mapping model is trained based on the temperature change rate, power-on status value, and temperature rise value of the sample device at multiple second historical moments.
[0125] In this way, the mapping model with the initial structure can be trained in advance by using the temperature change rate, the power-on state value, and the temperature rise value (which can also be called the true temperature rise value) of the sample device at multiple second historical moments, so as to obtain the trained mapping model. For example, for each second historical moment, the temperature change rate and the power-on state value of this second historical moment can be input into the mapping model with the initial structure to obtain the predicted temperature rise value of this second historical moment. Based on the difference between the obtained predicted temperature rise value and the true temperature rise value of the corresponding second historical moment, the parameters of the mapping model with the initial structure are adjusted until the preset convergence condition is reached, and the trained mapping model is obtained. For example, the preset convergence condition can be that the number of times of adjusting the parameters of the mapping model reaches the preset number of times, or the preset convergence condition can also be that the difference between the obtained predicted temperature rise value and the temperature rise value of the corresponding second historical moment is less than the preset difference. The mapping model can be selected as needed without specific limitation. For example, the mapping model can be a deep learning model, such as CNN (Convolutional Neural Networks) or RNN (Recurrent Neural Network). The trained mapping model can then represent the mapping relationship.
[0126] Based on the above processing, the mapping relationship can be determined by using the model training method. Since the mapping model has a multi-layer structure and can approximate complex non-linear functions, compared with the function fitting method, the mapping relationship determined by using the model training method can better reflect the correlation between the temperature change rate, the power-on state value, and the temperature rise value, that is, it can further improve the accuracy of the obtained mapping relationship. In this way, it can be ensured that the temperature rise value of the specified device at the current moment can be calculated according to the temperature change rate and the power-on state value of the specified device at the current moment based on a more accurate mapping relationship. Furthermore, it can be ensured that the ambient temperature of the environment where the specified device is located at the current moment can be calculated according to the temperature rise value of the specified device at the current moment. That is, it is further ensured that the ambient temperature of the environment where the specified device is located can be accurately calculated.
[0127] In this application, the temperature rise value, the temperature change rate, and the power-on state value of the sample device at multiple second historical moments can be obtained through the following steps:
[0128] Step 1: For each second historical moment, obtain the third historical moment before this second historical moment and the device temperature at this second historical moment of the sample device, and use them as the third temperature and the fourth temperature respectively, and obtain the ambient temperature of the environment where the sample device is located at this second historical moment, and obtain the time when the sample device is in the power-on state within the sample time period with this second historical moment as the end time.
[0129] Step 2: Calculate the difference between the fourth temperature and the ambient temperature of the environment where the sample device is located at the second historical moment, and obtain the temperature rise value of the sample device at the second historical moment.
[0130] Step 3: Based on the difference between the third temperature and the fourth temperature, calculate the temperature change rate of the sample device at the second historical moment.
[0131] Step 4: Based on the time in the on state within the obtained sample time period, calculate the on state value of the sample device at the second historical moment.
[0132] Among them, the on state value of the sample device indicates the length of time the sample device is in the on state within the sample time period.
[0133] In the embodiments of the present application, for each second historical moment, one or more historical moments before the second historical moment can be pre-selected as the third historical moment. The device temperature of the specified device at the third historical moment can be obtained as the third temperature, and the device temperature of the specified device at the second historical moment can be obtained as the fourth temperature. And a sample time period with the second historical moment as the end time can be pre-determined, and the time when the specified device is in the on state within the sample time period can be obtained. Specifically, reference can be made to the relevant description of step S101 in the above embodiments.
[0134] And the ambient temperature of the environment where the sample device is located at the second historical moment can be obtained. For example, a temperature measuring device can be used to measure the ambient temperature of the environment where the sample device is located at the second historical moment. Furthermore, the difference between the fourth temperature and the ambient temperature of the environment where the sample device is located at the second historical moment can be calculated to obtain the temperature rise value of the sample device at the second historical moment. Step 3 can specifically refer to the relevant description of step S102 in the above embodiments. Step 4 can specifically refer to the relevant description of step S103 in the above embodiments.
[0135] Based on the above processing, the temperature rise values, temperature change rates, and on state values of the sample device at multiple second historical moments can be obtained, which can ensure that the mapping relationship can be determined according to the obtained data. In this way, it can be ensured that subsequently, according to the mapping relationship, the temperature rise value of the specified device at the current moment can be calculated using the temperature change rate and on state value of the specified device at the current moment. Furthermore, it can be ensured that the ambient temperature of the environment where the specified device is located at the current moment can be calculated according to the temperature rise value of the specified device at the current moment. That is, it is further ensured that the ambient temperature of the environment where the specified device is located can be accurately calculated.
[0136] In one embodiment, refer to Figure 4 , Figure 4This is the third process schematic diagram of the ambient temperature calculation method provided by the embodiments of the present application. The ambient temperature calculation method may include:
[0137] Step S401: Obtain the historical chamber temperature data and historical power-on data of the device. That is, step S101 in the above embodiments.
[0138] Step S402: Calculate the temperature change rate and power-on state of the device at the current moment. That is, steps S102 and S103 in the above embodiments.
[0139] Step S403: Calculate the actual temperature rise value of the device according to the temperature change rate and power-on state of the device. That is, step S104 in the above embodiments.
[0140] Step S404: Calculate the current ambient temperature value according to the chamber temperature of the device at the current moment and the actual temperature rise value. That is, step S105 in the above embodiments.
[0141] Based on the same inventive concept, the embodiments of the present application also provide an ambient temperature calculation device. Refer to Figure 5 , Figure 5 This is the structural schematic diagram of an ambient temperature calculation device provided by the embodiments of the present application. The ambient temperature calculation device includes:
[0142] A data acquisition module 501, configured to acquire the device temperatures of a specified device at a first historical moment and the current moment, respectively as a first temperature and a second temperature, and acquire the time during which the specified device is in the powered-on state within a historical time period with the current moment as the end moment;
[0143] A temperature change rate calculation module 502, configured to calculate the temperature change rate of the specified device at the current moment based on the difference between the first temperature and the second temperature;
[0144] A power-on state value calculation module 503, configured to calculate the power-on state value of the specified device at the current moment based on the time during which the specified device is in the powered-on state within the acquired historical time period; wherein, the power-on state value of the specified device represents: the length of time during which the specified device is in the powered-on state within the historical time period;
[0145] A temperature rise value calculation module 504, configured to calculate the temperature rise value of the specified device at the current moment based on a pre-determined mapping relationship between the temperature rise value, the temperature change rate, and the power-on state value, using the temperature change rate and the power-on state value of the specified device at the current moment; wherein, the mapping relationship is obtained based on the temperature rise value, the temperature change rate, and the power-on state value of a sample device at a second historical moment; the sample device has the same model as the specified device;
[0146] An ambient temperature calculation module 505 is configured to calculate a difference between the second temperature and a temperature rise value of the specified device at the current moment, so as to obtain an ambient temperature of the environment where the specified device is located at the current moment.
[0147] Based on the ambient temperature calculation device provided in the embodiment of the present application, the device temperature (i.e., the first temperature) of the specified device at a historical moment (i.e., the first historical moment) before the current moment and the device temperature (i.e., the second temperature) of the specified device at the current moment can be obtained. Thus, the temperature change rate of the specified device at the current moment can be calculated according to the difference between the second temperature and the first temperature. And the time during which the specified device is in the on state within the historical time period with the current moment as the end moment can be obtained, so as to calculate an on state value representing the length of time the specified device is in the on state within the historical time period according to the obtained data.
[0148] The temperature rise value of the specified device at any moment can represent the difference between the device temperature of the specified device at that moment and the ambient temperature of the environment where it is located. Since heat is generated when the specified device is in the on state, the length of time the specified device has been in the on state before any moment will affect the device temperature of the specified device at that moment, and thus will affect the temperature rise value of the specified device at that moment. That is, the temperature rise value of the specified device at any moment is related to the length of time the specified device has been in the on state before that moment. And the temperature change rate of the specified device at any moment can represent how fast the device temperature of the specified device changes, and thus can represent how fast the temperature rise value changes. That is, the temperature rise value of the specified device at any moment is related to the temperature change rate of the specified device at that moment. That is to say, there is a mapping relationship among the temperature rise value at any moment, the temperature change rate at that moment, and the on state value at that moment. The mapping relationship can be determined in advance. Correspondingly, according to the mapping relationship and the temperature change rate and the on state value of the specified device at the current moment, the temperature rise value of the specified device at the current moment can be calculated. Furthermore, by calculating the difference between the device temperature (i.e., the second temperature) of the specified device at the current moment and the temperature rise value, the ambient temperature of the environment where the specified device is located at the current moment can be obtained. In this way, the ambient temperature of the environment where the specified device is located can be accurately calculated.
[0149] In one embodiment, the on state value calculation module 503 includes:
[0150] An on - duration determination sub - module is configured to determine, based on the time during which the specified device is in the on state within the obtained historical time period, the duration during which the specified device is in the on state in each sub - time period included in the historical time period as the on duration corresponding to the sub - time period; wherein, the sub - time periods do not intersect, and the union of the sub - time periods is the historical time period;
[0151] The startup duration ratio calculation sub-module is used to calculate the ratio of each startup duration to the duration of the corresponding sub-time period respectively, so as to obtain the startup duration ratio corresponding to each sub-time period;
[0152] The startup status value calculation sub-module is used to calculate the startup status value of the specified device at the current moment based on the calculated startup duration ratios of each.
[0153] In one embodiment, the startup status value calculation sub-module is specifically configured to calculate the weighted sum of the startup duration ratios corresponding to each sub-time period according to the preset weights of each sub-time period, so as to obtain the startup status value of the specified device at the current moment.
[0154] In one embodiment, for each sub-time period, the preset weight of the sub-time period is positively correlated with the duration of the sub-time period, and / or the preset weight of the sub-time period is negatively correlated with the interval duration of the sub-time period; the interval duration of a sub-time period represents the interval duration between the sub-time period and the current moment.
[0155] In one embodiment, the mapping relationship is determined through the following steps:
[0156] Obtain the temperature rise value, temperature change rate and startup status value of the sample device at multiple second historical moments;
[0157] Based on the obtained temperature rise value, temperature change rate and startup status value at multiple second historical moments, perform function fitting to obtain the mapping relationship.
[0158] In one embodiment, the temperature rise value calculation module 504 is specifically configured to input the temperature change rate and startup status value of the specified device at the current moment into a pre-trained mapping model to obtain the temperature rise value of the specified device at the current moment; wherein, the mapping model is trained based on the temperature change rate, startup status value and temperature rise value of the sample device at multiple second historical moments.
[0159] In one embodiment, the device further includes:
[0160] A sample acquisition module, configured to, for each second historical moment, obtain the device temperatures of the sample device at a third historical moment before the second historical moment and at the second historical moment, respectively, as a third temperature and a fourth temperature, obtain the ambient temperature of the environment where the sample device is located at the second historical moment, and obtain the time when the sample device is in the powered-on state within a sample time period with the second historical moment as the end moment; calculate the difference between the fourth temperature and the ambient temperature of the environment where the sample device is located at the second historical moment to obtain the temperature rise value of the sample device at the second historical moment; calculate the temperature change rate of the sample device at the second historical moment based on the difference between the third temperature and the fourth temperature; calculate the powered-on state value of the sample device at the second historical moment based on the obtained time when the sample device is in the powered-on state within the sample time period; wherein, the powered-on state value of the sample device represents: the length of time the sample device is in the powered-on state within the sample time period.
[0161] In one embodiment, there are multiple first historical moments; the temperature change rate calculation module 502 is specifically configured to, for each first historical moment, calculate the temperature difference between the second temperature and the first temperature at the first historical moment, and calculate the time interval between the current moment and the first historical moment; calculate the ratio of the obtained temperature difference to the time interval to obtain the temperature change rate corresponding to the first historical moment; determine the temperature change rate of the specified device at the current moment based on the temperature change rates corresponding to each first historical moment.
[0162] An embodiment of the present application further provides an electronic device, as Figure 6 shown, including:
[0163] A memory 601, configured to store a computer program;
[0164] A processor 602, configured to, when executing the program stored on the memory 601, implement the following steps:
[0165] Obtain the device temperatures of the specified device at a first historical moment and the current moment, respectively, as a first temperature and a second temperature, and obtain the time when the specified device is in the powered-on state within a historical time period with the current moment as the end moment;
[0166] Calculate the temperature change rate of the specified device at the current moment based on the difference between the first temperature and the second temperature;
[0167] Calculate the powered-on state value of the specified device at the current moment based on the obtained time when the specified device is in the powered-on state within the historical time period; wherein, the powered-on state value of the specified device represents: the length of time the specified device is in the powered-on state within the historical time period;
[0168] Based on the mapping relationship between the pre-determined temperature rise value, temperature change rate and power-on state value, the temperature rise value of the specified device at the current moment is calculated by using the temperature change rate and power-on state value of the specified device at the current moment; wherein, the mapping relationship is obtained based on the temperature rise value, temperature change rate and power-on state value of the sample device at the second historical moment; the sample device has the same model as the specified device;
[0169] Calculate the difference between the second temperature and the temperature rise value of the specified device at the current moment to obtain the ambient temperature of the environment where the specified device is located at the current moment.
[0170] And the above-mentioned electronic device may further include a communication bus and / or a communication interface, and the processor 602, communication interface, and memory 601 complete communication with each other through the communication bus.
[0171] The communication bus mentioned in the above-mentioned electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0172] The communication interface is used for communication between the above-mentioned electronic device and other devices.
[0173] The memory may include a Random Access Memory (RAM), or may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.
[0174] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may 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 gate or transistor logic devices, discrete hardware components.
[0175] In another embodiment provided by the present application, a computer-readable storage medium is further provided. A computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the steps of any of the above-described ambient temperature calculation methods are implemented.
[0176] In another embodiment provided by the present application, a computer program product containing instructions is further provided. When it runs on a computer, the computer is caused to execute any of the ambient temperature calculation methods in the above embodiments.
[0177] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a solid-state disk (SSD), etc.
[0178] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover a non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0179] Each embodiment in this specification is described in a related manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the device, electronic device, computer-readable storage medium, and computer program product, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments.
[0180] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A method for calculating ambient temperature, characterized in that: The method comprises: Obtain device temperatures of a specified device at a first historical moment and a current moment, respectively as a first temperature and a second temperature, and obtain a time during which the specified device is in a powered-on state within a historical time period with the current moment as the end moment; Calculating a temperature change rate of the designated device at a current moment based on a difference between the first temperature and the second temperature; Based on the acquired time in the power-on state during the historical time period, the power-on state value of the designated device at the current moment is calculated; wherein the power-on state value of the designated device indicates: the length of time the designated device is in the power-on state during the historical time period; Based on a predetermined mapping relationship between a temperature rise value, a temperature change rate, and a power-on status value, the temperature rise value of the designated device at the current moment is calculated using the temperature change rate and the power-on status value of the designated device at the current moment; wherein the mapping relationship is obtained based on the temperature rise value, the temperature change rate, and the power-on status value of the sample device at the second historical moment; the model of the sample device is the same as that of the designated device; Calculate the difference between the second temperature and the temperature rise value of the designated device at the current moment to obtain the ambient temperature of the environment where the designated device is located at the current moment; The calculating the power-on status value of the specified device at the current moment based on the acquired time in the power-on status during the historical time period includes: Based on the acquired time in the power-on state in the historical time period, determine the time duration that the specified device is in the power-on state in each sub-time period included in the historical time period as the power-on time duration corresponding to the sub-time period; wherein the sub-time periods do not have an intersection, and the union of the sub-time periods is the historical time period; Calculate the ratio of each power-on duration to the duration of the corresponding sub-time period to obtain the power-on duration ratio of each sub-time period. Based on the calculated proportions of each power-on time, the power-on status value of the specified device at the current moment is calculated.
2. The method according to claim 1, characterized in that The calculating the power-on status value of the specified device at the current moment based on the calculated power-on time proportions includes: According to the preset weight of each sub-time period, the weighted sum of the power-on duration proportions corresponding to each sub-time period is calculated to obtain the power-on status value of the designated device at the current moment.
3. The method according to claim 2, characterized in that For each sub-time period, the preset weight of the sub-time period is positively correlated with the duration of the sub-time period, and / or the preset weight of the sub-time period is negatively correlated with the interval duration of the sub-time period; the interval duration of a sub-time period represents the interval duration between the sub-time period and the current moment.
4. The method according to claim 1, characterized in that: The mapping relationship is determined by the following steps: Obtaining temperature rise values, temperature change rates, and power-on status values of the sample device at multiple second historical moments; Based on the acquired temperature rise values, temperature change rates and power-on status values at multiple second historical moments, function fitting is performed to obtain the mapping relationship.
5. The method according to claim 1, characterized in that The method of calculating the temperature rise value of the designated device at the current moment based on the mapping relationship between the predetermined temperature rise value, the temperature change rate and the power-on state value, and using the temperature change rate and the power-on state value of the designated device at the current moment, comprises: The temperature change rate and power-on status value of the designated device at the current moment are input into a pre-trained mapping model to obtain the temperature rise value of the designated device at the current moment; wherein the mapping model is trained based on the temperature change rate, power-on status value and temperature rise value of the sample device at multiple second historical moments.
6. The method according to claim 4 or 5, characterized in that: The temperature rise values, temperature change rates and power-on status values of the sample device at multiple second historical moments are obtained by the following steps: For each second historical moment, obtaining the device temperature of the sample device at the third historical moment before the second historical moment and at the second historical moment, respectively as the third temperature and the fourth temperature, obtaining the ambient temperature of the environment where the sample device is located at the second historical moment, and obtaining the time that the sample device is in the power-on state within the sample time period with the second historical moment as the end moment; Calculate the difference between the fourth temperature and the ambient temperature of the environment where the sample device is located at the second historical moment to obtain the temperature rise value of the sample device at the second historical moment; calculating the temperature change rate of the sample device at the second historical moment based on the difference between the third temperature and the fourth temperature; Based on the acquired power-on time within the sample time period, the power-on state value of the sample device at the second historical moment is calculated; wherein the power-on state value of the sample device indicates: the length of time the sample device is in the power-on state within the sample time period.
7. The method according to claim 1, characterized in that The first historical moments are multiple; Calculating a temperature change rate of the designated device at a current moment based on a difference between the first temperature and the second temperature includes: For each first historical moment, calculating the temperature difference between the second temperature and the first temperature at the first historical moment, and calculating the interval between the current moment and the first historical moment; The ratio of the calculated temperature difference to the interval time is used to obtain the temperature change rate corresponding to the first historical moment; Based on the temperature change rates corresponding to the first historical moments, the temperature change rate of the designated device at the current moment is determined.
8. An ambient temperature calculation device, characterized in that: The device comprises: A data acquisition module, used to acquire the device temperature of the specified device at a first historical moment and a current moment, as the first temperature and the second temperature respectively, and to acquire the time during which the specified device is in a powered-on state within a historical time period with the current moment as the end moment; a temperature change rate calculation module, configured to calculate a temperature change rate of the designated device at a current moment based on a difference between the first temperature and the second temperature; A power-on status value calculation module, used to calculate the power-on status value of the specified device at the current moment based on the acquired time in the power-on status during the historical time period; wherein the power-on status value of the specified device indicates: the length of time the specified device is in the power-on status during the historical time period; a temperature rise value calculation module, for calculating the temperature rise value of the designated device at the current moment based on a predetermined mapping relationship between the temperature rise value, the temperature change rate and the power-on state value, and using the temperature change rate and the power-on state value of the designated device at the current moment; wherein the mapping relationship is obtained based on the temperature rise value, the temperature change rate and the power-on state value of the sample device at the second historical moment; the model of the sample device is the same as that of the designated device; An ambient temperature calculation module, used to calculate the difference between the second temperature and the temperature rise value of the designated device at the current moment, to obtain the ambient temperature of the environment where the designated device is located at the current moment; The power-on status value calculation module includes: A power-on duration determination submodule, configured to determine, based on the acquired power-on time in the historical time period, the time that the designated device is in the power-on state in each sub-time period included in the historical time period as the power-on duration corresponding to the sub-time period; wherein the sub-time periods do not have an intersection, and the union of the sub-time periods is the historical time period; The power-on duration ratio calculation submodule is used to calculate the ratio of each power-on duration to the duration of the corresponding sub-time period, and obtain the power-on duration ratio corresponding to each sub-time period; The power-on status value calculation submodule is used to calculate the power-on status value of the specified device at the current moment based on the calculated proportions of each power-on time.
9. The device according to claim 8, characterized in that The power-on status value calculation submodule is specifically used to calculate the weighted sum of the power-on duration proportions corresponding to each sub-time period according to the preset weights of each sub-time period, so as to obtain the power-on status value of the specified device at the current moment; and / or, For each sub-time period, the preset weight of the sub-time period is positively correlated with the duration of the sub-time period, and / or the preset weight of the sub-time period is negatively correlated with the interval duration of the sub-time period; the interval duration of a sub-time period represents the interval duration between the sub-time period and the current moment; and / or, The mapping relationship is determined by the following steps: Obtaining temperature rise values, temperature change rates, and power-on status values of the sample device at multiple second historical moments; Based on the temperature rise values, temperature change rates and power-on status values at the multiple second historical moments acquired, function fitting is performed to obtain the mapping relationship; and / or, The temperature rise value calculation module is specifically used to input the temperature change rate and power-on status value of the designated device at the current moment into a pre-trained mapping model to obtain the temperature rise value of the designated device at the current moment; wherein the mapping model is trained based on the temperature change rate, power-on status value and temperature rise value of the sample device at multiple second historical moments; and / or, The device also includes: A sample acquisition module is used to obtain, for each second historical moment, the device temperature of the sample device at the third historical moment before the second historical moment and at the second historical moment, as the third temperature and the fourth temperature respectively, and obtain the ambient temperature of the environment where the sample device is located at the second historical moment, and obtain the time that the sample device is in the power-on state during the sample time period with the second historical moment as the end moment; calculate the difference between the fourth temperature and the ambient temperature of the environment where the sample device is located at the second historical moment, and obtain the temperature rise value of the sample device at the second historical moment; calculate the temperature change rate of the sample device at the second historical moment based on the difference between the third temperature and the fourth temperature; calculate the power-on state value of the sample device at the second historical moment based on the acquired power-on time during the sample time period; wherein the power-on state value of the sample device represents: the length of time that the sample device is in the power-on state during the sample time period; and / or, There are multiple first historical moments; the temperature change rate calculation module is specifically used to calculate, for each first historical moment, the temperature difference between the second temperature and the first temperature of the first historical moment, and to calculate the interval duration between the current moment and the first historical moment; the ratio of the calculated temperature difference to the interval duration is used to obtain the temperature change rate corresponding to the first historical moment; based on the temperature change rates corresponding to each first historical moment, the temperature change rate of the designated device at the current moment is determined.
10. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-7 when executing a program stored in a memory.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
12. A computer program product, characterized in that When the computer program product is run on a computer, the computer is enabled to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Trend tracking and early warning method and device for bearing bush temperature of hydroelectric generating set
CN115185313A
Method and device for detecting environment temperature of electronic equipment
CN116295902A