Temperature compensation method, device, electronic device and storage medium

By determining the mapping relationship between the temperature compensation coefficient and the operating time in the electronic device and dynamically adjusting the temperature compensation coefficient value, the problem that the fixed temperature compensation coefficient cannot cope with changes in ambient temperature is solved, and the temperature compensation accuracy of the sensor is improved.

CN113834974BActive Publication Date: 2024-08-27VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111023027.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-01
Publication Date
2024-08-27
Estimated Expiration
2041-09-01

AI Technical Summary

Technical Problem

In existing temperature compensation methods, the fixed temperature compensation coefficient value cannot effectively cope with the temperature impact of the sensor in a changing environment, resulting in inaccurate adjustment of the sensor target parameters and over- or under-compensation problems.

Method used

By determining the mapping relationship between the temperature compensation coefficient and the running time of the electronic device in different working modes, the temperature compensation coefficient value is dynamically adjusted to adapt to the influence of temperature changes in different working modes, thereby achieving accurate temperature compensation for the target sensor.

Benefits of technology

The accuracy of temperature compensation is improved, the problem of under-compensation or over-compensation caused by a fixed temperature compensation coefficient value in a single working mode is avoided, and the accuracy of sensor detection is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113834974B
    Figure CN113834974B
Patent Text Reader

Abstract

The present application discloses a temperature compensation method, device, electronic device and storage medium, belonging to the field of intelligent control technology. The temperature compensation method includes: determining N working modes running in the electronic device at the first moment; wherein N is a positive integer; obtaining a first mapping relationship corresponding to each of the N working modes; determining the temperature compensation coefficient value corresponding to each of the N working modes at the first moment according to the time when the electronic device has run the N working modes and the first mapping relationship corresponding to each of them; determining the first temperature compensation coefficient value corresponding to the electronic device at the first moment according to the temperature compensation coefficient value corresponding to each of the N working modes; adjusting the target parameter value of the target sensor in the electronic device according to the first temperature compensation coefficient value to achieve temperature compensation for the target sensor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of intelligent control technology, and specifically relates to a temperature compensation method, device, electronic device and storage medium. Background Art

[0002] With the widespread application of various sensors, users pay more and more attention to the accuracy of sensor detection.

[0003] In order to reduce the impact of the ambient temperature increase on sensor detection, the temperature compensation method can be used to improve the accuracy of the target parameters in the sensor affected by the ambient temperature. The temperature compensation method in the prior art mainly uses a fixed temperature compensation coefficient value to adjust the target parameters of the sensor.

[0004] However, in actual scenarios, the temperature of the environment in which the sensor is located changes. Therefore, using a fixed temperature compensation coefficient value fitted in a single working mode for temperature compensation is prone to over-compensation or under-compensation problems, making it impossible to accurately adjust the target parameters of the sensor, reducing the accuracy of temperature compensation. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a temperature compensation method, device, electronic device and storage medium, which can solve the problem of low accuracy of existing temperature compensation for sensors.

[0006] In a first aspect, an embodiment of the present application provides a temperature compensation method, the method comprising:

[0007] Determine N operating modes of the electronic device at a first moment; wherein N is a positive integer;

[0008] Acquire a first mapping relationship corresponding to each of the N working modes; wherein the first mapping relationship is a mapping relationship between a temperature compensation coefficient and an elapsed operating time when the electronic device is operating in the working mode;

[0009] Determine, according to the time that the electronic device has been running the N working modes and the first corresponding mapping relationship, the temperature compensation coefficient value corresponding to each of the N working modes at the first moment;

[0010] Determine a first temperature compensation coefficient value corresponding to the electronic device at a first moment according to the temperature compensation coefficient values ​​corresponding to each of the N operating modes;

[0011] The target parameter value of the target sensor in the electronic device is adjusted according to the first temperature compensation coefficient value to achieve temperature compensation for the target sensor.

[0012] In a second aspect, an embodiment of the present application provides a temperature compensation device, the device comprising:

[0013] A first determining module, used to determine N operating modes of the electronic device at a first moment; wherein N is a positive integer;

[0014] A first acquisition module is used to acquire a first mapping relationship corresponding to each of the N working modes; wherein the first mapping relationship is a mapping relationship between a temperature compensation coefficient and an elapsed operating time when the electronic device operates in the working mode;

[0015] A second determination module, configured to determine, according to the time for which the electronic device has run the N operating modes and the first corresponding mapping relationships, a temperature compensation coefficient value corresponding to each of the N operating modes at a first moment;

[0016] A third determination module, configured to determine a first temperature compensation coefficient value corresponding to the electronic device at a first moment according to the temperature compensation coefficient values ​​corresponding to each of the N operating modes;

[0017] The adjustment module is used to adjust the target parameter value of the target sensor in the electronic device according to the first temperature compensation coefficient value to achieve temperature compensation for the target sensor.

[0018] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0019] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0020] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0021] In the embodiment of the present application, since the first mapping relationship corresponding to each working mode is the mapping relationship between the temperature compensation coefficient and the running time, the temperature compensation coefficient value in both the single working mode and the combined working mode is not constrained by the fixed temperature compensation coefficient value and can be changed dynamically with the change of time. In addition, since the target sensor is affected differently by temperature changes at different times, the embodiment of the present application can dynamically compensate for the target parameter value affected by temperature changes at different times of the target sensor in the current working mode using the dynamically changed temperature compensation coefficient value. Therefore, a more accurate temperature compensation adjustment of the target parameter can be achieved, avoiding the problem of under-compensation or over-compensation caused by temperature compensation adjustment using the fixed temperature compensation coefficient value obtained by fitting under a single working mode, thereby improving the accuracy of temperature compensation. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 is an overall module block diagram of a traditional temperature compensation method according to an exemplary embodiment;

[0023] Figure 2 is a schematic diagram showing over-compensation or under-compensation of fitting caused by a single scenario according to an exemplary embodiment;

[0024] Figure 3 is one of the flow charts of a temperature compensation method according to an exemplary embodiment;

[0025] Figure 4 is a comparative schematic diagram of a temperature compensation coefficient according to an exemplary embodiment;

[0026] Figure 5 is a schematic diagram of a method for determining a temperature compensation coefficient in a combined working mode according to an exemplary embodiment;

[0027] Figure 6 is a schematic diagram of a detection value jump according to an exemplary embodiment;

[0028] Figure 7 is a second flow chart of a temperature compensation method according to an exemplary embodiment;

[0029] Figure 8 is a disturbance correction schematic diagram according to an exemplary embodiment;

[0030] Fig. 9 is a third flow chart of a temperature compensation method according to an exemplary embodiment;

[0031] Fig.10 is a software system block diagram of temperature compensation according to an exemplary embodiment;

[0032] Fig.11 is a structural block diagram of a temperature compensation device according to an exemplary embodiment;

[0033] Fig.12 is a structural block diagram of an electronic device according to an exemplary embodiment;

[0034] Fig.13 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0036] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0037] The temperature compensation method, device, electronic device and storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0038] In order to reduce the impact of the increase in ambient temperature on the target parameter value in the sensor and improve the accuracy of sensor detection, a fixed temperature compensation coefficient value is usually used to adjust the target parameter value of the sensor. However, in actual scenarios, the temperature of the environment in which the sensor is located is changing. Therefore, the compensation result obtained after temperature compensation using the fixed temperature compensation coefficient value fitted in a single working mode is not accurate enough to accurately adjust the target parameter value of the sensor.

[0039] For example, taking the Specific Absorption Rate (SAR) sensor as an example, as the space design of electronic equipment becomes more and more compact, the SAR sensor and antenna are getting closer and closer to the power amplifier and power management integrated circuit. Due to poor heat dissipation and higher and higher ambient temperatures, the SAR sensor is increasingly affected by the increase in the detection environment temperature. Specifically, changes in ambient temperature will affect the dielectric constant of the measurement path, causing the SAR sensor to drift in temperature. If the temperature drift effect is on the same order of magnitude as the expected user impact, it may cause problems of false release or false triggering, where the release can be, for example, the release of the control process of the device's transceiver power, and the triggering can be, for example, the triggering of the control process of the device's transceiver power.

[0040] In order to reduce the impact of increased ambient temperature on the SAR sensor detection path, such as Figure 1 As shown, the software measure of the traditional solution is to add a reference channel 120 on the basis of the detection channel 110. The reference channel 120 and the detection channel 110 are pseudo-differential in parallel and used for compensation of the temperature rise environment. The compensation formula is as follows:

[0041] Useful(n)-Useful(0)=REFCOEF*[Reference(n)-Reference(0)]

[0042] Wherein, Useful(n) is the real-time value of the detection channel, Useful(0) is the detection value during the detection channel calibration, Reference(n) is the real-time value of the reference channel, Reference(0) is the detection value during the reference channel calibration, and REFCOEF is the temperature compensation coefficient.

[0043] Since the reference channel only extends to the end of the main board, it is sensitive to environmental drift and insensitive to proximity detection. Figure 2 As shown in the figure, the detection channel and the reference channel have very similar drifts, and the value detected by the detection channel can be corrected for temperature drift through digital temperature compensation. The temperature change rate can be linearly compensated by fitting the slope value of the linear relationship through the data collected in the early stage to achieve the purpose of temperature drift compensation. However, since the REFCOEF value (that is, the temperature compensation coefficient value) used is a fixed value obtained by fitting a single working mode, in non-standard scenarios, the temperature compensation has the problem of over-compensation (false release) or under-compensation (false triggering). In actual application, in order to avoid the prescribed radiation risk, the temperature compensation will be adjusted down (under-compensation) during parameter debugging. However, this makes it easier to trigger the device's function of reducing radiation, which will also affect the user experience.

[0044] In view of the above technical problems, an embodiment of the present application provides a temperature compensation method, and the execution subject of the method can be a temperature compensation device, or a control module for the temperature compensation method in the temperature compensation device. In the embodiment of the present application, the temperature compensation method provided by the embodiment of the present application is explained by taking the temperature compensation method executed by the temperature compensation device as an example.

[0045] Figure 3 is a flow chart showing a temperature compensation method according to an exemplary embodiment.

[0046] like Figure 3 As shown, the temperature compensation method may include the following steps:

[0047] Step 310: determine N operating modes of the electronic device at a first moment.

[0048] In the embodiment of the present application, the first moment can be any moment when the electronic device is running, and the electronic device can be a mobile phone, a tablet, a computer and other devices, and of course it can also be other electronic devices, which are not limited here. N can be a positive integer, and the N working modes can be working modes of the electronic device in different usage scenarios. For example, in the scenario where the user uses the mobile phone to watch videos, the working mode of the mobile phone is the video mode; in the scenario where the user uses the mobile phone to play games, the working mode of the mobile phone is the game mode; in the scenario where the user uses the mobile phone to listen to music, the working mode of the mobile phone is the music mode.

[0049] In addition, the N working modes can be a single working mode or a combined working mode, which is not limited here. For example, if the user only uses the mobile phone to watch videos, the working mode of the mobile phone is a single working mode including the video mode; if the user uses the mobile phone to charge and play games at the same time, the working mode of the mobile phone is a combined working mode including the charging mode and the game mode.

[0050] Step 320: Obtain a first mapping relationship corresponding to each of the N working modes.

[0051] Here, the first mapping relationship can be a mapping relationship between the temperature compensation coefficient and the running time when the electronic device is running a working mode. The first mapping relationship can be determined according to the target parameter value of the target sensor affected by temperature changes at different times when the electronic device is running the corresponding working mode. It can be used to determine the temperature compensation coefficient value corresponding to the working mode corresponding to the first mapping relationship at different running times.

[0052] In addition, the first mapping relationship may be a temperature compensation coefficient in a single working mode. Different from the fixed temperature compensation coefficient in the traditional solution, the temperature compensation coefficient in the embodiment of the present application may be a function that changes with time. Figure 4As shown, the single working mode temperature compensation coefficient 410 in the embodiment of the present application can avoid the over-compensation 430 and under-compensation 440 existing in the fixed single working mode temperature compensation coefficient 420 in the traditional solution.

[0053] Based on this, in an optional implementation, the target sensor may be an electromagnetic wave absorption rate SAR sensor, and the target parameter value may be a first detection value collected by a detection channel in the SAR sensor.

[0054] In this way, through the first mapping relationship, when the electronic device runs a single working mode at the first moment, the temperature compensation coefficient value corresponding to the SAR sensor can be determined, and the first detection value collected by the detection channel in the SAR sensor can be adjusted, thereby reducing the probability of false release or false triggering of the device.

[0055] Step 330 , determining the temperature compensation coefficient value corresponding to each of the N operating modes at the first moment according to the time that the electronic device has been running the N operating modes and the first corresponding mapping relationship.

[0056] Here, the temperature compensation coefficient corresponding to a single working mode can be a function that changes with time. When the time is determined to be the first moment, the first moment can be substituted into the above function to calculate the value of the temperature compensation coefficient. N temperature compensation coefficient values ​​can be determined according to the N first mapping relationships. At a certain moment, one temperature compensation coefficient value can correspond to one working mode. The temperature compensation coefficient value can be used to determine the first temperature compensation coefficient value of the electronic device at that moment.

[0057] Step 340: Determine a first temperature compensation coefficient value corresponding to the electronic device at the first moment according to the temperature compensation coefficient values ​​corresponding to the N operating modes.

[0058] Here, the electronic device may run one or more working modes at the same time, that is, at the first time. At this time, the temperature compensation coefficient value corresponding to the electronic device is a first temperature compensation coefficient value, and the first temperature compensation coefficient value may be determined according to one or more temperature compensation coefficient values ​​corresponding to the electronic device at the first time. The first temperature compensation coefficient value may be used to adjust the target parameter value of the target sensor to achieve temperature compensation for the target sensor.

[0059] Exemplarily, when the electronic device operates in only one operating mode, the temperature compensation coefficient value corresponding to the operating mode at the first moment can be directly determined as the first temperature compensation coefficient value. When the electronic device operates in multiple operating modes, multiple temperature compensation coefficient values ​​corresponding to the multiple operating modes at the first moment can be summed up to obtain the first temperature compensation coefficient value.

[0060] Based on this, in an optional implementation manner, when N≥2, step 340 may specifically include:

[0061] Obtaining weight distribution information corresponding to the first combined working mode;

[0062] According to the weight distribution information, a weighted sum is performed on the N temperature compensation coefficient values ​​to obtain a first temperature compensation coefficient value corresponding to the electronic device at the first moment.

[0063] Here, the first combined working mode may be a combined mode including N working modes, where N ≥ 2. The weight allocation information may include weight values ​​corresponding to the N working modes, respectively. The N weight values ​​may be N single working mode fitting coefficients, that is, the temperature compensation coefficient values ​​under the N single working modes, with different contributions, and the accumulation of the contributions is integrated into a fixed constant, which can characterize the maximum temperature rise coefficient weight value corresponding to the first combined working mode. The weight values ​​assigned to the same working mode in different first combined working modes may be different, or of course they may be the same.

[0064] Exemplarily, the calculation formula of the first temperature compensation coefficient value may be:

[0065] REFCOEF(T)=α×REFCOEF(t1)+β×REFCOEF(t2)+…+λ×REFCOEF(tn)

[0066] Among them, α, β, ... λ can be the weight values ​​corresponding to each of the N working modes, α+β+...+λ=K, K can be a constant, REFCOEF(t1), REFCOEF(t2), ...REFCOEF(tn) can be the temperature compensation coefficient values ​​corresponding to the N working modes at time T, and REFCOEF(T) can be the first temperature compensation coefficient value corresponding to the first combined working mode at time T. Here, time T is any time during the continuous operation of the first combined working mode.

[0067] In a specific example, if the temperature compensation coefficient value of the charging mode at the 15th second is 20, the weight value is 0.4, the temperature compensation coefficient value of the game mode at the 15th second is 15, the weight value is 0.4, and the temperature compensation coefficient value of the music mode at the 15th second is 10, the weight value is 0.2, then when the user uses the mobile phone to charge, play games, and listen to music at the same time, that is, the mobile phone is running the charging mode, game mode and music mode at the same time, the mobile phone continues to run the combined working mode for 15 seconds, and the corresponding first temperature compensation coefficient value can be 0.4×20+0.4×15+0.2×10=16.

[0068] Specifically, the process of determining the first temperature compensation coefficient value can be as follows: Figure 5 As shown, first determine each single working mode included in the first combined working mode 510 at time T and its corresponding temperature compensation coefficient value, specifically including: the temperature compensation coefficient REFCOEF(t1) corresponding to the charging mode, the temperature compensation coefficient REFCOEF(t2) corresponding to the video mode, the temperature compensation coefficient REFCOEF(t3) corresponding to the game mode, ..., the temperature compensation coefficient REFCOEF(tn) corresponding to the music mode, and then determine the weight allocation information 520 corresponding to the first combined working mode 510, thereby performing weighted summation to calculate the first temperature compensation coefficient value REFCOEF(T) of the electronic device at the first moment.

[0069] In a specific example, under the first combination working mode, the first combination working mode includes a charging mode, a game mode and a music mode, and the preset weight value corresponding to the charging mode in the first combination working mode is 0.4, the weight value corresponding to the game mode is 0.4, and the weight value corresponding to the music mode is 0.2. If the current moment is the 15th second of running the first combination working mode, according to the mapping relationship corresponding to each mode, it can be calculated that the temperature compensation coefficient value of the charging mode at the 15th second is 20, the temperature compensation coefficient value of the game mode at the 15th second is 15, and the temperature compensation coefficient value of the music mode at the 15th second is 10, then the first temperature compensation coefficient value corresponding to the mobile phone at the current moment can be 0.4×20+0.4×15+0.2×10=16.

[0070] In this way, by weighted summing the temperature compensation coefficient values ​​corresponding to the single working mode to obtain the temperature compensation coefficient value corresponding to the combined working mode, the temperature compensation coefficients of different temperature rise factors can be combined and decomposed, thereby improving the accuracy of temperature compensation.

[0071] Step 350: adjusting a target parameter value of a target sensor in the electronic device according to the first temperature compensation coefficient value to achieve temperature compensation for the target sensor.

[0072] Here, the first temperature compensation coefficient value can be determined by the above method, so that the target parameter value collected by the target sensor in the electronic device can be adjusted according to the first temperature compensation coefficient value. Among them, the target parameter value can be the detection value collected by the SAR sensor, or it can be a fitting parameter that is greatly affected by temperature rise or environmental disturbance, such as photosensitive glass parameter fitting and under-screen optical solution calibration, which is not limited here. For example, the first detection value collected by the detection channel in the SAR sensor can be adjusted according to the first temperature compensation coefficient value to achieve temperature compensation for the SAR sensor.

[0073] Therefore, since the first mapping relationship corresponding to each working mode is the mapping relationship between the temperature compensation coefficient and the time, and is the mapping relationship between the temperature compensation coefficient and the running time when the electronic device runs the working mode, the temperature compensation coefficient value in both the single working mode and the combined working mode is not constrained by the fixed temperature compensation coefficient value, and can change dynamically with the change of time. In addition, since the target sensor is affected differently by temperature changes at different times, and the embodiment of the present application can dynamically compensate for the target parameter value affected by temperature changes at different times of the target sensor in the current working mode, using the dynamically changing temperature compensation coefficient value, therefore, a more accurate temperature compensation adjustment of the target parameter can be achieved, avoiding the problem of under-compensation or over-compensation caused by temperature compensation adjustment using the fixed temperature compensation coefficient value obtained by fitting under a single scenario, thereby improving the accuracy of temperature compensation.

[0074] In addition, in an optional implementation, before step 320, the temperature compensation method may further include:

[0075] When the target working mode is running, M first detection values ​​collected by the target sensor at M moments are obtained;

[0076] According to the time values ​​corresponding to the M moments and the M first detection values, a functional relationship between the first detection value and the running time is obtained by fitting;

[0077] Deriving the function relationship to obtain a first mapping relationship corresponding to the target working mode;

[0078] Based on this, step 350 may specifically include:

[0079] According to the first temperature compensation coefficient value, a first detection value collected by the SAR sensor at the first moment is adjusted.

[0080] Here, the target working mode may be any one of the N working modes, M may be a positive integer, and M≥2. The functional relationship may be a relationship obtained by fitting the running time as the independent variable based on the real-time detection values, i.e., the first detection values, collected by the target sensor at different times when the electronic device is running the target working mode.

[0081] Exemplarily, the functional relationship is derived to obtain a specific calculation formula for the first mapping relationship, which may be:

[0082]

[0083] Wherein, t is the time that the electronic device has been running the target working mode, REFCOEF(t) is the temperature compensation coefficient value corresponding to the target working mode, and Useful (t) may be the first detection value collected by the detection channel of the target sensor at time t in the target working mode.

[0084] In this way, by obtaining multiple first detection values ​​collected by the target sensor at multiple times when the target working mode is running, a functional relationship is fitted to determine the first mapping relationship, and the temperature compensation coefficient value of the target sensor at the first moment when the target working mode is running can be calculated, which facilitates the subsequent calculation of the first temperature compensation coefficient value of the target sensor when the combined working mode is running.

[0085] In addition, for SAR sensors, in traditional solutions, if two or more sets of temperature compensation coefficient values ​​are called, since the temperature compensation coefficient values ​​will jump when switching, the target parameter value of the target sensor will be irreversibly disturbed during the coefficient switching process, resulting in problems such as false release and false alarm of proximity.

[0086] Specifically, Figure 6 As shown, switching from the temperature compensation coefficient value A corresponding to the working mode A to the temperature compensation coefficient value B corresponding to the working mode B will cause the detection value Useful (N) collected by the detection channel and compensated to jump from the first point 610 to the second point 620, resulting in a false alarm approaching; switching from the temperature compensation coefficient value B corresponding to the working mode B to the temperature compensation coefficient value C corresponding to the working mode C will cause the real-time detection value collected by the detection channel to jump from the third point 630 to the fourth point 640, resulting in an erroneous release.

[0087] In order to solve the problem of detection value jump, based on the above steps 310-350, in a possible embodiment, when the electronic device switches from N working modes to T working modes at the second moment, as follows Figure 7 As shown, the temperature compensation method may further include: steps 341-343, wherein:

[0088] Step 341, determining a second temperature compensation coefficient value corresponding to the electronic device at the second moment when N operating modes are running, and a third temperature compensation coefficient value corresponding to the electronic device at the second moment when T operating modes are running.

[0089] Here, T can be a positive integer, and the T working modes are not completely the same as the N working modes. The determination methods of the second temperature compensation coefficient value and the third temperature compensation coefficient value are the same as the determination method of the first temperature compensation coefficient value, which will not be repeated here.

[0090] Step 342, determining a correction value according to the second temperature compensation coefficient value, the third temperature compensation coefficient value and the target reference value.

[0091] Here, the target reference value may be a second detection value collected by a reference channel in the SAR sensor at a second moment. The correction value may be a corrected disturbance amount, and the disturbance correction may solve the problem of jumps in the detection value after compensation that occur during the process of switching different temperature compensation coefficients. The jumps are mainly caused by the difference in compensation before and after switching different temperature compensation coefficients.

[0092] Based on this, in an optional implementation, step 342 may specifically include:

[0093] The difference between the second temperature compensation coefficient value and the third temperature compensation coefficient value is multiplied by the target reference value to obtain a correction value.

[0094] Here, the disturbance correction can be mainly performed based on the calculated correction value, and specifically, the real-time intercept value can be supplemented after the temperature compensation coefficient value is switched, and the intercept size can be equal to the correction value.

[0095] In a specific example, the calculation formula of the correction value can be:

[0096] μ=Useful(m+)-Useful(m-)=(REFCOEF(T1)-REFCOEF(T2))×Reference(m)

[0097] Among them, μ can be a correction value, Useful(m+) can be the real-time value of the detection channel before m time slots, Useful(m-) can be the real-time value of the detection channel after m time slots, REFCOEF(T1) can be the temperature compensation coefficient value before switching, REFCOEF(T2) can be the temperature compensation coefficient value after switching, and Reference(m) can be the real-time value of the reference channel at time m.

[0098] In this way, through the above calculation method, a correction value can be calculated, which is convenient for correcting the jump of the detection value during the mode switching process, thereby avoiding the problem of false triggering or false release.

[0099] Step 343: adjust the first detection value collected by the SAR sensor at the second moment according to the third temperature compensation coefficient value and the correction value.

[0100] Here, a correction value may be added to a target detection value obtained by compensating the first detection value collected in real time by the detection channel based on the third temperature compensation coefficient value to obtain a final corrected detection value.

[0101] In a specific example, the specific disturbance correction effect can be as follows: Figure 8As shown, after the operating mode of operation changes, a temperature-compensated detection data curve 810 can be obtained. At this time, a correction value 820 can be added to the detection data curve 810 to obtain a corrected data curve 830, so as to avoid the problem of false alarm approaching caused by the detection value jump; if the operating mode of operation changes further, a temperature-compensated detection data curve 840 can be obtained. At this time, a correction value 850 can be added to the detection data curve 840 to obtain a corrected data curve 860, so as to avoid the problem of false release caused by the detection value jump.

[0102] In this way, by calculating the detection value after compensation of the first detection value, the jump value before and after the mode switching, that is, the correction value, and using the correction value to correct the detection value after temperature compensation of the first detection value, the disturbance of the detection value caused by the dynamic switching of the temperature compensation coefficient can be effectively avoided, and the problem of false release and false alarm can be solved.

[0103] In order to better describe the entire solution, based on the above embodiments, a temperature compensation method of a SAR sensor is taken as an example to give a specific example. Fig. 9 As shown, the temperature compensation method may include steps 901-911, which are explained in detail below.

[0104] Step 901, initializing system configuration.

[0105] Step 902, calling the system default temperature compensation coefficient value.

[0106] Here, temperature compensation refers to temperature compensation. For operating modes that are not preset or recognized by the system, the system default temperature compensation coefficient value is used for temperature compensation.

[0107] Step 903: Whether it is recognized as a special single working mode.

[0108] Here, the working mode of the electronic device is identified. If it is identified as a single working mode set by the system, step 908 is executed. If it is identified as not a single working mode set by the system, step 904 is executed.

[0109] Step 904: whether it is identified as a combined working mode.

[0110] Here, if the combined working mode set by the system is identified, step 905 is executed; if the combined working mode set by the system is not identified, step 902 is executed.

[0111] Step 905, obtaining the temperature compensation coefficient value of a single working mode.

[0112] Here, the combined working mode can be analyzed to obtain multiple single working modes, and then the temperature compensation coefficient corresponding to each single working mode can be extracted. The calculation method of the temperature compensation coefficient corresponding to the single working mode will not be repeated here.

[0113] Step 906, weight configuration.

[0114] Here, the weight distribution information corresponding to the combined working mode may be obtained, and the weight values ​​may be configured for the temperature compensation coefficients corresponding to the respective single working modes based on the weight distribution information.

[0115] Step 907, calculating the temperature compensation coefficient value of the combined working mode.

[0116] Here, a weighted sum calculation may be performed based on the temperature compensation coefficients corresponding to each single working mode and their corresponding weight values ​​to obtain the temperature compensation coefficient value of the combined working mode, and then step 909 is executed.

[0117] Step 908, calling the temperature compensation coefficient value of the single working mode.

[0118] Here, it is identified that the working mode of the electronic device is a single working mode, and the temperature compensation coefficient value of the single working mode is called. The specific calculation method of the temperature compensation coefficient value of the single working mode is not repeated here.

[0119] Step 909, calculating the correction value.

[0120] Here, in order to avoid the detection value jump when switching the working mode, which may cause false alarm of approach or false release, interference correction can be performed by adding a correction value based on the detection value. The specific calculation method of the correction value will not be repeated here.

[0121] Step 910, writing the temperature compensation coefficient value and the correction value.

[0122] Here, writing the temperature compensation coefficient value and the correction value into the processor can more accurately output the continuous compensated and corrected detection values.

[0123] Step 911, whether to end.

[0124] Here, it is determined whether the end condition is met, and the end condition may be shutdown or exiting the current working mode, or other conditions, which are not limited here. If the end condition is met, the process ends, and if not, step 903 is executed.

[0125] Therefore, since the first mapping relationship corresponding to each working mode is the mapping relationship between the temperature compensation coefficient and the running time, the temperature compensation coefficient value in both the single working mode and the combined working mode is not constrained by the fixed temperature compensation coefficient value and can change dynamically with the change of time. In addition, since the target sensor is affected differently by temperature changes at different times, the embodiment of the present application can dynamically compensate for the target parameter values ​​affected by temperature changes at different times of the target sensor in the current working mode using the dynamically changing temperature compensation coefficient value. Therefore, a more accurate temperature compensation adjustment of the target parameter can be achieved, avoiding the problem of under-compensation or over-compensation caused by temperature compensation adjustment using the fixed temperature compensation coefficient value obtained by fitting under a single scenario, thereby improving the accuracy of temperature compensation.

[0126] Based on the above temperature compensation method, in a possible embodiment, there is a temperature compensation software system, such as Fig.10 As shown, the temperature compensation software system may include: a combined working mode identification module 1010, a single working mode temperature compensation coefficient value extraction module 1020, a weight allocation module 1030, a combined working mode temperature compensation coefficient value calculation module 1040, a correction value calculation module 1050 and a temperature compensation coefficient value and correction value compensation 1060.

[0127] The combined working mode identification module 1010 may be used to identify and analyze the combined working mode and determine a single working mode included in the combined working mode;

[0128] A single working mode temperature compensation coefficient value refining module 1020 can be used to refine the temperature compensation coefficient value corresponding to each single working mode;

[0129] The weight allocation module 1030 may be used to allocate a corresponding weight value to the temperature compensation coefficient value corresponding to each single working mode;

[0130] The combined working mode temperature compensation coefficient value calculation module 1040 can be used to calculate the combined working mode temperature compensation coefficient value according to the temperature compensation coefficient value corresponding to each single working mode and its corresponding weight value. The specific calculation method will not be repeated here.

[0131] The correction value calculation module 1050 can be used to calculate the correction value according to the temperature compensation coefficient value and the target reference value before and after the switching working mode. The specific calculation method will not be repeated here;

[0132] The temperature compensation coefficient value and the correction value compensation 1060 can be used to input the temperature compensation coefficient value and the correction value into the processor to make the detection value output by the system more accurate and continuous.

[0133] Therefore, since the first mapping relationship corresponding to each working mode is the mapping relationship between the temperature compensation coefficient and the running time, the temperature compensation coefficient value in both the single working mode and the combined working mode is not constrained by the fixed temperature compensation coefficient value and can change dynamically with the change of time. In addition, since the target sensor is affected differently by temperature changes at different times, the embodiment of the present application can dynamically compensate for the target parameter values ​​affected by temperature changes at different times of the target sensor in the current working mode using the dynamically changing temperature compensation coefficient value. Therefore, a more accurate temperature compensation adjustment of the target parameter can be achieved, avoiding the problem of under-compensation or over-compensation caused by temperature compensation adjustment using the fixed temperature compensation coefficient value obtained by fitting under a single scenario, thereby improving the accuracy of temperature compensation.

[0134] Based on the same inventive concept, the present application also provides a temperature compensation device. Fig.11 The temperature compensation device provided in the embodiment of the present application is described in detail.

[0135] Fig.11 is a structural block diagram of a temperature compensation device according to an exemplary embodiment.

[0136] like Fig.11 As shown, the temperature compensation device 1100 may include:

[0137] The first determining module 1101 is used to determine N operating modes of the electronic device at a first moment; wherein N is a positive integer;

[0138] The first acquisition module 1102 is used to acquire a first mapping relationship corresponding to each of the N working modes; wherein the first mapping relationship is a mapping relationship between a temperature compensation coefficient and an elapsed operating time when the electronic device operates in the working mode;

[0139] The second determination module 1103 is used to determine the temperature compensation coefficient value corresponding to each of the N operating modes at a first moment according to the time when the electronic device has run the N operating modes and the first corresponding mapping relationship;

[0140] A third determining module 1104 is used to determine a first temperature compensation coefficient value corresponding to the electronic device at the first moment according to the temperature compensation coefficient values ​​corresponding to the N operating modes;

[0141] The adjustment module 1105 is used to adjust the target parameter value of the target sensor in the electronic device according to the first temperature compensation coefficient value to achieve temperature compensation for the target sensor.

[0142] The temperature compensation device 1100 is described in detail below, as shown below:

[0143] In one of the embodiments, the target sensor is an electromagnetic wave absorption rate SAR sensor, and the target parameter value is a first detection value collected by a detection channel in the SAR sensor.

[0144] In one embodiment, the temperature compensation device 1100 may further include:

[0145] The second acquisition module 1106 is used to acquire, before acquiring the first mapping relationship corresponding to each of the N working modes, M first detection values ​​collected by the target sensor at M moments when the target working mode is running; wherein the target working mode is any one of the N working modes, M is a positive integer, and M≥2;

[0146] A fourth determining module 1107, configured to obtain a functional relationship between the first detection value and the running time by fitting according to the time values ​​corresponding to the M moments and the M first detection values;

[0147] A fifth determining module 1108 is used to derive the functional relationship to obtain a first mapping relationship corresponding to the target working mode;

[0148] Based on this, the adjustment module 1105 may specifically include:

[0149] The first adjustment submodule is used to adjust a first detection value collected by the SAR sensor at a first moment according to a first temperature compensation coefficient value.

[0150] In one embodiment, when the electronic device switches from N operating modes to T operating modes at the second moment, the temperature compensation device 1100 may further include:

[0151] The sixth determining module 1109 is used to determine a second temperature compensation coefficient value corresponding to the electronic device at the second moment when N operating modes are running, and a third temperature compensation coefficient value corresponding to the electronic device at the second moment when T operating modes are running; wherein T is a positive integer, and the T operating modes are at least not completely the same as the N operating modes;

[0152] A seventh determination module 1110 is configured to determine a correction value according to the second temperature compensation coefficient value, the third temperature compensation coefficient value and a target reference value; wherein the target reference value is a second detection value collected by a reference channel in the SAR sensor at a second moment;

[0153] The second adjustment submodule is used to adjust the first detection value collected by the SAR sensor at the second moment according to the third temperature compensation coefficient value and the correction value.

[0154] In one embodiment, the seventh determining module 1110 may include:

[0155] The first calculation submodule is used to multiply the difference between the second temperature compensation coefficient value and the third temperature compensation coefficient value by the target reference value to obtain a correction value.

[0156] In one embodiment, when N≥2, the third determining module 1104 may specifically include:

