WO2023024824A1 - Charging protocol determination method and apparatus, electronic device, and readable storage medium - Google Patents

Charging protocol determination method and apparatus, electronic device, and readable storage medium Download PDF

Info

Publication number
WO2023024824A1
WO2023024824A1 PCT/CN2022/108791 CN2022108791W WO2023024824A1 WO 2023024824 A1 WO2023024824 A1 WO 2023024824A1 CN 2022108791 W CN2022108791 W CN 2022108791W WO 2023024824 A1 WO2023024824 A1 WO 2023024824A1
Authority
WO
WIPO (PCT)
Prior art keywords
charging
protocol
charging protocol
protocols
target
Prior art date
Application number
PCT/CN2022/108791
Other languages
French (fr)
Chinese (zh)
Inventor
刘臻
林尚波
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2023024824A1 publication Critical patent/WO2023024824A1/en

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
    • 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
    • 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

Definitions

  • the present application relates to the technical field of charging, and more specifically, relates to a method, device, electronic device and readable storage medium for determining a charging protocol.
  • the existing charging equipment and power supply equipment can support multiple fast charging protocols.
  • the charging equipment detects the signal of the power supply equipment, it can try to shake hands with one of the fast charging protocols with the power supply equipment. If the handshake If it succeeds, perform fast charging; if the handshake fails, select another fast charging protocol, and try to shake hands with the power supply device according to the fast charging protocol; and so on, until the handshake is realized based on a certain fast charging protocol or all supported protocols are Handshake failed.
  • the traditional fast charging protocol selection method is easy to cause multiple fast charging protocol handshake failures, thereby prolonging the interaction time before charging.
  • the present application discloses a method, device, electronic device, and computer-readable storage medium for determining a charging protocol, which can reduce the interaction time before charging.
  • a method for determining a charging protocol is provided, which is applied to a first device, including:
  • Receive charging protocol information sent by the second device includes identifications of at least two charging protocols supported by the second device;
  • a method for determining a charging protocol is provided, which is applied to a first device, including:
  • the charging protocol information includes identifications of at least two charging protocols supported by the first device;
  • the target charging protocol is determined by the second device based on at least two charging protocols supported by the first device and the charging protocol supported by the second device .
  • an apparatus for determining a charging protocol is provided, which is applied to a first device, including:
  • a receiving module configured to receive charging protocol information sent by the second device; the charging protocol information includes identifications of at least two charging protocols supported by the second device;
  • a determining module configured to determine a target charging protocol based on at least two charging protocols supported by the second device and a charging protocol supported by the first device;
  • a sending module configured to send the identifier of the target charging protocol to the second device.
  • an apparatus for determining a charging protocol is provided, which is applied to the first device, including:
  • a sending module configured to send charging protocol information to the second device;
  • the charging protocol information includes identifications of at least two charging protocols supported by the first device;
  • the receiving module is configured to receive the identification of the target charging protocol sent by the second device; the target charging protocol is based on at least two charging protocols supported by the first device and the second device supported by the second device. determined by the charging protocol.
  • an electronic device including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor is made to perform the functions described in the first aspect and the second aspect.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the methods described in the first aspect and the second aspect are implemented.
  • the first device receives the charging protocol information sent by the second device.
  • the charging protocol information includes the identifiers of at least two charging protocols supported by the second device, which means that the second device sends multiple charging protocols to the first device at one time, and the first device can be based on multiple charging protocols supported by the second device.
  • FIG. 1 is an application environment diagram of a method for determining a charging protocol in an embodiment
  • Fig. 2 is a flowchart of a method for determining a charging protocol in an embodiment
  • Fig. 3 is a flowchart of a method for determining a charging protocol in another embodiment
  • Fig. 4 is a structural block diagram of a device for determining a charging protocol in an embodiment
  • Fig. 5 is a structural block diagram of a device for determining a charging protocol in an embodiment
  • Fig. 6 is an internal structure diagram of an electronic device in one embodiment.
  • first, second and the like used in this application may be used to describe various elements herein, but these elements are not limited by these terms. These terms are only used to distinguish one element from another element.
  • a first client could be termed a second client, and, similarly, a second client could be termed a first client, without departing from the scope of the present application.
  • Both the first client and the second client are clients, but they are not the same client.
  • Fig. 1 is a schematic diagram of an application environment of a method for determining a charging protocol in an embodiment.
  • the application environment includes a first device 102 and a second device 104, wherein the first device 102 may be a charging device, the second device 104 may be a power supply device, or the first device 102 may be a power supply device,
  • the second device 104 is a charging device.
  • Both the first device 102 and the second device 104 support multiple charging protocols, and the first device 102 and the second device 104 can select a charging protocol supported by both of the multiple charging protocols supported by themselves for charging.
  • the power supply device can be a charger, a charging head, a power bank, an adapter, etc.
  • the charging device can be various terminals such as a mobile phone, a tablet computer, and a watch.
  • Fig. 2 is a flowchart of a method for determining a charging protocol in an embodiment.
  • the method for determining the charging protocol in this embodiment is described by taking the first device running in FIG. 1 as an example. As shown in Figure 2, the method for determining the charging protocol includes:
  • S201 Receive charging protocol information sent by the second device; the charging protocol information includes identifications of at least two charging protocols supported by the second device.
  • the identification of at least two charging protocols supported by the second device may be the name of the charging protocol supported by the second device, or the code of the charging protocol supported by the second device, or may be the charging protocol supported by the second device.
  • the manufacturer's name and the like of the manufacturer to whom the protocol belongs are not limited in this embodiment of the application.
  • the second device may send charging protocol information including identifications of at least two charging protocols it supports to the first device. For example, if the charging protocols supported by the second device include charging protocol A, charging protocol B, and charging protocol C, the second device carries the identification of charging protocol A, charging protocol B, and charging protocol C in the charging The protocol information is sent to the first device.
  • the at least two charging protocols supported by the second device may be charging protocols belonging to different manufacturers, or may be charging protocols corresponding to different charging powers.
  • the first device may be a charging device
  • the second device may be a power supply device
  • the first device may be a power supply device
  • the second device may be a charging device.
  • S202 Determine a target charging protocol based on the at least two charging protocols supported by the second device and the charging protocol supported by the first device.
  • the first device may determine one of the charging protocols supported by both the first device and the second device as the target charging protocol, that is, from the second One charging protocol among the at least two charging protocols supported by the device and the charging protocols supported by the first device is determined as the target charging protocol.
  • the first device may determine multiple charging protocols supported by the first device and the second device, and then select one of the charging protocols as the target charging protocol according to some selection mechanism, for example, according to the priority order of the commonly supported charging protocols Determine the target charging protocol, or determine the target charging protocol according to the rated power of commonly supported charging protocols, and so on.
  • the charging protocol supported by the second device includes charging protocol A, charging protocol B, and charging protocol C
  • the charging protocol supported by the first device includes charging protocol A and charging protocol C as an example.
  • a device determines that charging protocol A and charging protocol C are charging protocols supported by both, and then determines the target charging protocol from protocol A and protocol C.
  • the target charging protocol determined by the first device may be protocol A or protocol C. It can be understood that the target charging protocol determined by the first device may be the charging protocol with the highest priority among the charging protocols supported by the first device and the second device, or may be the charging protocol supported by the first device and the second device.
  • the charging protocol with the highest charging power among the protocols is not limited in this embodiment of the present application.
  • the first device determines the target charging protocol, it sends the identification of the target charging protocol to the second device, and continues to use the charging protocols supported by the second device including three protocols: protocol A, protocol B, and protocol C.
  • the charging protocol supported by the second device includes protocol A and protocol C as an example. If the target charging protocol determined by the first device is protocol A, the first device sends the identifier of protocol A to the second device; if the first The target charging protocol determined by the device is protocol C, and the first device sends the identifier of protocol C to the second device.
  • the first device After the second device receives the identification of the target charging protocol, the first device performs a charging process with the second device based on the target charging protocol. For example, if the first device is a power supply device and the second device is a charging device, the first device charges the second device according to the target charging protocol; if the first device is a charging device and the second device is a power supply device, the second device The first device is charged according to the target charging protocol.
  • the first device when both the first device and the second device support multiple charging protocols, the first device receives the charging protocol information sent by the second device, since the charging protocol information includes at least one of the charging protocols supported by the second device.
  • the identification of the two charging protocols is equivalent to the second device sending multiple charging protocols to the first device at one time, and the first device can directly determine the target charging protocol based on the multiple charging protocols supported by the second device and the charging protocols supported by itself.
  • the protocol avoids the process of selecting the charging protocol multiple times, thereby shortening the time for the first charging device to select the charging protocol, and reducing the interaction time between the first device and the second device before charging.
  • the second A device determines multiple commonly supported charging protocols based on at least two charging protocols supported by the second device and the charging protocol supported by the first device.
  • the above-mentioned target charging protocol is the second One of the charging protocols supported by both the device and the first device.
  • the first device performs a charging process with the second device based on the target charging protocol.
  • the power supply device supplies power to the charging device according to the target charging protocol.
  • the charging protocol can specify the authentication, communication sequence, message format, data packet format, charging exception handling, etc. between the power supply equipment and the charging equipment.
  • the power supply device can send the voltage/current information it can provide to the charging device in the response message format according to the target charging protocol, and the charging device according to its own needs, After selecting the voltage/current, send feedback information to the power supply device, and the power supply device will output the charging voltage/current according to the voltage/current to charge the charging device.
  • the target charging protocol is one of the charging protocols supported by both the second device and the first device, that is, any one of the charging protocols supported by the second device and the first device is determined Charge protocol for the target.
  • the charging protocol supported by both the second device and the first device may be a charging protocol with the same identification, or a charging protocol with the same charging power, or a charging protocol with the same charging current, etc. No limitation is imposed in the application examples.
  • the charging protocols supported by the second device include charging protocol A, charging protocol B, and charging protocol C
  • the charging protocols supported by the first device include charging protocol A and charging protocol C
  • the charging protocols supported by the second device A and charging protocols The charging protocol A supported by one device has the same protocol identifier
  • the charging protocol C supported by the second device and the charging protocol C supported by the first device have the same protocol identifier, then the first device determines the charging protocol A and charging protocol C as A charging protocol supported by both the second device and the first device.
  • the first device may determine a charging protocol as a target from the charging protocols supported by both the second device and the first device according to the priorities of the charging protocols supported by both the second device and the first device.
  • the charging protocol may also be determined as the target charging protocol from the charging protocols supported by both the second device and the first device according to the charging power of the charging protocols supported by both the second device and the first device. For example, if the priority of charging protocol A is greater than that of charging protocol C, the first device determines charging protocol A as the target charging protocol. Alternatively, if the charging power of the charging protocol A is greater than the charging power of the charging protocol C, the first device determines the charging protocol A as the target charging protocol.
  • the target charging protocol is one of the charging protocols supported by both the second device and the first device, and by determining one of the charging protocols supported by both the second device and the first device as the target charging protocol, Improved the reliability of determining the target charging protocol.
  • the first device can determine the target charging protocol based on the charging protocols supported by both the second device and the first device, including the priority of two or more charging protocols, or based on the charging protocols supported by both the second device and the first device.
  • the protocol includes the charging power of two or more charging protocols to determine the target charging protocol. The following will determine the target charging for the first device based on two or more charging protocols supported by both the second device and the first device. The protocol process is described in detail:
  • the charging protocol with the highest priority among the two or more charging protocols is determined as the target charging protocol.
  • the first device determines that there are two or more charging protocols supported by both the second device and the first device
  • the first device The target charging protocol is determined at the first level, that is, the first device determines the charging protocol with the highest priority among the two or more charging protocols supported by both the second device and the first device as the target charging protocol.
  • the charging protocols supported by the second device include charging protocol A, charging protocol B, and charging protocol C
  • the charging protocols supported by the first device include charging protocol A and charging protocol C
  • the second device and The charging protocols supported by the first device are charging protocol A and charging protocol C, and if the priority of the charging protocol is charging protocol A>charging protocol C, then the first device determines charging protocol A as the above-mentioned target charging protocol.
  • the first device determines the charging protocol with the highest priority among the two or more charging protocols supported by the second device and the first device as the target charging protocol.
  • a device selects a charging protocol time, and the selected target charging protocol is better.
  • the charging protocol with the highest charging power among the two or more charging protocols is determined as the target charging protocol:
  • the first device determines that there are two or more charging protocols supported by the second device and the first device
  • the first device The charging power determines the target charging protocol, that is, the first device determines the charging protocol with the highest charging power among the two or more charging protocols supported by both the second device and the first device as the target charging protocol.
  • the charging protocols supported by the second device include charging protocol A, charging protocol B, and charging protocol C
  • the charging protocols supported by the first device include charging protocol A and charging protocol C
  • the second device and The charging protocols supported by the first device are charging protocol A and charging protocol C. If the charging power of charging protocol C is greater than that of charging protocol A, the first device determines charging protocol C as the target charging protocol.
  • the charging protocol information sent by the second device in order to reduce the signaling of the charging protocol information sent by the second device to the first device, in the scenario of the charging protocol information sent by the second device to the first device, the charging protocol information sent by the second device
  • the charging power of each charging protocol supported by the second device may be included, and the level of charging power of each charging protocol supported by the second device may also be included.
  • the first device determines the charging protocol with the highest charging power as the target charging protocol among the two or more charging protocols supported by the second device and the first device. A time for the device to select a charging protocol.
  • the first device will use the two or more charging protocols supported by the second device and the first device.
  • the charging protocols supported by both the second device and the first device may include a first candidate protocol and a second candidate protocol, where the first candidate protocol and the second candidate protocol are For charging protocols owned by different manufacturers, in this scenario, in one embodiment, if the charging protocols supported by both the second device and the first device include the first candidate protocol and the second candidate protocol, and the charging protocol of the second candidate protocol If the power is greater than the sum of the charging power of the first candidate protocol and the preset power increment, the second candidate protocol is determined as the target charging protocol.
  • the first candidate protocol and the second candidate protocol are protocols owned by different manufacturers.
  • the first candidate protocol may be a protocol owned by the first manufacturer
  • the second candidate protocol may be a protocol owned by the second manufacturer.
  • the first device may sum the charging power of the first candidate protocol and a preset power increment, To obtain the corrected power of the first candidate protocol, for example, the preset power increment can be 20, then the first device can sum the charging power of the first candidate protocol and 20 to obtain the corrected power of the first candidate protocol, and the above The charging power of the second candidate protocol is compared with the correction power of the first candidate protocol.
  • the first device determines that the charging power of the second candidate protocol is greater than the correction power of the first candidate protocol, the first device will The protocol identified above is the target charging protocol. It can be understood that, in this embodiment, the charging power of the first candidate protocol is the corrected power. In this case, if the charging power of the second candidate protocol is still greater than the corrected power of the first candidate protocol, it means The charging power of the protocol is the maximum power, so the second candidate protocol is determined as the target charging protocol, ensuring the accuracy of the determined target charging protocol.
  • the first device determines the second candidate protocol as the target charging protocol, so that the scenario adaptability of the protocol selection method is more flexible.
  • Scenario 3 If both the second device and the first device support two or more charging protocols, the first device can use the following two methods to determine the target charging protocol, and the following two determine the target charging protocol respectively The method is explained:
  • Method A If the charging protocols supported by both the second device and the first device include two or more, determine the third candidate charging protocol with the highest priority among the two or more charging protocols as the target charging protocol;
  • the third candidate charging protocol is a preset number of charging protocols determined from two or more charging protocols in descending order of charging power.
  • the first device determines that both the second device and the first device support two or more charging protocols, after receiving the charging protocol information sent by the second device, the first device In the information, the charging power of the charging protocol supported by the second device is determined from the charging power of the second device and the first device, including two or more charging protocols, according to the order of charging power from large to small.
  • Charging protocol for example, two or more charging protocols supported by both the second device and the first device are charging protocol A, charging protocol C and charging protocol D, and the first device receives the charging protocol sent by the second device
  • the power of charging protocol A is 50W
  • the power of charging protocol C is 20W
  • the power of charging protocol D is 10W
  • the first device determines charging protocol A and charging protocol C as the third candidate charging protocol, and then sets the priority The highest third candidate charging protocol is determined as the target charging protocol.
  • the determined third candidate charging protocol is charging protocol C and charging protocol D, and the priority of charging protocol C is higher than that of charging protocol D
  • the first device determines charging protocol C as the target charging protocol
  • the determined third candidate charging protocol is charging protocol A, charging protocol C, and charging protocol D
  • the priority of charging protocol A is higher than that of charging protocol C
  • the priority of charging protocol C is higher than that of charging protocol D level
  • the first device may determine charging protocol A as the target charging protocol.
  • the first device can quickly sort the charging protocols supported by both the second device and the first device according to the charging power according to the charging power of the charging protocols supported by the second device and the first device, and quickly A preset number of third candidate charging protocols are determined therefrom, so that the first device can quickly determine the third candidate charging protocol with the highest priority as the target charging protocol, because the determined target charging protocol is the third candidate charging protocol with the highest priority In this way, the two factors of the priority and power of the charging protocol are taken into account, making the determined target charging protocol more reliable and more adaptable to the scene.
  • Method B If the charging protocols supported by both the second device and the first device include two or more, determine the fourth candidate charging protocol with the highest charging power among the two or more charging protocols as the target charging protocol;
  • the fourth candidate charging protocol is a preset number of charging protocols determined from two or more charging protocols in descending order of priority.
  • the first device determines that both the second device and the first device support two or more charging protocols, after receiving the charging protocol information sent by the second device, the first device The priority of the charging protocol supported by the second device in the information, from the two or more charging protocols supported by both the second device and the first device, a preset number of charging protocols are determined in order of priority from high to low.
  • Charging protocol for example, two or more charging protocols supported by both the second device and the first device are charging protocol A, charging protocol C and charging protocol D, and the first device receives the charging protocol information sent by the second device
  • the priority of charging protocol A is higher than that of charging protocol C
  • the priority of charging protocol C is higher than that of charging protocol D
  • the first device determines charging protocol A and charging protocol C as the fourth candidate charging protocol , and then determine the fourth candidate charging protocol with the highest charging power as the target charging protocol.
  • the determined fourth candidate charging protocol is charging protocol C and charging protocol D, and the charging power of charging protocol C is greater than the charging power of charging protocol D, then the first device determines charging protocol C as the target charging protocol, and for another example, The determined fourth candidate charging protocol is charging protocol A, charging protocol C and charging protocol D, and the charging power of charging protocol A is greater than the charging power of charging protocol C, and the charging power of charging protocol C is greater than the charging power of charging protocol D, then The first device may determine charging protocol A as the target charging protocol.
  • the first device can quickly sort the charging protocols supported by both the second device and the first device according to the priority according to the priorities of the charging protocols supported by both the second device and the first device, and quickly select Determine a preset number of fourth candidate charging protocols, so that the first device can quickly determine the fourth candidate charging protocol with the largest charging power as the target charging protocol, because the determined target charging protocol is the fourth candidate charging protocol with the largest charging power , which takes into account the priority and power of the charging protocol, making the determined target charging protocol more reliable and more adaptable to the scene.
  • the above method further includes: A communication protocol, establishing a communication connection with the second device.
  • the preset standard communication protocol may be a communication protocol supported by both the first device and the second device, or may be a charging protocol supported by both the first device and the second device.
  • the first device may send a handshake request to the second device, and after receiving the handshake request from the first device, the second device sends a response message to the first device to establish a communication connection with the second device. It may also be that the second device sends a handshake request to the first device, and after receiving the handshake request sent by the second device, the first device sends a response message to the second device to establish a communication connection with the first device.
  • the above-mentioned target charging protocol may be the preset standard communication protocol. It can be understood that the first device and the second device can communicate based on a preset standard communication protocol. If the standard communication protocol supports the communication between the first device and the charging device of the second device, the above preset The standard communication protocol is directly used as the target charging protocol.
  • the process of establishing a communication connection between the first device and the second device based on a preset standard communication protocol is very simple, and the communication connection between the first device and the second device can be quickly established for subsequent A charging protocol negotiation is performed between the first device and the second device.
  • the charging protocol information includes identifications of at least two charging protocols supported by the second device.
  • step S3 if the charging protocols supported by both the second device and the first device include two or more than two, execute step S4 or step S5 or step S6 or step S7 or step S8;
  • the charging protocols supported by both the second device and the first device include two or more, determine the charging protocol with the highest charging power among the two or more charging protocols as the target charging protocol.
  • the charging protocols supported by both the second device and the first device include the first candidate protocol and the second candidate protocol, and the charging power of the second candidate protocol is greater than the difference between the charging power of the first candidate protocol and the preset power increment and, the second candidate protocol is determined as the target charging protocol.
  • the charging protocols supported by both the second device and the first device include two or more, determine the third candidate charging protocol with the highest priority among the two or more charging protocols as the target charging protocol;
  • the three candidate charging protocols are a preset number of charging protocols determined from two or more charging protocols in descending order of charging power.
  • the charging protocols supported by both the second device and the first device include two or more, determine the fourth candidate charging protocol with the highest charging power among the two or more charging protocols as the target charging protocol;
  • the four candidate charging protocols are a preset number of charging protocols determined from two or more charging protocols in descending order of priority.
  • the first device is a charging device
  • the second device is a power supply device
  • the first device is a power supply device
  • the second device is a charging device
  • Fig. 3 is a flowchart of a method for determining a charging protocol in an embodiment.
  • the method for determining the charging protocol in this embodiment is described by taking the first device running in FIG. 1 as an example. As shown in Figure 3, the method for determining the charging protocol includes:
  • the charging protocol information includes identifiers of at least two charging protocols supported by the first device.
  • the identification of the at least two charging protocols supported by the first device may be the name of the charging protocol supported by the first device, or the code of the charging protocol supported by the first device, or may be the charging protocol supported by the first device.
  • the manufacturer's name and the like of the manufacturer to whom the protocol belongs are not limited in this embodiment of the application.
  • the first device may send charging protocol information including identifications of at least two charging protocols it supports to the second device.
  • the charging protocol supported by the first device includes three protocols: charging protocol A, charging protocol B and charging protocol C, then the first device carries the identification of charging protocol A, charging protocol B and charging protocol C in the charging The protocol information is sent to the second device.
  • the at least two charging protocols supported by the first device may be charging protocols belonging to different manufacturers, or may be charging protocols corresponding to different charging powers.
  • the first device may be a charging device
  • the second device may be a power supply device
  • the first device may be a power supply device
  • the second device may be a charging device.
  • S302. Receive an identifier of a target charging protocol sent by the second device; the target charging protocol is determined by the second device based on at least two charging protocols supported by the first device and the charging protocols supported by the second device.
  • the second device after the second device determines the target charging protocol, it sends the identification of the target charging protocol to the first device, and the first device receives the identification of the target charging protocol sent by the second device, wherein the identification of the target charging protocol determined by the second device based on at least two charging protocols supported by the first device and the charging protocols supported by the second device.
  • the charging protocol supported by the first device includes protocol A, protocol B, and protocol C
  • the charging protocol supported by the second device includes protocol A and protocol C.
  • the second device sends the protocol A identifier to the first device, and the first device receives the protocol A identifier sent by the second device; if the target charging protocol determined by the second device is protocol C, then the second device The device sends the protocol-C identifier to the first device, and the first device receives the protocol-C identifier sent by the second device.
  • the second device may determine one of the charging protocols supported by both the first device and the second device as the target charging protocol, that is, the second device may start from One charging protocol among the at least two charging protocols supported by the first device and the same plurality of charging protocols supported by the second device is determined as the target charging protocol.
  • the second device may determine multiple charging protocols supported by both the first device and the second device, and then select one of the charging protocols as the target charging protocol according to some selection mechanisms.
  • the second device may The priority sequence of the charging protocol determines the target charging protocol, or the second device may determine the target charging protocol according to the rated power of the commonly supported charging protocols, and so on.
  • the second device includes the two or more charging protocols
  • the charging protocol with the highest priority is determined as the target charging protocol.
  • the second device determines the charging protocol with the highest charging power among the two or more charging protocols as the target charging protocol. protocol; further, if the charging protocol supported by both the second device and the first device includes the first candidate protocol and the second candidate protocol, and the charging power of the second candidate protocol is greater than the charging power of the first candidate protocol and the preset power
  • the second device may determine the second candidate protocol as the target charging protocol.
  • the second device may determine the third candidate charging protocol with the highest priority among the two or more charging protocols is the target charging protocol; wherein, the third candidate charging protocol is a preset number of charging protocols determined from the above two or more than two charging protocols in descending order of charging power.
  • the second device may determine the fourth candidate charging protocol with the highest charging power among the above two or more charging protocols as The target charging protocol; wherein, the fourth candidate charging protocol is a preset number of charging protocols determined from the above two or more charging protocols in descending order of priority.
  • the first device After the first device receives the identification of the target charging protocol, the first device performs a charging process with the second device based on the target charging protocol. For example, if the first device is a power supply device and the second device is a charging device, the first device charges the second device according to the target charging protocol; if the first device is a charging device and the second device is a power supply device, the second device The first device is charged according to the target charging protocol.
  • the first device when both the first device and the second device support multiple charging protocols, the first device sends charging protocol information to the second device, since the charging protocol information includes at least two charging protocols supported by the first device.
  • the identification of a charging protocol is equivalent to the first device sending multiple charging protocols to the second device at one time, and the second device can directly determine the target charging protocol based on the multiple charging protocols supported by the first device and the charging protocols supported by itself , avoiding the process of selecting the charging protocol multiple times, thereby shortening the time for the second charging device to select the charging protocol, and reducing the interaction time between the first device and the second device before charging.
  • the above method further includes: A communication protocol, establishing a communication connection with the second device.
  • the preset standard communication protocol may be a communication protocol supported by both the first device and the second device, or may be a charging protocol supported by both the first device and the second device.
  • the first device may send a handshake request to the second device, and after receiving the handshake request from the first device, the second device sends a response message to the first device to establish a communication connection with the second device. It may also be that the second device sends a handshake request to the first device, and after receiving the handshake request sent by the second device, the first device sends a response message to the second device to establish a communication connection with the first device.
  • the above-mentioned target charging protocol may be the preset standard communication protocol. It can be understood that the first device and the second device can communicate based on a preset standard communication protocol. If the standard communication protocol supports the communication between the first device and the charging device of the second device, the above target charging protocol can be Directly as the preset standard communication protocol.
  • the process of establishing a communication connection between the first device and the second device based on a preset standard communication protocol is very simple, and the communication connection between the first device and the second device can be quickly established for subsequent A charging protocol negotiation is performed between the first device and the second device.
  • the charging protocol information includes identifiers of at least two charging protocols supported by the first device.
  • the target charging protocol is determined by the second device based on at least two charging protocols supported by the first device and the charging protocol supported by the second device; the target charging protocol is determined by the second device One of the charging protocols supported by both the first device.
  • the target charging protocol is a preset standard communication protocol.
  • the first device is a charging device
  • the second device is a power supply device
  • the first device is a power supply device
  • the second device is a charging device
  • steps in the flow charts of FIG. 2 to FIG. 3 are shown sequentially as indicated by the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in FIGS. 2 to 3 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. These sub-steps or The execution order of the stages is not necessarily performed sequentially, but may be executed alternately or alternately with at least a part of other steps or substeps of other steps or stages.
  • Fig. 4 is a structural block diagram of an apparatus for determining a charging protocol according to an embodiment.
  • the device for determining the charging protocol is applied to the first device, and the device for determining the charging protocol includes: a receiving module, a determining module, and a sending module, wherein:
  • a receiving module configured to receive charging protocol information sent by the second device; the charging protocol information includes identifications of at least two charging protocols supported by the second device;
  • a determining module configured to determine a target charging protocol based on at least two charging protocols supported by the second device and a charging protocol supported by the first device;
  • a sending module configured to send the identification of the target charging protocol to the second device.
  • the first device is a charging device
  • the second device is a power supply device
  • the first device is a power supply device
  • the second device is a charging device
  • the device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
  • the target charging protocol is one of the charging protocols supported by both the second device and the first device.
  • the device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
  • the charging protocols supported by both the second device and the first device include two or more than two charging protocols, among the two or more charging protocols, the one with the highest priority
  • the charging protocol is determined as the target charging protocol.
  • the device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
  • both the second device and the first device support two or more charging protocols, the one with the highest charging power among the two or more charging protocols
  • the charging protocol is determined as the target charging protocol.
  • the device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
  • the charging protocols supported by both the second device and the first device include the first candidate protocol and the second candidate protocol, and the charging power of the second candidate protocol is greater than that of the first candidate protocol
  • the sum of the charging power and the preset power increment determines the second candidate protocol as the target charging protocol.
  • the device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
  • the third charging protocol with the highest priority among the two or more charging protocols is determined as the target charging protocol; the third candidate charging protocol is a preset number of charging protocols determined from two or more charging protocols in descending order of charging power.
  • the device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
  • the fourth charging protocol with the highest charging power among the two or more charging protocols is determined as the target charging protocol; the fourth candidate charging protocol is a preset number of charging protocols determined from two or more charging protocols in descending order of priority.
  • the device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
  • the foregoing apparatus further includes: an execution module, wherein:
  • An executing module configured to execute a charging process with the second device based on the target charging protocol.
  • the device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
  • the foregoing apparatus further includes: an establishment module, wherein:
  • the establishment module is used to establish a communication connection with the second device based on a preset standard communication protocol.
  • the target charging protocol is a preset standard communication protocol.
  • the device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
  • each module in the device for determining the charging protocol is only for illustration. In other embodiments, the device for determining the charging protocol can be divided into different modules according to needs, so as to complete all or part of the device for determining the charging protocol. Function.
  • Each module in the above-mentioned device for determining the charging protocol may be implemented in whole or in part by software, hardware or a combination thereof.
  • the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules.
  • each module in the device for determining the charging protocol provided in the embodiment of the present application may be in the form of a computer program.
  • the computer program can run on a terminal or a server.
  • the program modules constituted by the computer program can be stored in the memory of the electronic device.
  • the steps of the methods described in the embodiments of the present application are realized.
  • Fig. 5 is a structural block diagram of an apparatus for determining a charging protocol according to an embodiment. As shown in FIG. 5, the device for determining the charging protocol is applied to the first device, and the device for determining the charging protocol includes: a sending module and a receiving module, wherein:
  • a sending module configured to send charging protocol information to the second device;
  • the charging protocol information includes identifications of at least two charging protocols supported by the first device;
  • the receiving module is configured to receive the identification of the target charging protocol sent by the second device; the target charging protocol is determined by the second device based on at least two charging protocols supported by the first device and the charging protocols supported by the second device.
  • the first device is a charging device
  • the second device is a power supply device
  • the first device is a power supply device
  • the second device is a charging device
  • the device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
  • the foregoing target charging protocol is one of the charging protocols supported by both the second device and the first device.
  • the device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
  • the foregoing apparatus further includes: an execution module, wherein:
  • An execution module configured to execute a charging process with the second device based on the target charging protocol.
  • the device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
  • the foregoing apparatus further includes: an establishment module, wherein:
  • the establishment module is used to establish a communication connection with the second device based on a preset standard communication protocol.
  • the target charging protocol is a preset standard communication protocol.
  • the device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
  • each module in the device for determining the charging protocol is only for illustration. In other embodiments, the device for determining the charging protocol can be divided into different modules according to needs, so as to complete all or part of the device for determining the charging protocol. Function.
  • Each module in the above-mentioned device for determining the charging protocol may be implemented in whole or in part by software, hardware or a combination thereof.
  • the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules.
  • each module in the device for determining the charging protocol provided in the embodiment of the present application may be in the form of a computer program.
  • the computer program can run on a terminal or a server.
  • the program modules constituted by the computer program can be stored in the memory of the electronic device.
  • the steps of the methods described in the embodiments of the present application are realized.
  • Fig. 6 is a schematic diagram of the internal structure of an electronic device in one embodiment.
  • the electronic device can be any terminal device such as mobile phone, tablet computer, notebook computer, desktop computer, PDA (Personal Digital Assistant, personal digital assistant), POS (Point of Sales, sales terminal), vehicle-mounted computer, wearable device, etc.
  • the electronic device includes a processor and memory connected by a system bus.
  • the processor may include one or more processing units.
  • the processor can be a CPU (Central Processing Unit, central processing unit) or a DSP (Digital Signal Processing, digital signal processor), etc.
  • the memory may include non-volatile storage media and internal memory. Nonvolatile storage media store operating systems and computer programs.
  • the computer program can be executed by a processor, so as to implement a method for determining a charging protocol provided in the following embodiments.
  • the internal memory provides a high-speed running environment for the operating system computer program in the non-volatile storage medium.
  • the embodiment of the present application also provides a computer-readable storage medium.
  • One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the steps of the method for determining the charging protocol.
  • the embodiment of the present application also provides a computer program product containing instructions, which, when run on a computer, causes the computer to execute the method for determining the charging protocol.
  • Non-volatile memory can include ROM (Read-Only Memory, read-only memory), PROM (Programmable Read-only Memory, programmable read-only memory), EPROM (Erasable Programmable Read-Only Memory, erasable programmable read-only memory) Memory), EEPROM (Electrically Erasable Programmable Read-only Memory, Electrically Erasable Programmable Read-only Memory) or flash memory.
  • Volatile memory can include RAM (Random Access Memory, random access memory), which is used as an external cache memory.
  • RAM is available in various forms, such as SRAM (Static Random Access Memory, static random access memory), DRAM (Dynamic Random Access Memory, dynamic random access memory), SDRAM (Synchronous Dynamic Random Access Memory, synchronous dynamic Random access memory), double data rate DDR SDRAM (Double DataRate Synchronous Dynamic Random Access memory, double data rate synchronous dynamic random access memory), ESDRAM (Enhanced Synchronous Dynamic Random Access memory, enhanced synchronous dynamic random access memory), SLDRAM ( Sync LinkDynamic Random Access Memory, synchronous link dynamic random access memory), RDRAM (Rambus Dynamic Random Access Memory, bus dynamic random access memory), DRDRAM (Direct Rambus Dynamic Random Access Memory, interface dynamic random access memory).
  • SRAM Static Random Access Memory, static random access memory
  • DRAM Dynanamic Random Access Memory, dynamic random access memory
  • SDRAM Synchronous Dynamic Random Access Memory, synchronous dynamic Random access memory
  • double data rate DDR SDRAM Double DataRate Synchronous Dynamic Random Access memory, double

Abstract

Embodiments of the present disclosure relate to a charging protocol determination method and apparatus, an electronic device, and a readable storage medium. The method is applied to a first device. The method comprises: receiving charging protocol information sent by a second device, the charging protocol information comprising identifiers of at least two charging protocols supported by the second device; determining a target charging protocol on the basis of the at least two charging protocols supported by the second device and a charging protocol supported by the first device; and sending an identifier of the target charging protocol to the second device. According to the present method, multiple selections of the target charging protocol are avoided, such that the selection time for a first charging device to select a charging protocol is shortened, and the interaction time between the first device and the second device before charging is reduced.

Description

充电协议的确定方法、装置、电子设备和可读存储介质Method, device, electronic device and readable storage medium for determining charging protocol
相关申请related application
本申请要求2021年08月25日申请的,申请号为2021109844693,名称为“充电协议的确定方法、装置、电子设备和可读存储介质”的中国专利申请的优先权,在此将其全文引入作为参考。This application claims the priority of the Chinese patent application filed on August 25, 2021 with the application number 2021109844693 titled "Method, Device, Electronic Equipment and Readable Storage Medium for Determining Charging Protocol", which is hereby incorporated in its entirety Reference.
技术领域technical field
本申请涉及充电技术领域,更具体的说,涉及一种充电协议的确定方法、装置、电子设备和可读存储介质。The present application relates to the technical field of charging, and more specifically, relates to a method, device, electronic device and readable storage medium for determining a charging protocol.
背景技术Background technique
随着快充技术的发展,现有充电设备、供电设备均能够支持多种快充协议,当充电设备检测到供电设备的信号时,可以将其中一个快充协议尝试与供电设备握手,如果握手成功,则进行快速充电;如握手失败,则从选择另一个快充协议,依据该快充协议尝试与供电设备握手;以此类推,直至基于某一快充协议实现握手或者所有支持的协议都握手失败。With the development of fast charging technology, the existing charging equipment and power supply equipment can support multiple fast charging protocols. When the charging equipment detects the signal of the power supply equipment, it can try to shake hands with one of the fast charging protocols with the power supply equipment. If the handshake If it succeeds, perform fast charging; if the handshake fails, select another fast charging protocol, and try to shake hands with the power supply device according to the fast charging protocol; and so on, until the handshake is realized based on a certain fast charging protocol or all supported protocols are Handshake failed.
然而,传统的快充协议选择方法容易导致多次快充协议握手失败,从而延长充电前的交互时间。However, the traditional fast charging protocol selection method is easy to cause multiple fast charging protocol handshake failures, thereby prolonging the interaction time before charging.
发明内容Contents of the invention
有鉴于此,本申请公开一种充电协议的确定方法、装置、电子设备、计算机可读存储介质,可以减少充电前的交互时间。In view of this, the present application discloses a method, device, electronic device, and computer-readable storage medium for determining a charging protocol, which can reduce the interaction time before charging.
第一方面,提供了一种充电协议的确定方法,应用于第一设备,包括:In the first aspect, a method for determining a charging protocol is provided, which is applied to a first device, including:
接收第二设备发送的充电协议信息;所述充电协议信息包括所述第二设备支持的至少两种充电协议的标识;Receive charging protocol information sent by the second device; the charging protocol information includes identifications of at least two charging protocols supported by the second device;
基于所述第二设备支持的至少两种充电协议和所述第一设备支持的充电协议,确定目标充电协议;determining a target charging protocol based on at least two charging protocols supported by the second device and a charging protocol supported by the first device;
将所述目标充电协议的标识发送给所述第二设备。Send the identifier of the target charging protocol to the second device.
第二方面,提供了一种充电协议的确定方法,应用于第一设备,包括:In a second aspect, a method for determining a charging protocol is provided, which is applied to a first device, including:
向第二设备发送充电协议信息;所述充电协议信息包括第一设备支持的至少两种充电协议的标识;Sending charging protocol information to the second device; the charging protocol information includes identifications of at least two charging protocols supported by the first device;
接收所述第二设备发送的目标充电协议的标识;所述目标充电协议为所述第二设备基于所述第一设备支持的至少两种充电协议和所述第二设备支持的充电协议确定的。Receive the identification of the target charging protocol sent by the second device; the target charging protocol is determined by the second device based on at least two charging protocols supported by the first device and the charging protocol supported by the second device .
第三方面,提供了一种充电协议的确定装置,应用于第一设备,包括:In a third aspect, an apparatus for determining a charging protocol is provided, which is applied to a first device, including:
接收模块,用于接收第二设备发送的充电协议信息;所述充电协议信息包括所述第二设备支持的至少两种充电协议的标识;A receiving module, configured to receive charging protocol information sent by the second device; the charging protocol information includes identifications of at least two charging protocols supported by the second device;
确定模块,用于基于所述第二设备支持的至少两种充电协议和所述第一设备支持的充电协议,确定目标充电协议;A determining module, configured to determine a target charging protocol based on at least two charging protocols supported by the second device and a charging protocol supported by the first device;
发送模块,用于将所述目标充电协议的标识发送给所述第二设备。A sending module, configured to send the identifier of the target charging protocol to the second device.
第四方面,提供了一种充电协议的确定装置,应用于第一设备,包括:In a fourth aspect, an apparatus for determining a charging protocol is provided, which is applied to the first device, including:
发送模块,用于向第二设备发送充电协议信息;所述充电协议信息包括第一设备支持的至少两种充电协议的标识;A sending module, configured to send charging protocol information to the second device; the charging protocol information includes identifications of at least two charging protocols supported by the first device;
接收模块,用于接收所述第二设备发送的目标充电协议的标识;所述目标充电协议为所述第二设备基于所述第一设备支持的至少两种充电协议和所述第二设备支持的充电协议确定的。The receiving module is configured to receive the identification of the target charging protocol sent by the second device; the target charging protocol is based on at least two charging protocols supported by the first device and the second device supported by the second device. determined by the charging protocol.
第五方面,提供了一种电子设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如第一方面和第二方面所述的充电协议的确定方法的步骤。According to a fifth aspect, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor is made to perform the functions described in the first aspect and the second aspect. The steps of the method for determining the charging protocol described in the second aspect.
第六方面,提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面和第二方面所述的方法的步骤。In a sixth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the methods described in the first aspect and the second aspect are implemented.
上述充电协议的确定方法、装置、电子设备和可读存储介质,在第一设备和第二设备均支持多种充电协议的情况下,第一设备接收第二设备发送的充电协议信息,由于该充电协议信息中包括了第二设备支持的至少两种充电协议的标识,相当于第二设备一次向第一设备发送了多种充电协议,第一设备能够基于第二设备支持的多个充电协议和自身支持的充电协议,直接确定出目标充电协议,避免了多次进行充电协议的选择的过程,从而缩短了第一设备选择充电协议的时间,减少了第一设备和第二设备充电前的交互时间。In the method, device, electronic device, and readable storage medium for determining the charging protocol described above, when both the first device and the second device support multiple charging protocols, the first device receives the charging protocol information sent by the second device. The charging protocol information includes the identifiers of at least two charging protocols supported by the second device, which means that the second device sends multiple charging protocols to the first device at one time, and the first device can be based on multiple charging protocols supported by the second device. With the charging protocol supported by itself, directly determine the target charging protocol, avoiding the process of selecting the charging protocol multiple times, thereby shortening the time for the first device to select the charging protocol, and reducing the time before charging the first device and the second device. interactive time.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请 的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据公开的附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only It is an embodiment of the present application, and those of ordinary skill in the art can also obtain other drawings according to the disclosed drawings on the premise of not paying creative efforts.
图1为一个实施例中充电协议的确定方法的应用环境图;FIG. 1 is an application environment diagram of a method for determining a charging protocol in an embodiment;
图2为一个实施例中充电协议的确定方法的流程图;Fig. 2 is a flowchart of a method for determining a charging protocol in an embodiment;
图3为另一个实施例中充电协议的确定方法的流程图;Fig. 3 is a flowchart of a method for determining a charging protocol in another embodiment;
图4为一个实施例中充电协议的确定装置的结构框图;Fig. 4 is a structural block diagram of a device for determining a charging protocol in an embodiment;
图5为一个实施例中充电协议的确定装置的结构框图;Fig. 5 is a structural block diagram of a device for determining a charging protocol in an embodiment;
图6为一个实施例中电子设备的内部结构图。Fig. 6 is an internal structure diagram of an electronic device in one embodiment.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一客户端称为第二客户端,且类似地,可将第二客户端称为第一客户端。第一客户端和第二客户端两者都是客户端,但其不是同一客户端。It can be understood that the terms "first", "second" and the like used in this application may be used to describe various elements herein, but these elements are not limited by these terms. These terms are only used to distinguish one element from another element. For example, a first client could be termed a second client, and, similarly, a second client could be termed a first client, without departing from the scope of the present application. Both the first client and the second client are clients, but they are not the same client.
图1为一个实施例中充电协议的确定方法的应用环境示意图。如图1所示,该应用环境包括第一设备102和第二设备104,其中,第一设备102可以为充电设备,第二设备104可以为供电设备,或者,第一设备102为供电设备,第二设备104为充电设备。第一设备102和第二设备104均支持多种充电协议,第一设备102和第二设备104可以从自身均支持的多种充电协议中选择两者都支持的充电协议进行充电。可选的,供电设备可以为充电器、充电头、充电宝、适配器等,充电设备可以为手机、平板电脑、手表等各种终端。Fig. 1 is a schematic diagram of an application environment of a method for determining a charging protocol in an embodiment. As shown in FIG. 1, the application environment includes a first device 102 and a second device 104, wherein the first device 102 may be a charging device, the second device 104 may be a power supply device, or the first device 102 may be a power supply device, The second device 104 is a charging device. Both the first device 102 and the second device 104 support multiple charging protocols, and the first device 102 and the second device 104 can select a charging protocol supported by both of the multiple charging protocols supported by themselves for charging. Optionally, the power supply device can be a charger, a charging head, a power bank, an adapter, etc., and the charging device can be various terminals such as a mobile phone, a tablet computer, and a watch.
图2为一个实施例中充电协议的确定方法的流程图。本实施例中的充电协议的确定方法,以运行于图1中的第一设备为例进行描述。如图2所示,该充电协议的确定方法包括:Fig. 2 is a flowchart of a method for determining a charging protocol in an embodiment. The method for determining the charging protocol in this embodiment is described by taking the first device running in FIG. 1 as an example. As shown in Figure 2, the method for determining the charging protocol includes:
S201,接收第二设备发送的充电协议信息;充电协议信息包括第二设备支持的至少两种充电协议的标识。S201. Receive charging protocol information sent by the second device; the charging protocol information includes identifications of at least two charging protocols supported by the second device.
其中,第二设备支持的至少两种充电协议的标识可以是第二设备支持的充电协议的名称,也可以是第二设备支持的充电协议的编码,或者,也可以是第二设备支持的充电协议所属厂商的厂商名等,本申请实施例中不加以限制。在本实施例中,在第一设备和第二设 备建立了通信连接后,第二设备可以将包括自身支持的至少两种充电协议的标识的充电协议信息发送给第一设备。例如,第二设备支持的充电协议包括充电协议A、充电协议B和充电协议C三种协议,则第二设备将充电协议A的标识、充电协议B的标识和充电协议C的标识携带在充电协议信息中发送给第一设备。需要说明的是,第二设备支持的至少两种充电协议可能为不同厂商所属的充电协议,也可能为不同充电功率对应的充电协议。可选的,第一设备可以为充电设备,第二设备为供电设备,或者,第一设备为供电设备,第二设备为充电设备。Wherein, the identification of at least two charging protocols supported by the second device may be the name of the charging protocol supported by the second device, or the code of the charging protocol supported by the second device, or may be the charging protocol supported by the second device. The manufacturer's name and the like of the manufacturer to whom the protocol belongs are not limited in this embodiment of the application. In this embodiment, after the first device and the second device establish a communication connection, the second device may send charging protocol information including identifications of at least two charging protocols it supports to the first device. For example, if the charging protocols supported by the second device include charging protocol A, charging protocol B, and charging protocol C, the second device carries the identification of charging protocol A, charging protocol B, and charging protocol C in the charging The protocol information is sent to the first device. It should be noted that the at least two charging protocols supported by the second device may be charging protocols belonging to different manufacturers, or may be charging protocols corresponding to different charging powers. Optionally, the first device may be a charging device, and the second device may be a power supply device, or, the first device may be a power supply device, and the second device may be a charging device.
S202,基于第二设备支持的至少两种充电协议和第一设备支持的充电协议,确定目标充电协议。S202. Determine a target charging protocol based on the at least two charging protocols supported by the second device and the charging protocol supported by the first device.
在本实施例中,第一设备接收到第二设备发送的充电协议信息后,可以将第一设备和第二设备共同支持的其中一种充电协议确定为目标充电协议,也即,从第二设备支持的至少两种充电协议和第一设备支持的充电协议中相同的多种充电协议中确定一种充电协议作为目标充电协议。或者,也可以是确定第一设备和第二设备共同支持的多种充电协议,然后根据一些选择机制选择其中的一种充电协议作为目标充电协议,例如,按照共同支持的充电协议的优先级顺序确定目标充电协议,或者,按照共同支持的充电协议的额定功率确定目标充电协议,等等。In this embodiment, after receiving the charging protocol information sent by the second device, the first device may determine one of the charging protocols supported by both the first device and the second device as the target charging protocol, that is, from the second One charging protocol among the at least two charging protocols supported by the device and the charging protocols supported by the first device is determined as the target charging protocol. Alternatively, it is also possible to determine multiple charging protocols supported by the first device and the second device, and then select one of the charging protocols as the target charging protocol according to some selection mechanism, for example, according to the priority order of the commonly supported charging protocols Determine the target charging protocol, or determine the target charging protocol according to the rated power of commonly supported charging protocols, and so on.
示例性地,继续以第二设备支持的充电协议包括充电协议A、充电协议B和充电协议C三种协议、第一设备支持的充电协议包括充电协议A和充电协议C为例进行说明,第一设备接收到第二设备发送的充电协议信息后,确定出充电协议A与充电协议C是两者共同支持的充电协议,再从协议A和协议C中确定出目标充电协议,可选的,第一设备确定的目标充电协议可以为协议A,也可以为协议C。可以理解的是,第一设备确定出的目标充电协议可以为第一设备和第二设备支持的充电协议中优先级最高的充电协议,或者,也可以为第一设备和第二设备支持的充电协议中充电功率最大的充电协议,本申请实施例不加以限制。Exemplarily, the charging protocol supported by the second device includes charging protocol A, charging protocol B, and charging protocol C, and the charging protocol supported by the first device includes charging protocol A and charging protocol C as an example. After receiving the charging protocol information sent by the second device, a device determines that charging protocol A and charging protocol C are charging protocols supported by both, and then determines the target charging protocol from protocol A and protocol C. Optionally, The target charging protocol determined by the first device may be protocol A or protocol C. It can be understood that the target charging protocol determined by the first device may be the charging protocol with the highest priority among the charging protocols supported by the first device and the second device, or may be the charging protocol supported by the first device and the second device. The charging protocol with the highest charging power among the protocols is not limited in this embodiment of the present application.
S203,将目标充电协议的标识发送给第二设备。S203. Send the identifier of the target charging protocol to the second device.
在本实施例中,第一设备确定出目标充电协议后,将目标充电协议的标识发送给第二设备,继续以第二设备支持的充电协议包括协议A、协议B和协议C三种协议、第二设备支持的充电协议包括协议A和协议C为例进行说明,若第一设备确定出的目标充电协议为协议A,则第一设备将协议A的标识发送给第二设备;若第一设备确定出的目标充电协议为协议C,则第一设备将协议C的标识发送给第二设备。In this embodiment, after the first device determines the target charging protocol, it sends the identification of the target charging protocol to the second device, and continues to use the charging protocols supported by the second device including three protocols: protocol A, protocol B, and protocol C. The charging protocol supported by the second device includes protocol A and protocol C as an example. If the target charging protocol determined by the first device is protocol A, the first device sends the identifier of protocol A to the second device; if the first The target charging protocol determined by the device is protocol C, and the first device sends the identifier of protocol C to the second device.
第二设备接收到该目标充电协议的标识之后,第一设备基于目标充电协议执行与第二 设备的充电过程。例如,若第一设备为供电设备,第二设备为充电设备,则第一设备根据目标充电协议为第二设备充电,若第一设备为充电设备,第二设备为供电设备,则第二设备根据目标充电协议为第一设备充电。After the second device receives the identification of the target charging protocol, the first device performs a charging process with the second device based on the target charging protocol. For example, if the first device is a power supply device and the second device is a charging device, the first device charges the second device according to the target charging protocol; if the first device is a charging device and the second device is a power supply device, the second device The first device is charged according to the target charging protocol.
本实施例中,在第一设备和第二设备均支持多种充电协议的情况下,第一设备接收第二设备发送的充电协议信息,由于该充电协议信息中包括了第二设备支持的至少两种充电协议的标识,相当于第二设备一次向第一设备发送了多种充电协议,第一设备能够基于第二设备支持的多个充电协议和自身支持的充电协议,直接确定出目标充电协议,避免了多次进行充电协议选择的过程,从而缩短了第一充电设备选择充电协议的时间,减少了第一设备和第二设备充电前的交互时间。In this embodiment, when both the first device and the second device support multiple charging protocols, the first device receives the charging protocol information sent by the second device, since the charging protocol information includes at least one of the charging protocols supported by the second device. The identification of the two charging protocols is equivalent to the second device sending multiple charging protocols to the first device at one time, and the first device can directly determine the target charging protocol based on the multiple charging protocols supported by the second device and the charging protocols supported by itself. The protocol avoids the process of selecting the charging protocol multiple times, thereby shortening the time for the first charging device to select the charging protocol, and reducing the interaction time between the first device and the second device before charging.
在上述基于第二设备支持的至少两种充电协议和第一设备支持的充电协议,确定目标充电协议的场景中,当第一设备和第二设备都支持多种充电协议时,可能会出现第一设备基于第二设备支持的至少两种充电协议和第一设备支持的充电协议确定出多种共同支持的充电协议的情况,针对该场景,本申请实施例中,上述目标充电协议为第二设备与第一设备均支持的充电协议中的一者。In the above scenario of determining the target charging protocol based on at least two charging protocols supported by the second device and the charging protocol supported by the first device, when both the first device and the second device support multiple charging protocols, the second A device determines multiple commonly supported charging protocols based on at least two charging protocols supported by the second device and the charging protocol supported by the first device. For this scenario, in this embodiment of the application, the above-mentioned target charging protocol is the second One of the charging protocols supported by both the device and the first device.
在本实施例中,在确定了目标充电协议之后,第一设备基于目标充电协议,执行与第二设备的充电过程。充电过程为供电设备按照目标充电协议向充电设备供电。充电协议可规定供电设备和充电设备之间的鉴权、通信时序、消息格式、数据包格式、充电异常处理等。例如,供电设备和充电设备按照目标充电协议执行充电的过程中,供电设备可根据目标充电协议,将其可提供的电压/电流信息按照响应的消息格式发送给充电设备,充电设备根据自身需求,选择电压/电流后发送反馈信息给供电设备,供电设备即按照该电压/电流输出充电电压/电流给充电设备充电。In this embodiment, after the target charging protocol is determined, the first device performs a charging process with the second device based on the target charging protocol. In the charging process, the power supply device supplies power to the charging device according to the target charging protocol. The charging protocol can specify the authentication, communication sequence, message format, data packet format, charging exception handling, etc. between the power supply equipment and the charging equipment. For example, when the power supply device and the charging device perform charging according to the target charging protocol, the power supply device can send the voltage/current information it can provide to the charging device in the response message format according to the target charging protocol, and the charging device according to its own needs, After selecting the voltage/current, send feedback information to the power supply device, and the power supply device will output the charging voltage/current according to the voltage/current to charge the charging device.
在本实施例中,目标充电协议为第二设备与第一设备均支持的充电协议中的一种,也即,将第二设备与第一设备都支持的充电协议中的任一一个确定为目标充电协议。可选的,第二设备与第一设备均支持的充电协议可以为标识相同的充电协议,也可以为充电功率相同的充电协议,或者,也可以为充电电流相同的充电协议,等等,本申请实施例中不加以限制。例如,第二设备支持的充电协议包括充电协议A、充电协议B和充电协议C,第一设备支持的充电协议包括充电协议A和充电协议C,其中,第二设备支持的充电协议A和第一设备支持的充电协议A具有相同的协议标识,第二设备支持的充电协议C和第一设备支持的充电协议C具有相同的协议标识,则第一设备将充电协议A和充电协议C确定为第二设备与第一设备均支持的充电协议。进一步地,可选的,第一设备可以根据第二设备与第一设备均支持的充电协议的优先级,从第二设备与第一设备均支持的充电协议中确定 出一种充电协议作为目标充电协议,也可以根据第二设备与第一设备均支持的充电协议的充电功率,从第二设备与第一设备均支持的充电协议中确定出一种充电协议作为目标充电协议。例如,若充电协议A的优先级大于充电协议C的优先级,则第一设备将充电协议A确定为目标充电协议。或者,若充电协议A的充电功率大于充电协议C的充电功率,则第一设备将充电协议A确定为目标充电协议。In this embodiment, the target charging protocol is one of the charging protocols supported by both the second device and the first device, that is, any one of the charging protocols supported by the second device and the first device is determined Charge protocol for the target. Optionally, the charging protocol supported by both the second device and the first device may be a charging protocol with the same identification, or a charging protocol with the same charging power, or a charging protocol with the same charging current, etc. No limitation is imposed in the application examples. For example, the charging protocols supported by the second device include charging protocol A, charging protocol B, and charging protocol C, and the charging protocols supported by the first device include charging protocol A and charging protocol C, wherein the charging protocols supported by the second device A and charging protocols The charging protocol A supported by one device has the same protocol identifier, and the charging protocol C supported by the second device and the charging protocol C supported by the first device have the same protocol identifier, then the first device determines the charging protocol A and charging protocol C as A charging protocol supported by both the second device and the first device. Further, optionally, the first device may determine a charging protocol as a target from the charging protocols supported by both the second device and the first device according to the priorities of the charging protocols supported by both the second device and the first device The charging protocol may also be determined as the target charging protocol from the charging protocols supported by both the second device and the first device according to the charging power of the charging protocols supported by both the second device and the first device. For example, if the priority of charging protocol A is greater than that of charging protocol C, the first device determines charging protocol A as the target charging protocol. Alternatively, if the charging power of the charging protocol A is greater than the charging power of the charging protocol C, the first device determines the charging protocol A as the target charging protocol.
本实施例中,目标充电协议为第二设备与第一设备均支持的充电协议中的一者,通过将第二设备与第一设备均支持的充电协议中的一者确定为目标充电协议,提高了确定目标充电协议的可靠性。In this embodiment, the target charging protocol is one of the charging protocols supported by both the second device and the first device, and by determining one of the charging protocols supported by both the second device and the first device as the target charging protocol, Improved the reliability of determining the target charging protocol.
在上述基于第二设备支持的至少两种充电协议和第一设备支持的充电协议,确定目标充电协议的场景中,上述第二设备与第一设备均支持的充电协议包括两种或两种以上,第一设备可以基于第二设备与第一设备均支持的充电协议包括两种或两种以上的充电协议的优先级确定目标充电协议,也可以基于第二设备与第一设备均支持的充电协议包括两种或两种以上的充电协议的充电功率确定目标充电协议,下边将分别对第一设备基于第二设备与第一设备均支持的包括两种或两种以上的充电协议确定目标充电协议的过程进行详细说明:In the scenario where the target charging protocol is determined based on at least two charging protocols supported by the second device and the charging protocol supported by the first device, the charging protocols supported by both the second device and the first device include two or more , the first device can determine the target charging protocol based on the charging protocols supported by both the second device and the first device, including the priority of two or more charging protocols, or based on the charging protocols supported by both the second device and the first device The protocol includes the charging power of two or more charging protocols to determine the target charging protocol. The following will determine the target charging for the first device based on two or more charging protocols supported by both the second device and the first device. The protocol process is described in detail:
第一种,若第二设备与第一设备均支持的充电协议包括两种或两种以上,则将两种或两种以上的充电协议中,优先级最高的充电协议确定为目标充电协议。First, if the charging protocols supported by both the second device and the first device include two or more charging protocols, the charging protocol with the highest priority among the two or more charging protocols is determined as the target charging protocol.
在本实施例中,若第一设备确定出第二设备与第一设备均支持的充电协议包括两种或两种以上,第一设备根据第二设备与第一设备均支持的充电协议的优先级确定出目标充电协议,即第一设备将第二设备与第一设备均支持的两种或两种以上的充电协议中优先级最高的充电协议确定为上述目标充电协议。继续以上述第二设备支持的充电协议包括充电协议A、充电协议B和充电协议C,第一设备支持的充电协议包括充电协议A和充电协议C为例,则该场景中,第二设备与第一设备均支持的充电协议为充电协议A和充电协议C,若充电协议的优先级为充电协议A>充电协议C,则第一设备将充电协议A确定为上述目标充电协议。In this embodiment, if the first device determines that there are two or more charging protocols supported by both the second device and the first device, the first device The target charging protocol is determined at the first level, that is, the first device determines the charging protocol with the highest priority among the two or more charging protocols supported by both the second device and the first device as the target charging protocol. Continuing to take the example that the charging protocols supported by the second device include charging protocol A, charging protocol B, and charging protocol C, and the charging protocols supported by the first device include charging protocol A and charging protocol C, in this scenario, the second device and The charging protocols supported by the first device are charging protocol A and charging protocol C, and if the priority of the charging protocol is charging protocol A>charging protocol C, then the first device determines charging protocol A as the above-mentioned target charging protocol.
本实施例中,第一设备将第二设备与第一设备均支持的两种或两种以上充电协议中,优先级最高的充电协议确定为目标充电协议的过程十分地简单,从而缩短了第一设备选择充电协议的时间,并且,选择出的目标充电协议更优。In this embodiment, the first device determines the charging protocol with the highest priority among the two or more charging protocols supported by the second device and the first device as the target charging protocol. A device selects a charging protocol time, and the selected target charging protocol is better.
第二种,若第二设备与第一设备均支持的充电协议包括两种或两种以上,则将两种或两种以上的充电协议中,充电功率最高的充电协议确定为目标充电协议:Second, if the charging protocols supported by both the second device and the first device include two or more than two charging protocols, the charging protocol with the highest charging power among the two or more charging protocols is determined as the target charging protocol:
在本实施例中,若第一设备确定出第二设备与第一设备均支持的充电协议包括两种或 两种以上,第一设备根据根据第二设备与第一设备均支持的充电协议的充电功率确定出目标充电协议,即第一设备将第二设备与第一设备均支持的两种或两种以上的充电协议中充电功率最高的充电协议确定为上述目标充电协议。继续以上述第二设备支持的充电协议包括充电协议A、充电协议B和充电协议C,第一设备支持的充电协议包括充电协议A和充电协议C为例,则该场景中,第二设备与第一设备均支持的充电协议为充电协议A和充电协议C,若充电协议C的充电功率大于充电协议A的充电功率,则第一设备将充电协议C确定为目标充电协议。In this embodiment, if the first device determines that there are two or more charging protocols supported by the second device and the first device, the first device The charging power determines the target charging protocol, that is, the first device determines the charging protocol with the highest charging power among the two or more charging protocols supported by both the second device and the first device as the target charging protocol. Continuing to take the example that the charging protocols supported by the second device include charging protocol A, charging protocol B, and charging protocol C, and the charging protocols supported by the first device include charging protocol A and charging protocol C, in this scenario, the second device and The charging protocols supported by the first device are charging protocol A and charging protocol C. If the charging power of charging protocol C is greater than that of charging protocol A, the first device determines charging protocol C as the target charging protocol.
需要说明的是,为了减少第二设备向第一设备发送的充电协议信息的信令,在上述第二设备向第一设备发送的充电协议信息的场景中,第二设备发送的充电协议信息中可以包括第二设备支持的各充电协议的充电功率,也可以包括第二设备支持的各充电协议的充电功率的等级。It should be noted that, in order to reduce the signaling of the charging protocol information sent by the second device to the first device, in the scenario of the charging protocol information sent by the second device to the first device, the charging protocol information sent by the second device The charging power of each charging protocol supported by the second device may be included, and the level of charging power of each charging protocol supported by the second device may also be included.
本实施例中,第一设备将第二设备与第一设备均支持的两种或两种以上充电协议中,充电功率最高的充电协议确定为目标充电协议的过程十分地简单,从而缩短了第一设备选择充电协议的时间。In this embodiment, the first device determines the charging protocol with the highest charging power as the target charging protocol among the two or more charging protocols supported by the second device and the first device. A time for the device to select a charging protocol.
在上述若第二设备与第一设备均支持的充电协议包括两种或两种以上,则第一设备将第二设备与第一设备均支持的两种或两种以上的充电协议中,充电功率最高的充电协议确定为目标充电协议的场景中,第二设备与第一设备均支持的充电协议可以包括第一候选协议和第二候选协议,其中,第一候选协议和第二候选协议为不同厂商所有的充电协议,则在该场景中,在一个实施例中,若第二设备与第一设备均支持的充电协议包括第一候选协议和第二候选协议,且第二候选协议的充电功率大于第一候选协议的充电功率与预设的功率增量之和,则将第二候选协议确定为所述目标充电协议。If the above-mentioned charging protocols supported by both the second device and the first device include two or more, then the first device will use the two or more charging protocols supported by the second device and the first device. In the scenario where the charging protocol with the highest power is determined as the target charging protocol, the charging protocols supported by both the second device and the first device may include a first candidate protocol and a second candidate protocol, where the first candidate protocol and the second candidate protocol are For charging protocols owned by different manufacturers, in this scenario, in one embodiment, if the charging protocols supported by both the second device and the first device include the first candidate protocol and the second candidate protocol, and the charging protocol of the second candidate protocol If the power is greater than the sum of the charging power of the first candidate protocol and the preset power increment, the second candidate protocol is determined as the target charging protocol.
在本实施例中,第一候选协议和第二候选协议为不同厂商所有的协议,例如,第一候选协议可以为第一厂商所有的协议,第二候选协议可以为第二厂商所有的协议,第一候选协议为运营商的自有协议时,在该场景下,为了更加灵活地确定出目标充电协议,第一设备可以对第一候选协议的充电功率与预设的功率增量求和,得到第一候选协议的修正功率,例如,预设的功率增量可以为20,则第一设备可以将第一候选协议的充电功率与20求和,得到第一候选协议的修正功率,将上述第二候选协议的充电功率和上述第一候选协议的修正功率进行比较,若第一设备确定上述第二候选协议的充电功率大于上述第一候选协议的修正功率,则第一设备将第二候选协议确定为上述目标充电协议。可以理解的是,在本实施例中,第一候选协议的充电功率为修正后的功率,在该情况下若第二候选协议的充电功率还大于第一候选协议的修正功率,说明第二候选协议的充电功率为最大功率,从 而将第二候选协议确定为目标充电协议,确保确定的目标充电协议的准确度。In this embodiment, the first candidate protocol and the second candidate protocol are protocols owned by different manufacturers. For example, the first candidate protocol may be a protocol owned by the first manufacturer, and the second candidate protocol may be a protocol owned by the second manufacturer. When the first candidate protocol is the operator's own protocol, in this scenario, in order to more flexibly determine the target charging protocol, the first device may sum the charging power of the first candidate protocol and a preset power increment, To obtain the corrected power of the first candidate protocol, for example, the preset power increment can be 20, then the first device can sum the charging power of the first candidate protocol and 20 to obtain the corrected power of the first candidate protocol, and the above The charging power of the second candidate protocol is compared with the correction power of the first candidate protocol. If the first device determines that the charging power of the second candidate protocol is greater than the correction power of the first candidate protocol, the first device will The protocol identified above is the target charging protocol. It can be understood that, in this embodiment, the charging power of the first candidate protocol is the corrected power. In this case, if the charging power of the second candidate protocol is still greater than the corrected power of the first candidate protocol, it means The charging power of the protocol is the maximum power, so the second candidate protocol is determined as the target charging protocol, ensuring the accuracy of the determined target charging protocol.
本实施例中,若第二设备与第二设备均支持的充电协议包括第一候选协议和第二候选协议,且第二候选协议的充电功率大于第一候选协议的充电功率与预设的功率增量之和,第一设备将第二候选协议确定为目标充电协议,使得该协议选择方法的场景适应性更加的灵活。In this embodiment, if the charging protocols supported by both the second device and the second device include the first candidate protocol and the second candidate protocol, and the charging power of the second candidate protocol is greater than the charging power of the first candidate protocol and the preset power In the sum of the increments, the first device determines the second candidate protocol as the target charging protocol, so that the scenario adaptability of the protocol selection method is more flexible.
场景三,若第二设备与第一设备均支持的充电协议包括两种或两种以上,则第一设备可以采用如下的两种方法确定目标充电协议,下边分别对这两种确定目标充电协议的方法进行说明:Scenario 3: If both the second device and the first device support two or more charging protocols, the first device can use the following two methods to determine the target charging protocol, and the following two determine the target charging protocol respectively The method is explained:
方法A:若第二设备与第一设备均支持的充电协议包括两种或两种以上,将两种或两种以上的充电协议中优先级最高的第三候选充电协议确定为目标充电协议;第三候选充电协议为按照充电功率从大到小的顺序从两种或两种以上的充电协议中确定的预设数量的充电协议。Method A: If the charging protocols supported by both the second device and the first device include two or more, determine the third candidate charging protocol with the highest priority among the two or more charging protocols as the target charging protocol; The third candidate charging protocol is a preset number of charging protocols determined from two or more charging protocols in descending order of charging power.
在本实施例中,若第一设备确定出第二设备与第一设备均支持的充电协议包括两种或两种以上,第一设备接收到第二设备发送的充电协议信息后,根据充电协议信息中第二设备支持的充电协议的充电功率,从第二设备与第一设备均支持的包括两种或两种以上的充电协议中按照充电功率从大到小的顺序确定出预设数量的充电协议,例如,第二设备与第一设备均支持的包括两种或两种以上的充电协议为充电协议A、充电协议C和充电协议D,第一设备接收到第二设备发送的充电协议信息中充电协议A的功率为50W,充电协议C的功率为20W、充电协议D的功率为10W,则第一设备将充电协议A和充电协议C确定为第三候选充电协议,进而将优先级最高的第三候选充电协议确定为目标充电协议。例如,确定的第三候选充电协议为充电协议C和充电协议D,且充电协议C的优先级高于充电协议D的优先级,则第一设备将充电协议C确定为目标充电协议,又例如,确定的第三候选充电协议为充电协议A、充电协议C和充电协议D,且充电协议A的优先级高于充电协议C的优先级,充电协议C的优先级高于充电协议D的优先级,则第一设备可以将充电协议A确定为目标充电协议。In this embodiment, if the first device determines that both the second device and the first device support two or more charging protocols, after receiving the charging protocol information sent by the second device, the first device In the information, the charging power of the charging protocol supported by the second device is determined from the charging power of the second device and the first device, including two or more charging protocols, according to the order of charging power from large to small. Charging protocol, for example, two or more charging protocols supported by both the second device and the first device are charging protocol A, charging protocol C and charging protocol D, and the first device receives the charging protocol sent by the second device In the information, the power of charging protocol A is 50W, the power of charging protocol C is 20W, and the power of charging protocol D is 10W, then the first device determines charging protocol A and charging protocol C as the third candidate charging protocol, and then sets the priority The highest third candidate charging protocol is determined as the target charging protocol. For example, the determined third candidate charging protocol is charging protocol C and charging protocol D, and the priority of charging protocol C is higher than that of charging protocol D, then the first device determines charging protocol C as the target charging protocol, and for example , the determined third candidate charging protocol is charging protocol A, charging protocol C, and charging protocol D, and the priority of charging protocol A is higher than that of charging protocol C, and the priority of charging protocol C is higher than that of charging protocol D level, the first device may determine charging protocol A as the target charging protocol.
本实施例中,第一设备能够根据第二设备与第一设备均支持的充电协议的的充电功率,快速地对第二设备与第一设备均支持的充电协议按照充电功率进行排序,快速地从中确定预设数量的第三候选充电协议,这样第一设备就能够快速将优先级最高的第三候选充电协议确定为目标充电协议,由于确定的目标充电协议为优先级最高的第三候选充电协议,这样兼顾了充电协议的优先级和功率这两个因素,使得确定的目标充电协议更加可靠,更加适应场景。In this embodiment, the first device can quickly sort the charging protocols supported by both the second device and the first device according to the charging power according to the charging power of the charging protocols supported by the second device and the first device, and quickly A preset number of third candidate charging protocols are determined therefrom, so that the first device can quickly determine the third candidate charging protocol with the highest priority as the target charging protocol, because the determined target charging protocol is the third candidate charging protocol with the highest priority In this way, the two factors of the priority and power of the charging protocol are taken into account, making the determined target charging protocol more reliable and more adaptable to the scene.
方法B:若第二设备与第一设备均支持的充电协议包括两种或两种以上,将两种或两种以上的充电协议中充电功率最高的第四候选充电协议确定为目标充电协议;第四候选充电协议为按照优先级从高到低的顺序从两种或两种以上的充电协议中确定的预设数量的充电协议。Method B: If the charging protocols supported by both the second device and the first device include two or more, determine the fourth candidate charging protocol with the highest charging power among the two or more charging protocols as the target charging protocol; The fourth candidate charging protocol is a preset number of charging protocols determined from two or more charging protocols in descending order of priority.
在本实施例中,若第一设备确定出第二设备与第一设备均支持的充电协议包括两种或两种以上,第一设备接收到第二设备发送的充电协议信息后,根据充电协议信息中第二设备支持的充电协议的优先级,从第二设备与第一设备均支持的包括两种或两种以上的充电协议中按照优先级从高到低的顺序确定出预设数量的充电协议,例如,第二设备与第一设备均支持的包括两种或两种以上的充电协议为充电协议A、充电协议C和充电协议D,第一设备接收到第二设备发送充电协议信息中充电协议A的优先级高于充电协议C的优先级,充电协议C的优先级高于充电协议D的优先级,则第一设备将充电协议A和充电协议C确定为第四候选充电协议,进而将充电功率最高的第四候选充电协议确定为目标充电协议。例如,确定的第四候选充电协议为充电协议C和充电协议D,且充电协议C的充电功率大于充电协议D的充电功率,则第一设备将充电协议C确定为目标充电协议,又例如,确定的第四候选充电协议为充电协议A、充电协议C和充电协议D,且充电协议A的充电功率大于充电协议C的充电功率,充电协议C的充电功率大于充电协议D的充电功率,则第一设备可以将充电协议A确定为目标充电协议。In this embodiment, if the first device determines that both the second device and the first device support two or more charging protocols, after receiving the charging protocol information sent by the second device, the first device The priority of the charging protocol supported by the second device in the information, from the two or more charging protocols supported by both the second device and the first device, a preset number of charging protocols are determined in order of priority from high to low. Charging protocol, for example, two or more charging protocols supported by both the second device and the first device are charging protocol A, charging protocol C and charging protocol D, and the first device receives the charging protocol information sent by the second device The priority of charging protocol A is higher than that of charging protocol C, and the priority of charging protocol C is higher than that of charging protocol D, then the first device determines charging protocol A and charging protocol C as the fourth candidate charging protocol , and then determine the fourth candidate charging protocol with the highest charging power as the target charging protocol. For example, the determined fourth candidate charging protocol is charging protocol C and charging protocol D, and the charging power of charging protocol C is greater than the charging power of charging protocol D, then the first device determines charging protocol C as the target charging protocol, and for another example, The determined fourth candidate charging protocol is charging protocol A, charging protocol C and charging protocol D, and the charging power of charging protocol A is greater than the charging power of charging protocol C, and the charging power of charging protocol C is greater than the charging power of charging protocol D, then The first device may determine charging protocol A as the target charging protocol.
本实施例中,第一设备能够根据第二设备与第一设备均支持的充电协议的优先级,快速地对第二设备与第一设备均支持的充电协议按照优先级进行排序,快速地从中确定预设数量的第四候选充电协议,这样第一设备就能够快速将充电功率最大的第四候选充电协议确定为目标充电协议,由于确定的目标充电协议为充电功率最大的第四候选充电协议,这样兼顾了充电协议的优先级和功率这两个因素,使得确定的目标充电协议更加可靠,更加适应场景。In this embodiment, the first device can quickly sort the charging protocols supported by both the second device and the first device according to the priority according to the priorities of the charging protocols supported by both the second device and the first device, and quickly select Determine a preset number of fourth candidate charging protocols, so that the first device can quickly determine the fourth candidate charging protocol with the largest charging power as the target charging protocol, because the determined target charging protocol is the fourth candidate charging protocol with the largest charging power , which takes into account the priority and power of the charging protocol, making the determined target charging protocol more reliable and more adaptable to the scene.
在上述第一设备接收第二设备发送的充电协议信息的场景中,第一设备和第二设备之间需要预先建立起通信连接,在一个实施例中,上述方法还包括:基于预设的标准通信协议,建立与第二设备间的通信连接。In the scenario where the first device receives the charging protocol information sent by the second device, a communication connection needs to be established in advance between the first device and the second device. In one embodiment, the above method further includes: A communication protocol, establishing a communication connection with the second device.
其中,预设的标准通信协议可以为第一设备与第二设备均支持的通信协议,也可以为第一设备与第二设备均支持的充电协议。可选的,可以是第一设备向第二设备发送握手请求,第二设备接收到第一设备的握手请求后,向第一设备发送应答消息,建立与第二设备间的通信连接。也可以是第二设备向第一设备发送握手请求,第一设备接收到第二设备发送的握手请求后,向第二设备发送应答消息,建立与第一设备间的通信连接。可选的,上 述目标充电协议可以为该预设的标准通信协议。可以理解的是,第一设备和第二设备可以基于预设的标准通信协议进行通信,说明该标准通信协议均支持第一设备和第二设备充电设备的通信的,则可以将上述预设的标准通信协议直接作为目标充电协议。Wherein, the preset standard communication protocol may be a communication protocol supported by both the first device and the second device, or may be a charging protocol supported by both the first device and the second device. Optionally, the first device may send a handshake request to the second device, and after receiving the handshake request from the first device, the second device sends a response message to the first device to establish a communication connection with the second device. It may also be that the second device sends a handshake request to the first device, and after receiving the handshake request sent by the second device, the first device sends a response message to the second device to establish a communication connection with the first device. Optionally, the above-mentioned target charging protocol may be the preset standard communication protocol. It can be understood that the first device and the second device can communicate based on a preset standard communication protocol. If the standard communication protocol supports the communication between the first device and the charging device of the second device, the above preset The standard communication protocol is directly used as the target charging protocol.
本实施例中,第一设备基于预设的标准通信协议,建立与第二设备间的通信连接的过程十分简单,能够迅速地建立起第一设备和第二设备间的通信连接,以便于后续第一设备和第二设备之间进行充电协议的协商。In this embodiment, the process of establishing a communication connection between the first device and the second device based on a preset standard communication protocol is very simple, and the communication connection between the first device and the second device can be quickly established for subsequent A charging protocol negotiation is performed between the first device and the second device.
为了便于本领域技术人员的理解,以下结合一个完整的实施例对本申请提供的充电协议的确定方法进行详细介绍:In order to facilitate the understanding of those skilled in the art, the method for determining the charging protocol provided by this application is described in detail below in conjunction with a complete embodiment:
S1,基于预设的标准通信协议,建立与第二设备间的通信连接。S1. Establish a communication connection with the second device based on a preset standard communication protocol.
S2,接收第二设备发送的充电协议信息;充电协议信息包括第二设备支持的至少两种充电协议的标识。S2. Receive charging protocol information sent by the second device; the charging protocol information includes identifications of at least two charging protocols supported by the second device.
S3,若第二设备与第一设备均支持的充电协议包括两种或两种以上,则执行步骤S4或步骤S5或步骤S6或步骤S7或步骤S8;S3, if the charging protocols supported by both the second device and the first device include two or more than two, execute step S4 or step S5 or step S6 or step S7 or step S8;
S4,将两种或两种以上的充电协议中,优先级最高的充电协议确定为目标充电协议。S4. Determine the charging protocol with the highest priority among the two or more charging protocols as the target charging protocol.
S5,若第二设备与第一设备均支持的充电协议包括两种或两种以上,则将两种或两种以上的充电协议中,充电功率最高的充电协议确定为目标充电协议。S5. If the charging protocols supported by both the second device and the first device include two or more, determine the charging protocol with the highest charging power among the two or more charging protocols as the target charging protocol.
S6,若第二设备与第一设备均支持的充电协议包括第一候选协议和第二候选协议,且第二候选协议的充电功率大于第一候选协议的充电功率与预设的功率增量之和,则将第二候选协议确定为所述目标充电协议。S6, if the charging protocols supported by both the second device and the first device include the first candidate protocol and the second candidate protocol, and the charging power of the second candidate protocol is greater than the difference between the charging power of the first candidate protocol and the preset power increment and, the second candidate protocol is determined as the target charging protocol.
S7,若第二设备与第一设备均支持的充电协议包括两种或两种以上,将两种或两种以上的充电协议中优先级最高的第三候选充电协议确定为目标充电协议;第三候选充电协议为按照充电功率从大到小的顺序从两种或两种以上的充电协议中确定的预设数量的充电协议。S7. If the charging protocols supported by both the second device and the first device include two or more, determine the third candidate charging protocol with the highest priority among the two or more charging protocols as the target charging protocol; The three candidate charging protocols are a preset number of charging protocols determined from two or more charging protocols in descending order of charging power.
S8,若第二设备与第一设备均支持的充电协议包括两种或两种以上,将两种或两种以上的充电协议中充电功率最高的第四候选充电协议确定为目标充电协议;第四候选充电协议为按照优先级从高到低的顺序从两种或两种以上的充电协议中确定的预设数量的充电协议。S8. If the charging protocols supported by both the second device and the first device include two or more, determine the fourth candidate charging protocol with the highest charging power among the two or more charging protocols as the target charging protocol; The four candidate charging protocols are a preset number of charging protocols determined from two or more charging protocols in descending order of priority.
S9,基于目标充电协议,执行与第二设备的充电过程。S9. Perform a charging process with the second device based on the target charging protocol.
其中,第一设备为充电设备、第二设备为供电设备;或者,第一设备为供电设备、第二设备为充电设备。Wherein, the first device is a charging device, and the second device is a power supply device; or, the first device is a power supply device, and the second device is a charging device.
需要说明的是,针对上述S1-S9中的描述可以参见上述实施例中相关的描述,且其效 果类似,本实施例在此不再赘述。It should be noted that for the descriptions in S1-S9 above, reference may be made to the relevant descriptions in the above embodiments, and the effects are similar, so details will not be repeated in this embodiment.
图3为一个实施例中充电协议的确定方法的流程图。本实施例中的充电协议的确定方法,以运行于图1中的第一设备为例进行描述。如图3所示,该充电协议的确定方法包括:Fig. 3 is a flowchart of a method for determining a charging protocol in an embodiment. The method for determining the charging protocol in this embodiment is described by taking the first device running in FIG. 1 as an example. As shown in Figure 3, the method for determining the charging protocol includes:
S301,向第二设备发送充电协议信息;充电协议信息包括第一设备支持的至少两种充电协议的标识。S301. Send charging protocol information to the second device; the charging protocol information includes identifiers of at least two charging protocols supported by the first device.
其中,第一设备支持的至少两种充电协议的标识可以是第一设备支持的充电协议的名称,也可以是第一设备支持的充电协议的编码,或者,也可以是第一设备支持的充电协议所属厂商的厂商名等,本申请实施例中不加以限制。在本实施例中,在第一设备和第二设备建立了通信连接后,第一设备可以将包括自身支持的至少两种充电协议的标识的充电协议信息发送给第二设备。例如,第一设备支持的充电协议包括充电协议A、充电协议B和充电协议C三种协议,则第一设备将充电协议A的标识、充电协议B的标识和充电协议C的标识携带在充电协议信息中发送给第二设备。需要说明的是,第一设备支持的至少两种充电协议可能为不同厂商所属的充电协议,也可能为不同充电功率对应的充电协议。可选的,第一设备可以为充电设备,第二设备为供电设备,或者,第一设备为供电设备,第二设备为充电设备。Wherein, the identification of the at least two charging protocols supported by the first device may be the name of the charging protocol supported by the first device, or the code of the charging protocol supported by the first device, or may be the charging protocol supported by the first device. The manufacturer's name and the like of the manufacturer to whom the protocol belongs are not limited in this embodiment of the application. In this embodiment, after the first device establishes a communication connection with the second device, the first device may send charging protocol information including identifications of at least two charging protocols it supports to the second device. For example, the charging protocol supported by the first device includes three protocols: charging protocol A, charging protocol B and charging protocol C, then the first device carries the identification of charging protocol A, charging protocol B and charging protocol C in the charging The protocol information is sent to the second device. It should be noted that the at least two charging protocols supported by the first device may be charging protocols belonging to different manufacturers, or may be charging protocols corresponding to different charging powers. Optionally, the first device may be a charging device, and the second device may be a power supply device, or, the first device may be a power supply device, and the second device may be a charging device.
S302,接收第二设备发送的目标充电协议的标识;目标充电协议为第二设备基于第一设备支持的至少两种充电协议和第二设备支持的充电协议确定的。S302. Receive an identifier of a target charging protocol sent by the second device; the target charging protocol is determined by the second device based on at least two charging protocols supported by the first device and the charging protocols supported by the second device.
在本实施例中,第二设备确定出目标充电协议后,将目标充电协议的标识发送给第一设备,第一设备接收第二设备发送的目标充电协议的标识,其中,目标充电协议的标识为第二设备基于第一设备支持的至少两种充电协议和第二设备支持的充电协议所确定的。继续以第一设备支持的充电协议包括协议A、协议B和协议C三种协议、第二设备支持的充电协议包括协议A和协议C为例进行说明,若第二设备确定出的目标充电协议为协议A,则第二设备将协议A的标识发送给第一设备,第一设备接收第二设备发送的协议A的标识;若第二设备确定出的目标充电协议为协议C,则第二设备将协议C的标识发送给第一设备,第一设备接收第二设备发送的协议C的标识。In this embodiment, after the second device determines the target charging protocol, it sends the identification of the target charging protocol to the first device, and the first device receives the identification of the target charging protocol sent by the second device, wherein the identification of the target charging protocol determined by the second device based on at least two charging protocols supported by the first device and the charging protocols supported by the second device. Continue to take the example that the charging protocol supported by the first device includes protocol A, protocol B, and protocol C, and the charging protocol supported by the second device includes protocol A and protocol C. If the target charging protocol determined by the second device is protocol A, then the second device sends the protocol A identifier to the first device, and the first device receives the protocol A identifier sent by the second device; if the target charging protocol determined by the second device is protocol C, then the second device The device sends the protocol-C identifier to the first device, and the first device receives the protocol-C identifier sent by the second device.
可选的,第二设备接收到第一设备发送的充电协议信息后,可以将第一设备和第二设备共同支持的其中一种充电协议确定为目标充电协议,也即,第二设备可以从第一设备支持的至少两种充电协议和第二设备支持的充电协议中相同的多种充电协议中确定一种充电协议作为目标充电协议。或者,也可以是第二设备确定第一设备和第二设备共同支持的多种充电协议,然后根据一些选择机制选择其中的一种充电协议作为目标充电协议,例如,第二设备可以按照共同支持的充电协议的优先级顺序确定目标充电协议,或者,第二设备 可以按照共同支持的充电协议的额定功率确定目标充电协议,等等。可选的,作为一种可以实现的方式,若第二设备与第一设备均支持的充电协议包括两种或两种以上,则第二设备将该两种或两种以上的充电协议中,优先级最高的充电协议确定为目标充电协议。或者,若第二设备与第一设备均支持的充电协议包括两种或两种以上,则第二设备将该两种或两种以上的充电协议中,充电功率最高的充电协议确定为目标充电协议;进一步地,若第二设备与第一设备均支持的充电协议包括第一候选协议和第二候选协议,且第二候选协议的充电功率大于第一候选协议的充电功率与预设的功率增量之和,则第二设备可以将第二候选协议确定为目标充电协议。又或者,若第二设备与第一设备均支持的充电协议包括两种或两种以上,第二设备可以将该两种或两种以上的充电协议中优先级最高的第三候选充电协议确定为目标充电协议;其中,第三候选充电协议为按照充电功率从大到小的顺序从上述两种或两种以上的充电协议中确定的预设数量的充电协议。或者,若第二设备与第一设备均支持的充电协议包括两种或两种以上,第二设备可以将上述两种或两种以上的充电协议中充电功率最高的第四候选充电协议确定为目标充电协议;其中,第四候选充电协议为按照优先级从高到低的顺序从上述两种或两种以上的充电协议中确定的预设数量的充电协议。Optionally, after receiving the charging protocol information sent by the first device, the second device may determine one of the charging protocols supported by both the first device and the second device as the target charging protocol, that is, the second device may start from One charging protocol among the at least two charging protocols supported by the first device and the same plurality of charging protocols supported by the second device is determined as the target charging protocol. Alternatively, the second device may determine multiple charging protocols supported by both the first device and the second device, and then select one of the charging protocols as the target charging protocol according to some selection mechanisms. For example, the second device may The priority sequence of the charging protocol determines the target charging protocol, or the second device may determine the target charging protocol according to the rated power of the commonly supported charging protocols, and so on. Optionally, as an implementable manner, if both the second device and the first device support two or more charging protocols, the second device includes the two or more charging protocols, The charging protocol with the highest priority is determined as the target charging protocol. Alternatively, if the charging protocols supported by both the second device and the first device include two or more, the second device determines the charging protocol with the highest charging power among the two or more charging protocols as the target charging protocol. protocol; further, if the charging protocol supported by both the second device and the first device includes the first candidate protocol and the second candidate protocol, and the charging power of the second candidate protocol is greater than the charging power of the first candidate protocol and the preset power The second device may determine the second candidate protocol as the target charging protocol. Alternatively, if both the second device and the first device support two or more charging protocols, the second device may determine the third candidate charging protocol with the highest priority among the two or more charging protocols is the target charging protocol; wherein, the third candidate charging protocol is a preset number of charging protocols determined from the above two or more than two charging protocols in descending order of charging power. Alternatively, if both the second device and the first device support two or more charging protocols, the second device may determine the fourth candidate charging protocol with the highest charging power among the above two or more charging protocols as The target charging protocol; wherein, the fourth candidate charging protocol is a preset number of charging protocols determined from the above two or more charging protocols in descending order of priority.
第一设备接收到该目标充电协议的标识之后,第一设备基于目标充电协议执行与第二设备的充电过程。例如,若第一设备为供电设备,第二设备为充电设备,则第一设备根据目标充电协议为第二设备充电,若第一设备为充电设备,第二设备为供电设备,则第二设备根据目标充电协议为第一设备充电。After the first device receives the identification of the target charging protocol, the first device performs a charging process with the second device based on the target charging protocol. For example, if the first device is a power supply device and the second device is a charging device, the first device charges the second device according to the target charging protocol; if the first device is a charging device and the second device is a power supply device, the second device The first device is charged according to the target charging protocol.
本实施例中,在第一设备和第二设备均支持多种充电协议的情况下,第一设备向第二设备发送充电协议信息,由于该充电协议信息中包括了第一设备支持的至少两种充电协议的标识,相当于第一设备一次向第二设备发送了多种充电协议,第二设备能够基于第一设备支持的多个充电协议和自身支持的充电协议,直接确定出目标充电协议,避免了多次进行充电协议选择的过程,从而缩短了第二充电设备选择充电协议的时间,减少了第一设备和第二设备充电前的交互时间。In this embodiment, when both the first device and the second device support multiple charging protocols, the first device sends charging protocol information to the second device, since the charging protocol information includes at least two charging protocols supported by the first device. The identification of a charging protocol is equivalent to the first device sending multiple charging protocols to the second device at one time, and the second device can directly determine the target charging protocol based on the multiple charging protocols supported by the first device and the charging protocols supported by itself , avoiding the process of selecting the charging protocol multiple times, thereby shortening the time for the second charging device to select the charging protocol, and reducing the interaction time between the first device and the second device before charging.
在上述第一设备向第二设备发送的充电协议信息的场景中,第一设备和第二设备之间需要预先建立起通信连接,在一个实施例中,上述方法还包括:基于预设的标准通信协议,建立与第二设备间的通信连接。In the scenario where the first device sends the charging protocol information to the second device, a communication connection needs to be established in advance between the first device and the second device. In one embodiment, the above method further includes: A communication protocol, establishing a communication connection with the second device.
其中,预设的标准通信协议可以为第一设备与第二设备均支持的通信协议,也可以为第一设备与第二设备均支持的充电协议。可选的,可以是第一设备向第二设备发送握手请求,第二设备接收到第一设备的握手请求后,向第一设备发送应答消息,建立与第二设备 间的通信连接。也可以是第二设备向第一设备发送握手请求,第一设备接收到第二设备发送的握手请求后,向第二设备发送应答消息,建立与第一设备间的通信连接。可选的,上述目标充电协议可以为该预设的标准通信协议。可以理解的是,第一设备和第二设备可以基于预设的标准通信协议进行通信,说明该标准通信协议均支持第一设备和第二设备充电设备的通信的,则可以将上述目标充电协议直接作为预设的标准通信协议。Wherein, the preset standard communication protocol may be a communication protocol supported by both the first device and the second device, or may be a charging protocol supported by both the first device and the second device. Optionally, the first device may send a handshake request to the second device, and after receiving the handshake request from the first device, the second device sends a response message to the first device to establish a communication connection with the second device. It may also be that the second device sends a handshake request to the first device, and after receiving the handshake request sent by the second device, the first device sends a response message to the second device to establish a communication connection with the first device. Optionally, the above-mentioned target charging protocol may be the preset standard communication protocol. It can be understood that the first device and the second device can communicate based on a preset standard communication protocol. If the standard communication protocol supports the communication between the first device and the charging device of the second device, the above target charging protocol can be Directly as the preset standard communication protocol.
本实施例中,第一设备基于预设的标准通信协议,建立与第二设备间的通信连接的过程十分简单,能够迅速地建立起第一设备和第二设备间的通信连接,以便于后续第一设备和第二设备之间进行充电协议的协商。In this embodiment, the process of establishing a communication connection between the first device and the second device based on a preset standard communication protocol is very simple, and the communication connection between the first device and the second device can be quickly established for subsequent A charging protocol negotiation is performed between the first device and the second device.
为了便于本领域技术人员的理解,以下结合一个完整的实施例对本申请提供的充电协议的确定方法进行详细介绍:In order to facilitate the understanding of those skilled in the art, the method for determining the charging protocol provided by this application is described in detail below in conjunction with a complete embodiment:
S10,基于预设的标准通信协议,建立与第二设备间的通信连接。S10. Establish a communication connection with the second device based on a preset standard communication protocol.
S20,向第二设备发送充电协议信息;充电协议信息包括第一设备支持的至少两种充电协议的标识。S20. Send charging protocol information to the second device; the charging protocol information includes identifiers of at least two charging protocols supported by the first device.
S30,接收第二设备发送的目标充电协议的标识;目标充电协议为第二设备基于第一设备支持的至少两种充电协议和第二设备支持的充电协议确定的;目标充电协议为第二设备与第一设备均支持的充电协议中的一者。S30. Receive the identification of the target charging protocol sent by the second device; the target charging protocol is determined by the second device based on at least two charging protocols supported by the first device and the charging protocol supported by the second device; the target charging protocol is determined by the second device One of the charging protocols supported by both the first device.
S40,基于目标充电协议,执行与第二设备的充电过程。S40. Perform a charging process with the second device based on the target charging protocol.
可选的,目标充电协议为预设的标准通信协议。Optionally, the target charging protocol is a preset standard communication protocol.
可选的,第一设备为充电设备、第二设备为供电设备;或者,第一设备为供电设备、第二设备为充电设备。Optionally, the first device is a charging device, and the second device is a power supply device; or, the first device is a power supply device, and the second device is a charging device.
需要说明的是,针对上述S10-S40中的描述可以参见上述实施例中相关的描述,且其效果类似,本实施例在此不再赘述。It should be noted that, for the descriptions in S10-S40 above, reference may be made to the relevant descriptions in the above embodiments, and the effects are similar, so details will not be repeated in this embodiment.
应该理解的是,虽然图2至图3的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2至图3中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flow charts of FIG. 2 to FIG. 3 are shown sequentially as indicated by the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in FIGS. 2 to 3 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. These sub-steps or The execution order of the stages is not necessarily performed sequentially, but may be executed alternately or alternately with at least a part of other steps or substeps of other steps or stages.
图4为一个实施例的充电协议的确定装置的结构框图。如图4所示,该充电协议的确定装置应用于第一设备,该充电协议的确定装置,包括:接收模块、确定模块和发送模块, 其中:Fig. 4 is a structural block diagram of an apparatus for determining a charging protocol according to an embodiment. As shown in FIG. 4, the device for determining the charging protocol is applied to the first device, and the device for determining the charging protocol includes: a receiving module, a determining module, and a sending module, wherein:
接收模块,用于接收第二设备发送的充电协议信息;充电协议信息包括第二设备支持的至少两种充电协议的标识;A receiving module, configured to receive charging protocol information sent by the second device; the charging protocol information includes identifications of at least two charging protocols supported by the second device;
确定模块,用于基于第二设备支持的至少两种充电协议和第一设备支持的充电协议,确定目标充电协议;A determining module, configured to determine a target charging protocol based on at least two charging protocols supported by the second device and a charging protocol supported by the first device;
发送模块,用于将目标充电协议的标识发送给第二设备。A sending module, configured to send the identification of the target charging protocol to the second device.
可选的,第一设备为充电设备、第二设备为供电设备;或者,第一设备为供电设备、第二设备为充电设备。Optionally, the first device is a charging device, and the second device is a power supply device; or, the first device is a power supply device, and the second device is a charging device.
本实施例提供的充电协议的确定装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。The device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
在上述实施例的基础上,可选的,目标充电协议为第二设备与第一设备均支持的充电协议中的一者。On the basis of the foregoing embodiments, optionally, the target charging protocol is one of the charging protocols supported by both the second device and the first device.
本实施例提供的充电协议的确定装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。The device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
在上述实施例的基础上,可选的,若第二设备与第一设备均支持的充电协议包括两种或两种以上,则将两种或两种以上的充电协议中,优先级最高的充电协议确定为目标充电协议。On the basis of the above-mentioned embodiments, optionally, if the charging protocols supported by both the second device and the first device include two or more than two charging protocols, among the two or more charging protocols, the one with the highest priority The charging protocol is determined as the target charging protocol.
本实施例提供的充电协议的确定装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。The device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
在上述实施例的基础上,可选的,若第二设备与第一设备均支持的充电协议包括两种或两种以上,则将两种或两种以上的充电协议中,充电功率最高的充电协议确定为目标充电协议。On the basis of the above embodiments, optionally, if both the second device and the first device support two or more charging protocols, the one with the highest charging power among the two or more charging protocols The charging protocol is determined as the target charging protocol.
本实施例提供的充电协议的确定装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。The device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
在上述实施例的基础上,可选的,若第二设备与第一设备均支持的充电协议包括第一候选协议和第二候选协议,且第二候选协议的充电功率大于第一候选协议的充电功率与预设的功率增量之和,则将第二候选协议确定为目标充电协议。On the basis of the above embodiments, optionally, if the charging protocols supported by both the second device and the first device include the first candidate protocol and the second candidate protocol, and the charging power of the second candidate protocol is greater than that of the first candidate protocol The sum of the charging power and the preset power increment determines the second candidate protocol as the target charging protocol.
本实施例提供的充电协议的确定装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。The device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
在上述实施例的基础上,可选的,若第二设备与第一设备均支持的充电协议包括两种或两种以上,将两种或两种以上的充电协议中优先级最高的第三候选充电协议确定为目标 充电协议;第三候选充电协议为按照充电功率从大到小的顺序从两种或两种以上的充电协议中确定的预设数量的充电协议。On the basis of the above embodiments, optionally, if the charging protocols supported by both the second device and the first device include two or more charging protocols, the third charging protocol with the highest priority among the two or more charging protocols The candidate charging protocol is determined as the target charging protocol; the third candidate charging protocol is a preset number of charging protocols determined from two or more charging protocols in descending order of charging power.
本实施例提供的充电协议的确定装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。The device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
在上述实施例的基础上,可选的,若第二设备与第一设备均支持的充电协议包括两种或两种以上,将两种或两种以上的充电协议中充电功率最高的第四候选充电协议确定为目标充电协议;第四候选充电协议为按照优先级从高到低的顺序从两种或两种以上的充电协议中确定的预设数量的充电协议。On the basis of the above-mentioned embodiments, optionally, if the charging protocols supported by both the second device and the first device include two or more charging protocols, the fourth charging protocol with the highest charging power among the two or more charging protocols The candidate charging protocol is determined as the target charging protocol; the fourth candidate charging protocol is a preset number of charging protocols determined from two or more charging protocols in descending order of priority.
本实施例提供的充电协议的确定装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。The device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
在上述实施例的基础上,可选的,上述装置还包括:执行模块,其中:On the basis of the foregoing embodiments, optionally, the foregoing apparatus further includes: an execution module, wherein:
执行模块,用于基于所述目标充电协议,执行与所述第二设备的充电过程。本实施例提供的充电协议的确定装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。An executing module, configured to execute a charging process with the second device based on the target charging protocol. The device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
在上述实施例的基础上,可选的,上述装置还包括:建立模块,其中:On the basis of the foregoing embodiments, optionally, the foregoing apparatus further includes: an establishment module, wherein:
建立模块,用于基于预设的标准通信协议,建立与第二设备间的通信连接。The establishment module is used to establish a communication connection with the second device based on a preset standard communication protocol.
可选的,目标充电协议为预设的标准通信协议。Optionally, the target charging protocol is a preset standard communication protocol.
本实施例提供的充电协议的确定装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。The device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
上述充电协议的确定装置中各个模块的划分仅仅用于举例说明,在其他实施例中,可将充电协议的确定装置按照需要划分为不同的模块,以完成上述充电协议的确定装置的全部或部分功能。The division of each module in the device for determining the charging protocol is only for illustration. In other embodiments, the device for determining the charging protocol can be divided into different modules according to needs, so as to complete all or part of the device for determining the charging protocol. Function.
关于充电协议的确定装置的具体限定可以参见上文中对于充电协议的确定方法的限定,在此不再赘述。上述充电协议的确定装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For specific limitations on the device for determining the charging protocol, refer to the above-mentioned limitations on the method for determining the charging protocol, which will not be repeated here. Each module in the above-mentioned device for determining the charging protocol may be implemented in whole or in part by software, hardware or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules.
本申请实施例中提供的充电协议的确定装置中的各个模块的实现可为计算机程序的形式。该计算机程序可在终端或服务器上运行。该计算机程序构成的程序模块可存储在电子设备的存储器上。该计算机程序被处理器执行时,实现本申请实施例中所描述方法的步骤。The implementation of each module in the device for determining the charging protocol provided in the embodiment of the present application may be in the form of a computer program. The computer program can run on a terminal or a server. The program modules constituted by the computer program can be stored in the memory of the electronic device. When the computer program is executed by the processor, the steps of the methods described in the embodiments of the present application are realized.
图5为一个实施例的充电协议的确定装置的结构框图。如图5所示,该充电协议的确定装置应用于第一设备,该充电协议的确定装置,包括:发送模块和接收模块,其中:Fig. 5 is a structural block diagram of an apparatus for determining a charging protocol according to an embodiment. As shown in FIG. 5, the device for determining the charging protocol is applied to the first device, and the device for determining the charging protocol includes: a sending module and a receiving module, wherein:
发送模块,用于向第二设备发送充电协议信息;充电协议信息包括第一设备支持的至少两种充电协议的标识;A sending module, configured to send charging protocol information to the second device; the charging protocol information includes identifications of at least two charging protocols supported by the first device;
接收模块,用于接收第二设备发送的目标充电协议的标识;目标充电协议为第二设备基于第一设备支持的至少两种充电协议和第二设备支持的充电协议确定的。The receiving module is configured to receive the identification of the target charging protocol sent by the second device; the target charging protocol is determined by the second device based on at least two charging protocols supported by the first device and the charging protocols supported by the second device.
可选的,第一设备为充电设备、第二设备为供电设备;或者,第一设备为供电设备、第二设备为充电设备。Optionally, the first device is a charging device, and the second device is a power supply device; or, the first device is a power supply device, and the second device is a charging device.
本实施例提供的充电协议的确定装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。The device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
在上述实施例的基础上,可选的,上述目标充电协议为第二设备与第一设备均支持的充电协议中的一者。On the basis of the foregoing embodiments, optionally, the foregoing target charging protocol is one of the charging protocols supported by both the second device and the first device.
本实施例提供的充电协议的确定装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。The device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
在上述实施例的基础上,可选的,上述装置还包括:执行模块,其中:On the basis of the foregoing embodiments, optionally, the foregoing apparatus further includes: an execution module, wherein:
执行模块,用于基于目标充电协议,执行与第二设备的充电过程。An execution module, configured to execute a charging process with the second device based on the target charging protocol.
本实施例提供的充电协议的确定装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。The device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
在上述实施例的基础上,可选的,上述装置还包括:建立模块,其中:On the basis of the foregoing embodiments, optionally, the foregoing apparatus further includes: an establishment module, wherein:
建立模块,用于基于预设的标准通信协议,建立与第二设备间的通信连接。The establishment module is used to establish a communication connection with the second device based on a preset standard communication protocol.
可选的,目标充电协议为预设的标准通信协议。Optionally, the target charging protocol is a preset standard communication protocol.
本实施例提供的充电协议的确定装置,可以执行上述方法实施例,其实现原理和技术效果类似,在此不再赘述。The device for determining the charging protocol provided in this embodiment can execute the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
上述充电协议的确定装置中各个模块的划分仅仅用于举例说明,在其他实施例中,可将充电协议的确定装置按照需要划分为不同的模块,以完成上述充电协议的确定装置的全部或部分功能。The division of each module in the device for determining the charging protocol is only for illustration. In other embodiments, the device for determining the charging protocol can be divided into different modules according to needs, so as to complete all or part of the device for determining the charging protocol. Function.
关于充电协议的确定装置的具体限定可以参见上文中对于充电协议的确定方法的限定,在此不再赘述。上述充电协议的确定装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For specific limitations on the device for determining the charging protocol, refer to the above-mentioned limitations on the method for determining the charging protocol, which will not be repeated here. Each module in the above-mentioned device for determining the charging protocol may be implemented in whole or in part by software, hardware or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules.
本申请实施例中提供的充电协议的确定装置中的各个模块的实现可为计算机程序的形式。该计算机程序可在终端或服务器上运行。该计算机程序构成的程序模块可存储在电子设备的存储器上。该计算机程序被处理器执行时,实现本申请实施例中所描述方法的步骤。The implementation of each module in the device for determining the charging protocol provided in the embodiment of the present application may be in the form of a computer program. The computer program can run on a terminal or a server. The program modules constituted by the computer program can be stored in the memory of the electronic device. When the computer program is executed by the processor, the steps of the methods described in the embodiments of the present application are realized.
图6为一个实施例中电子设备的内部结构示意图。该电子设备可以是手机、平板电脑、笔记本电脑、台式电脑、PDA(Personal DigitalAssistant,个人数字助理)、POS(Point ofSales,销售终端)、车载电脑、穿戴式设备等任意终端设备。该电子设备包括通过系统总线连接的处理器和存储器。其中,该处理器可以包括一个或多个处理单元。处理器可为CPU(Central ProcessingUnit,中央处理单元)或DSP(Digital Signal Processing,数字信号处理器)等。存储器可包括非易失性存储介质及内存储器。非易失性存储介质存储有操作系统和计算机程序。该计算机程序可被处理器所执行,以用于实现以下各个实施例所提供的一种充电协议的确定方法。内存储器为非易失性存储介质中的操作系统计算机程序提供高速缓存的运行环境。Fig. 6 is a schematic diagram of the internal structure of an electronic device in one embodiment. The electronic device can be any terminal device such as mobile phone, tablet computer, notebook computer, desktop computer, PDA (Personal Digital Assistant, personal digital assistant), POS (Point of Sales, sales terminal), vehicle-mounted computer, wearable device, etc. The electronic device includes a processor and memory connected by a system bus. Wherein, the processor may include one or more processing units. The processor can be a CPU (Central Processing Unit, central processing unit) or a DSP (Digital Signal Processing, digital signal processor), etc. The memory may include non-volatile storage media and internal memory. Nonvolatile storage media store operating systems and computer programs. The computer program can be executed by a processor, so as to implement a method for determining a charging protocol provided in the following embodiments. The internal memory provides a high-speed running environment for the operating system computer program in the non-volatile storage medium.
本申请实施例还提供了一种计算机可读存储介质。一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当计算机可执行指令被一个或多个处理器执行时,使得处理器执行充电协议的确定方法的步骤。The embodiment of the present application also provides a computer-readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the steps of the method for determining the charging protocol.
本申请实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行充电协议的确定方法。The embodiment of the present application also provides a computer program product containing instructions, which, when run on a computer, causes the computer to execute the method for determining the charging protocol.
本申请所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。非易失性存储器可包括ROM(Read-Only Memory,只读存储器)、PROM(Programmable Read-only Memory,可编程只读存储器)、EPROM(Erasable Programmable Read-Only Memory,可擦除可编程只读存储器)、EEPROM(Electrically Erasable Programmable Read-only Memory,电可擦除可编程只读存储器)或闪存。易失性存储器可包括RAM(RandomAccess Memory,随机存取存储器),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如SRAM(Static RandomAccess Memory,静态随机存取存储器)、DRAM(Dynamic RandomAccess Memory,动态随机存取存储器)、SDRAM(Synchronous Dynamic RandomAccess Memory,同步动态随机存取存储器)、双数据率DDR SDRAM(Double DataRate Synchronous Dynamic RandomAccess memory,双数据率同步动态随机存取存储器)、ESDRAM(Enhanced Synchronous Dynamic RandomAccess memory,增强型同步动态随机存取存储器)、SLDRAM(Sync LinkDynamic RandomAccess Memory,同步链路动态随机存取存储器)、RDRAM(Rambus Dynamic Random Access  Memory,总线式动态随机存储器)、DRDRAM(Direct Rambus Dynamic Random Access Memory,接口动态随机存储器)。Any reference to memory, storage, database, or other medium as used herein may include non-volatile and/or volatile memory. Non-volatile memory can include ROM (Read-Only Memory, read-only memory), PROM (Programmable Read-only Memory, programmable read-only memory), EPROM (Erasable Programmable Read-Only Memory, erasable programmable read-only memory) Memory), EEPROM (Electrically Erasable Programmable Read-only Memory, Electrically Erasable Programmable Read-only Memory) or flash memory. Volatile memory can include RAM (Random Access Memory, random access memory), which is used as an external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as SRAM (Static Random Access Memory, static random access memory), DRAM (Dynamic Random Access Memory, dynamic random access memory), SDRAM (Synchronous Dynamic Random Access Memory, synchronous dynamic Random access memory), double data rate DDR SDRAM (Double DataRate Synchronous Dynamic Random Access memory, double data rate synchronous dynamic random access memory), ESDRAM (Enhanced Synchronous Dynamic Random Access memory, enhanced synchronous dynamic random access memory), SLDRAM ( Sync LinkDynamic Random Access Memory, synchronous link dynamic random access memory), RDRAM (Rambus Dynamic Random Access Memory, bus dynamic random access memory), DRDRAM (Direct Rambus Dynamic Random Access Memory, interface dynamic random access memory).
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation modes of the present application, and the description thereof is relatively specific and detailed, but should not be construed as limiting the patent scope of the present application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the scope of protection of the patent application should be based on the appended claims.

Claims (21)

  1. 一种充电协议的确定方法,应用于第一设备,其特征在于,包括:A method for determining a charging protocol, applied to a first device, comprising:
    接收第二设备发送的充电协议信息;所述充电协议信息包括所述第二设备支持的至少两种充电协议的标识;Receive charging protocol information sent by the second device; the charging protocol information includes identifications of at least two charging protocols supported by the second device;
    基于所述第二设备支持的至少两种充电协议和所述第一设备支持的充电协议,确定目标充电协议;determining a target charging protocol based on at least two charging protocols supported by the second device and a charging protocol supported by the first device;
    将所述目标充电协议的标识发送给所述第二设备。Send the identifier of the target charging protocol to the second device.
  2. 根据权利要求1所述的方法,其特征在于,所述目标充电协议为所述第二设备与所述第一设备均支持的充电协议中的一者。The method according to claim 1, wherein the target charging protocol is one of the charging protocols supported by both the second device and the first device.
  3. 根据权利要求1或2所述的方法,其特征在于,The method according to claim 1 or 2, characterized in that,
    若所述第二设备与所述第一设备均支持的充电协议包括两种或两种以上,则将所述两种或两种以上的充电协议中,优先级最高的充电协议确定为所述目标充电协议。If the charging protocol supported by both the second device and the first device includes two or more than two charging protocols, the charging protocol with the highest priority among the two or more charging protocols is determined as the Target charging protocol.
  4. 根据权利要求1或2所述的方法,其特征在于,The method according to claim 1 or 2, characterized in that,
    若所述第二设备与所述第一设备均支持的充电协议包括两种或两种以上,则将所述两种或两种以上的充电协议中,充电功率最高的充电协议确定为所述目标充电协议。If the charging protocols supported by both the second device and the first device include two or more, then determine the charging protocol with the highest charging power among the two or more charging protocols as the Target charging protocol.
  5. 根据权利要求4所述的方法,其特征在于,The method according to claim 4, characterized in that,
    若所述第二设备与所述第一设备均支持的充电协议包括第一候选协议和第二候选协议,且所述第二候选协议的充电功率大于所述第一候选协议的充电功率与预设的功率增量之和,则将所述第二候选协议确定为所述目标充电协议。If the charging protocols supported by both the second device and the first device include a first candidate protocol and a second candidate protocol, and the charging power of the second candidate protocol is greater than the charging power of the first candidate protocol and the expected The sum of the preset power increments is used to determine the second candidate protocol as the target charging protocol.
  6. 根据权利要求1或2所述的方法,其特征在于,The method according to claim 1 or 2, characterized in that,
    若所述第二设备与所述第一设备均支持的充电协议包括两种或两种以上,将所述两种或两种以上的充电协议中优先级最高的第三候选充电协议确定为所述目标充电协议;所述第三候选充电协议为按照充电功率从大到小的顺序从所述两种或两种以上的充电协议中确定的预设数量的充电协议。If both the second device and the first device support two or more charging protocols, determine the third candidate charging protocol with the highest priority among the two or more charging protocols as the The target charging protocol; the third candidate charging protocol is a preset number of charging protocols determined from the two or more charging protocols in descending order of charging power.
  7. 根据权利要求1或2所述的方法,其特征在于,The method according to claim 1 or 2, characterized in that,
    若所述第二设备与所述第一设备均支持的充电协议包括两种或两种以上,将所述两种或两种以上的充电协议中充电功率最高的第四候选充电协议确定为所述目标充电协议;所述第四候选充电协议为按照优先级从高到低的顺序从所述两种或两种以上的充电协议中确定的预设数量的充电协议。If both the second device and the first device support two or more charging protocols, determine the fourth candidate charging protocol with the highest charging power among the two or more charging protocols as the The target charging protocol; the fourth candidate charging protocol is a preset number of charging protocols determined from the two or more charging protocols in descending order of priority.
  8. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    基于所述目标充电协议,执行与所述第二设备的充电过程。Based on the target charging protocol, a charging procedure with the second device is performed.
  9. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    基于预设的标准通信协议,建立与所述第二设备间的通信连接。Establishing a communication connection with the second device based on a preset standard communication protocol.
  10. 根据权利要求9所述的方法,其特征在于,所述目标充电协议为所述预设的标准通信协议。The method according to claim 9, wherein the target charging protocol is the preset standard communication protocol.
  11. 根据权利要求1所述的方法,其特征在于,所述第一设备为充电设备、所述第二设备为供电设备;或者,所述第一设备为供电设备、所述第二设备为充电设备。The method according to claim 1, wherein the first device is a charging device, and the second device is a power supply device; or, the first device is a power supply device, and the second device is a charging device .
  12. 一种充电协议的确定方法,应用于第一设备,其特征在于,包括:A method for determining a charging protocol, applied to a first device, comprising:
    向第二设备发送充电协议信息;所述充电协议信息包括第一设备支持的至少两种充电协议的标识;Sending charging protocol information to the second device; the charging protocol information includes identifications of at least two charging protocols supported by the first device;
    接收所述第二设备发送的目标充电协议的标识;所述目标充电协议为所述第二设备基于所述第一设备支持的至少两种充电协议和所述第二设备支持的充电协议确定的。Receive the identification of the target charging protocol sent by the second device; the target charging protocol is determined by the second device based on at least two charging protocols supported by the first device and the charging protocol supported by the second device .
  13. 根据权利要求12所述的方法,其特征在于,所述目标充电协议为所述第二设备与所述第一设备均支持的充电协议中的一者。The method according to claim 12, wherein the target charging protocol is one of the charging protocols supported by both the second device and the first device.
  14. 根据权利要求12所述的方法,其特征在于,所述方法还包括:The method according to claim 12, characterized in that the method further comprises:
    基于所述目标充电协议,执行与所述第二设备的充电过程。Based on the target charging protocol, a charging procedure with the second device is performed.
  15. 根据权利要求12所述的方法,其特征在于,所述方法还包括:The method according to claim 12, characterized in that the method further comprises:
    基于预设的标准通信协议,建立与所述第二设备间的通信连接。Establishing a communication connection with the second device based on a preset standard communication protocol.
  16. 根据权利要求15所述的方法,其特征在于,所述目标充电协议为所述预设的标准通信协议。The method according to claim 15, wherein the target charging protocol is the preset standard communication protocol.
  17. 根据权利要求12所述的方法,其特征在于,所述第一设备为充电设备、所述第二设备为供电设备;或者,所述第一设备为供电设备、所述第二设备为充电设备。The method according to claim 12, wherein the first device is a charging device, and the second device is a power supply device; or, the first device is a power supply device, and the second device is a charging device .
  18. 一种充电协议的确定装置,其特征在于,应用于第一设备,包括:A device for determining a charging protocol, which is applied to a first device, comprising:
    接收模块,用于接收第二设备发送的充电协议信息;所述充电协议信息包括所述第二设备支持的至少两种充电协议的标识;A receiving module, configured to receive charging protocol information sent by the second device; the charging protocol information includes identifications of at least two charging protocols supported by the second device;
    确定模块,用于基于所述第二设备支持的至少两种充电协议和所述第一设备支持的充电协议,确定目标充电协议;A determining module, configured to determine a target charging protocol based on at least two charging protocols supported by the second device and a charging protocol supported by the first device;
    发送模块,用于将所述目标充电协议的标识发送给所述第二设备。A sending module, configured to send the identifier of the target charging protocol to the second device.
  19. 一种充电协议的确定装置,其特征在于,应用于第一设备,包括:A device for determining a charging protocol, which is applied to a first device, comprising:
    发送模块,用于向第二设备发送充电协议信息;所述充电协议信息包括第一设备支持的至少两种充电协议的标识;A sending module, configured to send charging protocol information to the second device; the charging protocol information includes identifications of at least two charging protocols supported by the first device;
    接收模块,用于接收所述第二设备发送的目标充电协议的标识;所述目标充电协议为所述第二设备基于所述第一设备支持的至少两种充电协议和所述第二设备支持的充电协议确定的。The receiving module is configured to receive the identification of the target charging protocol sent by the second device; the target charging protocol is based on at least two charging protocols supported by the first device and the second device supported by the second device. determined by the charging protocol.
  20. 一种电子设备,包括存储器及处理器,所述存储器中储存有计算机程序,其特征在于,所述计算机程序被所述处理器执行时,使得所述处理器执行如权利要求1至17中任一项所述的充电协议的确定方法的步骤。An electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, wherein when the computer program is executed by the processor, the processor is made to execute any one of claims 1 to 17 The steps of a method for determining the charging protocol.
  21. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至17中任一项所述的方法的步骤。A computer-readable storage medium on which a computer program is stored, wherein the computer program implements the steps of the method according to any one of claims 1 to 17 when the computer program is executed by a processor.
