High-voltage power-on and power-off test method and device
By constructing a high-voltage power-on/off test flowchart based on a step graph library and a signal library, and parsing and converting it into a test step sequence, the problem of rigid test procedures was solved, and the flexibility and efficiency of high-voltage power-on/off testing were improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING FENGZHI RUILIAN TECH CO LTD
- Filing Date
- 2025-12-11
- Publication Date
- 2026-05-05
AI Technical Summary
The existing high-voltage power-on and power-off testing procedures for new energy vehicles are fixed and cannot be flexibly adjusted according to the scenario. This lack of flexibility and scalability leads to a large workload, low efficiency, and a high risk of human error.
By using a preset step graph library and signal library, a test flowchart for high voltage power-on and power-off testing is constructed. The step node types and signal operation text in the test flowchart are parsed, converted into a test step sequence, and the actuators are called sequentially to complete the test.
It improves the flexibility and user participation of high-voltage power-on and power-off testing, can quickly adapt to new testing requirements, reduces the dependence on program code modification, and improves testing efficiency.
Smart Images

Figure CN121978429A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of new energy vehicle technology, and in particular to a high-voltage power-on / off testing method and apparatus. Background Technology
[0002] With the rapid development of new energy vehicle technology, the high-voltage power-on / off function, as a core component of vehicle safety operation, has become particularly important for testing and verification. However, the testing of high-voltage systems in new energy vehicles currently faces multiple challenges. First, significant differences exist in the electronic and electrical architectures of different manufacturers, resulting in variations in communication protocols, signal definitions, and power-on / off timing requirements between controllers. Second, the high-voltage power-on / off process involves multiple safety-critical steps, including contactor control, accessory control, and fault handling, each requiring precise timing control and status monitoring. Furthermore, with the development of new energy technologies, the high-voltage power-on / off function also interacts in complex ways with functions such as charging management and thermal management systems, further increasing the complexity of testing.
[0003] Traditional high-voltage power-on / off testing methods rely primarily on fixed test scripts and manual testing. The test procedures are rigidly embedded in the program as test code, making it difficult to handle complex and ever-changing testing requirements. Test engineers need to write specific test code for each vehicle model, which is not only labor-intensive and inefficient but also prone to introducing human error. More importantly, when test requirements change or new test scenarios are discovered, the existing test system often requires large-scale code modifications. Test engineers cannot flexibly adjust the test procedures according to the scenario, lacking the necessary flexibility and scalability. Summary of the Invention
[0004] This invention provides a high-voltage power-on / off testing method and apparatus to solve the problems of rigid testing procedures in the prior art, which cannot flexibly adjust the testing procedures according to the scenario and lack the necessary flexibility and scalability.
[0005] This invention provides a high-voltage power-on / off testing method, comprising the following steps: Based on a preset step graph library and a pre-generated signal library, a test flowchart for high voltage power-on and power-off testing is constructed. The test flowchart includes step graph elements from the step graph library and signal operation text from the signal library corresponding to the step graph elements. The step type and signal operation text of each step node in the test flowchart are parsed, and the test flowchart is converted into a corresponding test step sequence. The actuators corresponding to each test step in the test step sequence are called sequentially to complete the high voltage power-on and power-off test.
[0006] According to the present invention, a high-voltage power-on / off testing method is provided, which constructs a test flowchart for high-voltage power-on / off testing based on a preset step graph library and a pre-generated signal library, including: Draw step nodes of different step types that the user drags and drops in the graphical interface, and edit the signal operation text dragged from the signal library within the step nodes; The connection relationships between the nodes of each step are drawn to obtain the test flowchart of the high voltage power-on / off test.
[0007] According to the high-voltage power-on / off testing method provided by the present invention, after editing the signal operation text dragged from the signal library in the step node, the method further includes: Configure step parameters for the step node, the step parameters including: a step execution time threshold, an expected signal value, and at least one of the judgment conditions.
[0008] According to the present invention, a high-voltage power-on / off testing method parses the step type and signal operation text of each step node in the test flowchart, and converts the test flowchart into a corresponding test step sequence, including: The instruction format is determined based on the step type of each step node; Extract the execution actions and execution signal objects from the signal operation text corresponding to each step node; Match the action code corresponding to the action to be executed, and the execution signal object is the parameter of the action code; The action code is generated into instruction code according to the corresponding instruction format, and each instruction code corresponds to a test step; Arrange the corresponding instruction codes according to the order of each step node in the test flowchart to generate a test step sequence.
[0009] According to the high-voltage power-on / off testing method provided by the present invention, before constructing the test flowchart for high-voltage power-on / off testing based on a preset step graph library and a pre-generated signal library, the method further includes: Select the CAN card device type for high voltage power-on / off testing, and configure the CAN channel parameters according to the device type; Import the DBC file corresponding to the CAN card, and extract all signals from the DBC file to form the signal library.
[0010] According to the high-voltage power-on / off testing method provided by the present invention, after sequentially calling the actuators corresponding to each test step in the test step sequence to complete the high-voltage power-on / off test, the method further includes: A test report is generated based on the test results of high voltage power-on and power-off. The test report includes at least one of the following: whether the test was successful, the total test time, test log records, and key signal change curves.
[0011] The present invention also provides a high-voltage power-on / off testing device, comprising the following modules: The flowchart construction module is used to construct a test flowchart for high voltage power-on and power-off testing based on a preset step graphic library and a pre-generated signal library. The test flowchart includes step graphic elements from the step graphic library and signal operation text from the signal library corresponding to the step graphic elements. The test step sequence conversion module is used to parse the step type and signal operation text of each step node in the test flowchart and convert the test flowchart into a corresponding test step sequence. The actuator calling module is used to sequentially call the actuators corresponding to each test step in the test step sequence to complete the high voltage power-on and power-off test.
[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the program to implement the high voltage power-on / off test method as described above.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the high-voltage power-on / off test method as described above.
[0014] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the high voltage power-on / off test method as described above.
[0015] The high-voltage power-on / off testing method and apparatus provided by this invention constructs a test flowchart for high-voltage power-on / off testing based on a preset step graph library and a pre-generated signal library. It then parses the step type and signal operation text of each node in the test flowchart, converting the flowchart into a corresponding test step sequence. Finally, it sequentially calls the actuators corresponding to each test step in the sequence to complete the high-voltage power-on / off test. Because the test user can graphically design the test flowchart for high-voltage power-on / off testing according to the actual test scenario requirements in the host computer's design interface, and then perform the test after converting the flowchart into a test step sequence, it solves the problem of fixed test procedures that cannot be flexibly adjusted according to the scenario. This improves the flexibility and user participation of high-voltage power-on / off testing, and allows for rapid adaptation to new test requirements without modifying program code, thus improving testing efficiency. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is one of the flowcharts of the high-voltage power-on / off testing method provided by the present invention.
[0018] Figure 2 This is a schematic diagram of the test flowchart constructed in the high voltage power-on / off test method provided by the present invention.
[0019] Figure 3 This is the second flowchart of the high-voltage power-on / off testing method provided by the present invention.
[0020] Figure 4 This is a schematic diagram of the high-voltage power-on / off testing device provided by the present invention.
[0021] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0023] In existing technologies, the core problem currently facing high-voltage power-on and power-off testing of new energy vehicles lies in the contradiction between the inflexibility of the testing process and the diversity of vehicle models, specifically manifested in: Fixed Test Logic: Existing test systems typically have the high-voltage power-on / off test sequence (such as pre-charging → main contactor engagement → MCU enable, etc.) fixed in the program. Different vehicle models may require different test process sequences due to differences in system architecture, safety strategies, or functional design, but existing systems cannot flexibly adapt to such changes.
[0024] Low user engagement: Existing testing systems typically bury test logic deep within the program code, preventing test engineers from flexibly configuring test processes according to actual testing needs. This "black box" testing approach severely limits users' control, interaction, and customization capabilities over the testing process. Although test engineers possess rich testing experience and domain knowledge, they are unable to directly translate this knowledge into executable test plans.
[0025] Test efficiency and coverage issues: Due to the fixed test process, it is difficult to quickly adapt to new test requirements. Each change in the test process requires modifying the program code, recompiling, setting up the test environment, and verification, a process that often takes several days or even weeks. Furthermore, the fixed test process struggles to cover all boundary conditions and exceptions, especially in complex system interaction scenarios, where test coverage often falls short of expectations.
[0026] Addressing the issue of fixed high-voltage power-on / off testing procedures that prevent users from flexibly adjusting the testing process according to specific scenarios, this invention provides a high-voltage power-on / off testing method. This method can be used by a host computer to execute testing tasks. The specific process is as follows: Figure 1 As shown, the procedure includes steps S110 to S130.
[0027] Step S110: Based on the preset step graphic library and the pre-generated signal library, construct a test flowchart for high voltage power-on and power-off testing. The test flowchart includes step graphic elements from the step graphic library and signal operation text from the signal library corresponding to the step graphic elements.
[0028] The step graphic library provides graphical elements for flow control, such as: start / end (rounded rectangle), sequence line (straight line or arrow), flow node (rectangle), and branch decision node (diamond). Flow nodes and branch decision nodes are both step nodes. The signal library includes the signal operation text for each signal in the high-voltage power-on / off test. Assigning the signal operation text as the specific content of the step node creates a meaningful step node representing the high-voltage power-on / off test. All step nodes, combined with start / end and sequence lines, form the final test flowchart.
[0029] Test users can drag and drop corresponding step graphic elements from the step graphic library to the design interface of the host computer, and drag and drop signal operation text from the signal library to assign to the corresponding step nodes. Then, the step nodes are connected in the order of the test requirements corresponding to the current test scenario. The host computer constructs the corresponding test flowchart for high voltage power-on and power-off tests based on the user's drag and drop operations.
[0030] Step S120: Parse the step type and signal operation text of each step node in the test flowchart, and convert the test flowchart into a corresponding test step sequence.
[0031] The step type of the step node can be determined according to the category of the step graphic element, mainly including: process node and branch judgment node. For process node, the corresponding signal operation text is the natural language text representation of the corresponding execution instruction, such as: sending VCU wake-up message, setting power supply voltage, etc. For branch judgment node, the corresponding signal operation text is the natural language text representation of the judgment subject and default judgment condition, such as: if-else condition judgment, whether the main contactor is closed, and confirming whether the VCU status is Ready.
[0032] In this step, by parsing the step type and signal operation text of each step node in the test flowchart, the signal operation text corresponding to each step node in the test flowchart can be extracted as the test steps in the test step sequence. Then, the test steps are arranged in order according to the sequence line in the test flowchart to obtain the test step sequence.
[0033] Step S130: Sequentially call the actuators corresponding to each test step in the test step sequence to complete the high-voltage power-on / off test. The actuators for each test step are pre-set, and the correspondence between each test step and its corresponding actuator is pre-stored in the host computer. After determining the test step sequence, the corresponding actuator is called according to the test step in the sequence. The actuator communicates with the vehicle's vehicle control unit (VCU) via CAN through the communication interface between the host computer and the vehicle, thereby completing the test.
[0034] This embodiment of the high-voltage power-on / off testing method constructs a test flowchart based on a preset step graph library and a pre-generated signal library. It then parses the step type and signal operation text of each node in the flowchart, converting it into a corresponding test step sequence. Finally, it sequentially calls the actuators corresponding to each test step in the sequence to complete the high-voltage power-on / off test. Because the user can graphically design the test flowchart on the host computer interface according to the actual test scenario requirements, and then perform the test after converting the flowchart into a test step sequence, it solves the problem of fixed test procedures that cannot be flexibly adjusted according to the scenario. This improves the flexibility and user participation of high-voltage power-on / off testing, and allows for rapid adaptation to new test requirements without modifying program code, thus improving testing efficiency.
[0035] In some embodiments, step S110, based on a preset step graph library and a pre-generated signal library, constructs a test flowchart for high-voltage power-on / off testing, specifically including: Step S111: Draw step nodes of different step types dragged by the user in the graphical interface, and edit the signal operation text dragged from the signal library within the step nodes. Specifically, based on the step graphical elements dragged by the test user, draw corresponding step nodes in the graphical interface, and edit the signal operation text dragged into the step nodes by the test user, thereby forming a specific step node.
[0036] like Figure 2 As shown, you can first drag and drop step graphic elements from the step graphic element drag-and-drop window to the design interface to form step nodes, then drag and drop signal operation text from the signal drag-and-drop window to the corresponding step nodes, and finally drag sequence lines to connect the step nodes. It should be noted that for branch judgment nodes, after dragging the corresponding signal operation text to the branch judgment node, the signal operation text in the signal drag-and-drop window will be automatically converted into a judgment statement. For example, "BMS feedback main negative contactor status" will be converted to "Is the main negative contactor closed?" and edited into the corresponding branch judgment node.
[0037] Step S112: Draw the connection relationships between the nodes of each step to obtain the test flowchart of the high-voltage power-on / off test. The connection relationships are drawn based on the sequence lines dragged between the step nodes by the test user, thus forming the test flowchart of the high-voltage power-on / off test.
[0038] In this embodiment, test users can drag and drop graphical elements of the steps to the design interface according to the actual test scenario. By drawing the step nodes and connections dragged by the test users, the participation of test users in the testing process is improved. Moreover, the order of each step can be easily adjusted by dragging and dropping, thereby flexibly defining the execution logic of different scenarios.
[0039] In some embodiments, after editing the signal operation text dragged from the signal library within the step node, the method further includes: configuring step parameters for the step node, wherein the step parameters include at least one of the following: step execution duration threshold, message, signal value, expected value, and judgment condition.
[0040] The step execution time threshold represents the limit on the execution time of the test step corresponding to the step node. If no result is returned within this threshold, an error will be reported.
[0041] The message and signal values indicate the missing or default message and signal values in the signal operation text corresponding to the editing or modification step node. For example, setting the CAN message and CAN signal values to be sent by a certain process node.
[0042] The expected value is the expected value of the judgment subject in the branch judgment node. The judgment condition can be greater than, less than or equal to, etc. The expected value and judgment condition of the branch judgment node can be edited.
[0043] In this embodiment, by configuring step parameters for step nodes, test users can adjust the step parameters according to the actual test scenario, thereby making high voltage power-on and power-off tests more flexible.
[0044] In some embodiments, step S120, which involves parsing the step type and signal operation text of each step node in the test flowchart and converting the test flowchart into a corresponding test step sequence, specifically includes: Step S121: Determine the instruction format based on the step type of each step node. The step type can be determined according to the category of the step graphical element, for example, such as... Figure 2 As shown, for the rectangular step node, its step type is a flow node type, and the instruction format is a flow instruction format. For the diamond-shaped step node, its step type is a branch judgment node type, and the instruction format is a branch judgment instruction format, such as an if-else format.
[0045] Step S122: Extract the execution actions and execution signal objects from the signal operation text corresponding to each step node. Specifically, natural language processing (NLP) is used to parse the signal operation text. By parsing the syntactic structure of the signal operation text, the execution actions and execution signal objects are extracted from it. For example, such as... Figure 2 As shown, when the main contactor and the negative contactor are closed, the extracted action is "closing", and the objects of execution are the "main contactor" and the "negative contactor".
[0046] Step S123: Match the action code corresponding to the action to be executed, and the execution signal object is the parameter of the action code. For example, matching can be performed through a pre-established mapping table between actions and action codes. This mapping table is configured with the mapping relationship between each action and its corresponding action code, as well as the mapping relationship between the execution signal object and the signal object identifier. For example, the action code corresponding to the action "close" is "close(A)", where A is a parameter array, the object identifier corresponding to the execution signal object "main contactor" is "K1", and the object identifier corresponding to "negative contactor" is "K2".
[0047] Step S124: Generate instruction code from the action code according to the corresponding instruction format, with each instruction code corresponding to a test step. For example, for the flow instruction format, the object identifier corresponding to the execution signal object is directly substituted into the parameter array of the action code to generate the instruction code. For instance, closing the main negative contactor results in the instruction code `close(K1, K2)`. For the branch judgment instruction format, the object identifier corresponding to the execution signal object is substituted into the parameters of the action code, and the instruction code is generated in an if-else format. For instance, whether the main negative contactor is closed results in the instruction code "if close(K1, K2)=1:……;else:……".
[0048] Step S125: Arrange the corresponding instruction codes according to the order of each step node in the test flowchart to generate a test step sequence. It can be understood that the final generated test step sequence is equivalent to a test script, and the above instruction format and instruction code should conform to the syntax rules of a scripting language.
[0049] In this embodiment, the above steps enable the automatic conversion from a test flowchart to a sequence of test steps.
[0050] In some embodiments, before step S110, i.e., before constructing the test flowchart for high-voltage power-on / off testing based on a preset step graph library and a pre-generated signal library, the high-voltage power-on / off testing method further includes: Step S101: Select the CAN card device type for the high-voltage power-on / off test, and configure the CAN channel parameters according to the device type. Specifically, the receiving test user selects the actual CAN card hardware (e.g., USBCAN_Ⅱ, CANoe, etc.) from the CAN card device type drop-down list, and the test system loads the corresponding driver for the CAN card.
[0051] Step S102: Import the DBC file corresponding to the CAN card and extract all signals from the DBC file to form the signal library. The DBC file describes the CAN communication protocol. In this step, the DBC file is automatically parsed, and all signal operation texts (such as main contactor closing command, main contactor status, etc.) are extracted to form a draggable signal library, preparing for the next step of visualization design. Specifically, the corresponding signal operation text can be extracted through signal keywords.
[0052] In this embodiment, the corresponding CAN card device and its corresponding DBC file are selected according to the needs of the actual test scenario. The signal library is generated through the DBC file, making high voltage power-on and power-off tests more flexible.
[0053] In some embodiments, after sequentially calling the actuators corresponding to each test step in the test step sequence to complete the high-voltage power-on / off test, the method further includes: generating a test report based on the test results of the high-voltage power-on / off test. The test report includes at least one of the following: whether the test was successful, the total test time, test log records, and key signal change curves. Specifically, after the test is completed, all data is automatically summarized to generate a well-structured and detailed test report. The report typically includes: Test Overview: Overall pass / fail status, total time elapsed; Detailed execution log: timestamp, action, expected value, actual value, status light results for each step; Collect and save messages: change curves of key signals (such as voltage, current, contactor status) to facilitate conclusion analysis; Conclusions and problem localization: preliminary analysis of failed steps to help engineers quickly locate problems.
[0054] like Figure 3 The diagram illustrates the detailed flow of a high-voltage power-on / off testing method according to one embodiment. First, communication configuration between the device and the host computer is implemented, selecting the CAN card device type and setting the corresponding CAN channel parameters (e.g., channel number, baud rate). Next, a DBC file is imported, parsed, and a draggable signal library is constructed. Then, a visual test flow design is performed, receiving the test scenario selected by the test user (e.g., high-voltage power-on, power-off, or emergency power-off). Step graphic elements and signal operation text from the signal library are dragged to the flow editing area of the host computer, arranging the test steps and execution order by connecting step nodes with sequence lines. The signal value, expected value, judgment condition, and / or execution duration threshold for each signal in each step node of the test flow diagram are set. Then, the test flow diagram is converted into a test step sequence, and the test is started. Finally, the test process is executed and monitored in real time. The execution and monitoring processes are similar to existing technologies and will not be elaborated here.
[0055] The high-voltage power-on / off testing device provided by the present invention is described below. The high-voltage power-on / off testing device described below can be referred to in correspondence with the high-voltage power-on / off testing method described above.
[0056] The high-voltage power-on / off testing device of this invention, such as Figure 4 As shown, it includes the following modules: The flowchart construction module 410 is used to construct a test flowchart for high voltage power-on / off testing based on a preset step graphic library and a pre-generated signal library. The test flowchart includes step graphic elements from the step graphic library and signal operation text from the signal library corresponding to the step graphic elements.
[0057] The test step sequence conversion module 420 is used to parse the step type and signal operation text of each step node in the test flowchart and convert the test flowchart into a corresponding test step sequence.
[0058] The actuator calling module 430 is used to sequentially call the actuators corresponding to each test step in the test step sequence to complete the high voltage power-on and power-off test.
[0059] The high-voltage power-on / off testing device in this embodiment constructs a test flowchart based on a preset step graph library and a pre-generated signal library. It then parses the step type and signal operation text of each node in the test flowchart, converting it into a corresponding test step sequence. Finally, it sequentially calls the actuators corresponding to each test step in the sequence to complete the high-voltage power-on / off test. Because the user can graphically design the test flowchart on the host computer interface according to the actual test scenario requirements, and then perform the test after converting the flowchart into a test step sequence, it solves the problem of fixed test procedures that cannot be flexibly adjusted according to the scenario. This improves the flexibility and user participation of high-voltage power-on / off testing, and allows for rapid adaptation to new test requirements without modifying program code, thus improving testing efficiency.
[0060] In some embodiments, the flowchart construction module 410 includes: The step node drawing module is used to draw step nodes of different step types that the user drags and drops in the graphical interface, and to edit the signal operation text dragged from the signal library within the step nodes.
[0061] The connection relationship drawing module is used to draw the connection relationships between the nodes of each step, thereby obtaining the test flowchart of the high voltage power-on and power-off test.
[0062] In some embodiments, the high-voltage power-on / off testing device further includes: a step parameter configuration module, used to configure step parameters for the step node after editing the signal operation text dragged from the signal library within the step node, the step parameters including: a step execution duration threshold, an expected signal value, and at least one of a judgment condition.
[0063] In some embodiments, the test step sequence conversion module 420 includes: The instruction format determination module is used to determine the instruction format based on the step type of each step node.
[0064] The information extraction module is used to extract the execution actions and execution signal objects from the signal operation text corresponding to each step node.
[0065] The code matching module is used to match the action code corresponding to the action to be executed, and the execution signal object is the parameter of the action code.
[0066] The instruction code generation module is used to generate instruction codes from the action codes according to the corresponding instruction format, and each instruction code corresponds to a test step.
[0067] The instruction code sorting module is used to arrange the corresponding instruction codes according to the order of each step node in the test flowchart to generate a test step sequence.
[0068] In some embodiments, the high-voltage power-on / off testing device further includes: a communication configuration module, used to select the CAN card device type for high-voltage power-on / off testing and configure CAN channel parameters according to the device type before constructing the test flowchart for high-voltage power-on / off testing based on a preset step graph library and a pre-generated signal library; import the DBC file corresponding to the CAN card and extract all signals from the DBC file to form the signal library.
[0069] In some embodiments, the high-voltage power-on / off testing device further includes: a test report generation module, used to generate a test report based on the test results after sequentially calling the actuators corresponding to each test step in the test step sequence to complete the high-voltage power-on / off test. The test report includes at least one of the following: whether the test was successful, the total test time, test log records, and key signal change curves.
[0070] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5 As shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communications interface 520, and the memory 530 communicate with each other via the communication bus 540. The processor 510 can call logic instructions in the memory 530 to execute a high-voltage power-on / off test method, which includes: Based on a preset step graph library and a pre-generated signal library, a test flowchart for high-voltage power-on / off testing is constructed. The test flowchart includes step graph elements from the step graph library and signal operation text from the signal library corresponding to the step graph elements.
[0071] The step type and signal operation text of each node in the test flowchart are parsed, and the test flowchart is converted into a corresponding test step sequence.
[0072] The actuators corresponding to each test step in the test step sequence are called sequentially to complete the high voltage power-on and power-off test.
[0073] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0074] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program that can be stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is able to execute the high-voltage power-on / off testing method provided by the above methods, the method comprising: Based on a preset step graph library and a pre-generated signal library, a test flowchart for high-voltage power-on / off testing is constructed. The test flowchart includes step graph elements from the step graph library and signal operation text from the signal library corresponding to the step graph elements.
[0075] The step type and signal operation text of each node in the test flowchart are parsed, and the test flowchart is converted into a corresponding test step sequence.
[0076] The actuators corresponding to each test step in the test step sequence are called sequentially to complete the high voltage power-on and power-off test.
[0077] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the high-voltage power-on / off testing method provided by the methods described above, the method comprising: Based on a preset step graph library and a pre-generated signal library, a test flowchart for high-voltage power-on / off testing is constructed. The test flowchart includes step graph elements from the step graph library and signal operation text from the signal library corresponding to the step graph elements.
[0078] The step type and signal operation text of each node in the test flowchart are parsed, and the test flowchart is converted into a corresponding test step sequence.
[0079] The actuators corresponding to each test step in the test step sequence are called sequentially to complete the high voltage power-on and power-off test.
[0080] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0081] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for testing high-voltage power-on and power-off states, characterized in that, include: Based on a preset step graph library and a pre-generated signal library, a test flowchart for high voltage power-on and power-off testing is constructed. The test flowchart includes step graph elements from the step graph library and signal operation text from the signal library corresponding to the step graph elements. The step type and signal operation text of each step node in the test flowchart are parsed, and the test flowchart is converted into a corresponding test step sequence. The actuators corresponding to each test step in the test step sequence are called sequentially to complete the high voltage power-on and power-off test.
2. The high-voltage power-on / off testing method according to claim 1, characterized in that, Based on a pre-defined step-by-step graphical library and a pre-generated signal library, a test flowchart for high-voltage power-on / off testing is constructed, including: Draw step nodes of different step types that the user drags and drops in the graphical interface, and edit the signal operation text dragged from the signal library within the step nodes; The connection relationships between the nodes of each step are drawn to obtain the test flowchart of the high voltage power-on / off test.
3. The high-voltage power-on / off testing method according to claim 2, characterized in that, After editing the signal operation text dragged from the signal library within the step node, it also includes: Configure step parameters for the step node, the step parameters including: a step execution time threshold, an expected signal value, and at least one of the judgment conditions.
4. The high-voltage power-on / off testing method according to claim 1, characterized in that, Parse the step type and signal operation text of each node in the test flowchart, and convert the test flowchart into a corresponding test step sequence, including: The instruction format is determined based on the step type of each step node; Extract the execution actions and execution signal objects from the signal operation text corresponding to each step node; Match the action code corresponding to the action to be executed, and the execution signal object is the parameter of the action code; The action code is generated into instruction code according to the corresponding instruction format, and each instruction code corresponds to a test step; Arrange the corresponding instruction codes according to the order of each step node in the test flowchart to generate a test step sequence.
5. The high-voltage power-on / off testing method according to claim 1, characterized in that, Before constructing the test flowchart for high-voltage power-on / off testing based on a preset step graph library and a pre-generated signal library, the following steps are also included: Select the CAN card device type for high voltage power-on / off testing, and configure the CAN channel parameters according to the device type; Import the DBC file corresponding to the CAN card, and extract all signals from the DBC file to form the signal library.
6. The high-voltage power-on / off testing method according to any one of claims 1 to 5, characterized in that, After sequentially calling the actuators corresponding to each test step in the test step sequence to complete the high-voltage power-on / off test, the process also includes: A test report is generated based on the test results of high voltage power-on and power-off. The test report includes at least one of the following: whether the test was successful, the total test time, test log records, and key signal change curves.
7. A high-voltage power-on / off testing device, characterized in that, include: The flowchart construction module is used to construct a test flowchart for high voltage power-on and power-off testing based on a preset step graphic library and a pre-generated signal library. The test flowchart includes step graphic elements from the step graphic library and signal operation text from the signal library corresponding to the step graphic elements. The test step sequence conversion module is used to parse the step type and signal operation text of each step node in the test flowchart and convert the test flowchart into a corresponding test step sequence. The actuator calling module is used to sequentially call the actuators corresponding to each test step in the test step sequence to complete the high voltage power-on and power-off test.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the high-voltage power-on / off test method as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the high-voltage power-on / off test method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the high-voltage power-on / off test method as described in any one of claims 1 to 6.