[0157] An acquisition submodule, used to acquire weight allocation information corresponding to the first combined working mode; wherein the first combined working mode is a combination mode including N working modes, and the weight allocation information includes weight values ​​corresponding to the N working modes respectively;

[0158] The second calculation submodule is used to perform weighted summation on the N temperature compensation coefficient values ​​according to the weight allocation information to obtain a first temperature compensation coefficient value corresponding to the electronic device at the first moment.

[0159] Therefore, since the first mapping relationship corresponding to each working mode is the mapping relationship between the temperature compensation coefficient and the running time, the temperature compensation coefficient value in both the single working mode and the combined working mode is not constrained by the fixed temperature compensation coefficient value and can change dynamically with the change of time. In addition, since the target sensor is affected differently by temperature changes at different times, the embodiment of the present application can dynamically compensate for the target parameter values ​​affected by temperature changes at different times of the target sensor in the current working mode using the dynamically changing temperature compensation coefficient value. Therefore, a more accurate temperature compensation adjustment of the target parameter can be achieved, avoiding the problem of under-compensation or over-compensation caused by temperature compensation adjustment using the fixed temperature compensation coefficient value obtained by fitting under a single scenario, thereby improving the accuracy of temperature compensation.

[0160] The temperature compensation device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0161] The temperature compensation device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0162] The temperature compensation device provided in the embodiment of the present application can achieve Figures 1 to 10 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0163] Alternatively, if Fig.12 As shown, an embodiment of the present application also provides an electronic device 1200, including a processor 1201, a memory 1202, and a program or instruction stored in the memory 1202 and executable on the processor 1201. When the program or instruction is executed by the processor 1201, each process of the above-mentioned temperature compensation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0164] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0165] Fig.13 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0166] The electronic device 1300 includes but is not limited to: a radio frequency unit 1301, a network module 1302, an audio output unit 1303, an input unit 1304, a sensor 1305, a display unit 1306, a user input unit 1307, an interface unit 1308, a memory 1309, and a processor 1310 and other components.

[0167] Those skilled in the art will appreciate that the electronic device 1300 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1310 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.13 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0168] The processor 1310 is used to determine N operating modes of the electronic device at a first moment; wherein N is a positive integer;

[0169] The input unit 1304 is used to obtain a first mapping relationship corresponding to each of the N working modes; wherein the first mapping relationship is a mapping relationship between a temperature compensation coefficient and an elapsed operating time when the electronic device operates in the working mode;

[0170] The processor 1310 is further configured to determine, according to the time that the electronic device has been running the N operating modes and the first corresponding mapping relationships, a temperature compensation coefficient value corresponding to each of the N operating modes at a first moment;

[0171] Determine a first temperature compensation coefficient value corresponding to the electronic device at a first moment according to the temperature compensation coefficient values ​​corresponding to each of the N operating modes;

[0172] The target parameter value of the target sensor in the electronic device is adjusted according to the first temperature compensation coefficient value to achieve temperature compensation for the target sensor.

[0173] Therefore, since the first mapping relationship corresponding to each working mode is the mapping relationship between the temperature compensation coefficient and the running time, the temperature compensation coefficient value in both the single working mode and the combined working mode is not constrained by the fixed temperature compensation coefficient value and can change dynamically with the change of time. In addition, since the target sensor is affected differently by temperature changes at different times, the embodiment of the present application can dynamically compensate for the target parameter values ​​affected by temperature changes at different times of the target sensor in the current working mode using the dynamically changing temperature compensation coefficient value. Therefore, a more accurate temperature compensation adjustment of the target parameter can be achieved, avoiding the problem of under-compensation or over-compensation caused by temperature compensation adjustment using the fixed temperature compensation coefficient value obtained by fitting under a single scenario, thereby improving the accuracy of temperature compensation.

[0174] Optionally, the input unit 1304 is further used to obtain M first detection values ​​collected by the target sensor at M moments when the target working mode is running; wherein the target working mode is any one of the N working modes, M is a positive integer, and M≥2;

[0175] The processor 1310 is further configured to obtain, according to the time values ​​corresponding to the M moments and the M first detection values, a functional relationship between the first detection value and the elapsed time by fitting;

[0176] Deriving the function relationship to obtain a first mapping relationship corresponding to the target working mode;

[0177] According to the first temperature compensation coefficient value, a first detection value collected by the SAR sensor at the first moment is adjusted.

[0178] Optionally, the processor 1310 is further configured to determine, when the electronic device switches from N operating modes to T operating modes at the second moment, a second temperature compensation coefficient value corresponding to the electronic device at the second moment when the N operating modes are running, and a third temperature compensation coefficient value corresponding to the electronic device at the second moment when the T operating modes are running; wherein T is a positive integer, and the T operating modes are not completely the same as the N operating modes;

[0179] Determine a correction value according to the second temperature compensation coefficient value, the third temperature compensation coefficient value and the target reference value; wherein the target reference value is a second detection value collected by a reference channel in the SAR sensor at the second moment;

[0180] The first detection value collected by the SAR sensor at the second moment is adjusted according to the third temperature compensation coefficient value and the correction value.

[0181] Optionally, the processor 1310 is specifically configured to multiply the difference between the second temperature compensation coefficient value and the third temperature compensation coefficient value by a target reference value to obtain a correction value.

[0182] Optionally, the input unit 1304 is specifically used to obtain weight allocation information corresponding to the first combined working mode when N≥2; wherein the first combined working mode is a combined mode including N working modes, and the weight allocation information includes weight values ​​corresponding to the N working modes respectively;

[0183] The processor 1310 is specifically configured to perform weighted summation on N temperature compensation coefficient values ​​according to the weight allocation information to obtain a first temperature compensation coefficient value corresponding to the electronic device at the first moment.

[0184] In this way, the temperature compensation coefficient value and correction value in the dynamic working mode can be determined without being constrained by a single temperature compensation coefficient value. The temperature compensation coefficient value can be dynamically adjusted and the disturbance can be corrected according to the switching of the working mode, avoiding the under-compensation or over-compensation problem caused by a single temperature compensation coefficient value, making the working range of the target sensor more flexible.

[0185] It should be understood that in the embodiment of the present application, the input unit 1304 may include a graphics processor (Graphics Processing Unit, GPU) 13041 and a microphone 13042, and the graphics processor 13041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1306 may include a display panel 13061, and the display panel 13061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1307 includes a touch panel 13071 and other input devices 13072. The touch panel 13071 is also called a touch screen. The touch panel 13071 may include two parts: a touch detection device and a touch controller. Other input devices 13072 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 1309 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 1310 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 1310.

[0186] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned temperature compensation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0187] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0188] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned temperature compensation method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0189] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0190] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0191] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0192] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A temperature compensation method, characterized in that: include: Determine N operating modes of the electronic device at a first moment; wherein N is a positive integer; Acquire a first mapping relationship corresponding to each of the N operating modes; wherein the first mapping relationship is a mapping relationship between a temperature compensation coefficient and an elapsed operating time when the electronic device operates in the operating mode; Determine, according to the time that the electronic device has been running the N operating modes and the first corresponding mapping relationships, the temperature compensation coefficient value corresponding to each of the N operating modes at the first moment; Determining a first temperature compensation coefficient value corresponding to the electronic device at the first moment according to the temperature compensation coefficient values ​​corresponding to the N operating modes respectively; Adjusting a target parameter value of a target sensor in the electronic device according to the first temperature compensation coefficient value to achieve temperature compensation for the target sensor; The target sensor is an electromagnetic wave absorption rate SAR sensor, and the target parameter value is a first detection value collected by a detection channel in the SAR sensor; Before acquiring the first mapping relationship corresponding to each of the N working modes, the method further includes: When the target working mode is running, M first detection values ​​collected by the target sensor at M moments are obtained; wherein the target working mode is any one of the N working modes, M is a positive integer, and M≥2; According to the time values ​​corresponding to the M moments and the M first detection values, fitting a functional relationship between the first detection value and the running time; Deriving the functional relationship to obtain a first mapping relationship corresponding to the target working mode; The step of adjusting a target parameter value of a target sensor in the electronic device according to the first temperature compensation coefficient value includes: According to the first temperature compensation coefficient value, a first detection value collected by the SAR sensor at the first moment is adjusted.

2. The method according to claim 1, characterized in that In the case where the electronic device switches from the N operating modes to T operating modes at the second moment, the method further includes: Determine a second temperature compensation coefficient value corresponding to the electronic device at the second moment when the N operating modes are running, and a third temperature compensation coefficient value corresponding to the electronic device at the second moment when the T operating modes are running; wherein T is a positive integer, and the T operating modes are not completely the same as the N operating modes; Determine a correction value according to the second temperature compensation coefficient value, the third temperature compensation coefficient value and a target reference value; wherein the target reference value is a second detection value collected by a reference channel in the SAR sensor at the second moment; The first detection value collected by the SAR sensor at the second moment is adjusted according to the third temperature compensation coefficient value and the correction value.

3. The method according to claim 2, characterized in that The determining of the correction value according to the second temperature compensation coefficient value, the third temperature compensation coefficient value and the target reference value includes: The difference between the second temperature compensation coefficient value and the third temperature compensation coefficient value is multiplied by the target reference value to obtain the correction value.

4. The method according to claim 1, characterized in that In the case where N≥2, determining, according to the temperature compensation coefficient values ​​corresponding to the N operating modes, a first temperature compensation coefficient value corresponding to the electronic device at the first moment includes: Acquire weight allocation information corresponding to a first combined working mode; wherein the first combined working mode is a combined mode including the N working modes, and the weight allocation information includes weight values ​​corresponding to the N working modes respectively; According to the weight allocation information, weighted summation is performed on the temperature compensation coefficient values ​​corresponding to the N operating modes to obtain a first temperature compensation coefficient value corresponding to the electronic device at the first moment.

5. A temperature compensation device, characterized in that: include: A first determining module, used to determine N operating modes of the electronic device at a first moment; wherein N is a positive integer; A first acquisition module is used to acquire a first mapping relationship corresponding to each of the N operating modes; wherein the first mapping relationship is a mapping relationship between a temperature compensation coefficient and an elapsed operating time when the electronic device operates in the operating mode; A second determination module, configured to determine, according to the time that the electronic device has been running the N operating modes and the first corresponding mapping relationships, a temperature compensation coefficient value corresponding to each of the N operating modes at the first moment; A third determining module, configured to determine a first temperature compensation coefficient value corresponding to the electronic device at the first moment according to the temperature compensation coefficient values ​​corresponding to the N operating modes respectively; an adjustment module, configured to adjust a target parameter value of a target sensor in the electronic device according to the first temperature compensation coefficient value, so as to achieve temperature compensation for the target sensor; The target sensor is an electromagnetic wave absorption rate SAR sensor, and the target parameter value is a first detection value collected by a detection channel in the SAR sensor; The temperature compensation device also includes: A second acquisition module is used to acquire, before acquiring the first mapping relationships corresponding to the N working modes respectively, M first detection values ​​collected by the target sensor at M moments when the target working mode is running; wherein the target working mode is any one of the N working modes, M is a positive integer, and M≥2; a fourth determination module, configured to obtain, by fitting, a functional relationship between the first detection value and the elapsed time according to the time values ​​corresponding to the M moments and the M first detection values; a fifth determining module, configured to derive the functional relationship to obtain a first mapping relationship corresponding to the target operating mode; The adjustment module specifically includes: The first adjustment submodule is used to adjust the first detection value collected by the SAR sensor at the first moment according to the first temperature compensation coefficient value.

6. An electronic device, characterized in that: The method comprises a processor, a memory and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the temperature compensation method according to any one of claims 1 to 4.

7. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the temperature compensation method according to any one of claims 1 to 4 are implemented.