A charging test method and system

By using a power supply device instead of a DC power supply for charging protocol testing, the control logic of the testing device is simplified, the development difficulty and cost are reduced, the portability and accuracy of the testing system are improved, and the problems of complexity and high cost of existing testing equipment are solved.

CN119246983BActive Publication Date: 2025-10-24HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410266115.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-05
Publication Date
2025-10-24
Estimated Expiration
2044-03-05

AI Technical Summary

Technical Problem

Existing fast charging protocol testing requires DC power, which makes the test equipment's logic control complex, development difficult, bulky, costly, and inconvenient, affecting the smooth progress and accuracy of the test.

Method used

By replacing the DC power supply with a power supply device, and by acquiring and modifying the negotiation messages between the charging device and the power supply device through the testing device, charging protocol testing can be achieved. This simplifies the control logic of the testing device and utilizes the power supply device to provide the test voltage, thereby reducing the overall size and cost of the testing system.

Benefits of technology

The control logic of the testing device has been simplified, the development difficulty has been reduced, the portability of the testing system has been improved and the testing cost has been reduced, while ensuring the accuracy and convenience of the test.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119246983B_ABST
    Figure CN119246983B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of testing, in particular to a charging test method and system. The charging test method is used for testing the charging function of an electronic device and comprises the following steps: a test device acquires a first message sent by a first device, the first message being used for charging negotiation between the first device and a second device; the test device modifies the content of the first message to obtain a second message; and the test device sends the second message to the second device; wherein the first device is a power supply device and the second device is a charging device, or the first device is a charging device and the second device is a power supply device. The charging test method and system provided by the application can realize charging test.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of testing, in particular to a charging test method and system. BACKGROUND

[0002] In order to improve the charging speed and charging efficiency of electronic devices (such as mobile phones, tablets, etc.), the electronic devices and the power supply devices (such as chargers, power banks, etc.) for charging the electronic devices can support the same fast charging protocol to achieve fast charging through the fast charging protocol.

[0003] In the process of producing and manufacturing the electronic devices and the power supply devices supporting the fast charging protocol, the safety performance and charging performance of the fast charging protocol supported by the electronic devices and the power supply devices need to be tested to ensure the safety and stability of the electronic devices and the power supply devices. SUMMARY

[0004] In order to solve the above problems, the present application provides a charging test method and system, which can realize charging test.

[0005] In order to achieve the above-mentioned target, in a first aspect, the present application provides a charging test method for testing the charging function of an electronic device, the method comprising: a test device obtaining a first message sent by a first device, the first message being used for charging negotiation between the first device and a second device; the test device modifying the content of the first message to obtain a second message; the test device sending the second message to the second device; wherein the first device is a power supply device and the second device is a charging device, or the first device is a charging device and the second device is a power supply device, and the power supply device is used for charging the charging device.

[0006] In the embodiments provided by the present application, the charging test method can be applied to the individual test of the charging device or the individual test of the power supply device, and can also be used for the joint debugging test of the charging device and the power supply device. In these test processes, the power supply device can be used to provide a test power supply for the charging device, so that the charging device can receive a charging voltage specified by the test requirements, instead of a direct current power supply in the traditional test process. At this time, the test device does not need to develop a module for communicating with the direct current power supply, so as to effectively simplify the control logic of the test device. In addition, since the response of the power supply device is made according to the charging protocol, using the power supply device to provide the charging voltage can also facilitate the control of the response time required by the charging protocol, further reducing the complexity of the control logic of the test device. In addition, compared with the direct current power supply, the power supply device has a smaller size and lower cost, and using the power supply device to replace the direct current power supply can also reduce the overall size of the test system, improve the portability of the test system and reduce the test cost.

[0007] In an alternative implementation, the first message is a negotiation request message sent by the first device to the second device, and the first message comprises the charging parameter; the test device modifies the content of the first message to obtain the second message, including: the test device modifies the charging parameter in the first message to obtain the second message. In this way, the charging test method can be applied to a test process that requires a specified power supply parameter.

[0008] In an alternative implementation, the first device is a charging device, the second device is a power supply device, and the charging parameter comprises a first charging voltage; the test device modifies the charging parameter in the first message to obtain the second message, including: the test device modifies the first charging voltage in the first message to a second charging voltage to obtain the second message. In this way, the test device can pretend to be a charging device to request a power supply device to provide a voltage required for testing, so as to implement a test on the charging device under a specified voltage.

[0009] In an alternative implementation, the power supply device outputs the second charging voltage to the charging device based on the second message; and the test device determines whether the response of the charging device to the second charging voltage is expected. In this way, the test device can confirm the response of the charging device to a charging voltage required for testing, so as to implement the test.

[0010] In an alternative implementation, the first device is a power supply device, the second device is a charging device, and the first message is a negotiation response message sent by the first device in response to a negotiation request message of the second device; the test device modifies the content of the first message to obtain the second message, including: the test device modifies the response type of the negotiation response message to obtain the second message. In this way, the charging test method can be applied to a test process that requires a specified negotiation response message.

[0011] In an alternative implementation, the response type of the negotiation response message comprises negotiation agreement or negotiation rejection; the test device modifies the response type of the negotiation response message to obtain the second message, including: the test device modifies the response type of the negotiation response message from negotiation agreement to negotiation rejection, or the test device modifies the response type of the negotiation response message from negotiation rejection to negotiation agreement. In this way, the test device can pretend to be a power supply device to modify a negotiation response message sent by the power supply device to the charging device according to the test requirement, so as to implement a test on the charging device.

[0012] In an alternative implementation, after the test device sends the second message to the second device, the test device further determines whether the response of the charging device to the second message is expected. In this way, the test device can confirm the response of the charging device to a second message required for testing, so as to implement the test.

[0013] In an alternative embodiment, the test device determines whether the response of the charging device to the second message is expected, including: if the charging device generates a target response to the second message, the test device determines that the response of the charging device to the second message is expected, wherein the target response is a response in accordance with the target charging protocol; if the charging device does not generate the target response to the second message, the test device determines that the response of the charging device to the second message is not expected. In this way, the test device can confirm whether the response of the charging device to the second message is expected.

[0014] In an alternative embodiment, the test device determines whether the response of the charging device to the second charging voltage is expected, including: if the charging device generates a target response to the second charging voltage, the test device determines that the response of the charging device to the second charging voltage is expected, wherein the target response is a response in accordance with the target charging protocol; if the charging device does not generate the target response to the second charging voltage, the test device determines that the response of the charging device to the second charging voltage is not expected. In this way, the test device can confirm whether the response of the charging device to the second charging voltage is expected.

[0015] In an alternative embodiment, the power supply device includes any one of the following: a power adapter of an electronic device, a power bank, a charging pile, a charging station, and a switch with charging function. In this way, the charging test method can be widely applied to various power supply devices, improving the practicability of the charging test method.

[0016] To achieve the above-mentioned purpose, in a second aspect, the present application provides a charging test system, the charging test system comprising: a test device; a first device, the first device being electrically connected to the test device; a second device, the second device being electrically connected to the test device; a power supply path, the power supply path being electrically connected to the first device and the second device; the test device is configured to: acquire a first message sent by the first device, the first message being used for charging negotiation between the first device and the second device; modify the content of the first message to obtain a second message; send the second message to the second device; wherein the first device is a power supply device, and the second device is a charging device, or the first device is a charging device, and the second device is a power supply device, the power supply device being used for charging the charging device.

[0017] In the embodiments provided in the present application, the charging test system can be applied to the individual test of the charging device, or the individual test of the power supply device, and can also be applied to the joint test of the charging device and the power supply device. In these test processes, the power supply device can be used to provide a test power supply for the charging device, so that the charging device can receive a charging voltage required by the test, instead of the direct current power supply in the conventional test process. At this time, the test device no longer needs to develop a module for communicating with the direct current power supply, so as to effectively simplify the control logic of the test device. In addition, since the response of the power supply device is performed according to the charging protocol, the charging voltage provided by the power supply device can also facilitate the control of the response time required by the charging protocol, and further reduce the complexity of the control logic of the test device. In addition, compared with the direct current power supply, the power supply device has a smaller size and a lower cost, and the use of the power supply device to replace the direct current power supply can also reduce the overall size of the test system, improve the portability of the test system, and reduce the test cost.

[0018] In an optional implementation, the test device includes a master control module and a transmission module; the transmission module includes a protocol analysis module and a protocol camouflage module; the master control module is configured to control the protocol analysis module to obtain the first message sent by the first device; the protocol analysis module is configured to obtain and analyze the content of the first message, and send the content of the first message to the master control module; the master control module is configured to send the content of the first message to the protocol camouflage module, and control the protocol camouflage module to modify the content of the first message; and the protocol camouflage module is configured to receive and modify the content of the first message to obtain the second message, and send the second message to the second device. In this way, the protocol analysis module can be used to receive the first message and analyze the content of the first message, and the protocol camouflage module can be used to modify the first message to obtain the second message and send the second message to the second device. Meanwhile, the master control module can be used to control the protocol analysis module and the protocol camouflage module to control the test process.

[0019] In an optional implementation, the first message is a negotiation request message sent by the first device to the second device, and the first message includes a charging parameter; and the protocol camouflage module is configured to modify the charging parameter in the first message. In this way, the charging test system can be applied to a test process that requires to specify a power supply parameter.

[0020] In an optional implementation, the first device is a charging device, the second device is a power supply device, and the charging parameter includes a first charging voltage; and the protocol camouflage module is configured to modify the first charging voltage in the first message to a second charging voltage to obtain the second message. In this way, the test device can camouflage the charging device to request the power supply device to provide a voltage required by the test, so as to facilitate the test of the charging device under a specified voltage.

[0021] In an alternative embodiment, the power supply device is configured to output a second charging voltage to the charging device based on the second message; and the master module is configured to determine whether the response of the charging device to the second charging voltage is expected. In this way, the testing apparatus can confirm the response of the charging device to the testing required charging voltage, so as to implement the testing.

[0022] In an alternative embodiment, the first device is a power supply device, the second device is a charging device, and the first message is a negotiation response message sent by the first device in response to a negotiation request message of the second device; and the protocol disguising module is configured to modify the response type of the negotiation response message to obtain the second message. In this way, the charging testing method can be applied to a testing process requiring a specified negotiation response message.

[0023] In an alternative embodiment, the response type of the negotiation response message includes negotiation agreement or negotiation rejection; and the protocol disguising module is configured to modify the response type of the negotiation response message from negotiation agreement to negotiation rejection, or modify the response type of the negotiation response message from negotiation rejection to negotiation agreement. In this way, the testing apparatus can disguise as a power supply device, modify the negotiation response message sent by the power supply device to the charging device according to the testing requirement, so as to implement the testing of the charging device.

[0024] In an alternative embodiment, the master module is configured to determine whether the response of the charging device to the second message is expected. In this way, the testing apparatus can confirm the response of the charging device to the testing required second message, so as to implement the testing.

[0025] In an alternative embodiment, if the charging device generates a target response to the second message, the master module is configured to determine that the response of the charging device to the second message is expected, wherein the target response is a response conforming to a target charging protocol; and if the charging device does not generate the target response to the second message, the master module is configured to determine that the response of the charging device to the second message is not expected. In this way, the testing apparatus can confirm whether the response of the charging device to the second message is expected.

[0026] In an alternative embodiment, if the charging device generates a target response to the second charging voltage, the master module is configured to determine that the response of the charging device to the second charging voltage is expected, wherein the target response is a response conforming to a target charging protocol; and if the charging device does not generate the target response to the second charging voltage, the master module is configured to determine that the response of the charging device to the second charging voltage is not expected. In this way, the testing apparatus can confirm whether the response of the charging device to the second charging voltage is expected.

[0027] In an alternative implementation, the power supply device includes any one of a power adapter of the electronic device, a mobile power supply, a charging pile, a charging station, and a switch with a charging function. In this way, the charging test method can be widely applied to various power supply devices, improving the practicability of the charging test method.

[0028] In an alternative implementation, the first device is a charging device, the second device is a power supply device, and when the charging device and the power supply device both support the fusion fast charging standard or the super charging protocol, the switch module includes a first switch, a second switch, a third switch, and a fourth switch; the first switch is electrically connected between the D- terminal of the charging device and the D- terminal of the power supply device, and is configured to control the communication between the D- terminal of the charging device and the D- terminal of the power supply device; the second switch is electrically connected between the D+ terminal of the charging device and the D+ terminal of the power supply device, and is configured to control the communication between the D+ terminal of the charging device and the D+ terminal of the power supply device; one end of the third switch is electrically connected between the D- terminal of the power supply device and the first switch, and the other end of the third switch is electrically connected to the protocol camouflage module, and the third switch is configured to control the communication between the D- terminal of the power supply device and the protocol camouflage module; when the charging device and the power supply device both support the fusion fast charging standard, one end of the fourth switch is electrically connected between the D+ terminal of the charging device and the second switch, and the other end of the fourth switch is electrically connected to the protocol camouflage module, and the fourth switch is configured to control the communication between the D+ terminal of the charging device and the protocol camouflage module; when the charging device and the power supply device both support the super charging protocol, one end of the fourth switch is electrically connected between the D- terminal of the charging device and the first switch, and the other end of the fourth switch is electrically connected to the protocol camouflage module, and the fourth switch is configured to control the communication between the D- terminal of the charging device and the protocol camouflage module. In this way, the communication paths can be controlled by the switches to switch the test state of the test device. BRIEF DESCRIPTION OF DRAWINGS

[0029] In order to more clearly illustrate the technical solutions of the present application, the drawings needed in the embodiments will be briefly introduced below. Obviously, other drawings can also be obtained by those skilled in the art without creative labor on the basis of these drawings.

[0030] Figure 1 is a fast charging protocol test architecture diagram of an electronic device provided by the present embodiment;

[0031] Figure 2 is a fast charging protocol joint debugging test architecture diagram of an electronic device and a charger provided by the present embodiment;

[0032] Figure 3 is a flowchart of a first charging test method provided by the present embodiment;

[0033] Figure 4 is a flow chart of the second charging test method provided in this embodiment;

[0034] Figure 5 This is a flowchart of the interaction between the first charging device and the power supply device provided in this embodiment;

[0035] Figure 6 This is a partial flow chart of the second charging test method provided in this embodiment;

[0036] Figure 7 is a flow chart of the third charging test method provided in this embodiment;

[0037] Figure 8 This is a flow chart of the interaction between the second charging device and the power supply device provided in this embodiment;

[0038] Figure 9 This is a structural block diagram of the first charging test system provided by this embodiment;

[0039] Figure 10 is a structural block diagram of the second charging test system provided in this embodiment;

[0040] Figure 11 is a structural block diagram of the third charging test system provided in this embodiment;

[0041] Figure 12 is a structural block diagram of the fourth charging test system provided in this embodiment;

[0042] Figure 13 This is a structural block diagram of the fifth charging test system provided in this embodiment. DETAILED DESCRIPTION

[0043] The following will clearly describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present application, other embodiments obtained by ordinary technicians in this field without making any creative work are all within the scope of protection of this application.

[0044] Hereinafter, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature identified with "first," "second," etc., may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0045] In addition, in this application, the orientation terms such as "upper", "lower", "inner", "outer" and the like are defined with respect to the orientation in which the components in the drawings are placed, and it should be understood that these directional terms are relative concepts, which are used for relative description and clarification, and can be changed accordingly according to the change of the orientation in which the components in the drawings are placed.

[0046] The electronic device and the charger communicate and cooperate with each other using the fast charging protocol to achieve faster charging speed and higher charging efficiency, thereby improving the charging experience of the user. In addition, the fast charging protocol can also ensure the safety of the electronic device and the charger during the charging process, thereby avoiding overheating, overloading and other potential safety problems.

[0047] At present, the existing fast charging protocols include quick charge (QC) protocol, power delivery (PD) protocol, universal fast charging specification (UFCS), super charge protocol (SCP) and the like. Among them, in order to achieve fast charging, the fast charging protocol supported by the electronic device and the charger should be the same.

[0048] During the manufacturing process of the electronic device and the charger, the fast charging protocol supported by the electronic device and the charger can be tested. The main purposes of the fast charging protocol test can include:

[0049] Compatibility test: the fast charging protocol test can verify the compatibility between the electronic device and the charger, so as to confirm that the electronic device and the charger can correctly communicate and cooperate with each other, so as to prevent the problem of charging failure or low charging efficiency caused by the mismatch between different devices.

[0050] Performance test: through the fast charging protocol test, the charging speed and efficiency of the electronic device in the fast charging mode can be evaluated, so as to help the manufacturer to determine the fast charging capability of the electronic device or charger produced by it.

[0051] Safety test: the fast charging protocol test can also consider the safety performance during the fast charging process, so as to ensure through the test that the electronic device and the charger will not have safety problems such as overheating, overloading and voltage abnormality during the fast charging process, so as to protect the safety of the electronic device and the user.

[0052] It is worth noting that the purposes of the fast charging protocol test can include but are not limited to the above purposes, which will not be described here.

[0053] Generally, the fast charging protocol test of the electronic device and the charger can include the fast charging protocol test of the electronic device itself, the fast charging protocol test of the charger itself, and the fast charging protocol joint debugging test of the electronic device and the charger.

[0054] Figure 1 is a fast charging protocol test architecture diagram of an electronic device provided by the embodiment.

[0055] As shown in Figure 1 , when the fast charging protocol test of the electronic device itself is performed, the test device is connected to the electronic device, and the DC power supply is connected to the test device, so that the test device can take power from the DC power supply to provide the required voltage for the electronic device.

[0056] Among them, the test device can interact with the electronic device. For example, the electronic device sends a power supply request to the test device according to the fast charging protocol it supports, and the test device interacts with the DC power supply according to the power supply request of the electronic device, so that the voltage output by the DC power supply can meet the test requirements to successfully complete the test process.

[0057] Figure 2 is a fast charging protocol joint debugging test architecture diagram of an electronic device and a charger provided by the embodiment.

[0058] As shown in Figure 2 , in the joint debugging test of the fast charging protocol test of the electronic device and the charger, the electronic device and the charger are respectively connected to the test device, and the DC power supply is connected to the test device, so that the test device can take power from the DC power supply to provide the required voltage for the electronic device. Among them, the electronic device and the charger can interact with the test device, and the test device can also interact with the DC power supply to adjust the voltage output by the DC power supply to the electronic device according to the request of the electronic device, so that the voltage output by the DC power supply can meet the test requirements to successfully complete the test process.

[0059] By Figure 1 and Figure 2 It can be seen that in the test process of the fast charging protocol of the electronic device itself, and in the joint debugging test process of the electronic device and the charger, an additional DC power supply is needed to supply power to the electronic device. In the process of testing, the voltage provided by the DC power supply to the electronic device needs to change according to the test requirements. At this time, the test device needs to develop a set of programs or control logic that meet the interaction protocol of the DC power supply, to realize the interaction with the DC power supply to adjust the output voltage of the DC power supply.

[0060] It can be seen that the test device needs to support not only the fast charging protocol of the electronic device and the charger, but also the interaction protocol of the DC power supply, resulting in complex logic control of the test device and great development difficulty. At the same time, the response time of the test device interacting with the DC power supply will also affect the test process of the fast charging protocol, and it is difficult to ensure the smooth test and the accuracy of the test results.

[0061] In addition, the overall volume of the DC power supply used for testing is usually large and not easy to move, so that the test of the fast charging protocol can only be carried out at a fixed position, which is difficult to operate and has poor portability. At the same time, the procurement cost of the DC power supply is high, resulting in high test cost.

[0062] In order to solve the above problems, the charging test method and system provided by the present application can realize charging test, and can also realize miniaturized design of the test system, reduce test cost and reduce development difficulty of the test device.

[0063] Figure 3 is a flowchart of the first charging test method provided by the present embodiment.

[0064] As shown in Figure 3 The present embodiment provides a charging test method for testing the charging function of an electronic device, especially the fast charging function of the electronic device. The method comprises the following steps:

[0065] Step S110: The test device monitors the interaction between the first device and the second device.

[0066] The first device is a power supply device, and the second device is a charging device, or the first device is a charging device, and the second device is a power supply device. The charging device is a device to be charged, and the power supply device is a device providing power supply, which is used to charge the charging device. During the test of the charging protocol, the charging device can also be called the load end of the charging protocol, and the power supply device can also be called the source end of the charging protocol.

[0067] Exemplarily, the charging device can be an electronic device such as a mobile phone, a tablet computer, a handheld computer, a personal computer (PC), an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device, and / or a smart city device, and the like. Embodiments of the present application do not specially limit the specific type of the charging device.

[0068] The power supply device can be a power adapter, a mobile power supply, a charger, a power bank, a charging switch, a charging pile, a charging station, and the like, which can provide power supply for the charging device and charge the charging device. Embodiments of the present application do not specially limit the specific type of the power supply device.

[0069] When the power supply device is a charger, the charger can be a charger that is standard equipped with the charging device, or a charger that is not standard equipped with the charging device. In other words, in some test processes, the charging protocol supported by the charger can be different from the charging protocol supported by the charging device, as long as the voltage and current output by the charger can meet the test requirements, and the test device can realize communication with the charger.

[0070] In the charging test method provided in the embodiment, the power supply device is used to provide the charging voltage required by the charging device in the charging test process, so as to replace the function of the direct current power supply. In this way, it can help to reduce the complexity of the logic development of the test device. At the same time, compared with the direct current power supply, the overall volume and cost of the power supply device are lower than those of the direct current power supply. In this way, using the power supply device to replace the direct current power supply for power supply during testing can also improve the operation convenience of the test system and reduce the test cost.

[0071] Optionally, the charging device and the power supply device can support a fast charging protocol, such as a QC protocol, a PD protocol, a UFCS protocol, a SCP protocol, and the like.

[0072] The charging device can support one or more fast charging protocols, and the power supply device can also support one or more fast charging protocols.

[0073] If the charging device and the power supply device both support a fast charging protocol, the charging device and the power supply device can support the same fast charging protocol. At this time, the charging device and the power supply device can directly interact with each other.

[0074] If the charging device and the power supply device support one fast charging protocol, the charging device and the power supply device can also support different fast charging protocols. At this time, the charging device and the power supply device can indirectly interact through the test device. The test device can support the fast charging protocols of the charging device and the power supply device at the same time.

[0075] If the charging device supports one fast charging protocol and the power supply device supports multiple fast charging protocols, when the fast charging protocol supported by the power supply device includes the fast charging protocol supported by the charging device, the charging device and the power supply device can directly interact through the fast charging protocol supported by the charging device. When the fast charging protocol supported by the power supply device does not include the fast charging protocol supported by the charging device, the charging device and the power supply device can indirectly interact through the test device, wherein the test device can support the fast charging protocols of the charging device and the power supply device at the same time.

[0076] If the power supply device supports one fast charging protocol and the charging device supports multiple fast charging protocols, when the fast charging protocol supported by the charging device includes the fast charging protocol supported by the power supply device, the charging device and the power supply device can directly interact through the fast charging protocol supported by the power supply device. When the fast charging protocol supported by the power supply device does not include the fast charging protocol supported by the charging device, the charging device and the power supply device can indirectly interact through the test device, wherein the test device can support the fast charging protocols of the charging device and the power supply device at the same time.

[0077] If the power supply device and the charging device support multiple fast charging protocols. When the multiple fast charging protocols supported by the charging device include one or more of the multiple fast charging protocols supported by the power supply device, the charging device and the power supply device can interact through the fast charging protocol supported by both. When the multiple fast charging protocols supported by the charging device do not include any of the multiple fast charging protocols supported by the power supply device, the charging device and the power supply device can indirectly interact through the test device, wherein the test device can support the fast charging protocols of the charging device and the power supply device at the same time.

[0078] Step S120: The test device acquires the first message sent by the first device.

[0079] The first message is used for charging negotiation between the first device and the second device. The first message can be a negotiation request message or a negotiation response message, and can be a control message or a data message.

[0080] For example, the negotiation request message can be used for the first device to detect whether the target device exists, request to detect whether the data transmission between the first device and the target device is normal, etc. These two kinds of negotiation request messages can also be called Ping messages.

[0081] For example, when the first device is a charging device and the second device is a power supply device, the negotiation request message can also be used to request the power supply device to output a certain voltage value and current value. This kind of negotiation request message can also be referred to as a Request message.

[0082] For example, when the first device is a charging device and the second device is a power supply device, the negotiation request message can also be used to request the power supply device to output a certain voltage value and current value. This kind of negotiation request message can also be referred to as a Request message.

[0083] For example, when the first device is a charging device and the second device is a power supply device, the negotiation request message can also be used to request the power supply device to output a certain voltage value and current value. This kind of negotiation request message can also be referred to as a Request message.

[0084] For example, when the first device is a charging device and the second device is a power supply device, the negotiation request message can also be used to request the power supply device to output a certain voltage value and current value. This kind of negotiation request message can also be referred to as a Request message.

[0085] In some examples, the negotiation request message can include parameters related to the negotiation request. For example, when the first device is a charging device and the second device is a power supply device, the negotiation request message includes charging parameters to request the second device to charge the first device based on the charging parameters.

[0086] The negotiation response message can be a response message sent by the first device after receiving the negotiation request message, for example, after receiving the negotiation request message sent by the second device or a test device.

[0087] For example, the negotiation response message can include at least two response types, such as negotiation agreement and negotiation refusal.

[0088] In some examples, the negotiation response message indicating negotiation agreement can be an ACK (acknowledgement) + Accept message, and the negotiation response message indicating negotiation refusal can be an ACK + Refuse message.

[0089] In addition, negotiation response messages may also include other types, such as negotiation confirmation or negotiation negative confirmation. A negotiation confirmation indicates that the message or data sent by the other party has been received, while a negotiation negative confirmation indicates that the message or data sent by the other party has been received, but the message or data is lost or erroneous and needs to be resent. A negotiation confirmation message may also be referred to as an ACK message, and a negotiation negative confirmation message may also be referred to as an NCK message.

[0090] In some examples, the negotiation response message may also include response parameters, which may include charging-related parameters such as voltage, current, power, impedance, or time.

[0091] It is understandable that the content of the first message may be different in different tests. The specific content of the first message may be selected according to the test purpose and is not limited in this embodiment.

[0092] During the test, when the first device sends a first message, the testing apparatus needs to obtain and intercept the first message in order to complete subsequent testing.

[0093] Before the test device receives the first message, if the first device and the second device are interacting directly, the test device needs to block the direct interaction between the first device and the second device when receiving the first message, and enable the first device and the second device to interact indirectly through the test device. In this way, the second device can be prevented from receiving the first message.

[0094] Before the test device obtains the first message, if the first device and the second device interact indirectly through the test device, the test device will no longer forward the first message to the second device when obtaining the first message. In this way, the second device can be prevented from receiving the first message.

[0095] Step S130: The testing device modifies the content of the first message to obtain a second message.

[0096] For example, if the first message is a negotiation request message, the testing device may modify the request content. For example, if the first message requests a 10V voltage, the testing device may modify it to request a 15V voltage according to the test requirements.

[0097] Alternatively, if the first message is a negotiation response message, the test device may modify the response type. For example, if the response type of the first message is negotiation confirmation, the test device may modify it to negotiation rejection according to the test requirements.

[0098] Step S140: The testing apparatus sends the second message to the second device.

[0099] When the first message comes from the charging device, the testing apparatus can disguise itself as the charging device and send the modified second message to the power supply device, thereby meeting the testing requirements.

[0100] Alternatively, when the first message is from the power supply device, the testing device can disguise as the power supply device, and send the modified second message to the charging device, so as to meet the testing requirements.

[0101] In an example, when the second device is the power supply device, after step S140, the testing device can directly confirm whether the response of the power supply device to the second message is expected.

[0102] Alternatively, when the second device is the power supply device, after step S140, the power supply device sends a third message to the charging device after receiving the second message. The testing device can send the third message to the charging device, and confirm whether the response of the charging device to the third message is expected.

[0103] In another example, when the second device is the charging device, after step S140, the testing device can directly confirm whether the response of the charging device to the second message is expected after the charging device receives the second message.

[0104] Alternatively, when the second device is the charging device, after step S140, the charging device sends a third message to the power supply device after receiving the second message. The testing device can send the third message to the power supply device, and confirm whether the response of the power supply device to the third message is expected.

[0105] In the above description, the testing device can modify the content of the first message according to the testing requirements to obtain the second message, so as to test whether the response of the second device to the second message is expected.

[0106] In addition, the testing device can also modify the normal negotiation message between the first device and the second device into an abnormal negotiation message, so as to test whether the response of the first device or the second device to the abnormal negotiation message is expected. The normal negotiation message is the first message, the abnormal negotiation message is the second message, and the abnormal negotiation message is a message not generated based on the charging protocol, and can be used to simulate abnormal situations.

[0107] The charging testing method provided by the application can be applied to the individual testing of the charging device, or the individual testing of the power supply device, and can also be applied to the joint testing of the charging device and the power supply device. In these tests, the power supply device can be used to provide the charging voltage required by the testing, so that the charging device can receive the charging voltage required by the testing, instead of the direct current power supply in the traditional testing process.

[0108] Compared with the direct current power supply, the power supply device can adjust the output voltage according to the test requirements. At the same time, since the test device needs to test the charging device and the power supply device, the test device can at least support the communication protocol of the charging device and the power supply device. If the power supply device is used to replace the direct current power supply to supply power to the power supply device, the test device does not need to develop an additional module for communication with the direct current power supply, thereby effectively simplifying the control logic of the test device. In addition, since the response of the power supply device is carried out according to the charging protocol, using the power supply device to provide the charging voltage can facilitate the control of the response time required by the charging protocol, further reducing the complexity of the control logic of the test device.

[0109] In addition, compared with the direct current power supply, the power supply device has a smaller size and a lower cost, and using the power supply device to replace the direct current power supply can also reduce the overall size of the test system, improve the portability of the test system, and reduce the test cost.

[0110] Figure 4 is a flowchart of a second charging test method provided by the embodiment.

[0111] As shown in Figure 4 , the embodiment of the present application provides a charging test method for testing the charging function of an electronic device, especially the fast charging function of the electronic device. The method comprises:

[0112] Step S210: The test device monitors the interaction between the charging device and the power supply device.

[0113] The charging device is a device to be charged, such as a mobile phone, and the power supply device is a device providing power, such as a charger of the mobile phone. During the charging protocol test, the charging device can also be referred to as the load end of the charging protocol, and the power supply device can also be referred to as the source end of the charging protocol.

[0114] The specific description can be referred to the description of step S110 above, which will not be repeated here.

[0115] Figure 5 is a flowchart of the interaction between the first charging device and the power supply device provided by the embodiment.

[0116] In combination with Figure 4 and Figure 5 , for example, in step S210, the interaction process between the charging device and the power supply device can include:

[0117] Step S211: The charging device and the power supply device perform fast charging protocol handshake interaction.

[0118] When the charging device, the power supply device and the testing device are connected, the charging device can send a protocol handshake request to the power supply device, the power supply device receives the protocol handshake request and replies to the confirmation; or the power supply device can send a protocol handshake request to the charging device, the power supply device receives the protocol handshake request and replies to the confirmation.

[0119] In this way, the charging device and the power supply device can identify each other through the protocol handshake request, confirm the communication rules agreed upon by the protocol, so as to facilitate effective data transmission and exchange. It can be understood that the protocol handshake request can be sent by the charging device or the power supply device, and the present scheme is not limited.

[0120] It is worth noting that the specific process of the protocol handshake interaction between the charging device and the power supply device can be carried out according to the supported protocol rules, which is not limited in the present embodiment.

[0121] Step S212: The charging device sends a negotiation request message to the power supply device to obtain the voltage and current capability of the power supply device.

[0122] After the charging device and the power supply device establish communication, the charging device can obtain the voltage and current capability of the power supply device from the power supply device, so as to facilitate the charging device to request voltage from the power supply device according to the power supply capability of the power supply device in the subsequent process. The power supply capability of the power supply device is the range of voltage, current and power supply capability that the power supply device can provide.

[0123] It is worth noting that the power supply capability of the power supply device can be stored in the power supply device, or can be automatically detected by the power supply device after receiving the request of the charging device. In the present embodiment, the acquisition of the power supply capability of the power supply device is not limited.

[0124] Step S213: The power supply device sends a reply message to the charging device to report the voltage and current capability of the power supply device.

[0125] After receiving the negotiation request message of the charging device, the power supply device can reply to the request of the charging device and report its voltage and current capability to the charging device, so as to facilitate the next step.

[0126] Step S214: The charging device and the power supply device enter the voltage and current regulation management.

[0127] When the charging device and the power supply device complete the above preparation work, the charging device and the power supply device can enter the voltage and current regulation management state. In this way, it can be convenient to realize that the power supply device can dynamically adjust the voltage provided to the charging device according to the provisions of the fast charging protocol in the subsequent charging process, so as to realize fast charging.

[0128] Step S215: The charging device performs path impedance detection.

[0129] In the embodiment, the path impedance is the impedance of the path from the output end of the power supply device to the input end of the charging device. The charging device can calculate the path impedance by acquiring the current source end voltage of the power supply device and detecting the voltage received by the charging device itself. The current source end voltage of the power supply device can be reported by the power supply device at the same time of reporting the power supply capability to the charging device, or can be subsequently acquired by the charging device, which is not limited in the embodiment.

[0130] Step S216: The charging device determines an initial power supply request according to the power supply capability of the power supply device, the cable capability and the capability of the charging device itself.

[0131] In the embodiment, the cable capability can be obtained by the charging device identifying the electronic tag of the cable, or can be obtained by calculating the path impedance. The electronic tag of the cable identifies the working capability of the cable, such as the maximum current or maximum voltage that can be borne, the transmission capability of the power supply and the data transmission capability, and the like.

[0132] The capability of the charging device itself is the voltage, current and power range that can be received by the charging device, so that a reasonable initial power supply request can be calculated.

[0133] It is worth noting that during the process of steps S211 to S216, the charging device and the power supply device can also perform other interactions, which are not limited in the embodiment.

[0134] For example, between step S213 and step S214, the charging device and the power supply device can also perform self-defined authentication interaction, and the normal interaction process of the charging device and the power supply device is not limited in the embodiment.

[0135] The self-defined authentication is that when the charging power specified in the fast charging protocol is greater than the set threshold of the charging device or the power supply device, the set threshold can be self-defined by the manufacturer. At this time, the charging device must perform the self-defined authentication of the manufacturer.

[0136] Step S220: The test device acquires the first message sent by the charging device.

[0137] The first message is a negotiation request message, and the request content of the first message includes charging parameters. The charging parameters can include charging voltage value, charging current value, charging time, charging power and other parameters in the charging process of the power supply device for the charging device.

[0138] Optionally, the first message can be a Request message.

[0139] The charging device can send the initial power supply request to the power supply device, wherein the initial power supply request comprises the first charging voltage. The charging device can request the power supply device to provide the first charging voltage so that the power supply device can provide a reasonable charging voltage for the charging device.

[0140] When the charging device sends the first message with the first charging voltage, the test device can acquire and intercept the message according to the test requirement.

[0141] The acquisition and interception of the first message by the test device can refer to the description of step S120, which will not be repeated here.

[0142] Step S230: The test device modifies the charging parameter in the first message to obtain a second message.

[0143] When the charging parameter is the first charging voltage, the test device can modify the first charging voltage to a second charging voltage to obtain a second message. The second message comprises the second charging voltage. The second charging voltage in the second message is different from the first charging voltage in the first message. For example, the first charging voltage requested in the first message is 10V, and the second charging voltage requested in the second message is 15V. In other words, the test device can increase or decrease the first charging voltage value requested in the first message according to the test requirement, so as to detect whether the power supply device or the charging device can correctly respond according to the request of the second message obtained by modification.

[0144] Step S240: The test device sends the second message to the power supply device.

[0145] After obtaining the second message, the test device sends the second message to the power supply device, so that the power supply device can provide the second charging voltage required by the test for the charging device.

[0146] Step S250: The power supply device outputs the second charging voltage to the charging device based on the second message.

[0147] As can be seen from the above description, at this time, the second charging voltage output by the power supply device to the charging device according to the second message is different from the first charging voltage requested by the charging device in the first message, so as to detect whether the charging device will respond according to the charging protocol according to the test requirement.

[0148] Figure 6 is a part of the flow chart of the second charging test method provided by the embodiment.

[0149] In combination with Figure 4 and Figure 6 In some embodiments, after step S240 and before step S250, the following steps are further included:

[0150] Step S241: The power supply device receives the second message and confirms whether the second charging voltage requested in the second message is within the outputtable range.

[0151] Since the power supply capability of the power supply device is limited, when the power supply device receives the second message, it first needs to confirm whether the second charging voltage and current requested in the second message are within the outputtable range.

[0152] Step S242: When the second charging voltage requested in the second message is within the outputtable range, the power supply device sends a negotiation response message to the charging device, with the response type being negotiation agreement.

[0153] For example, the negotiation response message with the response type being negotiation agreement can be an ACK+Accept message, to inform the charging device that the requested charging parameters can be provided.

[0154] Here, ACK (acknowledgement) means that the receiving party sends an acknowledgement message to the sending party, to inform the sending party that the data packet has been successfully received.

[0155] After receiving a message sent to it, the power supply device, the charging device and the cable electronic tag first perform cyclic redundancy check (CRC) on the message. If the CRC check passes, an acknowledgement message is sent to the sending party after a delay set time.

[0156] Accept means that the receiving party sends an agreement message to the sending party, to inform the sending party that the request of the sending party can be accepted. After receiving the negotiation request message of the charging device, the power supply device agrees to the output voltage and current requested by the charging device, and then adjusts to the output voltage and current requested by the charging device.

[0157] Step S243: When the second charging voltage requested in the second message is not within the outputtable range, the power supply device sends a negotiation response message to the charging device, with the response type being negotiation refusal.

[0158] For example, the negotiation response message with the response type being negotiation refusal can be an ACK+Refuse message.

[0159] Here, Refuse means that the receiving party sends a refusal message to the sending party, to inform the sending party that the request of the sending party cannot be accepted.

[0160] For the power supply device, the charging device or the cable electronic tag, if a certain message is received and for some reason (such as unable to identify, not supported, etc.) cannot respond or execute the behavior requested by the message, a Refuse message should be replied to the other party, and the message number, message type, command number and refusal reason of the message it refuses should be included in the Refuse message.

[0161] When the test device intercepts the first message, it can adjust the communication mode between the charging device and the power supply device. If the communication between the charging device and the power supply device at this time is indirect communication through the test device, the negotiation response message sent by the power supply device needs to be forwarded through the test device to enable the charging device to normally receive the message of the power supply device.

[0162] After the above steps S242 or S243, the following steps are performed:

[0163] Step S244: After the charging device receives the negotiation response message, it sends a negotiation confirmation message to the power supply device.

[0164] The negotiation confirmation (ACK) message sent by the charging device can be forwarded through the test device.

[0165] The ACK message sent by the charging device is a response message confirming the receipt of the negotiation agreement sent by the power supply device, to inform the power supply device that it can enter the next process.

[0166] Step S245: After the power supply device receives the negotiation confirmation message and adjusts the output charging voltage to the second charging voltage requested by the second message, it sends a negotiation response message to the charging device that it is ready to supply power.

[0167] At this time, the power supply device confirms to the charging device that it has made charging preparations and can proceed with charging.

[0168] Step S246: The charging device receives the negotiation response message and receives the second charging voltage provided by the power supply device.

[0169] After the charging device receives the negotiation response message that the power supply device is ready to supply power (Power_Ready), it can turn on the power switch and receive the second charging voltage provided by the power supply device, thereby realizing the charging process of the charging device by the power supply device.

[0170] It should be noted that in the processes of steps S241-S246, the power supply device and the charging device can be in direct communication or indirect communication through the test apparatus, which is not limited in the embodiment. Meanwhile, steps S241-S246 are examples of some interaction steps of the power supply device before providing the charging voltage to the charging device in the embodiment, and other steps can be included in other embodiments, which are not limited in the embodiment.

[0171] Step S260: The test apparatus determines whether the response of the charging device to the second charging voltage is expected.

[0172] If the charging device produces a target response to the second charging voltage, the test apparatus determines that the response of the charging device to the second charging voltage is expected. The target response is a response that meets the target charging protocol.

[0173] For example, it is assumed that the target response set in the target charging protocol is that the charging device exits the charging when the charging voltage received by the charging device is greater than the originally requested charging voltage, so as to improve the safety of the charging device and the power supply device. The target charging protocol is a charging protocol required by the test or a charging protocol supported by the charging device.

[0174] At this time, the first charging voltage requested by the charging device is 10V, and the second charging voltage provided by the power supply device is 15V. It can be seen that the second charging voltage provided by the power supply device is greater than the first charging voltage originally requested by the charging device. According to the provision of the target charging protocol, the charging device should exit the fast charging process at this time. If the charging device exits the fast charging process at this time, it indicates that the charging device produces a target response to the second charging voltage, and then the test apparatus can determine that the response of the charging device is expected.

[0175] It can be understood that the target response of the target charging protocol and the response of the charging device are examples, and the expected result can be different in the actual charging protocol and the test process, which is not limited in the embodiment.

[0176] If the charging device does not produce a target response to the second charging voltage, the test apparatus determines that the response of the charging device to the second charging voltage is not expected. For example, according to the above description, if the charging device does not exit the fast charging process when receiving the charging voltage of 15V, but still performs the fast charging, the test apparatus can determine that the response of the charging device is not expected.

[0177] In the first charging test method provided in the present application, the power supply device can provide the charging voltage required by the charging device in the test process, so that an additional DC power supply is not required. At this time, the test device only needs to support the interactive protocol of the power supply device and the charging device, so that the control logic of the test device can be simplified. At the same time, the test device can intercept and modify the messages sent by the charging device to the power supply device. For the power supply device, the test device can now pretend to be a charging device to meet the test requirements of the test process.

[0178] Figure 7 is a flowchart of the third charging test method provided in the present embodiment.

[0179] As Figure 7 shown, the present embodiment further provides a charging test method for testing the charging function of an electronic device, especially the fast charging function of the electronic device. The method comprises:

[0180] Step S310: The test device monitors the interaction between the charging device and the power supply device.

[0181] The charging device is a device to be charged, such as a mobile phone, and the power supply device is a device providing power, such as a charger for a mobile phone.

[0182] The description of the charging device and the power supply device can refer to the description of step S210 above, which will not be repeated here.

[0183] Figure 8 is a flowchart of the second charging device and power supply device interaction provided in the present embodiment.

[0184] In combination Figure 7 and Figure 8 shown, for example, in step S310, the interaction process between the charging device and the power supply device can include:

[0185] Step S311: The charging device and the power supply device perform fast charging protocol handshake interaction.

[0186] Step S312: The charging device sends a negotiation request message to the power supply device to obtain the voltage and current capability of the power supply device.

[0187] Step S313: The power supply device sends a negotiation response message to the charging device to report the voltage and current capability of the power supply device.

[0188] Step S314: The charging device and the power supply device enter voltage and current regulation management.

[0189] Step S315: The charging device performs path impedance detection.

[0190] Step S316: The charging device determines an initial power supply request according to the power supply capability of the power supply device, the cable capability and the self capability of the charging device.

[0191] It is worth mentioning that the description of steps S311-S316 can refer to the process description of steps S211-S216 described above, which will not be repeated here.

[0192] Step S317: The charging device sends a negotiation request message with the initial power supply request to the power supply device.

[0193] The negotiation request message includes the initial power supply request determined by the charging device in step S316. At this time, the charging device can request the power supply device to provide the voltage value and the current value in the initial power supply request to determine that the power supply device can provide a reasonable power supply voltage and current for the charging device.

[0194] Optionally, the negotiation request message can be a Request message.

[0195] Step S318: The power supply device receives the negotiation request message, and when confirming that the voltage value and the current value requested in the negotiation request message are within the outputtable range, sends a first message to the charging device.

[0196] Since the power supply capability of the power supply device is limited, when the power supply device receives the negotiation request message, it first needs to confirm whether the voltage value and the current value requested in the negotiation request message are within the outputtable range.

[0197] Step S320: The test device acquires the first message sent by the power supply device.

[0198] The first message includes a negotiation response message.

[0199] The negotiation response message is a response message made by the power supply device according to the negotiation request message of the charging device.

[0200] The type of the negotiation response message is negotiation agreement or negotiation rejection.

[0201] In step S318, the power supply device confirms that the voltage value and the current value in the negotiation request message are within the outputtable range, and the response type of the first message is negotiation agreement. For example, the negotiation response message with the response type of negotiation agreement can be an ACK+Accept message to inform the charging device that it can charge at the requested voltage value and current value.

[0202] Step S330: The test device modifies the type of the negotiation response message to obtain a second message.

[0203] The modification of the type of the negotiation response message by the testing device in step S330 includes modifying the type of the negotiation response message from negotiation agreement to negotiation rejection.

[0204] The modification of the type of the negotiation response message by the testing device in step S330 includes modifying the type of the negotiation response message from negotiation agreement to negotiation rejection.

[0205] In one example, the first message is a negotiation agreement, such as an ACK+Accept message. The testing device can modify the ACK+Accept message to a negotiation rejection, such as an ACK+Refuse message.

[0206] In another example, the testing device can directly discard the ACK or the Accept in the ACK+Accept message, and send the remaining message to the charging device.

[0207] In another example, the testing device can directly discard the ACK+Accept message in its entirety, and no longer send messages to the charging device.

[0208] In some embodiments, if the power supply device confirms in step S318 that the voltage value, the current value in the negotiation request message are not within the outputtable range, the type of the response of the first message is a negotiation rejection. The negotiation response message with the response type of negotiation rejection can be an ACK+Refuse message, to inform the charging device that the requested charging parameters cannot be provided.

[0209] The modification of the type of the negotiation response message by the testing device in step S330 includes modifying the type of the negotiation response message from negotiation rejection to negotiation agreement.

[0210] In one example, the first message is a negotiation rejection, such as an ACK+Refuse message. The testing device can modify the ACK+Refuse message to a negotiation agreement, such as an ACK+Accept message.

[0211] In another example, the testing device can directly discard the ACK or the Refuse in the ACK+Refuse message, and send the remaining message to the charging device.

[0212] In another example, the testing device can directly discard the ACK+Refuse message in its entirety, and no longer send messages to the charging device.

[0213] Step S340: The testing device sends a second message to the charging device.

[0214] At this time, the test device can send the modified second message to the charging device. Compared with the charging device, in the present test process, the test device disguises as the power supply device to send the message required by the test to the charging device.

[0215] Step S350: The test device determines whether the response of the charging device to the second message is expected.

[0216] If the charging device generates a target response to the second message, the test device determines that the response of the charging device to the second message is expected, wherein the target response is a response conforming to the target charging protocol.

[0217] For example, it is assumed that the target response set in the target charging protocol is that the charging device stops the fast charging process after receiving the negotiation rejection. At this time, when the charging device receives the negotiation rejection, if the charging device exits the fast charging process, it indicates that the charging device generates the target response, and then the test device can confirm that the response of the charging device is expected.

[0218] If the charging device does not generate a target response to the second message, the test device determines that the response of the charging device to the second message is not expected.

[0219] For example, according to the above description, if the charging device does not exit the fast charging process after receiving the negotiation rejection, but still performs fast charging, the test device can confirm that the response of the charging device is not expected.

[0220] In the second charging test method provided in the present application, the power supply device can provide the charging voltage required by the charging device in the test process, so that an additional direct current power supply is not required. At this time, the test device only needs to support the interactive protocol of the power supply device and the charging device, so that the control logic of the test device can be simplified. Meanwhile, the test device can intercept and modify the message sent by the power supply device to the charging device. For the charging device, at this time, the test device can disguise as the power supply device to meet the test requirements of the test process.

[0221] Figure 9 is a structural block diagram of the first charging test system provided in the present embodiment.

[0222] As shown in Figure 9 The present application further provides a charging test system 100, which comprises a test device 10, a first device 20, a second device 30 and a power supply path 40. The power supply path 40 is electrically connected to the first device 20 and the second device 30. The first device 20 is a power supply device, and the second device 30 is a charging device, or the first device 20 is a charging device, and the second device 30 is a power supply device.

[0223] When the first device 20 and the second device 30 charge according to the charging protocol, the first device 20 and the second device 30 can perform charging negotiation by sending messages, so as to realize information interaction before charging and control during charging. It can be understood that the first message can be any negotiation message of the first device 20 and the second device 30 in the interaction process, which is not limited in the embodiment.

[0224] Specifically, one end of the power supply path 40 is electrically connected to the Vbus_out end of the power supply device, and the other end is electrically connected to the Vbus_in end of the charging device. The power supply device is used to charge the charging device, and during the test process, the power supply device can provide a test voltage for the charging device through the power supply path 40. In the charging test method provided in the embodiment, the power supply device is used to provide a test voltage for the charging device during the charging test process, so as to replace the function of the direct current power supply.

[0225] For example, the power supply path 40 is also provided with a power supply switch 50, which is used to control the on-off of the power supply path 40 of the first device 20 and the second device 30. When starting the test, the power supply switch 50 needs to be closed, so that the power supply path 40 of the first device 20 and the second device 30 is a path.

[0226] Further, the test device 10 is configured to obtain the first message sent by the first device 20, the first message being used for charging negotiation between the first device 20 and the second device 30; modify the content of the first message to obtain a second message, and send the second message to the second device 30.

[0227] For example, the charging device can be a mobile phone, a tablet computer, a handheld computer, a personal computer (PC), an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device, and / or a smart city device, and the like. The specific type of the charging device is not specially limited in the embodiment.

[0228] The power supply device can be a power adapter, a mobile power supply, a charger, a power bank, a charging pile, a charging switch, a charging station, and the like, which can provide power for the charging device and charge the charging device. The specific type of the power supply device is not specially limited in the embodiment.

[0229] Wherein, when the power supply device is a charger, the charger used in the test process can be a charger that is not equipped with the charging device, or a charger that is equipped with the charging device. In other words, in some test processes, the charging protocol supported by the charger can be different from the charging protocol supported by the charging device, as long as the voltage and current output by the charger can meet the test requirements, and the test device 10 can realize communication with the charger.

[0230] The charging test system 100 provided by the embodiment can be applied to separate testing of the charging device, or separate testing of the power supply device, and can also be used for joint debugging testing of the charging device and the power supply device. In these test processes, the power supply device can be used to provide a test power supply for the charging device, so that the charging device can receive a charging voltage specified by the test requirements, instead of a direct current power supply in the conventional test process. At this time, the test device 10 does not need to develop a module for communicating with the direct current power supply, thereby effectively simplifying the control logic of the test device 10. In addition, since the response of the power supply device is performed according to the charging protocol, using the power supply device to provide the charging voltage can also facilitate the control of the response time required by the charging protocol, further reducing the complexity of the control logic of the test device 10. In addition, compared with the direct current power supply, the power supply device has a smaller size and lower cost, and using the power supply device to replace the direct current power supply can also reduce the overall size of the test system, improve the portability of the test system, and reduce the test cost.

[0231] Figure 10 is a structural block diagram of a second charging test system provided by the embodiment.

[0232] As shown in Figure 10 , the test device 10 includes a main control module 11 and a transmission module 12.

[0233] Wherein, the main control module 11 mainly simulates the protocol timing and controls the test process, and the main control module 11 realizes communication with the first device 20 and the second device 30 through two protocol channels.

[0234] For example, the main control module 11 communicates with the first device 20 through a first protocol, and communicates with the second device 30 through a second protocol.

[0235] It is worth noting that the first protocol is a charging protocol supported by the first device 20, and the second protocol is a charging protocol supported by the second device 30. As described above, the first protocol and the second protocol can be the same protocol or different protocols, which are not limited in the embodiment.

[0236] For example, the master module 11 can be a microcontroller unit (MCU) or a field programmable gate array (FPGA), etc. Meanwhile, in the master module 11, C language or Verilog, etc. can be used to realize the function of simulating protocol timing sequence of the master module 11. It can be understood that the logic control of the master module 11 can also be realized by other programming languages, which is not limited in the embodiment.

[0237] Optionally, the master module 11 can be used to monitor the communication interaction between the first device 20 and the second device 30, for example, the master module 11 can be used to realize the process of steps S210, S310 or S110 described above. Alternatively, the first device 20 and the second device 30 can communicate with each other through the master module 11 to realize the process of steps S220, S230, S240, S320, S330, S340, S120, S130 or S140 described above, which is not limited in the embodiment.

[0238] The transmission module 12 is used to realize the communication transmission between the first device 20, the second device 30 and the master module 11.

[0239] Specifically, the transmission module 12 can be used to realize the protocol output and sampling functions.

[0240] The protocol output is generally realized by using a digital-to-analog converter (DAC) or a comparator, so as to convert the digital signal output by the master module 11 into an analog signal that can be received by the first device 20 and the second device 30, such as converting the digital signal output by the master module 11 into a level required by the protocol specification of the first device 20 and the second device 30.

[0241] The protocol sampling is generally realized by using an analog-to-digital converter (ADC) or a comparator, so as to convert the analog signal output by the first device 20 and the second device 30 into a digital signal that can be received by the master module 11, such as converting the level satisfying the protocol specification requirement output by the first device 20 and the second device 30 into a digital signal.

[0242] It is worth noting that the DAC, ADC or comparator can be a chip independent of the master module 11, or can be integrated in the MCU or FPGA, which is not limited in the embodiment.

[0243] In addition, if the signal conversion function of the protocol test requirement can be integrated in the main control module 11, or the main control module 11 can be built-in protocol physical layer PHY, the DAC and the ADC can also not be used to realize the conversion of the signal.

[0244] Specifically, the transmission module 12 includes a protocol analysis module 121 and a protocol camouflage module 122.

[0245] The protocol analysis module 121 is used to realize the sampling function to analyze the communication signal sent by the first device 20 or the second device 30 and convert it into a digital signal that the main control module 11 can receive and transmit to the main control module 11.

[0246] Exemplarily, the protocol analysis module 121 can be used to realize the process of the above step S120.

[0247] The protocol camouflage module 122 is used to realize the protocol output function to convert the digital signal output by the main control module 11 into an analog signal that the first device 20 and the second device 30 can receive. At the same time, the protocol camouflage module 122 can also realize the modification of the original communication protocol data based on the test purpose, and then re-encapsulate it into new protocol communication data, or directly discard the original communication data and generate new communication data. In other words, the protocol camouflage module 122 can modify the content of the first message and obtain the second message, and then send the second message to the second device 30.

[0248] It can be understood that the protocol camouflage module 122 can also not modify the information, but only play a transmission role.

[0249] Exemplarily, the protocol camouflage module 122 can be used to realize the process of the above step S130.

[0250] Further, in the test process, the main control module 11 can control the protocol analysis module 121 to obtain the first message sent by the first device 20. At this time, the protocol analysis module 121 obtains and analyzes the first message to obtain the content of the first message and sends it to the main control module 11. The main control module 11 sends the content of the analyzed first message to the protocol camouflage module 122 and controls the protocol camouflage module 122 to modify the content of the first message. The protocol camouflage module 122 can receive the content of the first message and modify the content of the first message according to the test requirement to obtain the second message, and then send the second message to the second device 30.

[0251] In this way, the main control module 11 can use the protocol analysis module 121 to realize the acquisition and interception of the first message sent by the first device 20, and use the protocol camouflage module 122 to realize the modification of the content of the first message, and send the obtained second message to the main control module 11, so as to be able to camouflage as the first device 20 to meet the test requirement.

[0252] Optionally, when the first device 20 is a charging device and the second device 30 is a power supply device, the master module 11 can control the protocol analysis module 121 to acquire a first message sent by the charging device. The first message is a negotiation request message sent by the first device 20 to the second device 30, and includes charging parameters. At this time, the protocol analysis module 121 can acquire and analyze the first message to obtain the charging parameters and send them to the master module 11.

[0253] For example, the master module 11 and the protocol analysis module 121 can be used to implement the process of step S220, and the specific process can refer to the description of step S220, which will not be repeated here.

[0254] Further, the master module 11 can send the analyzed charging parameters to the protocol camouflage module 122 and control the protocol camouflage module 122 to modify the charging parameters. At this time, the protocol camouflage module 122 can receive the charging parameters, modify them to obtain a second message, and send the second message to the power supply device.

[0255] Specifically, the charging parameters include a first charging voltage, and the protocol camouflage module 122 can modify the first charging voltage in the first message to a second charging voltage to obtain the second message and send the second message to the power supply device.

[0256] For example, the master module 11 and the protocol camouflage module 122 can be used to implement the processes of steps S230 and S240, and the specific process can refer to the description of steps S230 and S240, which will not be repeated here.

[0257] In addition, the master module 11 can also be used to control the power supply device to output a second charging voltage to the charging device. The second charging voltage is output by the power supply device according to the second message and is different from the first charging voltage requested in the first message.

[0258] At the same time, the master module 11 can also be used to confirm whether the response of the charging device to the second charging voltage is as expected. When the charging device responds to the second charging voltage according to the charging protocol, the master module 11 can confirm that the response of the charging device to the second charging voltage is as expected. When the charging device does not respond to the second charging voltage according to the charging protocol, the master module 11 can confirm that the response of the charging device to the second charging voltage is not as expected.

[0259] For example, the master module 11 can be used to implement the process of step S250, and the specific process can refer to the description of step S250, which will not be repeated here.

[0260] It is worth mentioning that the protocol parsing module 121, the protocol disguising module 122 and the master module 11 can also be used to implement the processes of steps S241 to S246 described above, and the specific processes can refer to the description of steps S241 to S246 above, which will not be repeated here.

[0261] Optionally, when the first device 20 is the power supply device and the second device 30 is the charging device, the master module 11 can control the protocol parsing module 121 to obtain the first message sent by the power supply device. The first message includes the negotiation response message. At this time, the protocol parsing module 121 can obtain and parse the first message to obtain the negotiation response message and send it to the master module 11.

[0262] For example, the master module 11 and the protocol parsing module 121 can be used to implement the process of step S320 described above, and the specific process can refer to the description of step S320 above, which will not be repeated here.

[0263] Further, the master module 11 can send the parsed acceptance information to the protocol disguising module 122 and control the protocol disguising module 122 to modify the response type of the negotiation response message. At this time, the protocol disguising module 122 can receive the negotiation response message and modify the response type thereof to obtain the second message and send it to the power supply device.

[0264] Specifically, the type of the negotiation response message includes negotiation agreement or negotiation rejection. The protocol disguising module 122 can modify the type of the negotiation response message from negotiation agreement to negotiation rejection, or modify the type of the negotiation response message from negotiation rejection to negotiation agreement.

[0265] For example, the master module 11 and the protocol disguising module 122 can be used to implement the processes of steps S330 and S340 described above, and the specific processes can refer to the description of steps S330 and S340 above, which will not be repeated here.

[0266] Meanwhile, the master module 11 can also be used to confirm whether the response of the charging device to the acceptance information is as expected. When the charging device responds to the acceptance information according to the charging protocol, the master module 11 can confirm that the response of the charging device to the acceptance information is as expected. When the charging device does not respond to the acceptance information according to the charging protocol, the master module 11 can confirm that the response of the charging device to the acceptance information is not as expected.

[0267] For example, the master module 11 can be used to implement the process of step S350 described above, and the specific process can refer to the description of step S350 above, which will not be repeated here.

[0268] Figure 11 is the structure block diagram of a third charging test system provided by the embodiment.

[0269] As shown in FIG. 1, the transmission module 12 further comprises a switch module 123. The switch module 123 is configured to control the on-off of the communication between the protocol disguising module 122 and the first device 20 and / or the second device 30 under the control of the master module 11. Figure 11

[0270] In an example, when the first device 20 is a charging device, the second device 30 is a power supply device, and when the charging device and the power supply device support the same charging protocol. The switch module 123 comprises a first switch k1, a second switch k2, a third switch k3, and a fourth switch k4.

[0271] Taking the example that the charging device and the power supply device both support the UFCS protocol:

[0272] The first switch k1 is electrically connected between the D- terminal of the charging device and the D- terminal of the power supply device, and the first switch k1 is configured to control the on-off of the communication between the D- terminal of the charging device and the D- terminal of the power supply device.

[0273] The second switch k2 is electrically connected between the D+ terminal of the charging device and the D+ terminal of the power supply device, and the second switch k2 is configured to control the on-off of the communication between the D- terminal of the charging device and the D- terminal of the power supply device.

[0274] One end of the third switch k3 is electrically connected between the D- terminal of the power supply device and the first switch k1, and the other end of the third switch k3 is electrically connected to the protocol disguising module 122. The third switch k3 is configured to control the on-off of the communication between the D- terminal of the power supply device and the protocol disguising module 122.

[0275] One end of the fourth switch k4 is electrically connected between the D+ terminal of the charging device and the second switch k2, and the other end of the fourth switch k4 is electrically connected to the protocol disguising module 122. The fourth switch k4 is configured to control the on-off of the communication between the D+ terminal of the charging device and the protocol disguising module 122.

[0276] Meanwhile, the protocol analysis module 121 is electrically connected to the transmitting terminal and the receiving terminal of the power supply device and the transmitting terminal and the receiving terminal of the charging device.

[0277] In the UFCS protocol, the D+ terminal and the D- terminal of the charging device are the transmitting and receiving terminals of the protocol path of the charging device, the transmitting terminal of the charging device is the D- terminal, and the receiving terminal of the charging device is the D+ terminal. The D+ terminal and the D- terminal of the power supply device are the transmitting and receiving terminals of the protocol path of the power supply device, the receiving terminal of the power supply device is the D- terminal, and the transmitting terminal of the power supply device is the D+ terminal.

[0278] Table 1 below is a table of the on-off of the switch module 123 based on the UFCS protocol and the state of the test device 10.

[0279] Table 1​

[0280]

[0281] Specifically, in combination with the above Figure 11 And Table 1, when the first switch k1 and the second switch k2 are in the on state, and the remaining switches are in the off state, the D- end of the charging device can communicate with the D- end of the power supply device, and the D+ end of the charging device can communicate with the D+ end of the power supply device.

[0282] At this time, the communication process between the charging device and the power supply device is that the signal sent by the charging device can be directly sent to the D- end of the power supply device through the D- end of the charging device, and at the same time, the signal sent by the power supply device can be directly sent to the D+ end of the charging device through the D+ end of the power supply device, thereby realizing the direct interaction between the charging device and the power supply device.

[0283] At the same time, the protocol analysis module 121 is electrically connected to the sending end and the receiving end of the power supply device and the sending end and the receiving end of the charging device, so as to realize the monitoring of the interaction between the charging device and the power supply device.

[0284] For example, the test device 10 in the monitoring state can be used to realize the processes of steps S210, S310 or S110 described above, and the specific process can be referred to the above description, which will not be repeated here.

[0285] When the first switch k1 and the fourth switch k4 are in the on state, and the remaining switches are in the off state, the D- end of the charging device can communicate with the D- end of the power supply device, the D+ end of the power supply device can communicate with the main control module 11 through the protocol analysis module 121, and the D+ end of the charging device can communicate with the main control module 11 through the protocol camouflage module 122.

[0286] At this time, the communication process between the charging device and the power supply device is that the signal sent by the charging device can be directly sent to the D- end of the power supply device through the D- end of the charging device, and at the same time, the signal sent by the power supply device is first sent to the protocol analysis module 121 through the D+ end of the power supply device, and then the protocol analysis module 121 sends the signal to the main control module 11, and the main control module 11 transmits the signal to the protocol analysis module 121, and then the protocol analysis module 121 sends the signal to the D+ end of the charging device.

[0287] It can be understood that the protocol analysis module 121 can analyze the signal, and at the same time, the main control module 11 can control the protocol camouflage module 122 to adjust the signal, at this time, the test state of the test device 10 is in the state of camouflaging the power supply device.

[0288] Exemplarily, the test device 10 is in the state of disguising as a power supply device, and can be used to implement the steps S320, S330 and S340 described above. The specific process can refer to the description above, and will not be described here again.

[0289] When the second switch k2 and the third switch k3 are in the on state, and the other switches are in the off state, the D+ end of the charging device can directly communicate with the D+ end of the power supply device, the D- end of the charging device can communicate with the master control module 11 through the protocol analysis module 121, and the D- end of the power supply device can communicate with the master control module 11 through the protocol disguising module 122.

[0290] At this time, the communication process between the charging device and the power supply device is that the signal sent by the charging device can be sent to the protocol analysis module 121 through the D- end of the charging device, the protocol analysis module 121 sends the signal to the master control module 11, the master control module 11 transmits the signal to the protocol analysis module 121, and the protocol analysis module 121 sends the signal to the D- end of the power supply device; at the same time, the signal sent by the power supply device can be directly sent to the D+ end of the charging device through the D+ end of the power supply device.

[0291] It can be understood that the protocol analysis module 121 can analyze the signal, and the master control module 11 can control the protocol disguising module 122 to adjust the signal. At this time, the test state of the test device 10 is in the state of disguising as a charging device.

[0292] Exemplarily, the test device 10 is in the state of disguising as a charging device, and can be used to implement the steps S220, S230 and S240 described above. The specific process can refer to the description above, and will not be described here again.

[0293] When the third switch k3 and the fourth switch k4 are in the on state, and the other switches are in the off state, the D- end of the charging device can communicate with the master control module 11 through the protocol analysis module 121, the D- end of the power supply device can communicate with the master control module 11 through the protocol disguising module 122, the D+ end of the power supply device can communicate with the master control module 11 through the protocol analysis module 121, and the D+ end of the charging device can communicate with the master control module 11 through the protocol disguising module 122.

[0294] At this time, the communication process between the charging device and the power supply device is that the signal sent by the charging device can be sent to the protocol analysis module 121 through the D- end of the charging device, the protocol analysis module 121 sends the signal to the main control module 11, the main control module 11 transmits the signal to the protocol analysis module 121, and the protocol analysis module 121 sends the signal to the D- end of the power supply device; at the same time, the signal sent by the power supply device is first sent to the protocol analysis module 121 through the D+ end of the power supply device, the protocol analysis module 121 sends the signal to the main control module 11, the main control module 11 transmits the signal to the protocol analysis module 121, and the protocol analysis module 121 sends the signal to the D+ end of the charging device.

[0295] It can be understood that in this state, the protocol analysis module 121 can analyze the signal, and the main control module 11 can control the protocol camouflage module 122 to adjust or not adjust the signal, at this time, the test state of the test device 10 is in the state of camouflaging the charging device and the power supply device.

[0296] When the protocol camouflage module 122 does not adjust the signal, the test state of the test device 10 in the state of camouflaging the charging device and the power supply device can be used to realize the process of steps S241 to S246, and the specific process can refer to the description of steps S241 to S246 above, which will not be described here.

[0297] Figure 12 is the structure block diagram of the fourth charging test system provided by the embodiment.

[0298] As shown in Figure 12 , taking the case that both the charging device and the power supply device support the SCP protocol as an example:

[0299] The first switch k1 is electrically connected between the D- end of the charging device and the D- end of the power supply device, and the first switch k1 can be used to control the communication between the D- end of the charging device and the D- end of the power supply device.

[0300] The second switch k2 is electrically connected between the D+ end of the charging device and the D+ end of the power supply device, and the second switch k2 can be used to control the communication between the D+ end of the charging device and the D+ end of the power supply device.

[0301] One end of the third switch k3 is electrically connected between the D- end of the power supply device and the first switch k1, and the other end of the third switch k3 is electrically connected to the protocol camouflage module 122, and the third switch k3 can be used to control the communication between the D- end of the power supply device and the protocol camouflage module 122.

[0302] One end of the fourth switch k4 is electrically connected between the D- end of the charging device and the first switch k1, and the other end of the fourth switch k4 is electrically connected to the protocol camouflage module 122, and the fourth switch k4 is used to control the on-off of the communication between the D- end of the charging device and the protocol camouflage module 122.

[0303] Meanwhile, the protocol analysis module 121 is electrically connected to the sending end and the receiving end of the power supply device and the sending end and the receiving end of the charging device.

[0304] In the SCP protocol, the D+ end and the D- end of the charging device are the ports of the protocol channel of the charging device, and the sending end and the receiving end of the charging device are both D- ends; the D+ end and the D- end of the power supply device are the ports of the protocol channel of the power supply device, and the sending end and the receiving end of the power supply device are both D- ends, and the D+ end of the charging device needs to be connected with the D+ end of the power supply device at all times.

[0305] Table 2 below is a state table of the on-off of the switch module 123 based on the SCP protocol and the test device 10.

[0306] Table 2

[0307]

[0308] Specifically, in combination with the above Figure 12 and Table 2, when the first switch k1 and the second switch k2 are in the on state, and the remaining switches are in the off state, the D- end of the charging device can communicate with the D- end of the power supply device, and the D+ end of the charging device can be connected with the D+ end of the power supply device. At this time, the receiving end and the sending end of the charging device are both D- ends, and the receiving end and the sending end of the power supply device are both D- ends.

[0309] At this time, the communication process between the charging device and the power supply device is that the signal sent by the charging device can be directly sent to the D- end of the power supply device through the D- end of the charging device, and at the same time, the sending signal of the power supply device can be directly sent to the D- end of the charging device through the D- end of the power supply device, thereby realizing the direct interaction between the charging device and the power supply device.

[0310] Meanwhile, the protocol analysis module 121 is electrically connected to the sending end and the receiving end of the power supply device and the sending end and the receiving end of the charging device, thereby being able to realize the monitoring of the interaction between the charging device and the power supply device.

[0311] For example, the test device 10 in the monitoring state can be used to realize the process of the above steps S210, S310 or S110, and the specific process can be referred to the above description, which will not be described here.

[0312] When the second switch k2, the third switch k3 and the fourth switch k4 are in the on state, and the rest of the switches are in the off state, the D+ end of the charging device can be connected with the D+ end of the power supply device. The signal sent by the charging device can be sent to the protocol analysis module 121 through the D- end of the charging device, and then sent to the main control module 11 by the protocol analysis module 121. The main control module 11 transmits the signal to the protocol analysis module 121, and then sends the signal to the D- end of the power supply device; the D- end of the power supply device can communicate with the main control module 11 through the protocol analysis module 121, and the D- end of the charging device can communicate with the main control module 11 through the protocol camouflage module 122.

[0313] At this time, the communication process between the charging device and the power supply device is that the signal sent by the charging device can be sent to the protocol analysis module 121 through the D- end of the charging device, and then sent to the main control module 11 by the protocol analysis module 121. The main control module 11 transmits the signal to the protocol analysis module 121, and then sends the signal to the D- end of the power supply device; at the same time, the signal sent by the power supply device is first sent to the protocol analysis module 121 through the D- end of the power supply device, and then sent to the main control module 11 by the protocol analysis module 121. The main control module 11 transmits the signal to the protocol analysis module 121, and then sends the signal to the D- end of the charging device.

[0314] In one state, the protocol analysis module 121 can analyze the signal, and at the same time, the main control module 11 can control the protocol camouflage module 122 to adjust the signal sent by the power supply device. At this time, the test state of the test device 10 is in the state of the fake power supply device.

[0315] For example, when the test device 10 is in the state of the fake power supply device, it can be used to realize the above steps S320, S330 and S340, and the specific process can be referred to the above description, which will not be repeated here.

[0316] In another state, the protocol analysis module 121 can analyze the signal, and at the same time, the main control module 11 can control the protocol camouflage module 122 to adjust the signal sent by the charging device. At this time, the test state of the test device 10 is in the state of the fake charging device.

[0317] For example, when the test device 10 is in the state of the fake charging device, it can be used to realize the above steps S220, S230 and S240, and the specific process can be referred to the above description, which will not be repeated here.

[0318] It can be understood that in this state, the protocol analysis module 121 can analyze the signal, and the master module 11 can control the protocol camouflage module 122 to adjust or not to adjust the signal. At this time, the test state of the test device 10 is in the state of camouflaging the charging device and the power supply device.

[0319] When the protocol camouflage module 122 does not adjust the signal, the test state of the test device 10 in the state of camouflaging the charging device and the power supply device can be used to realize the process of steps S241 to S246. The specific process can be referred to the description of steps S241 to S246 above, which will not be repeated here.

[0320] Figure 13 is the structure block diagram of the fifth charging test system provided by the embodiment.

[0321] As shown in Figure 13 When the charging device and the power supply device support different protocols, taking the charging device supporting the UFCS protocol and the power supply device supporting the PD protocol as an example:

[0322] The switch module 123 includes a third switch k3 and a fourth switch k4.

[0323] The third switch k3 is electrically connected to the CC1 end of the power supply device and the protocol camouflage module 122. The third switch k3 can be used to control the communication of the CC1 end of the power supply device and the protocol camouflage module 122.

[0324] One end of the fourth switch k4 is electrically connected to the D+ end of the charging device and the protocol camouflage module 122. The fourth switch k4 can be used to control the communication of the D+ end of the charging device and the protocol camouflage module 122.

[0325] At the same time, the protocol analysis module 121 is electrically connected to the sending end and the receiving end of the power supply device and the sending end and the receiving end of the charging device.

