Charging test control method, electronic equipment and charging test system

By periodically retrying the protocol encoding request in the charging test and adjusting the preset time according to the probability of success of historical matching, the problem of protocol encoding communication delay or loss is solved, and the accuracy and reliability of the charging test are improved.

CN119813477AActive Publication Date: 2025-04-11SHENZHEN LONGXC POWER SUPPLY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510249007.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-04-11
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 and inaccurate charging time control, which affects the accuracy, stability and reliability of the charging test.

Method used

By periodically retrying the request for protocol encoding when no correct protocol encoding is received, and dynamically adjusting the preset time according to the success probability of historical protocol matching between the adapter and the electronic device, to improve the success rate of protocol encoding matching.

Benefits of technology

Reduces the problems of protocol encoding loss and synchronization errors, and improves the accuracy, stability and reliability of charging tests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119813477A_ABST
    Figure CN119813477A_ABST
Patent Text Reader

Abstract

The invention provides a charging test control method, electronic equipment and a charging test system, which are suitable for the technical field of charging test and are applied to the charging test of the electronic equipment, and the method comprises the following steps: in an undetermined state, if a protocol code sent by an adapter is not received, taking a preset time as an interval; periodically sending a request for protocol coding to the adapter; if the protocol code and the verification information sent by the adapter are received, verifying the verification information; if the verification information passes the verification, exiting from the undetermined state, determining a charging protocol executed by the charging test according to the protocol code, and determining a target charging mode associated with the charging protocol, the target charging mode including target charging time; and based on the target charging mode, charging the electronic equipment through the adapter, and stopping the charging test when the charging time reaches the target charging time. According to the embodiment of the invention, the accuracy, stability and reliability of the charging test can be improved.
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 popularity of smart electronic devices (such as smartphones, tablets, laptops, etc.), innovation and progress in charging technology have become key aspects of electronic device design. Adapters, as crucial devices in the charging process, usually provide multiple charging protocols to adapt to different types of electronic devices, ensuring that the devices can be charged safely and efficiently in different environments. With the diversification of charging protocols (such as fast charging protocols, standard charging protocols, etc.), the demand for charging testing has also increased, especially in testing the compatibility of charging protocols with charging devices.

[0003] The adapter and the electronic device usually exchange charging protocol information through protocol coding. In the existing charging test process, the adapter generally sends the protocol code to the electronic device, and the electronic device determines the charging protocol supported by the adapter based on the protocol code and performs the charging operation. In this process, the sending and receiving of the protocol code usually depends on the communication synchronization between the adapter and the electronic device. However, in actual applications, problems such as communication delay or loss of the protocol code may be encountered, which will directly affect the switching of the charging protocol, the control of the charging time, and the accuracy, stability and reliability of the charging test.

