[go: up one dir, main page]

CN116742761B - Charging method, charging device, electronic equipment and storage medium - Google Patents

Charging method, charging device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116742761B
CN116742761B CN202311000968.XA CN202311000968A CN116742761B CN 116742761 B CN116742761 B CN 116742761B CN 202311000968 A CN202311000968 A CN 202311000968A CN 116742761 B CN116742761 B CN 116742761B
Authority
CN
China
Prior art keywords
charging
voltage
electronic device
charger
pin
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311000968.XA
Other languages
Chinese (zh)
Other versions
CN116742761A (en
Inventor
刘记权
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202311000968.XA priority Critical patent/CN116742761B/en
Publication of CN116742761A publication Critical patent/CN116742761A/en
Application granted granted Critical
Publication of CN116742761B publication Critical patent/CN116742761B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • H02J7/00045Authentication, i.e. circuits for checking compatibility between one component, e.g. a battery or a battery charger, and another component, e.g. a power source
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/007Regulation of charging or discharging current or voltage
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/007Regulation of charging or discharging current or voltage
    • H02J7/00712Regulation of charging or discharging current or voltage the cycle being controlled or terminated in response to electric parameters
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

本公开关于一种充电方法、装置、电子设备和存储介质,属于充电技术领域。该方法包括:响应于充电器与电子设备的充电接口连接,确定第一协议为电子设备的充电协议;获取电子设备的充电接口的第一引脚和第二引脚之间的阻抗值;基于阻抗值,控制对电子设备进行充电。由此,在电子设备的充电接口的第一引脚和第二引脚之间短路时,可考虑到第一引脚和第二引脚之间的阻抗值,控制对电子设备进行充电,可避免短路故障导致电子设备的充电断续、充电失败等问题,提高了电子设备的充电连续性和可靠性。

The present disclosure relates to a charging method, device, electronic equipment and storage medium, and belongs to the field of charging technology. The method includes: in response to the connection between the charger and the charging interface of the electronic device, determining the first protocol as the charging protocol of the electronic device; obtaining the impedance value between the first pin and the second pin of the charging interface of the electronic device; based on Impedance value, controls charging of electronic devices. Therefore, when there is a short circuit between the first pin and the second pin of the charging interface of the electronic device, the impedance value between the first pin and the second pin can be taken into account to control the charging of the electronic device. It avoids problems such as intermittent charging and charging failure of electronic equipment caused by short-circuit faults, and improves the charging continuity and reliability of electronic equipment.

Description

充电方法、装置、电子设备和存储介质Charging methods, devices, electronic equipment and storage media

技术领域Technical field

本公开涉及充电技术领域,尤其涉及一种充电方法、装置、电子设备和存储介质。The present disclosure relates to the field of charging technology, and in particular, to a charging method, device, electronic equipment and storage medium.

背景技术Background technique

目前,在对电子设备进行充电时,大多需要电子设备与充电器之间基于充电协议进行通信,以确定充电电压以及实现充电过程中的数据传输等过程。然而,相关技术中的充电方法存在充电断续、充电失败等问题。At present, when charging electronic devices, most of them require communication between the electronic device and the charger based on a charging protocol to determine the charging voltage and implement data transmission during the charging process. However, the charging method in the related art has problems such as charging intermittent and charging failure.

发明内容Contents of the invention

本公开提供一种充电方法、装置、电子设备、计算机可读存储介质,以至少解决相关技术中的充电方法存在充电断续、充电失败的问题。本公开的技术方案如下:The present disclosure provides a charging method, device, electronic equipment, and computer-readable storage medium to at least solve the problems of intermittent charging and charging failure in charging methods in related technologies. The technical solutions of the present disclosure are as follows:

根据本公开实施例的第一方面,提供一种充电方法,包括:响应于充电器与电子设备的充电接口连接,确定第一协议为所述电子设备的充电协议;获取所述电子设备的充电接口的第一引脚和第二引脚之间的阻抗值;基于所述阻抗值,控制对所述电子设备进行充电。According to a first aspect of an embodiment of the present disclosure, a charging method is provided, including: in response to a connection between a charger and a charging interface of an electronic device, determining a first protocol as the charging protocol of the electronic device; and obtaining the charging protocol of the electronic device. The impedance value between the first pin and the second pin of the interface; based on the impedance value, charging of the electronic device is controlled.

在本公开的一个实施例中,所述基于所述阻抗值,控制对所述电子设备进行充电,包括:基于所述阻抗值,确定所述充电器的充电状态;基于所述充电器的充电状态,控制对所述电子设备进行充电。In one embodiment of the present disclosure, controlling the charging of the electronic device based on the impedance value includes: determining the charging state of the charger based on the impedance value; based on charging of the charger state to control charging of the electronic device.

在本公开的一个实施例中,所述基于所述充电器的充电状态,控制对所述电子设备进行充电,包括:若所述充电器和所述电子设备之间的第一协议通信失败,控制停止对所述电子设备进行充电。In one embodiment of the present disclosure, controlling the charging of the electronic device based on the charging status of the charger includes: if the first protocol communication between the charger and the electronic device fails, Control to stop charging the electronic device.

在本公开的一个实施例中,所述基于所述充电器的充电状态,控制对所述电子设备进行充电,包括:若所述充电器请求充电电压为第一电压失败,且所述充电器出现充电中断,将所述电子设备的充电电压更新为第二电压;按照所述第二电压,控制对所述电子设备进行充电;其中,所述第一电压、所述第二电压处于所述第一协议配置的充电电压的取值范围内,所述第二电压小于所述第一电压。In one embodiment of the present disclosure, controlling the charging of the electronic device based on the charging state of the charger includes: if the charger fails to request that the charging voltage be the first voltage, and the charger fails When a charging interruption occurs, the charging voltage of the electronic device is updated to the second voltage; according to the second voltage, the charging of the electronic device is controlled; wherein the first voltage and the second voltage are in the Within the value range of the charging voltage configured by the first protocol, the second voltage is smaller than the first voltage.

在本公开的一个实施例中,所述基于所述充电器的充电状态,控制对所述电子设备进行充电,包括:若所述充电器请求充电电压为第一电压成功,且所述充电器请求充电电压为第三电压失败,且所述充电器未出现充电中断,将所述电子设备的充电电压更新为所述第一电压;按照所述第一电压,控制对所述电子设备进行充电;其中,所述第一电压、所述第三电压处于所述第一协议配置的充电电压的取值范围内,所述第一电压小于所述第三电压。In one embodiment of the present disclosure, controlling the charging of the electronic device based on the charging state of the charger includes: if the charger requests the charging voltage to be the first voltage successfully, and the charger succeeds If the request for the charging voltage to be the third voltage fails, and there is no charging interruption in the charger, the charging voltage of the electronic device is updated to the first voltage; according to the first voltage, the charging of the electronic device is controlled. ; Wherein, the first voltage and the third voltage are within the value range of the charging voltage configured by the first protocol, and the first voltage is smaller than the third voltage.

在本公开的一个实施例中,所述基于所述充电器的充电状态,控制对所述电子设备进行充电,包括:若所述充电器请求充电电压为第一电压成功,且所述充电器请求充电电压为第三电压失败,且所述充电器出现充电中断,将所述电子设备的充电协议从所述第一协议更新为第二协议;按照所述第二协议,控制对所述电子设备进行充电;其中,所述第一电压、所述第三电压处于所述第一协议配置的充电电压的取值范围内,所述第一电压小于所述第三电压。In one embodiment of the present disclosure, controlling the charging of the electronic device based on the charging state of the charger includes: if the charger requests the charging voltage to be the first voltage successfully, and the charger succeeds If the request for the charging voltage to be the third voltage fails and the charger interrupts charging, update the charging protocol of the electronic device from the first protocol to the second protocol; according to the second protocol, control the charging of the electronic device. The device is charged; wherein the first voltage and the third voltage are within the value range of the charging voltage configured by the first protocol, and the first voltage is smaller than the third voltage.

在本公开的一个实施例中,所述基于所述充电器的充电状态,控制对所述电子设备进行充电,包括:若所述充电器和所述电子设备之间的第一协议通信成功,且所述充电器请求充电电压未出现异常,且所述电子设备的充电接口的温度大于设定阈值,按照所述第一协议,控制对所述电子设备进行充电。In one embodiment of the present disclosure, controlling the charging of the electronic device based on the charging status of the charger includes: if the first protocol communication between the charger and the electronic device is successful, And if there is no abnormality in the charging voltage requested by the charger, and the temperature of the charging interface of the electronic device is greater than the set threshold, the electronic device is controlled to be charged according to the first protocol.

在本公开的一个实施例中,所述获取所述电子设备的充电接口的第一引脚和第二引脚之间的阻抗值之后,还包括:生成用于指示所述电子设备的充电接口存在短路故障的提醒信息。In one embodiment of the present disclosure, after obtaining the impedance value between the first pin and the second pin of the charging interface of the electronic device, the method further includes: generating a charging interface indicating that the electronic device Alert message for short circuit fault.

在本公开的一个实施例中,所述第一引脚为供电引脚、所述第二引脚为通信引脚。In one embodiment of the present disclosure, the first pin is a power supply pin and the second pin is a communication pin.

根据本公开实施例的第二方面,提供一种充电装置,包括:确定模块,被配置为执行响应于充电器与电子设备的充电接口连接,确定第一协议为所述电子设备的充电协议;获取模块,被配置为执行获取所述电子设备的充电接口的第一引脚和第二引脚之间的阻抗值;控制模块,被配置为执行基于所述阻抗值,控制对所述电子设备进行充电。According to a second aspect of an embodiment of the present disclosure, a charging device is provided, including: a determining module configured to determine the first protocol as the charging protocol of the electronic device in response to a connection between the charger and the charging interface of the electronic device; The acquisition module is configured to obtain the impedance value between the first pin and the second pin of the charging interface of the electronic device; the control module is configured to perform control of the electronic device based on the impedance value. to charge.

在本公开的一个实施例中,所述控制模块,还被配置为执行:基于所述阻抗值,确定所述充电器的充电状态;基于所述充电器的充电状态,控制对所述电子设备进行充电。In one embodiment of the present disclosure, the control module is further configured to: determine the charging status of the charger based on the impedance value; control the charging status of the electronic device based on the charging status of the charger to charge.

在本公开的一个实施例中,所述控制模块,还被配置为执行:若所述充电器和所述电子设备之间的第一协议通信失败,控制停止对所述电子设备进行充电。In one embodiment of the present disclosure, the control module is further configured to: if the first protocol communication between the charger and the electronic device fails, control to stop charging the electronic device.

在本公开的一个实施例中,所述控制模块,还被配置为执行:若所述充电器请求充电电压为第一电压失败,且所述充电器出现充电中断,将所述电子设备的充电电压更新为第二电压;按照所述第二电压,控制对所述电子设备进行充电;其中,所述第一电压、所述第二电压处于所述第一协议配置的充电电压的取值范围内,所述第二电压小于所述第一电压。In one embodiment of the present disclosure, the control module is further configured to perform: if the charger fails to request the charging voltage to be the first voltage and the charger has a charging interruption, the electronic device is charged. The voltage is updated to a second voltage; according to the second voltage, the electronic device is controlled to be charged; wherein the first voltage and the second voltage are within the value range of the charging voltage configured by the first protocol. , the second voltage is smaller than the first voltage.

在本公开的一个实施例中,所述控制模块,还被配置为执行:若所述充电器请求充电电压为第一电压成功,且所述充电器请求充电电压为第三电压失败,且所述充电器未出现充电中断,将所述电子设备的充电电压更新为所述第一电压;按照所述第一电压,控制对所述电子设备进行充电;其中,所述第一电压、所述第三电压处于所述第一协议配置的充电电压的取值范围内,所述第一电压小于所述第三电压。In one embodiment of the present disclosure, the control module is further configured to execute: if the charger's request for the charging voltage to be the first voltage succeeds, and the charger's request for the charging voltage to be the third voltage fails, and the charger fails to request the charging voltage to be the third voltage, The charger updates the charging voltage of the electronic device to the first voltage without charging interruption; controls charging of the electronic device according to the first voltage; wherein the first voltage, the The third voltage is within the value range of the charging voltage configured by the first protocol, and the first voltage is smaller than the third voltage.

在本公开的一个实施例中,所述控制模块,还被配置为执行:若所述充电器请求充电电压为第一电压成功,且所述充电器请求充电电压为第三电压失败,且所述充电器出现充电中断,将所述电子设备的充电协议从所述第一协议更新为第二协议;按照所述第二协议,控制对所述电子设备进行充电;其中,所述第一电压、所述第三电压处于所述第一协议配置的充电电压的取值范围内,所述第一电压小于所述第三电压。In one embodiment of the present disclosure, the control module is further configured to execute: if the charger's request for the charging voltage to be the first voltage succeeds, and the charger's request for the charging voltage to be the third voltage fails, and the charger fails to request the charging voltage to be the third voltage, When a charging interruption occurs in the charger, the charging protocol of the electronic device is updated from the first protocol to a second protocol; according to the second protocol, the charging of the electronic device is controlled; wherein the first voltage , the third voltage is within the value range of the charging voltage configured by the first protocol, and the first voltage is smaller than the third voltage.

在本公开的一个实施例中,所述控制模块,还被配置为执行:若所述充电器和所述电子设备之间的第一协议通信成功,且所述充电器请求充电电压未出现异常,且所述电子设备的充电接口的温度大于设定阈值,按照所述第一协议,控制对所述电子设备进行充电。In one embodiment of the present disclosure, the control module is further configured to execute: if the first protocol communication between the charger and the electronic device is successful, and the charger requests a charging voltage without abnormality, , and the temperature of the charging interface of the electronic device is greater than the set threshold, the charging of the electronic device is controlled according to the first protocol.

在本公开的一个实施例中,所述获取所述电子设备的充电接口的第一引脚和第二引脚之间的阻抗值之后,所述控制模块,还被配置为执行:生成用于指示所述电子设备的充电接口存在短路故障的提醒信息。In one embodiment of the present disclosure, after obtaining the impedance value between the first pin and the second pin of the charging interface of the electronic device, the control module is further configured to perform: generate Alert information indicating that there is a short circuit fault in the charging interface of the electronic device.

在本公开的一个实施例中,所述第一引脚为供电引脚、所述第二引脚为通信引脚。In one embodiment of the present disclosure, the first pin is a power supply pin and the second pin is a communication pin.

根据本公开实施例的第三方面,提供一种电子设备,包括处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为实现本公开实施例第一方面所述方法的步骤。According to a third aspect of the embodiment of the present disclosure, an electronic device is provided, including a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to implement the first aspect of the embodiment of the present disclosure. Method steps.

根据本公开实施例的第四方面,提供一种计算机可读存储介质,其上存储有计算机程序指令,该程序指令被处理器执行时实现本公开实施例第一方面所述方法的步骤。According to a fourth aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the method described in the first aspect of the embodiment of the present disclosure are implemented.

本公开的实施例提供的技术方案至少带来以下有益效果:响应于充电器与电子设备的充电接口连接,确定第一协议为电子设备的充电协议,获取电子设备的充电接口的第一引脚和第二引脚之间的阻抗值,基于阻抗值,控制对电子设备进行充电。由此,在电子设备的充电接口的第一引脚和第二引脚之间短路时,可考虑到第一引脚和第二引脚之间的阻抗值,控制对电子设备进行充电,可避免短路故障导致电子设备的充电断续、充电失败等问题,提高了电子设备的充电连续性和可靠性。The technical solution provided by the embodiments of the present disclosure at least brings the following beneficial effects: in response to the connection between the charger and the charging interface of the electronic device, determining the first protocol as the charging protocol of the electronic device, and obtaining the first pin of the charging interface of the electronic device. The impedance value between the second pin and the second pin controls charging of the electronic device based on the impedance value. Therefore, when there is a short circuit between the first pin and the second pin of the charging interface of the electronic device, the impedance value between the first pin and the second pin can be taken into account to control the charging of the electronic device. It avoids problems such as intermittent charging and charging failure of electronic equipment caused by short-circuit faults, and improves the charging continuity and reliability of electronic equipment.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and do not limit the present disclosure.

附图说明Description of the drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理,并不构成对本公开的不当限定。The drawings herein are incorporated into and constitute a part of this specification, illustrate embodiments consistent with the disclosure, and together with the description are used to explain the principles of the disclosure, and do not constitute undue limitations on the disclosure.

图1是根据一示例性实施例示出的一种充电方法的流程图。FIG. 1 is a flow chart of a charging method according to an exemplary embodiment.

图2是根据另一示例性实施例示出的一种充电方法的流程图。FIG. 2 is a flow chart of a charging method according to another exemplary embodiment.

图3是根据另一示例性实施例示出的一种充电方法的流程图。FIG. 3 is a flow chart of a charging method according to another exemplary embodiment.

图4是根据另一示例性实施例示出的一种充电方法的流程图。FIG. 4 is a flow chart of a charging method according to another exemplary embodiment.

图5是根据一示例性实施例示出的一种充电装置的框图。FIG. 5 is a block diagram of a charging device according to an exemplary embodiment.

图6是根据一示例性实施例示出的一种电子设备的框图。FIG. 6 is a block diagram of an electronic device according to an exemplary embodiment.

具体实施方式Detailed ways

为了使本领域普通人员更好地理解本公开的技术方案,下面将结合附图,对本公开实施例中的技术方案进行清楚、完整地描述。In order to allow ordinary people in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本公开的实施例能够以除了在这里图示或描述的那些以外的顺序实施。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。It should be noted that the terms "first", "second", etc. in the description and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the disclosure described herein can be practiced in sequences other than those illustrated or described herein. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with aspects of the disclosure as detailed in the appended claims.

本公开技术方案中对数据的获取、存储、使用、处理等均符合国家法律法规的相关规定。The acquisition, storage, use and processing of data in this disclosed technical solution all comply with the relevant provisions of national laws and regulations.

图1是根据一示例性实施例示出的一种充电方法的流程图,如图1所示,本公开实施例的充电方法,包括以下步骤。Figure 1 is a flow chart of a charging method according to an exemplary embodiment. As shown in Figure 1, the charging method according to the embodiment of the present disclosure includes the following steps.

S101,响应于充电器与电子设备的充电接口连接,确定第一协议为电子设备的充电协议。S101. In response to the connection between the charger and the charging interface of the electronic device, determine the first protocol as the charging protocol of the electronic device.

需要说明的是,本公开实施例的充电方法的执行主体为电子设备,电子设备包括手机、笔记本、台式电脑、车载终端、智能家电、可穿戴设备等。其中,可穿戴设备可包括腕戴式设备(比如智能手表、智能手环)、头戴式设备、足部穿戴设备等。本公开实施例的充电方法可以由本公开实施例的充电装置执行,本公开实施例的充电装置可以配置在任意电子设备中,以执行本公开实施例的充电方法。It should be noted that the charging method in the embodiment of the present disclosure is executed by an electronic device. Electronic devices include mobile phones, notebooks, desktop computers, vehicle-mounted terminals, smart home appliances, wearable devices, etc. Among them, wearable devices can include wrist-worn devices (such as smart watches, smart bracelets), head-mounted devices, foot-worn devices, etc. The charging method of the embodiment of the present disclosure can be performed by the charging device of the embodiment of the present disclosure. The charging device of the embodiment of the present disclosure can be configured in any electronic device to perform the charging method of the embodiment of the present disclosure.

需要说明的是,电子设备的充电接口、充电器均支持第一协议。在电子设备的充电接口、充电器均支持第一协议的情况下,默认第一协议为电子设备的充电协议。It should be noted that the charging interfaces and chargers of electronic devices all support the first protocol. When both the charging interface and the charger of the electronic device support the first protocol, the default first protocol is the charging protocol of the electronic device.

需要说明的是,对电子设备的充电接口、第一协议均不做过多限定。第一协议可为快充协议,还可为慢充协议。It should be noted that there are no excessive restrictions on the charging interface and the first protocol of electronic devices. The first protocol may be a fast charging protocol or a slow charging protocol.

比如,电子设备的充电接口为USB(Universal Serial Bus,通用串行总线)Type-C接口,其中,USB Type-C接口相较于USB Type-A接口、USB Type-B接口体积更小,USB Type-A接口、USB Type-B接口、USB Type-C接口均为USB接口。For example, the charging interface of electronic equipment is a USB (Universal Serial Bus, Universal Serial Bus) Type-C interface. Among them, the USB Type-C interface is smaller than the USB Type-A interface and USB Type-B interface. Type-A interface, USB Type-B interface, and USB Type-C interface are all USB interfaces.

比如,第一协议为USB PD(Power Delivery,电源传输)协议,以下简称为PD协议。其中,PD协议为一种基于USB接口的快充协议。For example, the first protocol is the USB PD (Power Delivery) protocol, hereinafter referred to as the PD protocol. Among them, the PD protocol is a fast charging protocol based on the USB interface.

S102,获取电子设备的充电接口的第一引脚和第二引脚之间的阻抗值。S102. Obtain the impedance value between the first pin and the second pin of the charging interface of the electronic device.

可以理解的是,正常情况下第一引脚和第二引脚之间开路,即第一引脚和第二引脚之间的阻抗值为无穷大,然而,若电子设备的充电接口暴露在外,杂质、水汽等物质容易进入到电子设备的充电接口,导致第一引脚和第二引脚之间短路,即第一引脚和第二引脚之间的阻抗值可测量或者计算得到。It can be understood that under normal circumstances, there is an open circuit between the first pin and the second pin, that is, the impedance value between the first pin and the second pin is infinite. However, if the charging interface of the electronic device is exposed, Impurities, water vapor and other substances can easily enter the charging interface of electronic equipment, causing a short circuit between the first pin and the second pin. That is, the impedance value between the first pin and the second pin can be measured or calculated.

需要说明的是,第一引脚、第二引脚均为电子设备的充电接口内的引脚,第一引脚、第二引脚为不同的引脚。对第一引脚、第二引脚均不做过多限定。比如,第一引脚为供电引脚、第二引脚为通信引脚。其中,供电引脚可包括VBUS引脚,通信引脚可包括CC(Configuration Channel,配置通道)引脚。It should be noted that the first pin and the second pin are both pins in the charging interface of the electronic device, and the first pin and the second pin are different pins. There are no excessive restrictions on the first pin and the second pin. For example, the first pin is the power supply pin and the second pin is the communication pin. Among them, the power supply pin may include a VBUS pin, and the communication pin may include a CC (Configuration Channel, configuration channel) pin.

需要说明的是,获取电子设备的充电接口的第一引脚和第二引脚之间的阻抗值,可采用相关技术中的任一获取阻抗值的方法来实现,这里不做过多限定。It should be noted that obtaining the impedance value between the first pin and the second pin of the charging interface of the electronic device can be achieved by using any method of obtaining the impedance value in related technologies, and there are no excessive limitations here.

在一种实施方式中,如图2所示,电子设备包括PMIC(Power ManagementIntegrated Circuit,电源管理集成电路),PMIC包括使能下拉电阻Rd和第二引脚的电压采集电路,第一引脚与充电器的第一端连接,第二引脚分别与充电器的第二端、使能下拉电阻Rd的第一端、第二引脚的电压采集电路连接,使能下拉电阻Rd的第二端接地。In one implementation, as shown in Figure 2, the electronic device includes a PMIC (Power Management Integrated Circuit). The PMIC includes a voltage acquisition circuit that enables a pull-down resistor Rd and a second pin. The first pin is connected to The first end of the charger is connected, the second pin is connected to the second end of the charger, the first end of the enable pull-down resistor Rd, the voltage acquisition circuit of the second pin, and the second end of the enable pull-down resistor Rd Ground.

若第一引脚和第二引脚之间开路,即第一引脚和第二引脚之间的阻抗值R为无穷大,第二引脚的电压为零。If there is an open circuit between the first pin and the second pin, that is, the impedance value R between the first pin and the second pin is infinite, and the voltage of the second pin is zero.

若第一引脚和第二引脚之间短路,第一引脚的电压Vo在阻抗值R、使能下拉电阻Rd分压,阻抗值R的计算过程如下:If the first pin and the second pin are short-circuited, the voltage Vo of the first pin is divided by the impedance value R and the enable pull-down resistor Rd. The calculation process of the impedance value R is as follows:

R =(Vo-Vcc)/(Vcc/Rd)R = (V o -Vcc)/(Vcc/Rd)

其中,Vo为第一引脚的电压,也为充电器的输出电压,Vcc为第二引脚的电压。Among them, Vo is the voltage of the first pin and the output voltage of the charger, and Vcc is the voltage of the second pin.

比如,以Vo=5V(伏特),Vcc=3V,Rd=5.1KΩ(千欧姆)为例,阻抗值R的计算过程如下:For example, taking V o =5V (volt), Vcc =3V, Rd =5.1KΩ (kiloohm) as an example, the calculation process of the impedance value R is as follows:

R = (5-3)/(3/5.1)= 3.4KΩR = (5-3)/(3/5.1)= 3.4KΩ

在一种实施方式中,获取电子设备的充电接口的第一引脚和第二引脚之间的阻抗值之后,还包括生成用于指示电子设备的充电接口存在短路故障的提醒信息,以及时告知用户电子设备的充电接口存在短路故障,从而用户可及时对电子设备的充电接口进行维修或者更换处理,提高了电子设备的充电安全。In one embodiment, after obtaining the impedance value between the first pin and the second pin of the charging interface of the electronic device, it also includes generating reminder information indicating that there is a short circuit fault in the charging interface of the electronic device, and promptly The user is informed that there is a short circuit fault in the charging interface of the electronic device, so that the user can repair or replace the charging interface of the electronic device in time, which improves the charging safety of the electronic device.

在一些例子中,还包括控制在电子设备上显示用于指示电子设备的充电接口存在短路故障的提醒信息,和/或,向电子设备发送用于指示电子设备的充电接口存在短路故障的提醒信息。In some examples, it also includes controlling the display of reminder information on the electronic device to indicate that the charging interface of the electronic device has a short-circuit fault, and/or sending the reminder information to the electronic device to indicate that the charging interface of the electronic device has a short-circuit fault. .

S103,基于阻抗值,控制对电子设备进行充电。S103, based on the impedance value, controls charging of the electronic device.

在一种实施方式中,基于阻抗值,控制对电子设备进行充电,包括基于阻抗值,确定电子设备的充电策略,按照电子设备的充电策略,控制对电子设备进行充电。In one embodiment, controlling charging of the electronic device based on the impedance value includes determining a charging strategy of the electronic device based on the impedance value, and controlling charging of the electronic device according to the charging strategy of the electronic device.

比如,可预先建立阻抗值和电子设备的充电策略之间的映射关系,在获取到阻抗值之后,可基于阻抗值,查询上述映射关系,将阻抗值映射的充电策略确定为电子设备的充电策略。可以理解的是,不同的阻抗值,可映射不同的充电策略,也可映射相同的充电策略。For example, the mapping relationship between the impedance value and the charging strategy of the electronic device can be established in advance. After the impedance value is obtained, the above mapping relationship can be queried based on the impedance value, and the charging strategy mapped by the impedance value can be determined as the charging strategy of the electronic device. . It can be understood that different impedance values can map to different charging strategies, or they can map to the same charging strategy.

在一种实施方式中,基于阻抗值,控制对电子设备进行充电,包括基于阻抗值,确定充电器的充电状态,基于充电器的充电状态,控制对电子设备进行充电。由此,该方法中可基于阻抗值,确定充电器的充电状态,并考虑到充电器的充电状态,控制对电子设备进行充电,提高了电子设备的充电可靠性。In one implementation, controlling the charging of the electronic device based on the impedance value includes determining the charging state of the charger based on the impedance value, and controlling the charging of the electronic device based on the charging state of the charger. Therefore, in this method, the charging state of the charger can be determined based on the impedance value, and the charging of the electronic device can be controlled taking into account the charging state of the charger, thereby improving the charging reliability of the electronic device.

需要说明的是,对充电器的充电状态不做过多限定,比如,以第一协议为PD协议为例,充电器的充电状态可包括PD协议识别成功、PD协议识别失败、PD协议通信失败、PD协议通信成功、请求充电电压成功、请求充电电压失败、请求升压成功、请求升压失败、是否出现充电中断(比如硬复位hardreset)、能否正常充电、是否出现短路发热等。It should be noted that the charging status of the charger is not too limited. For example, taking the first protocol as the PD protocol as an example, the charging status of the charger may include PD protocol recognition success, PD protocol recognition failure, and PD protocol communication failure. , PD protocol communication is successful, charging voltage request is successful, charging voltage request is failed, voltage boost request is successful, voltage boost request fails, whether charging interruption occurs (such as hard reset), whether charging is normal, whether short circuit heating occurs, etc.

比如,可预先建立阻抗值、充电器的充电状态之间的映射关系,在获取到阻抗值之后,可基于阻抗值,查询上述映射关系,将阻抗值映射的充电状态确定为充电器的充电状态。可以理解的是,不同的阻抗值,可映射不同的充电状态,也可映射相同的充电状态。For example, the mapping relationship between the impedance value and the charging state of the charger can be established in advance. After obtaining the impedance value, the above mapping relationship can be queried based on the impedance value, and the charging state mapped by the impedance value can be determined as the charging state of the charger. . It can be understood that different impedance values can map different charging states or the same charging state.

在一种实施方式中,阻抗值R、充电器的充电状态、用户感受之间的映射关系如表1所示。In one implementation, the mapping relationship between the impedance value R, the charging state of the charger, and user experience is as shown in Table 1.

表1 阻抗值R、充电器的充电状态、用户感受之间的映射关系Table 1 Mapping relationship between impedance value R, charger’s charging status, and user experience

在一些例子中,基于充电器的充电状态,控制对电子设备进行充电,包括基于充电器的充电状态,确定电子设备的充电策略,按照电子设备的充电策略,控制对电子设备进行充电。In some examples, controlling the charging of the electronic device based on the charging state of the charger includes determining the charging strategy of the electronic device based on the charging state of the charger, and controlling the charging of the electronic device according to the charging strategy of the electronic device.

比如,可预先建立充电器的充电状态和电子设备的充电策略之间的映射关系,在获取到充电器的充电状态之后,可基于充电器的充电状态,查询上述映射关系,将充电器的充电状态映射的充电策略确定为电子设备的充电策略。可以理解的是,不同的充电器的充电状态,可映射不同的充电策略,也可映射相同的充电策略。For example, a mapping relationship between the charging status of the charger and the charging strategy of the electronic device can be established in advance. After obtaining the charging status of the charger, the above mapping relationship can be queried based on the charging status of the charger, and the charging status of the charger can be queried. The charging strategy of the state map is determined as the charging strategy of the electronic device. It can be understood that the charging status of different chargers can be mapped to different charging strategies, or the same charging strategy can be mapped.

本公开的实施例提供的充电方法,响应于充电器与电子设备的充电接口连接,确定第一协议为电子设备的充电协议,获取电子设备的充电接口的第一引脚和第二引脚之间的阻抗值,基于阻抗值,控制对电子设备进行充电。由此,在电子设备的充电接口的第一引脚和第二引脚之间短路时,可考虑到第一引脚和第二引脚之间的阻抗值,控制对电子设备进行充电,可避免短路故障导致电子设备的充电断续、充电失败等问题,提高了电子设备的充电连续性和可靠性。In the charging method provided by the embodiment of the present disclosure, in response to the connection between the charger and the charging interface of the electronic device, the first protocol is determined to be the charging protocol of the electronic device, and one of the first pin and the second pin of the charging interface of the electronic device is obtained. The impedance value between the two devices controls the charging of the electronic device based on the impedance value. Therefore, when there is a short circuit between the first pin and the second pin of the charging interface of the electronic device, the impedance value between the first pin and the second pin can be taken into account to control the charging of the electronic device. It avoids problems such as intermittent charging and charging failure of electronic equipment caused by short-circuit faults, and improves the charging continuity and reliability of electronic equipment.

图3是根据另一示例性实施例示出的一种充电方法的流程图,如图3所示,本公开实施例的充电方法,包括以下步骤。Figure 3 is a flow chart of a charging method according to another exemplary embodiment. As shown in Figure 3, the charging method according to the embodiment of the present disclosure includes the following steps.

S301,响应于充电器与电子设备的充电接口连接,确定第一协议为电子设备的充电协议。S301. In response to the connection between the charger and the charging interface of the electronic device, determine the first protocol as the charging protocol of the electronic device.

S302,获取电子设备的充电接口的第一引脚和第二引脚之间的阻抗值。S302: Obtain the impedance value between the first pin and the second pin of the charging interface of the electronic device.

S303,基于阻抗值,确定充电器的充电状态。S303, determine the charging state of the charger based on the impedance value.

步骤S301-S303的相关内容,可参见上述实施例,这里不再赘述。For the relevant content of steps S301-S303, please refer to the above embodiment and will not be described again here.

S304,若充电器和电子设备之间的第一协议通信失败,控制停止对电子设备进行充电。S304, if the first protocol communication between the charger and the electronic device fails, control to stop charging the electronic device.

需要说明的是,充电器和电子设备之间的第一协议通信失败为充电器的第一种充电状态。可以理解的是,若充电器和电子设备之间的第一协议通信失败,此时无法按照第一协议,控制对电子设备进行充电,则可控制停止对电子设备进行充电。It should be noted that the failure of the first protocol communication between the charger and the electronic device is the first charging state of the charger. It can be understood that if the first protocol communication between the charger and the electronic device fails, and the charging of the electronic device cannot be controlled according to the first protocol, the charging of the electronic device can be controlled to stop.

比如,继续以表1为例,第一协议为PD协议,若阻抗值R<35KΩ,可确定充电器的充电状态为充电器和电子设备之间的PD协议通信失败,控制停止对电子设备进行充电。For example, continuing to take Table 1 as an example, the first protocol is the PD protocol. If the impedance value R<35KΩ, it can be determined that the charging status of the charger is that the PD protocol communication between the charger and the electronic device has failed, and the control stops charging the electronic device. Charge.

S305,若充电器请求充电电压为第一电压失败,且充电器出现充电中断,将电子设备的充电电压更新为第二电压。S305, if the charger fails to request the charging voltage to be the first voltage and the charger encounters a charging interruption, update the charging voltage of the electronic device to the second voltage.

S306,按照第二电压,控制对电子设备进行充电。S306: Control charging of the electronic device according to the second voltage.

需要说明的是,充电器请求充电电压为第一电压失败,且充电器出现充电中断为充电器的第二种充电状态。可以理解的是,若充电器请求充电电压为第一电压失败,且充电器出现充电中断,为了避免电子设备充电断续、充电失败的问题,可将电子设备的充电电压更新为第二电压,即将电子设备的充电电压更新为固定的充电电压,并按照固定的充电电压,控制对电子设备进行充电。It should be noted that the charger fails to request the charging voltage to be the first voltage, and the charger has a charging interruption, which is the second charging state of the charger. It can be understood that if the charger fails to request the charging voltage to be the first voltage and the charger interrupts charging, in order to avoid the problem of intermittent charging and charging failure of the electronic device, the charging voltage of the electronic device can be updated to the second voltage. That is, the charging voltage of the electronic device is updated to a fixed charging voltage, and the charging of the electronic device is controlled according to the fixed charging voltage.

其中,第一电压、第二电压处于第一协议配置的充电电压的取值范围内,第二电压小于第一电压。对第一电压、第二电压均不做过多限定,比如,第一电压为9V,第二电压为5V。The first voltage and the second voltage are within the value range of the charging voltage configured by the first protocol, and the second voltage is smaller than the first voltage. Neither the first voltage nor the second voltage is too limited. For example, the first voltage is 9V and the second voltage is 5V.

比如,继续以表1为例,第一协议为PD协议,第一电压为9V,第二电压为5V,若35KΩ≤阻抗值R<77KΩ,可确定充电器的充电状态为充电器请求充电电压为9V失败,且充电器出现充电中断,将电子设备的充电电压更新为5V,按照5V的充电电压,控制对电子设备进行充电。For example, continue to use Table 1 as an example. The first protocol is the PD protocol, the first voltage is 9V, and the second voltage is 5V. If 35KΩ≤impedance value R<77KΩ, it can be determined that the charger’s charging status is the charger’s requested charging voltage. If it fails to 9V and the charger interrupts charging, update the charging voltage of the electronic device to 5V and control the charging of the electronic device according to the 5V charging voltage.

S307,若充电器请求充电电压为第一电压成功,且充电器请求充电电压为第三电压失败,且充电器未出现充电中断,将电子设备的充电电压更新为第一电压。S307: If the charger successfully requests the charging voltage to be the first voltage, and the charger fails to request the charging voltage to be the third voltage, and the charger does not interrupt charging, update the charging voltage of the electronic device to the first voltage.

S308,按照第一电压,控制对电子设备进行充电。S308: Control charging of the electronic device according to the first voltage.

需要说明的是,充电器请求充电电压为第一电压成功,且充电器请求充电电压为第三电压失败,且充电器未出现充电中断为充电器的第三种充电状态。可以理解的是,若充电器请求充电电压为第一电压成功,充电器请求充电电压为第三电压失败,且充电器未出现充电中断,为了避免电子设备充电失败的问题,可将电子设备的充电电压更新为第一电压,即将电子设备的充电电压更新为固定的充电电压,并按照固定的充电电压,控制对电子设备进行充电。It should be noted that the charger's request for the charging voltage to be the first voltage is successful, and the charger's request for the charging voltage to be the third voltage fails, and the charger does not have a charging interruption, which is the third charging state of the charger. It can be understood that if the charger successfully requests the charging voltage to be the first voltage, but fails to request the charging voltage to be the third voltage, and the charger does not interrupt charging, in order to avoid the problem of charging failure of the electronic device, the electronic device can be The charging voltage is updated to the first voltage, that is, the charging voltage of the electronic device is updated to a fixed charging voltage, and the charging of the electronic device is controlled according to the fixed charging voltage.

其中,第一电压、第三电压处于第一协议配置的充电电压的取值范围内,第一电压小于第三电压。对第一电压、第三电压均不做过多限定,比如,第一电压为9V,第三电压为10V。Wherein, the first voltage and the third voltage are within the value range of the charging voltage configured by the first protocol, and the first voltage is smaller than the third voltage. Neither the first voltage nor the third voltage is too limited. For example, the first voltage is 9V and the third voltage is 10V.

比如,继续以表1为例,第一协议为PD协议,第一电压为9V,第三电压为10V,若77KΩ≤阻抗值R<82KΩ,可确定充电器的充电状态为充电器请求充电电压为9V成功,且充电器请求充电电压为10V失败,且充电器未出现充电中断,将电子设备的充电电压更新为9V,按照9V的充电电压,控制对电子设备进行充电。For example, continuing to use Table 1 as an example, the first protocol is the PD protocol, the first voltage is 9V, and the third voltage is 10V. If 77KΩ≤impedance value R<82KΩ, it can be determined that the charger’s charging status is the charger’s requested charging voltage. If it is 9V successfully, and the charger fails to request a charging voltage of 10V, and the charger does not interrupt charging, the charging voltage of the electronic device is updated to 9V, and the charging of the electronic device is controlled according to the 9V charging voltage.

S309,若充电器请求充电电压为第一电压成功,且充电器请求充电电压为第三电压失败,且充电器出现充电中断,将电子设备的充电协议从第一协议更新为第二协议。S309: If the charger successfully requests the charging voltage to be the first voltage, and the charger fails to request the charging voltage to be the third voltage, and the charger interrupts charging, update the charging protocol of the electronic device from the first protocol to the second protocol.

S310,按照第二协议,控制对电子设备进行充电。S310: Control charging of the electronic device according to the second protocol.

需要说明的是,充电器请求充电电压为第一电压成功,且充电器请求充电电压为第三电压失败,且充电器出现充电中断为充电器的第四种充电状态。可以理解的是,若充电器请求充电电压为第一电压成功,且充电器请求充电电压为第三电压失败,且充电器出现充电中断,为了避免电子设备充电断续、充电失败的问题,可将电子设备的充电协议从第一协议更新为第二协议,按照第二协议,控制对电子设备进行充电。It should be noted that the charger's request for the charging voltage to be the first voltage is successful, and the charger's request for the charging voltage to be the third voltage fails, and the charger's charging interruption is the fourth charging state of the charger. It can be understood that if the charger successfully requests the charging voltage to be the first voltage, and the charger fails to request the charging voltage to be the third voltage, and the charger interrupts charging, in order to avoid the problem of intermittent charging and charging failure of the electronic device, you can The charging protocol of the electronic device is updated from the first protocol to the second protocol, and the charging of the electronic device is controlled according to the second protocol.

需要说明的是,第一电压、第三电压的相关内容,可参见上述实施例,这里不再赘述。It should be noted that the relevant contents of the first voltage and the third voltage may be referred to the above embodiments and will not be described again here.

需要说明的是,对第二协议不做过多限定,比如,第二协议为USB QC(QuickCharge,快速充电)协议,以下简称为QC协议。It should be noted that the second protocol is not too limited. For example, the second protocol is the USB QC (QuickCharge, fast charging) protocol, hereinafter referred to as the QC protocol.

比如,继续以表1为例,第一协议为PD协议,第二协议为QC协议,第一电压为9V,第三电压为10V,若82KΩ≤阻抗值R<166KΩ,可确定充电器的充电状态为充电器请求充电电压为9V成功,且充电器请求充电电压为10V失败,且充电器出现充电中断,将电子设备的充电协议从PD协议更新为QC协议,按照QC协议控制对电子设备进行充电。For example, continue to use Table 1 as an example. The first protocol is the PD protocol, the second protocol is the QC protocol, the first voltage is 9V, and the third voltage is 10V. If 82KΩ≤impedance value R<166KΩ, the charger can be determined. The status is that the charger's request for a charging voltage of 9V is successful, and the charger's request for a charging voltage of 10V fails, and the charger has a charging interruption. Update the charging protocol of the electronic device from the PD protocol to the QC protocol, and control the electronic device according to the QC protocol. Charge.

S311,若充电器和电子设备之间的第一协议通信成功,且充电器请求充电电压未出现异常,且电子设备的充电接口的温度大于设定阈值,按照第一协议,控制对电子设备进行充电。S311, if the first protocol communication between the charger and the electronic device is successful, and the charger's requested charging voltage is not abnormal, and the temperature of the charging interface of the electronic device is greater than the set threshold, control the electronic device according to the first protocol. Charge.

需要说明的是,充电器和电子设备之间的第一协议通信成功,且充电器请求充电电压未出现异常,且电子设备的充电接口的温度大于设定阈值为充电器的第五种充电状态。可以理解的是,若充电器和电子设备之间的第一协议通信成功,且充电器请求充电电压未出现异常,且电子设备的充电接口的温度大于设定阈值,表明此时充电器可以对电子设备正常充电,仅存在短路发热的问题,可继续按照第一协议,控制对电子设备进行充电。It should be noted that the first protocol communication between the charger and the electronic device is successful, and the charger's requested charging voltage does not appear abnormal, and the temperature of the charging interface of the electronic device is greater than the set threshold, which is the fifth charging state of the charger. . It can be understood that if the first protocol communication between the charger and the electronic device is successful, and the charger's requested charging voltage does not appear abnormal, and the temperature of the charging interface of the electronic device is greater than the set threshold, it means that the charger can The electronic device is charged normally, and there is only a problem of short circuit and heating. The electronic device can continue to be charged according to the first protocol.

需要说明的是,对设定阈值不做过多限定。It should be noted that there are no excessive restrictions on the set threshold.

比如,继续以表1为例,第一协议为PD协议,若166 KΩ≤阻抗值R,可确定充电器的充电状态为充电器和电子设备之间的PD协议通信成功,且充电器请求充电电压未出现异常,且电子设备的充电接口的温度大于设定阈值,按照PD协议,控制对电子设备进行充电。For example, continuing to use Table 1 as an example, the first protocol is the PD protocol. If 166 KΩ ≤ impedance value R, it can be determined that the charging status of the charger is that the PD protocol communication between the charger and the electronic device is successful, and the charger requests charging If there is no abnormality in the voltage, and the temperature of the charging interface of the electronic device is greater than the set threshold, the electronic device is controlled to be charged according to the PD protocol.

在一种实施方式中,按照第一协议,控制对电子设备进行充电的过程中,还包括检测电子设备的充电接口的温度的变化趋势和变化速度,若电子设备的充电接口的温度的变化趋势为上升趋势,且电子设备的充电接口的温度的变化速度大于或者等于设定阈值,表明电子设备的充电接口的温度上升较快,生成用于指示电子设备的充电接口存在短路故障的提醒信息,和/或,生成用于指示电子设备的充电接口温度上升较快的提醒信息。In one embodiment, according to the first protocol, the process of controlling the charging of the electronic device also includes detecting the changing trend and changing speed of the temperature of the charging interface of the electronic device. If the changing trend of the temperature of the charging interface of the electronic device is an upward trend, and the change rate of the temperature of the charging interface of the electronic device is greater than or equal to the set threshold, indicating that the temperature of the charging interface of the electronic device rises rapidly, a reminder message is generated to indicate that there is a short circuit fault in the charging interface of the electronic device, And/or, generate a reminder message indicating that the temperature of the charging interface of the electronic device rises rapidly.

本实施例中,充电器的充电状态包括5种充电状态,除上述5种充电状态以外,充电器的充电状态还可包括其他实施方式,这里不做过多限定。In this embodiment, the charging state of the charger includes five charging states. In addition to the above five charging states, the charging state of the charger may also include other implementations, which are not too limited here.

本公开的实施例提供的充电方法,可预先将充电器的充电状态划分为五种状态,并预先为每种状态配置对应的电子设备的充电策略,以控制对电子设备进行充电,可避免短路故障导致电子设备的充电断续、充电失败等问题,提高了电子设备的充电连续性和可靠性。The charging method provided by the embodiments of the present disclosure can pre-divide the charging status of the charger into five states, and pre-configure the corresponding charging strategy of the electronic device for each state to control the charging of the electronic device and avoid short circuits. The fault causes problems such as intermittent charging and charging failure of electronic equipment, which improves the charging continuity and reliability of electronic equipment.

为使本领域技术人员更清楚地了解本公开,图4是根据另一示例性实施例示出的一种充电方法的流程图,如图4所示,本公开实施例的充电方法,包括以下步骤。In order to allow those skilled in the art to understand the present disclosure more clearly, Figure 4 is a flow chart of a charging method according to another exemplary embodiment. As shown in Figure 4, the charging method according to the embodiment of the present disclosure includes the following steps: .

S401,响应于充电器与电子设备的充电接口连接,确定第一协议为电子设备的充电协议。S401. In response to the connection between the charger and the charging interface of the electronic device, determine the first protocol as the charging protocol of the electronic device.

S402,获取电子设备的充电接口的供电引脚和通信引脚之间的阻抗值。S402: Obtain the impedance value between the power supply pin and the communication pin of the charging interface of the electronic device.

比如,可获取电子设备的充电接口的VBUS引脚和CC引脚之间的阻抗值。For example, the impedance value between the VBUS pin and CC pin of the charging interface of the electronic device can be obtained.

S403,识别阻抗值是否小于35 KΩ。S403, identify whether the impedance value is less than 35 KΩ.

如果是,即阻抗值R<35KΩ,则执行步骤S404;如果否,即阻抗值R≥35 KΩ,则执行步骤S405。If yes, that is, the impedance value R<35 KΩ, then step S404 is executed; if not, that is, the impedance value R≥35 KΩ, then step S405 is executed.

S404,控制停止对电子设备进行充电。S404, control to stop charging the electronic device.

S405,识别阻抗值是否小于77KΩ。S405, identify whether the impedance value is less than 77KΩ.

如果是,即35KΩ≤阻抗值R<77KΩ,则执行步骤S406;如果否,即阻抗值R≥77 KΩ,则执行步骤S407。If yes, that is, 35KΩ≤impedance value R<77KΩ, then step S406 is executed; if not, that is, impedance value R≥77KΩ, then step S407 is executed.

S406,将电子设备的充电电压更新为5V,并按照5V的充电电压,控制对电子设备进行充电。S406: Update the charging voltage of the electronic device to 5V, and control the charging of the electronic device according to the charging voltage of 5V.

S407,识别阻抗值是否小于82KΩ。S407, identify whether the impedance value is less than 82KΩ.

如果是,即77KΩ≤阻抗值R<82KΩ,则执行步骤S408;如果否,即阻抗值R≥82KΩ,则执行步骤S409。If yes, that is, 77KΩ≤impedance value R<82KΩ, then step S408 is executed; if not, that is, impedance value R≥82KΩ, then step S409 is executed.

S408,将电子设备的充电电压更新为9V,并按照9V的充电电压,控制对电子设备进行充电。S408 updates the charging voltage of the electronic device to 9V, and controls the charging of the electronic device according to the 9V charging voltage.

S409,识别阻抗值是否小于166KΩ。S409, identify whether the impedance value is less than 166KΩ.

如果是,即82KΩ≤阻抗值R<166KΩ,则执行步骤S410;如果否,即阻抗值R≥166KΩ,则执行步骤S411。If yes, that is, 82KΩ≤impedance value R<166KΩ, then step S410 is executed; if not, that is, impedance value R≥166KΩ, then step S411 is executed.

S410,将电子设备的充电协议从第一协议更新为第二协议,并按照第二协议控制对电子设备进行充电。S410. Update the charging protocol of the electronic device from the first protocol to the second protocol, and control the charging of the electronic device according to the second protocol.

S411,按照第一协议控制对电子设备进行充电。S411, control charging of the electronic device according to the first protocol.

S412,生成用于指示电子设备的充电接口存在短路故障的提醒信息。S412. Generate reminder information indicating that the charging interface of the electronic device has a short circuit fault.

步骤S401-S412的相关内容,可参见上述实施例,这里不再赘述。For the relevant content of steps S401-S412, please refer to the above embodiment and will not be described again here.

图5是根据一示例性实施例示出的一种充电装置的框图。参照图5,本公开实施例的充电装置100,包括:确定模块110、获取模块120和控制模块130。FIG. 5 is a block diagram of a charging device according to an exemplary embodiment. Referring to FIG. 5 , the charging device 100 according to the embodiment of the present disclosure includes: a determination module 110 , an acquisition module 120 and a control module 130 .

确定模块110被配置为执行响应于充电器与电子设备的充电接口连接,确定第一协议为所述电子设备的充电协议;The determining module 110 is configured to perform, in response to the charger connecting to the charging interface of the electronic device, determining the first protocol to be the charging protocol of the electronic device;

获取模块120被配置为执行获取所述电子设备的充电接口的第一引脚和第二引脚之间的阻抗值;The acquisition module 120 is configured to obtain the impedance value between the first pin and the second pin of the charging interface of the electronic device;

控制模块130被配置为执行基于所述阻抗值,控制对所述电子设备进行充电。The control module 130 is configured to control charging of the electronic device based on the impedance value.

在本公开的一个实施例中,所述控制模块130还被配置为执行:基于所述阻抗值,确定所述充电器的充电状态;基于所述充电器的充电状态,控制对所述电子设备进行充电。In one embodiment of the present disclosure, the control module 130 is further configured to: determine the charging state of the charger based on the impedance value; control the charging state of the electronic device based on the charging state of the charger to charge.

在本公开的一个实施例中,所述控制模块130还被配置为执行:若所述充电器和所述电子设备之间的第一协议通信失败,控制停止对所述电子设备进行充电。In one embodiment of the present disclosure, the control module 130 is further configured to perform: if the first protocol communication between the charger and the electronic device fails, control to stop charging the electronic device.

在本公开的一个实施例中,所述控制模块130还被配置为执行:若所述充电器请求充电电压为第一电压失败,且所述充电器出现充电中断,将所述电子设备的充电电压更新为第二电压;按照所述第二电压,控制对所述电子设备进行充电;其中,所述第一电压、所述第二电压处于所述第一协议配置的充电电压的取值范围内,所述第二电压小于所述第一电压。In one embodiment of the present disclosure, the control module 130 is further configured to perform: if the charger fails to request the charging voltage to be the first voltage and the charger has a charging interruption, the electronic device is charged. The voltage is updated to a second voltage; according to the second voltage, the electronic device is controlled to be charged; wherein the first voltage and the second voltage are within the value range of the charging voltage configured by the first protocol. , the second voltage is smaller than the first voltage.

在本公开的一个实施例中,所述控制模块130还被配置为执行:若所述充电器请求充电电压为第一电压成功,且所述充电器请求充电电压为第三电压失败,且所述充电器未出现充电中断,将所述电子设备的充电电压更新为所述第一电压;按照所述第一电压,控制对所述电子设备进行充电;其中,所述第一电压、所述第三电压处于所述第一协议配置的充电电压的取值范围内,所述第一电压小于所述第三电压。In one embodiment of the present disclosure, the control module 130 is further configured to execute: if the charger's request for the charging voltage to be the first voltage succeeds, and the charger's request for the charging voltage to be the third voltage fails, and the charger fails to request the charging voltage to be the third voltage, The charger updates the charging voltage of the electronic device to the first voltage without charging interruption; controls charging of the electronic device according to the first voltage; wherein the first voltage, the The third voltage is within the value range of the charging voltage configured by the first protocol, and the first voltage is smaller than the third voltage.

在本公开的一个实施例中,所述控制模块130还被配置为执行:若所述充电器请求充电电压为第一电压成功,且所述充电器请求充电电压为第三电压失败,且所述充电器出现充电中断,将所述电子设备的充电协议从所述第一协议更新为第二协议;按照所述第二协议,控制对所述电子设备进行充电;其中,所述第一电压、所述第三电压处于所述第一协议配置的充电电压的取值范围内,所述第一电压小于所述第三电压。In one embodiment of the present disclosure, the control module 130 is further configured to execute: if the charger's request for the charging voltage to be the first voltage succeeds, and the charger's request for the charging voltage to be the third voltage fails, and the charger fails to request the charging voltage to be the third voltage, When a charging interruption occurs in the charger, the charging protocol of the electronic device is updated from the first protocol to a second protocol; according to the second protocol, the charging of the electronic device is controlled; wherein the first voltage , the third voltage is within the value range of the charging voltage configured by the first protocol, and the first voltage is smaller than the third voltage.

在本公开的一个实施例中,所述控制模块130还被配置为执行:若所述充电器和所述电子设备之间的第一协议通信成功,且所述充电器请求充电电压未出现异常,且所述电子设备的充电接口的温度大于设定阈值,按照所述第一协议,控制对所述电子设备进行充电。In one embodiment of the present disclosure, the control module 130 is further configured to execute: if the first protocol communication between the charger and the electronic device is successful, and the charger requests a charging voltage without abnormality. , and the temperature of the charging interface of the electronic device is greater than the set threshold, the charging of the electronic device is controlled according to the first protocol.

在本公开的一个实施例中,所述获取所述电子设备的充电接口的第一引脚和第二引脚之间的阻抗值之后,所述控制模块130还被配置为执行:生成用于指示所述电子设备的充电接口存在短路故障的提醒信息。In one embodiment of the present disclosure, after obtaining the impedance value between the first pin and the second pin of the charging interface of the electronic device, the control module 130 is further configured to perform: generate Alert information indicating that there is a short circuit fault in the charging interface of the electronic device.

在本公开的一个实施例中,所述第一引脚为供电引脚、所述第二引脚为通信引脚。In one embodiment of the present disclosure, the first pin is a power supply pin and the second pin is a communication pin.

关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the devices in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

本公开的实施例提供的充电装置,响应于充电器与电子设备的充电接口连接,确定第一协议为电子设备的充电协议,获取电子设备的充电接口的第一引脚和第二引脚之间的阻抗值,基于阻抗值,控制对电子设备进行充电。由此,在电子设备的充电接口的第一引脚和第二引脚之间短路时,可考虑到第一引脚和第二引脚之间的阻抗值,控制对电子设备进行充电,可避免短路故障导致电子设备的充电断续、充电失败等问题,提高了电子设备的充电连续性和可靠性。The charging device provided by the embodiment of the present disclosure determines the first protocol as the charging protocol of the electronic device in response to the connection between the charger and the charging interface of the electronic device, and obtains one of the first pin and the second pin of the charging interface of the electronic device. The impedance value between the two devices controls the charging of the electronic device based on the impedance value. Therefore, when there is a short circuit between the first pin and the second pin of the charging interface of the electronic device, the impedance value between the first pin and the second pin can be taken into account to control the charging of the electronic device. It avoids problems such as intermittent charging and charging failure of electronic equipment caused by short-circuit faults, and improves the charging continuity and reliability of electronic equipment.

图6是根据一示例性实施例示出的一种电子设备200的框图。FIG. 6 is a block diagram of an electronic device 200 according to an exemplary embodiment.

如图6所示,上述电子设备200包括:As shown in Figure 6, the above-mentioned electronic device 200 includes:

存储器210及处理器220,连接不同组件(包括存储器210和处理器220)的总线230,存储器210存储有计算机程序,当处理器220执行所述程序时实现本公开实施例所述的充电方法。The memory 210 and the processor 220 are connected to the bus 230 of different components (including the memory 210 and the processor 220). The memory 210 stores a computer program. When the processor 220 executes the program, the charging method described in the embodiment of the present disclosure is implemented.

总线230表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(ISA)总线,微通道体系结构(MAC)总线,增强型ISA总线、视频电子标准协会(VESA)局域总线以及外围组件互连(PCI)总线。Bus 230 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics accelerated port, a processor, or a local bus using any of a variety of bus structures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect ( PCI) bus.

电子设备200典型地包括多种电子设备可读介质。这些介质可以是任何能够被电子设备200访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。Electronic device 200 typically includes a variety of electronic device-readable media. These media can be any available media that can be accessed by electronic device 200, including volatile and nonvolatile media, removable and non-removable media.

存储器210还可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(RAM)240和/或高速缓存存储器250。电子设备200可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统260可以用于读写不可移动的、非易失性磁介质(图6未显示,通常称为“硬盘驱动器”)。尽管图6中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如CD-ROM, DVD-ROM或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线230相连。存储器210可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本公开各实施例的功能。Memory 210 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 240 and/or cache memory 250 . Electronic device 200 may further include other removable/non-removable, volatile/non-volatile computer system storage media. By way of example only, storage system 260 may be used to read and write to non-removable, non-volatile magnetic media (not shown in Figure 6 and commonly referred to as a "hard drive"). Although not shown in FIG. 6, a disk drive may be provided for reading and writing to removable non-volatile disks (e.g., "floppy disks"), and for removable non-volatile optical disks (e.g., CD-ROM, DVD-ROM or other optical media) that can read and write optical disc drives. In these cases, each drive may be connected to bus 230 through one or more data media interfaces. The memory 210 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of embodiments of the present disclosure.

具有一组(至少一个)程序模块270的程序/实用工具280,可以存储在例如存储器210中,这样的程序模块270包括——但不限于——操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块270通常执行本公开所描述的实施例中的功能和/或方法。A program/utility 280 having a set of (at least one) program modules 270 , which may be stored, for example, in the memory 210 , such program modules 270 including, but not limited to, an operating system, one or more application programs, other programs Modules, as well as program data, each of these examples or some combination may include an implementation of a network environment. Program modules 270 generally perform functions and/or methods in the embodiments described in this disclosure.

电子设备200也可以与一个或多个外部设备290(例如键盘、指向设备、显示器291等)通信,还可与一个或者多个使得用户能与该电子设备200交互的设备通信,和/或与使得该电子设备200能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口292进行。并且,电子设备200还可以通过网络适配器293与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图6所示,网络适配器293通过总线230与电子设备200的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备200使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。Electronic device 200 may also communicate with one or more external devices 290 (e.g., keyboard, pointing device, display 291 , etc.), with one or more devices that enable a user to interact with electronic device 200 , and/or with Any device (eg, network card, modem, etc.) that enables the electronic device 200 to communicate with one or more other computing devices. This communication may occur through input/output (I/O) interface 292. Furthermore, the electronic device 200 may also communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 293 . As shown in FIG. 6 , network adapter 293 communicates with other modules of electronic device 200 through bus 230 . It should be understood that, although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.

处理器220通过运行存储在存储器210中的程序,从而执行各种功能应用以及数据处理。The processor 220 executes various functional applications and data processing by running programs stored in the memory 210 .

需要说明的是,本实施例的电子设备的实施过程和技术原理参见前述对本公开实施例的充电方法的解释说明,此处不再赘述。It should be noted that, for the implementation process and technical principles of the electronic device of this embodiment, please refer to the aforementioned explanation of the charging method of the embodiment of the present disclosure, and will not be described again here.

本公开实施例提供的电子设备,可以执行如前所述的充电方法,响应于充电器与电子设备的充电接口连接,确定第一协议为电子设备的充电协议,获取电子设备的充电接口的第一引脚和第二引脚之间的阻抗值,基于阻抗值,控制对电子设备进行充电。由此,在电子设备的充电接口的第一引脚和第二引脚之间短路时,可考虑到第一引脚和第二引脚之间的阻抗值,控制对电子设备进行充电,可避免短路故障导致电子设备的充电断续、充电失败等问题,提高了电子设备的充电连续性和可靠性。The electronic device provided by the embodiment of the present disclosure can perform the charging method as described above, and in response to the connection between the charger and the charging interface of the electronic device, determine the first protocol as the charging protocol of the electronic device, and obtain the third protocol of the charging interface of the electronic device. The impedance value between the first pin and the second pin controls charging of the electronic device based on the impedance value. Therefore, when there is a short circuit between the first pin and the second pin of the charging interface of the electronic device, the impedance value between the first pin and the second pin can be taken into account to control the charging of the electronic device. It avoids problems such as intermittent charging and charging failure of electronic equipment caused by short-circuit faults, and improves the charging continuity and reliability of electronic equipment.

为了实现上述实施例,本公开还提出一种计算机可读存储介质,其上存储有计算机程序指令,该程序指令被处理器执行时实现本公开提供的充电方法的步骤。In order to implement the above embodiments, the present disclosure also proposes a computer-readable storage medium on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the charging method provided by the present disclosure are implemented.

可选的,计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。Optionally, the computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.

本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the disclosure that follow the general principles of the disclosure and include common common sense or customary technical means in the technical field that are not disclosed in the disclosure. . It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the disclosure is limited only by the appended claims.

Claims (9)

1.一种充电方法,其特征在于,包括:1. A charging method, characterized in that it includes: 响应于充电器与电子设备的充电接口连接,确定第一协议为所述电子设备的充电协议;In response to the connection between the charger and the charging interface of the electronic device, determining the first protocol as the charging protocol of the electronic device; 获取所述电子设备的充电接口的第一引脚和第二引脚之间的阻抗值,所述第一引脚为供电引脚、所述第二引脚为通信引脚;Obtain the impedance value between the first pin and the second pin of the charging interface of the electronic device, where the first pin is the power supply pin and the second pin is the communication pin; 基于所述阻抗值,确定所述充电器的充电状态;Based on the impedance value, determine the charging state of the charger; 基于所述充电器的充电状态,控制对所述电子设备进行充电;Control charging of the electronic device based on the charging status of the charger; 所述基于所述充电器的充电状态,控制对所述电子设备进行充电,包括:Controlling charging of the electronic device based on the charging state of the charger includes: 若所述充电器请求充电电压为第一电压失败,且所述充电器出现充电中断,将所述电子设备的充电电压更新为第二电压;If the charger fails to request the charging voltage to be the first voltage and the charger encounters a charging interruption, update the charging voltage of the electronic device to the second voltage; 按照所述第二电压,控制对所述电子设备进行充电;其中,Control charging of the electronic device according to the second voltage; wherein, 所述第一电压、所述第二电压处于所述第一协议配置的充电电压的取值范围内,所述第二电压小于所述第一电压。The first voltage and the second voltage are within the value range of the charging voltage configured by the first protocol, and the second voltage is smaller than the first voltage. 2.根据权利要求1所述的方法,其特征在于,所述基于所述充电器的充电状态,控制对所述电子设备进行充电,包括:2. The method according to claim 1, wherein controlling the charging of the electronic device based on the charging state of the charger includes: 若所述充电器和所述电子设备之间的第一协议通信失败,控制停止对所述电子设备进行充电。If the first protocol communication between the charger and the electronic device fails, control stops charging the electronic device. 3.根据权利要求1所述的方法,其特征在于,所述基于所述充电器的充电状态,控制对所述电子设备进行充电,包括:3. The method of claim 1, wherein controlling the charging of the electronic device based on the charging state of the charger includes: 若所述充电器请求充电电压为第一电压成功,且所述充电器请求充电电压为第三电压失败,且所述充电器未出现充电中断,将所述电子设备的充电电压更新为所述第一电压;If the charger succeeds in requesting the charging voltage to be the first voltage, and the charger fails to request the charging voltage to be the third voltage, and there is no charging interruption in the charger, the charging voltage of the electronic device is updated to the first voltage; 按照所述第一电压,控制对所述电子设备进行充电;其中,Control charging of the electronic device according to the first voltage; wherein, 所述第一电压、所述第三电压处于所述第一协议配置的充电电压的取值范围内,所述第一电压小于所述第三电压。The first voltage and the third voltage are within the value range of the charging voltage configured by the first protocol, and the first voltage is smaller than the third voltage. 4.根据权利要求1所述的方法,其特征在于,所述基于所述充电器的充电状态,控制对所述电子设备进行充电,包括:4. The method of claim 1, wherein controlling the charging of the electronic device based on the charging state of the charger includes: 若所述充电器请求充电电压为第一电压成功,且所述充电器请求充电电压为第三电压失败,且所述充电器出现充电中断,将所述电子设备的充电协议从所述第一协议更新为第二协议;If the charger succeeds in requesting the charging voltage to be the first voltage, and the charger fails to request the charging voltage to be the third voltage, and a charging interruption occurs in the charger, the charging protocol of the electronic device is changed from the first voltage to the first voltage. The agreement is updated to a second agreement; 按照所述第二协议,控制对所述电子设备进行充电;其中,According to the second protocol, the charging of the electronic device is controlled; wherein, 所述第一电压、所述第三电压处于所述第一协议配置的充电电压的取值范围内,所述第一电压小于所述第三电压。The first voltage and the third voltage are within the value range of the charging voltage configured by the first protocol, and the first voltage is smaller than the third voltage. 5.根据权利要求1所述的方法,其特征在于,所述基于所述充电器的充电状态,控制对所述电子设备进行充电,包括:5. The method of claim 1, wherein controlling the charging of the electronic device based on the charging state of the charger includes: 若所述充电器和所述电子设备之间的第一协议通信成功,且所述充电器请求充电电压未出现异常,且所述电子设备的充电接口的温度大于设定阈值,按照所述第一协议,控制对所述电子设备进行充电。If the first protocol communication between the charger and the electronic device is successful, and the charger's requested charging voltage does not appear abnormal, and the temperature of the charging interface of the electronic device is greater than the set threshold, according to the third A protocol to control charging of the electronic device. 6.根据权利要求1-5中任一项所述的方法,其特征在于,所述获取所述电子设备的充电接口的第一引脚和第二引脚之间的阻抗值之后,还包括:6. The method according to any one of claims 1 to 5, characterized in that after obtaining the impedance value between the first pin and the second pin of the charging interface of the electronic device, further comprising: : 生成用于指示所述电子设备的充电接口存在短路故障的提醒信息。Alert information indicating that a short circuit fault exists in the charging interface of the electronic device is generated. 7.一种充电装置,其特征在于,包括:7. A charging device, characterized in that it includes: 确定模块,被配置为执行响应于充电器与电子设备的充电接口连接,确定第一协议为所述电子设备的充电协议;a determining module configured to determine the first protocol as the charging protocol of the electronic device in response to the connection between the charger and the electronic device; 获取模块,被配置为执行获取所述电子设备的充电接口的第一引脚和第二引脚之间的阻抗值,所述第一引脚为供电引脚、所述第二引脚为通信引脚;Obtaining module, configured to obtain the impedance value between the first pin and the second pin of the charging interface of the electronic device, the first pin being the power supply pin and the second pin being the communication pin. pin; 控制模块,被配置为执行基于所述阻抗值,确定所述充电器的充电状态;a control module configured to determine the charging state of the charger based on the impedance value; 基于所述充电器的充电状态,控制对所述电子设备进行充电;Control charging of the electronic device based on the charging status of the charger; 所述基于所述充电器的充电状态,控制对所述电子设备进行充电,包括:Controlling charging of the electronic device based on the charging state of the charger includes: 若所述充电器请求充电电压为第一电压失败,且所述充电器出现充电中断,将所述电子设备的充电电压更新为第二电压;If the charger fails to request the charging voltage to be the first voltage and the charger encounters a charging interruption, update the charging voltage of the electronic device to the second voltage; 按照所述第二电压,控制对所述电子设备进行充电;其中,Control charging of the electronic device according to the second voltage; wherein, 所述第一电压、所述第二电压处于所述第一协议配置的充电电压的取值范围内,所述第二电压小于所述第一电压。The first voltage and the second voltage are within the value range of the charging voltage configured by the first protocol, and the second voltage is smaller than the first voltage. 8.一种电子设备,其特征在于,包括:8. An electronic device, characterized in that it includes: 处理器;processor; 用于存储处理器可执行指令的存储器;Memory used to store instructions executable by the processor; 其中,所述处理器被配置为:Wherein, the processor is configured as: 实现权利要求1-6中任一项所述方法的步骤。Implement the steps of the method according to any one of claims 1-6. 9.一种计算机可读存储介质,其上存储有计算机程序指令,其特征在于,该程序指令被处理器执行时实现权利要求1-6中任一项所述方法的步骤。9. A computer-readable storage medium with computer program instructions stored thereon, characterized in that when the program instructions are executed by a processor, the steps of the method according to any one of claims 1-6 are implemented.
CN202311000968.XA 2023-08-10 2023-08-10 Charging method, charging device, electronic equipment and storage medium Active CN116742761B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311000968.XA CN116742761B (en) 2023-08-10 2023-08-10 Charging method, charging device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311000968.XA CN116742761B (en) 2023-08-10 2023-08-10 Charging method, charging device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116742761A CN116742761A (en) 2023-09-12
CN116742761B true CN116742761B (en) 2023-11-17

Family

ID=87909912

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311000968.XA Active CN116742761B (en) 2023-08-10 2023-08-10 Charging method, charging device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116742761B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI901098B (en) 2024-04-26 2025-10-11 神基科技股份有限公司 Detection method of universal serial bus type-c

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102243618A (en) * 2010-05-11 2011-11-16 联发科技股份有限公司 Universal serial bus device, bus interface device and method
CN106199731A (en) * 2016-08-18 2016-12-07 乐视控股(北京)有限公司 A kind of detection method, device and charger
CN107359663A (en) * 2017-08-04 2017-11-17 芯海科技(深圳)股份有限公司 One kind is based on fast charge agreement MCU control regulators and pressure regulation method
CN108599281A (en) * 2017-09-11 2018-09-28 青岛海信移动通信技术股份有限公司 a kind of mobile terminal and charging method
CN109245195A (en) * 2018-08-20 2019-01-18 奇酷互联网络科技(深圳)有限公司 The method, apparatus and storage device of mobile terminal and charging process
CN109862457A (en) * 2018-12-25 2019-06-07 维沃移动通信有限公司 Terminal equipment, adapter and charging method
CN110492575A (en) * 2019-09-05 2019-11-22 深圳传音控股股份有限公司 For the quick charging system and method for handheld device, handheld device
CN111201689A (en) * 2017-12-11 2020-05-26 深圳市柔宇科技有限公司 Electronic equipment and charging control method
CN111900781A (en) * 2020-09-29 2020-11-06 深圳英集芯科技有限公司 Charging method, charging device and charging control chip
CN112510271A (en) * 2020-11-27 2021-03-16 郑州大学 Lithium ion battery real-time overcharge and thermal runaway prediction method based on dynamic impedance
CN113241822A (en) * 2021-05-17 2021-08-10 广东小天才科技有限公司 A fill device soon for wearable equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6954867B2 (en) * 2002-07-26 2005-10-11 Microsoft Corporation Capacitive sensing employing a repeatable offset charge

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102243618A (en) * 2010-05-11 2011-11-16 联发科技股份有限公司 Universal serial bus device, bus interface device and method
CN106199731A (en) * 2016-08-18 2016-12-07 乐视控股(北京)有限公司 A kind of detection method, device and charger
CN107359663A (en) * 2017-08-04 2017-11-17 芯海科技(深圳)股份有限公司 One kind is based on fast charge agreement MCU control regulators and pressure regulation method
CN108599281A (en) * 2017-09-11 2018-09-28 青岛海信移动通信技术股份有限公司 a kind of mobile terminal and charging method
CN111201689A (en) * 2017-12-11 2020-05-26 深圳市柔宇科技有限公司 Electronic equipment and charging control method
CN109245195A (en) * 2018-08-20 2019-01-18 奇酷互联网络科技(深圳)有限公司 The method, apparatus and storage device of mobile terminal and charging process
CN109862457A (en) * 2018-12-25 2019-06-07 维沃移动通信有限公司 Terminal equipment, adapter and charging method
CN110492575A (en) * 2019-09-05 2019-11-22 深圳传音控股股份有限公司 For the quick charging system and method for handheld device, handheld device
CN111900781A (en) * 2020-09-29 2020-11-06 深圳英集芯科技有限公司 Charging method, charging device and charging control chip
CN112510271A (en) * 2020-11-27 2021-03-16 郑州大学 Lithium ion battery real-time overcharge and thermal runaway prediction method based on dynamic impedance
CN113241822A (en) * 2021-05-17 2021-08-10 广东小天才科技有限公司 A fill device soon for wearable equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI901098B (en) 2024-04-26 2025-10-11 神基科技股份有限公司 Detection method of universal serial bus type-c

Also Published As

Publication number Publication date
CN116742761A (en) 2023-09-12

Similar Documents

Publication Publication Date Title
US20180004277A1 (en) Information processing apparatus, information processing method, and recording medium on which computer-readable program is recorded
CN106294229B (en) It is read while in serial interface memory and write-in storage operation
CN108845655B (en) Electronic equipment control method, device, control circuit and electronic equipment
JP3854175B2 (en) ELECTRIC DEVICE, COMPUTER DEVICE, CONTROLLER, BATTERY SWITCHING METHOD, AND PROGRAM
US10452112B2 (en) Information processing apparatus, information processing method, and recording medium recording computer-readable program
WO2013109640A1 (en) Techniques for command validation for access to a storage device by a remote client
JPS63184124A (en) Job rescue system during suspension of power supply
US11474579B2 (en) Verified high-power transition and fast charging with pre-boot scaling
CN104484264A (en) Hard disk state indication method and hard disk state indication device
CN106786960A (en) Charge control method, device and terminal
CN112187252A (en) Interface identification circuit, method, equipment and electronic equipment
JP2012093926A (en) Communication speed control device and communication speed control method
CN107885683A (en) A kind of current test method of terminal and terminal
TW202001473A (en) Electronic system capable of detecting number of times for hot plugs
JP2003295980A (en) Confirmation method for electric equipment, computer device, intelligent battery and ac adaptor
US20220066836A1 (en) Adaptive prioritization of usb traffic
CN116742761B (en) Charging method, charging device, electronic equipment and storage medium
US20150242219A1 (en) Computer system and control method
CN113872303B (en) Charging control method, device, electronic device and storage medium
CN114844179B (en) Electronic device and electricity meter resetting method
CN116539992A (en) Device, method, logic module and medium for in-position stable state detection of storage equipment
CN114153388B (en) Hard disk system, hard disk configuration information refreshing method, device and medium
CN112131160B (en) Working mode switching circuit, working mode switching method and robot
CN110442539B (en) Mobile phone OTG switching method and device
CN108879589B (en) Overcurrent protection method and device, terminal equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant