CN113328505B - Charging demand adaptation method, electronic equipment and related product - Google Patents

Charging demand adaptation method, electronic equipment and related product Download PDF

Info

Publication number
CN113328505B
CN113328505B CN202110884727.0A CN202110884727A CN113328505B CN 113328505 B CN113328505 B CN 113328505B CN 202110884727 A CN202110884727 A CN 202110884727A CN 113328505 B CN113328505 B CN 113328505B
Authority
CN
China
Prior art keywords
charging
data packet
type
version information
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110884727.0A
Other languages
Chinese (zh)
Other versions
CN113328505A (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.)
Shenzhen Injoinic Technology Co Ltd
Original Assignee
Shenzhen Injoinic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Injoinic Technology Co Ltd filed Critical Shenzhen Injoinic Technology Co Ltd
Priority to CN202110884727.0A priority Critical patent/CN113328505B/en
Priority to CN202111393257.4A priority patent/CN115912529A/en
Publication of CN113328505A publication Critical patent/CN113328505A/en
Application granted granted Critical
Publication of CN113328505B publication Critical patent/CN113328505B/en
Priority to PCT/CN2022/102726 priority patent/WO2023011067A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • H02J7/00034Charger exchanging data with an electronic device, i.e. telephone, whose internal battery is under charge
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01MPROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
    • H01M10/00Secondary cells; Manufacture thereof
    • H01M10/42Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
    • H01M10/44Methods for charging or discharging
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • H02J7/00045Authentication, i.e. circuits for checking compatibility between one component, e.g. a battery or a battery charger, and another component, e.g. a power source
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Manufacturing & Machinery (AREA)
  • Chemical & Material Sciences (AREA)
  • Chemical Kinetics & Catalysis (AREA)
  • Electrochemistry (AREA)
  • General Chemical & Material Sciences (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The embodiment of the application discloses a charging demand adaptation method, electronic equipment and related products, wherein the method comprises the following steps: judging whether the first equipment can meet the charging requirement of the second equipment or not according to the charging requirement information; when the first device cannot meet the charging requirement of the second device, judging whether the charging protocol version information is first preset version information or not and whether the type of the charging data packet is a first type or not; and when the charging protocol version information is first preset version information and the type of the charging data packet is a first type, updating the original broadcasting data packet into a broadcasting data packet corresponding to the charging data packet of a second type to obtain a target broadcasting data packet, wherein the target broadcasting data packet is used for updating the charging data packet by the second equipment. By the adoption of the method and the device, the stability and the reliability of communication between the first device and the second device are improved, and the compatibility between the first device and the second device is improved.

Description

Charging demand adaptation method, electronic equipment and related product
Technical Field
The application relates to the technical field of information processing, in particular to a charging demand adaptation method, electronic equipment and related products.
Background
With the rapid development of charger technology, various versions of USB PD (Universal Serial Bus Power Delivery) protocols, such as USB PD 2.0, USB PD 3.0, etc., have appeared. Due to the fact that the USB PDs of the multiple versions are different in occurrence time, the situation that the charging protocol in the electric equipment is USB PD 2.0 version and the charging protocol in the power adapter is USB PD 3.0 version can occur, compatibility between the electric equipment of the USB PD 2.0 version and the adapter of the USB PD 3.0 version is poor, communication is unstable in the charging process, and the phenomenon of repeated charging interruption is prone to occur. Therefore, how to improve the compatibility between the powered device of the USB PD version 2.0 and the adapter of the USB PD version 3.0 becomes an urgent problem to be solved.
Disclosure of Invention
The embodiment of the application provides a charging demand adaptation method, electronic equipment and related products, which are beneficial to improving the communication stability and reliability between first equipment and second equipment and improving the compatibility between the first equipment and the second equipment.
In a first aspect, an embodiment of the present application provides a charging requirement adaptation method, which is applied to a first device, and the method includes:
receiving a charging data packet sent by a second device, wherein the charging data packet comprises: charging requirement information, charging protocol version information and charging data packet types;
judging whether the first equipment can meet the charging requirement of the second equipment or not according to the charging requirement information;
when the first device cannot meet the charging requirement of the second device, judging whether the charging protocol version information is first preset version information or not and whether the charging data packet type is a first type or not;
and when the charging protocol version information is the first preset version information and the type of the charging data packet is the first type, updating the original broadcasting data packet to a broadcasting data packet corresponding to the charging data packet of the second type to obtain a target broadcasting data packet, wherein the target broadcasting data packet is used for updating the charging data packet by the second equipment.
In a second aspect, an embodiment of the present application provides a charging requirement adapting device, which is applied to a first device, and the device includes: a receiving unit, a judging unit and an updating unit, wherein,
the receiving unit is configured to receive a charging data packet sent by a second device, where the charging data packet includes: charging requirement information, charging protocol version information and charging data packet types;
the judging unit is used for judging whether the first equipment can meet the charging requirement of the second equipment or not according to the charging requirement information;
the judging unit is further configured to judge whether the charging protocol version information is first preset version information and whether the charging data packet type is a first type when the first device cannot meet the charging requirement of the second device;
the updating unit is configured to update an original broadcast packet to a broadcast packet corresponding to a second type of the charging packet to obtain a target broadcast packet when the charging protocol version information is the first preset version information and the type of the charging packet is the first type, where the target broadcast packet is used by the second device to update the charging packet.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the first aspect of the embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program enables a computer to perform some or all of the steps described in the first aspect of the embodiment of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
The embodiment of the application has the following beneficial effects:
it can be seen that, the charging requirement adapting method, the electronic device and the related product described in the embodiment of the present application may receive a charging data packet sent by a second device, where the charging data packet includes: the method comprises the steps of judging whether a first device can meet the charging requirement of a second device or not according to charging requirement information, judging whether the charging protocol version information is first preset version information or not and whether the charging data packet type is a first type or not when the first device cannot meet the charging requirement of the second device, updating an original broadcast data packet into a broadcast data packet corresponding to a charging data packet of the second type to obtain a target broadcast data packet when the charging protocol version information is the first preset version information and the charging data packet type is the first type, updating the target broadcast data packet into a broadcast data packet corresponding to the charging data packet of the second type to obtain a target broadcast data packet, and updating the charging data packet by the second device according to the target broadcast data packet, so that the first device can adapt to the charging requirement of the second device according to the updated charging data packet, and the communication stability and reliability between the first device and the second device can be improved, the compatibility between the first equipment and the second equipment is improved, and the charging efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1A is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 1B is a schematic flowchart of a charging requirement adapting method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a charging requirement adapting method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a charging requirement adapting method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 5A is a block diagram illustrating functional units of a charging demand adapting device according to an embodiment of the present disclosure;
fig. 5B is a block diagram illustrating functional units of a charging demand adapting device according to an embodiment of the present disclosure.
Detailed Description
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
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 application. The appearances of the 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 explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
The electronic device according to the embodiments of the present application may be a portable electronic device, such as a mobile phone, a tablet computer, a wearable electronic device (e.g., a smart watch) with a wireless communication function, and the like, which includes other functions, such as a personal digital assistant and/or a music player function. Exemplary embodiments of the portable electronic device include, but are not limited to, portable electronic devices that carry an IOS system, an Android system, a Microsoft system, or other operating system. The portable electronic device may also be other portable electronic devices such as a Laptop computer (Laptop) or the like. It should also be understood that in other embodiments, the electronic device may not be a portable electronic device, but may be a desktop computer. The electronic device may also include a server.
As shown in fig. 1A, fig. 1A is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. The electronic device comprises a processor and a memory, etc. Wherein the memory is connected with the processor. The Processor is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, executes various functions and processes data of the electronic device by running or executing software programs and/or modules stored in the memory and calling the data stored in the memory, thereby performing overall monitoring on the electronic device, and the Processor may be a Central Processing Unit (CPU), a Graphics Processing Unit (GPU) or a Network Processing Unit (NPU).
Further, the processor 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 will be appreciated that the modem processor described above may not be integrated into the processor.
The memory is used for storing software programs and/or modules, and the processor executes various functional applications of the electronic device by running the software programs and/or modules stored in the memory. The memory mainly comprises a program storage area and a data storage area, wherein the program storage area can store an operating system, a software program required by at least one function and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 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.
Based on the electronic device described in fig. 1A, the following method for adapting charging requirement can be performed, and the specific steps are as follows:
receiving a charging data packet sent by a second device, wherein the charging data packet comprises: charging requirement information, charging protocol version information and charging data packet types;
judging whether the first equipment can meet the charging requirement of the second equipment or not according to the charging requirement information;
when the first device cannot meet the charging requirement of the second device, judging whether the charging protocol version information is first preset version information or not and whether the charging data packet type is a first type or not;
and when the charging protocol version information is the first preset version information and the type of the charging data packet is the first type, updating the original broadcasting data packet to a broadcasting data packet corresponding to the charging data packet of the second type to obtain a target broadcasting data packet, wherein the target broadcasting data packet is used for updating the charging data packet by the second equipment.
It can be seen that, the electronic device described in this embodiment of the application may receive a charging data packet sent by a second device, where the charging data packet includes: the method comprises the steps of judging whether a first device can meet the charging requirement of a second device or not according to charging requirement information, judging whether the charging protocol version information is first preset version information or not and whether the charging data packet type is a first type or not when the first device cannot meet the charging requirement of the second device, updating an original broadcast data packet into a broadcast data packet corresponding to a charging data packet of the second type to obtain a target broadcast data packet when the charging protocol version information is the first preset version information and the charging data packet type is the first type, updating the target broadcast data packet into a broadcast data packet corresponding to the charging data packet of the second type to obtain a target broadcast data packet, and updating the charging data packet by the second device according to the target broadcast data packet, so that the first device can adapt to the charging requirement of the second device according to the updated charging data packet, and the communication stability and reliability between the first device and the second device can be improved, the compatibility between the first equipment and the second equipment is improved, and the charging efficiency is improved.
The electronic device may be a first device or a second device, and is not limited herein. When the electronic device is the first device, the electronic device may be a power adapter. When the electronic device is the second device, the electronic device may be an electric device that is charged using a power adapter.
Referring to fig. 1B, fig. 1B is a schematic flowchart of a charging requirement adaptation method according to an embodiment of the present application, and as shown in the drawing, the charging requirement adaptation method is applied to the electronic device shown in fig. 1A, and includes:
101. receiving a charging data packet sent by a second device, wherein the charging data packet comprises: charging requirement information, charging protocol version information and charging data packet types.
In this embodiment of the application, the first device may be a power adapter, and the second device may be an electric device that is charged by using the power adapter, which is not limited herein.
The charging data packet sent by the second device includes charging requirement information, charging protocol version information and charging data packet type. The charging requirement information may refer to parameter information such as a target voltage and a target current required by the second device during charging, for example, the target voltage may be 5V, 9V, 12V, 20V, and the target current may be 0.5A, 1A, 2A, 3A, 5A, and the like, which is not limited herein.
The charging protocol version information may refer to a charging protocol version configured by the second device, such as USB PD 2.0, USB PD 3.0, and the like, which is not limited herein.
The charging data packet type can be set according to a charging protocol. For example, when the charging protocol is the USB PD protocol, the charging Data packet type may be a Fixed Supply Power Data Object (PDO) type, or a Programmable Power Supply new enhanced Power Data Object (PPS) type, which is not limited herein.
102. And judging whether the first equipment can meet the charging requirement of the second equipment or not according to the charging requirement information.
The charging requirement of the second device may refer to a requirement corresponding to the charging requirement information. For example, if the charging requirement information indicates that the target voltage required for charging the second device is 5V and the target current is 2A, the corresponding charging requirement is 5V and 2A.
103. And when the first equipment cannot meet the charging requirement of the second equipment, judging whether the charging protocol version information is first preset version information or not and whether the charging data packet type is a first type or not.
The first preset version information may be preset by an administrator or default by a system, and is not limited herein. For example, the first preset version information may be USB PD 2.0 or USB PD 3.0.
The first type may be preset by an administrator or default to the system, and is not limited herein. For example, when the charging protocol is a USB PD protocol, the first type may be a PDO type or a PPS type, which is not limited herein.
For example, the first preset version information may be USB PD 2.0, and the first type may be a PPS type. That is, when the first device cannot meet the charging requirement of the second device, it is determined whether the charging protocol version information is the USB PD 2.0 version and the charging packet type is the PPS type.
In the related art, when the charging protocol corresponding to the second device is USB PD 2.0 version, the charging packet sent by the second device to the first device is a PDO-type charging packet. When the charging protocol corresponding to the second device is USB PD 3.0 version, the charging packet sent by the second device to the first device may be a PPS type charging packet, or a PDO type charging packet.
Further, the situation that the first device cannot meet the charging requirement of the second device can be roughly divided into 3 types: the output voltage provided by the first device is not matched with the target voltage required by the second device, the output current provided by the first device is not matched with the target current required by the second device, and the type of the charging data packet of the second device is not matched with the charging protocol version information corresponding to the second device. Under the condition that the type of the charging data packet of the second device is not matched with the charging protocol version information corresponding to the second device, if the output voltage and the output current provided by the first device can still meet the target voltage and the target current required by the second device, the first device is still considered to be capable of meeting the charging requirement of the second device.
When the first device of the USB PD 3.0 charges the second device of the USB PD 2.0, the first device of the USB PD 3.0 sends the broadcast packet of the PPS type to the second device of the USB PD 2.0, and the second device of the USB PD 2.0 generates the charging packet of the PPS type according to the broadcast packet of the PPS type and feeds back the charging packet of the PPS type to the first device of the USB PD 3.0. In this process, since the second device of the USB PD 2.0 cannot effectively recognize the broadcast packet of the PPS type sent by the first device of the USB PD 3.0, the type of the charging packet sent by the second device of the USB PD 2.0 to the first device of the USB PD 3.0 is the PPS type, and the charging requirement information in the charging packet is also in error, that is, the charging packet is in error. At this time, the first device of USB PD 3.0 receives the erroneous charging packet, rejects the charging request of the second device of USB PD 2.0, and retransmits the PPS type broadcast packet to the second device of USB PD 2.0. The second device of USB PD 2.0, receiving the PPS type broadcast packet, still generates an erroneous charging packet. The above steps are repeated in a circulating manner, so that the communication between the first device of the USB PD 3.0 and the second device of the USB PD 2.0 is unstable in the charging process, the phenomenon of repeated charging interruption is easy to occur, the charging efficiency and the service performance of the second device are influenced, and the user satisfaction is influenced.
In addition, if the first device can meet the charging requirement of the second device, the charging protocol version information and the charging data packet type of the second device do not need to be judged, and voltage and current can be directly provided for the second device according to the charging requirement of the second device.
104. And when the charging protocol version information is the first preset version information and the type of the charging data packet is the first type, updating the original broadcasting data packet to a broadcasting data packet corresponding to the charging data packet of the second type to obtain a target broadcasting data packet, wherein the target broadcasting data packet is used for updating the charging data packet by the second equipment.
For example, the first preset version information may be USB PD 2.0, the first type may be a PPS type, and the second type may be a PDO type. And under the condition that the first equipment cannot meet the charging requirement of the second equipment, the version information of the charging protocol is USB PD 2.0 version, and the type of the charging data packet is PPS type, updating the original broadcasting data packet sent by the first equipment into a broadcasting data packet corresponding to the PDO type charging data packet, namely a target broadcasting data packet. The first equipment sends the target broadcast data packet to the second equipment, so that the second equipment updates the type of the charging data packet to be the PDO type, and sends the charging data packet of the PDO type to the first equipment. Therefore, the type of the broadcast data packet sent by the first device can be adjusted, so that the broadcast data packet and the charging data packet of the same type are used between the first device and the second device for charging, that is, when the charging protocol version information of the second device is the USB PD 2.0 version, the broadcast data packet and the charging data packet of the PDO type are used between the first device and the second device for charging, which is helpful for the first device to establish relatively stable charging communication with the second device, improves the charging efficiency of the second device, and optimizes user experience.
It can be seen that, in this embodiment of the application, the electronic device may receive a charging data packet sent by the second device, where the charging data packet includes: the method comprises the steps of judging whether a first device can meet the charging requirement of a second device or not according to charging requirement information, judging whether the charging protocol version information is first preset version information or not and whether the charging data packet type is a first type or not when the first device cannot meet the charging requirement of the second device, updating an original broadcast data packet into a broadcast data packet corresponding to a charging data packet of the second type to obtain a target broadcast data packet when the charging protocol version information is the first preset version information and the charging data packet type is the first type, updating the target broadcast data packet into a broadcast data packet corresponding to the charging data packet of the second type to obtain a target broadcast data packet, and updating the charging data packet by the second device according to the target broadcast data packet, so that the first device can adapt to the charging requirement of the second device according to the updated charging data packet, and the communication stability and reliability between the first device and the second device can be improved, the compatibility between the first equipment and the second equipment is improved, and the charging efficiency is improved.
In one possible example, before receiving the charging data packet sent by the second device in step 101, the method may further include the following steps:
01. acquiring flag bit information;
02. when the flag bit information indicates a first state, determining a broadcast data packet corresponding to the first type of charging data packet as the original broadcast data packet;
03. when the flag bit information indicates a second state, determining that a broadcast data packet corresponding to the second type of charging data packet is the original broadcast data packet;
04. and sending the original broadcast data packet to the second equipment.
The flag bit information may be used to indicate a type of a broadcast packet sent by the first device to the second device. For example, when the first device sends a broadcast packet corresponding to the PDO type charging packet, that is, a PDO type broadcast packet, to the second device, the flag bit information is 0. For another example, when the first device sends a broadcast packet corresponding to the PPS-type charging packet, that is, a broadcast packet of the PPS type, to the second device, the flag bit information is 1. It is to be understood that the flag bit information may also be expressed in other manners, such as high level, low level, and the like, and is not limited herein.
The first state may be a state in which the flag bit information is 1. When the flag bit information is 1, determining that the broadcast data packet corresponding to the PPS-type charging data packet is an original broadcast data packet, that is, determining that the PPS-type broadcast data packet is an original broadcast data packet.
The second state may be a state in which the flag bit information is 0. When the flag bit information is 0, determining that the broadcast data packet corresponding to the PDO-type charging data packet is an original broadcast data packet, that is, determining that the PDO-type broadcast data packet is an original broadcast data packet.
Specifically, after the original broadcast data packet is determined, the original broadcast data packet is sent to the second device, and whether first feedback information sent by the second device is received within a first preset time period is judged, where the first feedback information is used to indicate that the second device has received the broadcast data packet sent by the first device. If the first feedback information sent by the second equipment is received within the first preset time, the first equipment and the second equipment are considered to be successfully communicated, and whether a charging data packet sent by the second equipment is received within the second preset time is judged.
The first preset time period may be set according to the processor performance of the first device and/or the second device, the charging protocol version, and other factors, and is not limited herein, and may be, for example, 0.5 ms, 0.9 ms, 1 ms, 1.1 ms, 1.5 ms, and the like. The second preset time period may be set according to the processor performance, the charging protocol version, and other factors of the first device and/or the second device, and may be the same as or different from the first preset time period, which is not limited herein, and may be, for example, 20 milliseconds, 24 milliseconds, 30 milliseconds, 36 milliseconds, and the like.
And within a first preset time, if the first equipment does not receive the first feedback information sent by the second equipment, determining a corresponding broadcast data packet according to the flag bit information, sending the original broadcast data packet to the second equipment again, recording the times of sending the original broadcast data packet when the first feedback information sent by the second equipment is not received, and stopping sending the original broadcast data packet to the second equipment when the sending times exceed the first preset times. The first preset number of times may be set according to the processor performance of the first device and/or the second device, the version of the charging protocol, and other factors, which are not limited herein. For example, when the charging protocol version information corresponding to the first device is USB PD 3.0, the first preset number of times may be 150 times. When the charging protocol version information corresponding to the first device is USB PD 2.0, the first preset number of times may be 200 times.
And within a second preset time, if the first equipment does not receive the charging data packet sent by the second equipment, determining a corresponding broadcasting data packet according to the flag bit information, sending the original broadcasting data packet to the second equipment again, recording the frequency of sending the original broadcasting data packet when the charging data packet sent by the second equipment is not received, and stopping sending the original broadcasting data packet to the second equipment when the sending frequency exceeds a second preset frequency. The preset number may be set according to the processor performance of the first device and/or the second device, the charging protocol version, and other factors, which are not limited herein. For example, when the charging protocol version information corresponding to the first device is USB PD 3.0, the second preset number of times may be 150 times. When the charging protocol version information corresponding to the first device is USB PD 2.0, the second preset number of times may be 200 times.
When a charging data packet sent by second equipment is received within a second preset time, whether the first equipment can meet the charging requirement of the second equipment is judged according to charging information in the charging data packet, whether charging protocol version information is first preset version information is judged when the first equipment cannot meet the charging requirement of the second equipment, whether the type of the charging data packet is a first type is judged, and when the charging protocol version information is the first preset version information and the type of the charging data packet is the first type, an original broadcasting data packet is updated to a broadcasting data packet corresponding to the charging data packet of the second type, so that a target broadcasting data packet is obtained.
It can be seen that, in the embodiment of the present application, the flag bit information may be obtained, when the flag bit information indicates the first state, the broadcast data packet corresponding to the first type of charging data packet is determined to be the original broadcast data packet, and when the flag bit information indicates the second state, the broadcast data packet corresponding to the second type of charging data packet is determined to be the original broadcast data packet, and the original broadcast data packet is sent to the second device.
In a possible example, in step 104, when the charging protocol version information is the first preset version information and the charging data packet type is the first type, after updating the original broadcast data packet to a broadcast data packet corresponding to the charging data packet of the second type to obtain a target broadcast data packet, the method further includes the following steps:
105. and updating the zone bit information according to the target broadcast data packet.
Specifically, the initial state of the flag bit information may be the first state. That is, when the first device transmits the original broadcast packet to the second device for the first time, the broadcast packet corresponding to the first type of charging packet may be transmitted.
After the first device receives the first and second devices to establish communication, if the first device cannot meet the communication requirement of the second device, the charging protocol version information of the second device is first preset version information, and the charging data packet type of the second device is a first type, the original broadcasting data packet is updated to a broadcasting data packet corresponding to the charging data packet of the second type, a target broadcasting data packet is obtained, and the flag bit information is updated to be in a second state.
The first device sends the target broadcast data packet to the second device, and judges whether first feedback information sent by the second device is received within a first preset time length. If not, at this time, the corresponding original broadcast data packet may be sent to the second device according to the updated flag bit information.
It can be seen that, in the embodiment of the present application, the flag bit information is updated according to the target broadcast packet, so that the first device can directly determine the original broadcast packet according to the flag bit information, a procedure of determining the charging protocol version information and the charging packet type is reduced, and improvement of communication efficiency of the first device and the second device is facilitated.
In a possible example, the step 102, determining whether the first device can meet the charging requirement of the second device according to the charging requirement information, may include the following steps:
1021. obtaining target voltage and target current required by the second equipment according to the charging demand information;
1022. acquiring output voltage and output current corresponding to the first equipment;
1023. and when the output voltage and the target voltage meet a first preset relation and the output current and the target current meet a second preset relation, determining that the first equipment meets the charging requirement of the second equipment.
Specifically, when the output voltage and the target voltage meet a first preset relationship and the output current and the target current meet a second preset relationship, it is determined that the first device meets the charging requirement of the second device. When the first device meets the charging requirement of the second device, the first device sends second feedback information to the second device, and the second feedback information is used for indicating that the first device can meet the charging requirement of the second device.
And after receiving the second feedback information sent by the first equipment, the second equipment sends third feedback information to the first equipment, wherein the third feedback information is used for indicating that the second equipment has received the second feedback information sent by the first equipment. At this point, the first device and the second device enter a charging preparation state respectively, and the first device starts to charge the second device.
It can be seen that, in the embodiment of the application, according to the charging demand information, the target voltage and the target current required by the second device are obtained, the output voltage and the output current corresponding to the first device are obtained, when the output voltage and the target voltage satisfy the first preset relationship and the output current and the target current satisfy the second preset relationship, it is determined that the first device satisfies the charging demand of the second device, and thus, when it is determined that the first device can satisfy the charging demand of the second device, the second device is charged according to the charging demand of the second device, which is beneficial to improving the charging efficiency and optimizing the user experience.
In one possible example, the first preset relationship is:
Uo=Ut×(1+It/Io)×P;
the second preset relationship is as follows:
Io=It×(1+Ut/Uo)×P;
wherein, UtIs the target voltage, UoFor the output voltage, ItIs the target current, IoFor the output current, P is the circuit influencing factor of the first device circuit.
The circuit influence factor may be determined according to a parameter of a component of the first device circuit, a performance of the processor, a degree of aging of the component, and the like, and is not limited herein, and may be, for example, 0.81, 0.9, 0.98, and the like.
For example, the charging demand information may be obtained according to a charging gear position sent by the second device, and the target voltage U required by the second device may be obtained according to the charging demand informationtIs 5V, target current ItIs 2A, and obtains the output voltage U corresponding to the first deviceoIs 7V, and outputs current IoAt 2.5A, the circuit impact factor P of the first device circuit is 0.8. The above values are brought into a first preset relation to obtain an output voltage UoAnd a target voltage UtDoes not satisfy the first predetermined relationship and outputs a current IoAnd a target current ItThe second preset relationship is not satisfied.
Understandably, the output voltage U is derived according to a first preset relationship and a second preset relationshipoAnd an output current IoActual voltage U that can be actually outputted from the first devicerAnd the actual current IrIn contrast, if the voltage error and the current error are within the preset error range, the first device can still be considered to be capable of meeting the charging requirement of the second device.
The voltage error may be a ratio of an actual voltage to an output voltage, and the current error may be a ratio of an actual current to an output current. The preset error range may be set according to circuit performance, processor performance, and other factors of the first device and the second device, and is not limited herein, and may be, for example, 95%, 90%, 85%, 80%, and the like.
Wherein the preset error range of the voltage can be calculated according to the following steps:
determining a voltage mean value and a voltage mean square error according to the output voltage and the actual voltage;
determining a target voltage utility value corresponding to the voltage mean value according to a first mapping relation between the preset voltage mean value and the voltage utility value;
determining a target fine tuning coefficient corresponding to the voltage mean square error according to a second mapping relation between the preset voltage mean square error and the fine tuning coefficient;
and adjusting the utility value of the target voltage according to the target fine tuning coefficient to obtain a preset error range of the voltage.
The electronic device may store a first mapping relationship between a preset voltage mean and a utility value and a second mapping relationship between a preset voltage mean square error and a fine tuning coefficient in advance. The voltage utility value described above may be used to represent the effective value of the output voltage. The fine tuning coefficient can be used for adjusting the target voltage utility value according to the voltage mean square error so as to determine a preset error range. The fine tuning coefficient may be set by an administrator or default, and may be set according to circuit performance, processor performance, and other factors of the first device and the second device, and is not limited herein, and may be, for example, 1.8, 1.2, 0.98, 0.9, 0.85, 0.61, and the like.
For example, according to the output voltage UoAnd the actual voltage UrDetermining the mean value of the voltage as
Figure DEST_PATH_IMAGE001
And target mean square error
Figure 554775DEST_PATH_IMAGE002
. Determining the voltage mean value according to a first mapping relation between the preset voltage mean value and the voltage utility value
Figure 393287DEST_PATH_IMAGE003
Determining a voltage mean square error according to a second mapping relation between a preset voltage mean square error and a fine tuning coefficient and a corresponding target voltage utility value a
Figure 376287DEST_PATH_IMAGE004
The corresponding target fine tuning coefficient b. According to the targetThe fine tuning coefficient b adjusts the target voltage utility value a to obtain a preset error range c of the voltage, and the specific calculation formula may be:
Figure 194332DEST_PATH_IMAGE005
. It can be understood that, when the value range of the fine tuning coefficient b changes, the corresponding preset error ranges c are not the same.
Similarly, the preset error range of the current can be calculated according to the following steps:
determining a current mean value and a current mean square error according to the output current and the actual current;
determining a target current utility value corresponding to the current mean value according to a third mapping relation between the preset current mean value and the current utility value;
determining a target fine tuning coefficient corresponding to the current mean square error according to a preset fourth mapping relation between the current mean square error and the fine tuning coefficient;
and adjusting the target current utility value according to the target fine tuning coefficient to obtain a preset error range of the current.
The electronic device may store a third mapping relationship between a preset current mean value and a current utility value and a fourth mapping relationship between a preset current mean square error and a fine tuning coefficient in advance. The current utility value may be used to represent an effective value of the output current. The fine tuning coefficient can be used for adjusting the target current utility value according to the current mean square error so as to determine a preset error range. The fine tuning coefficient may be set by an administrator or default, and may be set according to circuit performance, processor performance, and other factors of the first device and the second device, and is not limited herein, and may be, for example, 1.8, 1.2, 0.98, 0.9, 0.85, 0.61, and the like.
The principle of the preset error range of the current is consistent with that of the preset error range calculation formula of the voltage, and the embodiment of the preset error range of the voltage may be specifically referred to, that is, the preset error range of the current = (1 + target trimming coefficient)/target current utility value, which is not described herein again.
It can be seen that, in this application example, utilize target trimming coefficient, target voltage utility value and target current utility value to adjust preset error range, be favorable to the nimble condition that first equipment satisfies the demand of charging of second equipment to when judging that first equipment can satisfy the demand of charging of second equipment, charge for second equipment according to the demand of charging of second equipment, help improving charge efficiency, optimize user experience.
In one possible example, in the step 103, determining whether the charging protocol version information is a first preset version information and whether the charging data packet type is a first type includes the following steps:
1031. and updating the original broadcast data packet according to the charging requirement information to obtain the target broadcast data packet when the charging protocol version information is not the first preset version information and/or the charging data packet is not the first type.
Specifically, when the charging protocol version information is not the first preset version information and/or the charging packet type is not the first type, it indicates that the reason why the first device does not satisfy the charging requirement of the second device is not that the charging protocol versions of the first device and the second device are incompatible, but that the output voltage provided by the first device fails to match the target voltage required by the second device or the output current provided by the first device fails to match the target current. Therefore, at this time, the output voltage and the output current in the original broadcast packet may be updated according to the charging requirement information corresponding to the second device, so as to obtain the target broadcast packet, and the target broadcast packet is sent to the second device.
It can be seen that, in the embodiment of the present application, when the charging protocol version information is not the first preset version information or the type of the charging data packet is not the first type, the original broadcast data packet is updated according to the charging demand information to obtain the target broadcast data packet, so that the first device can adapt to the charging demand of the second device according to the updated charging data packet, and further, the charging efficiency is improved.
Referring to fig. 2, fig. 2 is a schematic flow chart of a charging requirement adaptation method according to an embodiment of the present application, applied to the electronic device shown in fig. 1A, where the charging requirement adaptation method includes:
201. and acquiring the zone bit information.
202. And when the flag bit information indicates a first state, determining that the broadcast data packet corresponding to the first type of charging data packet is the original broadcast data packet.
203. And when the flag bit information indicates a second state, determining that the broadcast data packet corresponding to the second type of charging data packet is the original broadcast data packet.
204. And sending the original broadcast data packet to a second device.
205. Receiving a charging data packet sent by the second device, wherein the charging data packet comprises: charging requirement information, charging protocol version information and charging data packet types.
206. And judging whether the first equipment can meet the charging requirement of the second equipment or not according to the charging requirement information.
207. And when the first equipment cannot meet the charging requirement of the second equipment, judging whether the charging protocol version information is first preset version information or not and whether the charging data packet type is a first type or not.
208. And when the charging protocol version information is the first preset version information and the type of the charging data packet is the first type, updating the original broadcasting data packet to a broadcasting data packet corresponding to the charging data packet of the second type to obtain a target broadcasting data packet, wherein the target broadcasting data packet is used for updating the charging data packet by the second equipment.
For the detailed description of the steps 201 to 208, reference may be made to the corresponding steps of the charging requirement adapting method described in the above fig. 1B, and details are not repeated here.
It can be seen that, in the charging requirement adapting method described in this embodiment of the application, the electronic device may obtain the flag bit information, determine, when the flag bit information indicates a first state, that the broadcast data packet corresponding to the charging data packet of the first type is an original broadcast data packet, and when the flag bit information indicates a second state, determine, as the original broadcast data packet, that the broadcast data packet corresponding to the charging data packet of the second type is an original broadcast data packet, send the original broadcast data packet to the second device, and receive the charging data packet sent by the second device, where the charging data packet includes: the method comprises the steps of judging whether a first device can meet the charging requirement of a second device or not according to charging requirement information, judging whether the charging protocol version information is first preset version information or not and whether the charging data packet type is a first type or not when the first device cannot meet the charging requirement of the second device, updating an original broadcast data packet into a broadcast data packet corresponding to a charging data packet of the second type to obtain a target broadcast data packet when the charging protocol version information is the first preset version information and the charging data packet type is the first type, updating the target broadcast data packet into a broadcast data packet corresponding to the charging data packet of the second type to obtain a target broadcast data packet, and updating the charging data packet by the second device according to the target broadcast data packet, so that the first device can adapt to the charging requirement of the second device according to the updated charging data packet, and the communication stability and reliability between the first device and the second device can be improved, the compatibility between the first equipment and the second equipment is improved, and the charging efficiency is improved.
Referring to fig. 3, in keeping with the embodiment shown in fig. 1B, fig. 3 is a schematic flowchart of a charging requirement adapting method provided in an embodiment of the present application, applied to the electronic device shown in fig. 1A, where the charging requirement adapting method includes:
301. and acquiring the zone bit information.
302. And when the flag bit information indicates a first state, determining that the broadcast data packet corresponding to the first type of charging data packet is the original broadcast data packet.
303. And when the flag bit information indicates a second state, determining that the broadcast data packet corresponding to the second type of charging data packet is the original broadcast data packet.
304. And sending the original broadcast data packet to a second device.
305. Receiving a charging data packet sent by the second device, wherein the charging data packet comprises: charging requirement information, charging protocol version information and charging data packet types.
306. And judging whether the first equipment can meet the charging requirement of the second equipment or not according to the charging requirement information.
307. And when the first equipment cannot meet the charging requirement of the second equipment, judging whether the charging protocol version information is first preset version information or not and whether the charging data packet type is a first type or not.
308. And when the charging protocol version information is the first preset version information and the type of the charging data packet is the first type, updating the original broadcasting data packet to a broadcasting data packet corresponding to the charging data packet of the second type to obtain a target broadcasting data packet, wherein the target broadcasting data packet is used for updating the charging data packet by the second equipment.
309. And updating the zone bit information according to the target broadcast data packet.
For the detailed description of steps 301 to 309, reference may be made to the corresponding steps of the charging requirement adapting method described in fig. 1B, and details are not repeated here.
It can be seen that, in the charging requirement adapting method described in this embodiment of the application, the electronic device may obtain the flag bit information, determine, when the flag bit information indicates a first state, that the broadcast data packet corresponding to the charging data packet of the first type is an original broadcast data packet, and when the flag bit information indicates a second state, determine, as the original broadcast data packet, that the broadcast data packet corresponding to the charging data packet of the second type is an original broadcast data packet, send the original broadcast data packet to the second device, and receive the charging data packet sent by the second device, where the charging data packet includes: charging requirement information, charging protocol version information and charging data packet type, judging whether the first equipment can meet the charging requirement of the second equipment or not according to the charging requirement information, judging whether the charging protocol version information is first preset version information or not and whether the charging data packet type is a first type or not when the first equipment cannot meet the charging requirement of the second equipment, updating an original broadcasting data packet into a broadcasting data packet corresponding to the charging data packet of the second type to obtain a target broadcasting data packet when the charging protocol version information is the first preset version information and the charging data packet type is the first type, updating the charging data packet by the second equipment according to the target broadcasting data packet, updating the flag bit information according to the target broadcasting data packet, and thus enabling the first equipment to adapt to the charging requirement of the second equipment according to the updated charging data packet, the method and the device are favorable for improving the communication stability and reliability between the first device and the second device, improving the compatibility between the first device and the second device and further improving the charging efficiency.
In accordance with the foregoing embodiments, please refer to fig. 4, where fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application, and as shown in the drawing, the electronic device includes a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and in an embodiment of the present application, the electronic device includes a first device, and the program includes instructions for performing the following steps:
receiving a charging data packet sent by a second device, wherein the charging data packet comprises: charging requirement information, charging protocol version information and charging data packet types;
judging whether the first equipment can meet the charging requirement of the second equipment or not according to the charging requirement information;
when the first device cannot meet the charging requirement of the second device, judging whether the charging protocol version information is first preset version information or not and whether the charging data packet type is a first type or not;
and when the charging protocol version information is the first preset version information and the type of the charging data packet is the first type, updating the original broadcasting data packet to a broadcasting data packet corresponding to the charging data packet of the second type to obtain a target broadcasting data packet, wherein the target broadcasting data packet is used for updating the charging data packet by the second equipment.
It can be seen that, the electronic device described in this embodiment of the application may receive a charging data packet sent by a second device, where the charging data packet includes: the method comprises the steps of judging whether a first device can meet the charging requirement of a second device or not according to charging requirement information, judging whether the charging protocol version information is first preset version information or not and whether the charging data packet type is a first type or not when the first device cannot meet the charging requirement of the second device, updating an original broadcast data packet into a broadcast data packet corresponding to a charging data packet of the second type to obtain a target broadcast data packet when the charging protocol version information is the first preset version information and the charging data packet type is the first type, updating the target broadcast data packet into a broadcast data packet corresponding to the charging data packet of the second type to obtain a target broadcast data packet, and updating the charging data packet by the second device according to the target broadcast data packet, so that the first device can adapt to the charging requirement of the second device according to the updated charging data packet, and the communication stability and reliability between the first device and the second device can be improved, the compatibility between the first equipment and the second equipment is improved, and the charging efficiency is improved.
In one possible example, before the determining whether the first device is capable of meeting the charging requirement of the second device, the program further includes instructions for:
acquiring flag bit information;
when the flag bit information indicates a first state, determining a broadcast data packet corresponding to the first type of charging data packet as the original broadcast data packet;
when the flag bit information indicates a second state, determining that a broadcast data packet corresponding to the second type of charging data packet is the original broadcast data packet;
and sending the original broadcast data packet to the second equipment.
In one possible example, when the charging protocol version information is the first preset version information and the charging data packet type is the first type, after an original broadcast data packet is updated to a broadcast data packet corresponding to the charging data packet of the second type to obtain a target broadcast data packet, the program includes instructions for performing the following steps:
and updating the zone bit information according to the target broadcast data packet.
In one possible example, in the determining whether the first device can meet the charging requirement of the second device according to the charging requirement information, the program includes instructions for:
obtaining target voltage and target current required by the second equipment according to the charging demand information;
acquiring output voltage and output current corresponding to the first equipment;
and when the output voltage and the target voltage meet a first preset relation and the output current and the target current meet a second preset relation, determining that the first equipment meets the charging requirement of the second equipment.
In one possible example, the first preset relationship is:
Uo=Ut×(1+It/Io)×P;
the second preset relationship is as follows:
Io=It×(1+Ut/Uo)×P;
wherein, UtIs the target voltage, UoFor the output voltage, ItIs the target current, IoFor the output current, P is the circuit influencing factor of the first device circuit.
In one possible example, when the charging protocol version information is the first preset version information and the charging data packet type is the first type, the program further includes instructions for updating an original broadcast data packet to a broadcast data packet corresponding to the charging data packet of the second type to obtain a target broadcast data packet, where the program further includes instructions for:
and updating the original broadcast data packet according to the charging requirement information to obtain the target broadcast data packet when the charging protocol version information is not the first preset version information or the charging data packet type is not the first type.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that in order to implement the above functions, it includes corresponding hardware structures and/or software modules for performing the respective functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the functional units may be divided according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Referring to fig. 5A, fig. 5A is a block diagram illustrating functional units of a charging requirement adapting apparatus 500 according to an embodiment of the present application, where the apparatus 500 includes: a receiving unit 501, a judging unit 502 and an updating unit 503, wherein,
the receiving unit 501 is configured to receive a charging data packet sent by a second device, where the charging data packet includes: charging requirement information, charging protocol version information and charging data packet types;
the determining unit 502 is configured to determine whether the first device can meet the charging requirement of the second device according to the charging requirement information;
the determining unit 502 is further configured to determine whether the charging protocol version information is a first preset version information and the charging data packet type is a first type when the first device cannot meet the charging requirement of the second device;
the updating unit 503 is configured to update the original broadcast packet to a broadcast packet corresponding to the charging packet of the second type to obtain a target broadcast packet when the charging protocol version information is the first preset version information and the charging packet type is the first type, where the target broadcast packet is used by the second device to update the charging packet.
It can be seen that, the charging requirement adapting apparatus described in this embodiment of the present application may receive a charging data packet sent by a second device, where the charging data packet includes: the method comprises the steps of judging whether a first device can meet the charging requirement of a second device or not according to charging requirement information, judging whether the charging protocol version information is first preset version information or not and whether the charging data packet type is a first type or not when the first device cannot meet the charging requirement of the second device, updating an original broadcast data packet into a broadcast data packet corresponding to a charging data packet of the second type to obtain a target broadcast data packet when the charging protocol version information is the first preset version information and the charging data packet type is the first type, updating the target broadcast data packet into a broadcast data packet corresponding to the charging data packet of the second type to obtain a target broadcast data packet, and updating the charging data packet by the second device according to the target broadcast data packet, so that the first device can adapt to the charging requirement of the second device according to the updated charging data packet, and the communication stability and reliability between the first device and the second device can be improved, the compatibility between the first equipment and the second equipment is improved, and the charging efficiency is improved.
In one possible example, as shown in fig. 5B, the apparatus 500 may further include, as compared to fig. 5A described above: an obtaining unit 504, a determining unit 505, and a sending unit 506, wherein,
the obtaining unit 504 is configured to obtain flag bit information:
the determining unit 505 is configured to determine, when the flag bit information indicates a first state, that a broadcast packet corresponding to the first type of charging packet is the original broadcast packet;
the determining unit 505 is further configured to determine, when the flag bit information indicates a second state, that a broadcast data packet corresponding to the second type of charging data packet is the original broadcast data packet;
the sending unit 506 is configured to send the original broadcast packet to the second device.
It can be seen that the charging requirement adapting device provided in this embodiment of the application may obtain the flag bit information, determine that the broadcast data packet corresponding to the charging data packet of the first type is the original broadcast data packet when the flag bit information indicates the first state, determine that the broadcast data packet corresponding to the charging data packet of the second type is the original broadcast data packet when the flag bit information indicates the second state, send the original broadcast data packet to the second device, and receive the charging data packet sent by the second device, where the charging data packet includes: the method comprises the steps of judging whether a first device can meet the charging requirement of a second device or not according to charging requirement information, judging whether the charging protocol version information is first preset version information or not and whether the charging data packet type is a first type or not when the first device cannot meet the charging requirement of the second device, updating an original broadcast data packet into a broadcast data packet corresponding to a charging data packet of the second type to obtain a target broadcast data packet when the charging protocol version information is the first preset version information and the charging data packet type is the first type, updating the target broadcast data packet into a broadcast data packet corresponding to the charging data packet of the second type to obtain a target broadcast data packet, and updating the charging data packet by the second device according to the target broadcast data packet, so that the first device can adapt to the charging requirement of the second device according to the updated charging data packet, and the communication stability and reliability between the first device and the second device can be improved, the compatibility between the first equipment and the second equipment is improved, and the charging efficiency is improved.
In a possible example, when the charging protocol version information is the first preset version information and the charging data packet type is the first type, the updating unit 503 is further specifically configured to update an original broadcast data packet to a broadcast data packet corresponding to the charging data packet of the second type, and obtain a target broadcast data packet:
and updating the zone bit information according to the target broadcast data packet.
In a possible example, in the aspect of determining whether the first device can meet the charging requirement of the second device according to the charging requirement information, the determining unit 502 is further specifically configured to:
obtaining target voltage and target current required by the second equipment according to the charging demand information;
acquiring output voltage and output current corresponding to the first equipment;
and when the output voltage and the target voltage meet a first preset relation and the output current and the target current meet a second preset relation, determining that the first equipment meets the charging requirement of the second equipment.
In a possible example, when the charging protocol version information is the first preset version information and the charging data packet type is the first type, the updating unit 503 is further specifically configured to update an original broadcast data packet to a broadcast data packet corresponding to the charging data packet of the second type to obtain a target broadcast data packet:
and updating the original broadcast data packet according to the charging requirement information to obtain the target broadcast data packet when the charging protocol version information is not the first preset version information or the charging data packet type is not the first type.
It can be understood that the functions of each program module of the charging requirement adapting device of this embodiment may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
Embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, the computer program enables a computer to execute part or all of the steps of any one of the methods as described in the above method embodiments, and the computer includes a control platform.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising the control platform.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (8)

1. A charging demand adapting method is applied to a first device, and is characterized by comprising the following steps:
acquiring flag bit information;
when the flag bit information indicates a first state, determining that a broadcast data packet corresponding to a first type of charging data packet is an original broadcast data packet;
when the flag bit information indicates a second state, determining a broadcast data packet corresponding to a second type of charging data packet as the original broadcast data packet;
sending the original broadcast data packet to a second device;
receiving a charging data packet sent by the second device, wherein the charging data packet comprises: charging requirement information, charging protocol version information and charging data packet types;
judging whether the first equipment can meet the charging requirement of the second equipment or not according to the charging requirement information;
when the first device cannot meet the charging requirement of the second device, judging whether the charging protocol version information is first preset version information or not and whether the charging data packet type is the first type or not;
and when the charging protocol version information is the first preset version information and the charging data packet type is the first type, updating the original broadcasting data packet into a broadcasting data packet corresponding to the charging data packet of the second type to obtain a target broadcasting data packet, wherein the target broadcasting data packet is used for updating the charging data packet by the second equipment.
2. The method of claim 1, wherein when the charging protocol version information is the first preset version information and the charging packet type is the first type, updating an original broadcast packet to a broadcast packet corresponding to the charging packet of a second type to obtain a target broadcast packet, and the method further comprises:
and updating the zone bit information according to the target broadcast data packet.
3. The method according to claim 1, wherein the determining whether the first device can meet the charging requirement of the second device according to the charging requirement information includes:
obtaining target voltage and target current required by the second equipment according to the charging demand information;
acquiring output voltage and output current corresponding to the first equipment;
and when the output voltage and the target voltage meet a first preset relation and the output current and the target current meet a second preset relation, determining that the first equipment meets the charging requirement of the second equipment.
4. The method of claim 3, wherein the first predetermined relationship is:
Uo=Ut×(1+It/Io)×P;
the second preset relationship is as follows:
Io=It×(1+Ut/Uo)×P;
wherein, UtIs the target voltage, UoFor the output voltage, ItIs the target current, IoFor the output current, P is the circuit influencing factor of the first device circuit.
5. The method according to any one of claims 1 to 3, wherein the determining whether the charging protocol version information is a first preset version information and the charging packet type is a first type comprises:
and updating the original broadcast data packet according to the charging requirement information to obtain the target broadcast data packet when the charging protocol version information is not the first preset version information and/or the charging data packet is not the first type.
6. A charging demand adapting device is applied to a first device, and is characterized by comprising: an acquisition unit, a determination unit, a transmission unit, a reception unit, a judgment unit, and an update unit, wherein,
the obtaining unit is configured to obtain flag bit information:
the determining unit is used for determining a broadcast data packet corresponding to a first type of charging data packet as an original broadcast data packet when the flag bit information indicates a first state;
the determining unit is further configured to determine, when the flag bit information indicates a second state, a broadcast data packet corresponding to a second type of charging data packet as the original broadcast data packet;
the sending unit is used for sending the original broadcast data packet to a second device;
the receiving unit is configured to receive a charging data packet sent by the second device, where the charging data packet includes: charging requirement information, charging protocol version information and charging data packet types;
the judging unit is used for judging whether the first equipment can meet the charging requirement of the second equipment or not according to the charging requirement information;
the judging unit is further configured to judge whether the charging protocol version information is first preset version information and whether the charging data packet type is the first type when the first device cannot meet the charging requirement of the second device;
the updating unit is configured to update the original broadcast packet to a broadcast packet corresponding to the second type of charging packet to obtain a target broadcast packet when the charging protocol version information is the first preset version information and the type of the charging packet is the first type, where the target broadcast packet is used for the second device to update the charging packet.
7. An electronic device comprising a processor, a memory for storing one or more programs and configured for execution by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-5.
8. A computer-readable storage medium, characterized by storing a computer program for electronic data exchange, wherein the computer program causes a computer to execute instructions of the steps in the method according to any one of claims 1-5.
CN202110884727.0A 2021-08-03 2021-08-03 Charging demand adaptation method, electronic equipment and related product Active CN113328505B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202110884727.0A CN113328505B (en) 2021-08-03 2021-08-03 Charging demand adaptation method, electronic equipment and related product
CN202111393257.4A CN115912529A (en) 2021-08-03 2021-08-03 Charging demand adaptation method, electronic device, and related medium and program product
PCT/CN2022/102726 WO2023011067A1 (en) 2021-08-03 2022-06-30 Charging requirement adaptation method, and electronic device and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110884727.0A CN113328505B (en) 2021-08-03 2021-08-03 Charging demand adaptation method, electronic equipment and related product

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202111393257.4A Division CN115912529A (en) 2021-08-03 2021-08-03 Charging demand adaptation method, electronic device, and related medium and program product

Publications (2)

Publication Number Publication Date
CN113328505A CN113328505A (en) 2021-08-31
CN113328505B true CN113328505B (en) 2021-10-29

Family

ID=77426880

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202111393257.4A Pending CN115912529A (en) 2021-08-03 2021-08-03 Charging demand adaptation method, electronic device, and related medium and program product
CN202110884727.0A Active CN113328505B (en) 2021-08-03 2021-08-03 Charging demand adaptation method, electronic equipment and related product

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202111393257.4A Pending CN115912529A (en) 2021-08-03 2021-08-03 Charging demand adaptation method, electronic device, and related medium and program product

Country Status (2)

Country Link
CN (2) CN115912529A (en)
WO (1) WO2023011067A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115912529A (en) * 2021-08-03 2023-04-04 深圳英集芯科技股份有限公司 Charging demand adaptation method, electronic device, and related medium and program product
CN117375148A (en) * 2023-09-25 2024-01-09 北京小米移动软件有限公司 Charging method, charging device, and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012143092A (en) * 2011-01-04 2012-07-26 Kimitake Utsunomiya Charging ac adapter
CN106740168A (en) * 2016-11-18 2017-05-31 许继电源有限公司 A kind of recognition methods of electric automobile BMS communication protocol versions and device
CN107769320A (en) * 2017-11-10 2018-03-06 深圳天珑无线科技有限公司 A kind of mobile terminal and its charge control method and system
CN111352645A (en) * 2020-03-31 2020-06-30 广州昂宝电子有限公司 Firmware updating method and device for USB-PD charger
CN211790827U (en) * 2020-02-28 2020-10-27 芯海科技(深圳)股份有限公司 Power supply circuit and power supply device
CN111917772A (en) * 2020-07-31 2020-11-10 普天新能源有限责任公司 Adaptive charging pile communication protocol method and device
CN112688373A (en) * 2020-11-24 2021-04-20 深圳市乐麦文化传播有限公司 Charging method and device and data line

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4633034B2 (en) * 2006-10-31 2011-02-16 Necアクセステクニカ株式会社 Information processing system, information processing method, and information processing program
CN103200219A (en) * 2013-02-05 2013-07-10 北京小米科技有限责任公司 Data package updating method, device, terminal equipment and server
CN105302587B (en) * 2014-06-30 2019-01-11 腾讯科技(深圳)有限公司 Data-updating method and device
CN111384738A (en) * 2018-12-29 2020-07-07 比亚迪汽车工业有限公司 Control method and device of charging protocol
CN115912529A (en) * 2021-08-03 2023-04-04 深圳英集芯科技股份有限公司 Charging demand adaptation method, electronic device, and related medium and program product

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012143092A (en) * 2011-01-04 2012-07-26 Kimitake Utsunomiya Charging ac adapter
CN106740168A (en) * 2016-11-18 2017-05-31 许继电源有限公司 A kind of recognition methods of electric automobile BMS communication protocol versions and device
CN107769320A (en) * 2017-11-10 2018-03-06 深圳天珑无线科技有限公司 A kind of mobile terminal and its charge control method and system
CN211790827U (en) * 2020-02-28 2020-10-27 芯海科技(深圳)股份有限公司 Power supply circuit and power supply device
CN111352645A (en) * 2020-03-31 2020-06-30 广州昂宝电子有限公司 Firmware updating method and device for USB-PD charger
CN111917772A (en) * 2020-07-31 2020-11-10 普天新能源有限责任公司 Adaptive charging pile communication protocol method and device
CN112688373A (en) * 2020-11-24 2021-04-20 深圳市乐麦文化传播有限公司 Charging method and device and data line

Also Published As

Publication number Publication date
CN115912529A (en) 2023-04-04
WO2023011067A1 (en) 2023-02-09
CN113328505A (en) 2021-08-31

Similar Documents

Publication Publication Date Title
CN113328505B (en) Charging demand adaptation method, electronic equipment and related product
US10270269B2 (en) Quick charging method, power adapter and mobile terminal, bidirectional communication using USB interface
CN111200811B (en) TWS earphone, upgrading method and device thereof and readable storage medium
EP3944657A1 (en) Data transmission method and related apparatus
CN104410665B (en) A kind of method for down loading and equipment upgrading bag
CN110032382A (en) A kind of vehicle electronic control unit upgrade method, system and terminal device
CN111163387B (en) TWS earphone upgrading method and device, charging box and storage medium
CN106575169B (en) Method for eliminating interference of charger on touch screen and mobile terminal
CN106471789A (en) The methods, devices and systems of adapter upgrade
US20230224654A1 (en) Earphone debugging method and device, and storage medium
CN112256297A (en) Bluetooth peripheral firmware upgrading method and system and mobile phone terminal
JP2005516322A (en) Adaptation costs for communication network services based on network congestion
CN110837381B (en) Software upgrading method and device for projection equipment
CN110575670A (en) Game data configuration strategy generation method and related product
CN111615030A (en) Upgrading method, device and medium for novel TWS earphone
CN110764806A (en) TWS earphone and upgrading method and device thereof
CN107920074B (en) SDK automatic upgrading method, terminal equipment and master control server
CN110769411A (en) Method, device, equipment and system for stably realizing batch OTA (over the air) upgrade of terminal equipment
CN112925538B (en) Equipment updating method, system and device
US7873747B2 (en) Device and method for transmitting data
CN112860388B (en) Regulation strategy updating method and related equipment
CN111984901A (en) Message pushing method and related product thereof
CN110601383B (en) Laser charging method and related equipment
CN105007339A (en) Resource download method, device thereof and intelligent terminal
CN110798827B (en) eSIM card and initialization method thereof

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