Charging method, charging device, electronic equipment and readable storage medium

By using the first fast charging chip in the electronic device and adjusting the switching frequency according to the input current, the problem of low charging efficiency in the prior art is solved, and a more efficient charging effect is achieved.

CN119030067APending Publication Date: 2024-11-26HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410681987.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-26
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

In the prior art, the charging efficiency of electronic devices is low, and how to improve charging efficiency is an urgent problem.

Method used

By using the first fast charging chip in the electronic device, the input current is determined, and the switching frequency of the switching circuit is adjusted according to different current intervals to match the input current, thereby improving charging efficiency. The method includes setting the default switching frequency when the fast charging chip enters the fast charging mode, and switching to the corresponding switching frequency when the input current is greater than or less than a certain threshold, and charging at the frequency with the highest charging efficiency.

Benefits of technology

It is realized that the switching frequency is adjusted according to different current intervals, thereby improving the charging efficiency, and the charging speed is more effectively improved compared with the solution of the fixed switching frequency in the prior art.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119030067A_ABST
    Figure CN119030067A_ABST
Patent Text Reader

Abstract

The invention discloses a charging method, a charging device, electronic equipment and a readable storage medium, the charging method is applied to the electronic equipment comprising a first fast charging chip and a battery, and the method comprises the following steps: determining an input current of the first fast charging chip; determining whether the switching frequency of the switching circuit of the first fast charging chip is matched with the input current; modifying a value of the switching frequency to a value matching the input current when the switching frequency does not match the input current; the switching circuit is controlled to charge the battery at a switching frequency that matches the input current. When charging is carried out, the switching frequencies of the switching circuits in different current intervals are different, and compared with the technical scheme that the switching frequencies are fixed in the prior art, the technical scheme provided by the invention is beneficial to improving the charging efficiency according to the characteristic that the switching frequencies with the highest charging efficiency in different current intervals are different.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is based on a divisional application with application number 202310612690.5, application date May 26, 2023, and invention name “Charging method, charging device, electronic device and readable storage medium”. The entire contents of the original application are incorporated into this application by reference. Technical Field

[0002] The present application relates to the technical field of battery charging, and in particular to a charging method, a charging device, an electronic device and a readable storage medium. Background Art

[0003] With the popularization of electronic devices such as mobile phones and tablets, more and more applications are being used on electronic devices, power consumption is getting faster and faster, and the demand for fast charging is becoming more and more widespread.

[0004] In the related art, the charging efficiency of electronic devices is low, and how to improve the charging efficiency is a technical solution that needs to be solved urgently. Summary of the invention

[0005] The present application provides a charging method, a charging device, an electronic device and a readable storage medium, which are conducive to improving charging efficiency.

[0006] In a first aspect, the present application provides a charging method, which is applied to an electronic device including a first fast charging chip and a battery, and the method includes:

[0007] Determine the input current of the first fast charging chip; wherein the fast charging chip is a chip that can quickly charge the battery in the electronic device;

[0008] Determine whether the switching frequency of the switching circuit of the first fast charging chip matches the input current;

[0009] When the switching frequency of the switching circuit of the first fast charging chip does not match the input current, modifying the value of the switching frequency to a value matching the input current;

[0010] The switching circuit is controlled to charge the battery at a switching frequency matching the input current.

[0011] When charging, the switching frequencies of the switching circuits in different current intervals are different. Compared with the technical solutions in the prior art in which the switching frequencies are fixed, the technical solutions provided by the present application are conducive to improving the charging efficiency according to the different characteristics of the switching frequencies with the highest charging efficiency in different current intervals.

[0012] As an example of the present application, when the switching frequency of the switching circuit of the first fast charging chip matches the input current, the value of the switching frequency is not changed;

[0013] As an example of the present application, determining whether the switching frequency of the switching circuit of the first fast charging chip matches the input current includes:

[0014] Determine whether the input current is within the current range that matches the switching frequency; if so, determine that the switching frequency of the switching circuit of the fast charging chip matches the input current; if not, determine that the switching frequency of the switching circuit of the fast charging chip does not match the input current; the frequency with the highest charging efficiency in any current range is the switching frequency that matches the arbitrary current range.

[0015] As an example of the present application, before determining the input current of the first fast charging chip, the method further includes:

[0016] When the first fast charging chip enters the fast charging mode, the switching frequency of the switching circuit is set to a default switching frequency; the default switching frequency is a switching frequency that matches the current interval including the minimum current value.

[0017] In some embodiments, the detection module can detect whether the fast charging mode is entered. For example, if the charging interface is detected to be connected to a matching wired or wireless charging module, the fast charging chip is determined to enter the fast charging mode. It is understandable that other methods can also be used to determine whether to enter the fast charging mode, which is not limited here.

[0018] As an example of the present application, the electronic device further includes a second fast charging chip, and the method further includes:

[0019] When the input current of the first fast charging chip is greater than a preset current threshold;

[0020] Starting the second fast charging chip, and setting the switching frequency of the switching circuit of the second fast charging chip to a value matching the input current of the second fast charging chip;

[0021] When the input current of the first fast charging chip is less than the preset current threshold, the second fast charging chip is turned off.

[0022] As an example of the present application, determining the input current of the first fast charging chip includes:

[0023] The input current of the first fast charging chip is determined by a current sampling circuit.

[0024] As an example of the present application, the electronic device includes a sampling resistor connected to the input end of the first fast charging chip, and the first fast charging chip includes: an amplifier, a comparator, a register, and a switching circuit; the determining whether the switching frequency of the switching circuit of the first fast charging chip matches the input current includes:

[0025] Obtain the sampling voltage across the sampling resistor;

[0026] amplifying the sampled voltage by the amplifier, and comparing the amplified sampled voltage with a voltage value preset by the comparator;

[0027] According to the comparison result, the switching circuit is triggered to switch the switching frequency of the first fast charging chip to the switching frequency stored in the register that matches the input current.

[0028] In a second aspect, the present application provides a charging device, which is applied to an electronic device including a first fast charging chip and a battery, and the charging device includes:

[0029] A first determining unit, used to determine the input current of the first fast charging chip;

[0030] A second determination unit, used to determine whether the switching frequency of the switching circuit of the first fast charging chip matches the input current;

[0031] a processing unit, configured to modify the value of the switching frequency to a value matching the input current when the switching frequency of the switching circuit of the first fast charging chip does not match the input current;

[0032] A charging unit is used to control the switch circuit to charge the battery at a switching frequency matching the input current.

[0033] As an example of the present application, the processing unit is also used to not change the value of the switching frequency when the switching frequency of the switching circuit of the first fast charging chip matches the input current.

[0034] As an example of the present application, the second determination unit is specifically used to determine whether the input current is within the current range matching the switching frequency; if so, it is determined that the switching frequency of the switching circuit of the fast charging chip matches the input current; if not, it is determined that the switching frequency of the switching circuit of the fast charging chip does not match the input current; the frequency with the highest charging efficiency in any current range is the switching frequency matching the arbitrary current range.

[0035] As an example of the present application, the processing unit is also used to set the switching frequency of the switching circuit to a default switching frequency when the first fast charging chip enters the fast charging mode; the default switching frequency is a switching frequency that matches the current interval including the minimum current value.

[0036] As an example of the present application, a second fast charging chip is also included;

[0037] The processing unit is also used to, when the input current of the first fast charging chip is greater than a preset current threshold, trigger the start of the second fast charging chip and set the switching frequency of the switching circuit of the second fast charging chip to a value matching the input current of the second fast charging chip;

[0038] When the input current of the first fast charging chip is less than the preset current threshold, the second fast charging chip is turned off.

[0039] As an example of the present application, the first determination unit is used to determine the input current of the first fast charging chip through a current sampling circuit.

[0040] As an example of the present application, the electronic device includes a sampling resistor connected to the input end of the first fast charging chip, and the first fast charging chip includes the second determination unit and the processing unit.

[0041] As an example of the present application, the electronic device includes a sampling resistor connected to the input end of the first fast charging chip, and the second determination unit and the processing unit are located outside the first fast charging chip.

[0042] In a third aspect, the present application provides an electronic device comprising: a memory and one or more processors, wherein the memory is coupled to the processor; wherein computer program code is stored in the memory, and the computer program code comprises computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the charging method as described in the first aspect or any possible implementation of the first aspect.

[0043] In a fourth aspect, the present application provides a computer-readable storage medium comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the charging method as described in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 is a flow chart of a charging method in an embodiment of the present application;

[0045] Figure 2A is a schematic diagram of input current-charging efficiency characteristics in one embodiment of the present application;

[0046] Figure 2B is a flow chart of a charging method in an embodiment of the present application;

[0047] Figure 2C is a schematic diagram of the structure of an electronic device in one embodiment of the present application;

[0048] Figure 3Ais a schematic diagram of the structure of an electronic device in one embodiment of the present application;

[0049] Figure 3B yes Figure 3A The logic diagram between the comparator and the switch;

[0050] Figure 4A is a schematic diagram of the structure of an electronic device in one embodiment of the present application;

[0051] Figure 4B is a flow chart of a charging method in an embodiment of the present application;

[0052] Figure 5 is a schematic diagram of the structure of an electronic device in one embodiment of the present application;

[0053] Fig. 6A is a schematic diagram of the structure of an electronic device in one embodiment of the present application;

[0054] Figure 6B is a flow chart of a charging method in an embodiment of the present application;

[0055] Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0056] Figure 8 It is a block diagram of a software system of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0057] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0058] It should be understood that the "multiple" mentioned in this application refers to two or more. In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of this application, the words "first" and "second" are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not limit them to be different.

[0059] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0060] The fast charging function is increasingly used in electronic devices such as mobile phones, smart watches, and wearable devices. For the convenience of description, in the subsequent embodiments, the electronic devices are described using mobile phones as an example. It can be understood that the technical solutions in the embodiments are not limited to mobile phones, but can also be used for other electronic devices with fast charging functions.

[0061] In the prior art, when a mobile phone is fast charged, the switching frequency of the switching circuit of the fast charging chip is fixed and the charging efficiency is low.

[0062] like Figure 2A The figure shows a schematic diagram of the input current-charging efficiency characteristic curve corresponding to the switching circuit of a fast charging chip at different switching frequencies. Among them, the switching frequency of the switching circuit of the fast charging chip corresponding to curve a1 is 600KHz, the switching frequency of the switching circuit of the fast charging chip corresponding to curve a2 is 950KHz, and the switching frequency of the switching circuit of the fast charging chip corresponding to curve a3 is 1.2MHz. Figure 2A The parameter corresponding to the horizontal axis is the input current of the fast charging chip, and the parameter corresponding to the vertical axis is the charging efficiency. Figure 2A It can be seen that the three curves have an intersection point, corresponding to a current of 2.3 A. On the left side of the intersection point, curve a1 corresponds to the highest charging efficiency, and on the right side of the intersection point, curve a3 corresponds to the highest charging efficiency. For ease of understanding, the subsequent embodiments of this application are described using the parameters of the fast charging chip as an example.

[0063] In the prior art, the fast charging chip usually uses a fixed switching frequency during the fast charging process, such as the switching frequency corresponding to a2, which is determined by Figure 2AIt can be seen that in the two current intervals distinguished by the intersection, the charging efficiency corresponding to a2 is not the highest. According to the characteristics of different switching frequencies corresponding to the highest charging efficiency in different current intervals, the present application can obtain multiple current intervals according to the intersection of the input current-charging efficiency characteristic curve of the fast charging chip, and the switching frequency matched by each current interval is the switching frequency corresponding to the characteristic curve with the highest charging efficiency in the current interval. Adopting this charging method is conducive to improving the charging efficiency of electronic equipment. It can be understood that in some embodiments, there may be more than one intersection, for example, there may be two intersections. When there are two intersections, there are 3 current intervals. Similarly, when there are three intersections, there are 4 current intervals. When there are multiple intersections, the method used is similar. The current interval is determined according to the intersection, and the switching frequency matched by each current interval is the switching frequency corresponding to the characteristic curve with the highest charging efficiency in the current interval.

[0064] Figure 1 : is a flow chart of a charging method in an embodiment of the present application. Figure 1 As shown, the charging method in this embodiment is applied to an electronic device including a first fast charging chip and a battery, and the charging method includes: steps 101 to 104. Among them,

[0065] 101. Determine the input current of the first fast charging chip.

[0066] The input current of the first fast charging chip can be determined by using a current sampling circuit, such as a sampling resistor. Figure 2C The input current of the fast charging chip can be obtained by using the voltage across the current sampling resistor 1 and the resistance value of the current sampling resistor 1.

[0067] It can be understood that, since there is a fixed transformation relationship between the parameters, it is equivalent to determine the input current in some embodiments and perform subsequent operations by sampling and determining the voltage across the resistor in some embodiments.

[0068] 102. Determine whether the switching frequency of the switching circuit of the first fast charging chip matches the input current.

[0069] It should be noted that before determining the input current of the first fast charging chip, it also includes: when the first fast charging chip enters the fast charging mode, setting the switching frequency of the switching circuit to a default switching frequency; the default switching frequency is a switching frequency that matches the current interval including the minimum current value. Figure 2A As shown, the default switching frequency is the switching frequency corresponding to curve a1.

[0070] In some possible implementations, determining whether the switching frequency of the switching circuit of the first fast charging chip matches the input current includes: determining whether the input current is within a current interval in which the switching frequency matches; if so, determining that the switching frequency of the switching circuit of the fast charging chip matches the input current; if not, determining that the switching frequency of the switching circuit of the fast charging chip does not match the input current; the frequency with the highest charging efficiency in any current interval is the switching frequency that matches any current interval.

[0071] 103. If the switching frequency of the switching circuit of the first fast charging chip does not match the input current, the value of the switching frequency is modified to a value that matches the input current.

[0072] 104. Control the switch circuit to charge the battery at a switching frequency that matches the input current.

[0073] When charging is performed using this implementation, the switching frequencies of the switching circuits in different current ranges are different. Compared with the technical solution in the prior art in which the switching frequency is fixed, the technical solution provided by the present application is beneficial for improving the charging efficiency according to the different characteristics of the switching frequencies with the highest charging efficiency in different current ranges.

[0074] In some possible implementations, if the switching frequency of the switching circuit of the first fast charging chip matches the input current, the value of the switching frequency does not change.

[0075] In some possible implementations, when the input current of the first fast charging chip is greater than a preset current threshold, the second fast charging chip can be started, and the switching frequency of the switching circuit of the second fast charging chip is set to a value that matches the input current of the second fast charging chip; when the first fast charging chip is the same as the second fast charging chip, the switching frequency of the switching circuit of the second fast charging chip can be set to be consistent with the switching frequency of the switching circuit of the first fast charging chip; when the input current of the first fast charging chip is less than a preset current threshold, the second fast charging chip is turned off.

[0076] In one embodiment, FIG. 2A to FIG. 2C As shown, Figure 2A It is the input current-charging efficiency characteristic curve of the fast charging chip. Curve a1 corresponds to the switching frequency of the switching circuit of the fast charging chip is 600KHz, curve a2 corresponds to the switching frequency of the switching circuit of the fast charging chip is 950KHz, and curve a3 corresponds to the switching frequency of the switching circuit of the fast charging chip is 1.2MHz.

[0077] according to Figure 2AFrom the curves in , we can see that the current corresponding to the intersection of the three characteristic curves is 2.3A. The current 2.3A divides the current into two intervals, one is the interval with a current value less than 2.3A, and the other is the interval with a current value greater than 2.3A. The switching frequency that matches the current interval less than 2.3A is the switching frequency 600KHz corresponding to curve a1, and the switching frequency that matches the current interval greater than 2.3A is the switching frequency 1.2MHz corresponding to curve a3.

[0078] like Figure 2B As shown, when charging is performed, the process specifically includes steps 201 to 204, wherein:

[0079] 201. Enter fast charging state.

[0080] In some embodiments, the detection module can detect whether the fast charging mode is entered. For example, if the charging interface is detected to be connected to a matching wired or wireless charging module, the fast charging chip is determined to enter the fast charging mode. It is understandable that other methods can also be used to determine whether to enter the fast charging mode, which is not limited here.

[0081] 202. Set the switching frequency to 600KHz.

[0082] 203. Determine whether the input current of the fast charging chip is greater than 2.3A.

[0083] If the input current of the fast charging chip is greater than 2.3A, the switching frequency is set to 1.2MHz. If the input current of the fast charging chip is not greater than 2.3A, the switching frequency is unchanged and is 600KHz.

[0084] 204. Set the switching frequency to 1.2MHz.

[0085] In one embodiment, an electronic device includes a sampling resistor connected to an input end of a fast charging chip, and the fast charging chip includes: an amplifier, a comparator, a register, and a switching circuit; to determine whether the switching frequency of the switching circuit of the fast charging chip matches the input current, the following method can be used to obtain a sampling voltage across the sampling resistor; the sampling voltage is amplified by the amplifier, and the amplified sampling voltage is compared with a voltage value preset by the comparator; the reference resistor is the resistance value of the resistor between the interface and the ground in a branch corresponding to the comparator and the preset current; according to the comparison result, the switching circuit is triggered to switch the switching frequency of the first fast charging chip to the switching frequency stored in the register that matches the input current.

[0086] The sampling voltage is amplified by the amplifier and input to an input terminal of the comparator; the voltage obtained after the sampling voltage is amplified by the amplifier is compared with the voltage value preset by the comparator; according to the comparison result, the switching circuit is triggered to switch the switching frequency of the first fast charging chip to the switching frequency stored in the register that matches the input current. For example, it can be used Figure 2C The electronic device of the structure shown is realized. Specifically, the voltage across the current sampling resistor can be used as the input of the amplifier, the output of the amplifier is connected to one input end of the comparator, and the other end of the comparator is a preset current equivalent reference voltage (which can be realized by a pull-up resistor and a power supply). When the amplified current sampling resistor voltage is greater than the preset current equivalent reference voltage, the comparator outputs a high signal, controls the selection switch to select the preset frequency in the frequency 1 register, and sends it to the clock circuit and the drive circuit to control the switch circuit. When the amplified current sampling resistor voltage is less than the preset current equivalent reference voltage, the comparator outputs a low signal, controls the selection switch to select the preset frequency in the frequency 2 register, and sends it to the clock circuit and the drive circuit to control the switch circuit. It should be noted that in this embodiment, the capacitor connected to the switch circuit usually includes two groups in the prior art, each group includes 3 capacitors. In order to save space, a part of the capacitor can be reduced in the embodiment of the present application, such as removing one or two capacitors from each group of capacitors, such as retaining capacitors C1 and C4, and streamlining capacitors C2, C3, C5, and C6. It is feasible, which is conducive to the miniaturization of electronic equipment.

[0087] In another embodiment, if Figure 3A and Figure 3B As shown, in this embodiment, Figure 2C The difference between the embodiments shown is that the input current-charging efficiency characteristic curve of the switch circuit of the fast charging chip has two intersections, correspondingly dividing the current into three intervals. Accordingly, there are three switching frequency values ​​that match each current interval. The three switching frequencies can be the default frequency, the frequency stored in the frequency 1 register, and the frequency stored in the frequency 2 register. In order to achieve the switching of the switching frequency, Figure 3A You can set between nodes A, B, A_, and B_ Figure 3B The corresponding logical relationship is shown in Table 1.

[0088] Table 1

[0089] A B A- B- 1 1 1 0 Frequency 1 Register 1 0 1 0 Frequency 1 Register 0 1 0 1 Frequency 2 Register 0 0 0 0 Default frequency

[0090] In another embodiment, if Figure 4AAs shown, the difference from the previous embodiment includes that the voltage at both ends of the current sampling resistor is input to an analog digital converter (ADC), and the ADC outputs a digital signal corresponding to the equivalent current, which is connected to one input end of the comparator, and the other input end of the comparator is connected to the frequency 1 current upper limit register and the frequency 1 current lower limit register, and the switching switch is controlled by the comparator comparison. In this embodiment, two comparators are included, one input end of the other comparator is connected to the output of the ADC, and the other input end is connected to the frequency 2 current upper limit register and the frequency 2 current lower limit register.

[0091] In this embodiment, the input current-charging efficiency characteristic curve of the switch circuit of the fast charging chip has two intersections, corresponding to dividing the current into three intervals. Accordingly, there are three switching frequencies that match each current interval, and the three switching frequencies can be the frequency stored in the frequency 1 register, the frequency stored in the frequency 2 register, and the default frequency (third frequency). According to the comparison result of the comparator, the control selection switch selects one of the preset frequencies in the frequency 1 register, the preset frequencies stored in the frequency 2 register, or the default frequencies, and sends it to the clock circuit and the drive circuit to control the switch circuit.

[0092] For example, the default frequency may be 600KHz, and the charging process is as follows: Figure 4B As shown, it includes steps 401 to 406. Among them,

[0093] 401. Enter fast charging state.

[0094] 402. Set the switching frequency to the default frequency, for example, set the switching frequency to 600KHz.

[0095] 403. Determine whether the current is greater than current A and less than current B.

[0096] If yes, execute step 404, if no, execute step 405.

[0097] 404. Set the switching frequency to frequency 1. Then, execute step 403.

[0098] 405. Determine whether the current is greater than current B.

[0099] If yes, execute step 406; if no, execute step 402.

[0100] 406. Set the switching frequency to frequency 2. Then execute step 403.

