CN106292977A - Adapter identification method and terminal - Google Patents

Adapter identification method and terminal Download PDF

Info

Publication number
CN106292977A
CN106292977A CN201610597603.3A CN201610597603A CN106292977A CN 106292977 A CN106292977 A CN 106292977A CN 201610597603 A CN201610597603 A CN 201610597603A CN 106292977 A CN106292977 A CN 106292977A
Authority
CN
China
Prior art keywords
adapter
terminal
type
input voltage
input
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.)
Granted
Application number
CN201610597603.3A
Other languages
Chinese (zh)
Other versions
CN106292977B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610597603.3A priority Critical patent/CN106292977B/en
Publication of CN106292977A publication Critical patent/CN106292977A/en
Application granted granted Critical
Publication of CN106292977B publication Critical patent/CN106292977B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The embodiment of the invention provides an adapter identification method, which comprises the following steps: the USB cable is connected with the adapter through a Universal Serial Bus (USB) line matched with the adapter, wherein the VBUS line of the USB line is at least connected with a resistor in series; determining an input voltage of an input terminal of the adapter after the adapter is connected to a power supply; and identifying the adapter according to the input voltage to obtain the type of the adapter. The embodiment of the invention also provides the terminal. The embodiment of the invention can reduce the production cost of the adapter.

Description

一种适配器识别方法及终端Adapter identification method and terminal

技术领域technical field

本发明涉及数据处理技术领域,具体涉及一种适配器识别方法及终端。The invention relates to the technical field of data processing, in particular to an adapter identification method and a terminal.

背景技术Background technique

随着信息技术快速发展,终端(如手机、平板电脑等)已经成为用户生活中不可分割的一部分,通常情况下,终端的充电接口通过通用串行总线(Universal Serial Bus,USB)线与适配器连接,在适配器接入电源后,对终端进行充电。现有技术中,对同一个类型的适配器识别,通常会在设计适配器时采用不同的内部构造的,对应识别不同类型的适配器,不同类型的适配器之间需要用不同的工艺进行生产,因此,会造成适配器的成本较高。With the rapid development of information technology, terminals (such as mobile phones, tablet computers, etc.) have become an inseparable part of users' lives. Usually, the charging interface of the terminal is connected to the adapter through a Universal Serial Bus (USB) cable , after the adapter is connected to the power supply, the terminal is charged. In the prior art, for the identification of the same type of adapter, different internal structures are usually used in the design of the adapter, corresponding to the identification of different types of adapters, and different types of adapters need to be produced with different processes. Therefore, there will be The cost of the adapter is higher.

发明内容Contents of the invention

本发明实施例提供了一种适配器识别方法及终端,可降低适配器的生产成本。The embodiment of the present invention provides an adapter identification method and a terminal, which can reduce the production cost of the adapter.

本发明实施例第一方面提供了一种适配器识别方法,包括:The first aspect of the embodiment of the present invention provides an adapter identification method, including:

通过适配器配套的通用串行总线USB线与所述适配器之间进行连接,其中,所述USB线的VBUS线至少串联一个电阻;The adapter is connected to the adapter through a universal serial bus USB line, wherein the VBUS line of the USB line is connected in series with at least one resistor;

在所述适配器接入电源后,确定由所述适配器输入终端的输入电压;After the adapter is powered on, determine the input voltage of the adapter input terminal;

根据所述输入电压对所述适配器进行识别,得到所述适配器的类型。The adapter is identified according to the input voltage to obtain the type of the adapter.

本发明实施例第二方面提供了一种终端,包括:The second aspect of the embodiment of the present invention provides a terminal, including:

连接单元,用于通过与适配器配套的通用串行总线USB线与所述适配器之间进行连接,其中,所述USB线的VBUS线至少串联一个电阻;A connection unit, configured to connect to the adapter through a Universal Serial Bus (USB) line matched with the adapter, wherein the VBUS line of the USB line is connected in series with at least one resistor;

第一确定单元,用于在所述适配器接入电源后,确定由所述适配器输入终端的输入电压;a first determining unit, configured to determine the input voltage input to the terminal by the adapter after the adapter is powered on;

识别单元,用于根据所述输入电压对所述适配器进行识别,得到所述适配器的类型。The identifying unit is configured to identify the adapter according to the input voltage to obtain the type of the adapter.

本发明实施例第三方面提供了一种终端,包括:The third aspect of the embodiment of the present invention provides a terminal, including:

处理器和存储器;processor and memory;

其中,所述处理器用于调用所述存储器中的所述可执行程序代码,执行第一方面的部分或者全部步骤。Wherein, the processor is configured to call the executable program code in the memory to execute part or all of the steps in the first aspect.

实施本发明实施例,具有如下有益效果:Implementing the embodiment of the present invention has the following beneficial effects:

可以看出,通过本发明实施例,通过与适配器配套的通用串行总线USB线与该适配器之间进行连接,其中,该USB线的VBUS线至少串联一个电阻,在适配器接入电源后,确定由适配器输入终端的输入电压,根据输入电压对适配器进行识别,得到适配器的类型。因此,可利用适配器输入终端的输入电压确定适配器的类型,可降低对适配器类型结构的设计及工艺复杂度,从而,可降低适配器的生产成本。It can be seen that, through the embodiment of the present invention, the adapter is connected to the adapter through the USB line of the universal serial bus, wherein the VBUS line of the USB line is connected in series with at least one resistor. After the adapter is connected to the power supply, it is determined According to the input voltage of the adapter input terminal, the adapter is identified according to the input voltage, and the type of the adapter is obtained. Therefore, the type of the adapter can be determined by using the input voltage of the input terminal of the adapter, which can reduce the design and process complexity of the structure of the adapter type, thereby reducing the production cost of the adapter.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention. For Those of ordinary skill in the art can also obtain other drawings based on these drawings without making creative efforts.

图1是本发明实施例提供的一种充电接口的示意图;Fig. 1 is a schematic diagram of a charging interface provided by an embodiment of the present invention;

图2是本发明实施例提供的一种充电接口连接适配器的示意图;Fig. 2 is a schematic diagram of a charging interface connection adapter provided by an embodiment of the present invention;

图3是本发明实施例提供的一种适配器识别方法的第一实施例流程示意图;Fig. 3 is a schematic flowchart of a first embodiment of an adapter identification method provided by an embodiment of the present invention;

图4是本发明实施例提供的一种适配器识别方法的第二实施例流程示意图;FIG. 4 is a schematic flowchart of a second embodiment of an adapter identification method provided by an embodiment of the present invention;

图5a是本发明实施例提供的一种终端的第一实施例结构示意图;Fig. 5a is a schematic structural diagram of a first embodiment of a terminal provided by an embodiment of the present invention;

图5b是本发明实施例提供的图5a中所描述的终端的又一结构示意图;FIG. 5b is another schematic structural diagram of the terminal described in FIG. 5a provided by an embodiment of the present invention;

图5c是本发明实施例提供的图5a中所描述的终端的又一结构示意图;FIG. 5c is another schematic structural diagram of the terminal described in FIG. 5a provided by an embodiment of the present invention;

图5d是本发明实施例提供的图5a中所描述的终端的又一结构示意图;FIG. 5d is another schematic structural diagram of the terminal described in FIG. 5a provided by an embodiment of the present invention;

图5e是本发明实施例提供的图5a中所描述的终端的又一结构示意图;FIG. 5e is another schematic structural diagram of the terminal described in FIG. 5a provided by an embodiment of the present invention;

图6是本发明实施例提供的一种终端的第二实施例结构示意图。FIG. 6 is a schematic structural diagram of a second embodiment of a terminal provided by an embodiment of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

本发明的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third" and "fourth" in the description and claims of the present invention and the drawings are used to distinguish different objects, rather than to describe a specific order . Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally further includes For other steps or units inherent in these processes, methods, products or apparatuses.

在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present invention. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.

本发明实施例所描述的终端可以包括智能手机(如Android手机、iOS手机、Windows Phone手机等)、平板电脑、掌上电脑、笔记本电脑、移动互联网设备(MID,MobileInternet Devices)或穿戴式设备等,上述终端仅是举例,而非穷举,包含但不限于上述终端。The terminal described in the embodiment of the present invention may include a smart phone (such as an Android phone, an iOS phone, a Windows Phone, etc.), a tablet computer, a palmtop computer, a notebook computer, a mobile Internet device (MID, MobileInternet Devices) or a wearable device, etc. The above-mentioned terminals are only examples, not exhaustive, including but not limited to the above-mentioned terminals.

本发明实施例中,以智能手机为例进行说明,如图1所示,图1为终端的充电接口的简易示意图,通常的智能手机充电接口如下:包括五个信号脚,即:VBUS引脚、D+引脚、D-引脚、ID引脚以及GND引脚,并且,采用与适配器配套的USB线与该适配器连接或者直接与电源连接,接入电源后,并通过VBUS引脚来对终端的电池进行充电,同时,还可以通过D+引脚、D-引脚来进行数据通信,由于充电接口属于现有技术,其他引脚的功能在此不再赘述。上述USB线包含多条线,具体涉及到VBUS线、D+数据线和D-数据线。对于适配器充电来说,适配器将220V交流电变为5V直流电,然后,将5V电压加给VBUS线,VBUS线通过USB线来给终端供电,终端在获取到该5V电压后进行充电。如图2所示,图2为终端的充电接口连接适配器的示意图,其中,左边的充电接口为终端的充电接口,虚线部分为USB线(即将VBUS线、D+数据线、D-数据线及GND线封装在一条线缆中),USB线的VBUS线上串联一个电阻(该电阻可为等效电阻),右边的充电接口与适配器连接,在适配器上电后,可通过该方式对终端进行供电。In the embodiment of the present invention, a smart phone is taken as an example for illustration. As shown in FIG. 1, FIG. 1 is a simple schematic diagram of a charging interface of a terminal. A common charging interface of a smart phone is as follows: including five signal pins, namely: VBUS pins , D+ pin, D- pin, ID pin, and GND pin, and use the USB cable that matches the adapter to connect to the adapter or directly connect to the power supply. After connecting to the power supply, use the VBUS pin to connect the terminal At the same time, data communication can also be performed through the D+ pin and the D- pin. Since the charging interface belongs to the prior art, the functions of other pins will not be repeated here. The aforementioned USB line includes multiple lines, specifically related to the VBUS line, the D+ data line and the D- data line. For adapter charging, the adapter converts 220V AC power into 5V DC power, and then adds 5V voltage to the VBUS line, and the VBUS line supplies power to the terminal through the USB line, and the terminal charges after obtaining the 5V voltage. As shown in Figure 2, Figure 2 is a schematic diagram of connecting the charging interface of the terminal to the adapter. The cable is packaged in one cable), a resistor is connected in series with the VBUS line of the USB cable (this resistor can be an equivalent resistance), and the charging interface on the right is connected to the adapter. After the adapter is powered on, the terminal can be powered by this method .

可选地,本发明实施例中,适配器与该适配器配套的USB线之间的关系可分为如下两种情况:第一种情况,在适配器生产时,USB线可与适配器连在一起作为一个整体,如此,需要插入电源时,适配器一端通过USB线接入终端,适配器的另一端插入电源,如此,可对终端充电;第二种情况:USB线与适配器可拆分,在该情况下,USB线与适配器配套,即每一种适配器均有其对应的USB线,如此,需要插入电源时,USB线一端接入适配器,适配器插入电源,USB线另一端与终端的充电接口(USB接口)连接,可对终端充电,当然,在这种情况下,USB线还有其他用途,如:USB线一端插入电脑插口,另一端与终端的充电接口连接,可对终端充电,在该情况下,USB线既可以用来传输数据,又可以用来充电。Optionally, in the embodiment of the present invention, the relationship between the adapter and the USB cable matching the adapter can be divided into the following two situations: In the first situation, when the adapter is produced, the USB cable can be connected with the adapter as a As a whole, when it is necessary to plug in the power supply, one end of the adapter is connected to the terminal through the USB cable, and the other end of the adapter is plugged into the power supply, so that the terminal can be charged; the second case: the USB cable and the adapter can be separated, in this case, The USB cable is matched with the adapter, that is, each adapter has its corresponding USB cable. In this way, when the power needs to be plugged in, one end of the USB cable is connected to the adapter, the adapter is plugged into the power supply, and the other end of the USB cable is connected to the charging interface (USB interface) of the terminal. Of course, in this case, the USB cable has other uses, such as: one end of the USB cable is plugged into the computer socket, and the other end is connected to the charging interface of the terminal to charge the terminal. In this case, The USB cable can be used for both data transfer and charging.

基于上述图1与图2,请参阅图3,为本发明实施例提供的一种适配器识别方法的第一实施例流程示意图。本实施例中所描述的适配器识别方法,包括以下步骤:Based on the foregoing FIG. 1 and FIG. 2 , please refer to FIG. 3 , which is a schematic flowchart of a first embodiment of an adapter identification method provided by an embodiment of the present invention. The adapter identification method described in this embodiment includes the following steps:

301、通过与适配器配套的通用串行总线USB线与所述适配器之间进行连接,其中,所述USB线的VBUS线至少串联一个电阻。301. Connect the adapter with a universal serial bus USB cable matched with the adapter, wherein at least one resistor is connected in series with the VBUS line of the USB cable.

其中,在本发明实施例中USB线需与适配器配套。终端的充电接口(USB接口)与USB线的一端进行连接,USB线的另一端接入适配器,当然,适配器需接入电源,其中,USB线的VBUS线可至少串联一个电阻,该至少一个电阻可认为是一个等效电阻,即该等效电阻可由多个电阻串联或者并联。其中,该至少一个电阻的目的是为了降压处理,即降低由适配器输入终端的输入电压。Wherein, in the embodiment of the present invention, the USB cable needs to be matched with the adapter. The charging interface (USB interface) of the terminal is connected to one end of the USB cable, and the other end of the USB cable is connected to the adapter. Of course, the adapter needs to be connected to the power supply. Among them, the VBUS line of the USB cable can be connected in series with at least one resistor. The at least one resistor It can be regarded as an equivalent resistance, that is, the equivalent resistance can be connected in series or in parallel by multiple resistances. Wherein, the purpose of the at least one resistor is for step-down processing, that is, to reduce the input voltage from the input terminal of the adapter.

302、在所述适配器接入电源后,确定由所述适配器输入终端的输入电压。302. After the adapter is powered on, determine the input voltage input to the terminal by the adapter.

其中,在适配器接入电源后,此处,终端可检测到有外部电源为终端进行充电,终端可进入充电模式,当然,也可以显示终端被接入外部设备(如:终端与另一终端连接),从而,终端可确定适配器输入该终端的输入电压。具体地,终端可通过ADC转换技术确定由适配器输入终端的输入电压。倘若,在VBUS线没有串联电阻,那么,由适配器输入终端的输入电压等于5V或者近似为5V,若VBUS线至少串联了一个电阻,那么,由适配器输入终端的输入电压会小于5V。Among them, after the adapter is connected to the power supply, the terminal can detect that there is an external power supply to charge the terminal, and the terminal can enter the charging mode. Of course, it can also display that the terminal is connected to an external device (such as: the terminal is connected to another terminal. ), so that the terminal can determine the input voltage of the adapter into the terminal. Specifically, the terminal can determine the input voltage input to the terminal by the adapter through an ADC conversion technology. If there is no series resistor on the VBUS line, then the input voltage from the adapter input terminal is equal to 5V or approximately 5V, if at least one resistor is connected in series on the VBUS line, then the input voltage from the adapter input terminal will be less than 5V.

303、根据所述输入电压对所述适配器进行识别,得到所述适配器的类型。303. Identify the adapter according to the input voltage to obtain a type of the adapter.

可选地,由于上述输入电压不同,可确定的适配器类型也不一样,因此,可提前预设电压值与适配器类型之间的映射关系,然后,根据该预设的电压值与适配器类型之间的映射关系确定适配器的类型。如此,可将输入电压划分为多个等级,每一等级对应一个适配器类型,因此,在确定出输入电压之后,可根据输入电压的电压值确定适配器的类型。Optionally, since the aforementioned input voltages are different, the identifiable adapter types are also different. Therefore, the mapping relationship between the voltage value and the adapter type can be preset in advance, and then, according to the preset voltage value and the adapter type The mapping relationship determines the type of adapter. In this way, the input voltage can be divided into multiple levels, and each level corresponds to an adapter type. Therefore, after the input voltage is determined, the type of the adapter can be determined according to the voltage value of the input voltage.

可选地,在步骤303之后,还可包括步骤:按照预设的适配器类型与应用程序之间的映射关系,启动与所述适配器的类型对应的应用程序。每一适配器类型可与某一个或者多个应用程序之间建立映射关系。适配器类型可与应用程序之间一一对应映射关系,例如,适配器类型为A(任一类型)对应的应用程序为启动闹钟,适配器类型为B(不同于A的类型)对应的应用程序为终端静音处理,当然,也可以适配器类型可与应用程序之间一对多的映射关系,例如,适配器类型为A(任一类型)对应的应用程序为启动闹钟和终端静音处理。Optionally, after step 303, a step may further be included: according to the preset mapping relationship between the adapter type and the application program, start the application program corresponding to the adapter type. Each adapter type can establish a mapping relationship with one or more applications. There can be a one-to-one mapping relationship between the adapter type and the application program. For example, the application program corresponding to the adapter type A (any type) is to start the alarm clock, and the application program corresponding to the adapter type B (different from A type) is the terminal For mute processing, of course, there may also be a one-to-many mapping relationship between adapter types and applications. For example, the applications corresponding to adapter type A (any type) are alarm clock activation and terminal mute processing.

可选地,在步骤303之后,还可包括:按照预设的适配器类型与工作模式之间的映射关系,启动与所述适配器的类型对应的工作模式。可选地,工作模式可包括但不仅限于:会议模式,户外模式,静音模式,飞行模式等等。当然,预设的适配器类型与工作模式之间存在一一对应的映射关系。例如,适配器类型为A(任一类型)对应的工作模式为静音模式,适配器类型为B(不同于A的类型)对应的工作模式为飞行模式。Optionally, after step 303, the method may further include: activating the working mode corresponding to the adapter type according to the preset mapping relationship between the adapter type and the working mode. Optionally, the working mode may include but not limited to: meeting mode, outdoor mode, silent mode, flight mode and so on. Of course, there is a one-to-one mapping relationship between the preset adapter type and the working mode. For example, the working mode corresponding to the adapter type A (any type) is the silent mode, and the working mode corresponding to the adapter type B (different from A) is the flight mode.

可选地,在步骤303之后,还可包括如下步骤:Optionally, after step 303, the following steps may also be included:

110)、确定所述终端的电池的电压;110), determining the voltage of the battery of the terminal;

120)、根据所述终端的电池的电压进行充电。120). Charging according to the voltage of the battery of the terminal.

由上可知,在步骤110中,可先确定终端的电池的电压,当然,根据该电压可确定充电电压、充电电流及充电功率中的至少一个,可先以小电流的普通充电模式进行充电,然后以较大电流的快速充电模式进行充电,当然,在充电过程中,可包含恒流充电以及恒压充电这俩过程。It can be seen from the above that in step 110, the voltage of the battery of the terminal can be determined first, of course, at least one of the charging voltage, charging current and charging power can be determined according to the voltage, and charging can be performed in a normal charging mode with a small current first. Then charge in the fast charging mode with a large current. Of course, the charging process can include constant current charging and constant voltage charging.

可选地,上述至少一个电阻包含可调电阻,当然,可调电阻可用于调节电阻的大小,在调节可调电阻的电压值之后,适配器输入终端的输入电压则会改变,由此,也可以在适配器类型所支持的电压范围、电流范围或者输出功率范围内调节对终端进行充电的充电参数(如:电流,电压或者功率),因为任一终端均有其所支持的合适充电电压、充电电流或者充电功率,通过该方式,可使得终端进入最佳充电状态,因此,可实现加快对终端的快电速度。Optionally, at least one of the resistors includes an adjustable resistor. Of course, the adjustable resistor can be used to adjust the size of the resistor. After adjusting the voltage value of the adjustable resistor, the input voltage of the adapter input terminal will change. Therefore, it can also be Adjust the charging parameters (such as: current, voltage or power) for charging the terminal within the voltage range, current range or output power range supported by the adapter type, because any terminal has the appropriate charging voltage and charging current it supports Or charging power, through this method, the terminal can be brought into an optimal charging state, and therefore, the fast charging speed of the terminal can be realized.

可以看出,通过本发明实施例,通过与适配器配套的通用串行总线USB线与该适配器之间进行连接,其中,该USB线的VBUS线至少串联一个电阻,在适配器接入电源后,确定由适配器输入终端的输入电压,根据输入电压对适配器进行识别,得到适配器的类型。因此,可利用适配器输入终端的输入电压确定适配器的类型,可降低对适配器类型结构的设计及工艺复杂度,从而,可降低适配器的生产成本。It can be seen that, through the embodiment of the present invention, the adapter is connected to the adapter through the USB line of the universal serial bus, wherein the VBUS line of the USB line is connected in series with at least one resistor. After the adapter is connected to the power supply, it is determined According to the input voltage of the adapter input terminal, the adapter is identified according to the input voltage, and the type of the adapter is obtained. Therefore, the type of the adapter can be determined by using the input voltage of the input terminal of the adapter, which can reduce the design and process complexity of the structure of the adapter type, thereby reducing the production cost of the adapter.

可以理解的是,本发明实施例中,适配器可为任一适配器,USB线为与该适配器配套的USB线,该USB线的VBUS线上包含至少一个电阻,该至一个电阻主要用于降低由适配器输入终端的输入电压,根据该输入电压的大小确定适配器的类型。从而,可避免现有技术中,对适配器的内部结构做较多区别设计(用于区别适配器的类型),而是直接对USB线进行改进,从而,降低了适配器的生产成本。It can be understood that, in the embodiment of the present invention, the adapter can be any adapter, the USB cable is the USB cable matched with the adapter, and the VBUS line of the USB cable contains at least one resistor, and the resistor is mainly used to reduce the The input voltage of the adapter input terminal, and the type of the adapter is determined according to the magnitude of the input voltage. Therefore, in the prior art, it is possible to avoid more differentiated designs on the internal structure of the adapter (for differentiating the types of the adapters), but to directly improve the USB cable, thereby reducing the production cost of the adapter.

与上述一致地,请参阅图4,为本发明实施例提供的一种适配器识别方法的第二实施例流程示意图。本实施例中所描述的适配器识别方法,包括以下步骤:Consistent with the above, please refer to FIG. 4 , which is a schematic flowchart of a second embodiment of an adapter identification method provided by an embodiment of the present invention. The adapter identification method described in this embodiment includes the following steps:

401、通过与适配器配套的通用串行总线USB线与该适配器之间进行连接,其中,所述USB线的VBUS线至少串联一个电阻。401. Connect the adapter with a universal serial bus USB cable matched with the adapter, wherein at least one resistor is connected in series with the VBUS line of the USB cable.

402、在所述适配器接入电源后,判断所述适配器处于USB充电模式还是适配器充电模式。402. After the adapter is connected to a power source, determine whether the adapter is in a USB charging mode or an adapter charging mode.

403、若所述适配器处于所述适配器充电模式,对所述终端进行充电,确定由所述适配器输入终端的输入电压。403. If the adapter is in the adapter charging mode, charge the terminal, and determine an input voltage input to the terminal by the adapter.

404、根据所述输入电压对所述适配器进行识别,得到所述适配器的类型。404. Identify the adapter according to the input voltage to obtain the adapter type.

其中,步骤401和步骤404可参照图3所描述的适配器识别方法中的对应步骤。Wherein, step 401 and step 404 may refer to corresponding steps in the adapter identification method described in FIG. 3 .

可选地,步骤402中,当插入适配器时,可通过判断USB线的D+引脚、D-引脚是否接在一起,如果是,则适配器处于USB充电模式,则直接进行500mA的USB充电,若否,则适配器处于适配器充电模式。Optionally, in step 402, when the adapter is plugged in, it can be judged whether the D+ pin and the D- pin of the USB cable are connected together, if yes, the adapter is in the USB charging mode, and then the 500mA USB charging is directly carried out, If not, the adapter is in adapter charging mode.

