Determination Method, Device, Electronic Device and Readable Storage Medium for Charging Protocol

By receiving and analyzing the charging protocol information sent by the second device, the target charging protocol jointly supported by the first device and the second device are directly determined, which solves the problem of extended interaction time caused by multiple handshake failures in the traditional method, and achieves faster charging protocol determination.

CN113690981BActive Publication Date: 2025-06-17GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110984469.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-25
Publication Date
2025-06-17
Estimated Expiration
2041-08-25

AI Technical Summary

Technical Problem

The traditional fast charging protocol selection method can easily lead to multiple handshake failures and extend the interaction time before charging.

Method used

By receiving the charging protocol information sent by the second device, the target charging protocol is directly determined based on the multiple charging protocols supported by the first device and the second device, and the multiple protocol selection process is avoided.

Benefits of technology

Shorten the charging protocol selection time and reduce the interaction time between devices before charging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113690981B_ABST
    Figure CN113690981B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to a method, apparatus, electronic device, and readable storage medium for determining a charging protocol. The method is applied to a first device, and the method includes: receiving charging protocol information sent by a second device; the charging protocol information includes identifiers of at least two charging protocols supported by the second device; determining a target charging protocol based on the at least two charging protocols supported by the second device and the charging protocols supported by the first device; and sending an identifier of the target charging protocol to the second device. By using this method, multiple selections of the target charging protocol are avoided, thereby shortening the selection time of the charging protocol by the first charging device and reducing the interaction time before charging between the first device and the second device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of charging technologies, and particularly to a method, apparatus, electronic device, and readable storage medium for determining a charging protocol. Background Art

[0002] With the development of fast charging technologies, existing charging devices and power supply devices can both support multiple fast charging protocols. When a charging device detects a signal from a power supply device, it can attempt to handshake with the power supply device using one of the fast charging protocols. If the handshake is successful, fast charging is performed; if the handshake fails, another fast charging protocol is selected and an attempt is made to handshake with the power supply device using that protocol; and so on, until a handshake is achieved based on a certain fast charging protocol or all supported protocols have failed handshakes.

[0003] However, traditional methods for selecting fast charging protocols are prone to multiple fast charging protocol handshake failures, thereby prolonging the interaction time before charging. Summary of the Invention

[0004] Embodiments of this application provide a method, apparatus, electronic device, and computer-readable storage medium for determining a charging protocol, which can reduce the interaction time before charging.

[0005] In a first aspect, a method for determining a charging protocol is provided, which is applied to a first device and includes:

[0006] Receiving charging protocol information sent by a second device; the charging protocol information includes identifiers of at least two charging protocols supported by the second device;

[0007] Determining a target charging protocol based on at least two charging protocols supported by the second device and the charging protocols supported by the first device;

[0008] Sending an identifier of the target charging protocol to the second device.

[0009] In a second aspect, a method for determining a charging protocol is provided, which is applied to a first device and includes:

[0010] Sending charging protocol information to a second device; the charging protocol information includes identifiers of at least two charging protocols supported by the first device;

[0011] Receiving 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.

[0012] In a third aspect, a device for determining a charging protocol is provided, which is applied to a first device and includes:

[0013] A receiving module, configured to receive charging protocol information sent by a second device; the charging protocol information includes identifiers of at least two charging protocols supported by the second device;

[0014] A determining module, configured to determine a target charging protocol based on at least two charging protocols supported by the second device and the charging protocols supported by the first device;

[0015] A sending module, configured to send the identifier of the target charging protocol to the second device.

[0016] In a fourth aspect, a device for determining a charging protocol is provided, which is applied to a first device and includes:

[0017] A sending module, configured to send charging protocol information to a second device; the charging protocol information includes identifiers of at least two charging protocols supported by the first device;

[0018] A receiving module, configured to receive the identifier 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.

[0019] In a fifth aspect, an electronic device is provided, which includes a memory and a processor. A computer program is stored in the memory. When the computer program is executed by the processor, the processor is caused to execute the steps of the method for determining a charging protocol as described in the first aspect and the second aspect.

[0020] In a sixth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method as described in the first aspect and the second aspect are implemented.

[0021] In the above method, device, electronic device, and readable storage medium for determining a charging protocol, 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 identifiers of at least two charging protocols supported by the second device, it is equivalent to the second device sending multiple charging protocols to the first device at one time. 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, avoiding the process of selecting a charging protocol multiple times, thereby shortening the time for the first device to select a charging protocol and reducing the interaction time before charging between the first device and the second device. Description of the Drawings

[0022] 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 required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0023] Figure 1 It is an application environment diagram of the method for determining the charging protocol in an embodiment;