[0101] It should be noted that the circuit for determining the switching frequency of the switching circuit can be set inside the fast charging chip or outside the fast charging chip, and can use a digital circuit or an analog circuit.

[0102] like Figure 2C , Figure 3A and Figure 4A In the illustrated embodiment, a circuit for determining the switching frequency of the switching circuit is disposed inside the fast charging chip.

[0103] like Figure 5 As shown, in the embodiment shown in the figure, the circuit for controlling the switching frequency of the switch circuit is arranged outside the fast charging chip, and the electronic device includes: a fast charging chip, an ADC chip and a system on a chip (SOC) chip, and the ADC chip and the SOC chip are located outside the fast charging chip. The terminal voltage of the sampling resistor 2 is connected to the input end of the AC chip, and the ADC chip obtains a digital signal equivalent to the input current after processing. The switching frequency of the switch circuit is determined according to the output of the ADC and the corresponding relationship between the current and the switching frequency stored in the SOC chip. The SOC chip transmits the determined switch chip to the fast charging chip to control the switching frequency of the switch circuit.

[0104] like Fig. 6A and Figure 6B As shown, in some possible embodiments, the terminal voltage of the sampling resistor is connected to the ADC chip. It can be understood that in some embodiments, the terminal voltage of the sampling resistor can also be connected to the input terminal of the amplifier. The amplifier and the comparator are used in combination. The ADC circuit and the circuit including the amplifier and the comparator can be structures outside the fast charging chip or located inside the fast charging chip.

[0105] The terminal voltage of the sampling resistor can be connected to an amplifier for amplification, and then connected to a comparator or ADC to obtain the current current value or current range. Then, the switching frequency that matches the current is determined according to the input current-charging efficiency characteristic table of the fast charging chip, and then the determined switching frequency is sent to the fast charging chip.

[0106] In some embodiments, an electronic device may include multiple fast charging chips. If the working efficiency of multiple fast charging chips is higher when the current is greater than a certain current, it is necessary to configure the switching frequency of each fast charging chip in the operation of the multiple fast charging chips, and the switching frequency of the multiple fast charging chips is set according to their respective current-charging efficiency characteristics. When the working efficiency of a single fast charging chip is high below a certain current, a single fast charging chip is set to work, and the frequency of the single fast charging chip is configured according to its respective current-charging efficiency characteristics. For example, if the electronic device includes two fast charging chips: a first fast charging chip and a second fast charging chip. When charging, steps 601 to 607 may be included. Among them,

[0107] 601. Enter fast charging state.

[0108] 602. Set the switching frequency of the first fast charging chip to 600KHz.

[0109] 603. Determine whether the input current of the first fast charging chip is greater than 2.3A.

[0110] If the input current of the first fast charging chip is greater than 2.3A, execute step 604; if the input current of the first fast charging chip is not greater than 2.3A, execute step 602.

[0111] 604. Set the switching frequency of the first fast charging chip to 1.2 MHz.

[0112] 605. Determine whether the input current of the first fast charging chip is greater than 4.6A.

[0113] If yes, execute step 607; if no, execute step 606.

[0114] 606. Turn off the second fast charging chip.

[0115] 607. Start the second fast charging chip and set the switching frequency to 1.2 MHz.

[0116] This embodiment can control multiple fast charging chips to start running when the current is greater than a threshold, which is beneficial to improving charging efficiency.

[0117] An embodiment of the present application also provides a charging device, which is applied to an electronic device including a first fast charging chip and a battery, and the charging device includes: a first determination unit, used to determine the input current of the first fast charging chip; a second determination unit, used to determine whether the switching frequency of the switching circuit of the first fast charging chip matches the input current; a processing unit, used to not change the value of the switching frequency when the switching frequency of the switching circuit of the first fast charging chip matches the input current; when the switching frequency of the switching circuit of the first fast charging chip does not match the input current, modify the value of the switching frequency to a value that matches the input current; a charging unit, used to control the switching circuit to charge the battery at a switching frequency that matches the input current.

[0118] In some possible implementations, the second determination unit is specifically used to determine whether the input current is within the current range where the switching frequency matches; if so, it is determined that the switching frequency of the switching circuit of the fast charging chip matches the input current; if not, it is determined that the switching frequency of the switching circuit of the fast charging chip does not match the input current; the frequency with the highest charging efficiency in any current range is the switching frequency that matches any current range.

[0119] In some possible implementations, the processing unit is also used to set the switching frequency of the switching circuit to a default switching frequency when the first fast charging chip enters a fast charging mode; the default switching frequency is a switching frequency that matches a current interval that includes a minimum current value.

[0120] In some possible embodiments, a second fast charging chip is further included, and the processing unit is further used to trigger the start of the second fast charging chip and set the switching frequency of the switching circuit of the second fast charging chip to a value matching the input current of the second fast charging chip when the input current of the first fast charging chip is greater than a preset current threshold; and turn off the second fast charging chip when the input current of the first fast charging chip is less than a preset current threshold.

[0121] In some possible implementations, the first determination unit is used to determine the input current of the first fast charging chip through a current sampling circuit.

[0122] In some possible implementations, the electronic device includes a sampling resistor connected to an input terminal of a first fast charging chip, and the first fast charging chip includes a second determination unit and the processing unit.

[0123] In some possible implementations, the electronic device includes a sampling resistor connected to an input end of a first fast charging chip, and the second determination unit and the processing unit are located outside the first fast charging chip.

[0124] The possible implementation methods of each module can be found in the description of the previous embodiments, which will not be repeated here.