需要说明的是,步骤403中,如果适配器处于适配器充电模式,可进一步对适配器类型的识别,第一步,则进行固定小电流充电(目的在于防止大电流损坏电池),比如100mA,该电流流过USB线的VBUS线上电阻之后,则产生固定的不同的压降(具体地压降,与电阻大小相关),比如,电阻为1欧,则可能会产生0.1V的压降,又比如,电阻为5欧,则会产生0.5V的压降,从而,使得终端得到的电压为4.9V以及4.5V。另外,上述压降不能太大,一般保持在4V以上都可以,因为,若压降太大,则可能会导致适配器无法对终端进行充电。It should be noted that in step 403, if the adapter is in the adapter charging mode, the adapter type can be further identified. In the first step, a fixed low current charging (the purpose is to prevent the battery from being damaged by a large current), such as 100mA, the current flow After passing through the resistance on the VBUS line of the USB line, a fixed and different voltage drop (specifically, the voltage drop is related to the size of the resistance) will be generated. For example, if the resistance is 1 ohm, a voltage drop of 0.1V may be generated. For example, If the resistance is 5 ohms, a voltage drop of 0.5V will be generated, so that the voltage obtained by the terminal is 4.9V and 4.5V. In addition, the above-mentioned voltage drop should not be too large, generally it can be kept above 4V, because if the voltage drop is too large, the adapter may not be able to charge the terminal.

以下为实施上述图3或图4所提供的适配器识别方法的装置,具体如下:The following is a device for implementing the adapter identification method provided in Figure 3 or Figure 4 above, specifically as follows:

请参阅图5a,为本发明实施例提供的一种终端的第一实施例结构示意图。本实施例中所描述的终端,包括:连接单元501、第一确定单元502和识别单元503,具体如下:Please refer to FIG. 5 a , which is a schematic structural diagram of a first embodiment of a terminal provided by an embodiment of the present invention. The terminal described in this embodiment includes: a connection unit 501, a first determination unit 502, and an identification unit 503, specifically as follows:

连接单元501,用于通过与适配器配套的通用串行总线USB线与所述适配器之间进行连接,其中,所述USB线的VBUS线至少串联一个电阻;A connecting unit 501, configured to connect to the adapter through a Universal Serial Bus (USB) cable matched with the adapter, wherein the VBUS line of the USB cable is connected in series with at least one resistor;

第一确定单元502,用于在所述适配器接入电源后,确定由所述适配器输入终端的输入电压;The first determination unit 502 is configured to determine the input voltage input to the terminal by the adapter after the adapter is powered on;

识别单元503,用于根据所述输入电压对所述适配器进行识别,得到所述适配器的类型。The identification unit 503 is configured to identify the adapter according to the input voltage to obtain the type of the adapter.

可选地,所述识别单元503具体用于:Optionally, the identifying unit 503 is specifically configured to:

按照预设的电压值与适配器类型之间的映射关系,确定所述输入电压对应的适配器的类型。The type of the adapter corresponding to the input voltage is determined according to the preset mapping relationship between the voltage value and the adapter type.

可选地,如图5b,图5a所示的终端还可包括:判断单元504和第一充电单元505,具体如下:Optionally, as shown in FIG. 5b, the terminal shown in FIG. 5a may further include: a judging unit 504 and a first charging unit 505, specifically as follows:

判断单元504,用于在所述第一确定单元502确定由所述适配器输入终端的输入电压之前,判断所述适配器处于USB充电模式还是适配器充电模式;A judging unit 504, configured to judge whether the adapter is in a USB charging mode or an adapter charging mode before the first determining unit 502 determines the input voltage input to the terminal by the adapter;

第一充电单元505,用于若所述判断单元504的判断结果为所述适配器处于所述适配器充电模式,对所述终端进行充电,由所述第一确定单元502确定由所述适配器输入终端的输入电压。The first charging unit 505 is configured to charge the terminal if the judging result of the judging unit 504 is that the adapter is in the adapter charging mode, and the first determining unit 502 determines that the adapter is input into the terminal the input voltage.

可选地,如图5c,图5a所示的终端还可包括:第一启动单元506,具体如下:Optionally, as shown in FIG. 5c, the terminal shown in FIG. 5a may further include: a first starting unit 506, specifically as follows:

第一启动单元506,用于在所述识别单元503根据所述输入电压对所述适配器进行识别,得到所述适配器的类型之后,按照预设的适配器类型与应用程序之间的映射关系,启动与所述适配器的类型对应的应用程序;The first starting unit 506 is configured to start the adapter according to the preset mapping relationship between the adapter type and the application program after the identification unit 503 identifies the adapter according to the input voltage and obtains the type of the adapter. an application corresponding to the type of said adapter;

可选地,如图5d,图5a所示的终端还可包括:第二启动单元507,具体如下:Optionally, as shown in FIG. 5d, the terminal shown in FIG. 5a may further include: a second startup unit 507, specifically as follows:

第二启动单元507,用于在所述识别单元503根据所述输入电压对所述适配器进行识别,得到所述适配器的类型之后,按照预设的适配器类型与工作模式之间的映射关系,启动与所述适配器的类型对应的工作模式。The second starting unit 507 is configured to start the adapter according to the preset mapping relationship between the adapter type and the working mode after the identification unit 503 identifies the adapter according to the input voltage and obtains the type of the adapter. The mode of operation corresponding to the type of adapter in question.

可选地,如图5e,图5a所示的终端还可包括:第二确定单元508和第二充电单元509,具体如下:Optionally, as shown in FIG. 5e, the terminal shown in FIG. 5a may further include: a second determining unit 508 and a second charging unit 509, specifically as follows:

第二确定单元508,用于在所述识别单元503根据所述输入电压对所述适配器进行识别,得到所述适配器的类型之后,确定所述终端的电池的电压;The second determination unit 508 is configured to determine the voltage of the battery of the terminal after the identification unit 503 identifies the adapter according to the input voltage to obtain the type of the adapter;

第二充电单元509,用于根据所述终端的电池的电压进行充电。The second charging unit 509 is configured to charge according to the voltage of the battery of the terminal.

