Method and apparatus for determining charging time, and electronic device

By acquiring the device identifier, battery status information, and communication protocol of the powered device, and combining them with the charging strategy and efficiency value, the remaining charging time is calculated, which solves the problem of inaccurate charging time in traditional methods and achieves more accurate charging time prediction and system stability.

CN123184263APending Publication Date: 2026-11-27NINGBO GONEO DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510659666.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing technologies, the charging time obtained from commands based on traditional parameters is inaccurate, resulting in inaccurate charging time prediction.

Method used

By receiving a charging time determination request, sending a parameter determination instruction to the powered device, obtaining information such as device identifier, battery rated capacity, current battery level, charging voltage, and charging current, determining charging parameters based on the communication protocol and demand type, and calculating the remaining charging time by combining the charging strategy and efficiency value.

Benefits of technology

It enables more accurate charging time prediction, improves the accuracy and reliability of charging time determination, and enhances the stability of the charging system and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123184263A_ABST
    Figure CN123184263A_ABST
Patent Text Reader

Abstract

The application discloses a charging time determination method and device and electronic equipment. The method comprises the following steps: receiving a charging time determination request; in response to the charging time determination request, sending a parameter determination instruction to a powered device; determining the charging parameter of the powered device according to the received device identifier of the powered device; and determining the remaining charging time of the powered device according to the charging parameter of the powered device, the rated capacity of the battery of the powered device, the current battery capacity of the powered device, the charging voltage and the charging current of the powered device. The application solves the technical problem that the remaining charging time determined according to the traditional parameter determination instruction to obtain the charging parameter is inaccurate in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing, and more specifically, to a method, apparatus, and electronic device for determining charging time. Background Technology

[0002] Determining the remaining charging time of a device is crucial for adjusting charging strategies and intelligently managing charging time, significantly improving user convenience and satisfaction. Currently, determining the remaining charging time of a device primarily relies on fixed charging parameters obtained from traditional parameter determination commands. However, this method suffers from the technical problem of inaccurate determination of the remaining charging time.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This invention provides a method, apparatus, and electronic device for determining charging time, to at least solve the technical problem in the related art where the remaining charging time determined by obtaining charging parameters based on traditional parameter determination instructions is inaccurate.

[0005] According to one aspect of the present invention, a method for determining charging time is provided, comprising: receiving a charging time determination request; responding to the charging time determination request, sending a parameter determination instruction to a powered device, wherein the parameter determination instruction is used to obtain a device identifier of the powered device, the rated battery capacity of the powered device, the current battery level of the powered device, the charging voltage and charging current of the powered device, and the parameter determination instruction is determined according to the communication protocol and communication requirement type corresponding to the powered device; determining the charging parameters of the powered device based on the received device identifier of the powered device; and determining the remaining charging time of the powered device based on the charging parameters of the powered device, the rated battery capacity of the powered device, the current battery level of the powered device, the charging voltage and charging current of the powered device.

[0006] Optionally, determining the remaining charging time of the powered device based on its charging parameters, rated battery capacity, current battery level, charging voltage, and charging current includes: if the charging parameters include a charging strategy, determining the rated charging power of the powered device for each of multiple predetermined power ranges based on the charging strategy, the current battery level, and the rated battery capacity; determining a power correction value for the powered device based on its rated charging power in the current power range, its charging voltage, and its charging current; determining the stage charging time for the powered device in each of the multiple predetermined power ranges based on its power correction value and the multiple rated charging powers; and determining the remaining charging time of the powered device based on the multiple stage charging times.

[0007] Optionally, determining the remaining charging time of the powered device based on its charging parameters, the rated battery capacity, the current battery level, the charging voltage, and the charging current includes: obtaining the charging efficiency value of the powered device, whereby the charging efficiency value represents the energy conversion efficiency of the powered device during the charging process; determining the charging power of the powered device based on its charging voltage and charging current; determining the actual charging power value of the powered device based on the charging efficiency value and the charging power; determining the remaining charging capacity of the powered device based on the current battery level and the rated battery capacity; and determining the remaining charging time of the powered device based on the remaining charging capacity and the actual charging power value.

[0008] Optionally, before sending a parameter determination instruction to the powered device in response to the charging time determination request, the method further includes: determining the communication protocol and communication requirement type corresponding to the powered device; determining a communication instruction template based on the communication protocol and the communication requirement type; determining the field values ​​corresponding to the multiple instruction field items in the communication instruction template; and determining the parameter determination instruction based on the multiple field values ​​and the communication instruction template.

[0009] Optionally, in response to the charging time determination request, after sending a parameter determination instruction to the powered device, the method further includes: determining response information corresponding to the parameter determination instruction; if the response information indicates that no response message corresponding to the parameter determination instruction has been received, determining retry parameters, wherein the retry parameters include a retry interval time and a retry count threshold; if the number of times the parameter determination instruction has been sent is less than the retry count threshold, sending a retry determination instruction to the powered device according to the retry interval time.

[0010] Optionally, after sending a parameter determination instruction to the powered device in response to the charging time determination request, the method further includes: upon receiving a response message from the powered device, determining a first checksum and a remaining field based on the response message, wherein the remaining field is the remaining message content in the response message excluding the first checksum; determining a second checksum based on the remaining field; and, if the first checksum and the second checksum are the same, determining the device identifier of the powered device, the rated battery capacity of the powered device, the current battery level of the powered device, the charging voltage of the powered device, and the charging current of the powered device based on the remaining field.

[0011] Optionally, determining the charging parameters of the powered device based on the received device identifier includes: sending a type determination instruction to a predetermined database, wherein the type determination instruction carries the device identifier of the powered device and is used to determine the device type of the powered device; and determining the charging parameters of the powered device based on the determined device type of the powered device.

[0012] According to one aspect of the present invention, a charging time determination apparatus is provided, comprising: a receiving module for receiving a charging time determination request; a response module for sending a parameter determination instruction to a powered device in response to the charging time determination request, wherein the parameter determination instruction is used to obtain a device identifier of the powered device, a rated battery capacity of the powered device, a current battery level of the powered device, a charging voltage and a charging current of the powered device, and the parameter determination instruction is determined according to a communication protocol and communication requirement type corresponding to the powered device; a first determination module for determining charging parameters of the powered device based on the received device identifier of the powered device; and a second determination module for determining the remaining charging time of the powered device based on the charging parameters of the powered device, the rated battery capacity of the powered device, the current battery level of the powered device, the charging voltage and the charging current of the powered device.

[0013] According to one aspect of the present invention, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method for determining charging time as described above.

[0014] According to one aspect of the present invention, a computer-readable storage medium is provided, which, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the charging time determination method described above.

[0015] In this embodiment of the invention, a method is adopted whereby a charging time determination request is received; in response to the charging time determination request, a parameter determination instruction is sent to the powered device, wherein the parameter determination instruction is used to obtain the device identifier of the powered device, the rated battery capacity of the powered device, the current battery level of the powered device, the charging voltage and charging current of the powered device, and the parameter determination instruction is determined according to the communication protocol and communication requirement type corresponding to the powered device; the charging parameters of the powered device are determined based on the received device identifier of the powered device; and the remaining charging time of the powered device is determined based on the charging parameters, the rated battery capacity, the current battery level, the charging voltage and charging current of the powered device. By sending parameter determination commands to the powered device, the device identifier, rated battery capacity, current battery level, charging voltage, and charging current of the powered device are obtained. Since the parameter determination command can identify the device identifier, the charging parameters for the powered device can be determined. This achieves the technical effect of determining the remaining charging time of the powered device based on its charging parameters, rated battery capacity, current battery level, charging voltage, and charging current. This solves the technical problem in related technologies where the remaining charging time determined by traditional parameter determination commands is inaccurate. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0017] Figure 1 This is a flowchart of a method for determining charging time according to an embodiment of the present invention;

[0018] Figure 2 This is a flowchart of a method for determining the remaining charging time provided by an optional embodiment of the present invention;

[0019] Figure 3 This is a flowchart of a method for determining a device identifier provided by an optional embodiment of the present invention;

[0020] Figure 4 This is a flowchart of a method for determining the battery capacity of a powered device provided by an optional embodiment of the present invention;

[0021] Figure 5 This is a flowchart of a method for determining the current power level of a powered device according to an optional embodiment of the present invention;

[0022] Figure 6 This is a flowchart of a method for determining the device model of a power receiving device provided by an optional embodiment of the present invention;

[0023] Figure 7 This is a flowchart of a method for estimating remaining charging time provided by an optional embodiment of the present invention;

[0024] Figure 8 This is a structural block diagram of the charging time determination device according to an embodiment of the present invention. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] Example 1

[0028] According to an embodiment of the present invention, an embodiment of a method for determining charging time is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0029] Figure 1 This is a flowchart of the method for determining charging time according to an embodiment of the present invention, as shown below. Figure 1 As shown, the method includes the following steps:

[0030] Step S102: Receive a charging time determination request.

[0031] In step S102 of this application, a charging time determination request is received.

[0032] This involves a charging time determination request, which is a request sent to the charging device (such as a charger, socket, etc.) to request the charging device to determine the remaining charging time of the device being charged (such as a mobile phone, laptop, etc.).

[0033] In this step, a charging time determination request is received, which requires determining the estimated remaining charging time for the charging device to complete charging based on the current battery status and charging capacity of the powered device. This is the basic step for determining the remaining charging time of the powered device.

[0034] Step S104: In response to the charging time determination request, a parameter determination instruction is sent to the powered device. The parameter determination instruction is used to obtain the device identifier of the powered device, the rated battery capacity of the powered device, the current battery level of the powered device, the charging voltage and charging current of the powered device. The parameter determination instruction is determined according to the communication protocol and communication requirement type corresponding to the powered device.

[0035] In step S104 of this application, a parameter determination command is sent to the powered device.

[0036] This involves parameter determination commands, which are data request commands sent by the charging device to the receiving device to obtain the device identifier and battery status information of the receiving device (such as the rated battery capacity, the current battery level of the receiving device, the charging voltage and charging current of the receiving device, etc.) in order to determine the charging time.

[0037] This involves power receiving equipment, which refers to devices that receive electrical energy from an external power source and convert it into a specific form of electrical energy required for their own operation, such as mobile phones and laptops.

[0038] This involves device identification, which refers to the identifier of the powered device, such as the Supplier Identifier (VID) and Product Identifier (PID), used to determine the manufacturer, model and other information of the device, which helps the charging device to identify and adapt to different types of devices.

[0039] This involves charging voltage and charging current, which refer to the real-time voltage and current supplied by the charging equipment to the receiving equipment during the current charging process.

[0040] This involves communication protocols, which refer to the communication rules between charging devices and receiving devices, such as the Power Transfer Fast Charging Protocol (PD Fast Charging Protocol).

[0041] This involves communication requirement types, which refer to the types of information that the charging device needs to exchange with the receiving device when determining the remaining charging time, such as battery status, charging rate, and device information.

[0042] In this step, upon receiving the charging time determination request, a parameter determination command is issued to obtain necessary parameter information based on the communication protocol between the powered device and the charging device and the communication requirement type corresponding to the parameters that need to be determined during the process of determining the remaining charging time. This information includes, for example, the device identifier of the powered device, the battery's rated capacity, the current battery level, the charging voltage, and the charging current. This process is a preliminary step for the charging device to estimate the charging time. By sending the parameter determination command, the charging device can directly obtain real-time battery status information from the powered device, collect accurate battery status and device information, and achieve more accurate charging time prediction based on dynamically changing parameters.

[0043] Step S106: Determine the charging parameters of the receiving device based on the device identifier received.

[0044] In step S106 provided in this application, the charging parameters of the powered device are determined.

[0045] This involves charging parameters, which refer to a set of charging configurations that are determined based on the device identifier and match the type of the powered device. These parameters include key parameters such as the device type of the powered device, the dynamic charging strategy of the powered device, and safety adaptation rules (such as temperature thresholds and protocol handshake timing).

[0046] In this step, after obtaining the device identifier of the powered device, key parameters such as the device type, dynamic charging strategy, and safety adaptation rules (e.g., temperature threshold, protocol handshake sequence) of the powered device are determined based on the device identifier, thus obtaining the charging parameters of the powered device. Through this step, the set of charging configurations matching the device type of the powered device can be determined based on the device identifier, improving the accuracy of subsequently determining the remaining charging time.

[0047] It should be noted that if the determined charging parameters include the device type of the powered device, the device type of the powered device can be displayed through the display interface of the charging device. If the determined charging parameters include the charging strategy of the powered device, the subsequently determined initial charging time can be adjusted according to the determined charging strategy to obtain a more accurate remaining charging time.

[0048] Step S108: Determine the remaining charging time of the power receiving device based on the charging parameters of the power receiving device, the rated battery capacity of the power receiving device, the current battery level of the power receiving device, the charging voltage and charging current of the power receiving device.

[0049] In step S108 provided in this application, the remaining charging time of the powered device is determined.

[0050] This includes the remaining charging time, which refers to the charging time required for the device to go from its current battery level to full charging.

[0051] Through steps S102-S108 above, a charging time determination request can be received; in response to the charging time determination request, a parameter determination instruction is sent to the powered device, wherein the parameter determination instruction is used to obtain the device identifier of the powered device, the rated battery capacity of the powered device, the current battery level of the powered device, the charging voltage and charging current of the powered device, and the parameter determination instruction is determined according to the communication protocol and communication requirement type corresponding to the powered device; based on the received device identifier of the powered device, the charging parameters of the powered device are determined; based on the charging parameters of the powered device, the rated battery capacity of the powered device, the current battery level of the powered device, the charging voltage and charging current of the powered device, the remaining charging time of the powered device is determined. This method, by sending parameter determination commands to the powered device, achieves the purpose of obtaining the device identifier, rated battery capacity, current battery level, charging voltage, and charging current of the powered device. Since the parameter determination command can determine the device identifier, the charging parameters for the powered device can be determined. This achieves the technical effect of determining the remaining charging time of the powered device based on its charging parameters, rated battery capacity, current battery level, charging voltage, and charging current, thereby solving the technical problem in related technologies where the remaining charging time determined by traditional parameter determination commands is inaccurate.

[0052] As an optional embodiment, determining the remaining charging time of the powered device based on its charging parameters, rated battery capacity, current battery level, charging voltage, and charging current includes: if the charging parameters include a charging strategy, determining the rated charging power of the powered device for each of multiple predetermined battery level ranges based on the charging strategy, current battery level, and rated battery capacity; determining a power correction value for the powered device based on its rated charging power in the current battery level range, its charging voltage, and charging current; determining the stage charging time for each of the multiple predetermined battery level ranges based on the power correction value and the multiple rated charging powers; and determining the remaining charging time of the powered device based on the multiple stage charging times.

[0053] This embodiment describes the specific steps for determining the remaining charging time of the powered device when the charging parameters include a charging strategy.

[0054] This involves charging strategies, which refer to the set of rules that guide the charging process of the powered device. For example, high-power fast charging is used in the initial charging phase, and low-power trickle charging is used when the battery is close to full charge to protect the battery and extend its lifespan.

[0055] This involves multiple predetermined power ranges, which refer to multiple power ranges between the current battery power and the battery's rated capacity, determined according to the charging strategy.

[0056] This involves the rated charging power, which refers to the charging power that the powered device expects to receive in multiple predetermined power ranges, as determined by the charging strategy.

[0057] This involves the power correction value, which refers to the difference between the actual charging power provided by the charging device and the rated charging power.

[0058] This involves phased charging time, which refers to the charging time of the powered device in multiple predetermined power ranges.

[0059] In this step, assuming the received charging parameters include the charging strategy of the powered device, firstly, based on the charging strategy, the current battery level, and the battery's rated capacity, the remaining charging capacity of the powered device is divided into multiple intervals, resulting in multiple predetermined charging intervals. According to the charging strategy, the rated charging power corresponding to each predetermined charging interval is determined. Secondly, after determining the rated charging power for the current charging interval, considering that the voltage and current in the actual charging environment may deviate from the ideal state, a power correction value needs to be determined based on the rated charging power, charging current, and charging voltage of the current charging interval to reflect the actual charging efficiency. Then, the rated charging power corresponding to each of the multiple predetermined charging intervals is corrected using the power correction value, and the stage charging time corresponding to each of the multiple predetermined charging intervals is determined. Finally, the total remaining charging time from the current battery level to full charge is obtained by adding the multiple stage charging times together.

[0060] This step takes into account the impact of the charging strategy of the device on the charging power. For example, high-power charging is used when the battery level is below a certain threshold, and low-power charging is used when the battery is close to full charge to reduce battery damage. This determines the actual charging power for multiple predetermined power ranges and improves the accuracy of the determined remaining charging time.

[0061] As an optional embodiment, determining the remaining charging time of the powered device based on its charging parameters, rated battery capacity, current battery level, charging voltage, and charging current includes: obtaining the charging efficiency value of the powered device, whereby the charging efficiency value represents the energy conversion efficiency of the powered device during the charging process; determining the charging power of the powered device based on its charging voltage and charging current; determining the actual charging power value of the powered device based on the charging efficiency value and charging power; determining the remaining charging capacity of the powered device based on the current battery level and rated battery capacity; and determining the remaining charging time of the powered device based on the remaining charging capacity and the actual charging power value.

[0062] This embodiment describes the specific steps for determining the remaining charging time of the powered device.

[0063] This includes the charging efficiency value, which is a measure of how efficiently a device converts received electrical energy into energy stored in a battery. In other words, it is the ratio of the energy actually stored in the battery to the total energy provided by the charger during the charging process.

[0064] This involves charging power, which refers to the total charging power provided by the charging device to the receiving device during the charging process.

[0065] This involves the actual charging power value, which refers to the effective power transmitted by the charger to the device after considering the charging efficiency value, that is, the actual charging power obtained by the device.

[0066] This step first requires obtaining the charging efficiency value, which reflects the true proportion of energy conversion during the charging process. Second, based on the charging voltage and current, the total charging power provided by the charging device to the receiving device during charging is determined, i.e., the charging power. Then, based on the charging efficiency value and the charging power, the actual charging power received by the receiving device is determined, resulting in the actual charging power. Finally, based on the determined actual charging power and the remaining charging capacity determined according to the current battery level and rated battery capacity, the remaining charging time is determined. This step, considering the charging efficiency value, determines the actual charging power of the receiving device, allowing for a more accurate determination of the remaining charging time.

[0067] As an optional embodiment, before sending a parameter determination instruction to the powered device in response to the charging time determination request, the method further includes: determining the communication protocol and communication requirement type corresponding to the powered device; determining a communication instruction template based on the communication protocol and communication requirement type; determining the field values ​​corresponding to the multiple instruction field items in the communication instruction template; and determining the parameter determination instruction based on the multiple field values ​​and the communication instruction template.

[0068] In this embodiment, the specific steps for determining the parameter determination instruction are described.

[0069] This involves communication instruction templates, which are instruction frameworks designed for different communication requirement types based on communication protocols. They contain the basic structure and fields of the request instructions corresponding to the communication requirement type, and are used to guide the format and content of communication.

[0070] This step involves several steps. First, it's necessary to identify the communication protocols supported by the receiving device and determine the type of communication requirement—that is, what specific information the charging device needs to obtain from the receiving device. Second, based on the identified communication protocols and communication requirement types, a command template conforming to the communication protocol is selected to obtain a communication command template, ensuring that communication with the receiving device is conducted in the correct format. Next, the specific values ​​for each command field in the communication command template are determined, resulting in multiple field values. Finally, these multiple field values ​​are filled into the communication command template to form a complete parameter determination command, used to request key charging parameters from the receiving device.

[0071] This step identifies communication protocols and demand types, standardizes parameter determination instructions, and reduces transmission error rates. It ensures the accuracy and completeness of parameter determination instructions, enabling effective communication with various types of powered devices and avoiding communication failures or data errors.

[0072] As an optional embodiment, after sending a parameter determination instruction to the powered device in response to the charging time determination request, the method further includes: determining response information corresponding to the parameter determination instruction; if the response information indicates that no response message corresponding to the parameter determination instruction has been received, determining retry parameters, wherein the retry parameters include a retry interval time and a retry count threshold; if the number of times the parameter determination instruction has been sent is less than the retry count threshold, sending a retry determination instruction to the powered device according to the retry interval time.

[0073] In this embodiment, the specific steps for sending a retry confirmation command to the powered device are described.

[0074] This involves response information, which refers to information that indicates whether the charging device has received a response message from the receiving device corresponding to the parameter determination command.

[0075] This involves response messages, which are feedback messages from the powered device to the charging device for parameter determination instructions. These messages typically contain the parameter data or other status information of the powered device required by the charging device.

[0076] In this step, after sending the parameter determination command, a response message is awaited from the powered device. If no response message is received within a specified time (i.e., the response message indicates that the response message corresponding to the parameter determination command has not been received), the retry logic is initiated. Based on pre-set retry parameters (retry interval and retry count threshold), the parameter determination command is resent at the retry interval within the following time period until the retry count threshold is reached or a response message is successfully received. Through this step, the retry mechanism ensures that even if the initial communication attempt fails, the necessary data can eventually be obtained, thereby improving the stability and reliability of the charging system communication.

[0077] As an optional embodiment, after sending a parameter determination instruction to the powered device in response to the charging time determination request, the method further includes: upon receiving a response message from the powered device, determining a first checksum and a remaining field based on the response message, wherein the remaining field is the remaining message content in the response message excluding the first checksum; determining a second checksum based on the remaining field; and if the first checksum and the second checksum are the same, determining the device identifier of the powered device, the rated battery capacity of the powered device, the current battery level of the powered device, the charging voltage of the powered device, and the charging current of the powered device based on the remaining field.

[0078] This embodiment describes the specific steps for determining the device identifier of the powered device, the rated battery capacity of the powered device, the current battery level of the powered device, the charging voltage and charging current of the powered device.

[0079] This involves a first checksum, which refers to a value carried in the response message sent by the powered device to verify the integrity and accuracy of the response message.

[0080] This involves a second checksum, which is a value determined based on the remaining fields in the response message to verify the integrity and accuracy of the response message.

[0081] In this step, after receiving the response message corresponding to the parameter determination command from the powered device, the first checksum is extracted from the response message; the remaining part of the response message is the residual field. Next, the same checksum algorithm is used to calculate the second checksum. If the first and second checksums match, it means the response message has not been corrupted or tampered with during transmission and is complete and reliable. Once the verification is successful, the residual field can be securely parsed to extract information such as the powered device's identifier, battery rated capacity, current battery level, charging voltage, and charging current. This step ensures that the received powered device information is not tampered with or damaged during transmission, improving communication stability and accuracy, and increasing system security.

[0082] As an optional embodiment, determining the charging parameters of the powered device based on the received device identifier includes: sending a type determination instruction to a predetermined database, wherein the type determination instruction carries the device identifier of the powered device and is used to determine the device type of the powered device; and determining the charging parameters of the powered device based on the determined device type of the powered device.

[0083] In this embodiment, the specific steps for determining the charging parameters of the powered device are described.

[0084] This involves a pre-defined database, which is a database that stores the correspondence between the device identifiers and device types of different types of power-receiving equipment.

[0085] In this step, after receiving the device identifier of the powered device, a type determination instruction is determined based on the received device identifier and sent to a predetermined database. The database returns the device type information based on the device identifier, determines the device type of the powered device, and sets matching charging parameters according to the device type.

[0086] Based on the above embodiments and optional embodiments, an optional implementation method is provided, which is described in detail below.

[0087] An optional embodiment of the present invention provides a method for identifying the charging device model and estimating the remaining charging time using the PD fast charging protocol. Figure 2 This is a flowchart of a method for determining the remaining charging time provided by an optional embodiment of the present invention, as shown below. Figure 2 As shown, it can calculate the remaining charging time in real time based on the charging power and the current battery level, giving users an intuitive time expectation. In addition, the method can also identify the device model. Based on the device's VID and PID codes, and according to the pre-stored device model and VID / PID correspondence table, it can obtain the specific model of the device, bringing a better user experience.

[0088] The specific steps of the method provided by the optional embodiments of the present invention are described in detail below.

[0089] S1. Receive charging time confirmation request.

[0090] S2. In response to the charging time determination request, send a parameter determination command to the powered device.

[0091] Figure 3 This is a flowchart of a method for determining a device identifier provided by an optional embodiment of the present invention, such as... Figure 3 As shown, the charging device first sends a PD fast charging protocol command, namely the device type determination command (Vendor_Defined), and the receiving device returns a response message after receiving the device type determination command.

[0092] Table 1 shows the format and content of the device type determination instruction provided by the optional embodiments of the present invention. As shown in Table 1, the device type determination instruction includes a preamble, a standard operating procedure field, a message header, a vendor-defined message header, a vendor data object, a cyclic redundancy check value, and an end field.

[0093] Table 1

[0094]

[0095] Table 2 is a message header format content table of the device type determination instruction provided by the optional embodiment of the present invention. As shown in Table 2, the sending device (Source end) fills in the contents of multiple instruction field items in the message header.

[0096] Table 2

[0097]

[0098] Table 3 is a table of the supplier definition message header format of the device type determination instruction provided by the optional embodiment of the present invention. As shown in Table 3, the sending device fills in the contents of multiple instruction field items in the supplier definition message header.

[0099] Table 3

[0100]

[0101] The receiving device (Sink end) returns a response message. Table 4 is a table of the format and content of the response message provided by the optional embodiments of the present invention. As shown in Table 4, the response message includes a preamble, a standard operating procedure field, a message header, a vendor-defined message header, a vendor data object, a cyclic redundancy check value, and an end field.

[0102] Table 4

[0103]

[0104] Table 5 is a message header format content table of the response message provided by the optional embodiments of the present invention. As shown in Table 5, the Sink end fills in the contents of multiple instruction field items in the message header.

[0105] Table 5

[0106]

[0107] Table 6 is a table of the supplier-defined message header format of the response message provided by the optional embodiment of the present invention. As shown in Table 6, the Sink end fills in the contents of multiple instruction field items in the supplier-defined message header.

[0108] Table 6

[0109]

[0110] Table 7 is a table of supplier identification code format contents of the power receiving equipment provided by an optional embodiment of the present invention. As shown in Table 7, the power receiving equipment fills in the contents of multiple instruction fields of the supplier identification code.

[0111] Table 7

[0112]

[0113] Table 8 is a table of product identification code format contents of the power receiving device provided by an optional embodiment of the present invention. As shown in Table 8, the power receiving device fills in the contents of multiple instruction field items of the product identification code.

[0114] Table 8

[0115]

[0116] Figure 4 This is a flowchart of a method for determining the battery capacity of a powered device according to an optional embodiment of the present invention, such as... Figure 4 As shown, the charging device sends a PD protocol command to obtain the battery capacity command (Get_Battery_Cap), and the receiving device returns a battery capacity response message (Battery_Capabilities message) after receiving the command.

[0117] Table 9 is a table of the battery capacity acquisition instruction format provided by an optional embodiment of the present invention. As shown in Table 9, the battery capacity acquisition instruction includes a preamble, a standard operating procedure field, a message header, an extended message header, a battery power data block, a cyclic redundancy check value, and an end field.

[0118] Table 9

[0119]

[0120] Table 10 is a table of partial field items for obtaining battery capacity instructions provided by an optional embodiment of the present invention. As shown in Table 10, the charging device fills in the contents of some field items.

[0121] Table 10

[0122]

[0123] Table 11 is a table of header field contents for obtaining battery capacity instruction provided by an optional embodiment of the present invention. As shown in Table 11, the charging device fills in the header field contents.

[0124] Table 11

[0125]

[0126] Table 12 is a table of extended message header field contents for obtaining battery capacity instructions provided by an optional embodiment of the present invention. As shown in Table 12, the charging device fills in the extended message header field contents.

[0127] Table 12

[0128]

[0129] Table 13 is a table of battery capacity response message format contents provided by optional embodiments of the present invention. As shown in Table 13, the battery capacity response message includes a preamble, a standard operating procedure field, a message header, an extended message header, a battery capacity data block, a cyclic redundancy check value, and an end field.

[0130] Table 13

[0131]

[0132] Table 14 is a table of partial field items of the battery capacity response message provided by an optional embodiment of the present invention. As shown in Table 14, the power receiving device fills in the contents of some field items.

[0133] Table 14

[0134]

[0135] Table 15 is a table of message header field contents for the battery capacity response message provided in an optional embodiment of the present invention. As shown in Table 15, the power receiving device fills in the contents of the message header field items.

[0136] Table 15

[0137]

[0138] Table 16 is a table of extended message header field contents for the battery capacity response message provided in an optional embodiment of the present invention. As shown in Table 16, the power receiving device fills in the extended message header field contents.

[0139] Table 16

[0140]

[0141] Table 17 is a table of battery capacity field contents for the battery capacity response message provided by an optional embodiment of the present invention. As shown in Table 17, the power receiving device fills in the contents of the battery capacity field items.

[0142] Table 17

[0143]

[0144] Figure 5This is a flowchart of a method for determining the current power level of a powered device according to an optional embodiment of the present invention, such as... Figure 5 As shown, the charging device sends a PD protocol command to obtain the current battery level (Get_Battery_Status), and the receiving device returns a current battery level response message (Battery_Status message) after receiving the command.

[0145] Table 18 is a table of the current power acquisition instruction format provided by an optional embodiment of the present invention. As shown in Table 18, the current power acquisition instruction includes a preamble, a standard operating procedure field, a message header, an extended message header, a battery status data block, a cyclic redundancy check value, and an end field.

[0146] Table 18

[0147]

[0148] Table 19 is a table of partial field items of the current power acquisition instruction provided by an optional embodiment of the present invention. As shown in Table 19, the charging device fills in the contents of some field items.

[0149] Table 19

[0150] Message Header Extended Message Header GBSDB 9BA4 8001 0000

[0151] Table 20 is a table of the current power acquisition instruction message header field content provided by an optional embodiment of the present invention. As shown in Table 20, the charging device fills in the message header field items.

[0152] Table 20

[0153]

[0154] Table 21 is a table of extended message header field contents for the current power acquisition instruction provided by an optional embodiment of the present invention. As shown in Table 21, the charging device fills in the extended message header field contents.

[0155] Table 21

[0156]

[0157] Table 22 is a table of the current power response message format provided by an optional embodiment of the present invention. As shown in Table 22, the current power response message includes a preamble, a standard operating procedure field, a message header, a cyclic redundancy check value, and an end field.

[0158] Table 22

[0159]

[0160] Table 23 is a table of partial field items of the current power response message provided in the embodiments of the present invention. As shown in Table 23, the power receiving device fills in the contents of some field items.

[0161] Table 23

[0162]

[0163] Table 24 is a message header field content table of the current power response message provided by an optional embodiment of the present invention. As shown in Table 24, the power receiving device fills in the content of the message header field items.

[0164] Table 24

[0165]

[0166] Table 25 is a table of battery status field contents for the current power response message provided by an optional embodiment of the present invention. As shown in Table 25, the power receiving device fills in the contents of the battery status field items.

[0167] Table 25

[0168]

[0169] S3. Determine the charging parameters of the receiving device based on the device identifier received.

[0170] Figure 6 This is a flowchart of a method for determining the device model of a powered device according to an optional embodiment of the present invention, such as... Figure 6 As shown, the device identifier of the powered device is obtained by sending a device type determination command, and the specific model of the device is determined by looking up a table.

[0171] S4. Based on the charging parameters of the receiving device, the rated capacity of the receiving device's battery, the current battery level of the receiving device, the charging voltage and charging current of the receiving device, determine the remaining charging time of the receiving device.

[0172] Figure 7 This is a flowchart of a method for estimating remaining charging time provided by an optional embodiment of the present invention, such as... Figure 7 As shown, the formula for calculating the remaining charging time of the receiving equipment is:

[0173] T = (Q - Qc) / (P * η)

[0174] Where T represents the remaining charging time, Q represents the battery's rated capacity, Qc represents the current battery level, P represents the charging power, and η represents the charging efficiency value.

[0175] The charging power is calculated as follows:

[0176] P = Uout * Iout

[0177] Where Uout represents the charging voltage and Iout represents the charging current.

[0178] The above optional implementation methods can achieve at least the following beneficial effects:

[0179] (1) By estimating the remaining charging time, users' expectations for time can be met, thus improving the user experience;

[0180] (2) By identifying the device model, it can provide users with a professional experience.

[0181] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0182] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0183] Example 2

[0184] According to an embodiment of the present invention, an apparatus for implementing the above-described method for determining charging time is also provided. Figure 8 This is a structural block diagram of the charging time determination device according to an embodiment of the present invention, as shown below. Figure 8 As shown, the device includes: a receiving module 802, a response module 804, a first determining module 806, and a second determining module 808. The device will be described in detail below.

[0185] A receiving module 802 is used to receive a charging time determination request; a response module 804, connected to the receiving module 802, is used to respond to the charging time determination request by sending a parameter determination instruction to the powered device, wherein the parameter determination instruction is used to obtain the device identifier of the powered device, the rated battery capacity of the powered device, the current battery level of the powered device, the charging voltage and charging current of the powered device, and the parameter determination instruction is determined according to the communication protocol and communication requirement type corresponding to the powered device; a first determination module 806, connected to the response module 804, is used to determine the charging parameters of the powered device based on the received device identifier of the powered device; a second determination module 808, connected to the first determination module 806, is used to determine the remaining charging time of the powered device based on the charging parameters of the powered device, the rated battery capacity of the powered device, the current battery level of the powered device, the charging voltage and charging current of the powered device.

[0186] It should be noted that the above-mentioned receiving module 802, response module 804, first determining module 806 and second determining module 808 correspond to steps S102 to S108 in the method for determining charging time. The multiple modules and the corresponding steps are the same in terms of implementation examples and application scenarios, but are not limited to the content disclosed in the above embodiment 1.

[0187] Example 3

[0188] According to another aspect of the present invention, an electronic device is also provided, comprising: a processor; and a memory for storing processor-executable instructions, wherein the processor is configured to execute instructions to implement the charging time determination method of any of the above embodiments.

[0189] Example 4

[0190] According to another aspect of the present invention, a computer-readable storage medium is also provided, which, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the charging time determination method described above.

[0191] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0192] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0193] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0194] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0195] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0196] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0197] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for determining charging time, characterized in that, include: Receive charging time confirmation request; In response to the charging time determination request, a parameter determination instruction is sent to the powered device, wherein the parameter determination instruction is used to obtain the device identifier of the powered device, the rated battery capacity of the powered device, the current battery level of the powered device, the charging voltage and charging current of the powered device, and the parameter determination instruction is determined according to the communication protocol and communication requirement type corresponding to the powered device; Based on the received device identifier of the power receiving device, determine the charging parameters of the power receiving device; Based on the charging parameters of the receiving device, the rated battery capacity of the receiving device, the current battery level of the receiving device, the charging voltage and charging current of the receiving device, the remaining charging time of the receiving device is determined.

2. The method according to claim 1, characterized in that, The determination of the remaining charging time of the power receiving device based on its charging parameters, rated battery capacity, current battery level, charging voltage, and charging current includes: When the charging parameters include a charging strategy, the rated charging power of the powered device in multiple predetermined power ranges is determined based on the charging strategy, the current battery power, and the battery rated capacity. Based on the rated charging power of the power receiving device in the current power range, the charging voltage and charging current of the power receiving device, determine the power correction value of the power receiving device; Based on the power correction value of the power receiving device and multiple rated charging powers, determine the stage charging time of the power receiving device in each of the multiple predetermined power ranges; The remaining charging time of the powered device is determined based on the charging time of multiple stages.

3. The method according to claim 1, characterized in that, The determination of the remaining charging time of the power receiving device based on its charging parameters, rated battery capacity, current battery level, charging voltage, and charging current includes: Obtain the charging efficiency value of the power receiving device, wherein the charging efficiency value is used to represent the energy conversion efficiency of the power receiving device during the charging process; The charging power of the power receiving device is determined based on its charging voltage and charging current. Based on the charging efficiency value and the charging power, determine the actual charging power value of the powered device; Based on the current battery level and the battery's rated capacity, determine the remaining charging capacity corresponding to the powered device; The remaining charging time of the powered device is determined based on the remaining charging capacity and the actual charging power value.

4. The method according to claim 1, characterized in that, Before sending a parameter determination instruction to the powered device in response to the charging time determination request, the method further includes: Determine the communication protocol and communication requirement type corresponding to the power receiving device; Based on the communication protocol and the communication requirement type, determine the communication instruction template; Determine the field values ​​corresponding to the multiple instruction field items in the communication instruction template; The parameter determination instruction is determined based on multiple field values ​​and the communication instruction template.

5. The method according to claim 1, characterized in that, After responding to the charging time determination request and sending a parameter determination instruction to the powered device, the method further includes: Determine the response information corresponding to the parameter determination command; If the response information indicates that no response message corresponding to the parameter determination instruction has been received, retry parameters are determined, wherein the retry parameters include a retry interval time and a retry count threshold. If the number of times the parameter determination instruction is sent is less than the retry count threshold, a retry determination instruction is sent to the powered device according to the retry interval.

6. The method according to claim 1, characterized in that, After responding to the charging time determination request and sending a parameter determination instruction to the powered device, the method further includes: Upon receiving a response message from the powered device, a first checksum and a remaining field are determined based on the response message, wherein the remaining field is the remaining message content in the response message excluding the first checksum; Based on the remaining fields, determine the second verification value; If the first check value and the second check value are the same, the device identifier of the power receiving device, the rated battery capacity of the power receiving device, the current battery level of the power receiving device, the charging voltage and charging current of the power receiving device are determined based on the remaining fields.

7. The method according to any one of claims 1 to 6, characterized in that, The step of determining the charging parameters of the power receiving device based on the received device identifier includes: Send a type determination instruction to a predetermined database, wherein the type determination instruction carries the device identifier of the powered device and is used to determine the device type of the powered device; Based on the determined equipment type of the receiving device, the charging parameters of the receiving device are determined.

8. A device for determining charging time, characterized in that, include: The receiving module is used to receive charging time determination requests; A response module is used to respond to the charging time determination request by sending a parameter determination instruction to the powered device, wherein the parameter determination instruction is used to obtain the device identifier of the powered device, the rated battery capacity of the powered device, the current battery level of the powered device, the charging voltage and charging current of the powered device, and the parameter determination instruction is determined according to the communication protocol and communication requirement type corresponding to the powered device; The first determining module is used to determine the charging parameters of the power receiving device based on the device identifier of the power receiving device received; The second determining module is used to determine the remaining charging time of the power receiving device based on the charging parameters of the power receiving device, the rated battery capacity of the power receiving device, the current battery level of the power receiving device, the charging voltage and charging current of the power receiving device.

9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the method for determining the charging time as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method for determining the charging time as described in any one of claims 1 to 7.