[0125] Next, the electronic device involved in the embodiment of the present application is described.

[0126] Figure 7 700 is a schematic diagram of the structure of an electronic device 700 provided in an embodiment of the present application, which may specifically be a mobile phone, a smart watch, a portable wearable device, etc. Figure 7 The electronic device 700 may include a processor 710, an external memory interface 720, an internal memory 721, a universal serial bus (USB) interface 730, a charging management module 740, a power management module 741, a battery 742, an antenna 1, an antenna 2, a mobile communication module 750, a wireless communication module 760, an audio module 770, a speaker 770A, a receiver 770B, a microphone 770C, an earphone interface 770D, a sensor module 780, a button 790, a motor 791, an indicator 792, a camera 793, a screen 794, and a subscriber identification module (SIM) card interface 795, etc. Among them, the sensor module 780 may include a pressure sensor 780A, a gyroscope sensor 780B, an air pressure sensor 780C, a magnetic sensor 780D, an acceleration sensor 780E, a distance sensor 780F, a proximity light sensor 780G, a fingerprint sensor 780H, a temperature sensor 780J, a touch sensor 780K, an ambient light sensor 780L, a bone conduction sensor 780M, etc.

[0127] The processor 710 may include one or more processing units, for example, the processor 710 may include an application processor AP, an audio digital signal processor ADSP, a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0128] The controller may be the nerve center and command center of the electronic device 700. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0129] The processor 710 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 710 is a cache memory. The memory may store instructions or data that the processor 710 has just used or cyclically used. If the processor 710 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 710, and thus improves the efficiency of the system.

[0130] The electronic device 700 implements the display function through a GPU, a screen 794, and an application processor. The GPU is a microprocessor for image processing, which connects the screen 794 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 710 may include one or more GPUs, which execute program instructions to generate or change display information.

[0131] The screen 794 is used to display images, videos, etc. The screen 794 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-OLED, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 700 may include 1 or N screens 794, where N is an integer greater than 1.

[0132] The electronic device 700 can realize the shooting function through ISP, camera 793, video codec, GPU, screen 794 and application processor.

[0133] ISP is used to process the data fed back by camera 793. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 793.

[0134] The camera 793 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 700 may include 1 or N cameras 793, where N is an integer greater than 1.

[0135] The external memory interface 720 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 700. The external memory card communicates with the processor 710 through the external memory interface 720 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0136] The internal memory 721 can be used to store computer executable program codes, which include instructions. The processor 710 executes various functional applications and data processing of the electronic device 700 by running the instructions stored in the internal memory 721. The internal memory 721 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data (such as audio data, a phone book, etc.) created by the electronic device 700 during use, etc. In addition, the internal memory 721 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0137] The acceleration sensor 780E can detect the magnitude of the acceleration of the electronic device 700 in all directions (generally three axes). When the electronic device 700 is stationary, the magnitude and direction of gravity can be detected. The acceleration sensor 780E can also be used to identify the posture of the electronic device 700, and is applied to applications such as horizontal and vertical screen switching and pedometers. Of course, the acceleration sensor 780E can also be combined with the gyroscope sensor 780B to identify the posture of the electronic device 700, and is applied to horizontal and vertical screen switching.

[0138] The gyroscope sensor 780B can be used to determine the motion posture of the electronic device 700. In some embodiments, the angular velocity of the electronic device 700 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 780B. The gyroscope sensor 780B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 780B detects the angle of the electronic device 700 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 700 through reverse movement to achieve anti-shake. The gyroscope sensor 780B can also be used for horizontal and vertical screen switching, navigation, and somatosensory game scenes.

[0139] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 700. In other embodiments of the present application, the electronic device 700 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0140] The electronic device provided in the embodiments of the present application may be a user equipment (UE), such as a mobile terminal (such as a mobile phone), a tablet computer, a handheld computer, a smart watch, a personal digital assistant (PAD), and the like.

[0141] In addition, an operating system runs on the above components, such as the Android open source operating system developed by Google.

[0142] The software system of the electronic device 700 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In order to more clearly illustrate the display optimization method when the screen is rotated provided in the embodiment of the present application, the embodiment of the present application takes the Android system of the layered architecture as an example to exemplarily illustrate the software system of the electronic device 700.

[0143] Figure 8 is a block diagram of a software system of an electronic device 700 provided in an embodiment of the present application. Figure 8 , the electronic device may include a hardware layer and a software layer, wherein the layered architecture of the Android system may include an application layer, an application framework layer, a system library layer and a kernel layer. In some optional embodiments, the system of the electronic device may also include layers not mentioned in the above technical architecture, such as Android Runtime.

[0144] The application layer can include a series of application packages, such as navigation applications, music applications, and video applications. Figure 8 As shown, the application package may include applications such as charging, video, and chatting, as well as the system user interface (System UI).

[0145] The charging application is used to manage the charging process, and the video, chat, voice and other applications are used to provide corresponding services to users. For example, users use video applications to watch videos, chat with other users using chat applications, listen to music using music applications, and respond to users' voice commands using voice assistants.

[0146] SystemUI is used to manage the human-computer interaction interface (user interface, UI) of the electronic device. In the embodiment of the present application, SystemUI is used to manage the image synthesis and display it on the screen.

[0147] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 8 As shown, the application framework layer may include a window management service module (window manage service, WMS), a display rotation module (also known as DisplayRotation), an application management service module (activity manage service, AMS) and an input management module (also known as Input), etc.

[0148] WMS is used to manage window programs. The window manager can obtain the screen size, determine whether there is a status bar, cut out the image on the screen, capture the screen, etc. In the embodiment of the present application, WMS can create and manage the window corresponding to the application.

[0149] The display rotation module is used to control the screen rotation so that the screen presents a vertical or horizontal layout. For example, when it is determined that the screen needs to be rotated, Surfaceflinger is notified to switch the horizontal and vertical screens of the application interface.

[0150] AMS is used to start specific applications based on user operations. For example, when the image is synthesized, the image is triggered to be displayed on the main screen. After the image is displayed, the image that needs to be cut out is triggered to perform a cutout operation, and an application stack corresponding to the video application is created so that the video application can run normally.

[0151] The system library layer can include multiple functional modules, such as sensor module (also known as sensor) and SurfaceFlinger.

[0152] The sensor module is used to obtain data collected by the sensor, such as collecting ambient light under the screen. Collecting the gravity direction information of the electronic device. Alternatively, the sensor module can also adjust the brightness of the screen according to the ambient light, and determine the horizontal or vertical screen state information of the electronic device according to the gravity direction information of the electronic device. The horizontal or vertical screen state information is used to indicate whether the electronic device is in the horizontal screen state or the vertical screen state.

[0153] Surfaceflinger is a system service used for layer creation, control, and management.

[0154] In addition, the system library layer can also include: surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc. The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc. The 2D graphics engine is a drawing engine for 2D drawing.

[0155] The kernel layer is a layer between hardware and software. In the embodiment of the present application, the kernel layer at least includes a touch driver module and a display driver module.

[0156] The display driver module is used to display the synthesized image on the screen according to the image data provided by the modules of the application framework layer and the application program of the application layer. For example, the video application passes the image data of a frame of the video to the display driver module, and the display driver module displays the image of a frame in the video on the touch screen according to the image data. SystemUI passes the image data to the display driver module, and the display driver module displays the synthesized image on the screen.

[0157] The touch driver module is used to monitor the capacitance value of each area of ​​the touch screen. When the user clicks or slides on the touch screen, the capacitance value of the clicked or slid area will change. The touch driver module can monitor the change of the capacitance value of each area on the touch screen and send a capacitance value change message to the input management module. The capacitance value change message carries information such as the change amplitude of the capacitance value (or capacitance sampling value) of each area of ​​the touch screen and the time of change.

[0158] The input management module can determine the touch operation based on the reported capacitance value change message, and then send the identified touch operation to other modules. The touch operation here can include click operation, drag operation, and specific gesture operation (such as swipe gesture operation, horizontal swipe gesture operation, etc.).

[0159] The hardware layer includes the screen and the ambient light sensor, etc. The ambient light sensor is used to detect the ambient light information under the screen. When the ambient light sensor has a processing function, it can obtain the image information corresponding to the cutout operation, and determine the real ambient light information based on the image information of the image obtained by the cutout operation and the environmental information under the screen obtained by the detection. And generate an adjustment signal for adjusting the screen brightness based on the real ambient light information.

[0160] The above technical architecture lists the modules and devices that may be involved in this application in the electronic device. In practical applications, the electronic device may include all or part of the modules and devices of the above technical architecture, as well as other modules and devices not mentioned in the above technical architecture. Of course, it may also include only the modules and devices of the above technical architecture, which is not limited in this embodiment.

[0161] In order to facilitate understanding of the charging method provided in the embodiment of the present application, the following first combines Figure 8 The technical architecture of the electronic device shown takes a mobile phone as an example to illustrate the implementation of the charging method provided in the present application.

[0162] exist Figure 7 The charging management module 740 in includes a fast charging chip, which triggers the fast charging mode when the charging interface is connected to the charging cable. It can be understood that the fast charging mode can also be triggered wirelessly, such as by placing it on a charging panel used to charge electronic devices. Determine the input current of the fast charging chip; determine whether the switching frequency of the switching circuit of the fast charging chip matches the input current; when the switching frequency of the switching circuit of the fast charging chip matches the input current, do not change the value of the switching frequency; when the switching frequency of the switching circuit of the fast charging chip does not match the input current, modify the value of the switching frequency to a value that matches the input current; control the switching circuit to charge the battery at a switching frequency that matches the input current. Determine whether the switching frequency of the switching circuit of the fast charging chip matches the input current, including: determining whether the input current is within the current interval where the switching frequency matches; if so, determine that the switching frequency of the switching circuit of the fast charging chip matches the input current; if not, determine that the switching frequency of the switching circuit of the fast charging chip does not match the input current; the frequency with the highest charging efficiency in any current interval is the switching frequency that matches any current interval.

[0163] When charging, the switching frequencies of the switching circuits in different current intervals are different. Compared with the technical solutions in the prior art in which the switching frequencies are fixed, the technical solutions provided by the present application are conducive to improving the charging efficiency according to the different characteristics of the switching frequencies with the highest charging efficiency in different current intervals.

[0164] An embodiment of the present application also provides an electronic device, comprising: a memory and one or more processors, wherein the memory is coupled to the processor; wherein computer program code is stored in the memory, and the computer program code comprises computer instructions, and when the computer instructions are executed by the processor, the sub-device executes the steps in the above-mentioned method embodiments.

[0165] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0166] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0167] The present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to a camera / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

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

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

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

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

[0172] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0173] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0174] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

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

Claims