PCT/CN2022/108791 2021-08-25 2022-07-29 Charging protocol determination method and apparatus, electronic device, and readable storage medium WO2023024824A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110984469.3 2021-08-25
CN202110984469.3A CN113690981A (en) 2021-08-25 2021-08-25 Charging protocol determination method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
WO2023024824A1 true WO2023024824A1 (en) 2023-03-02

Family

ID=78582713

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/108791 WO2023024824A1 (en) 2021-08-25 2022-07-29 Charging protocol determination method and apparatus, electronic device, and readable storage medium

Country Status (2)

Country Link
CN (1) CN113690981A (en)
WO (1) WO2023024824A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116526704A (en) * 2023-05-16 2023-08-01 湖南旭联科技有限公司 Multi-device self-adaptive wireless charging method, device, equipment and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113690981A (en) * 2021-08-25 2021-11-23 Oppo广东移动通信有限公司 Charging protocol determination method and device, electronic equipment and readable storage medium
CN117955206A (en) * 2021-12-08 2024-04-30 华为技术有限公司 Protocol information testing method, tester, storage medium and program product
CN114844180B (en) * 2022-07-01 2022-09-27 龙旗电子(惠州)有限公司 Charging method, device and equipment applied to electronic equipment and storage medium
CN115782658B (en) * 2022-11-22 2023-10-20 深圳市赛特新能科技有限公司 Multi-channel charging control method and system based on multiple charging standards

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101668315A (en) * 2009-10-12 2010-03-10 上海华为技术有限公司 Method and device for operating network elements of different protocol versions
US20180037128A1 (en) * 2016-08-03 2018-02-08 Proterra Inc. Multi-protocol charge port for an electric bus
CN111384738A (en) * 2018-12-29 2020-07-07 比亚迪汽车工业有限公司 Control method and device of charging protocol
CN112448435A (en) * 2019-09-03 2021-03-05 中兴通讯股份有限公司 Terminal equipment charging method and device and storage medium
CN113178906A (en) * 2021-04-13 2021-07-27 北京小米移动软件有限公司 Charging method, charging device, electronic device and storage medium
CN113690981A (en) * 2021-08-25 2021-11-23 Oppo广东移动通信有限公司 Charging protocol determination method and device, electronic equipment and readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101668315A (en) * 2009-10-12 2010-03-10 上海华为技术有限公司 Method and device for operating network elements of different protocol versions
US20180037128A1 (en) * 2016-08-03 2018-02-08 Proterra Inc. Multi-protocol charge port for an electric bus
CN111384738A (en) * 2018-12-29 2020-07-07 比亚迪汽车工业有限公司 Control method and device of charging protocol
CN112448435A (en) * 2019-09-03 2021-03-05 中兴通讯股份有限公司 Terminal equipment charging method and device and storage medium
CN113178906A (en) * 2021-04-13 2021-07-27 北京小米移动软件有限公司 Charging method, charging device, electronic device and storage medium
CN113690981A (en) * 2021-08-25 2021-11-23 Oppo广东移动通信有限公司 Charging protocol determination method and device, electronic equipment and readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116526704A (en) * 2023-05-16 2023-08-01 湖南旭联科技有限公司 Multi-device self-adaptive wireless charging method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN113690981A (en) 2021-11-23