可以看出,通过本发明实施例所描述的终端,通过与适配器配套的通用串行总线USB线与该适配器之间进行连接,其中,该USB线的VBUS线至少串联一个电阻,在适配器接入电源后,确定由适配器输入终端的输入电压,根据输入电压对适配器进行识别,得到适配器的类型。因此,可利用适配器输入终端的输入电压确定适配器的类型,可降低对适配器类型结构的设计及工艺复杂度,从而,可降低适配器的生产成本。It can be seen that, through the terminal described in the embodiment of the present invention, the adapter is connected to the adapter through the universal serial bus USB line matched with the adapter, wherein the VBUS line of the USB line is connected in series with at least one resistor, and when the adapter is connected to After power supply, determine the input voltage of the adapter input terminal, identify the adapter according to the input voltage, and obtain the type of the adapter. Therefore, the type of the adapter can be determined by using the input voltage of the input terminal of the adapter, which can reduce the design and process complexity of the structure of the adapter type, thereby reducing the production cost of the adapter.

请参阅图6,为本发明实施例提供的一种终端的第二实施例结构示意图。本实施例中所描述的终端,包括:至少一个输入设备1000;至少一个输出设备2000;至少一个处理器3000,例如CPU;和存储器4000,上述输入设备1000、输出设备2000、处理器3000和存储器4000通过总线5000连接。Please refer to FIG. 6 , which is a schematic structural diagram of a second embodiment of a terminal provided by an embodiment of the present invention. The terminal described in this embodiment includes: at least one input device 1000; at least one output device 2000; at least one processor 3000, such as a CPU; and a memory 4000, the above-mentioned input device 1000, output device 2000, processor 3000 and memory The 4000 is connected via the bus 5000.

其中,上述输入设备1000具体可为触控面板、物理按键或者鼠标。Wherein, the above-mentioned input device 1000 may specifically be a touch panel, a physical button or a mouse.

上述输出设备2000具体可为显示屏。The aforementioned output device 2000 may specifically be a display screen.

上述存储器4000可以是高速RAM存储器,也可为非易失存储器(non-volatilememory),例如磁盘存储器。上述存储器4000用于存储一组程序代码,上述输入设备1000、输出设备2000和处理器3000用于调用存储器4000中存储的程序代码,执行如下操作:The above-mentioned memory 4000 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as a magnetic disk memory. The above-mentioned memory 4000 is used to store a set of program codes, and the above-mentioned input device 1000, output device 2000 and processor 3000 are used to call the program codes stored in the memory 4000, and perform the following operations:

上述处理器3000,用于:The above-mentioned processor 3000 is used for:

通过与适配器配套的通用串行总线USB线与所述适配器之间进行连接,其中,所述USB线的VBUS线至少串联一个电阻;The adapter is connected to the adapter through a Universal Serial Bus (USB) line matched with the adapter, wherein the VBUS line of the USB line is connected in series with at least one resistor;

在所述适配器接入电源后,确定由所述适配器输入终端的输入电压;After the adapter is powered on, determine the input voltage of the adapter input terminal;

根据所述输入电压对所述适配器进行识别,得到所述适配器的类型。The adapter is identified according to the input voltage to obtain the type of the adapter.

可选地,上述处理器3000根据所述输入电压对所述适配器进行识别,得到所述适配器的类型,包括:Optionally, the processor 3000 identifies the adapter according to the input voltage, and obtains the type of the adapter, including:

按照预设的电压值与适配器类型之间的映射关系,确定所述输入电压对应的适配器的类型。The type of the adapter corresponding to the input voltage is determined according to the preset mapping relationship between the voltage value and the adapter type.

可选地,上述处理器3000确定由所述适配器输入终端的输入电压之前,所述方法还包括;Optionally, before the processor 3000 determines the input voltage input to the terminal by the adapter, the method further includes;

判断所述适配器处于USB充电模式还是适配器充电模式;Judging whether the adapter is in the USB charging mode or the adapter charging mode;

若所述适配器处于所述适配器充电模式,对所述终端进行充电,执行所述确定由所述适配器输入终端的输入电压。If the adapter is in the adapter charging mode, the terminal is charged, and the determination of the input voltage input to the terminal by the adapter is performed.

可选地,上述处理器3000根据所述输入电压对所述适配器进行识别,得到所述适配器的类型之后,还具体用于:Optionally, the above-mentioned processor 3000 identifies the adapter according to the input voltage, and after obtaining the type of the adapter, is further specifically used for:

按照预设的适配器类型与应用程序之间的映射关系,启动与所述适配器的类型对应的应用程序;According to the preset mapping relationship between the adapter type and the application program, start the application program corresponding to the adapter type;

或者,or,

按照预设的适配器类型与工作模式之间的映射关系,启动与所述适配器的类型对应的工作模式。According to the preset mapping relationship between the adapter type and the working mode, start the working mode corresponding to the adapter type.

可选地,上述处理器3000根据所述输入电压对所述适配器进行识别,得到所述适配器的类型之后,还具体用于:Optionally, the above-mentioned processor 3000 identifies the adapter according to the input voltage, and after obtaining the type of the adapter, is further specifically used for:

确定所述终端的电池的电压;determining the voltage of the battery of the terminal;

根据所述终端的电池的电压进行充电。Charging is performed according to the voltage of the battery of the terminal.

本发明实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时包括上述方法实施例中记载的任何一种适配器识别方法的部分或全部步骤。An embodiment of the present invention also provides a computer storage medium, wherein the computer storage medium can store a program, and when the program is executed, some or all steps of any adapter identification method described in the above method embodiments are included.

尽管在此结合各实施例对本发明进行了描述,然而,在实施所要求保护的本发明过程中,本领域技术人员通过查看所述附图、公开内容、以及所附权利要求书,可理解并实现所述公开实施例的其他变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其他单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。Although the present invention has been described in conjunction with various embodiments herein, in the process of implementing the claimed invention, those skilled in the art can understand and Other variations of the disclosed embodiments are implemented. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that these measures cannot be combined to advantage.

本领域技术人员应明白,本发明的实施例可提供为方法、装置(设备)、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。计算机程序存储/分布在合适的介质中,与其它硬件一起提供或作为硬件的一部分,也可以采用其他分布形式,如通过Internet或其它有线或无线电信系统。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, devices (devices), or computer program products. Accordingly, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein. The computer program is stored/distributed on suitable media, supplied with or as part of other hardware, and may also take other forms of distribution, such as via the Internet or other wired or wireless telecommunication systems.