[0024] Figure 2 It is a flowchart of the method for determining the charging protocol in an embodiment;

[0025] Figure 3 It is a flowchart of the method for determining the charging protocol in another embodiment;

[0026] Figure 4 It is a structural block diagram of the device for determining the charging protocol in an embodiment;

[0027] Figure 5 It is a structural block diagram of the device for determining the charging protocol in an embodiment;

[0028] Figure 6 It is an internal structure diagram of an electronic device in an embodiment. Detailed implementation manners

[0029] In order to make the objectives, technical solutions and advantages of the present application clearer, the following further details the present application in conjunction with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0030] It can be understood that the terms "first", "second", etc. used in the present application can be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element. For example, without departing from the scope of the present application, the first client can be called the second client, and similarly, the second client can be called the first client. Both the first client and the second client are clients, but they are not the same client.

[0031] Figure 1 It is a schematic diagram of the application environment of the method for determining the charging protocol in an embodiment. As Figure 1As shown in the figure, the application environment includes a first device 102 and a second device 104. Among them, the first device 102 can be a charging device, and the second device 104 can be a power supply device. Or, the first device 102 is a power supply device, and 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 that both support from the multiple charging protocols they both support 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, a watch, etc.

[0032] Figure 2 It 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 Figure 1 as an example. As Figure 2 shown, the method for determining the charging protocol includes:

[0033] S201, receiving charging protocol information sent by the second device; the charging protocol information includes identifiers of at least two charging protocols supported by the second device.

[0034] Among them, the identifiers of at least two charging protocols supported by the second device can be the names of the charging protocols supported by the second device, the codes of the charging protocols supported by the second device, or the names of the manufacturers to which the charging protocols supported by the second device belong, etc., which are not limited in the embodiments of the present application. In this embodiment, after the first device and the second device establish a communication connection, the second device can send the charging protocol information including the identifiers of at least two charging protocols supported by itself to the first device. For example, if the charging protocols supported by the second device include three protocols: charging protocol A, charging protocol B, and charging protocol C, the second device will carry the identifier of charging protocol A, the identifier of charging protocol B, and the identifier of charging protocol C in the charging protocol information and send it to the first device. It should be noted that at least two charging protocols supported by the second device may be charging protocols belonging to different manufacturers or charging protocols corresponding to different charging powers. Optionally, the first device can be 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.

[0035] S202, determining a target charging protocol based on at least two charging protocols supported by the second device and the charging protocols supported by the first device.

[0036] In this embodiment, after the first device receives the charging protocol information sent by the second device, it may determine one of the charging protocols jointly supported by the first device and the second device as the target charging protocol, that is, determine one of the multiple charging protocols that are the same among at least two charging protocols supported by the second device and the charging protocols supported by the first device as the target charging protocol. Alternatively, it may also be to determine multiple charging protocols jointly supported by the first device and the second device, and then select one of them as the target charging protocol according to some selection mechanisms. For example, determine the target charging protocol according to the priority order of the jointly supported charging protocols, or determine the target charging protocol according to the rated power of the jointly supported charging protocols, and so on.

[0037] Exemplarily, continuing with the example where the charging protocols supported by the second device include three protocols: 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. After the first device receives the charging protocol information sent by the second device, it determines that charging protocol A and charging protocol C are the charging protocols jointly supported by both. Then, it determines the target charging protocol from protocol A and protocol C. Optionally, the target charging protocol determined by the first device can be protocol A or protocol C. It can be understood that the target charging protocol determined by the first device can be the charging protocol with the highest priority among the charging protocols supported by the first device and the second device, or it can also be the charging protocol with the largest charging power among the charging protocols supported by the first device and the second device. The embodiments of the present application do not impose any restrictions.

[0038] S203, send the identifier of the target charging protocol to the second device.

[0039] In this embodiment, after the first device determines the target charging protocol, it sends the identifier of the target charging protocol to the second device. Continuing with the example where the charging protocols supported by the second device include three protocols: protocol A, protocol B, and protocol C, and the charging protocols supported by the second device include protocol A and protocol C. If the target charging protocol determined by the first device is protocol A, then the first device sends the identifier of protocol A to the second device; if the target charging protocol determined by the first device is protocol C, then the first device sends the identifier of protocol C to the second device.

[0040] After the second device receives the identifier of the target charging protocol, the first device executes the 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, then 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, then the second device charges the first device according to the target charging protocol.

[0041] 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 the identifiers of at least two charging protocols supported by the second device, it is equivalent to the second device sending multiple charging protocols to the first device at one time. The first device can directly determine the target charging protocol based on the multiple charging protocols supported by the second device and its own supported charging protocols, avoiding 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 before charging between the first device and the second device.