[0326] In the PD protocol, the CC1` end and the CC2 end of the power supply device are the receiving end and the sending end of the protocol path of the power supply device. The CC1 end of the power supply device is the receiving end, and the CC2 end is the sending end.

[0327] Table 3 is a switching state and test device 10 state table based on the UFCS-PD protocol of the switch module 123.

[0328] Table 3

[0329] Monitoring, disguising power supply devices and charging devices Third switch k3 On Fourth switch k4 On

[0330] Specifically, in combination with the above Figure 13As shown in Table 3, since the charging device and the power supply device support different fast charging protocols, the charging device and the power supply device cannot directly communicate, but can only indirectly interact by using the protocol analysis module 121, the protocol disguising module 122 and the master control module 11. When the third switch k3 and the fourth switch k4 are in the on state, the D+ end of the charging device can communicate with the CC1 end of the power supply device.

[0331] At this time, the communication process between the charging device and the power supply device is that the signal sent by the charging device can be directly sent to the protocol analysis module 121 through the D- end of the charging device, the protocol analysis module 121 sends the signal to the master control module 11, the master control module 11 sends the signal to the protocol disguising module 122, and the protocol disguising module 122 sends the signal to the CC1 end of the power supply device through the third switch k3; at the same time, the signal sent by the power supply device can be sent to the protocol analysis module 121 through the CC2 end of the power supply device, the protocol analysis module 121 sends the signal to the master control module 11, the master control module 11 sends the signal to the protocol disguising module 122, and the protocol disguising module 122 sends the signal to the D+ end of the charging device through the fourth switch k4, thereby realizing direct interaction between the charging device and the power supply device.

[0332] At the same time, the protocol analysis module 121 is electrically connected to the sending end and the receiving end of the power supply device and the sending end and the receiving end of the charging device, thereby being able to realize monitoring of the interaction between the charging device and the power supply device.

[0333] For example, when the test device 10 is in the monitoring state, it can be used to realize the processes of steps S210, S310 or S110 described above, and the specific process can refer to the above description, which will not be described here again.

[0334] In one state, the protocol analysis module 121 can analyze the signal, and at the same time, the master control module 11 can control the protocol disguising module 122 to adjust the signal sent by the power supply device, at this time, the test state of the test device 10 is in the state of disguising the power supply device.

[0335] For example, when the test device 10 is in the state of disguising the power supply device, it can be used to realize steps S320, S330 and S340 described above, and the specific process can refer to the above description, which will not be described here again.

[0336] In another state, the protocol analysis module 121 can analyze the signal, and at the same time, the master control module 11 can control the protocol disguising module 122 to adjust the signal sent by the charging device, at this time, the test state of the test device 10 is in the state of disguising the charging device.

[0337] For example, the test device 10 in the state of the disguised charging device can be used to implement the steps S220, S230 and S240, and the specific process can refer to the above description, which will not be repeated here.

[0338] It can be understood that in this state, the protocol analysis module 121 can analyze the signal, and the master module 11 can control the protocol disguise module 122 to adjust or not adjust the signal. At this time, the test state of the test device 10 is in the state of the disguised charging device and the power supply device.

[0339] When the protocol disguise module 122 does not adjust the signal, the test state of the test device 10 in the state of the disguised charging device and the power supply device can be used to implement the steps S241 to S246, and the specific process can refer to the description of the steps S241 to S246, which will not be repeated here.

[0340] For example, the above-mentioned switches can be relay switches, transistor chip switches, etc.

[0341] Alternatively, in some charging test systems 100, there is no switch as described above, and only the master module 11 controls whether each module interacts to achieve the on-off control of communication, in other words, the control can be realized through the control logic of the master module 11.

[0342] It is worth noting that the on-off of the switch module 123 can also be controlled by the tester to realize the switching of the test state.

[0343] In addition, the protocol analysis module 121 and the protocol disguise module 122 can be controlled by the master module 11. Figures 11 to 13 It can be understood that the protocol analysis module 121 and the protocol disguise module 122 can be two, or in other embodiments, the protocol analysis module 121 and the protocol disguise module 122 can be one or more, which is not limited in the embodiment.

[0344] It should be noted that other embodiments of the application will occur to those skilled in the art having the benefit of the present disclosure. The application is intended to cover any variations, uses or adaptations of the application including its general principles and specific embodiments disclosed herein, as well as those that are readily apparent to those skilled in the art and which fall within the scope of the application. The specification and examples are to be regarded as illustrative only, and the true scope of the application is indicated by the appended claims.

[0345] It should be understood that the application is not limited to the precise construction that has been described above and shown in the accompanying drawings, and that various modifications and changes can be effected therein by those skilled in the art without departing from the scope of the application. The scope of the application is to be limited only by the appended claims.

Claims

1. A method of charge testing, characterized by, The method is applied to individual test of the charging device, individual test of the power supply device and joint test of the charging device and the power supply device, and a test device comprises a master control module and a transmission module, the transmission module comprises a protocol analysis module, a protocol camouflage module and a switch module, and the switch module comprises a third switch and a fourth switch; The sending end of the charging device, the protocol analysis module, the master control module, the protocol camouflage module, the third switch and the receiving end of the power supply device are sequentially connected, wherein the third switch controls the communication on-off of the protocol camouflage module and the receiving end of the power supply device; The sending end of the power supply device, the protocol analysis module, the master control module, the protocol camouflage module, the fourth switch and the receiving end of the charging device are sequentially connected, wherein the fourth switch controls the communication on-off of the protocol camouflage module and the receiving end of the charging device; The voltage output end of the power supply device and the voltage input end of the charging device are connected through a power supply path and a power supply switch, and the power supply device is used to provide the charging voltage required by the charging test for the charging device to replace the direct current power supply; The master control module controls the on-off of the third switch and the fourth switch to control the test device to switch between the individual test of the charging device, the individual test of the power supply device and the joint test of the charging device and the power supply device; The method comprises: The protocol analysis module acquires a first message sent by a first device, and the first message is used for charging negotiation between the first device and a second device; The protocol camouflage module modifies the content of the first message to obtain a second message; The protocol camouflage module sends the second message to the second device; Wherein, the first device is the power supply device, and the second device is the charging device, or the first device is the charging device, and the second device is the power supply device, and the power supply device is used to charge the charging device.

2. The charge test method of claim 1, wherein The first message is a negotiation request message sent by the first device to the second device, and the first message comprises a charging parameter; The test device modifies the content of the first message to obtain a second message, comprising: The test device modifies the charging parameter in the first message to obtain a second message.

3. The charge test method of claim 2, wherein, The first device is a charging device, the second device is a power supply device, and the charging parameter comprises a first charging voltage; The test device modifies the charging parameter in the first message to obtain a second message, comprising: The test device modifies the first charging voltage in the first message to a second charging voltage to obtain a second message.

4. The charge test method of claim 3, wherein After the test device sends the second message to the second device, further comprising: The power supply device outputs the second charging voltage to the charging device based on the second message; The test device determines whether the response of the charging device to the second charging voltage is as expected.

5. The charging test method of claim 1, wherein The first device is a power supply device, the second device is a charging device, the first message is a negotiation response message sent by the first device in response to a negotiation request message of the second device; The test device modifies the content of the first message to obtain a second message, including: The test device modifies the response type of the negotiation response message to obtain a second message.

6. The charging test method of claim 5, wherein, The response type of the negotiation response message includes negotiation agreement or negotiation rejection; The test device modifies the response type of the negotiation response message to obtain a second message, including: The test device modifies the response type of the negotiation response message from the negotiation agreement to the negotiation rejection, or The test device modifies the response type of the negotiation response message from the negotiation rejection to the negotiation agreement.

7. The charge test method of claim 6, wherein, After the test device sends the second message to the second device, further comprising: The test device determines whether the response of the charging device to the second message is as expected.

8. The charge test method of claim 7, wherein, The test device determines whether the response of the charging device to the second message is as expected, including: If the charging device produces a target response to the second message, the test device determines that the response of the charging device to the second message is as expected, wherein the target response is a response that conforms to a target charging protocol; If the charging device does not produce a target response to the second message, the test device determines that the response of the charging device to the second message is not as expected.

9. The charge test method of claim 4, wherein, The test device determines whether the response of the charging device to the second charging voltage is as expected, including: If the charging device produces a target response to the second charging voltage, the test device determines that the response of the charging device to the second charging voltage is as expected, wherein the target response is a response that conforms to a target charging protocol; If the charging device does not produce a target response to the second charging voltage, the test device determines that the response of the charging device to the second charging voltage is not as expected.

10. The charge test method according to any one of claims 1 to 9, characterized by, The power supply device includes: Any one of a power adapter of an electronic device, a mobile power supply, a charging pile, a charging station, and a switch with a charging function.

11. A charge testing system, comprising: The charging test system is applied to individual testing of a charging device, individual testing of a power supply device, and joint testing of the charging device and the power supply device, and includes: A test device, a master control module, and a transmission module including a protocol analysis module, a protocol camouflage module, and a switch module, the switch module including a third switch and a fourth switch; The sending end of the charging device, the protocol analysis module, the master control module, the protocol camouflage module, the third switch, and the receiving end of the power supply device are connected in sequence, wherein the third switch controls the communication on-off of the protocol camouflage module and the receiving end of the power supply device; The sending end of the power supply device, the protocol analysis module, the main control module, the protocol camouflage module, the fourth switch and the receiving end of the charging device are sequentially connected, wherein the fourth switch controls the communication on-off of the protocol camouflage module and the receiving end of the charging device. The voltage output end of the power supply device and the voltage input end of the charging device are connected through a power supply path and a power supply switch, and the power supply device is configured to provide a charging voltage required by the charging test to replace a direct current power supply during the charging test. The main control module is configured to control the third switch and the fourth switch to switch the test device between individual test of the charging device, individual test of the power supply device and joint test of the charging device and the power supply device. The protocol analysis module is configured to obtain a first message sent by a first device, the first message being used for charging negotiation between the first device and a second device; the protocol camouflage module is configured to modify the content of the first message to obtain a second message; and the protocol camouflage module is configured to send the second message to the second device; wherein the first device is the power supply device and the second device is the charging device, or the first device is the charging device and the second device is the power supply device, and the power supply device is used to charge the charging device.

12. The charging test system of claim 11, wherein The main control module is configured to control the protocol analysis module to obtain the first message sent by the first device. The protocol analysis module is configured to obtain and analyze the content of the first message and send the content of the first message to the main control module. The main control module is further configured to send the content of the first message to the protocol camouflage module and control the protocol camouflage module to modify the content of the first message. The protocol camouflage module is configured to receive and modify the content of the first message to obtain a second message and send the second message to the second device.

13. The charge test system of claim 12, wherein, The first message is a negotiation request message sent by the first device to the second device, and the first message includes a charging parameter. The protocol camouflage module is configured to modify the charging parameter in the first message.

14. The charging test system of claim 13, wherein The first device is a charging device, the second device is a power supply device, and the charging parameter includes a first charging voltage. The protocol camouflage module is configured to modify the first charging voltage in the first message to a second charging voltage to obtain a second message.

15. The charging test system of claim 14, wherein The power supply device is configured to output the second charging voltage to the charging device based on the second message. The main control module is configured to determine whether the response of the charging device to the second charging voltage is as expected.

16. The charge testing system of claim 12, wherein, The first device is a power supply device, the second device is a charging device, and the first message is a negotiation response message sent by the first device in response to a negotiation request message of the second device. The protocol disguising module is configured to modify a response type of the negotiation response message to obtain a second message.

17. The charging test system of claim 16, wherein The response type of the negotiation response message includes negotiation agreement or negotiation rejection. The protocol disguising module is configured to modify the response type of the negotiation response message from the negotiation agreement to the negotiation rejection or modify the response type of the negotiation response message from the negotiation rejection to the negotiation agreement.

18. The charging test system of claim 17, wherein The master module is configured to determine whether a response of the charging device to the second message is expected.

19. The charging test system of claim 18, wherein If the charging device generates a target response to the second message, the master module is configured to determine that the response of the charging device to the second message is expected, wherein the target response is a response in line with a target charging protocol. If the charging device does not generate a target response to the second message, the master module is configured to determine that the response of the charging device to the second message is not expected.

20. The charging test system of claim 15, wherein If the charging device generates a target response to the second charging voltage, the master module is configured to determine that the response of the charging device to the second charging voltage is expected, wherein the target response is a response in line with a target charging protocol. If the charging device does not generate a target response to the second charging voltage, the master module is configured to determine that the response of the charging device to the second charging voltage is not expected.

21. The charge testing system of any of claims 11-20, wherein, The power supply device includes any one of a power adapter of an electronic device, a mobile power supply, a charging pile, a charging station, and a switch with a charging function.

22. The charging test system of any one of claims 12-20, wherein The switch module is configured to control, under control of the master module, on-off communication of the protocol disguising module with the first device and / or the second device.

23. The charging test system of claim 22, wherein The first device is a charging device, and the second device is a power supply device, and the charging device and the power supply device both support a fusion fast charging standard or a super fast charging protocol, The switch module includes a first switch and a second switch. The first switch is electrically connected to a D- end of the charging device and a D- end of the power supply device, and the first switch is configured to control on-off communication of the D- end of the charging device and the D- end of the power supply device. ​ The second switch is electrically connected between the D+ end of the charging device and the D+ end of the power supply device, and is configured to control the communication between the D+ end of the charging device and the D+ end of the power supply device. One end of the third switch is electrically connected between the D- end of the power supply device and the first switch, and the other end of the third switch is electrically connected to the protocol camouflage module, and the third switch is configured to control the communication between the D- end of the power supply device and the protocol camouflage module. When the charging device and the power supply device both support the fusion fast charging standard, one end of the fourth switch is electrically connected between the D+ end of the charging device and the second switch, and the other end of the fourth switch is electrically connected to the protocol camouflage module, and the fourth switch is configured to control the communication between the D+ end of the charging device and the protocol camouflage module. When the charging device and the power supply device both support the super fast charging protocol, one end of the fourth switch is electrically connected between the D- end of the charging device and the first switch, and the other end of the fourth switch is electrically connected to the protocol camouflage module, and the fourth switch is configured to control the communication between the D- end of the charging device and the protocol camouflage module.

Citation Information

Patent Citations

  • Electric vehicle charging interoperability test system and method

    CN111856302A

  • Charging pile vulnerability detection method and detection device based on communication protocol

    CN113810403A