Charging pile test method and electronic equipment

By generating test instructions and simulation information by electronic devices, pure software simulation testing of charging pile controller applications is realized, solving the problem of high cost of hardware dependence, improving testing efficiency and automation, and ensuring the stability and correctness of software functions.

CN120405263AActive Publication Date: 2025-08-01XFUSION DIGITAL TECH CO LTD
View PDF 18 Cites 0 Cited by

Patent Information

Application Number
CN202510460223.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-11
Publication Date
2025-08-01
Estimated Expiration
2045-04-11

AI Technical Summary

Technical Problem

Existing charging pile testing methods rely on hardware equipment, resulting in high cost and low efficiency.

Method used

The electronic device's processor generates test instructions, builds simulation information, simulates the behavior of the charging pile's controller application, reduces dependence on real hardware devices, and realizes pure software simulation testing.

Benefits of technology

It improves the degree of test automation, reduces costs, improves test efficiency, and can fully cover various normal and abnormal scenarios during the charging process, ensuring the stability and correctness of software functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120405263A_ABST
    Figure CN120405263A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a charging pile test method and electronic equipment. The method is applied to electronic equipment. The method comprises the steps of generating a test instruction based on a test case; constructing simulation information based on the test instruction; in response to the simulation information, generating test data; the test data is used for indicating data generated by an application program of a controller of the charging pile in response to the simulation information; the application program runs in a processor of the electronic equipment; and determining a test result based on the test data. In the method provided by the embodiment of the invention, the electronic equipment simulates the behavior of the real hardware equipment through pure software, so that the application program in the charging pile is tested, the dependence on the real hardware equipment is reduced, and the cost is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of charging technology, and in particular to a testing method and electronic equipment for a charging pile. Background Art

[0002] A charging station, also known as an electric vehicle charging station or electric vehicle power supply equipment, is a device that provides electrical energy to electric vehicles. A charging station can charge various models of electric vehicles at different voltage levels. Its input is directly connected to the AC power grid, and its output is equipped with a charging plug for charging the electric vehicle.

[0003] The controller in a charging pile is a crucial component in ensuring the proper charging process. Therefore, testing the controller's application to ensure safety and stability is crucial. Current charging pile testing methods rely on hardware equipment, which is costly.

[0004] Based on this, a solution is urgently needed to solve the above technical problems. Summary of the Invention

[0005] Based on the above problems, an embodiment of the present application provides a charging pile testing method and electronic equipment.

[0006] The embodiments of this application disclose the following technical solutions:

[0007] In the first aspect, embodiments of the present application provide a charging pile testing method, which is applied to an electronic device. The electronic device includes a processor, and the method is executed by the processor. The method includes: generating test instructions based on a test case; constructing simulation information based on the test instructions; generating test data in response to the simulation information, the test data being used to instruct an application program of a controller of the charging pile to process the data generated in response to the simulation information; and determining a test result based on the test data.

[0008] In the method provided in the embodiments of this application, electronic devices can construct simulation information through pure software simulation, simulating the behavior of real hardware devices to implement testing of applications in charging piles. Compared with traditional testing methods, the method provided in the embodiments of this application reduces dependence on real hardware devices, improves the degree of automation, improves testing efficiency, and saves costs.

[0009] In a possible implementation, simulation information is constructed based on a test instruction, including: determining a test scenario corresponding to the test instruction based on the test instruction; and constructing the simulation information according to a simulation module corresponding to the test scenario. In this way, the processor parses the test instruction based on the test instruction to determine the test scenario corresponding to the test instruction, and further calls the corresponding simulation module to construct simulation information corresponding to the test scenario. The simulation information is used to indicate information corresponding to the test scenario.

[0010] In a possible implementation, the test instruction includes an instruction to simulate a user's gun insertion operation, and the simulation information includes sampled voltage data. The electronic device can generate test data for indicating the state of the charging gun corresponding to the gun insertion stage in response to the sampled voltage data; when the test data indicates that the state of the charging gun is plugged in, it is determined that the test result of the gun insertion test is normal; when the test data indicates that the state of the charging gun is not plugged in, it is determined that the test result of the gun insertion test is abnormal. In the embodiments of the present application, the electronic device can simulate the function of the charging gun by constructing sampled voltage data, perform a gun insertion test, and obtain the corresponding test result.

[0011] In a possible implementation, during the process of the electronic device generating test data for indicating the state of the charging gun corresponding to the gun insertion stage in response to the sampled voltage data, it can generate test data for indicating that the state of the charging gun corresponding to the gun insertion stage is plugged in when the sampled voltage data reaches a first preset voltage; and generate test data for indicating that the state of the charging gun corresponding to the gun insertion stage is not plugged in when the sampled voltage data does not reach the first preset voltage.

[0012] In a possible implementation, the test instruction includes an instruction to simulate a user's charging start operation, and the simulation information includes a charging start instruction. The electronic device can generate test data for indicating the state of the charging pile corresponding to the charging stage in response to the charging start instruction. When the test data indicates that the state of the charging pile is charging, it is determined that the test result of the charging stage is normal; when the test data indicates that the state of the charging pile is not charging, it is determined that the test result of the charging stage is abnormal. In the embodiments of the present application, the electronic device can perform a test on the charging stage based on pure software simulation by constructing the charging start instruction and obtain the corresponding test result.

[0013] In a possible implementation, during the process of the electronic device generating test data for indicating the state of the charging pile corresponding to the charging stage in response to the charging start instruction, it can perform insulation detection, discharge detection, and battery management system parameter configuration in response to the charging start instruction, and then generate the state of the charging pile corresponding to the charging stage.

[0014] In a possible implementation, the test instruction includes an instruction to simulate a user's operation of stopping charging, the simulation information includes a stop charging instruction, and the electronic device can generate test data for indicating the status of the charging pile corresponding to the stop charging stage in response to the stop charging instruction. When the test data indicates that the status of the charging pile is charging end, it is determined that the test result of the stop charging stage is normal; when the test data indicates that the status of the charging pile is charging, it is determined that the test result of the stop charging stage is abnormal. In the embodiments of the present application, the electronic device can perform the test of the stop charging stage based on pure software simulation through the constructed stop charging instruction and obtain the corresponding test result.

[0015] In a possible implementation, when the electronic device generates test data for indicating the status of the charging pile corresponding to the stop charging stage in response to the stop charging instruction, it can construct sampled current data in response to the stop charging instruction; and generate test data for indicating the status of the charging pile corresponding to the stop charging stage in response to the sampled current data.

[0016] In a possible implementation, the test instruction includes an instruction to simulate an abnormal electronic lock locking feedback, the simulation information includes that the electronic lock feedback status is unlocked and timed out, and the electronic device generates test data for indicating the status of the charging pile and the cause of the abnormality in response to the simulation information. When the test data indicates that the status of the charging pile is start failure and the cause of the abnormality is an electronic lock abnormality, it is determined that the detection result of the electronic lock locking feedback abnormality detection is normal; when the test data does not indicate that the status of the charging pile is start failure and the cause of the abnormality is an electronic lock abnormality, it is determined that the detection result of the electronic lock locking feedback abnormality detection is abnormal. In the embodiments of the present application, the electronic device can perform the test of the electronic lock locking feedback abnormality based on pure software simulation through the constructed simulation information that the electronic lock feedback status is unlocked and timed out and obtain the corresponding test result.

[0017] Second aspect: An embodiment of the present application provides a test device for a charging pile, including: a first generation module, a simulation module, a second generation module, and a determination module;

[0018] The first generation module is configured to generate a test instruction based on a test case;

[0019] The simulation module is configured to construct simulation information based on the test instruction;

[0020] The second generation module is configured to generate test data in response to the simulation information; the test data is used to indicate the data generated by the application program of the controller of the charging pile in response to the simulation information; the application program runs in the test device;

[0021] The determination module is configured to determine a test result based on the test data.

[0022] Third aspect: An embodiment of the present application provides an electronic device, which includes: a processor and a memory;

[0023] The memory is used to store program code and transmit the program code to the processor;

[0024] The processor is used to execute the steps of a charging pile testing method as described in the first aspect above according to the instructions in the program code.

[0025] Fourth aspect: An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a charging pile testing method as described in the first aspect above are implemented.

[0026] Fifth aspect: An embodiment of the present application provides a program product. When the program product runs on a computer, the computer can execute the steps of a charging pile testing method as described in the first aspect above. Description of the drawings

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0028] Figure 1 It is a flowchart of a charging pile testing method provided by an embodiment of the present application;

[0029] Figure 2 It is a hierarchical architecture diagram of a charging pile system provided by an embodiment of the present application;

[0030] Figure 3 It is another hierarchical architecture diagram of a charging pile system provided by an embodiment of the present application;

[0031] Figure 4 It is a schematic diagram of the operation of a test system provided by an embodiment of the present application;

[0032] Figure 5 It is a schematic diagram of an abstraction layer provided by an embodiment of the present application;

[0033] Figure 6 It is a schematic diagram of a driver layer provided by an embodiment of the present application;

[0034] Figure 7 It is a schematic diagram of the interaction between a test case and an application program provided by an embodiment of the present application;

[0035] Figure 8 It is the timing diagram of the first charging pile testing method provided by the embodiment of the present application;

[0036] Figure 9 It is the timing diagram of the second charging pile testing method provided by the embodiment of the present application;

[0037] Figure 10 It is the timing diagram of the third charging pile testing method provided by the embodiment of the present application;

[0038] Figure 11 It is the timing diagram of the fourth charging pile testing method provided by the embodiment of the present application;

[0039] Figure 12 It is the timing diagram of the fifth charging pile testing method provided by the embodiment of the present application;

[0040] Figure 13 It is the timing diagram of the sixth charging pile testing method provided by the embodiment of the present application;

[0041] Figure 14 It is the structural schematic diagram of an electronic device provided by the embodiment of the present application. Detailed implementation manners

[0042] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0043] The following introduces the application scenario of a charging pile testing method provided by the embodiment of the present application.

[0044] It can be understood that the electronic device may include, but is not limited to, personal computers (PCs), tablet computers, desktops, laptops, notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, etc. The present application does not impose special restrictions on the specific forms of the above electronic devices. For the convenience of understanding, the following takes the electronic device as a PC for example to introduce.

[0045] In the embodiment of the present application, the processor (CPU) of the electronic device can run test cases, generate test instructions, and construct simulation information based on the test instructions. Among them, the simulation information is used to indicate the information of the test scenario corresponding to the test instructions.

[0046] After constructing the simulation information, the electronic device can generate test data in response to the simulation information, and determine a test result based on the test data. The test data is used to indicate data generated by the application program of the controller of the charging pile in response to the simulation information.

[0047] In one example, an application program of a charging pile controller, a simulation module, and test cases are run on a PC. The processor in the PC can generate a test instruction by running the test cases, and send the test instruction to the simulation module. The simulation module constructs corresponding simulation information based on the test instruction, and sends the simulation information to the application program. The application program can generate test data based on the simulation information. The test result can be determined based on the test data.

[0048] The simulation module is a pure software simulation of a series of hardware devices that interact with the application program of the charging pile controller. In the embodiments of the present application, the simulation module can simulate various functions of the hardware device based on the test instruction sent by the test case, and implement the functional support for the test case.

[0049] Based on the method provided in the embodiments of the present application, the electronic device can construct simulation information through pure software simulation, simulate the behavior of real hardware devices, and implement the test of the application program in the charging pile. Compared with the traditional test method, the method provided in the embodiments of the present application reduces the dependence on real hardware devices, improves the automation degree, improves the test efficiency, and saves the cost.

[0050] Next, in conjunction with Figure 1 the test method of the charging pile system provided in the embodiments of the present application will be introduced.

[0051] As Figure 1 shown, the figure is a flowchart of a charging pile test method provided in the embodiments of the present application, including S101-S103.

[0052] S101. The electronic device generates a test instruction based on the test case.

[0053] In the embodiments of the present application, the electronic device generates a test instruction by running the test case, which can implement automated testing and improve the test efficiency.

[0054] Exemplarily, the test instruction may include, but is not limited to, an instruction for simulating a user to perform a gun plugging operation, an instruction for simulating a user to perform a charging start operation, an instruction for simulating a user to perform a charging stop operation, and an instruction for simulating an abnormal electronic lock locking feedback, etc.

[0055] S102. The electronic device constructs simulation information based on the test instruction.

[0056] The simulation information is used to indicate information of a test scenario corresponding to the test instruction.

[0057] In a possible implementation, the electronic device can determine the test scenario corresponding to the test instruction based on the test instruction, and construct corresponding simulation information based on the test scenario.

[0058] Exemplarily, when the test instruction is an instruction to simulate a user inserting a charging gun, the electronic device can determine the current test scenario as the test scenario of the charging gun insertion test based on the instruction to simulate the user inserting the charging gun. Thus, corresponding simulation information can be constructed based on the test scenario of the charging gun insertion test, such as constructing sampled voltage data.

[0059] When the test instruction is an instruction to simulate a user starting a charging operation, the electronic device can determine the current test scenario as the test scenario of the start charging test based on the instruction to simulate the user starting the charging operation. Thus, corresponding simulation information can be constructed based on the test scenario of the start charging test, such as constructing a start charging instruction, etc.

