Temperature detection method and device, power supply module and storage medium

Through unified temperature reference tables and structural pointers processing, unified temperature detection of multiple types of temperature sensors is realized, code redundancy and memory usage problems are solved, the temperature detection process is simplified and the error rate is reduced.

CN119046319APending Publication Date: 2024-11-29SHIJIAZHUANG TONHE ELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410926088.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The existing power module requires multiple different types of temperature sensors during temperature detection, resulting in increased code redundancy and memory usage. Different types of sensors need to call different functions and temperature reference tables, which are very complex and prone to errors.

Method used

Establish a unified temperature reference table, use the structure pointer to store the temperature reference information of different types of temperature sensors, find the temperature value corresponding to the detection value of the result register through the same function call, and use the preset offset and temperature calculation formula to process the detection value. Achieve unified temperature detection of multiple types of sensors.

Benefits of technology

It simplifies the code volume, reduces memory usage, avoids the increase in error rate caused by redundant and complex writing processes, and realizes a temperature detection mechanism that does not interfere with each other and uniformly handles externally with multiple sensors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046319A_ABST
    Figure CN119046319A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of temperature detection, and provides a temperature detection method and device, a power module and a storage medium. The method comprises the following steps: establishing a temperature reference table; wherein the temperature reference table comprises a plurality of structural body pointers, and each structural body pointer stores temperature reference information of one type of temperature sensor; obtaining a result register detection value detected by the temperature sensor; and determining a target structure pointer according to the type of the temperature sensor, and searching a temperature value corresponding to the result register detection value from temperature reference information of the target structure pointer. According to the invention, unified temperature detection and processing of multiple different types of temperature sensors can be realized, code redundancy is reduced, and memory occupation is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of temperature detection, and in particular relates to a temperature detection method, device, power supply module and storage medium. Background Art

[0002] Whether it is the power module used in the charging pile of the charging station, the vehicle-mounted power module, the military power module, or the electric power module, the development of a power module requires a complete temperature detection mechanism to ensure that the power module can detect the temperature conditions at different locations under the current working conditions in real time, so that when the temperature is high, over-temperature power limiting and over-temperature protection can be performed in time to achieve stable operation of the power module, reduce the failure rate, and prevent major accidents.

[0003] The power module needs to use multiple temperature sensors to detect the temperature conditions at different locations. Different temperature sensor types may also be different. For different types of temperature sensors, different functions and temperature reference tables are usually required, which results in redundant code and high memory usage. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a temperature detection method, device, power module and storage medium to achieve unified temperature detection and processing for different types of temperature sensors, reduce code redundancy and reduce memory usage.

[0005] A first aspect of an embodiment of the present invention provides a temperature detection method, comprising:

[0006] Establishing a temperature reference table; wherein the temperature reference table includes a plurality of structure pointers, each structure pointer storing temperature reference information of a type of temperature sensor;

[0007] Get the result register detection value detected by the temperature sensor;

[0008] The target structure pointer is determined according to the type of the temperature sensor, and the temperature value corresponding to the result register detection value is found from the temperature reference information of the target structure pointer.

[0009] In combination with the first aspect, in a possible implementation manner of the first aspect, the temperature reference information includes a plurality of groups of corresponding result register values ​​and temperature values;

[0010] Find the temperature value corresponding to the result register detection value from the temperature reference information of the target structure pointer, including:

[0011] Traverse the result register values ​​in the target structure pointer to determine whether the absolute value of the difference between each result register value and the result register detection value is less than a preset threshold;

[0012] If the absolute value of the difference between any result register value and the result register detection value is less than a preset threshold, the temperature value corresponding to the result register value is added with a preset offset and used as the temperature value corresponding to the result register detection value.

[0013] In combination with the first aspect, in a possible implementation of the first aspect, searching the temperature value corresponding to the result register detection value from the temperature reference information of the target structure pointer further includes:

[0014] Before traversing the result register value in the target structure pointer, determine whether the result register detection value is less than the minimum result register value in the target structure pointer;