[0042] In the scenario of determining the target charging protocol based on at least two charging protocols supported by the second device and the charging protocols supported by the first device, when both the first device and the second device support multiple charging protocols, there may be a situation where the first device determines multiple mutually supported charging protocols based on at least two charging protocols supported by the second device and the charging protocols supported by the first device. For this scenario, in the embodiments of the present application, the above-mentioned target charging protocol is one of the charging protocols supported by both the second device and the first device.

[0043] In this embodiment, after determining the target charging protocol, the first device executes the charging process with the second device based on the target charging protocol. The charging process is that the power supply device supplies power to the charging device according to the target charging protocol. The charging protocol can stipulate authentication, communication timing, message format, data packet format, charging exception handling, etc. between the power supply device and the charging device. For example, during the charging process where the power supply device and the charging device execute 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 accordance with the corresponding message format according to the target charging protocol. The charging device selects the voltage / current according to its own needs and then sends feedback information to the power supply device, and the power supply device outputs the charging voltage / current to the charging device for charging according to the voltage / current.

[0044] 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 both the second device and the first device is determined as the target charging protocol. Optionally, the charging protocols supported by both the second device and the first device may be charging protocols with the same identifier, or charging protocols with the same charging power, or charging protocols with the same charging current, etc., which are not limited in the embodiments of the present application. 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. Among them, charging protocol A supported by the second device and charging protocol A supported by the first device have the same protocol identifier, and charging protocol C supported by the second device and charging protocol C supported by the first device have the same protocol identifier. Then, the first device determines charging protocol A and charging protocol C as the charging protocols supported by both the second device and the first device. Further, optionally, the first device may determine one of the charging protocols supported by both the second device and the first device as the target charging protocol according to the priority of the charging protocols supported by both the second device and the first device, or may also determine one of the charging protocols supported by both the second device and the first device as the target charging protocol 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 higher than that of charging protocol C, the first device determines charging protocol A as the target charging protocol. Or, if the charging power of charging protocol A is higher than that of charging protocol C, the first device determines charging protocol A as the target charging protocol.

[0045] In this embodiment, the target charging protocol is one of the charging protocols supported by both the second device and the first device. By determining one of the charging protocols supported by both the second device and the first device as the target charging protocol, the reliability of determining the target charging protocol is improved.

[0046] In the scenario of determining the target charging protocol based on at least two charging protocols supported by the second device and the charging protocols supported by the first device as described above, there are two or more charging protocols supported by both the second device and the first device. The first device may determine the target charging protocol based on the priority of two or more charging protocols supported by both the second device and the first device, or may also determine the target charging protocol based on the charging power of two or more charging protocols supported by both the second device and the first device. The process of the first device determining the target charging protocol based on two or more charging protocols supported by both the second device and the first device will be described in detail below:

[0047] First, if the charging protocols supported by both the second device and the first device include two or more, then the charging protocol with the highest priority among the two or more charging protocols is determined as the target charging protocol.

[0048] In this embodiment, if the first device determines that the charging protocols supported by both the second device and the first device include two or more, the first device determines the target charging protocol according to the priorities of the charging protocols supported by both the second device and the first device. 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 above-mentioned target charging protocol. Continuing with the example where 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 charging protocols supported by both the second device and the first device are charging protocol A and charging protocol C. If the priority of the charging protocols is charging protocol A > charging protocol C, then the first device determines charging protocol A as the above-mentioned target charging protocol.

[0049] In this embodiment, the process by which 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 is very simple, thus shortening the time for the first device to select a charging protocol. Moreover, the selected target charging protocol is better.

[0050] Second, if the charging protocols supported by both the second device and the first device include two or more, then the charging protocol with the highest charging power among the two or more charging protocols is determined as the target charging protocol:

[0051] In this embodiment, if the first device determines that the charging protocols supported by both the second device and the first device include two or more, the first device determines the target charging protocol according to the charging powers of the charging protocols supported by both the second device and the first device. 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 above-mentioned target charging protocol. Continuing with the example where 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 charging protocols supported by both the second device and 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, then the first device determines charging protocol C as the target charging protocol.

[0052] 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 where the second device sends the charging protocol information to the first device as described above, the charging protocol information sent by the second device may include the charging power of each charging protocol supported by the second device, or may include the level of the charging power of each charging protocol supported by the second device.

[0053] In this embodiment, the process for the first device to determine the target charging protocol as the charging protocol with the highest charging power among two or more charging protocols supported by both the second device and the first device is very simple, thus shortening the time for the first device to select the charging protocol.