本发明是参照本发明实施例的方法、装置(设备)和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowcharts and/or block diagrams of methods, apparatus (device) and computer program products according to embodiments of the present invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.

尽管结合具体特征及其实施例对本发明进行了描述,显而易见的,在不脱离本发明的精神和范围的情况下,可对其进行各种修改和组合。相应地,本说明书和附图仅仅是所附权利要求所界定的本发明的示例性说明,且视为已覆盖本发明范围内的任意和所有修改、变化、组合或等同物。显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Although the invention has been described in conjunction with specific features and embodiments thereof, it will be apparent that various modifications and combinations can be made therein without departing from the spirit and scope of the invention. Accordingly, the specification and drawings are merely illustrative of the invention as defined by the appended claims and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the invention. Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention also intends to include these modifications and variations.

Claims (11)

1.一种适配器识别方法,其特征在于,包括:1. An adapter identification method, characterized in that, comprising: 通过与适配器配套的通用串行总线USB线与所述适配器之间进行连接,其中,所述USB线的VBUS线至少串联一个电阻;The adapter is connected to the adapter through a Universal Serial Bus (USB) line matched with the adapter, wherein the VBUS line of the USB line is connected in series with at least one resistor; 在所述适配器接入电源后,确定由所述适配器输入终端的输入电压;After the adapter is powered on, determine the input voltage of the adapter input terminal; 根据所述输入电压对所述适配器进行识别,得到所述适配器的类型。The adapter is identified according to the input voltage to obtain the type of the adapter. 2.根据权利要求1所述的方法,其特征在于,所述根据所述输入电压对所述适配器进行识别,得到所述适配器的类型,包括:2. The method according to claim 1, wherein the identifying the adapter according to the input voltage to obtain the type of the adapter comprises: 按照预设的电压值与适配器类型之间的映射关系,确定所述输入电压对应的适配器的类型。The type of the adapter corresponding to the input voltage is determined according to the preset mapping relationship between the voltage value and the adapter type. 3.根据权利要求1或2任一项所述的方法,其特征在于,所述确定由所述适配器输入终端的输入电压之前,所述方法还包括:3. The method according to any one of claims 1 or 2, wherein before determining the input voltage of the adapter input terminal, the method further comprises: 判断所述适配器处于USB充电模式还是适配器充电模式;Judging whether the adapter is in the USB charging mode or the adapter charging mode; 若所述适配器处于所述适配器充电模式,对所述终端进行充电,执行所述确定由所述适配器输入终端的输入电压。If the adapter is in the adapter charging mode, the terminal is charged, and the determination of the input voltage input to the terminal by the adapter is performed. 4.根据权利要求1或2任一项所述的方法,其特征在于,所述根据所述输入电压对所述适配器进行识别,得到所述适配器的类型之后,所述方法还包括:4. The method according to any one of claims 1 or 2, wherein after identifying the adapter according to the input voltage and obtaining the type of the adapter, the method further comprises: 按照预设的适配器类型与应用程序之间的映射关系,启动与所述适配器的类型对应的应用程序;According to the preset mapping relationship between the adapter type and the application program, start the application program corresponding to the adapter type; 或者,or, 按照预设的适配器类型与工作模式之间的映射关系,启动与所述适配器的类型对应的工作模式。According to the preset mapping relationship between the adapter type and the working mode, start the working mode corresponding to the adapter type. 5.根据权利要求1或2任一项所述的方法,其特征在于,所述根据所述输入电压对所述适配器进行识别,得到所述适配器的类型之后,所述方法还包括:5. The method according to any one of claims 1 or 2, characterized in that, after identifying the adapter according to the input voltage and obtaining the type of the adapter, the method further comprises: 确定所述终端的电池的电压;determining the voltage of the battery of the terminal; 根据所述终端的电池的电压进行充电。Charging is performed according to the voltage of the battery of the terminal. 6.一种终端,其特征在于,包括:6. A terminal, characterized in that, comprising: 连接单元,用于通过与适配器配套的通用串行总线USB线与所述适配器之间进行连接,其中,所述USB线的VBUS线至少串联一个电阻;A connection unit, configured to connect to the adapter through a Universal Serial Bus (USB) line matched with the adapter, wherein the VBUS line of the USB line is connected in series with at least one resistor; 第一确定单元,用于在所述适配器接入电源后,确定由所述适配器输入终端的输入电压;a first determining unit, configured to determine the input voltage input to the terminal by the adapter after the adapter is powered on; 识别单元,用于根据所述输入电压对所述适配器进行识别,得到所述适配器的类型。The identifying unit is configured to identify the adapter according to the input voltage to obtain the type of the adapter. 7.根据权利要求6所述的终端,其特征在于,所述识别单元具体用于:7. The terminal according to claim 6, wherein the identification unit is specifically used for: 按照预设的电压值与适配器类型之间的映射关系,确定所述输入电压对应的适配器的类型。The type of the adapter corresponding to the input voltage is determined according to the preset mapping relationship between the voltage value and the adapter type. 8.根据权利要求6或7任一项所述的终端,其特征在于,所述终端还包括:8. The terminal according to any one of claims 6 or 7, wherein the terminal further comprises: 判断单元,用于在所述第一确定单元确定由所述适配器输入终端的输入电压之前,判断所述适配器处于USB充电模式还是适配器充电模式;A judging unit, configured to judge whether the adapter is in a USB charging mode or an adapter charging mode before the first determining unit determines the input voltage input to the terminal by the adapter; 第一充电单元,用于若所述判断单元的判断结果为所述适配器处于所述适配器充电模式,对所述终端进行充电,由所述第一确定单元确定由所述适配器输入终端的输入电压。The first charging unit is configured to charge the terminal if the judging result of the judging unit is that the adapter is in the adapter charging mode, and the first determining unit determines the input voltage input to the terminal by the adapter . 9.根据权利要求6或7任一项所述的终端,其特征在于,所述终端还包括:9. The terminal according to any one of claims 6 or 7, wherein the terminal further comprises: 第一启动单元,用于在所述识别单元根据所述输入电压对所述适配器进行识别,得到所述适配器的类型之后,按照预设的适配器类型与应用程序之间的映射关系,启动与所述适配器的类型对应的应用程序;The first starting unit is configured to, after the identification unit identifies the adapter according to the input voltage and obtains the type of the adapter, start the connection with the adapter according to the preset mapping relationship between the adapter type and the application program. the application corresponding to the type of adapter described above; 或者,or, 第二启动单元,用于在所述识别单元根据所述输入电压对所述适配器进行识别,得到所述适配器的类型之后,按照预设的适配器类型与工作模式之间的映射关系,启动与所述适配器的类型对应的工作模式。The second starting unit is configured to, after the identification unit identifies the adapter according to the input voltage and obtains the type of the adapter, start the connection with the adapter according to the preset mapping relationship between the adapter type and the working mode. The working mode corresponding to the type of adapter described above. 10.根据权利要求6或7任一项所述的终端,其特征在于,所述终端还包括:10. The terminal according to any one of claims 6 or 7, wherein the terminal further comprises: 第二确定单元,用于在所述识别单元根据所述输入电压对所述适配器进行识别,得到所述适配器的类型之后,确定所述终端的电池的电压;The second determination unit is configured to determine the voltage of the battery of the terminal after the identification unit identifies the adapter according to the input voltage to obtain the type of the adapter; 第二充电单元,用于根据所述终端的电池的电压进行充电。The second charging unit is configured to charge according to the voltage of the battery of the terminal. 11.一种终端,其特征在于,包括:11. A terminal, characterized in that, comprising: 处理器和存储器;其中,所述处理器通过调用所述存储器中的代码或指令以执行如权利要求1至5任意一项所述的方法。A processor and a memory; wherein, the processor executes the method according to any one of claims 1 to 5 by invoking codes or instructions in the memory.
CN201610597603.3A 2016-07-26 2016-07-26 Adapter identification method and terminal Active CN106292977B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610597603.3A CN106292977B (en) 2016-07-26 2016-07-26 Adapter identification method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610597603.3A CN106292977B (en) 2016-07-26 2016-07-26 Adapter identification method and terminal

