Temperature acquisition method, acquisition device, storage medium and electronic equipment
By compensating for the impedance influence of the battery connection device during battery temperature acquisition, and using the impedance data of the battery connection device to compensate for the initial voltage data, the problem of inaccurate battery temperature acquisition is solved, achieving higher acquisition accuracy and applicability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI ANKELIAN TECH CO LTD
- Filing Date
- 2026-01-21
- Publication Date
- 2026-05-12
AI Technical Summary
In existing technologies, battery temperature acquisition is affected by the impedance of the battery connection device, resulting in low sampling accuracy.
By acquiring the initial voltage data of the sampling resistor in the target battery and compensating for it based on the impedance data of the battery connection device, the target voltage data is obtained. The battery temperature is then determined by combining the resistance data and the temperature mapping relationship.
It improves the accuracy of battery temperature acquisition, is suitable for various types of battery connection devices, and has good versatility and reliability.
Smart Images

Figure CN122016069A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of battery temperature acquisition technology, and in particular to a temperature acquisition method, acquisition device, storage medium and electronic device. Background Technology
[0002] Battery temperature data can be used to monitor the battery's operating status or to adjust the battery's operating mode to improve its lifespan. Therefore, obtaining accurate battery temperature is a key technical challenge currently being researched and addressed in the industry. Summary of the Invention
[0003] This application provides a temperature acquisition method, acquisition device, storage medium, and electronic device, which can improve the accuracy of battery temperature data acquisition and at least partially solve the above-mentioned technical problems.
[0004] To achieve the above objectives, according to a first aspect of this application, a temperature acquisition method is provided, the method comprising: acquiring initial voltage data of a sampling resistor in a target battery; compensating the initial voltage data based on impedance data of a battery connection device connected to the target battery to obtain target voltage data; determining resistance data of the sampling resistor based on the target voltage data; and determining the battery temperature of the target battery based on the resistance data and target mapping data; wherein the target mapping data includes at least one set of mapping relationships between resistance data and temperature data.
[0005] Optionally, the step of compensating the initial voltage data based on the impedance data of the battery connection device connected to the target battery to obtain the target voltage data includes: acquiring the current data of the target battery; determining the compensation voltage data of the sampling resistor based on the current data and the impedance data; and determining the target voltage data based on the compensation voltage data and the initial voltage data.
[0006] Optionally, the method further includes: in response to a temperature acquisition command for the target battery, determining a data identifier for the battery connection device; wherein the data identifier is used to indicate the storage state of the impedance data; and determining the impedance data based on the data identifier.
[0007] Optionally, determining the impedance data based on the data identifier includes: reading the impedance data from a database when the data identifier indicates that the impedance data exists; and determining the impedance data based on the current change data and voltage change data of the target battery when the data identifier indicates that the impedance data does not exist.
[0008] Optionally, after determining the battery temperature of the target battery based on the resistance data and the target mapping data, the method further includes filtering the battery temperature.
[0009] Optionally, filtering the battery temperature includes: determining an upper temperature threshold and a lower temperature threshold for the target battery; and filtering out battery temperatures greater than the upper temperature threshold and / or less than the lower temperature threshold if filtering conditions are met; wherein the filtering conditions include that the variation between the individual battery temperatures determined for the target battery is greater than or equal to a preset range within a first acquisition time.
[0010] Optionally, filtering the battery temperature includes: obtaining a temperature set corresponding to the second acquisition time; wherein the temperature set includes each battery temperature determined for the target battery during the second acquisition time; and averaging all battery temperatures in the temperature set.
[0011] Secondly, embodiments of this application also provide a temperature acquisition device, the device comprising: a data acquisition module configured to acquire initial voltage data of a sampling resistor in a target battery; a voltage compensation module configured to compensate the initial voltage data based on impedance data of a battery connection device connected to the target battery to obtain target voltage data; a resistance determination module configured to determine resistance data of the sampling resistor based on the target voltage data; and a temperature determination module configured to determine the battery temperature of the target battery based on the resistance data and target mapping data; wherein the target mapping data includes at least one set of mapping relationships between resistance data and temperature data.
[0012] Thirdly, embodiments of this application also provide a computer-readable storage medium having a computer program or instructions stored thereon, the computer program or instructions being loaded by a processor to perform the steps in the temperature acquisition method provided in the first aspect.
[0013] Fourthly, embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program or instructions, and when the computer program or instructions are executed by the processor, the processor performs the steps of the temperature acquisition method provided in the first aspect.
[0014] In summary, the technical solution proposed in this application, when acquiring the temperature of a target battery, first obtains the initial voltage data of the sampling resistor in the target battery, then compensates for this initial voltage data based on the impedance data of the battery connection device connected to the target battery to obtain the target voltage data. Subsequently, the resistance data of the sampling resistor is determined based on the target voltage data, and the battery temperature of the target battery is obtained based on the resistance data and the target mapping data. The target mapping data includes at least one set of mapping relationships between resistance data and temperature data. This application embodiment can compensate for the acquired initial voltage data based on the impedance data of the battery connection device to obtain the target voltage data, and then determine the battery temperature of the target battery based on this target voltage data. Compensation for the initial voltage data of the sampling resistor in the target battery can be performed at the software level based on the impedance data of the battery connection device, thereby compensating for the acquired temperature data of the target battery and improving the accuracy of battery temperature acquisition. The temperature acquisition method of this application embodiment is applicable to various types of battery connection devices, has strong versatility, and good reliability. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart of a temperature acquisition method provided in some embodiments of this application; Figure 2 This is a target battery connection circuit diagram provided in some embodiments of this application; Figure 3 This is a flowchart illustrating the process of determining impedance data provided in some embodiments of this application; Figure 4 This is a flowchart of another temperature acquisition method provided in some embodiments of this application; Figure 5 This is a schematic diagram of a temperature acquisition device provided in some embodiments of this application; Figure 6 This is a schematic diagram of the software framework of a temperature acquisition device provided in some embodiments of this application. Detailed Implementation
[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] In the following description, specific embodiments of the invention will be illustrated with reference to steps and symbols performed by one or more computers, unless otherwise stated. Therefore, these steps and operations will be referred to several times as being performed by a computer, and computer execution as referred to herein includes operations by a computer processing unit representing electronic signals of data in a structured format. This operation transforms the data or maintains it at a location in the computer's memory system, which can be reconfigured or otherwise alter the operation of the computer in a manner well known to those skilled in the art. The data structure maintained by the data is the physical location of the memory, which has specific characteristics defined by the data format. However, the principles of the invention described above are not intended to be limiting, and those skilled in the art will understand that many of the steps and operations described below can also be implemented in hardware.
[0019] The terms "module" or "unit" as used herein can be considered as software objects executing on the computing system. The various components, modules, engines, and services described herein can be considered as implementations on the computing system. While the apparatus and methods described herein are preferably implemented in software, they can also be implemented in hardware, both of which are within the scope of this invention.
[0020] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when an element is “connected” or “coupled” to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein may include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0021] Batteries can be connected to electrical devices, charging devices, or other battery components via battery connectors to achieve power and signal transmission. Battery connectors come in various shapes, such as pins or sockets. For example, a pin-type battery connector can be used for small, portable, and removable batteries. Although the impedance of the battery connector is not high, it can still interfere with the battery when the current is large, affecting the accuracy of battery temperature sampling.
[0022] In view of this, embodiments of this application provide a temperature acquisition method, acquisition device, storage medium, and electronic device, which can improve the accuracy of battery temperature data acquisition.
[0023] Please see Figure 1 , Figure 1 This is a flowchart illustrating a temperature acquisition method provided in some embodiments of this application. For example... Figure 1 As shown, the temperature acquisition method includes the following steps S110 to S130.
[0024] Step S110: Obtain the initial voltage data of the sampling resistor in the target battery.
[0025] A sampling resistor is a resistor installed in the target battery for acquiring its temperature. This application determines the battery temperature of the target battery by acquiring the initial voltage data of the sampling resistor and then analyzing the voltage data. For example, when the sampling resistor is a thermistor, the resistance data of the sampling resistor can be determined based on the initial voltage data, and the temperature data corresponding to that resistance data can then be used as the battery temperature of the target battery.
[0026] Step S120: Based on the impedance data of the battery connection device connected to the target battery, the initial voltage data is compensated to obtain the target voltage data.
[0027] When the target battery performs charging and discharging operations, it first connects to the battery connection device, and then the power and signal transmission are realized between the battery connection device and the external power-consuming equipment or charging equipment.
[0028] Please see Figure 2 , Figure 2 This is a target battery connection circuit diagram provided in some embodiments of this application. For example... Figure 2 As shown, the target battery 100 is connected to the battery connection device. The output terminals A and B of the battery connection device are connected to external devices. Resistors R1 and R2 are the equivalent resistances of the battery connection device. The first grounding terminal corresponding to output terminals A and B is denoted as GND1. Resistor R3 is the sampling resistor. The second grounding terminal corresponding to the target battery 100 is denoted as GND2. Resistor R3 is connected to the connection point C of the target battery 100. ADCThis represents the initial voltage data sampled from the sampling resistor. It can be seen that due to the presence of the equivalent resistance R2 of the battery connection device, there is a voltage difference between the output terminal B and the sampling line C, affecting the sampling accuracy of the target battery 100 voltage data, and consequently affecting the accuracy of the battery temperature acquisition.
[0029] Therefore, at the software level, after obtaining the initial voltage data of the sampling resistor, this application compensates for the initial voltage data of the sampling resistor based on the impedance data of the battery connection device, eliminating the sampling deviation caused by the impedance data of the battery connection device, and obtaining the target voltage data of the sampling resistor. The impedance data of the battery connection device can be obtained from a database or calculated after collecting data from the target battery after the battery connection device is connected to the target battery. This application does not limit the method of obtaining the impedance data, as long as the initial voltage data of the sampled resistor can be compensated based on the impedance data to obtain the target voltage data.
[0030] Step S130: Determine the resistance data of the sampling resistor based on the target voltage data.
[0031] For example, before calculating the resistance data of the sampling resistor, the sampling current data corresponding to the sampling resistor can be obtained first, and then the resistance data of the sampling resistor can be obtained by calculating based on Ohm's law according to the target voltage data and the sampling current data.
[0032] Step S140: Determine the battery temperature of the target battery based on the resistance data and the target mapping data; wherein, the target mapping data includes at least one set of mapping relationships between resistance data and temperature data.
[0033] When the sampling resistor is a thermistor, its resistance data changes with temperature. The target mapping data includes the mapping relationship between the resistance data of the sampling resistor and the temperature data. The target mapping data can be a mapping table, a mapping curve, etc. In this embodiment, after determining the resistance data of the sampling resistor, the temperature data corresponding to the resistance data is used as the battery temperature of the target battery in the target mapping data.
[0034] In this embodiment, when acquiring the temperature of a target battery, the initial voltage data is compensated based on the impedance data of the battery connection device to obtain target voltage data. Then, the battery temperature of the target battery is determined based on this target voltage data. This compensation can be performed at the software level based on the impedance data of the battery connection device to compensate for the initial voltage data of the target resistor in the target battery, thereby improving the accuracy of the acquired temperature data and increasing the accuracy of battery temperature acquisition. The temperature acquisition method of this embodiment is applicable to various types of battery connection devices, exhibiting strong versatility and high reliability.
[0035] In some embodiments, the initial voltage data is compensated based on the impedance data of the battery connection device connected to the target battery to obtain target voltage data, including: acquiring the current data of the target battery; determining the compensated voltage data of the target battery based on the current data and the impedance data; and determining the target voltage data based on the compensated voltage data and the initial voltage data.
[0036] Please continue reading. Figure 2 The voltage difference between the output terminal B of the battery connection device and the connection terminal C of the sampling resistor is the voltage across the battery connection device, and the current flowing through the battery connection device is the target battery current. Therefore, based on Ohm's law, the voltage across the battery connection device is calculated using the target battery current data and the impedance data of the battery connection device; this voltage data is the compensation voltage data. At this point, the target voltage data U = initial voltage data U0 + target battery current I * battery connection device impedance data R.
[0037] The embodiments of this application can compensate for the initial voltage data of the sampling resistor in the target battery at the software level based on the impedance data of the battery connection device, thereby compensating for the collected temperature data of the target battery and improving the accuracy of battery temperature acquisition.
[0038] In some embodiments, the temperature sampling method further includes: determining a data identifier for a battery-connected device in response to a temperature acquisition command for a target battery; wherein the data identifier is used to indicate the storage state of impedance data; and determining impedance data based on the data identifier.
[0039] The temperature acquisition command can be a command sent by the control device to the temperature acquisition device, which is the apparatus for executing the temperature acquisition method in this embodiment of the application. When the control device needs to obtain the battery temperature of the target battery, it sends a temperature acquisition command to the temperature acquisition device, and the temperature acquisition device responds to the temperature acquisition command from the control device and begins to acquire the battery temperature of the target battery.
[0040] In different application scenarios, the battery connection devices used to connect to the target battery are not entirely the same. Since the impedance data corresponding to different battery connection devices are also different, the impedance data of the battery connection devices needs to be updated dynamically in real time to avoid deviations in the collected battery temperature due to impedance data mismatch.
[0041] Data identifiers are used to indicate the data storage status of impedance data for battery connection devices. Based on the data identifier, it can be determined whether the impedance data for the current battery connection device has already been calculated. Taking `compen_flag` as an example, when `compen_flag` is 1, it indicates that the impedance data for the battery connection device exists. This means that the impedance data for the battery connection device may have been calculated when it was connected to the target battery, and the impedance data can be directly read from the database. When `compen_flag` is 0, it indicates that the impedance data for the battery connection device does not exist, and the impedance data for the battery connection device needs to be recalculated.
[0042] In this embodiment of the application, when collecting temperature data of a target battery, the data identifier of the battery connection device connected to the target battery can be determined first. The storage state of the impedance data of the battery connection device can be determined based on the data identifier, and then different impedance data acquisition methods can be selected according to different storage states.
[0043] In some embodiments, please refer to Figure 3 , Figure 3 This is a schematic flowchart illustrating the process of determining impedance data provided in some embodiments of this application. For example... Figure 3 As shown, determining impedance data based on data identifiers includes the following steps S310 to S320.
[0044] Step S310: If the data identifier indicates that impedance data exists, read the impedance data from the database.
[0045] If the data identifier indicates the existence of impedance data for the battery connection device, the impedance data of the battery connection device can be read directly from the database. This database can be stored in the memory of the battery temperature data acquisition device.
[0046] Step S320: If the data identifier indicates that the impedance data is not available, determine the impedance data based on the current change data and voltage change data of the target battery.
[0047] If the data identifier indicates that the impedance data of the battery connection device is missing, the impedance data of the battery connection device needs to be recalculated. This is because the impedance data of the battery connection device affects the power data exchanged between the target battery and the external device. For example, when the target battery is charging and discharging through the battery connection device, plugging and unplugging the battery connection device will cause fluctuations in the current and voltage data of the target battery. For instance, when the battery connection device is connected to the target battery, the current data of the target battery may decrease, resulting in a decrease in the sampled voltage data; when the battery connection device is disconnected from the target battery, the current data of the target battery may increase, resulting in an increase in the sampled voltage data. Embodiments of this application can determine the impedance data of the battery connection device based on the current and voltage change data of the target battery.
[0048] For example, when the current of the target battery changes significantly instantaneously, it may be because the target battery has changed its connected battery connection device, or the battery connection device has changed its connection state. In this embodiment, the battery current data I1 and voltage data U1 after the jump are collected, and the battery current data I2 and voltage data U2 before the jump are collected. The impedance data of the battery connection device is still represented as R. We can obtain: I1*R-I2*R=U1-U2. By transforming this formula, we can obtain the expression for the impedance data R, R=(U1-U2) / (I1-I2).
[0049] In some embodiments, the present application may also set a time threshold compen_timeout for impedance data calculation. If the impedance data calculation time of the battery connection device exceeds the set time threshold compen_timeout, and the impedance data has not been calculated, the calculation will be judged as a failure.
[0050] In some embodiments, the present application may also set a current threshold compen_iterm when calculating impedance data. Before calculating the impedance data of the battery connection device, it is necessary to ensure that the current data of the target current is greater than the set current threshold before the impedance of the battery connection device can be calculated based on the current change data and voltage change data of the target battery.
[0051] In some embodiments, the present application may also set a switch flag compen_recalu for impedance data calculation. If the switch flag is 1 when calculating the impedance data of the battery connection device, the impedance data needs to be recalculated.
[0052] In some embodiments, after determining the battery temperature of the target battery based on resistance data and target mapping data, the temperature acquisition method further includes filtering the battery temperature.
[0053] Ideally, after temperature compensation, accurate target voltage data and thus accurate battery temperature can be obtained from the temperature data of the target battery. However, in practical applications, differences in the acquisition time of voltage data, current data, and battery temperature may lead to erroneous compensation. This application addresses this problem by filtering the calculated battery temperature. The filtering method eliminates erroneous temperature compensation calculations, thereby improving the accuracy of battery temperature acquisition.
[0054] In some embodiments, filtering the battery temperature includes: determining an upper temperature threshold and a lower temperature threshold for the target battery; and filtering out battery temperatures that are greater than the upper temperature threshold and / or less than the lower temperature threshold, provided that filtering conditions are met; wherein the filtering conditions include that the variation between the individual battery temperatures determined for the target battery is greater than or equal to a preset range during a first acquisition time.
[0055] This application embodiment filters out battery temperatures outside a certain threshold by setting a temperature threshold. Specifically, this application embodiment first sets an upper temperature threshold and a lower temperature threshold for the battery temperature, where the upper temperature threshold is denoted as `compen_high` and the lower temperature threshold is denoted as `compen_low`. If the calculated battery temperature is greater than the upper temperature threshold or less than the lower temperature threshold, that battery temperature is excluded.
[0056] Furthermore, before filtering the battery temperature based on a temperature threshold in this embodiment, it is necessary to first determine whether the battery temperature meets the filtering conditions. These filtering conditions can be determined by the changes in battery temperature within the first acquisition time `compen_tout`. For example, if the changes in battery temperature within the first acquisition time `compen_tout` are greater than or equal to a preset range, the battery temperature can be filtered using the filtering method of this embodiment; if the changes in battery temperature within the first acquisition time `compen_tout` are less than the preset range, even if the battery temperature is greater than the upper temperature threshold and / or less than the lower temperature threshold, it is considered that the current battery temperature does not need to be filtered. This embodiment does not limit the value of the first acquisition time `compen_tout`; in practical applications, it can be automatically determined according to requirements. For example, the first acquisition time `compen_tout` can be 3 seconds.
[0057] This application embodiment can filter out battery temperatures outside the temperature threshold by using limit filtering when there are large fluctuations in battery temperature data. This avoids incorrect compensation of the collected initial voltage data to obtain the battery temperature, thereby improving the accuracy of battery temperature acquisition.
[0058] In some embodiments, filtering the battery temperature includes: obtaining a temperature set corresponding to a second acquisition time; wherein the temperature set includes the individual battery temperatures determined for the target battery within the second acquisition time; and averaging all battery temperatures in the temperature set.
[0059] This application embodiment can also filter battery temperatures by averaging all battery temperatures within the second acquisition time. The second acquisition time can be a preset time interval. Generally, the larger the time interval of the second acquisition time, the smoother the acquired battery temperature data, but the greater the data acquisition lag. This application embodiment can determine the time interval of the second acquisition time according to the actual application scenario. After the second acquisition time is determined, all battery temperatures determined for the target battery within the second acquisition time are formed into a temperature set. Averaging all battery temperatures in the temperature set allows the average temperature of all battery temperatures in the temperature set to be used as the filtered battery temperature.
[0060] In this embodiment, the average value of all battery temperatures in the temperature set corresponding to the second acquisition time is processed, and the average value of all battery temperatures is used as the filtered battery temperature to filter out incorrectly calculated battery temperatures and improve the accuracy of the acquired battery temperatures.
[0061] The temperature acquisition method of this application will be described in detail below through a specific embodiment.
[0062] Please see Figure 4 , Figure 4 This is a flowchart of another temperature acquisition method provided in some embodiments of this application. For example... Figure 4 As shown, the temperature acquisition method includes the following steps S410 to S450.
[0063] Step S410: In response to the temperature acquisition command, determine the data identifier of the battery-connected device.
[0064] The battery connection device connects to the target battery, which in turn connects to electrical equipment, charging equipment, or other battery components via the battery connection device, enabling power and signal transmission. Data identifiers are used to indicate the storage status of impedance data.
[0065] Step S420: Determine the impedance data of the battery connection device based on the data identifier of the battery connection device.
[0066] If the data identifier indicates that impedance data exists, the impedance data of the battery connection device can be read directly from the database.
[0067] If the data identifier indicates that impedance data is not available, the impedance data of the battery connection device is calculated based on the current transformation data and voltage change data of the target battery. The battery current data I1 and voltage data U1 after the target battery jump are obtained, and the battery current data I2 and voltage data U2 before the jump are also collected. The impedance data R of the battery connection device can be expressed as: R = (U1 - U2) / (I1 - I2).
[0068] Step S430: Obtain the initial voltage data of the sampling resistor in the target battery.
[0069] The sampling resistor is connected in series with the target battery, and the initial voltage data across the sampling resistor is obtained through the sampling circuit.
[0070] Step S440: Compensate the initial voltage data based on the impedance data to obtain the target voltage data.
[0071] Obtain the battery data of the target battery. Based on Ohm's law, calculate the compensation voltage data of the battery connection device according to the impedance data and current data. Add the compensation voltage data to the initial voltage data to obtain the target voltage data. The target voltage data U is expressed as: U = initial voltage data U0 + target battery current I * impedance data R.
[0072] Step S450: Calculate the battery temperature of the target battery based on the target voltage data.
[0073] The resistance data of the sampling resistor is determined based on the target voltage data, and the battery temperature of the target battery is determined based on the resistance data and the target mapping data; wherein, the target mapping data includes at least one set of mapping relationships between resistance data and temperature data.
[0074] Step S460: Filter the battery temperature.
[0075] Battery temperature can be filtered by setting a temperature threshold to remove temperature data exceeding that threshold. Alternatively, the average temperature of all battery temperatures over a period of time can be used as the filtered battery temperature.
[0076] This application embodiment can compensate for the collected initial voltage data based on the impedance data of the battery connection device to obtain target voltage data, and then determine the battery temperature of the target battery based on the target voltage data. This compensation for the initial voltage data can be performed at the software level based on the impedance data of the battery connection device, thereby compensating for the collected temperature data of the target battery and improving the accuracy of the collected battery temperature. Furthermore, this application embodiment can dynamically calculate the impedance data of the battery connection device, making it applicable to different types of battery connection devices, exhibiting strong versatility and high reliability. In addition, this application embodiment filters the calculated battery temperature after calculation, avoiding calculation errors caused by incorrect compensation of the collected initial voltage data, thus improving the accuracy and reliability of the target battery temperature calculation.
[0077] Based on the same inventive concept, this application also provides a temperature acquisition device for implementing the temperature acquisition method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more temperature acquisition device embodiments provided below can be found in the limitations of the temperature acquisition method described above, and will not be repeated here.
[0078] Please see Figure 5 , Figure 5 This is a schematic diagram of a temperature acquisition device provided in some embodiments of this application. For example... Figure 5 As shown, the temperature acquisition device includes: The data acquisition module 510 is configured to acquire the initial voltage data of the sampling resistor in the target battery; The voltage compensation module 520 is configured to compensate the initial voltage data based on the impedance data of the battery connection device connected to the target battery to obtain the target voltage data; The resistance determination module 530 is configured to determine the resistance data of the sampling resistor based on the target voltage data; The temperature determination module 540 is configured to determine the battery temperature of the target battery based on resistance data and target mapping data; wherein the target mapping data includes at least one set of mapping relationships between resistance data and temperature data.
[0079] Please see Figure 6 , Figure 6 This is a schematic diagram of the software framework of a temperature acquisition device provided in some embodiments of this application. For example... Figure 6As shown, the temperature acquisition device connects to control devices via an interactive interface. It receives temperature acquisition commands from the control device through the interactive interface and sends the acquired battery temperature to the control device via the same interface. The HAL (Hardware Abstraction Layer) interface is the interface for the hardware abstraction layer of the temperature acquisition device. HAL is a software middleware layer located between the operating system kernel and hardware drivers. It abstracts and encapsulates the underlying hardware, providing a unified and concise interface to the upper layers, so that upper-layer applications or the operating system do not need to concern themselves with the specific hardware implementation details. The HAL interface connects to the driver interface to obtain the battery temperature. The driver interface connects to the voltage data acquisition device to obtain the initial voltage data. Within the driver interface, software methods are used to compensate the initial voltage data to obtain the target voltage data. Then, the battery temperature of the target battery is calculated based on the target voltage data, and the calculated battery temperature is sent to the interactive interface via the HAL interface, ultimately realizing the acquisition of the battery temperature.
[0080] Each module in the aforementioned temperature acquisition device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0081] This application also provides a computer-readable storage medium storing a computer program or instructions thereon. The computer program or instructions are loaded by a processor to execute the steps in the temperature acquisition method provided in the above embodiments. Since the temperature acquisition method has been described in detail above, it will not be repeated here.
[0082] This application also provides an electronic device, including a memory and a processor. The memory stores a computer program or instructions. When the computer program or instructions are executed by the processor, the processor performs the steps in the temperature acquisition method provided in the above embodiments. Since the temperature acquisition method has been described in detail above, it will not be repeated here.
[0083] This embodiment also provides a computer-readable storage medium storing a computer program or instructions thereon. The computer program or instructions are loaded by a processor to execute the steps in the temperature acquisition method provided in the above embodiment. Since the temperature acquisition method has been described in detail above, it will not be repeated here.
[0084] In the embodiments of this application, the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.
[0085] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0086] The above provides a detailed description of a temperature acquisition method, acquisition device, storage medium, and electronic device provided in the embodiments of this application, and uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the technical solutions and core ideas of this application. Those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A temperature acquisition method, characterized in that, The method includes: Obtain the initial voltage data of the sampling resistor in the target battery; Based on the impedance data of the battery connection device connected to the target battery, the initial voltage data is compensated to obtain the target voltage data; The resistance data of the sampling resistor is determined based on the target voltage data; The battery temperature of the target battery is determined based on the resistance data and the target mapping data; wherein the target mapping data includes at least one set of mapping relationships between resistance data and temperature data.
2. The method according to claim 1, characterized in that, The step of compensating the initial voltage data based on the impedance data of the battery connection device connected to the target battery to obtain the target voltage data includes: Obtain the current data of the target battery; Based on the current data and the impedance data, determine the compensation voltage data for the sampling resistor; The target voltage data is determined based on the compensated voltage data and the initial voltage data.
3. The method according to claim 1, characterized in that, The method further includes: In response to a temperature acquisition command for the target battery, a data identifier for the battery connection device is determined; wherein the data identifier is used to indicate the storage status of the impedance data; The impedance data is determined based on the data identifier.
4. The method according to claim 3, characterized in that, Determining the impedance data based on the data identifier includes: If the data identifier indicates that the impedance data exists, the impedance data is read from the database; If the data identifier indicates that the impedance data does not exist, the impedance data is determined based on the current change data and voltage change data of the target battery.
5. The method according to claim 1, characterized in that, After determining the battery temperature of the target battery based on the resistance data and the target mapping data, the method further includes: The battery temperature is filtered.
6. The method according to claim 5, characterized in that, The filtering of the battery temperature includes: Determine the upper temperature threshold and lower temperature threshold of the target battery; If the filtering conditions are met, battery temperatures that are greater than the upper temperature threshold and / or less than the lower temperature threshold will be filtered out. The filtering condition includes, within the first acquisition time, the change in temperature between each battery determined for the target battery being greater than or equal to a preset range.
7. The method according to claim 5, characterized in that, The filtering of the battery temperature includes: Obtain the temperature set corresponding to the second acquisition time; wherein, the temperature set includes the individual battery temperatures determined for the target battery within the second acquisition time; The average value of all battery temperatures in the temperature set is calculated.
8. A temperature acquisition device, characterized in that, The device includes: The data acquisition module is configured to acquire the initial voltage data of the sampling resistor in the target battery; The voltage compensation module is configured to compensate the initial voltage data based on the impedance data of the battery connection device connected to the target battery to obtain the target voltage data; The resistance determination module is configured to: determine the resistance data of the sampling resistor based on the target voltage data; The temperature determination module is configured to: determine the battery temperature of the target battery based on the resistance data and the target mapping data; wherein the target mapping data includes at least one set of mapping relationships between resistance data and temperature data.
9. A computer-readable storage medium, characterized in that, It stores a computer program or instructions, which are loaded by a processor to perform the steps in the temperature acquisition method as described in any one of claims 1 to 7.
10. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program or instructions, which, when executed by the processor, cause the processor to perform the steps of the temperature acquisition method as described in any one of claims 1 to 7.