[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 the charging test.

[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, and the method includes: 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 a preset time interval.

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

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

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

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

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

[0012] In a possible implementation manner of the first aspect, periodically sending a request for a protocol code to an adapter at a preset time interval further includes: 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.

[0013] In a possible implementation manner of the first aspect, a calculation formula for 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 the historical protocol matching between the adapter and the electronic device.

[0014] 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 charging abnormality occurs, and charging is resumed after charging abnormality ends.

[0015] In a possible implementation manner of the first aspect, detecting in real time whether charging is abnormal includes: Detect the real-time power growth rate of the electronic device battery.

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

[0017] 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 charging abnormality occurs.

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

[0019] 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: 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 electronic device battery, and Pcharge (E) is the charging power corresponding to the real-time power.

[0020] 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: Adjust the charging power according to the maximum charging power and health status of the electronic device battery. The formula is as follows: Pcharge = Pmax × (1 − β × H) Where Pmax is the maximum charging power supported by the electronic device battery, Pcharge is the adjusted charging power, β is the preset adjustment coefficient, H is the health status of the battery, 0≤H≤1.

[0021] A second aspect of an embodiment of the present application provides a charging test control device, which is applied to a charging test of an electronic device, and the device includes: The request sending module is used to periodically send a request for the protocol code to the adapter at a preset time interval if the protocol code sent by the adapter is not received in a pending state.

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

[0023] The mode determination module 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, wherein the target charging mode includes the target charging time.

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

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

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

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

[0028] The adapter is also used to, when receiving a request sent by the electronic device, send the protocol code and verification information to the electronic device in response to the request.

[0029] A fifth aspect of an embodiment of the present application provides a computer-readable storage medium, comprising: a computer program stored therein, wherein when the computer program is executed by a processor, the steps of the charging test control method as described in any one of the first aspects above are implemented.

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

[0031] The beneficial effect of the embodiments of the present application compared with the prior art is that the electronic device can continuously try to obtain the correct protocol code by periodically retrying the request for protocol code when the correct protocol code is not received, thereby reducing the problems of protocol code loss and synchronization errors, and further improving the accuracy of charging tests. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying any creative labor.

[0033] Figure 1 It is a schematic diagram of the implementation flow of the charging test control method provided in the embodiment of the present application; Figure 2 It 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; Figure 3 It is a schematic diagram of the implementation process of real-time detection of whether charging is abnormal in the charging test control method provided in the embodiment of the present application; Figure 4 It 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; Figure 5 is a structural schematic diagram of a charging test control device provided in an embodiment of the present application; Figure 6It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also 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 prevent unnecessary details from obstructing the description of the present application.

[0035] With the popularity of smart electronic devices (such as smartphones, tablets, laptops, etc.), innovation and progress in charging technology have become key aspects of electronic device design. Adapters, as crucial devices in the charging process, usually provide multiple charging protocols to adapt to different types of electronic devices, ensuring that the devices can be charged safely and efficiently in different environments. With the diversification of charging protocols (such as fast charging protocols, standard charging protocols, etc.), the demand for charging testing has also increased, especially in testing the compatibility of charging protocols with charging devices.

[0036] The adapter and the electronic device usually exchange charging protocol information through protocol coding. In the existing charging test process, the adapter generally sends the protocol code to the electronic device, and the electronic device determines the charging protocol supported by the adapter based on the protocol code and performs the charging operation. In this process, the sending and receiving of the protocol code usually depends on the communication synchronization between the adapter and the electronic device. However, in actual applications, problems such as communication delay or loss of the protocol code may be encountered, which will directly affect the switching of the charging protocol, the control of the charging time, and the accuracy of the charging test.

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

[0038] In the embodiment of the present application, from the perspective of improving the correct protocol coding matching rate and from the perspective of optimizing the charging process by adaptively using the charging state, the charging time of the charging test process is made as real and reasonable as possible, thereby comprehensively improving the accuracy, stability and reliability of the charging test. Specifically including: 1. When the correct protocol code is not received, the electronic device periodically retries the request protocol code + sets a limit on the maximum number of retries requested / retry timeout to stop charging test, so that the electronic device can continuously try to obtain the correct protocol code, while avoiding unlimited attempts that cause the electronic device to be in an incorrect charging state for a long time.

[0039] Specifically, it can avoid the situation where the protocol code matching cannot be performed normally due to delay or loss of the protocol code during the communication process, thereby improving the success rate of the protocol matching. Based on this, using the correct protocol code can make the current charging test more consistent with the actual charging protocol situation, avoid the electronic device being in the wrong charging state, and thus improve the accuracy, stability and reliability of the current charging test.

[0040] 2. After receiving the correct protocol code and starting charging, optimize the charging process. Specifically, dynamically adjust the charging time and charging power according to the health status of the battery, so that the entire charging process is more in line with the actual situation of the battery, so that the charging time of the charging test process is as real and reasonable as possible.

[0041] 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 collection, tablet computer, desktop computer, notebook, PDA and cloud server, etc., which are not specifically limited here.

[0042] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.

[0043] 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: In the charging test scenario, with the adapter and electronic device connected and not started: S101, the adapter generates a protocol code and verification information, and actively sends them to the electronic device. If a request sent by the electronic device is received, the adapter sends the protocol code and verification information to the electronic device in response to the request.

[0044] 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 content of the protocol code, i.e., whether there is an error or tampering. Based on this, the embodiment of the present application does not make too many restrictions on the specific data contained in the verification information, i.e., the generation method.

[0045] In some optional embodiments, the verification information may include: a digital signature and a message authentication code (MAC). At this time, the adapter first generates a protocol code C based on the relevant parameters of the charging protocol (such as voltage V, current I, charging mode M, etc.). The protocol code C is the key data used by the electronic device to identify and execute the charging protocol. Secondly, the adapter uses its private key to sign the protocol code C to generate a digital signature. The digital signature is used to verify the source of the protocol code and whether it has been tampered with during transmission.

[0046] 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. MAC is used to verify the integrity of the protocol code and ensure that the data has not been tampered with during transmission.

[0047] The protocol code C is calculated from the charging protocol parameters P. Define the charging protocol parameters P = (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 design of the protocol. Mathematical expression: 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.

[0048] The generation of digital signature S and message authentication code (MAC) is as follows: Generate digital signature S: The adapter uses the private key private_key to sign the protocol code C and generate a digital signature S to verify the integrity and source of the data. The signature is obtained by encrypting the hash value H(C) of the protocol code.

[0049] 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 means using the adapter's private key to encrypt the hash value to generate a digital signature S.

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

[0051] Generate a message authentication code (MAC): The adapter uses the shared key K to encrypt the protocol code C 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 the MAC based on the SHA-256 algorithm as follows: MAC=HMAC-SHA-256(K,C) 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: 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).

[0052] S102, the electronic device side enters a 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 a preset time interval, and the total number of requests sent to the adapter in the current pending state is recorded.

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

[0054] In the pending state, the electronic device normally receives information sent by the adapter, such as protocol code and verification information. On the other hand, the electronic device will also count when it does not receive the protocol code sent by the adapter, and send a request for the protocol code every preset time to request 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. Among them, the embodiment of the present application does not make too many restrictions on the specific value of the preset time, and it can be set according to actual needs.

[0055] 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 is originally connected to the electronic device slowly, if the preset time is set too short, it cannot meet the normal situation, but if the preset time is set too long, it will cause the entire retry phase to be too long, which is not conducive to the test of the actual required charging time in the charging test (it will make the measured charging time longer). Therefore, in the present application example, the maximum waiting time (i.e., preset time) for waiting for the protocol encoding can be dynamically adjusted according to 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.

[0056] As a specific embodiment of the present application, the calculation formula of the preset time Ttimeout is as follows: Ttimeout=T0×(1+α×(1-Pmatch)) (1) Among them, 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.

[0057] As another specific embodiment of the present application, multiple preset times of different lengths can be preset, and the required preset time can be selected according to 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.

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

[0059] In order to avoid the situation where the electronic device is in an incorrect charging state for a long time even though the protocol code is not received normally for a long time but the request is still continuously attempted. In the embodiment of the present application, a timeout limit mechanism is set, that is, when the protocol code is not received for too long (that is, when the time threshold is exceeded), or when a large number of requests are sent (that is, when the number threshold is exceeded) and the protocol code is still not received (this means that the protocol code has been lost too many times in a row), it is considered that there is an abnormality in the current charging test, and it is processed according to the preset abnormality handling mechanism to ensure the reliability of the test result.

[0060] Among them, the embodiments of the present application do not make too many restrictions on the specific content of the exception handling mechanism, which can be set according to actual needs. For example, in some embodiments, some feedback mechanisms can be set to provide feedback to the user when there is an abnormality in the charging test to remind the user to check the charging test. In other optional embodiments, it is also possible to automatically stop the charging test when there is an abnormality in the charging test to ensure the reliability of the test results.

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

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

[0063] 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 present application does not make too many restrictions on the specific verification method, which can be selected according to the actual setting of the verification information.

[0064] 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 shared secret key K of the adapter 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.

[0065] Specifically, the electronic device uses the public key public_key of the adapter to verify the digital signature S. The verification process is as follows: Calculate the hash value H(C) of the protocol code C: H(C)=Hash(C) 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 (i.e., the hash value matches), it means that the protocol code C comes from the adapter and has not been tampered with.

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

[0067] 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) 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.

[0068] 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 the protocol code to the adapter.

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

[0070] In the embodiment of the present application, each charging protocol is pre-set with a corresponding charging mode, and the charging mode is set with specific charging parameters such as charging power and charging time. Therefore, after the verification information is verified, it means that the current match with the adapter protocol is successful, 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).

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

[0072] After determining the target charging mode to be used, the electronic device starts charging and starts to charge. When the charging time reaches the target charging time, it means that the required charging state is reached at this time, then the charging is automatically stopped and the test results are recorded to complete the charging test, thereby ensuring that each charging protocol is tested within the correct time range.

[0073] As an optional embodiment of the present application, the target charging time can be dynamically corrected during the charging process to adapt to the actual charging situation of the electronic device as much as possible. 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.

[0074] 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: S107, electronic device side: during the charging process, detect in real time whether the charging is abnormal, and suspend charging when the charging abnormality occurs, and resume charging after the charging abnormality ends.

[0075] 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, so as to avoid the risks that may be caused by the abnormality. At the same time, when the abnormality is detected to have ended and returned to normal, charging is resumed. The advantage of this is that a certain 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.

[0076] As an optional embodiment of the present application, the state of the electronic device battery can be monitored during the charging process, such as the battery power (such as the growth rate of power), current (such as the magnitude and rate of change of current), temperature (such as the temperature), etc. When one or more of them are abnormal, it is determined that the charging is abnormal. On the contrary, if all abnormal items disappear after the abnormality exists, it is determined that the charging is abnormally terminated.

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

[0078] Furthermore, in some other optional embodiments of the present application, different minimum stop times can be set according to the type of charging anomaly, that is, the minimum stop times corresponding to different types of charging anomalies are not exactly the same. Specifically, for anomalies related to parameters that will change within a certain period of time after the battery stops charging, such as temperature, the minimum stop time can be longer. And for parameters that will basically not change within a certain period of time after the battery stops charging, such as power, the minimum stop time can be shorter. That is, the minimum stop time of the anomaly type related to parameters that will change within a certain period of time after the battery stops charging is longer than the minimum stop time of the anomaly type related to parameters that are stable within a certain period of time after the battery stops charging.

[0079] As an optional embodiment of the present application, whether charging is abnormal can be detected according to 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: S1071, detecting the real-time power growth rate of the electronic device battery.

[0080] The power growth rate can be calculated by the change in battery power per unit time, which is a prior art and will not be described in detail. It can be understood that the power growth rate can be positive or negative. When it is negative, it means that the power is decreasing.

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

[0082] In the embodiment of the present application, the characteristic data of the electronic device battery, such as battery capacity, material, model, etc., are collected in advance, and the historical charging data is recorded at the same time, and then a prediction model for the growth rate of the battery power of the electronic device is constructed based on the characteristic data of the battery and the historical power growth data. Based on this, the real-time estimated power growth rate of the electronic device battery is achieved, that is, the theoretical battery power growth rate under its historical charging law is met.

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

[0084] When the difference between the real-time power growth rate and the estimated power growth rate is too large, it means that the battery power growth rate under current charging does not meet its historical charging rules, and there may be a certain abnormal risk. Therefore, it can be determined that an abnormality has occurred. Among them, the embodiment of the present application does not make too many restrictions on the error range, which can be set according to actual needs.

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

[0086] As an optional embodiment of the present application, in order to minimize the damage to the battery during the charging process, to protect the health of the battery and to extend the life of the battery, the charging test is made more in line 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: S108, electronic device side: During the charging process, dynamically adjust the target charging time and charging power according to the health status of its own battery, and charge the electronic device through the adapter based on the adjusted target charging time and charging power.

[0087] Among them, the health status of the battery includes the health status of the battery's own hardware and / or the health status of the current battery charging process. Generally, the charging time is negatively correlated with the health status, that is, the healthier the battery is, the shorter the charging time is, and vice versa, the less healthy the battery is, the longer the charging time is. The charging power is positively correlated with the health status, that is, the healthier the battery is, the greater the charging power is, and vice versa, the less healthy the battery is, the lower the charging power is. If the battery health status is poor (such as aging or damage), the system can automatically reduce the charging power and increase the charging time to extend the battery life. That is, the adjusted target charging time is negatively correlated with the health status of the battery, while the adjusted charging power is positively correlated with the health status of the battery.

[0088] The health status of the battery hardware itself can be obtained by analyzing the battery's maximum power and other parameters, or by technicians or electronic equipment in advance. The health status of the battery charging process can be analyzed by real-time monitoring of battery power, current, temperature and other parameters.

[0089] As a specific embodiment of the present application, the maximum battery power can be used as one of the reference indicators of the health status. At this time, the target charging time can be adjusted according to the maximum battery power, the real-time battery power and the charging power. Specifically including: S1081, adjusting the target charging time in real time according to the maximum power of the battery, the real-time power and the charging power, the formula is as follows: (2) 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).

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

[0091] 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: S1082: Adjust the charging power according to the maximum charging power supported by the battery and the health status. The formula is as follows: Pcharge=Pmax×(1−β×H) (3) Where: Pmax is the maximum charging power supported by the battery, and Pcharge is the adjusted value. β is the adjustment coefficient used to adjust the power output according to the battery health status. H is the battery health status (0 means healthy, 1 means the battery is damaged, 0≤H≤1). The battery health status can be set in advance and updated as the battery life increases, and can also be monitored in real time. Through this dynamic adjustment, the charging process can be more intelligent and automatically optimized for different battery states.

[0092] As another specific embodiment of the present application, since the charging mode includes the charging time and the charging power, in the embodiment of the present application, the target charging time and the charging power can be adjusted by switching the charging mode, specifically including: S1083, dynamically switch the target charging mode according to the health status of the battery charging process, and adjust the target charging time and real-time charging power based on the switched target charging mode.

[0093] In an embodiment of the present application, the appropriate charging mode can be dynamically adjusted according to the charging state of the battery, so that the charging process can be more intelligent, and the charging process can be automatically optimized for different battery states while protecting the battery. For example, a fast charging protocol is used in the initial stage of charging, and a trickle charging mode (small current) is switched when the battery is nearly full to prevent the battery from overheating. Among them, the health status of the battery charging process can be analyzed by real-time monitoring of battery power, current, temperature and other parameters, which are not limited here.

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

[0095] Reference Figure 5 The charging test control device includes: a charging test for an electronic device: The request sending module 51 is used to periodically send a request for the protocol code to the adapter at a preset time interval if the protocol code sent by the adapter is not received in the pending state.

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

[0097] The mode determination module 53 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, and the target charging mode includes the target charging time.

[0098] The charging control module 54 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.

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

[0100] 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 the present application.

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

[0102] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0103] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" 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 "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0104] 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 cannot be understood as indicating or suggesting relative importance. It should also be understood that although the terms "first", "second", etc. are used to describe various elements in some embodiments of the present application in the text, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, the first table can be named as the second table, and similarly, the second table can be named as the first table without departing from the scope of the various described embodiments. The first table and the second table are both tables, but they are not the same table.

[0105] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0106] The charging test control method provided in the embodiment 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 (UMPC), netbooks, personal digital assistants (PDA), etc. The embodiment of the present application does not impose any restrictions on the specific type of electronic devices.

[0107] 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 function, 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), a customer premises 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, etc.

[0108] As an example but not 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 just hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are fully functional, 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 types of smart bracelets and smart jewelry for vital sign monitoring.

[0109] 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 in the figure), 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 charging test control method embodiments are implemented, such as Figure 1 Alternatively, when the processor 60 executes the computer program 62, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 5The functions of modules 61 to 64 are shown.

[0110] The electronic device 6 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will appreciate 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.

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

[0112] In some embodiments, the memory 61 may be an internal storage unit of the electronic device 6, such as a hard disk 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 disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the electronic device 6. The memory 61 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory 61 may also be used to temporarily store data that has been sent or is to be sent.

[0113] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0114] 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, wherein when the processor executes the computer program, the electronic device implements the steps of any of the above-mentioned method embodiments.

[0115] 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 method embodiments can be implemented.

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

[0117] 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 implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.

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

[0119] Those of ordinary skill 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 to be beyond the scope of this application.

[0120] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0121] The embodiments described above 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, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A charging test control method, characterized in that: Applied to charging test of electronic equipment, the method comprises: 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, the electronic device is charged through the adapter, and the charging test is stopped when the charging time reaches the target charging time.

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

3. The charging test control method according to claim 1, characterized in that: The method further comprises: periodically sending a request for the protocol encoding to the adapter at a preset time interval. 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.

4. The charging test control method according to claim 3, characterized in that: 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 the historical protocol matching between the adapter and the electronic device.

5. The charging test control method according to claim 4, characterized in that: Also includes: During the process of charging the electronic device, whether the charging is abnormal is detected in real time, and charging is suspended when the 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 the 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 charging abnormality occurs.

6. The charging test control method according to claim 4, characterized in that: Also includes: During the process of charging the electronic device, the target charging time and the 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 the charging power.

7. The charging test control method according to claim 6, characterized in that: 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 battery of the electronic device, and 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.

8. The charging test control method according to claim 6, characterized in that: 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, and the formula is as follows: Pcharge = Pmax × (1 − β × H); Among them, 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, H is the health status of the battery, 0≤H≤1.

9. An electronic device, characterized in that: The electronic device comprises a memory, a processor and a battery, wherein the memory stores a computer program executable on the processor, and the processor implements the steps of the method according to any one of claims 1 to 8 when executing the computer program.

10. A charging test system, characterized in that: comprising the electronic device and the adapter as claimed in claim 9; 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

  • Intelligent control method and system of wireless charger and storage medium

    CN117439240A

  • Personal medical device communication system and method

    US20040246128A1