[0054] In the above scenario where if the charging protocols supported by both the second device and the first device include two or more, the first device determines the target charging protocol as the charging protocol with the highest charging power among two or more charging protocols supported by both 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. Among them, the first candidate protocol and the second candidate protocol are charging protocols owned by different manufacturers. Then, 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 power of the second candidate protocol is greater than the sum of the charging power of the first candidate protocol and a preset power increment, then the second candidate protocol is determined as the target charging protocol.

[0055] 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 proprietary protocol of the operator, 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 the preset power increment to obtain the corrected power of the first candidate protocol. For example, the preset power increment may be 20. Then the first device may sum the charging power of the first candidate protocol and 20 to obtain the corrected power of the first candidate protocol, and compare the charging power of the second candidate protocol with the corrected power of the first candidate protocol. If the first device determines that the charging power of the second candidate protocol is greater than the corrected power of the first candidate protocol, then the first device determines the second candidate protocol as 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 indicates that the charging power of the second candidate protocol is the maximum power, so the second candidate protocol is determined as the target charging protocol to ensure the accuracy of the determined target charging protocol.

[0056] In this embodiment, 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 sum of the charging power of the first candidate protocol and a preset power increment, the first device determines the second candidate protocol as the target charging protocol, making the scenario adaptability of this protocol selection method more flexible.

[0057] Scenario 3: If the charging protocols supported by both the second device and the first device include two or more, the first device can use the following two methods to determine the target charging protocol. The following separately describes these two methods for determining the target charging protocol:

[0058] 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 the two or more charging protocols in descending order of charging power.

[0059] In this embodiment, if the first device determines that the charging protocols supported by both the second device and the first device include two or more, after receiving the charging protocol information sent by the second device, the first device determines a preset number of charging protocols from the two or more charging protocols supported by both the second device and the first device in descending order of charging power according to the charging power of the charging protocols supported by the second device in the charging protocol information. For example, if the 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 power of charging protocol A in the charging protocol information sent by the second device received by the first device 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 protocols, and then determines the third candidate charging protocol with the highest priority as the target charging protocol. For example, if the determined third candidate charging protocols are 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. Another example, if the determined third candidate charging protocols are 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, then the first device can determine charging protocol A as the target charging protocol.

[0060] 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 of the charging protocols supported by both, and quickly determine a preset number of third candidate charging protocols from them. In this way, the first device can quickly determine the third candidate charging protocol with the highest priority as the target charging protocol. Since the determined target charging protocol is the third candidate charging protocol with the highest priority, both 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 scenario.

[0061] 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 the two or more charging protocols in the order of priority from high to low.

[0062] In this embodiment, if the first device determines that the charging protocols supported by both the second device and the first device include two or more, after receiving the charging protocol information sent by the second device, the first device determines a preset number of charging protocols from the charging protocols supported by both the second device and the first device that include two or more in the order of priority from high to low according to the priority of the charging protocols supported by the second device in the charging protocol information. For example, if the charging protocols supported by both the second device and the first device that include two or more are charging protocol A, charging protocol C, and charging protocol D, and the first device receives that the priority of charging protocol A in the charging protocol information sent by the second device is higher than the priority of charging protocol C, and the priority of charging protocol C is higher than the priority of charging protocol D, then the first device determines charging protocol A and charging protocol C as the fourth candidate charging protocols, and then determines the fourth candidate charging protocol with the highest charging power as the target charging protocol. For example, if the determined fourth candidate charging protocols are 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. Another example is that the determined fourth candidate charging protocols are 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 can determine charging protocol A as the target charging protocol.

[0063] 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 priorities of the charging protocols supported by both, and quickly determine a preset number of fourth candidate charging protocols from them. In this way, the first device can quickly determine the fourth candidate charging protocol with the maximum charging power as the target charging protocol. Since the determined target charging protocol is the fourth candidate charging protocol with the maximum charging power, both 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 scenario.

[0064] 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: establishing a communication connection with the second device based on a preset standard communication protocol.

[0065] Among them, the preset standard communication protocol can be a communication protocol supported by both the first device and the second device, or a charging protocol supported by both the first device and the second device. Optionally, the first device can send a handshake request to the second device. After receiving the handshake request from the first device, the second device sends a response message to establish a communication connection with the second device. It can also be that the second device sends a handshake request to the first device. After receiving the handshake request sent by the second device, the first device sends a response message to establish a communication connection with the first device. Optionally, the above target charging protocol can be the preset standard communication protocol. It can be understood that if the first device and the second device can communicate based on the preset standard communication protocol, indicating that the standard communication protocol supports the communication of both the first device and the second device charging devices, then the above preset standard communication protocol can be directly used as the target charging protocol.