[0015] If it is less than, the temperature value corresponding to the minimum result register value is added with the preset offset and the result is taken as the temperature value corresponding to the result register detection value.

[0016] In combination with the first aspect, in a possible implementation of the first aspect, searching the temperature value corresponding to the result register detection value from the temperature reference information of the target structure pointer further includes:

[0017] Before traversing the result register value in the target structure pointer, determine whether the result register detection value is greater than the maximum result register value in the target structure pointer;

[0018] If it is greater, the temperature value corresponding to the maximum result register value is added with the preset offset value as the temperature value corresponding to the result register detection value.

[0019] In combination with the first aspect, in a possible implementation of the first aspect, searching the temperature value corresponding to the result register detection value from the temperature reference information of the target structure pointer further includes:

[0020] After traversing the result register values ​​in the target structure pointer, if there is no result register value whose absolute difference with the result register detection value is less than a preset threshold, determine the first result register value and the second result register value from the target structure pointer; wherein the first result register value is a result register value greater than the result register detection value and closest to the result register detection value, and the second result register value is a result register value less than the result register detection value and closest to the result register detection value;

[0021] Determine a temperature calculation formula according to the first result register value and its corresponding temperature value, the second result register value and its corresponding temperature value;

[0022] Substitute the result register detection value into the temperature calculation formula to obtain the temperature calculation result, and add the preset offset to obtain the temperature value corresponding to the result register detection value.

[0023] In combination with the first aspect, in a possible implementation of the first aspect, traversing the result register value in the target structure pointer includes:

[0024] Determine whether the current traversal position is greater than the length of the target structure pointer;

[0025] If the current traversal position is greater than the length of the target structure pointer, an error message is returned.

[0026] In combination with the first aspect, in a possible implementation manner of the first aspect, different types of temperature sensors are set with different preset bias values;

[0027] The preset offset amount is determined according to the temperature measurement range of the temperature sensor.

[0028] A second aspect of an embodiment of the present invention provides a temperature detection device, including:

[0029] An establishment module is used to establish a temperature reference table; wherein the temperature reference table includes a plurality of structure pointers, each structure pointer stores temperature reference information of a type of temperature sensor;

[0030] An acquisition module is used to obtain a result register detection value detected by a temperature sensor;

[0031] The processing module is used to determine the target structure pointer according to the type of the temperature sensor, and to search the temperature value corresponding to the result register detection value from the temperature reference information of the target structure pointer.

[0032] In conjunction with the second aspect, in a possible implementation manner of the second aspect, the temperature reference information includes a plurality of groups of corresponding result register values ​​and temperature values;

[0033] The processing module is used to:

[0034] Traverse the result register values ​​in the target structure pointer to determine whether the absolute value of the difference between each result register value and the result register detection value is less than a preset threshold;

[0035] If the absolute value of the difference between any result register value and the result register detection value is less than a preset threshold, the temperature value corresponding to the result register value is added with a preset offset and used as the temperature value corresponding to the result register detection value.

[0036] In conjunction with the second aspect, in a possible implementation manner of the second aspect, the processing module is further configured to:

[0037] Before traversing the result register value in the target structure pointer, determine whether the result register detection value is less than the minimum result register value in the target structure pointer;

[0038] If it is less than, the temperature value corresponding to the minimum result register value is added with the preset offset and the result is taken as the temperature value corresponding to the result register detection value.

[0039] In conjunction with the second aspect, in a possible implementation manner of the second aspect, the processing module is further configured to:

[0040] Before traversing the result register value in the target structure pointer, determine whether the result register detection value is greater than the maximum result register value in the target structure pointer;

[0041] If it is greater, the temperature value corresponding to the maximum result register value is added with the preset offset value as the temperature value corresponding to the result register detection value.

[0042] In conjunction with the second aspect, in a possible implementation manner of the second aspect, the processing module is further configured to:

[0043] After traversing the result register values ​​in the target structure pointer, if there is no result register value whose absolute difference with the result register detection value is less than a preset threshold, determine the first result register value and the second result register value from the target structure pointer; wherein the first result register value is a result register value greater than the result register detection value and closest to the result register detection value, and the second result register value is a result register value less than the result register detection value and closest to the result register detection value;

