Reverse charging test method and device, electronic equipment and storage medium
By using the test controller in the reverse charging test to obtain the communication test results and compare the information transmission and reception consistency, the communication failure analysis and stability problems of reverse charging test in the prior art are solved, and a more convenient and stable test method is achieved.
Patent Information
- Application Number
- CN202411935846.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, when conducting reverse charging tests, communication failures require the analysis of device logs to be laborious, and the reverse charging stability test method is unstable, making it difficult to locate the cause of the test failure.
A reverse charging test method is provided, which obtains communication test results through the test controller, compares whether the information transmission and reception of the equipment to be tested and the test terminal are consistent when performing charging tests to the test controller at the same time, and determines the reverse charging test results.
Effectively and accurately verify the integrity and stability of the reverse charging function of the equipment to be tested, reducing dependence on the equipment logs and improving the convenience and stability of testing.
Smart Images

Figure CN119805048A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of battery charging, and in particular to a reverse charging test method, device, electronic equipment and storage medium. Background Art
[0002] With the rapid development of science and technology, electronic devices have become an indispensable part of daily life. In addition to basic communication functions, electronic devices also integrate many advanced technologies and functions, among which the reverse charging function is an innovative technology that has attracted much attention in recent years. Reverse charging means that electronic devices can not only receive other power sources for charging, but also output their own power to other devices. The emergence of this function has greatly expanded the use scenarios and practicality of electronic devices.
[0003] The integrity test of reverse charging is mainly reflected in the master-slave switching test, which is done by clicking the master / slave device on one device to switch, but the other device may have communication anomalies due to incompatibility. When the master-slave device switching is not supported during the test, it is often necessary to analyze the device logs of the two device ends separately to find out the cause of the problem, which is time-consuming and laborious.
[0004] When conducting reverse charging stability tests, the current stage is to use a manual intelligent hub (HUB) to simulate USB power on and off to start or end the reverse charging operation. This test method is relatively unstable and may cause the test to fail due to problems with the HUB itself, and the problem is not easy to analyze.
[0005] In view of this, there is an urgent need to provide a more convenient and stable reverse charging method and device to solve the defects of the existing testing methods. Summary of the invention
[0006] The present invention provides a reverse charging test method, device, electronic device and storage medium, which are used to solve the problem that in the prior art, if a communication failure occurs during the reverse charging integrity test, it is necessary to analyze the device log, which is time-consuming and laborious, and when testing the reverse charging stability, it is difficult to locate the defect of analyzing the cause of the test failure.
[0007] The present invention provides a reverse charging test method, comprising the following steps: Acquire a communication test result, wherein the communication test result includes a first test result of a charging test performed by the device under test on the test controller and a second test result of a charging test performed by the test terminal on the test controller; When the communication test result is normal, the information received and sent by the device under test and the test terminal when performing charging test on the test controller simultaneously is compared to determine the reverse charging test result of the device under test according to the comparison result.
[0008] According to a reverse charging test method provided by the present invention, the first test result is obtained by testing using the following steps, including: Determining a first communication connection state between the device under test and the test controller; When determining that the first communication connection state is normal, obtaining the battery voltage of the device under test; When it is determined that the battery voltage is greater than the reverse charging voltage threshold of the device under test, controlling the device under test to charge the test controller until a first interface prompt appears on the interface of the device under test, wherein the first interface prompt is used to indicate that the battery voltage is too low; Obtaining the battery power of the device under test; The first test result is determined according to an interface prompt when the battery power reaches a battery power threshold of the device to be tested.
[0009] According to a reverse charging test method provided by the present invention, determining the first test result according to an interface prompt when the battery power reaches a battery power threshold of the device to be tested includes: If it is determined that the battery power is less than or equal to the battery power threshold, determining whether a second interface prompt appears on the interface of the device under test, the second interface prompt being used to indicate that the battery power of the device under test is too low; In the case where it is determined that the second interface prompt appears and the second interface prompt can be triggered, determining that the first test result is normal; Otherwise, it is determined that the first test result is abnormal.
[0010] According to a reverse charging test method provided by the present invention, if it is determined that the battery power is greater than the battery power threshold of the device to be tested, the method further includes: Lowering the reverse charging voltage threshold of the device under test; The battery voltage of the device under test is re-acquired to re-determine the first test result according to the re-acquired battery voltage and the reduced reverse charging voltage threshold.
[0011] According to a reverse charging test method provided by the present invention, when it is determined that the battery voltage is not greater than the reverse charging voltage threshold of the device under test, a third interface prompt is displayed on the interface of the device under test, and the third interface prompt is used to remind the device under test to charge.
[0012] According to a reverse charging test method provided by the present invention, the determining of the first communication connection state between the device under test and the test controller includes: After determining that the test controller is connected to the device under test, establishing communication between the test controller and the device under test; Obtaining the initial battery power and charging protocol of each of the device under test and the test controller uploaded; When it is determined that the battery voltage of the device under test is greater than the reverse charging voltage threshold, control the device under test to charge the test controller, and obtain the charging current and the real-time battery power uploaded by the device under test and the test controller; Determining whether the charging current is abnormal according to the charging protocol, and determining whether the real-time battery power is abnormal according to the initial battery power; It is determined whether the communication connection state is abnormal according to the judgment result.
[0013] According to a reverse charging test method provided by the present invention, the second test result is obtained by testing using the following steps, including: Determining a second communication connection state between the test terminal and the test controller; When determining that the second communication connection state is normal, obtaining the battery voltage of the test terminal; When it is determined that the battery voltage is greater than the reverse charging voltage threshold of the test terminal, control the test terminal to charge the test controller until a fourth interface prompt appears on the interface of the test terminal, wherein the fourth interface prompt is used to indicate that the battery voltage of the test terminal is too low; Obtaining the battery power of the test terminal; The second test result is determined according to an interface prompt when the battery power reaches a battery power threshold of the test terminal.
[0014] According to a reverse charging test method provided by the present invention, the comparison of whether the information sent and received by the device under test and the test terminal when simultaneously performing a charging test on the test controller is consistent, so as to determine the reverse charging test result of the device under test according to the comparison result, includes: When the device under test and the test terminal simultaneously start a charging test to the test controller, a first timestamp of a fifth interface prompt appears on the interface of the device under test and a second timestamp of a sixth interface prompt appears on the interface of the test terminal; the fifth interface prompt is used to indicate that the device under test starts to charge the test controller, and the sixth interface prompt is used to indicate that the test terminal starts to charge the test controller; Compare whether the time difference between the first timestamp and the second timestamp is less than a preset time threshold; If it is less than, it is determined that the reverse charging test result of the device under test is normal.
[0015] The present invention also provides a reverse charging test device, comprising the following modules: A master-slave communication detection module, used to obtain a communication test result, wherein the communication test result includes a first test result of a charging test performed by the device under test to the test controller and a second test result of a charging test performed by the test terminal to the test controller; The reverse charging detection module is used to compare whether the information sent and received by the device under test and the test terminal when performing charging tests on the test controller at the same time is consistent when the communication test result is normal, so as to determine the reverse charging test result of the device under test according to the comparison result.
[0016] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the reverse charging test methods described above is implemented.
[0017] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the reverse charging test method described in any one of the above methods is implemented.
[0018] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the reverse charging test method as described above is implemented.
[0019] The reverse charging test method, device, electronic device and storage medium provided by the present invention use a test controller as a test platform to build a reverse charging test system, which can effectively and accurately verify the integrity and stability of the reverse charging function of the device under test, and provide important test data and reference basis for device manufacturers and developers. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 This is a test diagram for reverse charging detection between two devices.
[0022] Figure 2 It is a structural schematic diagram of the reverse charging test system provided by the present invention.
[0023] Figure 3 This is one of the flow charts of the reverse charging test method provided by the present invention.
[0024] Figure 4 This is the second flow chart of the reverse charging test method provided by the present invention.
[0025] Figure 5 It is a communication test signaling diagram between a device under test and a test controller provided by the present invention.
[0026] Figure 6 It is a schematic diagram of information sending and receiving consistency detection during charging test provided by the present invention.
[0027] Figure 7 It is a structural schematic diagram of the reverse charging test device provided by the present invention.
[0028] Figure 8 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0030] It should be noted that in the description of the present invention, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "include one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements. The orientation or position relationship indicated by the terms "upper", "lower" and the like is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. Unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be a connection between the two elements. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0031] The terms "first", "second", etc. in the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" means at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0032] At present, when performing reverse charging detection on the device to be tested, it is generally necessary to test the following aspects. For details, please refer to Figure 1 As shown: First, hardware detection is required, which mainly includes USB interface detection and circuit connection detection.
[0033] The USB interfaces of the two devices (referred to as device A and device B) that are reversely charged contain multiple pins, some of which are specifically used to detect the insertion of USB devices. When the USB cable connected to the USB interface of device A is inserted into the USB interface of device B, these pins of device A will contact the corresponding pins of device B through the USB cable, thereby triggering the USB connection detection at the hardware level, which is used to determine whether a valid USB connection can be established between the device under test and the test terminal.
[0034] Once the USB port of device A detects the connection, the circuit inside device A will start working to check the connection status of the USB line. Generally speaking, the circuit inside device A will detect parameters such as voltage and current in the USB line to ensure that the USB connection is valid and meets the requirements of reverse charging.
[0035] In addition, software detection on the system side is also required, mainly including detection of system identification, reverse charging activation and other items. Specifically, when the USB interface of device B is connected to device A via a USB cable, the operating system of device A will identify the connected USB device and detect whether it is a device that supports reverse charging. Usually, this detection is achieved through a communication protocol between devices, such as the USB OTG protocol.
[0036] Only when device A recognizes that device B has been connected and completed software detection, it means that a successful connection has been established between device A and device B, and information exchange and reverse charging control can be carried out.
[0037] The existing technology is to simulate the on and off of the USB connection through a manual smart hub HUB to start or end the reverse charging operation, so as to detect the reverse charging stability of a device under test. However, this test method is unstable. For example, the test may fail due to problems with the manual smart hub HUB itself, and once a problem occurs, it is not easy to analyze the cause of the failure.
[0038] In order to solve the defects of the existing test methods, the present invention provides a new reverse charging test method and designs a reverse charging test system, which is mainly composed of a test processor, a test controller, a plurality of double-headed USB cables and a test terminal. Among them, the test processor can be a computer, a computer, a smart phone, an industrial computer, etc., the test controller can be a test controller, a Raspberry Pi, etc., which have a USB interface, a processor, a memory, and a communication module. The test terminal can simply use a smart phone and other electronic devices that support charging and discharging functions. The device to be tested can be an electronic device with a battery such as a recording pen. The purpose of the present invention is to realize the detection of the reverse charging capability of the device to be tested.
[0039] Figure 2 Schematic diagram of the reverse charging test system provided by the present invention. Figure 2 As shown, before reverse charging, a wired communication connection between the test processor and the test controller, a wired USB connection between the device under test and the test controller, or a USB connection between the test terminal and the test controller can be pre-established using a USB cable according to the needs of the test process.
[0040] In addition, the test processor can communicate with the device under test or the test terminal through the test controller. The test processor can send a message to the test controller through the USB line to control its communication with the device under test or the test terminal to complete the information collection of the device under test or the test terminal.
[0041] Alternatively, a wireless communication connection between the test processor and the device under test or the test terminal is pre-established (ie, no information interaction through the test controller is required).
[0042] Unless otherwise specified, in subsequent embodiments, the test processor may collect relevant information about the device under test or the test terminal by one of the above two methods or a combination of both, which is not regarded as a specific limitation on the protection scope of the present invention.
[0043] Combine the following Figure 2-Figure 8 The reverse charging test method, device, electronic device and storage medium provided by the present invention are described, aiming to accurately evaluate the performance and stability of the device under test (such as mobile phones, mobile power supplies, voice recorders and other devices with reverse charging function) when used as a charging source to charge other devices (such as test terminals) through a specific test process.
[0044] Figure 3 FIG. 1 is one of the flow charts of the reverse charging test method provided by the present invention, such as Figure 3 As shown, the execution subject may be a test processor, which is a core device responsible for monitoring and managing data transmission and processing during the test process, and mainly performs but is not limited to the following steps: Step 101, obtaining a communication test result, wherein the communication test result includes a first test result of a charging test performed by the device under test to the test controller and a second test result of a charging test performed by the test terminal to the test controller.
[0045] The above reverse charging test system is pre-built to ensure that the device under test and the test terminal are in normal working condition and are connected to the test controller via a USB cable. The test controller is a test platform for performing reverse charging. It can be charged by the device under test or the test terminal, but it does not have the ability to charge the device under test or the test terminal.
[0046] In step 101, two independent charging tests are performed to respectively determine the communication connection test result between the device under test and the test controller (recorded as the first test result), and the communication connection test result between the test terminal and the test controller (recorded as the second test result).
[0047] Specifically, the device under test is started as a charging source (i.e., the master device), a charging signal is sent to the test controller (i.e., the slave device), its response is monitored, and the first test result is recorded. This charging test process mainly verifies whether the device under test as a charging source can effectively respond to the USB connection of the test controller and whether the circuit connection is correct.
[0048] Furthermore, it is necessary to switch the test roles, use the test terminal as the master device and the test controller as the slave device, send a charging request to the test terminal through the test controller, and record the second test result of the test terminal responding to the charging request to perform a charging test. This charging test process mainly confirms the test terminal's ability to receive charging requests and smooth communication with the test controller.
[0049] According to the first test result and the second test result, it can be determined whether the communication between the device under test and the test controller, and between the test terminal and the test controller is normal. If any test result is abnormal, it indicates that there is a communication failure, and the cause needs to be further investigated and corrected before retesting.
[0050] Step 102, when the communication test result is normal, compare whether the information sent and received by the device under test and the test terminal when performing charging tests on the test controller at the same time is consistent, so as to determine the reverse charging test result of the device under test according to the comparison result.
[0051] After confirming that the communication between the device under test and the test controller and between the test terminal and the test controller is normal, the hardware detection of the reverse charging detection of the terminal under test is completed, and then the core link of the reverse charging test, that is, software detection, can be entered.
[0052] Specifically, the device under test and the test terminal are started at the same time, and both are controlled as master devices to perform charging tests on the slave device test controller. At this time, the test controller will be used to monitor and record the information sent and received by both parties in real time, including but not limited to charging current, battery voltage, data transmission rate, and any possible error or warning information. For example, when the voltage of any battery is too low, will there be a timely warning? When using the device under test for reverse charging, if there is a risk of shutting down due to excessive power loss due to reverse charging, will the charging be interrupted first and the customer be warned through its interface?
[0053] In the reverse charging test method provided by the present invention, in order to test the accuracy of the message reception and transmission of the device under test during reverse charging, the test terminal is used as a reference, and the detection is achieved by comparing the consistency of the message reception and transmission of the two during the charging test process.
[0054] For example, when the test controller is used as a slave device and connected to the device under test and the test terminal, the device under test and the test terminal will open the power-on interface at the same time and request power to the test controller. When the device under test and the test terminal receive the information reply (reply to start charging) from the test controller at the same time, a pop-up box with an interface prompt for reverse charging will pop up on their respective interfaces. What is shown to the user is that when external charging is turned on, a pop-up box will immediately pop up on the device under test and the test terminal. At this point, by comparing the time points of the pop-up box display and / or charging display of the device under test and the test terminal, it can be determined whether the information sent and received by the device under test and the test terminal is consistent.
[0055] If the information sent and received by the device under test and the test terminal are completely matched, and the charging parameters are stable without abnormal errors, the reverse charging test is judged to have passed, indicating that the device under test has good performance and stability in the reverse charging scenario.
[0056] If there is inconsistency in information sending and receiving, further analyze the cause based on the specific inconsistency (such as communication protocol error, etc.), and adjust the settings or design of the device under test accordingly until the test passes.
[0057] The reverse charging test method provided by the present invention uses a test controller as a test platform to build a reverse charging test system, which can effectively and accurately verify the integrity and stability of the reverse charging function of the device under test, and provide important test data and reference basis for device manufacturers and developers.
[0058] The reverse charging test method provided by the present invention determines the first test result between the device to be tested and the test controller, and the second test result between the test terminal and the test controller respectively through two independent charging tests, and the test process for performing the first test result and the second test result is consistent as a whole. The difference is that when performing the detection of the first test result, the device to be tested is used as the main device, and when performing the detection of the second test result, the test terminal is used as the main device, and the slave device in the two charging tests is the test controller.
[0059] In order to avoid abnormal communication between the device under test and the test terminal, the present invention is implemented by testing the communication between the device under test and the test controller, and the communication between the test terminal and the test controller. As long as the first test result and the second test result are normal, it means that the communication between the device under test and the test controller is normal.
[0060] Among them, the MCU controller is a computer-like device with multiple pluggable USB interfaces and can communicate through the USB interfaces, so the test controller of the present invention can select an MCU controller. The test processor can select a computer, and the test controller and the computer are connected with a USB cable, so that some information transmission and reception between the two can be controlled by the computer.
[0061] The following describes in detail how to detect the first test result, which specifically includes but is not limited to the following steps: Determining a first communication connection state between the device under test and the test controller; When determining that the first communication connection state is normal, obtaining the battery voltage of the device under test; When it is determined that the battery voltage is greater than the reverse charging voltage threshold of the device under test, controlling the device under test to charge the test controller until a first interface prompt appears on the interface of the device under test, wherein the first interface prompt is used to indicate that the battery voltage is too low; Obtaining the battery power of the device under test; The first test result is determined according to an interface prompt when the battery power reaches a battery power threshold of the device to be tested.
[0062] The reverse charging test method provided by the present invention first needs to confirm that the communication connection status between the device under test and the test controller is normal. Generally, it can be confirmed by detecting the hardware between the two, that is, the USB connection between the two is normal and the circuit connection is normal.
[0063] When it is determined that the first communication connection state is normal, the battery voltage of the device under test is obtained through the communication connection. The battery voltage is an important parameter for evaluating the current battery state of the device and is also the basis for subsequent control of the charging process.
[0064] Considering that when a device is charging other devices, if its own power is insufficient, it may be overcharged and cause the device to shut down directly, which has a greater impact on the user. When performing reverse charging detection, the present invention compares the battery voltage with the reverse charging voltage threshold preset by the device under test. If the battery voltage is greater than the reverse charging voltage threshold, it is considered that the device under test has the ability to charge the test controller. If the battery voltage is less than or equal to the reverse charging voltage threshold, the current round of charging test is directly terminated and a reminder is output.
[0065] The reverse charging voltage threshold is preset and is generally determined based on the shutdown voltage of the device under test. For example, if the shutdown voltage of the device under test is 4.1V, the reverse charging voltage threshold can be set to 4.3V, which ensures that the device under test will not shut down due to reverse charging other devices.
[0066] After determining that the device under test has the ability to charge the test controller, the device under test will be notified to start charging the test controller. During the charging process, the test controller continuously monitors (for example, collects information according to a preset sampling frequency) the charging information of the device under test, mainly obtaining the battery voltage, battery power, charging current and other charging information of the device under test, waiting for the first interface prompt to appear on its interface.
[0067] The first interface prompt is usually triggered by low battery voltage, which is used to indicate that the current power of the device under test is close to being exhausted. The judgment that the battery voltage is too low can be determined by comparing the battery power of the device under test with a preset battery power threshold. If the battery power of the device under test reaches or is less than the battery power threshold, it is considered that the battery power is too low.
[0068] The present invention mainly determines the first test result according to the interface prompt when the battery power reaches the battery power threshold of the device to be tested. The battery power threshold is a preset power value used to evaluate the performance of the battery during the charging process.
[0069] If the expected first interface prompt (such as low battery warning) appears when the battery power reaches the battery power threshold, it indicates that the battery management and charging functions of the device under test are normal, and the first test result is passed. If the interface prompt is not consistent with expectations (such as no warning or the warning appears too early / too late), it indicates that there may be problems with the battery management or charging function, and the first test result is failed.
[0070] The reverse charging test method provided by the present invention evaluates whether the battery management and charging functions of the device under test are normal by monitoring the battery voltage, battery power and interface prompts of the device under test during the charging process. This method not only improves the accuracy and reliability of the test, but also helps to discover and solve potential problems in a timely manner, thereby ensuring that the battery management system of the device under test can work normally.
[0071] Figure 4 This is the second flow chart of the reverse charging test method provided by the present invention, combined with Figure 4 As shown, determining the first test result according to the interface prompt when the battery power reaches the battery power threshold of the device to be tested includes: If it is determined that the battery power is less than or equal to the battery power threshold, determining whether a second interface prompt appears on the interface of the device under test, the second interface prompt being used to indicate that the battery power of the device under test is too low; In the case where it is determined that the second interface prompt appears and the second interface prompt can be triggered, determining that the first test result is normal; Otherwise, it is determined that the first test result is abnormal.
[0072] First, the detection processor monitors the battery level of the device in real time. When it detects that the battery level reaches a preset battery level threshold (the threshold is usually set to a level at which the device can maintain basic operation but is about to enter a low-battery protection state, such as reaching or falling below 10%), it proceeds to the next step of judgment.
[0073] When the detection processor obtains that the battery power is less than or equal to the battery power threshold, it may synchronously detect whether a second interface prompt appears in the user interface of the device under test. The second interface prompt is usually used to inform the user that the battery power of the device is too low, which may include a warning message, a power indicator bar turning red or flashing, and may be accompanied by auditory or tactile feedback (such as a beep or vibration).
[0074] If the second interface prompt appears, the test processor will further verify whether the second interface prompt can be triggered or responded to by the user. This includes checking whether the user can confirm the prompt information by clicking, sliding or other interactive methods, and whether the device under test responds correctly to the user's operation (such as displaying more power management options, entering low power mode, etc.).
[0075] If the test processor determines that the battery power is less than or equal to the threshold, the second interface prompt does appear on the interface of the device under test, and the interface prompt can be triggered and responded to by the user normally, then the first test result is determined to be normal. This indicates that the device under test can correctly warn the user when the battery power is low and allow the user to take corresponding management measures.
[0076] If the test system finds that the second interface prompt does not appear on the interface of the device under test after the battery power reaches the threshold, or the prompt appears but cannot be triggered normally by the user (such as no response to the click, incomplete prompt information, etc.), the first test result is judged to be abnormal, which means that there is a defect in the battery management function of the device under test or there is a problem with the user interface design.
[0077] The reverse charging test method provided by the present invention can accurately evaluate the interface prompt behavior and responsiveness of the device under test when the battery is low through the above steps, thereby ensuring that the battery management function of the device meets the design requirements, improving the user experience and the overall quality of the product. At the same time, the test method also provides strong data support for subsequent equipment improvement and optimization.
[0078] As an optional embodiment, refer to Figure 4 As shown, if it is determined that the battery power is greater than the battery power threshold of the device to be tested, it also includes: Lowering the reverse charging voltage threshold of the device under test; The battery voltage of the device under test is re-acquired to re-determine the first test result according to the re-acquired battery voltage and the reduced reverse charging voltage threshold.
[0079] Specifically, when using the method provided in the above embodiment, during the reverse charging detection of the device under test, when it is determined that the first interface prompt appears on the interface of the device under test (that is, an alarm of low voltage has occurred), it will continue to detect whether the current battery power of the device under test is higher than the preset battery power threshold.
[0080] If it is detected that the current battery power of the device under test is higher than the preset battery power threshold, it means that the device under test has sufficient power reserve and may be in a relatively healthy power state. However, in some scenarios, such as to optimize energy efficiency, extend battery life, or meet specific charging strategy requirements, we may need to adjust the reverse charging behavior, that is, adjust the previously set reverse charging voltage threshold to more finely control the reverse charging cutoff condition.
[0081] The specific value of the reverse charging voltage threshold lowered in the present invention can be determined according to the battery characteristics of the device under test, the charging circuit design and the expected usage scenario, and can be flexibly adjusted through software updates or user settings.
[0082] After adjusting the reverse charge voltage threshold, the system will re-acquire the current battery voltage of the device under test. This step is necessary because the battery state may change due to use, time or external environmental factors. The re-acquired data will be used to compare with the new reverse charge voltage threshold to re-determine the first test result.
[0083] Based on the reacquired battery voltage and the lowered voltage threshold, if the current battery voltage is still higher than the new reverse charging voltage threshold, it may be decided to start or continue to maintain the reverse charging function; conversely, if the battery voltage is close to or lower than the new threshold, reverse charging will be suspended to protect the battery or meet the device's own usage needs.
[0084] The present invention realizes intelligent control of the reverse charging function by dynamically adjusting the reverse charging voltage threshold and combining it with real-time battery voltage data, which not only improves energy utilization efficiency, but also enhances battery health management, providing users with a more flexible and intelligent charging experience.
[0085] Based on the content of the above embodiments, as an optional embodiment, when it is determined that the battery voltage is not greater than the reverse charging voltage threshold of the device under test, a third interface prompt is displayed on the interface of the device under test, and the third interface prompt is used to remind the device under test to charge.
[0086] The reverse charging test method provided by the present invention also focuses on optimizing the user interaction experience when the battery voltage of the device under test is insufficient.
[0087] If it is determined that the battery voltage is not greater than the reverse charging voltage threshold, it indicates that the current power of the device under test is low and it no longer has the ability to reverse charge the test controller and may be about to enter a low power protection state.
[0088] At this time, the detection processor sends instructions to the device under test through a specific interface or protocol to request that a third interface prompt be displayed on its interface. The third interface prompt usually includes clear charging instructions (such as text messages such as "Please charge" or "Battery is low, please connect a charger"), as well as possible visual reminders (such as the battery indicator bar turning red or flashing) to enhance the warning effect.
[0089] After the user sees the third interface prompt, he can take corresponding charging actions, such as connecting a charger or replacing the battery. During the charging process, the detection processor can continuously monitor the battery status of the device under test, and after the battery power reaches a safe level (for example, 50%), the user is informed through interface prompts or sound feedback that the reverse charging detection provided in the above embodiment can be restarted.
[0090] The reverse charging test method provided by the present invention effectively improves the user interaction experience of the device under test when the battery voltage is insufficient by introducing the third interface prompt function. By real-time monitoring of the battery voltage and comparing it with the preset battery power threshold, and timely displaying charging prompt information, the user can more intuitively understand the power status of the device and take corresponding charging measures to avoid the inconvenience and loss caused by the device running out of power.
[0091] Figure 5 The communication test signaling diagram between the device under test and the test controller provided by the present invention is as follows. Figure 5 A method for determining the communication connection status between the device under test and the test controller is introduced in detail. The method evaluates the stability and reliability of the communication connection by real-time monitoring and analysis of key parameters in the charging process, such as charging current and real-time battery power. This function is crucial to ensure the accuracy and reliability of test results, especially when performing reverse charging tests.
[0092] After it is determined that the test controller has been connected to the device under test via a USB cable, a communication connection between the two is first established by configuring an appropriate communication protocol and interface.
[0093] Then, the initial battery power and charging protocol uploaded by the device under test and the test controller are obtained through the communication connection. The initial battery power is used to record the power status at the beginning of the test.
[0094] When it is determined that the battery voltage of the device under test is greater than a preset reverse charging voltage threshold, the test processor controls the device under test to charge the test controller.
[0095] During the charging process, the test processor will try to collect charging information such as the charging current and the real-time battery power uploaded by the device under test and the test controller to determine whether the communication status between the two is normal.
[0096] The purpose of obtaining the communication protocol and charging current supported by the device under test and the test terminal is to verify whether the device under test and the test controller support the DP fast charging protocol (the device that supports DP fast charging can be charged with a current of up to 1.2A. If it does not support the DP fast charging protocol, the maximum charging current can only be charged with 0.5A). In this way, when performing a charging test, it is possible to analyze whether the collected charging current corresponds to the relevant charging protocol, and use this to help determine whether the communication status between the two is normal.
[0097] If the real-time power information fed back by the device under test and the test controller can be received, it can be considered that the first communication connection state between the two is normal, otherwise it means that there is a fault in the communication between the two.
[0098] The reverse charging test method provided by the present invention evaluates the stability and reliability of the communication connection between the device under test and the test controller by real-time monitoring and analysis of key parameters in the charging process, such as the charging current and the real-time battery power. This method not only improves the accuracy and reliability of the test results, but also helps to timely discover and solve potential problems in the communication connection, thereby ensuring the smooth progress of the test process.
[0099] Based on the content of the above embodiment, as an optional embodiment, the second test result is obtained by testing using the following steps, including: Determining a second communication connection state between the test terminal and the test controller; When determining that the second communication connection state is normal, obtaining the battery voltage of the test terminal; When it is determined that the battery voltage is greater than the reverse charging voltage threshold of the test terminal, control the test terminal to charge the test controller until a fourth interface prompt appears on the interface of the test terminal, wherein the fourth interface prompt is used to indicate that the battery voltage of the test terminal is too low; Obtaining the battery power of the test terminal; The second test result is determined according to an interface prompt when the battery power reaches a battery power threshold of the test terminal.
[0100] The reverse charging test method provided by the present invention determines a first test result between the device to be tested and the test controller, and a second test result between the test terminal and the test controller respectively through two independent charging tests.
[0101] It should be noted that the test steps of the present invention when obtaining the second test result of the test terminal performing a charging test on the test controller are consistent in overall principle with the test steps taken when obtaining the first test result of the device under test performing a charging test on the test controller. The difference is that the device under test is used as the main device when detecting the first test result, and the test terminal is used as the main device when detecting the second test result. The slave device in both charging tests is the test controller, so it will not be repeated in this embodiment.
[0102] When the device is in an operation scenario such as recording or video recording, in order to protect the device in the operation scenario, in the case of low voltage or low power, a pop-up box prompt for reverse charging is required to be given to the user to inquire whether the user needs to continue charging or maintain the current operation scenario. However, due to the time difference in communication between the master device and the slave device, the information interaction will time out. If the pop-up box prompt is not given in time, the device will suddenly shut down. This is also one of the reasons why the present invention performs consistency detection of sent and received information.
[0103] Figure 6 : is a schematic diagram of information transmission and reception consistency detection during charging test provided by the present invention, such as Figure 6 As shown, the comparing whether the information sent and received by the device under test and the test terminal when simultaneously performing a charging test on the test controller is consistent, so as to determine the reverse charging test result of the device under test according to the comparison result, includes: When the device under test and the test terminal simultaneously start a charging test to the test controller, a first timestamp of a fifth interface prompt appears on the interface of the device under test and a second timestamp of a sixth interface prompt appears on the interface of the test terminal; the fifth interface prompt is used to indicate that the device under test starts to charge the test controller, and the sixth interface prompt is used to indicate that the test terminal starts to charge the test controller; Compare whether the time difference between the first timestamp and the second timestamp is less than a preset time threshold; If it is less than, it is determined that the reverse charging test result of the device under test is normal.
[0104] In the existing testing methods, it is usually impossible to judge by naked eyes if the pop-up window of the device under test is slow to display or power on. It is necessary to pull the device log of the device under test for professional analysis, which is time-consuming and laborious. In particular, when testing compatibility, it is necessary to analyze the abnormal pop-up window problem multiple times. To this end, the present invention provides a new detection method.
[0105] First, when the device under test and the test terminal are started to charge the test controller at the same time, the test processor obtains two key timestamps: the first timestamp when the fifth interface prompt appears on the interface of the device under test and the second timestamp when the sixth interface prompt appears on the interface of the test terminal. The acquisition of these two timestamps can be directly read from the device logs of the device under test and the test terminal.
[0106] Next, compare whether the time difference between the first timestamp and the second timestamp is less than a preset time threshold. The preset time threshold is a reasonable range set according to the test requirements and device performance, which is used to determine whether the response speed of the device under test and the test terminal when starting charging is consistent, and is generally set to milliseconds or microseconds.
[0107] If the time difference is less than the preset time threshold, it is considered that the response speed of the device under test and the test terminal when starting charging is similar, which meets the test requirements. If the time difference is greater than or equal to the preset time threshold, it may indicate that there is a delay or abnormality in the device under test when starting the reverse charging function.
[0108] The reverse charging test method provided by the present invention provides a simple and effective reverse charging test method by comparing the interface prompt timestamps of the device under test and the test terminal when they are charging the test controller at the same time. It not only helps to evaluate whether the reverse charging function of the device under test is normal, but also provides valuable test data and feedback to device manufacturers, so as to continuously optimize and improve the performance of the device and user experience.
[0109] As another optional embodiment, the present invention can also utilize the powerful processing capability and rich interfaces of the test controller to simulate various reverse charging scenarios with the help of related relays, such as the stability test of charge-stop-charge, the stability test of USB interface plugging and unplugging, etc. Taking the stability test of USB interface plugging and unplugging as an example, the following steps can be adopted to implement it: The USB interface signal is turned on and off by using the general input and output port of the test controller to simulate the plug-in and pull-out operation, or the analog plug-in and pull-out of the USB interface can be realized by programming to control the level change of the input and output port.
[0110] Of course, in order to increase the physical isolation and safety of the plug-in and unplug operation, electronic switching elements such as relays or MOSFETs can be used to control the power or on / off of the USB interface. The test controller simulates USB plug-in and unplug by controlling the on / off of these switching elements.
[0111] The test controller can monitor the connection status of the USB device by detecting the signal on the USB interface. When the USB device is detected to be plugged in, the test controller can start the corresponding charging or data transmission program; when the USB device is detected to be unplugged, the test controller can perform the corresponding cleaning and power-off operations.
[0112] The test controller stores the monitored USB plug-in and unplug status and data in the internal memory or sends it to an external device through the communication interface for recording and analysis. By comparing the data of different plug-in and unplug cycles, the stability and durability of the USB interface and the connection circuit can be evaluated.
[0113] Figure 7 : is a schematic diagram of the structure of the reverse charging test device provided by the present invention, such as Figure 7 As shown, it mainly includes: The master-slave communication detection module 71 is mainly used to obtain communication test results, wherein the communication test results include a first test result of the device under test performing a charging test on the test controller and a second test result of the test terminal performing a charging test on the test controller; The reverse charging detection module 72 is mainly used to compare whether the information sent and received by the device under test and the test terminal when performing charging tests on the test controller at the same time is consistent when the communication test result is normal, so as to determine the reverse charging test result of the device under test according to the comparison result.
[0114] It should be noted that the reverse charging test device provided by the present invention can execute the reverse charging test method described in any of the above embodiments during specific operation, which will not be elaborated in this embodiment.
[0115] The reverse charging test method provided by the present invention uses a test controller as a test platform to build a reverse charging test system, which can effectively and accurately verify the integrity and stability of the reverse charging function of the device under test, and provide important test data and reference basis for device manufacturers and developers.
[0116] Figure 8 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 8As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the reverse charging test method, which includes: obtaining a communication test result, the communication test result including a first test result of the device under test performing a charging test on the test controller and a second test result of the test terminal performing a charging test on the test controller; when the communication test result is normal, comparing whether the information sent and received when the device under test and the test terminal perform a charging test on the test controller at the same time is consistent, so as to determine the reverse charging test result of the device under test according to the comparison result.
[0117] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0118] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the reverse charging test method provided in the above-mentioned embodiments, and the method includes: obtaining a communication test result, and the communication test result includes a first test result of a charging test performed by the device under test to the test controller and a second test result of a charging test performed by the test terminal to the test controller; when the communication test result is normal, comparing whether the information sent and received when the device under test and the test terminal simultaneously perform a charging test on the test controller is consistent, so as to determine the reverse charging test result of the device under test according to the comparison result.
[0119] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the reverse charging test method provided in the above-mentioned embodiments, the method comprising: obtaining a communication test result, the communication test result comprising a first test result of a charging test performed by the device under test to a test controller and a second test result of a charging test performed by a test terminal to the test controller; when the communication test result is normal, comparing whether the information sent and received when the device under test and the test terminal simultaneously perform a charging test on the test controller is consistent, so as to determine the reverse charging test result of the device under test according to the comparison result.
[0120] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0121] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0122] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention 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. However, 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 embodiments of the present invention.
Claims
1. A reverse charging test method, characterized in that: Applications for testing processors, including: Acquire a communication test result, wherein the communication test result includes a first test result of a charging test performed by the device under test on the test controller and a second test result of a charging test performed by the test terminal on the test controller; When the communication test result is normal, the information received and sent by the device under test and the test terminal when performing charging test on the test controller simultaneously is compared to determine the reverse charging test result of the device under test according to the comparison result.
2. The reverse charging test method according to claim 1, characterized in that: The first test result is obtained by testing using the following steps, including: Determining a first communication connection state between the device under test and the test controller; When determining that the first communication connection state is normal, obtaining the battery voltage of the device under test; When it is determined that the battery voltage is greater than the reverse charging voltage threshold of the device under test, controlling the device under test to charge the test controller until a first interface prompt appears on the interface of the device under test, wherein the first interface prompt is used to indicate that the battery voltage is too low; Obtaining the battery power of the device under test; The first test result is determined according to an interface prompt when the battery power reaches a battery power threshold of the device to be tested.
3. The reverse charging test method according to claim 2, characterized in that: The determining the first test result according to an interface prompt when the battery power reaches a battery power threshold of the device to be tested includes: If it is determined that the battery power is less than or equal to the battery power threshold, determining whether a second interface prompt appears on the interface of the device under test, the second interface prompt being used to indicate that the battery power of the device under test is too low; In the case where it is determined that the second interface prompt appears and the second interface prompt can be triggered, determining that the first test result is normal; Otherwise, it is determined that the first test result is abnormal.
4. The reverse charging test method according to claim 3, characterized in that: If it is determined that the battery power is greater than the battery power threshold of the device to be tested, the method further includes: Lowering the reverse charging voltage threshold of the device under test; The battery voltage of the device under test is re-acquired to re-determine the first test result according to the re-acquired battery voltage and the reduced reverse charging voltage threshold.
5. The reverse charging test method according to any one of claims 2 to 4, characterized in that: When it is determined that the battery voltage is not greater than the reverse charging voltage threshold of the device under test, a third interface prompt is displayed on the interface of the device under test, where the third interface prompt is used to remind the device under test to charge.
6. The reverse charging test method according to claim 2, characterized in that: The determining of the first communication connection state between the device under test and the test controller includes: After determining that the test controller is connected to the device under test, establishing communication between the test controller and the device under test; Obtaining the initial battery power and charging protocol of each of the device under test and the test controller uploaded; When it is determined that the battery voltage of the device under test is greater than the reverse charging voltage threshold, control the device under test to charge the test controller, and obtain the charging current and the real-time battery power uploaded by the device under test and the test controller; Determining whether the charging current is abnormal according to the charging protocol, and determining whether the real-time battery power is abnormal according to the initial battery power; It is determined whether the first communication connection state is abnormal according to the judgment result.
7. The reverse charging test method according to claim 1, characterized in that: The second test result is obtained by testing using the following steps, including: Determining a second communication connection state between the test terminal and the test controller; When determining that the second communication connection state is normal, obtaining the battery voltage of the test terminal; When it is determined that the battery voltage is greater than the reverse charging voltage threshold of the test terminal, control the test terminal to charge the test controller until a fourth interface prompt appears on the interface of the test terminal, wherein the fourth interface prompt is used to indicate that the battery voltage of the test terminal is too low; Obtaining the battery power of the test terminal; The second test result is determined according to an interface prompt when the battery power reaches a battery power threshold of the test terminal.
8. The reverse charging test method according to claim 1, characterized in that: The comparing whether the information sent and received by the device under test and the test terminal when simultaneously performing a charging test on the test controller is consistent, so as to determine a reverse charging test result of the device under test according to the comparison result, includes: When the device under test and the test terminal simultaneously start a charging test to the test controller, a first timestamp of a fifth interface prompt appears on the interface of the device under test and a second timestamp of a sixth interface prompt appears on the interface of the test terminal; the fifth interface prompt is used to indicate that the device under test starts to charge the test controller, and the sixth interface prompt is used to indicate that the test terminal starts to charge the test controller; Compare whether the time difference between the first timestamp and the second timestamp is less than a preset time threshold; If it is less than, it is determined that the reverse charging test result of the device under test is normal.
9. A reverse charging test device, characterized in that: include: A master-slave communication detection module, used to obtain a communication test result, wherein the communication test result includes a first test result of a charging test performed by the device under test to the test controller and a second test result of a charging test performed by the test terminal to the test controller; The reverse charging detection module is used to compare whether the information sent and received by the device under test and the test terminal when performing charging tests on the test controller at the same time is consistent when the communication test result is normal, so as to determine the reverse charging test result of the device under test according to the comparison result.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the reverse charging test method according to any one of claims 1 to 8 is implemented.
11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the reverse charging test method according to any one of claims 1 to 8 is implemented.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the reverse charging test method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Method, medium and system for rapidly judging damaged or defective lithium battery
CN120065008A
Current anomaly test method and device, equipment, storage medium and program product
CN121186431A