Charging test control method, electronic equipment and charging test system

By periodic retry requests and dynamically adjusting the charging time/power when the protocol encoding is not received, the problem of delay or loss of protocol encoding in charging tests is solved, improving the accuracy of charging tests and battery health protection.

CN119813477BActive Publication Date: 2025-08-19SHENZHEN LONGXC POWER SUPPLY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510249007.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-08-19
Estimated Expiration
2045-03-04

AI Technical Summary

Technical Problem

During the charging test, the communication delay or loss of protocol codes leads to unstable charging protocol switching, affecting charging time control and testing accuracy, especially in the diversified charging protocol and device compatibility testing.

Method used

The electronic device periodically retry requests when the protocol encoding is not received, adjusts the waiting time in combination with the success rate of the historical matching, and dynamically adjusts the charging time and power during the charging process, and optimizes the charging process based on the battery health status.

Benefits of technology

Improve the accuracy, stability and reliability of charging tests, ensure the success rate of protocol encoding matching, protect the health of the battery, and optimize the charging process to conform to actual conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119813477B_ABST
    Figure CN119813477B_ABST
Patent Text Reader

Abstract

The present application provides a charging test control method, an electronic device, and a charging test system, which are applicable to the field of charging test technology and are used for charging tests on electronic devices. The method includes: in a pending state, if the protocol code sent by the adapter is not received, periodically sending a request for the protocol code to the adapter at intervals of a preset time; if the protocol code and verification information sent by the adapter are received, verifying the verification information; if the verification information is verified, exiting the pending state, determining the charging protocol executed in this charging test based on the protocol code, and determining the target charging mode associated with the charging protocol, the target charging mode including the target charging time; based on the target charging mode, charging the electronic device through the adapter, and stopping the charging test when the charging time reaches the target charging time. The embodiments of the present application can improve the accuracy, stability, and reliability of the charging test.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of charging test technology, and in particular relates to a charging test control method, an electronic device, and a charging test system. Background Art

[0002] With the increasing popularity of smart electronic devices (such as smartphones, tablets, and laptops), innovation and advancement in charging technology have become key elements in electronic device design. Adapters, crucial components in the charging process, typically offer multiple charging protocols to accommodate different types of electronic devices, ensuring safe and efficient charging in diverse environments. With the diversification of charging protocols (such as fast charging and standard charging protocols), the demand for charging testing has also increased, particularly in testing the compatibility of charging protocols with charging devices.

[0003] Charging protocol information is typically exchanged between the adapter and the electronic device via protocol coding. In existing charging testing processes, the adapter typically sends the protocol coding to the electronic device, which then determines the charging protocol supported by the adapter based on the protocol coding and performs charging operations. During this process, the transmission and reception of the protocol coding typically relies on synchronized communication between the adapter and the electronic device. However, in practical applications, issues such as communication delays or loss of the protocol coding may occur, which directly impacts the switching of charging protocols, control of charging time, and the accuracy, stability, and reliability of charging tests.

[0004] Therefore, there is an urgent need for a charging test control method that can improve the accuracy of the charging test. Summary of the Invention

[0005] In view of this, embodiments of the present application provide a charging test control method, an electronic device, and a charging test system, which can improve the accuracy of charging tests.

[0006] A first aspect of an embodiment of the present application provides a charging test control method, which is applied to a charging test of an electronic device. The method includes:

[0007] In the pending state, if the protocol code sent by the adapter is not received, a request for the protocol code is periodically sent to the adapter at intervals of a preset time.

[0008] If the protocol code and verification information sent by the adapter are received, the verification information is verified.

[0009] If the verification information is verified, the pending state is exited, and the charging protocol executed in this charging test is determined according to the protocol code, and the target charging mode associated with the charging protocol is determined. The target charging mode includes the target charging time.

[0010] Based on the target charging mode, the electronic device is charged through the adapter, and the charging test is stopped when the charging time reaches the target charging time.

[0011] As an embodiment of the present application, the electronic device enters a pending state after being connected to the adapter.

[0012] In a possible implementation of the first aspect, if the protocol code is not received for more than a preset time threshold, or the total number of request sending reaches a preset number threshold and the protocol code is not received, the exception handling mechanism is triggered.

[0013] In a possible implementation of the first aspect, periodically sending a request for protocol encoding to the adapter at preset time intervals further includes:

[0014] The preset time is determined according to the success probability of the historical protocol matching between the adapter and the electronic device, wherein the preset time is negatively correlated with the success probability.

[0015] In a possible implementation of the first aspect, a calculation formula for the preset time is as follows:

[0016] Ttimeout=T0×(1+α×(1-Pmatch))

[0017] Wherein, Ttimeout is the preset time, T0 is the preset basic timeout time, α is the preset adjustment coefficient, and Pmatch is the success probability of historical protocol matching between the adapter and the electronic device.

[0018] In a possible implementation of the first aspect, during charging of the electronic device, whether charging is abnormal is detected in real time, and charging is suspended when a charging abnormality occurs, and charging is resumed after the charging abnormality ends.

[0019] In a possible implementation of the first aspect, detecting whether charging is abnormal in real time includes:

[0020] Detect the real-time power growth rate of the electronic device battery.

[0021] Based on the characteristic data of the electronic device battery and the historical power growth data in the historical charging data, the estimated power growth rate of the electronic device battery is predicted.

[0022] If the difference between the real-time power growth rate and the estimated power growth rate is greater than the preset error range, it is determined that charging abnormality has occurred.

[0023] In a possible implementation of the first aspect, during the process of charging the electronic device, the target charging time and charging power are dynamically adjusted according to the health status of the electronic device's battery, and the electronic device is charged through the adapter based on the adjusted target charging time and charging power.

[0024] In a possible implementation of the first aspect, dynamically adjusting the target charging time according to the health status of a battery of the electronic device includes:

[0025] The target charging time is adjusted in real time based on the maximum power, real-time power, and charging power of the electronic device battery. The formula is as follows:

[0026]

[0027] Among them, Efull is the maximum power of the electronic device battery, and Pcharge (E) is the charging power corresponding to the real-time power.

[0028] In a possible implementation of the first aspect, dynamically adjusting the target charging time according to the health status of a battery of the electronic device includes:

[0029] Adjust the charging power based on the maximum charging power supported by the electronic device's battery and its health status. The formula is as follows:

[0030] Pcharge = Pmax × (1 − β × H)

[0031] Where Pmax is the maximum charging power supported by the electronic device's battery, Pcharge is the adjusted charging power, β is the preset adjustment coefficient, and H is the battery's health status, where 0 ≤ H ≤ 1.

[0032] A second aspect of an embodiment of the present application provides a charging test control device for performing a charging test on an electronic device. The device includes:

[0033] The request sending module is used to periodically send a request for the protocol code to the adapter at preset time intervals if the protocol code sent by the adapter is not received in the pending state.

[0034] The verification module is used to verify the verification information if the protocol code and verification information sent by the adapter are received.

[0035] The mode determination module is used to exit the pending state if the verification information is verified, determine the charging protocol executed in this charging test according to the protocol code, and determine the target charging mode associated with the charging protocol, the target charging mode including the target charging time.

[0036] The charging control module is used to charge the electronic device through the adapter based on the target charging mode, and stop the charging test when the charging time reaches the target charging time.

[0037] A third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a battery, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the charging test control method as described in any one of the first aspects above are implemented.

[0038] A fourth aspect of the embodiments of the present application provides a charging test system, comprising the electronic device and the adapter as in the third aspect.

[0039] The adapter is used to generate protocol coding and authentication information and send them to the electronic device.

[0040] The adapter is further configured to, upon receiving a request sent by the electronic device, send the protocol code and verification information to the electronic device in response to the request.

[0041] A fifth aspect of an embodiment of the present application provides a computer-readable storage medium, comprising: storing a computer program, which, when executed by a processor, implements the steps of the charging test control method as described in any one of the first aspects above.

[0042] A sixth aspect of the embodiments of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the charging test control method described in any one of the first aspects above.

[0043] Compared with the prior art, the embodiments of the present application have the following advantages: by periodically retrying to request the protocol code when the correct protocol code is not received, the electronic device can continuously try to obtain the correct protocol code, thereby reducing the problems of protocol code loss and synchronization errors, and thus improving the accuracy of charging tests. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0045] Figure 1 This is a schematic diagram of the implementation flow of the charging test control method provided in an embodiment of the present application;

[0046] Figure 2This is a schematic diagram of the implementation flow of charging abnormality processing in the charging test control method provided in an embodiment of the present application;

[0047] Figure 3 This is a schematic diagram of a flow chart for implementing real-time detection of charging abnormality in the charging test control method provided in an embodiment of the present application;

[0048] Figure 4 This is a schematic diagram of the implementation process of dynamically adjusting the charging time and charging power in the charging test control method provided in an embodiment of the present application;

[0049] Figure 5 Schematic diagram of the structure of the charging test control device provided in an embodiment of the present application;

[0050] Figure 6 Schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0052] With the increasing popularity of smart electronic devices (such as smartphones, tablets, and laptops), innovation and advancement in charging technology have become key elements in electronic device design. Adapters, crucial components in the charging process, typically offer multiple charging protocols to accommodate different types of electronic devices, ensuring safe and efficient charging in diverse environments. With the diversification of charging protocols (such as fast charging and standard charging protocols), the demand for charging testing has also increased, particularly in testing the compatibility of charging protocols with charging devices.

[0053] The adapter and electronic device typically exchange charging protocol information via protocol coding. In existing charging testing processes, the adapter typically sends the protocol code to the electronic device, which then determines the charging protocol supported by the adapter based on the protocol code and performs charging operations. During this process, the transmission and reception of the protocol code typically relies on synchronized communication between the adapter and the electronic device. However, in practical applications, issues such as protocol code communication delays or loss may occur, which directly impacts charging protocol switching, charging time control, and the accuracy of charging tests.

[0054] Especially in scenarios where charging protocols switch frequently and are complex, such as when charging tests need to be performed on a variety of different electronic devices and a variety of different adapters, how to ensure that protocol codes can be transmitted in a timely and accurate manner, improve abnormal situations such as protocol code loss and timeouts, and improve the accuracy of charging tests. Charging test control methods have become urgent issues to be solved in current technology.

[0055] In the embodiments of the present application, from the perspective of improving the correct protocol coding matching rate and from the perspective of adaptively using the charging state to optimize the charging process, the charging time of the charging test process is made as realistic and reasonable as possible, thereby comprehensively improving the accuracy, stability and reliability of the charging test. Specifically, it includes:

[0056] 1. When the electronic device does not receive the correct protocol code, it periodically retries the protocol code request + sets a limit on the maximum number of retries requested / retry timeout to stop charging test. This allows the electronic device to continuously attempt to obtain the correct protocol code while avoiding situations where unlimited attempts may cause the electronic device to be in an incorrect charging state for a long time.

[0057] Specifically, this can avoid situations where protocol code matching cannot be performed properly due to protocol code delays or loss during communication, thereby improving the success rate of protocol matching. Based on this, using the correct protocol code can make the current charging test more consistent with the actual charging protocol conditions, avoid electronic devices being in the wrong charging state, and thus improve the accuracy, stability, and reliability of the current charging test.

[0058] 2. After receiving the correct protocol code and starting charging, the charging process is optimized. Specifically, the charging time and charging power are dynamically adjusted according to the battery's health status, so that the entire charging process is more closely aligned with the actual battery conditions, ensuring that the charging time during the charging test is as realistic and reasonable as possible.

[0059] In the embodiment of the present application, the charging test system includes an adapter and an electronic device. The electronic device can be any device with a certain data processing capability, including but not limited to computing devices such as data centers, tablet computers, desktop computers, notebooks, PDAs, and cloud servers, and the specifics are not limited here.

[0060] In order to illustrate the technical solution described in this application, specific embodiments are provided below.

[0061] Figure 1 The following is a flowchart of the charging test control method according to the first embodiment of the present application, which is described in detail as follows:

[0062] In the charging test scenario, with the adapter and electronic device connected but not started:

[0063] S101: The adapter generates a protocol code and verification information and actively sends them to the electronic device. If a request is received from the electronic device, the adapter sends the protocol code and verification information to the electronic device in response to the request.

[0064] The verification information is used to verify the legitimacy of the adapter identity (i.e., the legitimacy of the source of the protocol code) and the legitimacy of the protocol code content, i.e., whether there are any errors or tampering. Based on this, the embodiments of the present application do not make too many restrictions on the specific data contained in the verification information, i.e., the generation method.

[0065] In some optional embodiments, the verification information may include a digital signature and a message authentication code (MAC). The adapter first generates a protocol code C based on relevant charging protocol parameters (e.g., voltage V, current I, charging mode M, etc.). This protocol code C is key data used by the electronic device to identify and execute the charging protocol.

[0066] Next, the adapter uses its private key to sign the protocol code C to generate a digital signature. This digital signature is used to verify the source of the protocol code and whether it has been tampered with during transmission.

[0067] The adapter and the electronic device share a key K and use the key and the protocol code C to generate a message authentication code MAC value. The MAC is used to verify the integrity of the protocol code and ensure that the data has not been tampered with during transmission.

[0068] The protocol code C is calculated from the charging protocol parameters P. The charging protocol parameters P are defined as (V, I, M). The adapter inputs the charging protocol parameters P into the function f(P) to generate the protocol code C. This can be a simple mapping or a complex encryption process, depending on the protocol design. The mathematical expression is: C = f(P), where f is a function designed according to the protocol, which converts the charging protocol parameters P into the protocol code C.

[0069] The generation of digital signature S and message authentication code (MAC) is as follows:

[0070] Generate digital signature S: The adapter uses the private key private_key to sign the protocol code C, generating a digital signature S to verify the integrity and origin of the data. The signature is obtained by encrypting the hash value H(C) of the protocol code.

[0071] The adapter uses the private key to sign the hash value H(c). The signature can be generated by encryption algorithms such as RSA and ECDSA. The specific steps are: S=Signprivate_key(H(C)); where Signprivate_key indicates that the hash value is encrypted using the adapter's private key to generate a digital signature S.

[0072] In addition, the adapter shares a key K with the electronic device and generates a message authentication code (MAC) using the key and the protocol code C. The MAC is used to verify the integrity of the protocol code and ensure that the data has not been tampered with.

[0073] Generate a message authentication code (MAC): The adapter encrypts the protocol code C using the shared key K to generate a MAC. Common MAC algorithms include HMAC (Hash Message Authentication Code). The generation process is as follows: MAC = MACK(C). Here, MACK(C) represents the message authentication code calculated using the shared key K and the protocol code C. Specifically, the HMAC algorithm can calculate a MAC based on the SHA-256 algorithm as follows: MAC = HMAC-SHA-256(K,C)

[0074] The adapter sends the protocol code C, digital signature S and message authentication code (MAC) to the electronic device. The data structure of the transmission is:

[0075] Data=(C,S,MAC); Data is the data sent to the electronic device, including the protocol code C, signature S and message authentication code (MAC).

[0076] S102, the electronic device side enters the pending state; in the pending state, if the protocol code sent by the adapter is not received, a request for the protocol code is periodically sent to the adapter at intervals of a preset time, and the total number of requests sent to the adapter in the pending state is recorded.

[0077] The electronic device may enter the pending state when it is not normally charged. For example, in some embodiments, it may enter the pending state by default after being connected to an adapter. On the other hand, it may automatically exit the pending state after normally starting charging.

[0078] In the pending state, the electronic device normally receives information sent by the adapter, such as the protocol code and verification information. Furthermore, if the electronic device does not receive the protocol code sent by the adapter, it will count down and send a request for the protocol code at preset intervals, requesting the adapter to send the protocol code to the electronic device. That is, if the protocol code request is still not received within the preset time, the electronic device will automatically retry and send a request to the adapter to resend the protocol code. The embodiments of the present application do not impose any restrictions on the specific value of the preset time, and it can be set according to actual needs.

[0079] As an optional embodiment of the present application, considering the differences in connection quality and protocol matching between different adapters and electronic devices, a fixed preset time may sometimes be difficult to meet actual needs. For example, when the adapter and the electronic device are originally connected slowly, if the preset time is set too short, it will not meet normal conditions. However, if the preset time is set too long, the entire retry phase will be too long, which is not conducive to testing the actual required charging time in the charging test (the measured charging time will be longer). Therefore, in the example of the present application, the maximum waiting time for waiting for the protocol encoding (i.e., the preset time) can be dynamically adjusted based on factors such as the connection quality between the electronic device and the adapter and the historical protocol matching success rate. For example, if the probability of the device successfully matching the protocol in the past few charges is high (greater than the set value), a shorter maximum waiting time can be set; otherwise, the maximum waiting time can be appropriately increased. That is, the preset time is negatively correlated with the success probability of the historical protocol matching between the adapter and the electronic device.

[0080] As a specific embodiment of the present application, the calculation formula of the preset time Ttimeout is as follows:

[0081] Ttimeout=T0×(1+α×(1-Pmatch)) (1)

[0082] Where T0 is the basic timeout period, α is the adjustment coefficient that controls the sensitivity of the timeout window, and Pmatch is the success probability of historical protocol matching between the adapter and the electronic device.

[0083] As another specific embodiment of the present application, multiple preset times of different lengths can be preset and selected based on the success probability of the historical protocol matching between the adapter and the electronic device. In this case, the preset time is negatively correlated with the success probability.

[0084] S103, electronic device side: If the protocol code is not received for more than a preset time threshold, or the total number of requests reaches a preset number threshold and the protocol code is not received, an exception handling mechanism is triggered.

[0085] To avoid situations where the electronic device remains in an incorrect charging state for a long period of time due to repeated attempts to receive the protocol code even though the protocol code has not been received for a long time, an embodiment of the present application provides a timeout limit mechanism. This mechanism specifies that if the protocol code is not received for an extended period of time (i.e., exceeding a time threshold), or if the protocol code is still not received after multiple requests have been sent (i.e., exceeding a number threshold), the current charging test is considered abnormal and handled according to a preset exception handling mechanism to ensure the reliability of the test results.

[0086] The embodiments of this application do not impose excessive restrictions on the specific content of the exception handling mechanism, which can be set according to actual needs. For example, in some embodiments, a feedback mechanism can be set to provide feedback to the user when an abnormality occurs during the charging test, prompting the user to check the charging test. In other optional embodiments, the charging test can also be automatically stopped when an abnormality occurs to ensure the reliability of the test results.

[0087] As an optional embodiment of the present application, when the exception handling mechanism is triggered, it is possible to choose to stop periodically sending requests to the adapter.

[0088] S104, electronic device side: if the protocol code and verification information are received, the verification information is verified.

[0089] When the electronic device successfully receives the protocol code and verification information sent by the adapter, it first verifies the verification information to confirm the legitimacy of the source of the protocol code and the legitimacy of the content. Among them, the embodiment of the application does not make too many restrictions on the specific verification method, and can be selected according to the actual setting of the verification information.

[0090] As an optional embodiment of the present application, the verification information may include: a digital signature and a message authentication code. Based on this, the electronic device uses the public key of the adapter to verify the digital signature, uses the adapter's shared secret key K to recalculate the MAC value of the protocol code C, and compares it with the received MAC value. If the AMC verification is successful, it means that the protocol code has not been tampered with during the transmission process. Otherwise, the electronic device believes that the protocol has been tampered with, and the electronic device will request the adapter to resend the protocol code, digital signature, and message authentication code through a feedback signal. In this way, the accuracy of the protocol code transmission is guaranteed.

[0091] Specifically, the electronic device uses the adapter's public key public_key to verify the digital signature S. The verification process is as follows:

[0092] Calculate the hash value H(C) of the protocol code C: H(C)=Hash(C)

[0093] Verify signature S: The electronic device uses the adapter's public key public_key to decrypt signature S and compares it with the calculated hash value H(C). If the signature verification passes (that is, the hash values match), it means that the protocol code C comes from the adapter and has not been tampered with.

[0094] Verify the message authentication code (MAC): The electronic device uses the key K shared with the adapter to recalculate the message authentication code (MAC) for the protocol code C and compares it with the received MAC value.

[0095] Recalculate MAC value: The electronic device uses the shared key K and the protocol code C to recalculate the MAC value: MAC K (C)=HMAC-SHA-256(K, C)

[0096] Compare MAC value: The electronic device will recalculate the MAC K The value is compared with the received MAC value. If the two are consistent, it means that the protocol code C has not been tampered with during the transmission process. Otherwise, the electronic device will think that the protocol code may have been tampered with.

[0097] As an optional embodiment of the present application, if the verification information fails to be verified, the electronic device may continue to perform S102 to periodically attempt to send a request for protocol encoding to the adapter.

[0098] S105, electronic device side: if the verification information is verified, exit the pending state, determine the charging protocol executed in this charging test according to the protocol code, and determine the target charging mode associated with the charging protocol, and the target charging time is recorded in the target charging mode.

[0099] In the embodiment of the present application, each charging protocol is pre-set with a corresponding charging mode, which is set with specific charging parameters such as charging power and charging time. Therefore, after the verification information is verified, it indicates that the current adapter protocol is successfully matched and normal charging can begin. At this time, the embodiment of the present application will first confirm the charging protocol to be executed through the protocol code and filter out the charging mode specifically associated with the charging protocol (i.e., the target charging mode).

[0100] S106, electronic device side: Based on the target charging mode, the electronic device is charged through the adapter, and when the charging time reaches the target charging time, the charging test is stopped and the test result is recorded.

[0101] After determining the target charging mode to be used, the electronic device begins charging and starts immediately. When the charging time reaches the target charging time, it means that the required charging state has been reached. Then the charging is automatically stopped and the test results are recorded, completing the charging test, thus ensuring that each charging protocol is tested within the correct time range.

[0102] As an optional embodiment of the present application, the target charging time can be dynamically adjusted during the charging process to adapt as closely as possible to the actual charging status of the electronic device. Based on this, if the target charging time is updated, the latest target charging time is used as the basis for determining whether to stop charging.

[0103] As an optional embodiment of the present application, in order to ensure the safety of the entire charging test process, monitoring can be performed during the charging process. Figure 2 , including S107 at this time:

[0104] S107, electronic device side: During the charging process, detect in real time whether charging is abnormal, and suspend charging when charging abnormality occurs, and resume charging after the charging abnormality ends.

[0105] The embodiment of the present application will detect whether there is any abnormality in the charging process in real time, and suspend charging when there is an abnormality, thereby avoiding the risks that may be caused by the abnormality. At the same time, when the abnormality is detected to have ended and the battery returns to normal, charging will be resumed. The advantage of this is that a certain amount of recovery time can be given to the abnormal situation, and the charging test can be continued after it returns to normal, without relying entirely on manual operation by the staff or re-performing a new charging test. Among them, this application does not make too many restrictions on the specific detection method of whether the charging is abnormal, and it can be set according to actual needs.

[0106] As an optional embodiment of the present application, the status of the electronic device's battery can be monitored during charging, such as the battery charge level (e.g., charge growth rate), current level (e.g., current magnitude and rate of change), and temperature level (e.g., temperature). If one or more of these abnormalities are present, it is determined that charging is abnormal. Conversely, if all abnormalities disappear after an abnormality is present, charging is determined to have terminated abnormally.

[0107] As an optional embodiment of the present application, in actual applications, there are some anomalies that are difficult to recover in a short period of time after charging is suspended, but there is a high possibility that the anomaly will still exist when charging is resumed, causing the electronic device to cycle multiple times between suspending charging and ending charging, thereby bringing charging risks. For example, when the current situation is abnormal, charging is suspended. At this time, the current data will disappear, but the state of the battery will not change greatly in an instant. Therefore, if charging is resumed directly due to the disappearance of the current data, it is very likely that the current will still be abnormal. Based on this, in the embodiment of the present application, the timing will start after charging is suspended, and charging will be resumed when the timing exceeds the preset minimum stop time and the charging anomaly ends.

[0108] Furthermore, in other optional embodiments of the present application, different minimum stop times can be set based on the type of charging anomaly, i.e., different minimum stop times may correspond to different types of charging anomalies. Specifically, for anomalies related to battery parameters that change within a certain period of time after charging stops, such as temperature, the minimum stop time may be longer. Conversely, for battery parameters that remain essentially unchanged within a certain period of time after charging stops, such as battery charge level, the minimum stop time may be shorter. In other words, anomalies related to battery parameters that change within a certain period of time after charging stops have longer minimum stop times than anomalies related to parameters that remain stable within a certain period of time after charging stops.

[0109] As an optional embodiment of the present application, whether the charging is abnormal can be detected based on the current growth rate of the battery during the charging process. Figure 3 In the embodiment of the present application, “real-time detection of whether charging is abnormal” specifically includes:

[0110] S1071, detecting the real-time power growth rate of the electronic device battery.

[0111] The battery growth rate can be calculated by the change in battery charge per unit time. This is a prior art and will not be described in detail. It is understandable that the battery growth rate can be positive or negative. When it is negative, it indicates that the battery charge is decreasing.

[0112] S1072: Predicting an estimated power growth rate of the electronic device battery based on the characteristic data of the electronic device battery and the historical power growth data in the historical charging data.

[0113] In the embodiments of the present application, characteristic data of the electronic device's battery, such as battery capacity, material, and model, is collected in advance, along with historical charging data. A prediction model for the rate of battery charge growth in the electronic device is then constructed based on the battery characteristic data and historical charge growth data. This allows for a real-time estimate of the rate of battery charge growth in the electronic device, i.e., a theoretical rate of battery charge growth based on the device's historical charging patterns.

[0114] S1073: If the difference between the real-time power growth rate and the estimated power growth rate is greater than a preset error range, it is determined that a charging abnormality occurs.

[0115] If the difference between the real-time battery growth rate and the estimated battery growth rate is too large, it indicates that the battery's current battery growth rate does not meet its historical charging pattern, and there may be a certain risk of abnormality. Therefore, it can be determined that an abnormality has occurred. The present embodiment does not impose excessive restrictions on the error range and can be set according to actual needs.

[0116] The embodiments of the present application can realize real-time detection of whether the change in power level during battery charging is abnormal, thereby realizing accurate identification of related abnormal situations.

[0117] As an optional embodiment of the present application, in order to minimize the damage to the battery during the charging process, protect the health of the battery, and extend the life of the battery, the charging test is made more consistent with the actual charging scenario, thereby improving the accuracy, reliability, and stability of the charging test. Figure 4 , the embodiment of the present application also includes:

[0118] S108, electronic device side: During the charging process, the target charging time and charging power are dynamically adjusted according to the health status of the battery itself, and the electronic device is charged through the adapter based on the adjusted target charging time and charging power.

[0119] The battery health status includes the health status of the battery hardware itself and / or the health status of the current battery charging process. Generally, charging time is negatively correlated with the battery health status: the healthier the battery, the shorter the charging time, and vice versa, the less healthy the battery, the longer the charging time. Charging power is positively correlated with the battery health status: the healthier the battery, the higher the charging power, and vice versa, the less healthy the battery, the lower the charging power. If the battery health status is poor (such as due to aging or damage), the system can automatically reduce the charging power and increase the charging time to extend the battery life. In other words, the adjusted target charging time is negatively correlated with the battery health status, while the adjusted charging power is positively correlated with the battery health status.

[0120] The health status of the battery hardware itself can be determined by analyzing parameters such as the maximum battery charge, or by pre-analysis by technicians or electronic equipment. The health status of the battery during charging can be determined by real-time monitoring of parameters such as battery charge, current, and temperature.

[0121] As a specific embodiment of the present application, the maximum battery capacity can be used as one of the reference indicators of the health status. In this case, the target charging time can be adjusted according to the maximum battery capacity, the real-time battery capacity and the charging power. Specifically, it includes:

[0122] S1081: Adjust the target charging time in real time based on the maximum battery capacity, real-time battery capacity, and charging power. The formula is as follows:

[0123] (2)

[0124] Among them, Efull is the maximum power of the battery, and Pcharge (E) is the charging power at a certain power stage (i.e. real-time power).

[0125] In an embodiment of the present application, the target charging time can automatically change according to the optimization of the charging curve, so as to better adapt to the real-time situation of the battery and protect the health of the battery.

[0126] As another specific embodiment of the present application, the charging power is dynamically adjusted according to the health status of the battery. Specifically, it includes:

[0127] S1082: Adjust the charging power based on the maximum supported charging power and health status of the battery. The formula is as follows:

[0128] Pcharge=Pmax×(1−β×H) (3)

[0129] Where: Pmax is the maximum charging power supported by the battery, and Pcharge is the adjusted value. β is the adjustment coefficient, which is used to adjust the power output based on the battery's health status. H is the battery's health status (0 indicates healthy, 1 indicates damaged, 0 ≤ H ≤ 1). The battery's health status can be pre-set, updated over the battery's service life, and monitored in real time. This dynamic adjustment makes the charging process more intelligent, automatically optimizing the charging process for different battery conditions.

[0130] As another specific embodiment of the present application, since the charging mode includes charging time and charging power, in the embodiment of the present application, the target charging time and charging power can be adjusted by switching the charging mode, specifically including:

[0131] S1083 , dynamically switching the target charging mode according to the health status of the battery charging process, and adjusting the target charging time and real-time charging power based on the switched target charging mode.

[0132] In an embodiment of the present application, the appropriate charging mode can be dynamically adjusted according to the battery's charging status, thereby making the charging process more intelligent, automatically optimizing the charging process for different battery states, and protecting the battery at the same time. For example, a fast charging protocol is used in the initial charging stage, and a trickle charging mode (low current) is switched when the battery is nearly full to prevent the battery from overheating. The health status of the battery charging process can be analyzed by real-time monitoring of parameters such as battery power, current, and temperature, which are not further limited here.

[0133] Corresponding to the method of the above embodiment, Figure 5 A structural block diagram of a charging test control device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown. Figure 5 The exemplary charging test control device may be an execution subject of the charging test control method provided in the aforementioned first embodiment.

[0134] Reference Figure 5 The charging test control device includes: a device for charging an electronic device:

[0135] The request sending module 51 is configured to periodically send a request for the protocol code to the adapter at preset time intervals if the protocol code sent by the adapter is not received in a pending state.

[0136] The verification module 52 is configured to verify the verification information upon receiving the protocol code and verification information sent by the adapter.

[0137] The mode determination module 53 is used to exit the pending state if the verification information is verified successfully, determine the charging protocol executed in this charging test according to the protocol code, and determine the target charging mode associated with the charging protocol, the target charging mode including the target charging time.

[0138] The charging control module 54 is configured to charge the electronic device through the adapter based on the target charging mode, and stop the charging test when the charging time reaches the target charging time.

[0139] The process of each module in the charging test control device provided in the embodiment of the present application realizing its own function can be specifically referred to the aforementioned Figures 1 to 4 The description of any illustrated embodiment will not be repeated here.

[0140] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0141] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0142] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0143] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0144] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish descriptions and should not be understood as indicating or implying relative importance. It should also be understood that although the terms "first", "second", etc. are used in the text to describe various elements in some embodiments of the present application, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first table can be named a second table, and similarly, a second table can be named a first table without departing from the scope of the various described embodiments. Both the first table and the second table are tables, but they are not the same table.

[0145] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0146] The charging test control method provided in the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.

[0147] For example, the electronic device may be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with wireless communication capabilities, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a vehicle networking terminal, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite wireless device, a wireless modem card, a TV set-top box (STB), customer premise equipment (CPE) and / or other devices for communicating on a wireless system and a next-generation communication system, such as a mobile terminal in a 5G network or a mobile terminal in a future evolved Public Land Mobile Network (PLMN) network.

[0148] As an example and not a limitation, when the electronic device is a wearable device, the wearable device can also be a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are full-featured, large in size, and can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.

[0149] Figure 6 Schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 6 As shown, the electronic device 6 of this embodiment includes: at least one processor 60 ( Figure 6 Only one is shown), a memory 61, wherein the memory 61 stores a computer program 62 that can be run on the processor 60. When the processor 60 executes the computer program 62, the steps in the above-mentioned various charging test control method embodiments are implemented, such as Figure 1 Alternatively, when the processor 60 executes the computer program 62, the functions of the modules / units in the above-mentioned device embodiments are realized, for example, Figure 5 The functions of modules 61 to 64 are shown.

[0150] The electronic device 6 can be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device can include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will understand that Figure 6 It is only an example of the electronic device 6 and does not constitute a limitation of the electronic device 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include an input sending device, a network access device, a bus, etc.

[0151] The processor 60 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0152] In some embodiments, the memory 61 may be an internal storage unit of the electronic device 6, such as a hard drive or memory of the electronic device 6. The memory 61 may also be an external storage device of the electronic device 6, such as a plug-in hard drive, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. equipped on the electronic device 6. Furthermore, the memory 61 may include both an internal storage unit of the electronic device 6 and an external storage device. The memory 61 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of the computer program. The memory 61 may also be used to temporarily store data that has been sent or is about to be sent.

[0153] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0154] An embodiment of the present application also provides an electronic device, which includes at least one memory, at least one processor, and a computer program stored in the at least one memory and executable on the at least one processor. When the processor executes the computer program, the electronic device implements the steps of any of the above-mentioned method embodiments.

[0155] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned various method embodiments can be implemented.

[0156] An embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0157] If the integrated module / unit is implemented in the form of 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 present application can implement all or part of the processes in the above-mentioned embodiment method by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium.

[0158] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0159] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0160] The units described as separate components may or may not be physically separate, and 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 network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0161] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A charging test control method, characterized in that: Applied to charging test of electronic equipment, the method includes: In the pending state, if the protocol code sent by the adapter is not received, periodically sending a request for the protocol code to the adapter at a preset time interval; If the protocol code and verification information sent by the adapter are received, verifying the verification information; If the verification information is verified, exit the pending state, determine the charging protocol executed in this charging test according to the protocol code, and determine the target charging mode associated with the charging protocol, wherein the target charging mode includes a target charging time; Based on the target charging mode, charging the electronic device through the adapter, and stopping the charging test when the charging time reaches the target charging time; During the charging process of the electronic device, whether charging is abnormal is detected in real time, and charging is suspended when charging abnormality occurs, and charging is resumed after the charging abnormality ends; The real-time detection of whether charging is abnormal includes: Detecting the real-time power growth rate of the battery of the electronic device; Predicting an estimated power growth rate of the electronic device battery based on the characteristic data of the electronic device battery and historical power growth data in the historical charging data; If the difference between the real-time power growth rate and the estimated power growth rate is greater than a preset error range, it is determined that a charging abnormality occurs.

2. The charging test control method according to claim 1, wherein: Also includes: If the protocol code is not received for a preset time threshold, or the total number of times the request is sent reaches a preset number threshold and the protocol code is not received, the exception handling mechanism is triggered.

3. The charging test control method according to claim 1, wherein: Periodically sending a request for the protocol code to the adapter at preset time intervals, further comprising: The preset time is determined according to a success probability of a historical protocol match between the adapter and the electronic device, wherein the preset time is negatively correlated with the success probability.

4. The charging test control method according to claim 3, wherein: The calculation formula of the preset time is as follows: Ttimeout=T0×(1+α×(1-Pmatch)); Wherein, Ttimeout is the preset time, T0 is the preset basic timeout time, α is the preset adjustment coefficient, and Pmatch is the success probability of historical protocol matching between the adapter and the electronic device.

5. The charging test control method according to claim 4, wherein: Also includes: During the process of charging the electronic device, the target charging time and charging power are dynamically adjusted according to the health status of the battery of the electronic device, and the electronic device is charged through the adapter based on the adjusted target charging time and charging power.

6. The charging test control method according to claim 5, wherein: The dynamically adjusting the target charging time according to the health status of the battery of the electronic device includes: The target charging time is adjusted in real time according to the maximum power, real-time power and charging power of the electronic device battery. The formula is as follows: Among them, Efull is the maximum power of the battery of the electronic device, and Pcharge(E) is the charging power corresponding to the real-time power.

7. The charging test control method according to claim 5, wherein: The dynamically adjusting the target charging time according to the health status of the battery of the electronic device includes: The charging power is adjusted according to the maximum charging power supported by the battery of the electronic device and the health status. The formula is as follows: Pcharge = Pmax × (1-β × H); Wherein, Pmax is the maximum charging power supported by the battery of the electronic device, Pcharge is the adjusted charging power, β is a preset adjustment coefficient, and H is the health status of the battery, 0≤H≤1.

8. An electronic device, characterized in that: The electronic device includes a memory, a processor and a battery. The memory stores a computer program that can be run on the processor. When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

9. A charging test system, characterized in that: comprising the electronic device and the adapter as claimed in claim 8; The adapter is used to generate the protocol code and the verification information and send them to the electronic device; The adapter is further configured to, upon receiving the request sent by the electronic device, send the protocol code and the verification information to the electronic device in response to the request.

Citation Information

Patent Citations

  • Rapid topology detection method based on 802.11 radio frame

    CN113852974A

  • Charging test method, electronic equipment, adapter and charging test system

    CN114050634A

  • Protocol adaptation method and device, equipment and storage medium

    CN117097813A