[0060] When the test instruction is an instruction to simulate a user stopping a charging operation, the electronic device can determine the current test scenario as the test scenario of the stop charging test based on the instruction to simulate the user stopping the charging operation. Thus, corresponding simulation information can be constructed based on the test scenario of the stop charging test, such as constructing a stop charging instruction, etc.

[0061] When the test instruction is an instruction to simulate an abnormal locking feedback of an electronic lock, the electronic device can determine the current test scenario as the test scenario of simulating the abnormal locking feedback of the electronic lock based on the instruction to simulate the abnormal locking feedback of the electronic lock. Thus, corresponding simulation information can be constructed based on the test scenario of simulating the abnormal locking feedback of the electronic lock, such as constructing simulation information that the feedback state of the electronic lock is unlocked and timed out, etc.

[0062] In another possible implementation, the electronic device can determine the corresponding test scenario based on the test instruction, call the simulation module corresponding to the test scenario, and construct corresponding simulation information based on the simulation module.

[0063] Among them, the simulation module can be a pure software simulation of various hardware devices interacting with the charging pile controller.

[0064] Exemplarily, the simulation module can include but is not limited to a charging gun module, a battery management system (BMS) module, an energy management system module, a charging host module, and an operation platform module, etc.

[0065] Among them, the charging gun module is a pure software simulation program corresponding to a real charging gun, which is used to construct the interaction data between the real charging gun and the application program of the charging pile controller, and simulate the functions of the real charging gun; the BMS module is a pure software simulation program corresponding to a real BMS, which is used to construct the interaction data between the real BMS and the application program of the charging pile controller, and simulate the functions of the real BMS; the energy management system module is a pure software simulation program corresponding to a real energy management system, which is used to construct the interaction data between the real energy management system and the application program of the charging pile controller, and simulate the functions of the real energy management system; the charging host module is a pure software simulation program corresponding to a real charging host, which is used to construct the interaction data between the real charging host and the application program of the charging pile controller, and simulate the functions of the real charging host; the operation platform module is a pure software simulation program corresponding to a real operation platform, which is used to construct the interaction data between the real operation platform and the application program of the charging pile controller, and simulate the functions of the real operation platform.

[0066] Exemplarily, when the test instruction is an instruction to simulate a user inserting the gun, based on the instruction to simulate a user inserting the gun, the electronic device can determine that the current test scenario is a gun insertion test scenario. Thus, based on this gun insertion test scenario, the electronic device can call the charging gun module to construct sampled voltage data.

[0067] When the test instruction is an instruction to simulate a user starting the charging operation, based on the instruction to simulate a user starting the charging operation, the electronic device can determine that the current test scenario is a start charging test scenario. Thus, based on this start charging test scenario, the electronic device can call the operation platform module to construct a start charging instruction.

[0068] When the test instruction is an instruction to simulate a user stopping the charging operation, based on the instruction to simulate a user stopping the charging operation, the electronic device can determine that the current test scenario is a stop charging test scenario. Thus, based on this stop charging test scenario, the electronic device can call the operation platform module to construct a stop charging instruction.

[0069] When the test instruction is an instruction to simulate an abnormal locking feedback of the electronic lock, based on the instruction to simulate an abnormal locking feedback of the electronic lock, the electronic device can determine that the current test scenario is a test scenario for simulating an abnormal locking feedback of the electronic lock. Thus, based on this test scenario for simulating an abnormal locking feedback of the electronic lock, the electronic device can call the charging gun module to construct simulation information such as the feedback state of the electronic lock being unlocked and timed out.

[0070] S103. The electronic device generates test data in response to the simulation information.

[0071] Among them, the test data is used to indicate the data generated by the application program of the controller of the charging pile in response to the simulation information.

[0072] S104. The electronic device determines a test result based on the test data.

[0073] In a possible implementation manner, when the test instruction is an instruction to simulate a user's gun plugging operation and the simulation information is sampled voltage data, the electronic device can generate test data for indicating the state of the charging gun corresponding to the gun plugging stage in response to the sampled voltage data.

[0074] When the test data indicates that the state of the charging gun is that the gun has been plugged, it is determined that the test result of the gun plugging test is normal; when the test data indicates that the state of the charging gun is that the gun has not been plugged, it is determined that the test result of the gun plugging test is abnormal.

[0075] In an example, when the sampled voltage data reaches a first preset voltage, the electronic device generates test data for indicating that the state of the charging gun corresponding to the gun plugging stage is that the gun has been plugged; when the sampled voltage data does not reach the first preset voltage, the electronic device generates test data for indicating that the state of the charging gun corresponding to the gun plugging stage is that the gun has not been plugged.

[0076] Exemplarily, the sampled voltage data may include the voltage data during the gun plugging process. For example, the voltage data during the gun plugging process changes from 6V to 12V, then drops from 12V to 6V, and then drops from 6V to 4V.

[0077] After the sampled voltage data reaches 4V, the electronic device can determine that a charging gun has been inserted and generate test data for indicating that the state of the charging gun corresponding to the gun plugging stage is that the gun has been plugged. Before the sampled voltage data reaches 4V, the electronic device can determine that the charging gun has not been inserted and generate test data for indicating that the state of the charging gun corresponding to the gun plugging stage is that the gun has not been plugged.

[0078] It can be understood that in the embodiments of the present application, the data of the first preset voltage is not specifically limited and can be set according to requirements. Here, only the first preset voltage is taken as an example of 4V.

[0079] In a possible implementation manner, when the test instruction includes an instruction to simulate a user's start charging operation and the simulation information includes a start charging instruction, the electronic device can generate test data for indicating the state of the charging pile corresponding to the charging stage in response to the start charging instruction.

[0080] In the embodiments of the present application, the electronic device can perform insulation detection, discharge detection, and battery management system parameter configuration in response to the start charging instruction, and then generate the state of the charging pile corresponding to the charging stage.

[0081] When the test data indicates that the charging pile is in the charging state, the electronic device determines that the test result of the charging stage is normal; when the test data indicates that the charging pile is not charging, the electronic device determines that the test result of the charging stage is abnormal.

[0082] In a possible implementation manner, when the test instruction includes an instruction to simulate a user to perform a stop charging operation and the simulation information includes a stop charging instruction, the electronic device can generate test data for indicating the state of the charging pile corresponding to the stop charging stage in response to the stop charging instruction.

[0083] In the embodiments of the present application, the electronic device can construct sampled current data in response to the stop charging instruction; and generate test data for indicating the state of the charging pile corresponding to the stop charging stage in response to the sampled current data.

[0084] Exemplarily, the electronic device can generate test data for indicating the state of the charging pile corresponding to the stop charging stage when the sampled current data is less than or equal to a first preset current.