[0066] In this embodiment, the process of the first device establishing a communication connection with the second device based on the preset standard communication protocol is very simple, and it can quickly establish a communication connection between the first device and the second device, facilitating the subsequent negotiation of charging protocols between the first device and the second device.

[0067] For the convenience of those skilled in the art to understand, the following will introduce in detail the method for determining the charging protocol provided by this application in combination with a complete embodiment:

[0068] S1. Establish a communication connection with the second device based on a preset standard communication protocol.

[0069] S2. Receive 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.

[0070] S3, if the charging protocols supported by both the second device and the first device include two or more, then execute step S4 or step S5 or step S6 or step S7 or step S8;

[0071] S4, determine the charging protocol with the highest priority among the two or more charging protocols as the target charging protocol.

[0072] S5, 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.

[0073] S6, 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 sum of the charging power of the first candidate protocol and a preset power increment, then determine the second candidate protocol as the target charging protocol.

[0074] 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 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.

[0075] 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 fourth candidate charging protocol is a preset number of charging protocols determined from the two or more charging protocols in descending order of priority.

[0076] S9, based on the target charging protocol, execute the charging process with the second device.

[0077] 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.

[0078] It should be noted that for the descriptions in S1 - S9 above, reference can be made to the relevant descriptions in the above embodiments, and the effects are similar, so they will not be elaborated here in this embodiment.

[0079] Figure 3 It 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 Figure 1 as an example. As Figure 3 shown, the method for determining the charging protocol includes:

[0080] S301. Send charging protocol information to the second device; the charging protocol information includes the identifiers of at least two charging protocols supported by the first device.

[0081] Among them, the identifiers of at least two charging protocols supported by the first device can be the names of the charging protocols supported by the first device, or the codes of the charging protocols supported by the first device, or the names of the manufacturers to which the charging protocols supported by the first device belong, etc., which are not limited in the embodiments of the present application. In this embodiment, after the first device and the second device establish a communication connection, the first device can send the charging protocol information including the identifiers of at least two charging protocols supported by itself to the second device. For example, if the charging protocols supported by the first device include three protocols: charging protocol A, charging protocol B, and charging protocol C, then the first device sends the identifier of charging protocol A, the identifier of charging protocol B, and the identifier of charging protocol C in the charging protocol information to the second device. It should be noted that at least two charging protocols supported by the first device may be charging protocols belonging to different manufacturers, or charging protocols corresponding to different charging powers. Optionally, the first device can be a charging device and the second device can be a power supply device, or the first device can be a power supply device and the second device can be a charging device.

[0082] S302. Receive the identifier 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.

[0083] In this embodiment, after the second device determines the target charging protocol, it sends the identifier of the target charging protocol to the first device, and the first device receives the identifier of the target charging protocol sent by the second device, where the identifier of 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. Continuing with the example where the charging protocols supported by the first device include three protocols: protocol A, protocol B, and protocol C, and the charging protocols supported by the second device include protocol A and protocol C, if the target charging protocol determined by the second device is protocol A, then the second device sends the identifier of protocol A to the first device, and the first device receives the identifier of protocol A sent by the second device; if the target charging protocol determined by the second device is protocol C, then the second device sends the identifier of protocol C to the first device, and the first device receives the identifier of protocol C sent by the second device.

[0084] Optionally, after receiving the charging protocol information sent by the first device, the second device may determine one of the charging protocols jointly supported by the first device and the second device as the target charging protocol. That is, the second device may determine one charging protocol as the target charging protocol from multiple identical charging protocols among at least two charging protocols supported by the first device and the charging protocols supported by the second device. Alternatively, it may also be that the second device determines multiple charging protocols jointly supported by the first device and the second device, and then selects one of them as the target charging protocol according to some selection mechanisms. For example, the second device may determine the target charging protocol according to the priority order of the jointly supported charging protocols, or the second device may determine the target charging protocol according to the rated power of the jointly supported charging protocols, and so on. Optionally, as an implementable manner, 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 priority among the two or more charging protocols as the target charging protocol. Or, 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; further, 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 sum of the charging power of the first candidate protocol and a preset power increment, the second device may determine the second candidate protocol as the target charging protocol. Or, if the charging protocols supported by both the second device and the first device include two or more, the second device may determine the third candidate charging protocol with the highest priority among the two or more charging protocols as the target charging protocol; where 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. Or, if the charging protocols supported by both the second device and the first device include two or more, the second device may determine the fourth candidate charging protocol with the highest charging power among the two or more charging protocols as the target charging protocol; where 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.

[0085] After receiving the identifier of the target charging protocol, the first device executes the 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 charges the first device according to the target charging protocol.

[0086] 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 the identifiers of at least two charging protocols supported by the first device, it is equivalent to the first device sending multiple charging protocols to the second device at one time. 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 before charging between the first device and the second device.

[0087] In the scenario of the charging protocol information sent by the first device to the second device described above, 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: establishing a communication connection with the second device based on a preset standard communication protocol.

[0088] Among them, the preset standard communication protocol can be a communication protocol supported by both the first device and the second device, or a charging protocol supported by both the first device and the second device. Optionally, it can be that the first device sends a handshake request to the second device. After receiving the handshake request from the first device, the second device sends a response message to establish a communication connection with the second device. It can also be that the second device sends a handshake request to the first device. After receiving the handshake request sent by the second device, the first device sends a response message to establish a communication connection with the first device. Optionally, the above target charging protocol can be the preset standard communication protocol. It can be understood that if the first device and the second device can communicate based on the preset standard communication protocol, indicating that this standard communication protocol supports the communication of both the first device and the second device charging devices, then the above target charging protocol can be directly used as the preset standard communication protocol.

[0089] In this embodiment, the process for the first device to establish a communication connection with the second device based on the preset standard communication protocol is very simple and can quickly establish a communication connection between the first device and the second device, facilitating the subsequent negotiation of the charging protocol between the first device and the second device.

[0090] For the convenience of those skilled in the art to understand, the following introduces in detail the method for determining the charging protocol provided by this application in combination with a complete embodiment:

[0091] S10. Establish a communication connection with the second device based on a preset standard communication protocol.

[0092] S20. Send charging protocol information to the second device; the charging protocol information includes the identifiers of at least two charging protocols supported by the first device.

[0093] S30. Receive the identifier 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 target charging protocol is one of the charging protocols supported by both the second device and the first device.

[0094] S40. Perform the charging process with the second device based on the target charging protocol.

[0095] Optionally, the target charging protocol is a preset standard communication protocol.

[0096] 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.

[0097] It should be noted that for the descriptions in S10 - S40 above, reference can be made to the relevant descriptions in the above embodiments, and their effects are similar. Therefore, they will not be elaborated in this embodiment.

[0098] It should be understood that although Figures 2 to 3 the steps in the flowchart are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this document, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, Figures 2 to 3 at least a part of the steps in

[0099] Figure 4 can include multiple sub - steps or multiple stages. These sub - steps or stages are not necessarily executed at the same moment, but can be executed at different moments. The execution order of these sub - steps or stages is not necessarily sequential either, but can be executed alternately or in turn with at least a part of other steps or sub - steps or stages of other steps. Figure 4 As shown in

[0100] The charging protocol determination device is applied to the first device. The charging protocol determination device includes: a receiving module, a determining module, and a sending module, where:

[0101] The receiving module is configured to receive 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.

[0102] The determining module is configured to determine the target charging protocol based on at least two charging protocols supported by the second device and the charging protocols supported by the first device.

[0103] 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.

[0104] The charging protocol determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.

[0105] Based on the above embodiment, optionally, the target charging protocol is one of the charging protocols supported by both the second device and the first device.

[0106] The charging protocol determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.

[0107] Based on the above embodiment, optionally, if the charging protocols supported by both the second device and the first device include two or more, then the charging protocol with the highest priority among the two or more charging protocols is determined as the target charging protocol.

[0108] The charging protocol determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.

[0109] Based on the above embodiment, optionally, if the charging protocols supported by both the second device and the first device include two or more, then the charging protocol with the highest charging power among the two or more charging protocols is determined as the target charging protocol.

[0110] The charging protocol determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.

[0111] Based on the above embodiment, optionally, 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 sum of the charging power of the first candidate protocol and a preset power increment, then the second candidate protocol is determined as the target charging protocol.

[0112] The charging protocol determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.

[0113] Based on the above embodiment, optionally, if the charging protocols supported by both the second device and the first device include two or more, the third candidate 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 the two or more charging protocols in descending order of charging power.

[0114] The charging protocol determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0115] Based on the above embodiment, optionally, if the charging protocols supported by both the second device and the first device include two or more, the fourth candidate 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 the two or more charging protocols in the order of decreasing priority.

[0116] The charging protocol determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0117] Based on the above embodiment, optionally, the above device further includes: an execution module, where:

[0118] The execution module is used to execute the charging process with the second device based on the target charging protocol. The charging protocol determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0119] Based on the above embodiment, optionally, the above device further includes: a establishment module, where:

[0120] The establishment module is used to establish a communication connection with the second device based on a preset standard communication protocol.

[0121] Optionally, the target charging protocol is a preset standard communication protocol.

[0122] The charging protocol determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0123] The division of each module in the above charging protocol determination device is only for illustration. In other embodiments, the charging protocol determination device can be divided into different modules as needed to complete all or part of the functions of the above charging protocol determination device.

[0124] For the specific limitations of the charging protocol determination device, reference can be made to the limitations of the charging protocol determination method in the above text, which will not be elaborated here. Each module in the above charging protocol determination device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.

[0125] In the embodiments of the present application, the implementation of each module in the charging protocol determination device can be in the form of a computer program. This computer program can run on a terminal or a server. The program module constituted by this computer program can be stored in the memory of the electronic device. When this computer program is executed by a processor, the steps of the method described in the embodiments of the present application are implemented.

[0126] Figure 5 It is a structural block diagram of a charging protocol determination device for an embodiment. As Figure 5 shown, this charging protocol determination device is applied to a first device. This charging protocol determination device includes: a sending module and a receiving module, where:

[0127] The sending module is used to send charging protocol information to a second device; the charging protocol information includes the identifiers of at least two charging protocols supported by the first device;

[0128] The receiving module is used to receive the identifier 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.

[0129] 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.

[0130] The charging protocol determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0131] Based on the above embodiment, optionally, the above target charging protocol is one of the charging protocols supported by both the second device and the first device.

[0132] The charging protocol determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0133] Based on the above embodiment, optionally, the above device further includes: an execution module, where:

[0134] The execution module is used to execute the charging process with the second device based on the target charging protocol.

[0135] The charging protocol determination device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0136] Based on the above embodiment, optionally, the above device further includes: a establishing module, where:

[0137] A establishing module, configured to establish a communication connection with a second device based on a preset standard communication protocol.

[0138] Optionally, the target charging protocol is a preset standard communication protocol.

[0139] The charging protocol determination device provided in this embodiment can execute the above method embodiments, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0140] The division of each module in the above charging protocol determination device is only for illustrative purposes. In other embodiments, the charging protocol determination device can be divided into different modules as needed to complete all or part of the functions of the above charging protocol determination device.

[0141] For the specific limitations of the charging protocol determination device, reference can be made to the limitations on the charging protocol determination method in the above text, which will not be elaborated here. Each module in the above charging protocol determination device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0142] In the embodiments of the present application, the implementation of each module in the charging protocol determination device can be in the form of a computer program. This computer program can run on a terminal or a server. The program module constituted by this computer program can be stored on the memory of the electronic device. When this computer program is executed by the processor, the steps of the method described in the embodiments of the present application are implemented.

[0143] Figure 6Schematic diagram of the internal structure of an electronic device in an embodiment. The electronic device may be any terminal device such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), an in-vehicle computer, a wearable device, etc. The electronic device includes a processor and a memory connected through a system bus. Among them, the processor may include one or more processing units. The processor may be a CPU (Central Processing Unit) or a DSP (Digital Signal Processing), etc. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by the processor to implement a method for determining a charging protocol provided in each of the following embodiments. The internal memory provides a high-speed cache operating environment for the operating system computer program in the non-volatile storage medium.

[0144] An embodiment of the present application also provides a computer-readable storage medium. One or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, cause the processors to execute the steps of the method for determining a charging protocol.

[0145] An 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 a charging protocol.

[0146] Any reference to memory, storage, database, or other media used in this application may include non-volatile and / or volatile memory. Non-volatile memory may include ROM (Read-Only Memory), PROM (Programmable Read-only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-only Memory), or flash memory. Volatile memory may include RAM (Random Access Memory), which serves as an external cache. By way of illustration and not limitation, RAM is available in various forms, such as SRAM (Static Random Access Memory), DRAM (Dynamic Random Access Memory), SDRAM (Synchronous Dynamic Random Access Memory), double data rate DDR SDRAM (Double Data Rate Synchronous Dynamic Random Access memory), ESDRAM (Enhanced Synchronous Dynamic Random Access memory), SLDRAM (Sync Link Dynamic Random Access Memory), RDRAM (Rambus Dynamic Random Access Memory), DRDRAM (Direct Rambus Dynamic Random Access Memory).

[0147] The above-described embodiments merely represent several implementation manners of this application. Their descriptions are relatively specific and detailed, but should not be construed as limiting the patent scope of this application. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all fall within the protection scope of this application. Therefore, the protection scope of the patent of this application shall be subject to the appended claims.

Claims