1. A charging method, characterized in that: Applied to an electronic device, the electronic device includes a first fast charging chip, a battery, and a sampling resistor connected to the input end of the first fast charging chip, the first fast charging chip includes: an amplifier, a comparator, a register and a switching circuit, the method includes: Determining an input current of the first fast charging chip; According to the intersection points of multiple input current-charging efficiency characteristic curves of the first fast charging chip, multiple current intervals of the first fast charging chip are obtained, and the switching frequency of the switch circuit of the first fast charging chip corresponding to each current interval with the highest charging efficiency in the multiple current intervals is different; Obtaining a sampled voltage across the sampling resistor; Amplifying the sampled voltage by the amplifier to obtain an amplified sampled voltage; The sampled voltage after the amplification process is compared with the voltage value preset by the comparator to obtain a comparison result; when the comparison result indicates that the switching frequency of the switching circuit of the first fast charging chip does not match the input current, the switching circuit is triggered according to the comparison result to switch the switching frequency of the switching circuit of the first fast charging chip to the switching frequency matching the input current of the first fast charging chip stored in the register, and the switching frequency of the switching circuit of the first fast charging chip matching the input current is the switching frequency of the switching circuit of the first fast charging chip corresponding to the highest charging efficiency within the current interval of the multiple current intervals where the input current is located; Control the switching circuit of the first fast charging chip to charge the battery at a switching frequency that matches the input current of the first fast charging chip.

2. The method according to claim 1, characterized in that When the comparison result is that the amplified sampled voltage matches the voltage value preset by the comparator, the comparison result indicates that the switching frequency of the switching circuit of the first fast charging chip matches the input current; When the comparison result is that the amplified sampled voltage does not match the voltage value preset by the comparator, the comparison result indicates that the switching frequency of the switching circuit of the first fast charging chip does not match the input current.

3. The method according to claim 1, characterized in that Before determining the input current of the first fast charging chip, the method further includes: When the first fast charging chip enters the fast charging mode, the switching frequency of the switching circuit of the first fast charging chip is set to a default switching frequency; the default switching frequency is a switching frequency that matches the current interval including the minimum current value.

4. The method according to any one of claims 1 to 3, characterized in that: The electronic device further includes a second fast charging chip, and the method further includes: When the input current of the first fast charging chip is greater than a preset current threshold, starting the second fast charging chip, and setting the switching frequency of the switching circuit of the second fast charging chip to a value matching the input current of the second fast charging chip; When the input current of the first fast charging chip is less than the preset current threshold, the second fast charging chip is turned off.

5. The method according to any one of claims 1 to 4, characterized in that: The determining the input current of the first fast charging chip includes: The input current of the first fast charging chip is determined by a current sampling circuit.

6. A charging device, characterized in that: Applied to electronic equipment, the electronic equipment includes a first fast charging chip, a battery, and a sampling resistor connected to the input end of the first fast charging chip, the first fast charging chip includes: an amplifier, a comparator, a register and a switching circuit, and the charging device includes: A first determining unit, used to determine the input current of the first fast charging chip; A second determination unit is used to obtain multiple current intervals according to the intersection points of multiple input current-charging efficiency characteristic curves of the first fast charging chip, and the switching frequency of the switch circuit of the first fast charging chip corresponding to each current interval with the highest charging efficiency in the multiple current intervals is different; obtain the sampling voltage across the sampling resistor; amplify the sampling voltage through the amplifier to obtain the amplified sampling voltage, and compare the amplified sampling voltage with the voltage value preset by the comparator to obtain a comparison result; a processing unit, configured to trigger the switching circuit to switch the switching frequency of the switching circuit of the first fast charging chip to a switching frequency stored in the register that matches the input current of the first fast charging chip when the comparison result indicates that the switching frequency of the switching circuit of the first fast charging chip does not match the input current; A charging unit is used to control the switching circuit of the first fast charging chip to charge the battery at a switching frequency that matches the input current of the first fast charging chip.

7. The charging device according to claim 6, characterized in that: When the comparison result is that the amplified sampled voltage matches the voltage value preset by the comparator, the comparison result indicates that the switching frequency of the switching circuit of the first fast charging chip matches the input current; When the comparison result is that the amplified sampled voltage does not match the voltage value preset by the comparator, the comparison result indicates that the switching frequency of the switching circuit of the first fast charging chip does not match the input current.

8. The charging device according to claim 6, characterized in that: The processing unit is also used to set the switching frequency of the switching circuit of the first fast charging chip to a default switching frequency when the first fast charging chip enters the fast charging mode; the default switching frequency is a switching frequency that matches the current interval including the minimum current value.

9. The charging device according to any one of claims 6 to 8, characterized in that: It also includes a second fast-charging chip. The processing unit is also used to, when the input current of the first fast charging chip is greater than a preset current threshold, trigger the start of the second fast charging chip and set the switching frequency of the switching circuit of the second fast charging chip to a value matching the input current of the second fast charging chip; When the input current of the first fast charging chip is less than the preset current threshold, the second fast charging chip is turned off.

10. The charging device according to any one of claims 6 to 9, characterized in that: The first determination unit is used to determine the input current of the first fast charging chip through a current sampling circuit.

11. An electronic device, characterized in that: include: A first fast charging chip, a battery, a sampling resistor connected to the input end of the first fast charging chip, and a charging device, wherein the first fast charging chip comprises: an amplifier, a comparator, a register and a switching circuit, and the charging device is used to execute the method as described in any one of claims 1-5.

12. A computer-readable storage medium, characterized in that: The method comprises computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method as claimed in any one of claims 1 to 5.