Similar Documents

Publication Publication Date Title
WO2023024824A1 (en) Charging protocol determination method and apparatus, electronic device, and readable storage medium
US11310641B2 (en) Entitlement server connected eSIMS
EP3547727A1 (en) Bluetooth connection method, device and smart terminal
US11191111B2 (en) Bluetooth connection establishment method, device and system
WO2020248375A1 (en) Method and system for synchronizing data between databases, computer device and storage medium
WO2021164125A1 (en) Session creation method and related device
CN111355844B (en) Method and device for terminal application start management, terminal, USIM and storage medium
EP2823688B1 (en) Systems and methods for implementing a peer-to-peer connection
WO2021121407A1 (en) Capacity changing method and apparatus for virtual machine
US20160286594A1 (en) Method for establishing communications between peer devices, wireless communication device using the same and computer-readable medium
EP3409073B1 (en) Method and electronic device for providing tethering service
US10820187B2 (en) Electronic device for managing embedded subscriber identification module and method for same
CN110324193A (en) A kind of terminal upgrade management method and device
CN103701867A (en) Method, system and central server for processing call requests
WO2021012506A1 (en) Method and apparatus for realizing load balancing in speech recognition system, and computer device
WO2019201248A1 (en) Re-bootstrap method and device in lightweight machine to machine system
WO2017181465A1 (en) Access point name configuration method and device
WO2017088294A1 (en) Method and device for establishing wireless connection
EP2597900A1 (en) Mobile terminal and method thereof for accessing network
WO2016169079A1 (en) Mobile terminal wireless storage method and system
CN111966530A (en) Disaster recovery switching method and device for application system, computer equipment and storage medium
WO2023124264A1 (en) Method for establishing communication connection, terminal and storage medium
WO2017054405A1 (en) Bluetooth paging method and device
TW202203611A (en) Network device and method for cross carrier scheduling
KR20190093383A (en) Electronic device for installing a profile and method for the same

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22860170

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE