CN109560591B - Charging method, device and terminal - Google Patents
Charging method, device and terminal Download PDFInfo
- Publication number
- CN109560591B CN109560591B CN201910075728.3A CN201910075728A CN109560591B CN 109560591 B CN109560591 B CN 109560591B CN 201910075728 A CN201910075728 A CN 201910075728A CN 109560591 B CN109560591 B CN 109560591B
- Authority
- CN
- China
- Prior art keywords
- charging
- protocol
- request
- charging protocol
- terminal
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J7/00—Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
- H02J7/007—Regulation of charging or discharging current or voltage
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J7/00—Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
- H02J7/00032—Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
- H02J7/00034—Charger exchanging data with an electronic device, i.e. telephone, whose internal battery is under charge
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Telephone Function (AREA)
Abstract
The invention provides a charging method, a charging device and a charging terminal, wherein the method is applied to a mobile terminal and comprises the following steps: firstly, identifying equipment connected with the mobile terminal, then shielding communication information sent by a charging terminal in a first charging protocol under the condition that the equipment is identified as the charging terminal, and communicating with the charging terminal according to a second charging protocol, wherein the handshaking communication speed of the first charging protocol is faster than that of the second charging protocol. Therefore, the safety of the second charging protocol is higher, so that the second charging protocol is preferentially used for communicating with the charging terminal in the quick charging process of the mobile terminal, the utilization rate of the second charging protocol is improved, and the safety of quick charging is improved.
Description
Technical Field
The present invention relates to the field of charging, and in particular, to a charging method, a charging device, and a terminal.
Background
As the terminal functions become more powerful and the power consumption becomes more severe, the standby time is gradually shortened, and the fast charging mode becomes the best means for solving the power consumption problem when the terminal user increasingly emphasizes the standby time. Various charging protocols are currently available, such as a PD (Power Delivery) charging Protocol, a PE (Pump Express) charging Protocol, a QC (Quick Charge) charging Protocol, an FCP (Fast Charge Protocol) charging Protocol, an SCP (Super Charge Protocol) charging Protocol, a VOOC (flash Protocol) charging Protocol, and the like. Some protocols are quick charging protocols which are designed by some organizations and have universality, for example, a PD charging protocol is a charging protocol published by a USB-IF organization, and a plurality of mobile phone manufacturers can set a private charging protocol based on the performance of the mobile phones of the manufacturers, so that the quick charging function is more adaptive to the mobile phones of the manufacturers.
At present, products such as an adapter, a vehicle charger, a mobile power supply, a mobile terminal and the like supporting a quick charging mode are widely used by users. In order to be suitable for various charging protocols, products such as an adapter and a mobile power supply support various charging protocols, for example, one adapter simultaneously supports a QC charging protocol and a PD charging protocol, so that a mobile terminal supporting the QC charging protocol and the adapter can perform quick charging communication of the QC charging protocol, and a mobile terminal supporting the PD charging protocol and the adapter can perform quick charging communication of the PD charging protocol, thereby increasing the applicability of the adapter; for another example, another mobile terminal supports both the quick charging mode of the QC charging protocol and the quick charging mode of the PD charging protocol, so that the mobile terminal performs quick charging according to the quick charging mode of the PD charging protocol when accessing the adapter supporting the PD charging protocol, and performs quick charging according to the mode of the QC charging protocol when accessing the adapter supporting the QC charging protocol, thereby increasing the charging experience of the mobile terminal.
However, in the above process, the inventor finds that, considering that each manufacturer of the mobile terminal has its own private charging protocol, and the private charging protocol has a protection measure for the mobile terminal of its manufacturer, the security is higher, but since the handshake speed of the specified charging protocol (such as the PD charging protocol, the QC charging protocol, and the PE charging protocol) is faster, the mobile terminal is usually charged quickly according to the specified charging protocol, so that the usage rate of the private charging protocol is reduced, and the security of the quick charging is reduced.
Disclosure of Invention
Embodiments of the present invention provide a charging method, an apparatus, and a terminal, so as to solve the problems in the prior art that, in a case where a mobile terminal supports a specified charging protocol and a private charging protocol, the mobile terminal performs fast charging according to the specified charging protocol, thereby reducing the usage rate of the private charging protocol and reducing the security of fast charging.
According to a first aspect of the embodiments of the present invention, there is provided a fast charging method applied to a mobile terminal, the method including:
identifying a device connected with the mobile terminal;
shielding communication information sent by the charging terminal according to a first charging protocol under the condition that the equipment is identified as the charging terminal, and communicating with the charging terminal according to a second charging protocol; wherein the first charging protocol has a faster handshake communication speed than the second charging protocol.
According to a second aspect of the embodiments of the present invention, there is provided a fast charging apparatus applied to a mobile terminal, the apparatus including:
the equipment identification module is used for identifying equipment connected with the mobile terminal;
the second protocol communication module is used for shielding communication information sent by the charging terminal according to the first charging protocol and communicating with the charging terminal according to a second charging protocol under the condition that the equipment is identified as the charging terminal; wherein the first charging protocol has a faster handshake communication speed than the second charging protocol.
According to a third aspect of the embodiments of the present invention, there is provided a terminal, including a processor, a memory, and a computer program stored on the memory and operable on the processor, wherein the computer program, when executed by the processor, implements the steps of the charging method according to the present invention.
According to a fourth aspect of the embodiments of the present invention, there is provided a computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the steps of the charging method according to the present invention.
In the embodiment of the invention, equipment connected with the mobile terminal is firstly identified; then shielding communication information sent by the charging terminal according to a first charging protocol under the condition that the equipment is identified as the charging terminal, and communicating with the charging terminal according to a second charging protocol; wherein the first charging protocol has a faster handshake communication speed than the second charging protocol. Therefore, the safety of the second charging protocol is higher, so that the second charging protocol is preferentially used for communicating with the charging terminal in the quick charging process of the mobile terminal, the utilization rate of the second charging protocol is improved, and the safety of quick charging is improved.
Drawings
Fig. 1 shows a flow chart of a charging method provided in an embodiment of the present invention;
fig. 2 shows a flow chart of another charging method provided in an embodiment of the present invention;
fig. 3 shows a flowchart of still another charging method provided in the embodiment of the present invention;
fig. 4 shows a block diagram of a first charging apparatus provided in an embodiment of the present invention;
fig. 5 shows a block diagram of a second charging apparatus provided in the embodiment of the present invention;
fig. 6 shows a block diagram of a third charging apparatus provided in the embodiment of the present invention;
fig. 7 shows a block diagram of a fourth charging apparatus provided in the embodiment of the present invention;
fig. 8 is a block diagram showing a fifth charging apparatus provided in the embodiment of the present invention;
fig. 9 shows a hardware configuration diagram of the terminal provided in the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart of a charging method provided in the embodiment of the present invention is shown, and is applied to a mobile terminal, where the method specifically includes the following steps:
In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a terminal such as a mobile phone, a tablet computer, a notebook computer, a palm top computer, a navigation device, a wearable device, a smart band, a pedometer, and the like, and the mobile terminal supports multiple protocols, where the multiple protocols include a first charging protocol and a second charging protocol, the first charging protocol may be a specific charging protocol (such as a PD charging protocol, a PE charging protocol, or a QC charging protocol, and the like), the second charging protocol may be a private charging protocol (such as a dual engine fast charging protocol, an SCP charging protocol, an FCP charging protocol, or a VOOC charging protocol, and the like), and similarly, a device connected to the mobile terminal in the present invention may also support multiple protocols, which is not particularly limited in the embodiment of the present invention.
Wherein the mobile terminal access device is determined upon detecting the presence of a voltage on the Vbus line. At this time, under the condition that the interfaces of the mobile terminal and the device are Tpye-C interfaces, the device may be a charging terminal or a power receiving terminal, at this time, whether the device is the charging terminal or not can be distinguished according to a Toggle mode specified by a Tpye-C interface protocol, that is, the mobile terminal can send a high-level signal to the device and detect whether the level of the high-level signal is pulled down after reaching the device, if the level of the high-level signal is pulled down, the device is determined to be the power receiving terminal, and if the level of the high-level signal is not pulled down, the device is determined to be the charging terminal. In the case that the interface of the mobile terminal is a Tpye-C interface and the interface of the device is a Tpye-a interface, since Tpye-a is usually connected as a charging terminal, the device connected to the mobile terminal is determined as the charging terminal according to the interface type of the device.
And 102, shielding communication information sent by the charging terminal according to a first charging protocol under the condition that the equipment is identified as the charging terminal, and communicating with the charging terminal according to a second charging protocol.
When the first charging protocol is a PD charging protocol, the device needs to detect whether the mobile terminal is connected with an RP resistor, and may send a handshake request of the PD charging protocol when the mobile terminal is connected with the RP resistor.
For the second charging protocol, the charging terminal generally needs to determine whether the second charging protocol satisfies a handshake condition, and send out a handshake request of the second charging protocol if the second charging protocol satisfies the handshake condition.
In addition, because the first charging protocol and the second charging protocol are set to have different handshaking communication speeds, the first charging protocol has a higher handshaking communication speed than the second charging protocol, and then in the prior art, the mobile terminal may receive a handshaking request of the first charging protocol first and complete the handshaking operation of the first charging protocol to realize rapid charging according to the first charging protocol.
By adopting the method, the equipment connected with the mobile terminal is firstly identified, then the communication information sent by the charging terminal in a first charging protocol is shielded and the communication is carried out with the charging terminal according to a second charging protocol under the condition that the equipment is identified as the charging terminal, wherein the handshaking communication speed of the first charging protocol is faster than that of the second charging protocol. Therefore, the safety of the second charging protocol is higher, so that the second charging protocol is preferentially used for communicating with the charging terminal in the quick charging process of the mobile terminal, the utilization rate of the second charging protocol is improved, and the safety of quick charging is improved.
Referring to fig. 2, a flowchart of a charging method provided in the embodiment of the present invention is shown, and is applied to a mobile terminal, where the method specifically includes the following steps:
In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a terminal such as a mobile phone, a tablet computer, a notebook computer, a palm-top computer, a navigation device, a wearable device, a smart band, a pedometer, and the like, and the mobile terminal supports multiple protocols, where the multiple protocols include a first charging protocol and a second charging protocol, the first charging protocol may be a specific charging protocol (such as a PD charging protocol, a PE charging protocol, or a QC charging protocol, and the like), the second charging protocol may be a private charging protocol (such as a dual engine fast charging protocol, an SCP charging protocol, an FCP charging protocol, or a VOOC charging protocol, and the like), and similarly, a device connected to the mobile terminal in the present invention may also support multiple protocols, which is not particularly limited in the embodiment of the present invention.
Wherein the mobile terminal access device is determined upon detecting the presence of a voltage on the Vbus line. At this time, under the condition that the interfaces of the mobile terminal and the device are Tpye-C interfaces, the device may be a charging terminal or a power receiving terminal, at this time, whether the device is the charging terminal or not can be distinguished according to a Toggle mode specified by a Tpye-C interface protocol, that is, the mobile terminal can send a high-level signal to the device and detect whether the level of the high-level signal is pulled down after reaching the device, if the level of the high-level signal is pulled down, the device is determined to be the power receiving terminal, and if the level of the high-level signal is not pulled down, the device is determined to be the charging terminal. In the case that the interface of the mobile terminal is a Tpye-C interface and the interface of the device is a Tpye-a interface, since Tpye-a is usually connected as a charging terminal, the device connected to the mobile terminal is determined as the charging terminal according to the interface type of the device.
Step 202, receiving a handshake request sent by the device when the device is identified as a charging end.
In a case that the first charging protocol is a PD charging protocol, the device needs to detect whether the mobile terminal is connected with an RP resistor, and in a case that the mobile terminal is connected with the RP resistor, a first request of the PD charging protocol may be sent, and the first request of the PD charging protocol may include different charging gears, so that after the mobile terminal determines that the handshake with the device is successful according to the first request of the PD charging protocol, the mobile terminal selects a target charging gear from a plurality of charging gears to perform charging, where the plurality of charging gears include: 5v, 9v, 12v, 20v, etc.
For the second charging protocol, the charging terminal generally needs to determine whether the second charging protocol satisfies a handshake condition, and send out a handshake request of the second charging protocol if the second charging protocol satisfies the handshake condition. For example, the handshake condition may be that a voltage value between D +/D-is greater than or equal to a preset voltage threshold, and in addition, in order to more accurately determine whether the second charging protocol satisfies the handshake condition, it is necessary to perform multiple detections on the voltage value between D +/D-, for example, the voltage value between D +/D-may be acquired according to a preset cycle within a preset time period, and the second charging protocol is determined to satisfy the handshake condition when the voltage values between D +/D-acquired within the preset time period are both greater than or equal to the preset voltage threshold; and determining that the second charging protocol does not satisfy the handshake condition under the condition that any voltage value between D +/D-acquired within the preset time period is smaller than the preset voltage threshold, and by the above manner, preventing the device connected with the mobile terminal from performing a misoperation.
Step 203, shielding the first request and informing the device to continue sending the handshake request when the handshake request is the first request of the first charging protocol and the handshake between the mobile terminal and the device is not successful.
In the embodiment of the present invention, because the handshake communication speeds set by the first charging protocol and the second charging protocol are different, the handshake communication speed of the first charging protocol is faster than that of the second charging protocol, and further, in the prior art, the mobile terminal may receive the first request of the first charging protocol first and complete the handshake operation of the first charging protocol, so as to implement the fast charging according to the first charging protocol. In addition, considering that the mobile terminal may have a handshake failure with the second charging protocol, and therefore still needs to be charged through the first charging protocol at this time, the present invention may notify the device to continue to send the first request, so as to shield the second request of the second charging protocol after the mobile terminal determines that the handshake failure of the second charging protocol occurs, and perform a handshake operation according to the first request of the first charging protocol that the device continues to send, and perform a fast charging according to the first charging protocol after the handshake with the first charging protocol succeeds.
Wherein notifying the device to continue sending handshake requests comprises: based on the first charging protocol, a reset command is sent to the device, so that the device is in a waiting state, and thus, the mobile terminal can still perform handshaking operation with the first charging protocol under the condition that the mobile terminal does not successfully handshake with the second charging protocol within a preset time period, and the problem that the mobile terminal cannot perform handshaking operation with the first charging protocol any more due to the fact that the charging terminal stops sending the first request after sending the first request for the preset times in the prior art is solved.
It should be noted that, after the handshake between the mobile terminal and the second charging protocol is successful, the mobile terminal will be charged according to the second charging protocol, and at this time, the device may be notified to stop sending the handshake request.
In addition, if the handshake request of the second charging protocol is waited for a long time, the charging efficiency is low, and the use experience of the user is reduced, therefore, the method and the mobile terminal can determine whether the second request of the second charging protocol is received in the specified time period, and if the second request of the second charging protocol is not received in the specified time period, the mobile terminal carries out handshake operation according to the first request continuously sent by the equipment, so that the charging is carried out through the first charging protocol after the handshake is successful, and the problem of low charging efficiency caused by waiting for the second request of the second charging protocol for a long time is solved.
And 204, in the case that the handshake request is a second request of the second charging protocol, in response to the second request, communicating with the charging terminal through the second charging protocol.
In the embodiment of the present invention, in a case that a handshake request is a second request of a second charging protocol, it is first determined whether the second charging protocol is a preset private charging protocol of a mobile terminal, and in a case that the second charging protocol is the preset private charging protocol of the mobile terminal, the mobile terminal needs to send a message verification request to a device, so that the device sends, in response to the message verification request, verification data to the mobile terminal, so that the mobile terminal determines whether the verification data is the preset data, and in a case that the verification data is the preset data, it is determined that the handshake of the second charging protocol is successful, and thus charging is performed through the second charging protocol; and under the condition that the second charging protocol is not a preset private charging protocol of the mobile terminal or the check data is not preset data, determining that the second charging protocol fails to handshake, wherein at the moment, the charging still needs to be carried out through the first charging protocol.
By adopting the method, the equipment connected with the mobile terminal is firstly identified, and then the handshake request sent by the equipment is received under the condition that the equipment is identified as a charging end; then shielding the first request and informing the equipment to continuously send a handshake request under the condition that the handshake request is a first request of a first charging protocol and the handshake between the mobile terminal and the equipment is not successful; and under the condition that the handshake request is a second request of a second charging protocol, the second request is responded, and communication is carried out with a charging terminal through the second charging protocol, wherein the handshake communication speed of the first charging protocol is faster than that of the second charging protocol. Therefore, the safety of the second charging protocol is higher, so that the second charging protocol is preferentially used for communicating with the charging terminal in the quick charging process of the mobile terminal, the utilization rate of the second charging protocol is improved, and the safety of quick charging is improved.
Referring to fig. 3, a flowchart of a charging method provided in the embodiment of the present invention is shown, and is applied to a mobile terminal, where the method specifically includes the following steps:
In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a terminal such as a mobile phone, a tablet computer, a notebook computer, a palm top computer, a navigation device, a wearable device, a smart band, a pedometer, and the like, and the mobile terminal supports multiple protocols, where the multiple protocols include a first charging protocol and a second charging protocol, the first charging protocol may be a specific charging protocol (such as a PD charging protocol, a PE charging protocol, or a QC charging protocol, and the like), the second charging protocol may be a private charging protocol (such as a dual engine fast charging protocol, an SCP charging protocol, an FCP charging protocol, or a VOOC charging protocol, and the like), and similarly, a device connected to the mobile terminal in the present invention may also support multiple protocols, which is not particularly limited in the embodiment of the present invention.
Wherein the mobile terminal access device is determined upon detecting the presence of a voltage on the Vbus line. At this time, under the condition that the interfaces of the mobile terminal and the device are Tpye-C interfaces, the device may be a charging terminal or a power receiving terminal, at this time, whether the device is the charging terminal or not may be distinguished according to a Toggle mode specified by a Tpye-C interface protocol, that is, the mobile terminal may send a high level signal to the device, detect whether the level of the high level signal is pulled down after reaching the device, determine that the device is the power receiving terminal if the level of the high level signal is pulled down, and determine that the device is the charging terminal if the level of the high level signal is not pulled down. In the case that the interface of the mobile terminal is a Tpye-C interface and the interface of the device is a Tpye-a interface, since Tpye-a is usually connected as a charging terminal, the device connected to the mobile terminal is determined as the charging terminal according to the interface type of the device.
In a case that the first charging protocol is a PD charging protocol, the device needs to detect whether the mobile terminal is connected with an RP resistor, and in a case that the mobile terminal is connected with the RP resistor, a first request of the PD charging protocol may be sent, and the first request of the PD charging protocol may include different charging gears, so that after the mobile terminal determines that the handshake with the device is successful according to the first request of the PD charging protocol, the mobile terminal selects a target charging gear from a plurality of charging gears to perform charging, where the plurality of charging gears include: 5v, 9v, 12v, 20v, etc.
For the second charging protocol, the charging terminal generally needs to determine whether the second charging protocol satisfies a handshake condition, and send out a handshake request of the second charging protocol if the second charging protocol satisfies the handshake condition. For example, the handshake condition may be that a voltage value between D +/D-is greater than or equal to a preset voltage threshold, and in addition, in order to more accurately determine whether the second charging protocol satisfies the handshake condition, it is necessary to perform multiple detections on the voltage value between D +/D-, for example, the voltage value between D +/D-may be acquired according to a preset cycle within a preset time period, and the second charging protocol is determined to satisfy the handshake condition when the voltage values between D +/D-acquired within the preset time period are both greater than or equal to the preset voltage threshold; and determining that the second charging protocol does not satisfy the handshake condition under the condition that any voltage value between D +/D-acquired within the preset time period is smaller than the preset voltage threshold, and by the above manner, preventing the device connected with the mobile terminal from performing a misoperation.
In the embodiment of the present invention, because the handshake communication speeds set by the first charging protocol and the second charging protocol are different, the handshake communication speed of the first charging protocol is faster than that of the second charging protocol, and further in the prior art, the mobile terminal may receive the first request of the first charging protocol first and complete the handshake operation of the first charging protocol to realize fast charging according to the first charging protocol, however, the present invention considers that the security of the second charging protocol is higher, so that the mobile terminal may perform the handshake operation through the second charging protocol, and in addition, considers that before the second charging protocol succeeds in handshake, the mobile terminal is not charged, which results in a problem of low charging efficiency, thereby affecting the user experience, in summary, the present invention may perform handshake operation with the first charging protocol first after receiving the first request, and after the handshake is successful, the charging is carried out through the first charging protocol, so that the charging time can be effectively utilized. Wherein, in view of the safety of the charging process and the charging efficiency, the device may be informed to discharge at the lowest voltage, such as 5V, based on the first charging protocol.
In addition, considering that the mobile terminal may have a handshake failure with the second charging protocol, and thus if the charging terminal discharges at the lowest voltage all the time, the charging efficiency may be low, in the present invention, if a handshake failure of the second charging protocol is detected, the second charging protocol may be shielded, and the charging gear may be adjusted higher according to the first charging protocol, so as to improve the charging efficiency. Similarly, if the handshake request of the second charging protocol is waited for a long time, the charging efficiency is also low, therefore, the present invention can determine whether the second request of the second charging protocol is received within the specified time period, and if the second request of the second charging protocol is not received within the specified time period, the mobile terminal increases the charging gear according to the first charging protocol.
In addition, the mobile terminal of the present application may continue to receive the handshake request sent by the device during the charging process through the first charging protocol, and execute step 304 when the handshake request is the second request of the second charging protocol.
In the embodiment of the present invention, under the condition that the handshake request is a second request of a second charging protocol, it is first determined whether the second charging protocol is a preset private charging protocol of the mobile terminal, and under the condition that the second charging protocol is the preset private charging protocol of the mobile terminal, the mobile terminal needs to send a message verification request to the device, so that the device responds to the message verification request and sends verification data to the mobile terminal, so that the mobile terminal determines whether the verification data is preset data, and under the condition that the verification data is preset data, it is determined that the handshake of the second charging protocol is successful, so that charging is performed through the second charging protocol, and the first charging protocol is shielded; when the second charging protocol is not the preset private charging protocol of the mobile terminal, or when the verification data is not the preset data, the second charging protocol fails to handshake, and at this time, the charging is still performed through the first charging protocol.
By adopting the method, the equipment connected with the mobile terminal is firstly identified, and then the handshake request sent by the equipment is received under the condition that the equipment is identified as a charging end; then, under the condition that the handshake request is a first request of a first charging protocol and the mobile terminal does not successfully handshake with the equipment, responding to the first request, communicating with a charging terminal through the first charging protocol, and continuously receiving the handshake request sent by the equipment; and under the condition that the handshake request is a second request of a second charging protocol, responding to the second request, shielding communication information sent by the charging terminal in the first charging protocol, and communicating with the charging terminal through the second charging protocol, wherein the handshake communication speed of the first charging protocol is faster than that of the second charging protocol. Therefore, in the quick charging process of the mobile terminal, the mobile terminal can communicate with the charging terminal through the first charging protocol to perform quick charging under the condition that the mobile terminal does not successfully handshake with the equipment, and the second charging protocol has higher safety, so that the mobile terminal can still perform handshaking with the second charging protocol in the charging process, and the second charging protocol can communicate with the charging terminal through the second charging protocol after the second charging protocol succeeds in handshaking, so that the utilization rate of the second charging protocol is improved, the charging time is saved, and the safety of quick charging is improved.
Referring to fig. 4, a block diagram of a charging device according to an embodiment of the present invention is shown. Applied to a mobile terminal, the apparatus 400 includes:
a device identification module 401, configured to identify a device connected to the mobile terminal;
a second protocol communication module 402, configured to shield communication information sent by the charging terminal according to the first charging protocol and communicate with the charging terminal according to a second charging protocol, if it is identified that the device is the charging terminal; wherein the first charging protocol has a faster handshake communication speed than the second charging protocol.
Referring to fig. 5, a block diagram of a charging device according to an embodiment of the present invention is shown. The second protocol communication module 402 includes:
the first handshake request receiving submodule 4021 is configured to receive a handshake request sent by the device when the device is identified as a charging end;
the shielding submodule 4022 is configured to shield the first request and notify the device to continue sending the handshake request when the handshake request is the first request of the first charging protocol and the handshake between the mobile terminal and the device is not successful;
the first communication sub-module 4023 is configured to, in a case that the handshake request is a second request of the second charging protocol, communicate with the charging terminal through the second charging protocol in response to the second request.
Referring to fig. 6, a block diagram of a charging device according to an embodiment of the present invention is shown. The shielding submodule 4022 includes:
a reset notification unit 40221, configured to send a reset command to the device based on the first charging protocol, so that the device is in a waiting state.
Referring to fig. 7, a block diagram of a charging device according to an embodiment of the present invention is shown. The second protocol communication module 402 includes:
the second handshake request receiving submodule 4024 is configured to receive a handshake request sent by the device when the device is identified as a charging end;
the request continuing receiving sub-module 4025 is configured to, in response to the first request, communicate with the charging terminal through the first charging protocol and continue to receive the handshake request sent by the device when the handshake request is the first request of the first charging protocol and the mobile terminal does not successfully handshake with the device;
the second communication sub-module 4026 is configured to, in a case that the handshake request is a second request of the second charging protocol, respond to the second request, shield communication information sent by the charging terminal in the first charging protocol, and communicate with the charging terminal through the second charging protocol.
Referring to fig. 8, a block diagram of a charging device according to an embodiment of the present invention is shown. The request continuing receiving sub-module 4025 includes:
a lowest voltage notification unit 40251 that notifies the device to discharge at the lowest voltage based on the first charging protocol.
The terminal 400 provided in fig. 4-8 in the embodiments of the present invention can implement each process in the method embodiments of fig. 1-3, and is not described herein again to avoid repetition.
By adopting the device, the equipment connected with the mobile terminal is firstly identified, then the communication information sent by the charging terminal through the first charging protocol is shielded and the communication is carried out with the charging terminal according to the second charging protocol under the condition that the equipment is identified as the charging terminal, wherein the handshaking communication speed of the first charging protocol is faster than that of the second charging protocol. Therefore, the safety of the second charging protocol is higher, so that the second charging protocol is preferentially used for communicating with the charging terminal in the quick charging process of the mobile terminal, the utilization rate of the second charging protocol is improved, and the safety of quick charging is improved.
Fig. 9 is a schematic diagram of a hardware structure of a terminal in which various embodiments of the present invention are implemented.
The terminal 900 includes but is not limited to: a radio frequency unit 901, a network module 902, a sound output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 909, an interface unit 908, a memory 909, a processor 910, and a power supply 911. Those skilled in the art will appreciate that the terminal configuration shown in fig. 9 is not intended to be limiting, and that the terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The charging method is applied to a mobile terminal, and comprises the steps of firstly identifying equipment connected with the mobile terminal, then shielding communication information sent by a charging end through a first charging protocol under the condition that the equipment is identified as the charging end, and communicating with the charging end according to a second charging protocol, wherein the handshaking communication speed of the first charging protocol is higher than that of the second charging protocol. Therefore, the safety of the second charging protocol is higher, so that the second charging protocol is preferentially used for communicating with the charging terminal in the quick charging process of the mobile terminal, the utilization rate of the second charging protocol is improved, and the safety of quick charging is improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 901 may be used for receiving and sending signals during a message transmission and reception process or a call process, and specifically, after receiving downlink data from a base station, the downlink data is processed by the processor 910; in addition, the uplink data is transmitted to the base station. Generally, the radio frequency unit 901 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 901 can also communicate with a network and other devices through a wireless communication system.
The terminal provides wireless broadband internet access to the user through the network module 902, such as helping the user send and receive e-mails, browse web pages, access streaming media, and the like.
The sound output unit 903 may convert sound data received by the radio frequency unit 901 or the network module 902 or stored in the memory 909 into a sound signal and output as sound. Also, the sound output unit 903 may also provide sound output related to a specific function performed by the terminal 900 (e.g., a call signal reception sound, a message reception sound, etc.). The sound output unit 903 includes a speaker, a buzzer, a receiver, and the like.
The input unit 904 is for receiving a sound or video signal. The input Unit 904 may include a Graphics Processing Unit (GPU) 9041 and a microphone 9042, and the Graphics processor 9041 processes image data of a still picture or video obtained by an image capturing device (such as a camera) in a video capture mode or an image capture mode. The processed image frames may be displayed on the display unit 906. The image frames processed by the graphic processor 9041 may be stored in the memory 909 (or other storage medium) or transmitted via the radio frequency unit 901 or the network module 902. The microphone 9042 can receive sounds and can process such sounds into sound data. The processed sound data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 901 in case of the phone call mode.
Terminal 900 can also include at least one sensor 905, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 9061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 9061 or backlight when the terminal 900 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the terminal posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration identification related functions (such as pedometer, tapping), and the like; the sensors 905 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which are not described in detail herein.
The display unit 906 is used to display information input by the user or information provided to the user. The Display unit 906 may include a Display panel 9061, and the Display panel 9061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 907 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal. Specifically, the user input unit 907 includes a touch panel 9071 and other input devices 9072. The touch panel 9071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 9071 (e.g., operations by a user on or near the touch panel 9071 using a finger, a stylus, or any other suitable object or accessory). The touch panel 9071 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 910, receives a command from the processor 910, and executes the command. In addition, the touch panel 9071 may be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The user input unit 907 may include other input devices 9072 in addition to the touch panel 9071. Specifically, the other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control key, a switch key, and the like), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 9071 may be overlaid on the display panel 9061, and when the touch panel 9071 detects a touch operation on or near the touch panel 9071, the touch panel is transmitted to the processor 910 to determine the type of the touch event, and then the processor 910 provides a corresponding visual output on the display panel 9061 according to the type of the touch event. Although the touch panel 9071 and the display panel 9061 are two independent components to implement the input and output functions of the terminal, in some embodiments, the touch panel 9071 and the display panel 9061 may be integrated to implement the input and output functions of the terminal, which is not limited herein.
The interface unit 908 is an interface through which an external device is connected to the terminal 900. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, a sound input/output (I/O) port, a video I/O port, an earphone port, and the like. Interface unit 908 can be used to receive input from external devices (e.g., data information, power, etc.) and transmit the received input to one or more elements within terminal 900 or can be used to transmit data between terminal 900 and external devices.
The memory 909 may be used to store software programs as well as various data. The memory 909 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as voice data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 909 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 910 is a control center of the terminal, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal and processes data by running or executing software programs or modules stored in the memory 909 and calling data stored in the memory 909, thereby performing overall monitoring of the terminal. Processor 910 may include one or more processing units; preferably, the processor 910 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It is to be appreciated that the modem processor described above may not be integrated into processor 910.
The terminal 900 can also include a power supply 911 (e.g., a battery) for powering the various components, and preferably, the power supply 911 can be logically connected to the processor 910 via a power management system such that the functions of managing charging, discharging, and power consumption are performed via the power management system.
In addition, the terminal 900 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides a terminal, which includes a processor 910, a memory 909, and a computer program that is stored in the memory 909 and can be run on the processor 910, and when the computer program is executed by the processor 910, the respective processes of the charging method embodiment are implemented, and are not described herein again to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the charging method embodiment, and in order to avoid repetition, details are not described here again. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (11)
1. A charging method is applied to a mobile terminal, and is characterized by comprising the following steps:
identifying a device connected with the mobile terminal;
shielding communication information sent by the charging terminal according to a first charging protocol under the condition that the equipment is identified as the charging terminal, and communicating with the charging terminal according to a second charging protocol;
wherein the first charging protocol has a faster handshake communication speed than the second charging protocol.
2. The method of claim 1, wherein the masking communication information sent by the charging terminal in a first charging protocol and communicating with the charging terminal according to a second charging protocol if the device is identified as the charging terminal comprises:
receiving a handshake request sent by the equipment under the condition that the equipment is identified as a charging end;
when the handshake request is a first request of the first charging protocol and the handshake between the mobile terminal and the device is not successful, shielding the first request and informing the device to continue sending handshake requests;
in a case where the handshake request is a second request of the second charging protocol, communicating with the charging terminal through the second charging protocol in response to the second request.
3. The method of claim 2, wherein the notifying the device to continue sending handshake requests comprises:
sending a reset command to the device based on the first charging protocol to place the device in a wait state.
4. The method of claim 1, wherein the masking communication information sent by the charging terminal in a first charging protocol and communicating with the charging terminal according to a second charging protocol if the device is identified as the charging terminal comprises:
receiving a handshake request sent by the equipment under the condition that the equipment is identified as a charging end;
under the condition that the handshake request is a first request of the first charging protocol and the mobile terminal does not successfully handshake with the equipment, responding to the first request, communicating with the charging terminal through the first charging protocol, and continuously receiving the handshake request sent by the equipment;
and in the case that the handshake request is a second request of the second charging protocol, in response to the second request, shielding communication information sent by the charging terminal in the first charging protocol, and communicating with the charging terminal through the second charging protocol.
5. The method of claim 4, wherein the communicating with the charging terminal via the first charging protocol comprises:
notifying the device to discharge at a lowest voltage based on the first charging protocol.
6. A charging device applied to a mobile terminal is characterized by comprising:
the equipment identification module is used for identifying equipment connected with the mobile terminal;
the second protocol communication module is used for shielding communication information sent by the charging terminal according to the first charging protocol and communicating with the charging terminal according to a second charging protocol under the condition that the equipment is identified as the charging terminal; wherein the first charging protocol has a faster handshake communication speed than the second charging protocol.
7. The apparatus of claim 6, wherein the second protocol communication module comprises:
the first handshake request receiving submodule is used for receiving a handshake request sent by the equipment under the condition that the equipment is identified as a charging end;
the shielding submodule is used for shielding the first request and informing the equipment to continuously send the handshake request under the condition that the handshake request is the first request of the first charging protocol and the handshake between the mobile terminal and the equipment is not successful;
the first communication submodule is used for responding to a second request under the condition that the handshake request is the second request of the second charging protocol and communicating with the charging terminal through the second charging protocol.
8. The apparatus of claim 7, wherein the mask submodule comprises:
a reset notification unit configured to send a reset command to the device based on the first charging protocol to place the device in a waiting state.
9. The apparatus of claim 6, wherein the second protocol communication module comprises:
the second handshake request receiving submodule is used for receiving a handshake request sent by the equipment under the condition that the equipment is identified as a charging end;
a request continuous receiving submodule, configured to, when the handshake request is a first request of the first charging protocol and the mobile terminal does not successfully handshake with the device, respond to the first request, communicate with the charging terminal through the first charging protocol, and continuously receive the handshake request sent by the device;
and the second communication submodule is used for responding to the second request under the condition that the handshake request is the second request of the second charging protocol, shielding the communication information sent by the charging terminal in the first charging protocol, and communicating with the charging terminal through the second charging protocol.
10. The apparatus of claim 9, wherein the request continue receiving submodule comprises:
a lowest voltage notification unit that notifies the device to discharge at a lowest voltage based on the first charging protocol.
11. A terminal, characterized in that it comprises a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the charging method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910075728.3A CN109560591B (en) | 2019-01-25 | 2019-01-25 | Charging method, device and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910075728.3A CN109560591B (en) | 2019-01-25 | 2019-01-25 | Charging method, device and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109560591A CN109560591A (en) | 2019-04-02 |
CN109560591B true CN109560591B (en) | 2020-09-01 |
Family
ID=65873803
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910075728.3A Active CN109560591B (en) | 2019-01-25 | 2019-01-25 | Charging method, device and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109560591B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112671051A (en) * | 2019-10-16 | 2021-04-16 | Oppo广东移动通信有限公司 | Charging control method, charging control equipment and readable storage medium |
CN112928787B (en) * | 2019-12-06 | 2024-07-09 | 北京小米移动软件有限公司 | Charging circuit, electronic device, charging control method and device |
CN112260366B (en) * | 2020-11-06 | 2023-11-24 | 维沃移动通信有限公司 | Charging method, charging device and charger |
CN113489079B (en) * | 2021-05-25 | 2022-07-22 | 荣耀终端有限公司 | Terminal device and charging system |
CN113824195B (en) * | 2021-10-28 | 2024-09-03 | 北京小米移动软件有限公司 | Charging control method and device, terminal and computer readable storage medium |
CN115459410B (en) * | 2022-10-28 | 2023-03-24 | 珠海智融科技股份有限公司 | Charging equipment identification method and device, electronic equipment and storage medium |
CN115986887A (en) * | 2023-02-15 | 2023-04-18 | 维沃移动通信有限公司 | Charging method and device and electronic equipment |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014017989A (en) * | 2012-07-10 | 2014-01-30 | Nec Casio Mobile Communications Ltd | Mobile terminal, contactless charging system, and management method of contactless charging |
CN106655415B (en) * | 2017-03-14 | 2021-01-22 | 成都智朴思互联科技有限公司 | Intelligent universal charging identification and control device based on USB interface |
CN107508330A (en) * | 2017-07-05 | 2017-12-22 | 深圳天珑无线科技有限公司 | A kind of electronic installation and its charging method |
CN107742912A (en) * | 2017-11-08 | 2018-02-27 | 深圳天珑无线科技有限公司 | Charging method, fast fill device and computer-readable recording medium |
-
2019
- 2019-01-25 CN CN201910075728.3A patent/CN109560591B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN109560591A (en) | 2019-04-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109560591B (en) | Charging method, device and terminal | |
US20220276909A1 (en) | Screen projection control method and electronic device | |
CN108255378B (en) | Display control method and mobile terminal | |
CN108459797B (en) | Control method of folding screen and mobile terminal | |
CN109067418B (en) | Antenna control method and mobile terminal | |
CN107734175B (en) | Notification message prompting method and mobile terminal | |
CN108073343B (en) | display interface adjusting method and mobile terminal | |
CN110058836B (en) | Audio signal output method and terminal equipment | |
CN108446058B (en) | Mobile terminal operation method and mobile terminal | |
CN107967153B (en) | Application program management method and mobile terminal | |
CN108282759B (en) | Service processing method and mobile communication terminal | |
EP3934056A1 (en) | Terminal and wireless charging control method | |
CN109831359B (en) | Method for detecting connection state of data network and terminal equipment thereof | |
CN109814799A (en) | Screen response control mehtod and terminal device | |
CN111131607A (en) | Information sharing method, electronic equipment and computer readable storage medium | |
CN108388400B (en) | Operation processing method and mobile terminal | |
CN111240451B (en) | Heat dissipation method, electronic device and computer-readable storage medium | |
CN111562959A (en) | Icon management method and electronic equipment | |
CN109005297B (en) | Display method of navigation application and mobile terminal | |
CN108595352B (en) | Protection method and device for mobile terminal | |
CN108307075B (en) | Incoming call processing method and mobile terminal | |
CN111310165B (en) | Account switching or registering method and electronic equipment | |
CN110995816B (en) | Sharing method and electronic device | |
CN110825682B (en) | USB control method and electronic equipment | |
CN110471068B (en) | Proximity detection method and mobile terminal |
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 |