[0085] It can be understood that in the embodiments of the present application, the data of the first preset current is not specifically limited and can be set according to requirements. Exemplarily, the first preset current can be 5A. When the sampled current data is less than or equal to 5A, it indicates that the charging has ended.

[0086] When the test data indicates that the state of the charging pile is charging ended, it is determined that the test result of the stop charging stage is normal; when the test data indicates that the state of the charging pile is charging, it is determined that the test result of the stop charging stage is abnormal.

[0087] In a possible implementation manner, when the test instruction includes an instruction to simulate an abnormal electronic lock locking feedback and the simulation information includes that the electronic lock feedback state is unlocked and timed out, the electronic device can generate test data for indicating the state of the charging pile and the cause of the abnormality in response to the simulation information.

[0088] When the test data indicates that the state of the charging pile is start-up failure and the cause of the abnormality is an electronic lock abnormality, the electronic device can determine that the detection result of the electronic lock locking feedback abnormality detection is normal; when the test data does not indicate that the state of the charging pile is start-up failure and the cause of the abnormality is an electronic lock abnormality, the electronic device can determine that the detection result of the electronic lock locking feedback abnormality detection is abnormal.

[0089] In the embodiments of the present application, after obtaining the test result, the electronic device can automatically generate a test report to provide detailed test results and analysis, which is convenient for relevant technical personnel to evaluate the performance and quality of the application program.

[0090] In summary, in the embodiments of the present application, the electronic device can construct simulation information through pure software simulation, simulate the behavior of real hardware devices, and implement the testing of application programs in the charging pile. Compared with the traditional testing method, the method provided by the embodiments of the present application reduces the dependence on real hardware devices, improves the degree of automation, improves the testing efficiency, and saves cost.

[0091] The following will introduce the software architecture of a charging pile testing method provided by the embodiments of the present application in conjunction with Figures 2 - 3 Among them, Figure 2 is a hierarchical architecture diagram of a charging pile system provided by the embodiments of the present application, Figure 3 is another hierarchical architecture diagram of a charging pile system provided by the embodiments of the present application.

[0092] In the embodiments of the present application, the hierarchical architecture of the charging pile system divides the software into several layers, and each layer has a clear role and division of labor. As Figures 2 - 3 shown, the charging pile system can be divided into four layers, from bottom to top: the hardware layer, the driver and system layer, the abstraction layer, and the application layer.

[0093] During the process of PCization and charging pile testing, the application program of the charging pile controller can run on the PC based on Figure 2 the shown solution. Among them, Figure 2 the driver and system layer in Figure 3 includes the simulation driver layer and the PC operating system. During the actual vehicle charging process, the application program of the charging pile controller can run on the hardware device of the real charging pile based on Figure 3 the shown solution. Among them,

[0094] The simulation driver layer provided by the embodiments of the present application can provide an interface for communication between the simulation module and the application program, so that the simulation module can provide simulation information for the application program and provide data support for the operation of the application program in the application layer. Based on the simulation information, the application program can generate test data.

[0095] After generating the test data, comparing the test data with the preset current data can determine the test result. Among them, the preset target data is the test data expected to be obtained. When the test data is the same as the preset current data, the test result can be determined to be normal; otherwise, the test result can be determined to be abnormal.

[0096] In the embodiments of the present application, by adding an abstraction layer between the application layer and the underlying layer, an interface can be provided for communication between the application layer and the driver and system layers, realizing the isolation of differences between the underlying layer and the upper layer, and enabling the application layer to run on different platforms. Thus, after the application program of the charging pile controller is tested and qualified on a PC, the application program can be directly migrated to an embedded platform and run on the embedded operating system based on Figure 2 the charging pile system shown to perform the actual charging process.

[0097] As Figure 4 shown, this figure is a schematic diagram of the operation of a test system provided by the embodiments of the present application. Taking an electronic device as a PC as an example, in the embodiments of the present application, the charging pile test system includes the application program of the charging pile controller, test cases, and a simulation module, all of which run on the PC to implement the test of the application program of the charging pile on the PC and reduce the dependence on hardware devices.

[0098] Among them, the simulation module may include, but is not limited to, a charging gun module, a BMS module, an energy management system module, a charging host module, and an operation platform module, etc. A test case set composed of multiple test cases can implement the test of the application program of the charging pile controller through the simulation module.

[0099] Next, the functions of each software layer of the charging pile system will be introduced in conjunction with Figures 5 - 6 the following.

[0100] As Figure 5 shown, in the embodiments of the present application, the abstraction layer includes an operating system abstraction layer (OSAL) and a hardware abstraction layer (HAL) for providing a unified interface for upper-layer applications.

[0101] Exemplarily, the operating system abstraction layer can provide a unified system application interface for the upper layer, such as tasks, semaphores, mutexes, message queues, etc. The specific internal implementation can call the interfaces of the Linux operating system or a real-time operating system (RTOS) according to the actual system differences.

[0102] The hardware abstraction layer can provide a unified hardware driver operation interface for the upper layer, such as performing operations like open, close, ioctl, read, write, etc. on analog-to-digital converters (ADCs), Universal Asynchronous Receiver Transmitters (UARTs), Inter-Integrated Circuits (IICs), Controller Area Networks (CANs), etc. The specific internal implementation can call the corresponding driver according to the actual hardware differences.

[0103] In the embodiments of the present application, the driver layer can provide a unified operation interface for the hardware abstraction layer, such as open, close, ioctl, read, write, etc. At the same time, the driver layer can support common driver types for embedded devices, such as ADCs, digital-to-analog converters (DACs), UARTs, Serial Peripheral Interfaces (SPIs), Inter-Integrated Circuits (I2Cs), CANs, General Purpose Input / Outputs (GPIOs), TIMERs, etc.

[0104] As Figure 6 shown, this figure is a schematic diagram of a driver layer provided by the embodiments of the present application.

[0105] In the embodiments of the present application, the driver layer may include but is not limited to linux drivers, stm32 drivers, and simulation drivers, etc. Exemplarily, when the charging pile system runs on a PC, the driver layer can adopt a simulation driver.

[0106] The simulation driver layer in the embodiments of the present application can provide an interface for communication between the simulation module and the application program, so that the simulation module can provide simulation information for the application program and provide data support for the operation of the application program in the application layer. By adding an abstraction layer between the application layer and the underlying layer, the upper-layer application no longer depends on the underlying operating system and hardware driver and can run on different platforms.

[0107] As Figure 7 shown, this figure is an interaction schematic diagram of a test case and an application program provided by the embodiments of the present application. Among them, the test case can interact with the simulation module, such as sending a test instruction to the simulation module, so that the simulation module can construct corresponding simulation information to simulate the functions of the hardware device.