1. A method for determining a charging protocol, applied to a first device, characterized in that, including: receiving charging protocol information sent by a second device; the charging protocol information includes identifiers of at least two charging protocols supported by the second device; the identifiers of at least two charging protocols supported by the second device include any one of the name of the charging protocol, the code of the charging protocol, and the name of the manufacturer to which the charging protocol belongs; determining multiple charging protocols jointly supported by the first device and the second device from the at least two charging protocols supported by the second device and the charging protocols supported by the first device, and determining a target charging protocol based on the priorities of the multiple charging protocols or the charging powers of the multiple charging protocols; sending an identifier of the target charging protocol to the second device.

2. The method according to claim 1, characterized in that, The target charging protocol is one of the charging protocols supported by both the second device and the first device.

3. The method according to claim 1 or 2, characterized in that, If there are two or more charging protocols supported by both the second device and the first device, the charging protocol with the highest priority among the two or more charging protocols is determined as the target charging protocol.

4. The method according to claim 1 or 2, characterized in that, If there are two or more charging protocols supported by both the second device and the first device, the charging protocol with the highest charging power among the two or more charging protocols is determined as the target charging protocol.

5. 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 sum of the charging power of the first candidate protocol and a preset power increment, the second candidate protocol is determined as the target charging protocol.

6. The method according to claim 1 or 2, characterized in that, If there are two or more charging protocols supported by both the second device and the first device, the third candidate 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 the two or more charging protocols in descending order of charging power.

7. The method according to claim 1 or 2, characterized in that, If there are two or more charging protocols supported by both the second device and the first device, the fourth candidate 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 the two or more charging protocols in descending order of priority.

8. The method according to claim 1, characterized in that, The method further includes: performing a charging process with the second device based on the target charging protocol.

9. The method according to claim 1, characterized in that, The method further includes: establishing a communication connection with the second device based on a preset standard communication protocol.

10. The method according to claim 9, characterized in that, The target charging protocol is the preset standard communication protocol.

11. The method according to claim 1, characterized in that, 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, characterized in that, including: sending charging protocol information to a second device; the charging protocol information includes identifiers of at least two charging protocols supported by the first device; The identification of at least two charging protocols supported by the first device includes any one of the name of the charging protocol, the encoding of the charging protocol, and the name of the manufacturer to which the charging protocol belongs. Receive the identification of the target charging protocol sent by the second device; the target charging protocol is determined by the second device from at least two charging protocols supported by the first device and the charging protocols supported by the second device, and is determined based on the priority of the multiple charging protocols or the charging power of the multiple charging protocols.

13. The method according to claim 12, characterized in that, The target charging protocol is one of the charging protocols supported by both the second device and the first device.

14. The method according to claim 12, characterized in that, The method further includes: Based on the target charging protocol, execute the charging process with the second device.

15. The method according to claim 12, wherein The method further includes: Based on a preset standard communication protocol, establish a communication connection with the second device.

16. The method according to claim 15, wherein The target charging protocol is the preset standard communication protocol.

17. 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. An apparatus for determining a charging protocol, wherein Applied to a first device, it includes: A receiving module, configured to receive charging protocol information sent by a second device; the charging protocol information includes the identification of at least two charging protocols supported by the second device; the identification of at least two charging protocols supported by the second device includes any one of the name of the charging protocol, the encoding of the charging protocol, and the name of the manufacturer to which the charging protocol belongs. A determining module, configured to determine multiple charging protocols jointly supported by the first device and the second device from at least two charging protocols supported by the second device and the charging protocols supported by the first device, and determine a target charging protocol based on the priority of the multiple charging protocols or the charging power of the multiple charging protocols. A sending module, configured to send the identification of the target charging protocol to the second device.

19. An apparatus for determining a charging protocol, wherein Applied to a first device, it includes: A sending module, configured to send charging protocol information to a second device; the charging protocol information includes the identification of at least two charging protocols supported by the first device; the identification of at least two charging protocols supported by the first device includes any one of the name of the charging protocol, the encoding of the charging protocol, and the name of the manufacturer to which the charging protocol belongs. A receiving module, 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 from at least two charging protocols supported by the first device and the charging protocols supported by the second device, and is determined based on the priority of the multiple charging protocols or the charging power of the multiple charging protocols.

20. 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 caused to execute the steps of the method for determining a charging protocol according to any one of claims 1 to 17.

21. A computer-readable storage medium, on which a computer program is stored, wherein When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 17 are implemented.

Citation Information

Patent Citations

  • Method and device for operating network elements of different protocol versions

    CN101668315A

  • Terminal equipment charging method and device and storage medium

    CN112448435A