[0044] Determine a temperature calculation formula according to the first result register value and its corresponding temperature value, the second result register value and its corresponding temperature value;

[0045] Substitute the result register detection value into the temperature calculation formula to obtain the temperature calculation result, and add the preset offset to obtain the temperature value corresponding to the result register detection value.

[0046] In conjunction with the second aspect, in a possible implementation manner of the second aspect, the processing module is used to:

[0047] Determine whether the current traversal position is greater than the length of the target structure pointer;

[0048] If the current traversal position is greater than the length of the target structure pointer, an error message is returned.

[0049] In combination with the second aspect, in a possible implementation manner of the second aspect, different types of temperature sensors are set with different preset bias values;

[0050] The preset offset amount is determined according to the temperature measurement range of the temperature sensor.

[0051] A third aspect of an embodiment of the present invention provides a power module, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method in the first aspect or any one of the implementations of the first aspect are implemented.

[0052] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the method in the first aspect or any one of the implementations of the first aspect are implemented.

[0053] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0054] The embodiment of the present invention establishes a temperature reference table, which includes multiple structure pointers, and stores the temperature reference information of different types of temperature sensors in each structure pointer respectively. When the result register detection value detected by the temperature sensor is obtained, it is only necessary to call the same function, find the corresponding structure pointer, and further find the temperature value corresponding to the result register detection value from the temperature reference information of the corresponding structure pointer. The embodiment of the present invention realizes unified temperature detection by multiple different types of temperature sensors, and each detection does not interfere with each other, is independent of each other internally, and is uniformly processed externally. The code is simple, the mechanism is unified, the code modification is reduced, the code amount and the writing process are simplified, the memory is reduced, and the problem of increased error rate caused by redundant and complex writing processes is avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0056] Figure 1 is a schematic diagram of the structure of a temperature sensor provided by an embodiment of the present invention;

[0057] Figure 2 The temperature detection method provided by the embodiment of the present invention is shown in FIG. Figure 1 ;

[0058] Figure 3 is a schematic diagram of a temperature reference table provided in an embodiment of the present invention;

[0059] Figure 4 The temperature detection method provided by the embodiment of the present invention is shown in FIG. Figure 2 ;

[0060] Figure 5 is a schematic structural diagram of a temperature detection device provided by an embodiment of the present invention;

[0061] Figure 6 It is a schematic diagram of the structure of a power module provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0062] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0063] In order to illustrate the technical solution of the present invention, a specific embodiment is provided below for illustration.

[0064] The power modules in electric vehicles and their charging piles all use temperature sensors to detect temperature, and the number and type of temperature sensors vary. Different numbers: temperature sensors may detect the temperature near the chip, the temperature inside the module, etc. Different types: they may be SMD or DIP. Different types of temperature sensors use different table lengths and values, which are related to the specific design method and operating conditions of the module. Temperature sensors are usually used to detect whether certain specified locations of the module are overheated, and to provide overtemperature protection or temperature power limit when overheated.

[0065] See also Figure 1 As shown, a general temperature sensor is a temperature-controlled resistor whose resistance changes with temperature. When the resistance changes with temperature, the voltage value at the Vtemp point changes. The reference table of the temperature sensor is a table of the corresponding relationship between resistance value and temperature value. For the processing process of the chip, it is actually: the temperature value changes, and then the resistance value of the temperature sensor changes, which in turn causes the voltage value Vtemp transmitted to the chip to change, and then the value of the result register connected to the analog-to-digital converter changes. Therefore, the table of the resistance value and temperature value of the temperature sensor is converted into a table of the value and temperature value of the result register, which varies depending on the type of temperature sensor. The larger the result register value, the larger the corresponding temperature value. Generally, the table arranges the result register values ​​from small to large, so the temperature values ​​are also arranged from small to large. That is, the result register value and temperature value of the first row of the table are the smallest, while the register value and temperature value of the last row of the table are the largest.

[0066] The traditional method generally calls different functions to retrieve the temperature from different reference tables for each different temperature sensor according to the current result register value. Each retrieval process is similar but different, and similar processes are used repeatedly, increasing the amount of program code.

[0067] The embodiment of the present invention abstracts a temperature detection method, which uses the same function to call different structure pointers in the same table according to different types of temperature sensors, and then obtains different temperature values, so that modules with similar functions can be reused. In this way, the temperature detection work of multiple different types of temperature sensors can be carried out in an orderly manner without interfering with each other.

[0068] Please refer to the following Figure 2 and Figure 3 As shown, the temperature detection method proposed in the embodiment of the present invention is described in detail.

[0069] See also Figure 2 As shown, the temperature detection method of the embodiment of the present invention includes:

[0070] Step S201, establishing a temperature reference table.

[0071] The embodiment of the present invention pre-establishes a temperature reference table, which includes multiple structure pointers, each of which stores temperature reference information of a type of temperature sensor. It is understandable that for different types of temperature sensors, the corresponding relationship between the result register and the temperature value, the number of temperature values, and the range of temperature values ​​may all be different, so each type of temperature sensor is set with a structure pointer to store the corresponding relationship, and each structure pointer is integrated into one table.

[0072] For example, see Figure 3 As shown, the temperature reference information of the structure pointer includes multiple groups of corresponding result register values ​​and temperature values ​​(for example, the structure pointer 1 includes the result register values ​​11-1n and the corresponding temperature values ​​11-1n). The values ​​in the structure pointer can be arranged from small to large, or from large to small, which is not limited in this embodiment. In addition, the temperature reference table also includes the length of the structure pointer. A structure pointer and its length can be used as a structure, then each type of temperature sensor corresponds to a structure, which includes a structure pointer and its length, and the structure pointer includes multiple groups of corresponding result register values ​​and temperature values ​​of the temperature sensor of this type.

[0073] Step S202, obtaining a result register detection value detected by the temperature sensor.

[0074] The temperature sensor is a temperature-controlled resistor whose resistance changes with temperature. When the temperature changes, the resistance of the temperature sensor changes, which in turn causes the voltage value Vtemp transmitted to the processor chip to change, and the value of the result register connected to the analog-to-digital converter changes.

[0075] Step S203, determining a target structure pointer according to the type of the temperature sensor, and searching the temperature value corresponding to the result register detection value from the temperature reference information of the target structure pointer.

[0076] By traversing the result register values ​​in the target structure pointer, determine whether the absolute value of the difference between each result register value and the result register detection value is less than the preset threshold; if the absolute value of the difference between any result register value and the result register detection value is less than the preset threshold, then the temperature value corresponding to the result register value is added with the preset offset as the temperature value corresponding to the result register detection value.

[0077] The preset threshold here can be set by the designer according to the requirements. For example, in this embodiment, the preset threshold is 0.05°C.

[0078] The offset here is set according to the requirements. If the designer requires the output temperature value directly read out to be a positive value, in order to simplify the processing, the offset is generally set according to the test temperature range of the current temperature sensor. If the temperature measurement range of the temperature sensor is -40℃-125℃, the offset can be set to 40℃ to ensure that the temperature value is positive. Since different types of temperature sensors have different temperature measurement ranges, different types of temperature sensors have different preset offsets. If the designer does not have much demand for positive and negative temperature values, the offset setting value can be directly set to 0.

[0079] It can be seen that the embodiment of the present invention establishes a temperature reference table, which contains multiple structure pointers, and stores the temperature reference information of different types of temperature sensors in each structure pointer respectively. When the result register detection value detected by the temperature sensor is obtained, it is only necessary to call the same function, find the corresponding structure pointer, and further find the temperature value corresponding to the result register detection value from the temperature reference information of the corresponding structure pointer. The embodiment of the present invention realizes unified temperature detection by multiple different types of temperature sensors, and each detection does not interfere with each other, is independent of each other internally, and is uniformly processed externally. The code is simple, the mechanism is unified, code modification is reduced, the amount of code and the writing process are simplified, and memory is reduced, avoiding the problem of increased error rate caused by redundant and complex writing processes.

[0080] In some embodiments, the result register detection value may be too large or too small, or the result register value in the table and the preset threshold value may not be set reasonably, resulting in the inability to retrieve a close temperature value through step S203. For this reason, this embodiment also provides the following solution.

[0081] See also Figure 4 As shown, after obtaining the result register detection value detected by the temperature sensor, the temperature detection method includes:

[0082] (1) Determine whether the current traversal position is greater than the length of the target structure pointer; if the current traversal position is greater than the length of the target structure pointer, an error prompt is returned.

[0083] The current traversal position is the current row number of the structure pointer, and the length of the structure pointer is the maximum number of rows of the structure pointer. Due to factors such as registration errors, the current row number may be greater than the maximum number of rows of the structure pointer. In this case, an error message is returned, or the offset is directly returned.

[0084] (2) Determine whether the result register detection value is less than the minimum result register value in the target structure pointer; if so, add a preset offset to the temperature value corresponding to the minimum result register value as the temperature value corresponding to the result register detection value.

[0085] Since the result register value and temperature value in the structure pointer are arranged from small to large, the current operation is actually: determine whether the result register detection value is less than the value of the first result register of the structure pointer. If it is less than, it exceeds the temperature detection range of the temperature sensor, and returns the temperature value after the minimum temperature value plus the offset. If it is not less than, go to step 4.

[0086] (3) Determine whether the result register detection value is greater than the maximum result register value in the target structure pointer; if greater, add a preset offset to the temperature value corresponding to the maximum result register value as the temperature value corresponding to the result register detection value.

[0087] Since the result register value and temperature value in the structure pointer are arranged from small to large, the current operation is actually: determine whether the result register detection value is greater than the value of the last result register of the structure pointer. If it is greater, it exceeds the temperature detection range of the temperature sensor, and returns the temperature value after the maximum temperature value plus the offset. If not, go to step 4.

[0088] (4) Traverse the result register values ​​in the target structure pointer to determine whether the absolute value of the difference between each result register value and the result register detection value is less than a preset threshold; if the absolute value of the difference between any result register value and the result register detection value is less than the preset threshold, add the preset offset to the temperature value corresponding to the result register value as the temperature value corresponding to the result register detection value.

[0089] In some cases, if the result register value interval in the structure pointer is set too large or the preset threshold is set too small, it may result in failure to detect the result register value whose absolute value of the difference with the result register detection value is less than the preset threshold. In this case, go to step 5.

[0090] (5) determining a first result register value and a second result register value from the target structure pointer; wherein the first result register value is a result register value that is greater than the result register detection value and is closest to the result register detection value, and the second result register value is a result register value that is less than the result register detection value and is closest to the result register detection value; determining a temperature calculation formula according to the first result register value and its corresponding temperature value, and the second result register value and its corresponding temperature value; substituting the result register detection value into the temperature calculation formula to obtain a temperature calculation result, and adding a preset offset to obtain the temperature value corresponding to the result register detection value.

[0091] The first result register value and its corresponding temperature value are (X1, Y1), and the second result register value and its corresponding temperature value are (X2, Y2). Through these two points, a straight line formula can be obtained. Substitute the result register detection value into the formula and add the offset to get the temperature value.

[0092] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0093] Figure 5 is a schematic diagram of the structure of the temperature detection device 50 provided by the embodiment of the present invention, see Figure 5 As shown, the device comprises:

[0094] The establishing module 51 is used to establish a temperature reference table; wherein the temperature reference table includes a plurality of structure pointers, each structure pointer stores temperature reference information of a type of temperature sensor.

[0095] The acquisition module 52 is used to acquire the result register detection value detected by the temperature sensor.

[0096] The processing module 53 is used to determine the target structure pointer according to the type of the temperature sensor, and to search the temperature value corresponding to the result register detection value from the temperature reference information of the target structure pointer.

[0097] As a possible implementation, the temperature reference information includes a plurality of groups of corresponding result register values ​​and temperature values; the processing module 53 is used to:

[0098] Traverse the result register values ​​in the target structure pointer to determine whether the absolute value of the difference between each result register value and the result register detection value is less than a preset threshold;

[0099] If the absolute value of the difference between any result register value and the result register detection value is less than a preset threshold, the temperature value corresponding to the result register value is added with a preset offset and used as the temperature value corresponding to the result register detection value.

[0100] As a possible implementation manner, the processing module 53 is further configured to:

[0101] Before traversing the result register value in the target structure pointer, determine whether the result register detection value is less than the minimum result register value in the target structure pointer;

[0102] If it is less than, the temperature value corresponding to the minimum result register value is added with the preset offset and the result is taken as the temperature value corresponding to the result register detection value.

[0103] As a possible implementation manner, the processing module 53 is further configured to:

[0104] Before traversing the result register value in the target structure pointer, determine whether the result register detection value is greater than the maximum result register value in the target structure pointer;

[0105] If it is greater, the temperature value corresponding to the maximum result register value is added with the preset offset value as the temperature value corresponding to the result register detection value.

[0106] As a possible implementation manner, the processing module 53 is further configured to:

[0107] After traversing the result register values ​​in the target structure pointer, if there is no result register value whose absolute difference with the result register detection value is less than a preset threshold, determine the first result register value and the second result register value from the target structure pointer; wherein the first result register value is a result register value greater than the result register detection value and closest to the result register detection value, and the second result register value is a result register value less than the result register detection value and closest to the result register detection value;

[0108] Determine a temperature calculation formula according to the first result register value and its corresponding temperature value, the second result register value and its corresponding temperature value;

[0109] Substitute the result register detection value into the temperature calculation formula to obtain the temperature calculation result, and add the preset offset to obtain the temperature value corresponding to the result register detection value.

[0110] As a possible implementation manner, the processing module 53 is used to:

[0111] Determine whether the current traversal position is greater than the length of the target structure pointer;

[0112] If the current traversal position is greater than the length of the target structure pointer, an error message is returned.

[0113] As a possible implementation manner, different types of temperature sensors are set with different preset offsets; the preset offsets are determined according to the temperature measurement range of the temperature sensor.

[0114] It can be seen that the embodiment of the present invention establishes a temperature reference table, which contains multiple structure pointers, and stores the temperature reference information of different types of temperature sensors in each structure pointer respectively. When the result register detection value detected by the temperature sensor is obtained, it is only necessary to call the same function, find the corresponding structure pointer, and further find the temperature value corresponding to the result register detection value from the temperature reference information of the corresponding structure pointer. The embodiment of the present invention realizes unified temperature detection by multiple different types of temperature sensors, and each detection does not interfere with each other, is independent of each other internally, and is uniformly processed externally. The code is simple, the mechanism is unified, code modification is reduced, the amount of code and the writing process are simplified, and memory is reduced, avoiding the problem of increased error rate caused by redundant and complex writing processes.

[0115] Figure 6 is a schematic diagram of a power module 60 provided in an embodiment of the present invention.

[0116] like Figure 6 As shown, the power module 60 of this embodiment includes: a processor 61, a memory 62, and a computer program 63 stored in the memory 62 and executable on the processor 61, such as a temperature detection program. When the processor 61 executes the computer program 63, the steps in the above-mentioned temperature detection method embodiments are implemented, such as Figure 2 Alternatively, when the processor 61 executes the computer program 63, the functions of each module in the above-mentioned device embodiments are realized, for example, Figure 5 The functions of modules 51 to 53 are shown.

[0117] Exemplarily, the computer program 63 may be divided into one or more modules / units, which are stored in the memory 62 and executed by the processor 61 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program 63 in the power module 60.

[0118] The power module 60 may include, but is not limited to, a processor 61 and a memory 62. Those skilled in the art will appreciate that Figure 6 It is only an example of the power module 60 and does not constitute a limitation of the power module 60. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the power module 60 may also include input and output devices, network access devices, buses, etc.

[0119] The processor 61 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0120] The memory 62 may be an internal storage unit of the power module 60, such as a hard disk or memory of the power module 60. The memory 62 may also be an external storage device of the power module 60, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the power module 60. Further, the memory 62 may also include both an internal storage unit of the power module 60 and an external storage device. The memory 62 is used to store the computer program and other programs and data required by the power module 60. The memory 62 may also be used to temporarily store data that has been output or is to be output.

[0121] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0122] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0123] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0124] In the embodiments provided by the present invention, it should be understood that the disclosed device / power module and method can be implemented in other ways. For example, the device / power module embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0125] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0126] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0127] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0128] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A temperature detection method, characterized in that: include: Establishing a temperature reference table; wherein the temperature reference table comprises a plurality of structure pointers, each structure pointer storing temperature reference information of a type of temperature sensor; Get the result register detection value detected by the temperature sensor; A target structure pointer is determined according to the type of the temperature sensor, and a temperature value corresponding to the result register detection value is searched from the temperature reference information of the target structure pointer.

2. The temperature detection method according to claim 1, characterized in that: The temperature reference information includes a plurality of groups of corresponding result register values ​​and temperature values; The step of searching the temperature value corresponding to the result register detection value from the temperature reference information of the target structure pointer includes: Traversing the result register values ​​in the target structure pointer, determining whether the absolute value of the difference between each result register value and the result register detection value is less than a preset threshold; If the absolute value of the difference between any result register value and the result register detection value is smaller than the preset threshold, the temperature value corresponding to the result register value is added with a preset offset and used as the temperature value corresponding to the result register detection value.

3. The temperature detection method according to claim 2, characterized in that: The step of searching the temperature value corresponding to the result register detection value from the temperature reference information of the target structure pointer further includes: Before traversing the result register values ​​in the target structure pointer, determining whether the result register detection value is less than the minimum result register value in the target structure pointer; If it is less than, the temperature value corresponding to the minimum result register value is added with a preset offset to obtain the temperature value corresponding to the result register detection value.

4. The temperature detection method according to claim 2, characterized in that: The step of searching the temperature value corresponding to the result register detection value from the temperature reference information of the target structure pointer further includes: Before traversing the result register values ​​in the target structure pointer, determining whether the result register detection value is greater than the maximum result register value in the target structure pointer; If it is greater, the temperature value corresponding to the maximum result register value is added with a preset offset to obtain the temperature value corresponding to the result register detection value.

5. The temperature detection method according to claim 2, characterized in that: The step of searching the temperature value corresponding to the result register detection value from the temperature reference information of the target structure pointer further includes: After traversing the result register values ​​in the target structure pointer, if there is no result register value whose absolute value of difference with the result register detection value is less than the preset threshold, determining a first result register value and a second result register value from the target structure pointer; wherein the first result register value is a result register value greater than the result register detection value and closest to the result register detection value, and the second result register value is a result register value less than the result register detection value and closest to the result register detection value; Determine a temperature calculation formula according to the first result register value and its corresponding temperature value, and the second result register value and its corresponding temperature value; Substitute the result register detection value into the temperature calculation formula to obtain a temperature calculation result, and add a preset offset to obtain the temperature value corresponding to the result register detection value.

6. The temperature detection method according to claim 2, characterized in that: The traversing the result register value in the target structure pointer includes: Determine whether the current traversal position is greater than the length of the target structure pointer; If the current traversal position is greater than the length of the target structure pointer, an error message is returned.

7. The temperature detection method according to claim 2, characterized in that: Different types of temperature sensors are set with different preset bias values; The preset offset is determined according to a temperature measurement range of the temperature sensor.

8. A temperature detection device, characterized in that: include: An establishment module is used to establish a temperature reference table; wherein the temperature reference table includes a plurality of structure pointers, each structure pointer stores temperature reference information of a type of temperature sensor; An acquisition module is used to obtain a result register detection value detected by a temperature sensor; The processing module is used to determine the target structure pointer according to the type of the temperature sensor, and to search the temperature value corresponding to the result register detection value from the temperature reference information of the target structure pointer.

9. A power module, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.