[0108] The simulation module is a pure software simulation of a series of hardware devices that interact with the application program of the charging pile controller. In the embodiments of the present application, through the data interface provided by the simulation driver, the information interaction between the simulation module and the application program can be realized. For example, through the data interface provided by the simulation driver, the simulation module can send the simulation information constructed based on the test instructions to the application program, so that the application program can generate test data based on the simulation information and determine the test result.

[0109] For ease of understanding, the following Figures 8 - 12 provides an overall introduction to a test method for a charging pile provided in the embodiments of the present application.

[0110] In the embodiments of the present application, the application program of the charging pile controller, as the target to be tested, runs on a PC and can communicate with the simulation module through the abstraction layer and the simulation driver.

[0111] As Figure 8 shown, this figure is a timing diagram of the first charging pile test method provided in the embodiments of the present application, including S801 - S812.

[0112] When the test framework is in the running state, the simulation module and the application program are in the initialization state, the charging gun is in the unplugged state, and the charging pile is in the idle state, S801 is executed.

[0113] S801: The application program connects to the operation platform module and synchronizes the states of the charging gun and the charging pile.

[0114] When the test framework is in the running state, the simulation module and the application program are in the initialization state, the charging gun is in the unplugged state, and the charging pile is in the idle state, the application program can actively connect to the operation platform module and synchronize the states of the charging gun and the charging pile to the operation platform module. The operation platform module stores the current states of the charging gun and the charging pile.

[0115] S802: The test case detects the states of the charging gun and the charging pile through the operation platform module.

[0116] The test case reads the states of the charging gun and the charging pile to determine whether the state of the charging gun is unplugged and whether the state of the charging pile is idle.

[0117] When the test case determines that the state of the charging gun is unplugged and the state of the charging pile is idle, S803 is executed; otherwise, an error is reported.

[0118] S803: The test case sends an instruction to the charging gun module to simulate a user's gun - plugging operation.

[0119] Exemplarily, the instruction for simulating a user's gun - plugging operation is used to instruct the charging gun module to construct the data when the user performs a gun - plugging operation.

[0120] Based on the instruction for the plugging operation of the simulated user, the current test scenario can be determined as the test scenario of the plugging test, so as to construct the simulation information corresponding to the test scenario of the plugging test.

[0121] S804. The charging gun module constructs the sampled voltage data corresponding to CC1.

[0122] The charging gun module can construct the simulation information corresponding to the test scenario of the plugging test, and when simulating the plugging operation of the user, control the change of the sampled voltage corresponding to the first contact (CC1) of the control guide circuit.

[0123] In one example, the simulation information corresponding to the test scenario of the plugging test includes the sampled voltage data corresponding to CC1, and the sampled voltage data corresponding to CC1 can change from 6V to 12V, then drop from 12V to 6V, and then drop from 6V to 4V.

[0124] S805. The application synchronizes the state of the charging gun to the operation platform module as: plugged in.

[0125] In the embodiment of the present application, the application can send test data indicating that the state of the charging gun is plugged in to the operation platform module.

[0126] Exemplarily, after the application is started, it can detect the sampled voltage of CC1 in real time. When it detects that the sampled voltage of CC1 reaches 4V, it determines that a charging gun is inserted, and actively sends test data indicating that the state of the charging gun is plugged in to the operation platform module, and synchronizes the state of the charging gun as: plugged in.

[0127] S806. The test case detects and determines that the state of the charging gun is plugged in through the operation platform module.

[0128] The test case can wait for 1s and then detect the state of the charging gun through the operation platform module. When it determines that the state of the charging gun is plugged in, it can determine that the test result of the plugging test is normal and execute S807; otherwise, it determines that the test result of the plugging test is abnormal and reports an error.

[0129] S807. The test case sends an instruction to the operation platform module to simulate the user to perform a start charging operation.

[0130] The test case sends an instruction to the operation platform module to simulate the user to perform a start charging operation, so as to simulate the process of the user actually initiating a remote start charging instruction.

[0131] S808. The operation platform module sends a start charging instruction to the application.

[0132] In response to the instruction sent by the test case for the simulated user to perform the start charging operation, the operation platform module can construct a start charging instruction and send the start charging instruction to the application through the communication protocol.

[0133] S809. The application sends an electronic lock locking instruction to the charging gun module.

[0134] In response to the start charging instruction from the operation platform module, the application can send an electronic lock locking instruction to the charging gun module to simulate the actual charging gun locking process.

[0135] S810. After the charging gun module switches the electronic lock feedback signal to locked, the application detects that the electronic lock feedback signal of the charging gun is locked.

[0136] S811. The application sends an instruction to turn on the low-voltage auxiliary power supply to the BMS module.

[0137] S812. The application detects the status of the low-voltage auxiliary power supply.

[0138] In response to the instruction to turn on the low-voltage auxiliary power supply, the BMS module constructs data for turning on the low-voltage auxiliary power supply. If the application detects that the status of the low-voltage auxiliary power supply is powered on, the test process of the BMS handshake stage can be carried out.

[0139] As Figure 9 shown, this figure is the timing diagram of the second charging pile test method provided by the embodiment of the present application, including S901 - S915.

[0140] S901. The application periodically sends a charger handshake (CHM) message to the BMS module.

[0141] S902. The BMS module periodically sends a vehicle handshake (BHM) message to the application.

[0142] When the low-voltage auxiliary power supply is in the powered-on state, the BMS module can respond to the CHM message and periodically send the BHM message to the application.

[0143] S903. The application receives the BHM message and detects through the energy management system module that the status of the DC power supply loop contactors (C1, C2) inside the charger is open and the front-end voltage < 60V.

[0144] It can be understood that only 60V is taken as an example for introduction here, and its value can be provided by the BMS module.

[0145] S904. The application switches to the insulation detection circuit and sends an instruction to close C1 and C2 to the energy management system module.

[0146] S905. The application sends a start insulation detection instruction to the charging host module.

[0147] The application sends a start insulation detection instruction to the charging host module to notify the charging host module to start insulation detection.

[0148] S906. The charging host module changes the front-end voltage value and back-end voltage value of C1 and C2 to the insulation detection voltage through the energy management system module.

[0149] S907. The application sends one or more of the instructions such as insulation detection and short-circuit check to the energy management system module.

[0150] S908. After the detection is successful, the application sends an instruction to cut out the insulation detection circuit to the energy management system module.

[0151] S909. The application sends an instruction to close the discharge circuit switch to the energy management system module to start the discharge detection process.

[0152] After cutting out the insulation detection circuit, the application sends an instruction to close the discharge circuit switch to the energy management system module to close the discharge circuit switch and start the discharge detection process.

[0153] S910. The energy management system module gradually reduces the front-end voltage value and back-end voltage value of C1 and C2 to below 60V within 5s.

[0154] The energy management system module can simulate the real discharge detection process by gradually reducing the front-end voltage value and back-end voltage value of C1 and C2 to below 60V within 5s.

[0155] S911. The application detects that the front-end voltage value and back-end voltage value of C1 and C2 are less than 60V through the energy management system module, and sends an instruction to disconnect the discharge circuit switch to the energy management system module.

[0156] S912. The application sends instructions to disconnect C1 and C2 to the energy management system module and detects the states of C1 and C2.

[0157] After the application determines that the states of C1 and C2 are disconnected, the insulation detection process is completed.

[0158] S913. The application stops sending CHM messages and starts to periodically send charger identification (CRM(0x00)) messages to the BMS module.

[0159] S914. The BMS module receives the CRM(0x00) message, stops sending BHM messages, and starts to periodically send vehicle identification (BRM) messages to the application.

[0160] S915. The application receives the BRM message and updates the CRM(0x00) message to the CRM(0xAA) message content.

[0161] After the application updates the CRM(0x00) message to the CRM(0xAA) message content, it can perform the test in the power battery status information (BSM) parameter configuration stage.

[0162] As Figure 10 shown, this figure is the timing diagram of the third charging pile system test method provided by the embodiment of the present application, including S1001 - S1015.

[0163] S1001. The BMS module periodically sends the power battery charging parameter (BCP) message to the application.

[0164] After the BMS module receives the CRM(0xAA) message, it stops sending the BRM message and starts to periodically send the BCP message.

[0165] S1002. The application receives the BCP message, stops sending the CRM message, and determines whether the vehicle parameters are normal.

[0166] If it is determined that the vehicle parameters are normal, S1003 is executed.

[0167] S1003. The application periodically sends the charger sending time synchronization information (CTS) message and the charger maximum output capacity (CML) message to the BMS module.

[0168] Among them, the CTS message can be selectively sent.

[0169] S1004. The BMS module determines whether the charging pile parameters are normal and sends the updated BCP message.

[0170] S1005. The BMS module stops sending the BCP message and starts to periodically send the vehicle charging ready status (BRO(0x00)) message to the application.

[0171] S1006. The BMS module changes the backend voltage values of C1 and C2 to the battery reference voltage value through the energy management system module.

[0172] S1007. The BMS module notifies the application that the vehicle is ready and periodically sends the BRO(0xAA) message to the application.

[0173] S1008. The application receives the BRO(0xAA) message and stops sending the CTS message and the CML message.

[0174] S1009. The application periodically sends a Charger Output Ready (CRO(0x00)) message to the BMS module.

[0175] S1010. The application reads the battery voltage value, the front-end voltage values and the back-end voltage values of C1 and C2 through the Energy Management System module.

[0176] S1011. The application notifies the charging host module to start pre-charging.

[0177] S1012. The charging host module sets the front-end voltage values of C1 and C2 to the battery voltage value through the Energy Management System module.

[0178] Exemplarily, the battery voltage value can be greater than or equal to 1V and less than or equal to 10V.

[0179] S1013. The application detects that the front-end voltage values of C1 and C2 are the battery voltage value through the Energy Management System module, and determines that the charging pile is ready.

[0180] S1014. The application periodically sends a CRO(0xAA) message to the BMS module.

[0181] S1015. The BMS module receives the CRO(0xAA) message and stops sending the BRO message.

[0182] On this basis, the test process in the charging stage can be started.

[0183] As Figure 11 shown, this figure is the timing diagram of the fourth charging pile test method provided by the embodiment of the present application, including S1101 - S1105.

[0184] S1101. The BMS module periodically sends Battery Charge Level (BCL) and Battery Charge Status (BCS) messages to the application.

[0185] S1102. The application receives the BCL message, stops sending the CRO message, and periodically sends a Charger Charge Status (CCS) message to the BMS module.

[0186] S1103. The BMS module receives the CCS message.

[0187] The BMS module receives the CCS message and normally enters the charging state.

[0188] In some examples, after the BMS module receives the CCS message, it can periodically send BSM messages, Battery Module Voltage (BMV) messages, Battery Module Temperature (BMT) messages, and Battery Reserved (BSP) messages, etc. to the application.

[0189] S1104. The application synchronizes the status of the charging pile to the operation platform module as: charging.

[0190] The application can generate test data indicating that the status of the charging pile is charging and send the test data to the operation platform module to synchronize the status of the charging pile as: charging.

[0191] S1105. The test case reads the status of the charging pile through the operation platform module and determines whether the status of the charging pile is charging.

[0192] After the application synchronizes the status of the charging pile to the operation platform module, the operation platform module can store the current status of the charging pile. On this basis, wait for 5s, and the test case can read the test data through the operation platform module, obtain the status of the charging pile, and determine whether the status of the charging pile is charging.

[0193] When it is determined that the status of the charging pile is charging, it indicates that the test result of the charging stage is normal, and the stop charging test can be performed; otherwise, it is determined that the test result of the charging stage is abnormal and an error is reported.

[0194] As Figure 12 shown, this figure is the timing diagram of the fifth charging pile test method provided by the embodiment of the present application, including S1201 - S1217.

[0195] S1201. The test case sends an instruction to the operation platform module to simulate a user's stop charging operation.

[0196] After charging for a period of time, the test case can send an instruction to the operation platform module to simulate a user's stop charging operation to simulate a remote stop charging instruction initiated by a real user.

[0197] S1202. The operation platform module sends a stop charging instruction to the application.

[0198] The operation platform module can construct a stop charging instruction based on the simulation driver layer according to the instruction sent by the test case to simulate a user's stop charging operation, and send the stop charging instruction to the application through the communication protocol.

[0199] S1203. The application periodically sends a Charger Stop Charging (CST) message to the BMS module.

[0200] After the application receives the stop charging instruction sent by the operation platform module, it starts to periodically send CST messages.

[0201] S1204. The BMS module receives the CST message, stops sending the Battery Stop Charging (BST) message, and periodically sends the Battery Statistics Data (BSD) message.

[0202] S1205. The application sends a stop charging instruction to the charging host module.

[0203] S1206. The charging host module sets the output current value to 5 A or less.

[0204] S1207. The application, through the energy management system module, detects that the output current value is less than or equal to 5 A and disconnects C1 and C2.

[0205] S1208. The application sends an instruction to close the discharge circuit switch to the energy management system module to start the discharge detection process.

[0206] S1209. The energy management system module gradually reduces the front-end voltage value and the back-end voltage value of C1 and C2 to below 60 V within 5 s.

[0207] S1210. The application, through the energy management system module, detects that the front-end voltage value and the back-end voltage value of C1 and C2 are less than 60 V and disconnects the discharge circuit switch.

[0208] S1211. The application stops sending CST messages and starts periodically sending charger statistical data (CSD) messages to the BMS module.

[0209] S1212. The BMS module receives the CSD message, stops sending BSD messages, and ends the charging.

[0210] S1213. The application sends an instruction to turn off the low-voltage auxiliary power supply switch to the BMS module.

[0211] S1214. The application sends an electronic lock unlocking instruction to the charging gun module.

[0212] S1215. The application, through the charging gun module, detects that the electronic lock feedback signal is unlocked.

[0213] In response to the electronic lock unlocking instruction, the charging gun module can switch the electronic lock feedback signal to unlocked. On this basis, after the application checks that the electronic lock feedback signal is unlocked, it can normally enter the idle state.

[0214] S1216. The application synchronizes the status of the charging pile to the operation platform module as: idle state.

[0215] The application can generate test data indicating that the charging of the charging pile is over and send the test data to the operation platform module, and synchronize the status of the charging pile to the operation platform module as: idle state

[0216] S1217. The test case reads the status of the charging pile through the operation platform module to determine that the charging is over.

[0217] After the application synchronizes the status of the charging pile to the operation platform module, the operation platform module stores the current status of the charging pile. The test case reads the status of the charging pile through the operation platform module and determines whether the status of the charging pile is the idle state.

[0218] When it is determined that the status of the charging pile is the idle state, it indicates that the charging is over, and it can be determined that the test result of the charging stop stage is normal; otherwise, it indicates that the charging is not over, and it can be determined that the test result of the charging stop stage is abnormal and an error is reported.

[0219] The following Figure 13 introduces a test process for simulating an abnormal locking feedback of an electronic lock provided by an embodiment of the present application, Figure 13 which is a timing diagram of the sixth charging pile test method provided by an embodiment of the present application, including S1301 - S1314.

[0220] S1301. The test case sends an instruction for simulating an abnormal locking feedback of the electronic lock to the charging gun module.

[0221] In the scenario where the test framework is in the running state, the simulation module and the application are in the initialization state, the charging gun is in the unplugged state, and the charging pile is in the idle state, the test case sends an instruction for simulating an abnormal locking feedback of the electronic lock to the charging gun module.

[0222] S1302. The application connects to the operation platform module and synchronizes the status of the charging gun and the charging pile to the operation platform module.

[0223] After the application actively connects to the operation platform module and synchronizes the status of the charging gun and the charging pile to the operation platform module, the operation platform module can store the current status of the charging gun and the charging pile.

[0224] S1303. The test case reads the status of the charging gun and the charging pile through the operation platform module.

[0225] The test case reads the status of the charging gun and the charging pile and determines whether the status of the charging gun is unplugged and whether the status of the charging pile is idle.

[0226] When the test case determines that the status of the charging gun is unplugged and the status of the charging pile is idle, S1304 is executed; otherwise, an error is reported.

[0227] S1304. The test case sends an instruction for simulating a gun - plugging operation by the user to the charging gun module.

[0228] S1305. The charging gun module constructs the sampling voltage data corresponding to CC1.

[0229] When the charging gun module constructs the change in the sampled voltage corresponding to CC1 during the gun insertion operation by the user. For example, the sampled voltage data corresponding to CC1 constructed by the charging gun module can change from 6V to 12V, then drop from 12V to 6V, and then drop from 6V to 4V.

[0230] S1306. The application program synchronizes the status of the charging gun to the operation platform module as: the gun is inserted.

[0231] After the application program starts, it can detect the sampled voltage of CC1 in real time. When it detects that the sampled voltage of CC1 reaches 4V, it determines that a charging gun is inserted and actively synchronizes the status of the charging gun to the operation platform module as: the gun is inserted.

[0232] S1307. The test case detects and determines that the status of the charging gun is the gun is inserted through the operation platform module.

[0233] The test case can wait for 1s and then detect the status of the charging gun through the operation platform module. If it determines that the status of the charging gun is the gun is inserted, it executes S1308; otherwise, it reports an error.

[0234] S1308. The test case sends an instruction to the operation platform module to simulate the user's operation of starting the charging.

[0235] The test case sends an instruction to the operation platform module to simulate the user's operation of starting the charging to simulate the process of the user actually initiating a remote start charging instruction.

[0236] S1309. The operation platform module sends a start charging instruction to the application program.

[0237] In response to the instruction sent by the test case to simulate the user's operation of starting the charging, the operation platform module can construct a start charging instruction and send this start charging instruction to the application program through the communication protocol.

[0238] S1310. The application program sends an electronic lock locking instruction to the charging gun module.

[0239] In response to the start charging instruction sent by the operation platform module, the application program can send an electronic lock locking instruction to the charging gun module to simulate the process of the real charging gun being locked.

[0240] S1311. The application program detects that the electronic lock feedback signal of the charging gun module is unlocked and the duration exceeds 5s.

[0241] When the electronic lock locking feedback of the charging gun module is configured abnormally in the test case, the charging gun module can generate simulated information with the electronic lock feedback status being unlocked and timed out in response to an instruction simulating the abnormal electronic lock locking feedback. Exemplarily, when the application detects that the electronic lock feedback signal of the charging gun module is unlocked and the duration exceeds 5s, it can be considered that the electronic lock locking is abnormal, and an abnormal handling process is executed.

[0242] S1312. The application executes the abnormal handling process, determines that the current charging fails, and records the fault status.

[0243] S1313. The application reports the status and abnormal cause of the charging pile to the operation platform module.

[0244] Exemplarily, the application can generate test data for indicating the status and abnormal cause of the charging pile and report the test data to the operation platform module. For example, the application reports that the status of the charging pile is startup failure and the failure cause is electronic lock abnormality to the operation platform module.

[0245] S1314. The test case reads the status and abnormal cause of the charging pile through the operation platform module.

[0246] Exemplarily, the operation platform module can store the status and abnormal cause of the current charging pile. The test case can wait for 10s and read through the operation platform module that the status of the charging pile is startup failure and the abnormal cause is electronic lock abnormality. In this case, it can be determined that the detection result of the detection of the abnormal electronic lock locking feedback is normal; otherwise, it is determined that the detection result of the detection of the abnormal electronic lock locking feedback is abnormal.

[0247] In summary, in the embodiments of the present application, by converting the cumbersome embedded software development mode into a PC software development mode, the efficiency of self-testing code is greatly improved. Through comprehensive test cases, various normal and abnormal scenarios during the use of the charging pile can be simulated, and the software functions can be checked more comprehensively and meticulously, thereby improving the overall quality of the software, facilitating the implementation of the automated test function, protecting the stability of the original functions, and at the same time verifying the correctness of the newly added functions.

[0248] In the embodiments of the present application, the hardware device functions of the charging pile are simulated through the simulation module, focusing on software function testing, reducing the dependence on real hardware, and thus saving hardware costs. An additional abstraction layer is added to the test architecture to achieve complete isolation between the underlying code and the application layer. After migrating the platform, only the underlying driver needs to be adapted to achieve function migration, greatly improving the portability of the code.

[0249] Such as Figure 14As shown, this figure is a schematic structural diagram of an electronic device provided by an embodiment of the present application. In this embodiment, the electronic device may include, but is not limited to, personal computers (PCs), tablet computers, desktops, laptops, notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, and other devices. In some other implementation manners, the electronic device may also be a server, which may include, but is not limited to, cabinet servers, rack servers, blade servers, or general-purpose servers, GPU servers, DPU servers, etc., without limitation here.

[0250] The electronic device includes a memory 1401, a processor 1402, and a communication interface 1403; wherein, the memory 1401 stores computer instructions, and the processor 1402 is configured to execute the computer instructions, so that the electronic device executes the steps of a test method for a charging pile system shown above.

[0251] In some embodiments, the processor 1402 may be a central processing unit (CPU).

[0252] In some other implementation manners, the processor 1402 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.

[0253] In some embodiments, the memory 1401 may be a volatile memory or a non-volatile memory, such as a register, etc. Specifically, a volatile memory refers to a memory in which the data stored internally is lost when the power supply is interrupted. Among them, the volatile memory is mainly a random access memory (RAM), including a static random access memory (SRAM) and a dynamic random access memory (DRAM). A non-volatile memory refers to a memory in which the data stored internally is not lost even when the power supply is interrupted. Common non-volatile memories include read only memory (ROM), optical discs, magnetic disks, solid state drives, and various memory cards based on flash memory technology, etc.

[0254] In some embodiments, the memory 1401 has executable code, and the processor 1402 executes this code. The bus may be a Peripheral Component Interconnect (PCI) bus, or an extended industry standard architecture (eisa) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of understanding, Figure 14 it is only represented by a thick line in the figure, but it does not mean that there is only one bus or one type of bus.

[0255] As described above, it is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed in the present application should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A testing method for a charging pile, characterized in that, Applied to an electronic device, the electronic device includes a processor, and the method is executed by the processor. The method includes: Generating test instructions based on test cases; Constructing simulation information based on the test instructions; Generating test data in response to the simulation information; the test data is used to indicate the data generated by the application program of the controller of the charging pile in response to the simulation information; wherein, the application program runs in the processor; Determining a test result based on the test data.

2. The method according to claim 1, characterized in that The constructing the simulation information based on the test instructions includes: Determining a test scenario corresponding to the test instructions based on the test instructions; Constructing the simulation information according to the simulation module corresponding to the test scenario.

3. The method according to claim 1, wherein The test instructions include an instruction to simulate a user's gun insertion operation, and the simulation information includes sampled voltage data. The generating test data in response to the simulation information includes: Generating test data for indicating the state of the charging gun corresponding to the gun insertion stage in response to the sampled voltage data; The determining a test result based on the test data includes: When the test data indicates that the state of the charging gun is plugged in, determining that the test result of the gun insertion test is normal; when the test data indicates that the state of the charging gun is not plugged in, determining that the test result of the gun insertion test is abnormal.

4. The method according to claim 3, characterized in that, The generating test data for indicating the state of the charging gun corresponding to the gun insertion stage in response to the sampled voltage data includes: When the sampled voltage data reaches a first preset voltage, generating test data for indicating that the state of the charging gun corresponding to the gun insertion stage is plugged in; when the sampled voltage data does not reach the first preset voltage, generating test data for indicating that the state of the charging gun corresponding to the gun insertion stage is not plugged in.

5. The method according to claim 1, wherein The test instructions include an instruction to simulate a user's start charging operation, and the simulation information includes a start charging instruction. The generating test data in response to the simulation information includes: Generating test data for indicating the state of the charging pile corresponding to the charging stage in response to the start charging instruction; The determining a test result based on the test data includes: When the test data indicates that the state of the charging pile is charging, determining that the test result of the charging stage is normal; when the test data indicates that the state of the charging pile is not charging, determining that the test result of the charging stage is abnormal.

6. The method according to claim 5, wherein The generating test data for indicating the state of the charging pile corresponding to the charging stage in response to the start charging instruction includes: After performing insulation detection, discharge detection, and battery management system parameter configuration in response to the start charging instruction, generating the state of the charging pile corresponding to the charging stage.

7. The method according to claim 1, characterized in that, The test instructions include an instruction to simulate a user's stop charging operation, and the simulation information includes a stop charging instruction. The generating test data in response to the simulation information includes: Generating test data for indicating the state of the charging pile corresponding to the stop charging stage in response to the stop charging instruction; The determining a test result based on the test data includes: When the test data indicates that the charging pile is in the charging ended state, determine that the test result of the charging stop phase is normal; when the test data indicates that the charging pile is in the charging state, determine that the test result of the charging stop phase is abnormal.

8. The method according to claim 7, characterized in that The generating, in response to the charging stop instruction, of test data for indicating the state of the charging pile corresponding to the charging stop phase includes: In response to the charging stop instruction, constructing sampled current data; In response to the sampled current data, generating test data for indicating the state of the charging pile corresponding to the charging stop phase.

9. The method according to claim 1, wherein The test instruction includes an instruction for simulating an abnormal locking feedback of the electronic lock, and the simulation information includes that the electronic lock feedback state is unlocked and timed out. The generating, in response to the simulation information, of test data includes: In response to the simulation information, generating test data for indicating the state of the charging pile and the cause of the abnormality; The determining of the test result based on the test data includes: When the test data indicates that the charging pile is in the startup failure state and the cause of the abnormality is an electronic lock abnormality, determine that the detection result of the electronic lock locking feedback abnormality detection is normal; when the test data does not indicate that the charging pile is in the startup failure state and the cause of the abnormality is an electronic lock abnormality, determine that the detection result of the electronic lock locking feedback abnormality detection is abnormal.

10. An electronic device, characterized in that, The electronic device includes: a processor and a memory; The memory is used for storing program code and transmitting the program code to the processor; The processor is used for executing the steps of a charging pile test method according to any one of claims 1-9 according to the instructions in the program code.

Citation Information

Patent Citations

  • Detection method and device for direct current charging pile

    CN108226678A

  • Interface device for testing electric automobile direct-current charging pile

    CN109683035A

  • Charging pile software testing system

    CN111382045A

  • Charging simulation test method and device

    CN113960390A

  • Charging control unit testing device and method

    CN114019945A