Publications (2)

Publication Number Publication Date
CN106292977A true CN106292977A (en) 2017-01-04
CN106292977B CN106292977B (en) 2019-04-02

Family

ID=57652477

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610597603.3A Active CN106292977B (en) 2016-07-26 2016-07-26 Adapter identification method and terminal

Country Status (1)

Country Link
CN (1) CN106292977B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107069844A (en) * 2017-01-13 2017-08-18 广东欧珀移动通信有限公司 Charging method, device and terminal

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5506490A (en) * 1993-11-09 1996-04-09 Motorola, Inc. Method and apparatus for determining external power supply type
CN1601439A (en) * 2003-09-26 2005-03-30 纬创资通股份有限公司 System device with identifiable power adapter and identification method
CN101169456A (en) * 2007-11-29 2008-04-30 北京飞天诚信科技有限公司 USB bus current detection device
CN102684270A (en) * 2012-05-31 2012-09-19 华为技术有限公司 Method for identifying type of universal serial bus (USB) chargers and USB device
CN204215023U (en) * 2014-09-26 2015-03-18 小米科技有限责任公司 Terminal charge parameter testing line
CN105140985A (en) * 2015-08-05 2015-12-09 青岛海信移动通信技术股份有限公司 Mobile terminal, direct-charge power adapter and charging method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5506490A (en) * 1993-11-09 1996-04-09 Motorola, Inc. Method and apparatus for determining external power supply type
CN1601439A (en) * 2003-09-26 2005-03-30 纬创资通股份有限公司 System device with identifiable power adapter and identification method
CN101169456A (en) * 2007-11-29 2008-04-30 北京飞天诚信科技有限公司 USB bus current detection device
CN102684270A (en) * 2012-05-31 2012-09-19 华为技术有限公司 Method for identifying type of universal serial bus (USB) chargers and USB device
CN204215023U (en) * 2014-09-26 2015-03-18 小米科技有限责任公司 Terminal charge parameter testing line
CN105140985A (en) * 2015-08-05 2015-12-09 青岛海信移动通信技术股份有限公司 Mobile terminal, direct-charge power adapter and charging method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107069844A (en) * 2017-01-13 2017-08-18 广东欧珀移动通信有限公司 Charging method, device and terminal
CN107069844B (en) * 2017-01-13 2019-07-16 Oppo广东移动通信有限公司 Charging method, device and terminal

Also Published As

Publication number Publication date
CN106292977B (en) 2019-04-02

Similar Documents

Publication Publication Date Title
KR102215085B1 (en) Charging apparatus and operating method thereof
CN108075325B (en) interface device
CN103092604B (en) A kind of application program sorting technique and device
CN102968338B (en) Method, device and the electronic equipment classified for the application program of electronic equipment
EP4175111A1 (en) Charging circuit and charging cable
EP2849023A1 (en) Electronic device and control method therefor
WO2017152424A1 (en) Method and terminal device for establishing connection between devices with universal serial bus usb type-c interface
CN105515084B (en) Charging device
CN110851387B (en) Interface function configuration method and electronic equipment
US20100060233A1 (en) Charger with USB detection
WO2013178146A1 (en) Tablet interface extension method and device
CN110829523A (en) Electronic equipment and reverse charging method
CN104636296A (en) Serial communication over communication control pin
WO2017161750A1 (en) Mobile apparatus
EP2993757A1 (en) Method of managing the charging of battery and electronic device adapted thereto
US20240248125A1 (en) Method for Detecting Impedance of Charging Cable, Electronic Device, and Power Supply Device
CN106532971B (en) Wireless charging method and device
US20110291609A1 (en) Computer system and control method thereof
US20130162298A1 (en) Identifying circuit
CN108054794A (en) Charging and discharging method and device for intelligent terminal, terminal and storage medium
TWI554889B (en) Electric system
CN106292977B (en) Adapter identification method and terminal
TWM496204U (en) Universal power transfer cable, power transfer controller for universal serial bus cables, and universal serial bus cable
CN106300252B (en) Electric leakage detection method and device and terminal equipment
CN204315876U (en) The mutual charging data line of a kind of smart machine

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant