Electric drive test method, device and system
By directly programming target test equipment and script program instructions, the problem of poor scalability and portability in offline test of the electric drive controller is solved, and efficient testing process and result verification is achieved, which improves testing efficiency.
Patent Information
- Application Number
- CN202410117840.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-26
- Publication Date
- 2025-07-29
AI Technical Summary
In the prior art, the offline test system of the electric drive controller uses graphical programming methods or highly packaged function libraries, resulting in poor scalability and portability, low testing efficiency, and inability to meet the continuous update testing needs.
The target test equipment and script program instructions are directly programmed, replacing the traditional graphical programming architecture and function library, calling the device driver through script program instructions, controlling the test equipment for testing, and verifying the initial results and the expected results.
It improves testing efficiency, enhances the scalability and replicability of the system, simplifies the test process, and meets the needs of offline testing of the electric drive controller.
Smart Images

Figure CN120386649A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data processing, and particularly to a method, device, and system for electric drive testing. Background Art
[0002] With the rapid development trend of the vehicle industry, the functions of the core component, the electric drive controller, are constantly updated and iterated, greatly increasing the demand for off-line testing. Along with the huge delivery pressure, the requirements for the off-line testing process become more stringent, and it is necessary to reduce the testing process under the increasing testing requirements.
[0003] However, in the related art off-line testing systems, most use graphical programming methods or highly encapsulated function libraries, such as LabView. Although the readability is good, the structure is redundant and complex, involving a large number of functional modules, requiring high device resources, resulting in slow execution of the test sequence, unable to meet the off-line testing beat. In the face of continuously updated testing requirements, the graphical programming method or highly encapsulated function library has poor scalability and portability, and cannot effectively optimize the testing beat, with low testing efficiency. Summary of the Invention
[0004] The present disclosure provides a method, device, and system for electric drive testing. Its main purpose is to solve the problem that in the face of continuously updated testing requirements, the graphical programming method or highly encapsulated function library has poor scalability and portability, and cannot effectively optimize the testing beat, with low testing efficiency.
[0005] According to a first aspect of the present disclosure, there is provided a method for electric drive testing, including:
[0006] In response to a script program instruction for testing a target to be detected configured in advance, call a corresponding device driver according to the identification information of the target test device corresponding to the target to be detected, where the script program instruction includes the identification information of the target test device, and the target test device is used to test the target to be detected;
[0007] Control the device driver to turn on the corresponding target test device and test the target to be detected to obtain an initial test result;
[0008] Based on the script program instruction, perform a verification process on the initial test result and the expected test result, and obtain a corresponding electric drive test result based on the verification result, where the expected test result is a desired result for the target to be detected custom-configured in the script program instruction.
[0009] Optionally, before testing the target to be detected to obtain an initial test result, it further includes:
[0010] Based on the script program instructions, determine the first port information of the target to be detected and the second port information of the target test device corresponding to the first port information, where the script program instructions include different first port information and corresponding second port information;
[0011] Connect the circuit between the port corresponding to the first port information and the port corresponding to the second port information.
[0012] Optionally, before responding to the script program instructions for testing the target to be detected pre-configured and calling the corresponding device driver according to the identification information of the target test device corresponding to the target to be detected, it further includes:
[0013] Obtain the initialization script instructions of the target test device corresponding to the target to be detected edited by a preset editing method, where the initialization script instructions include the initialization information for the target test device pre-customized and configured;
[0014] Perform an initialization operation on the target test device according to the initialization information.
[0015] Optionally, before responding to the script program instructions for testing the target to be detected pre-configured and calling the corresponding device driver according to the identification information of the target test device corresponding to the target to be detected, it further includes:
[0016] Obtain the script program instructions for detecting the target to be detected edited by the preset editing method.
[0017] Optionally, the responding to the script program instructions for testing the target to be detected pre-configured and calling the corresponding device driver according to the identification information of the target test device corresponding to the target to be detected includes:
[0018] According to the pre-established corresponding relationship between the identification information of the target test device and the device driver, search for the device driver corresponding to the target test device.
[0019] According to the second aspect of the present disclosure, there is provided a system for electric drive testing, characterized in that it includes: a central controller and a test tooling, and the test tooling includes different test devices for testing the target to be detected;
[0020] The central controller is configured to respond to a script program instruction for testing a target to be detected, and call a corresponding device driver according to the identification information of the target test device corresponding to the target to be detected. The script program instruction includes the identification information of the target test device, and the target test device is used to test the target to be detected;
[0021] The central controller is further configured to control the device driver to activate the corresponding target test device in the test tooling, and test the target to be detected to obtain an initial test result;
[0022] The central controller is further configured to, based on the script program instruction, perform a verification process on the initial test result and an expected test result, and obtain a corresponding electric drive test result based on the verification result. The expected test result is a result expected for the target to be detected and custom-configured in the script program instruction.
[0023] Optionally, the test tooling includes: a digital IO card, a relay box,
[0024] The central controller is further configured to, based on the script program instruction, determine the first port information of the target to be detected and the second port information of the target test device corresponding to the first port information. The script program instruction includes different first port information and corresponding second port information, and transmit the first port information and the second port information to the digital IO card;
[0025] The digital IO card is configured to send the first port information, the second port information, and a circuit control instruction to the relay box;
[0026] The relay box is configured to connect the circuit between the port corresponding to the first port information and the port corresponding to the second port information according to the first port information, the second port information, and the circuit control instruction.
[0027] Optionally, the central controller is further configured to obtain an initialization script instruction of the target test device corresponding to the target to be detected edited by a preset editing method. The initialization script instruction includes initialization information for the target test device that is pre-custom-configured;
[0028] The central controller is further configured to perform an initialization operation on the target test device in the test tooling according to the initialization information.
[0029] Optionally, the central controller is further configured to obtain the script program instruction for detecting the target to be detected edited by the preset editing method.
[0030] Optionally, the central controller is further configured to find the device driver corresponding to the target test device according to the pre-established correspondence between the identification information of the target test device and the device driver.
[0031] According to a third aspect of the present disclosure, there is provided a device for electric drive test, including:
[0032] A calling unit, configured to, in response to a script program instruction for testing a target to be detected that is pre-configured, call a corresponding device driver according to the identification information of the target test device corresponding to the target to be detected, where the script program instruction includes the identification information of the target test device, and the target test device is used to test the target to be detected;
[0033] A control unit, configured to control the device driver to turn on the corresponding target test device;
[0034] A testing unit, configured to test the target to be detected to obtain an initial test result;
[0035] A verification unit, configured to, based on the script program instruction, perform a verification process on the initial test result and an expected test result, and obtain a corresponding electric drive test result based on the verification result, where the expected test result is a result expected for the target to be detected that is custom-configured in the script program instruction.
[0036] Optionally, the device further includes:
[0037] A determination unit, configured to, based on the script program instruction, determine first port information of the target to be detected and second port information of the target test device corresponding to the first port information, where the script program instruction includes different first port information and corresponding second port information;
[0038] A connection unit, configured to connect the circuit between the port corresponding to the first port information and the port corresponding to the second port information.
[0039] Optionally, the device further includes:
[0040] An acquisition unit, configured to, before calling a corresponding device driver according to the identification information of the target test device corresponding to the target to be detected in response to a script program instruction for testing the target to be detected that is pre-configured, acquire an initialization script instruction of the target test device corresponding to the target to be detected edited by a preset editing method, where the initialization script instruction includes initialization information for the target test device that is custom-configured in advance;
[0041] An operation unit for initializing the target test device according to the initialization information.
[0042] Optionally, the obtaining unit is further configured to obtain the script program instructions for detecting the target to be detected edited by the preset editing method.
[0043] Optionally, the calling unit is further configured to find the device driver corresponding to the target test device according to the correspondence between the identification information of the target test device and the device driver established in advance.
[0044] According to a fourth aspect of the present disclosure, there is provided an electronic device, including:
[0045] At least one processor; and
[0046] A memory communicatively connected to the at least one processor; wherein,
[0047] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in the foregoing first aspect.
[0048] According to a fifth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method described in the foregoing first aspect.
[0049] According to a sixth aspect of the present disclosure, there is provided a computer program product including a computer program, and the computer program implements the method described in the foregoing first aspect when executed by a processor.
[0050] The method, device, and system for electric drive testing provided by the present disclosure respond to a script program instruction for testing a target to be detected, call a corresponding device driver according to the identification information of the target test device corresponding to the target to be detected, where the script program instruction includes the identification information of the target test device, and the target test device is used to test the target to be detected; control the device driver to turn on the corresponding target test device, and test the target to be detected to obtain an initial test result; based on the script program instruction, perform a verification process on the initial test result and the expected test result, and obtain a corresponding electric drive test result based on the verification result, where the expected test result is a custom-configured expected result for the target to be detected in the script program instruction. Compared with the related art, the embodiments of the present disclosure replace the traditional graphical programming architecture and function library method by directly programming the target test device and the script program instruction, meet the requirements of the off-line test of the electric drive controller, and have the characteristics of high test efficiency, good scalability, good replicability, and easy use.
[0051] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:
[0053] Figure 1 is a schematic flowchart of a method for electric drive testing provided by an embodiment of the present disclosure;
[0054] Figure 2 is a schematic flowchart of a control loop provided by an embodiment of the present disclosure;
[0055] Figure 3 is a schematic structural diagram of a system for electric drive testing provided by an embodiment of the present disclosure;
[0056] Figure 4 is a schematic structural diagram of a device for electric drive testing provided by an embodiment of the present disclosure;
[0057] Figure 5 is a schematic structural diagram of another device for electric drive testing provided by an embodiment of the present disclosure;
[0058] Figure 6 is a schematic block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0059] The exemplary embodiments of the present disclosure will be described below with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, descriptions of well-known functions and structures are omitted in the following description for clarity and conciseness.
[0060] The method, device, and system for electric drive testing according to the embodiments of the present disclosure will be described below with reference to the accompanying drawings.
[0061] Figure 1 It is a schematic flowchart of a method for electric drive testing provided by an embodiment of the present disclosure.
[0062] As Figure 1 shown, the method includes the following steps:
[0063] Step 101, in response to a script program instruction for testing a target to be detected configured in advance, call a corresponding device driver according to the identification information of the target test device corresponding to the target to be detected. The script program instruction includes the identification information of the target test device, and the target test device is used to test the target to be detected.
[0064] In the embodiment of the present disclosure, the script program instruction is a custom - edited instruction, and the editing methods include but are not limited to: Json language, c++, c language, etc. After the script program instruction is edited, it is parsed by a custom - set script interpreter, and directly calls the device driver to replace the traditional graphical programming architecture. That is, all test instruments are abstracted into each control object, and the object and the corresponding device remote instruction are wrapped using languages such as Json to form a script. The entire test process is completed by arranging the execution order of remote objects in the script. Since all test execution actions are described in the script, the Central Processing Unit (CPU) only needs to interpret the script to complete the entire test process, without the need for multi - layer calls from graphics to function libraries to communication, greatly improving the test speed and realizing high - speed electric drive offline testing.
[0065] Among them, the identification information of the target test device is a unique representation for indicating the identity of the target test device, that is, the identity document number (Identity document, ID). The target test device is an instrument for testing the target to be detected, such as: low - voltage power supply, oscilloscope, digital multimeter, digital IO card, etc.
[0066] Step 102: Control the device driver to turn on the corresponding target test device, and test the target to be detected to obtain an initial test result.
[0067] In the embodiments of the present disclosure, the connection manner between the device driver and the corresponding target test device includes but is not limited to: wireless connection, wired physical connection, etc. Among them, the device driver exists in the CPU. For example, it is connected to the CPU through the physical connection line of each target test device, and the CPU can remotely access the corresponding test instrument through the corresponding device driver. At the same time, all the target test devices are configured in the test fixture.
[0068] Step 103: Based on the script program instructions, verify the initial test result with the expected test result, and obtain the corresponding electric drive test result based on the verification result. The expected test result is the expected result for the target to be detected custom-configured in the script program instructions.
[0069] In the embodiments of the present disclosure, the verification process includes but is not limited to: comparison process, calculation process, etc. The expected test result is a custom-set result. For example, the script program instructions are:
[0070]
[0071]
[0072] Among them, the content in "Expectation" represents the expected object, "Target" represents the test expectation, "Operator": 4 represents the expected logical processing method (for example: the range is left-closed and right-open), the content in "Value" represents the range (greater than or equal to the minimum value of 1.23 and less than the maximum value of 4.56), the content in "Source" represents the target to be detected, "Analysis": 1 means that the test method for the target to be detected is to collect the maximum value of the target test device's test on the target to be detected, and the content in "RemoteCmd" represents the target test device and the instructions executed on the target test device. Among them, "ClientName": "Multimeter" means that the name of the target test device is a digital multimeter, "Type": "r" means reading the value of the digital multimeter, and "Cmd": "READ?\n" means the instrument reading command.
[0073] For ease of understanding, embodiments of the present disclosure provide an example for illustration: If the voltage of the target to be detected is required, the expected test result is a voltage of 12V - 24V, and the initial test result is a voltage of 20V. At this time, since the initial test result is within the range of the expected test result, the electric drive test result is that the voltage is qualified, the voltage conforms to the specification, etc.; If the voltage of the target to be detected is required, the expected test result is a voltage of 12V - 24V, and the initial test result is a voltage of 28V. At this time, since the initial test result is not within the range of the expected test result, the electric drive test result is that the voltage is unqualified, the voltage does not conform to the specification, etc. Among them, the form and content of the electric drive test result can be determined according to the actual test situation, and the embodiments of the present disclosure do not limit it.
[0074] It should be noted here that in the overall electric drive test process, it includes three major parts: Pre_Cond, Steps, and Expectation. Among them, Pre_Cond represents the preset conditions for the test, initializing the tooling before the test, that is, the corresponding initialization script instructions; Steps represents the specific test steps, that is, the corresponding control instructions, and Expectation describes the test expectation, verifying the test value collected in the test and the expected value of the test, that is, the expected test result. Specifically, as shown in the following script program instructions:
[0075]
[0076] By defining these three parts of "Pre_Cond", "Steps", and "Expectation", the specific test process can be described, and the specific content of each part is described using remote objects or local objects. Taking remote objects as an example: As shown in the following script program instructions:
[0077]
[0078] Among them, "Type": "w" means writing to the digital multimeter, and "Cmd": "*RST\n" means the reset instruction of the digital multimeter.
[0079] This part describes controlling a remote object: the digital multimeter, and sending a reset command ("Cmd": "*RST\n") to it through its driver. Therefore, if you want to read data from the instrument later, you only need to change Type to r and Cmd to the corresponding read command. The above realizes the sending and collection of data.
[0080] The method for electric drive testing provided by the present disclosure responds to the script program instructions of the target test device corresponding to the target to be detected, calls the corresponding device driver according to the identification information of the target test device, and the script program instructions include the identification information of the target test device, and the target test device is used to test the target to be detected; controls the device driver to turn on the corresponding target test device, and tests the target to be detected to obtain an initial test result; performs a verification process on the initial test result and the expected test result, and obtains a corresponding electric drive test result based on the verification result, and the expected test result is a pre-customized expected result for the target to be detected. Compared with the related art, the embodiment of the present disclosure replaces the traditional graphical programming architecture and function library method by directly programming the target test device and the script program instructions, meets the requirements of the off-line test of the electric drive controller, and has the characteristics of high test efficiency, good scalability, good replicability, and easy use.
[0081] In an implementable manner of the embodiment of the present disclosure, before testing the target to be detected, it is necessary to connect the circuit loop between the target test device and the target to be detected, so as to smoothly complete the test of the target to be detected. Therefore, in order to control the on / off of the circuit loop between the target test device and the target to be detected and accurately test the target to be detected, the embodiment of the present disclosure provides a schematic flow diagram of a control loop, as Figure 2 shown, including:
[0082] Step 201, based on the script program instructions, determine the first port information of the target to be detected and the second port information of the target test device corresponding to the first port information, where the script program instructions include different first port information and corresponding second port information.
[0083] In the embodiment of the present disclosure, the second port information includes but is not limited to: the name of the target test device, the port number of the target test device, the signal corresponding to each port of the target test device, etc., and the first port information includes but is not limited to: the port number of the target to be detected, etc., and can also represent the position to be detected by the probe of the target test device, as shown in Table 1,
[0084] Table 1
[0085]
[0086] Among them, the device for controlling the on / off of the control loop is a digital IO card. Serial number: PCI-7444-DO0 indicates that the name of the target test device of the digital IO card is PCI-7444 (board 7444). The programmer connector and the PCBA test point: The description is which Port (point position) on the PCI-7444. Signal: Which path on the described Port. Test point 1 and test point 2 (target points to be detected) respectively correspond to which probe of which test instrument at the other end. The specific command format is shown in the following script program instructions:
[0087]
[0088] Step 202: Connect the circuit between the port corresponding to the first port information and the port corresponding to the second port information.
[0089] In the embodiment of the present disclosure, the preset relay device is a device selected by custom, such as a relay box, etc. For the hardware loop, the relay box is operated by controlling the digital IO card, so as to control which loop each probe of the instrument is specifically connected to. As shown in Table 1, according to the port definitions of the board and the relay box, one end of the relay box is connected to the test point of each path of the target to be detected, and the other end is connected to the probes of all target test devices. By controlling the opening and closing of the relay box through the digital IO card, the on / off of the circuit loop between the target test device and the target to be detected is realized.
[0090] In an implementable manner of the embodiment of the present disclosure, it is necessary to initialize the target test device to reduce errors during testing. Therefore, in order to improve the accuracy of the electric drive detection, the following methods can also be used but are not limited to: Obtain the initialization script instruction of the target test device corresponding to the target to be detected edited by a preset editing method. The initialization script instruction includes the initialization information customized in advance for the target test device; According to the initialization information, perform an initialization operation on the target test device.
[0091] In the embodiment of the present disclosure, the preset editing method is an editing method selected by custom, such as Json language, c++, c language, etc. The initialization information includes the instruction of the target value to be achieved by the target test device. For example, when the target test device is a digital multimeter, the initialization information includes an instruction to reset the digital multimeter, that is, an instruction to zero the value of the digital multimeter. Specifically, the content of the initialization information and the preset editing method can be determined according to the actual situation, and the embodiment of the present disclosure does not limit them.
[0092] In an implementable manner of the embodiments of the present disclosure, the script program instruction is a custom - edited instruction, and the editing methods include but are not limited to: Json language, c++, c language, etc. Therefore, before performing the electric drive test, it is necessary to first write the corresponding script file. In order to complete the electric drive test, the following methods can also be used but are not limited to: obtaining the script program instruction for detecting the target to be detected edited by the preset editing method.
[0093] In an implementable manner of the embodiments of the present disclosure, it is necessary to establish the corresponding relationship between the target test device and the device driver in advance before the corresponding device driver can be called. Therefore, in order to successfully call the device driver, the following methods can also be used but are not limited to: searching for the device driver corresponding to the target test device according to the corresponding relationship between the identification information of the target test device and the device driver established in advance.
[0094] Corresponding to the above - mentioned method of electric drive test, Figure 3 is a schematic structural diagram of a system for electric drive test provided by the embodiments of the present disclosure. As Figure 3 shown, it includes: a central controller and a test fixture. The test fixture includes different test devices for testing the target to be detected;
[0095] The central controller is configured to respond to the script program instruction for testing the target to be detected configured in advance, call the corresponding device driver according to the identification information of the target test device corresponding to the target to be detected. The script program instruction includes the identification information of the target test device, and the target test device is used to test the target to be detected;
[0096] The central controller is further configured to control the device driver to turn on the corresponding target test device in the test fixture and test the target to be detected to obtain an initial test result;
[0097] The central controller is further configured to, based on the script program instruction, perform a verification process on the initial test result and the expected test result, and obtain the corresponding electric drive test result based on the verification result. The expected test result is the expected result for the target to be detected custom - configured in the script program instruction.
[0098] It should be noted that, Figure 3The industrial control computer in the middle, i.e., the CPU (Central Controller), is a Linux system device that has been trimmed and only includes the essential functions of the system, such as the drivers for each instrument, etc.; the test fixture also includes an instrument driver set, which means that it is connected to the CPU through the physical connection lines of each corresponding instrument, and the CPU can remotely access the corresponding test instrument through the corresponding driver; the test instrument group is a set of test instruments assembled in a cabinet, such as a low-voltage power supply, an oscilloscope, a digital multimeter, a digital IO card, etc.; the integrated harness at the instrument end is a harness that integrates the input and output lines of each test instrument, such as the positive and negative output poles of the low-voltage power supply, the probes of the digital multimeter, the probes of the oscilloscope, etc.; the relay box receives the DO output of the digital IO card and realizes the on-off control of the circuits of the integrated harness at the instrument end and the integrated harness at the product end; the integrated harness at the product end makes the test pins led out from the test fixture of the product to be tested into an integrated harness; the electric drive control board that is taken off the line is placed inside the test fixture of the product to be tested and is responsible for leading out each test point on the electric drive controller board; the script interpreter in the CPU is responsible for functions such as the management, operation, and reporting of the script.
[0099] In an implementable manner of the embodiment of the present disclosure, the test fixture includes: a digital IO card, a relay box,
[0100] The central controller is further configured to, based on the script program instruction, determine the first port information of the to-be-detected target and the second port information of the target test device corresponding to the first port information, where the script program instruction includes different first port information and corresponding second port information, and transmit the first port information and the second port information to the digital IO card;
[0101] The digital IO card is configured to send the first port information, the second port information, and a circuit control instruction to the relay box;
[0102] The relay box is configured to connect the circuit between the port corresponding to the first port information and the port corresponding to the second port information according to the first port information, the second port information, and the circuit control instruction.
[0103] In an implementable manner of the embodiment of the present disclosure, the central controller is further configured to obtain the initialization script instruction of the target test device corresponding to the to-be-detected target edited by a preset editing method, where the initialization script instruction includes the initialization information customized in advance for the target test device;
[0104] The central controller is further configured to perform an initialization operation on the target test device in the test fixture according to the initialization information.
[0105] In one implementable manner of the embodiments of the present disclosure, the central controller is further configured to obtain the script program instructions for detecting the target to be detected edited by the preset editing method.
[0106] In one implementable manner of the embodiments of the present disclosure, the central controller is further configured to find the device driver corresponding to the target test device according to the correspondence between the identification information of the target test device and the device driver established in advance.
[0107] In summary, the embodiments of the present disclosure can achieve the following effects:
[0108] The embodiments of the present disclosure replace the traditional graphical programming architecture and function library method by directly programming the target test device and the script program instructions, meet the requirements of the off-line test of the electric drive controller, and have the characteristics of high test efficiency, good scalability, good replicability, and easy use.
[0109] Corresponding to the above method for electric drive testing, the present invention also provides a device for electric drive testing. Since the device embodiments of the present invention correspond to the above method embodiments, details not disclosed in the device embodiments can be referred to the above method embodiments, and will not be elaborated in the present invention.
[0110] Figure 4 FIG. is a schematic structural diagram of a device for electric drive testing provided by an embodiment of the present disclosure, as Figure 4 shown, including:
[0111] A calling unit 41, configured to respond to the script program instructions for testing the target to be detected, and call the corresponding device driver according to the identification information of the target test device corresponding to the target to be detected, where the script program instructions include the identification information of the target test device, and the target test device is used to test the target to be detected;
[0112] A control unit 42, configured to control the device driver to turn on the corresponding target test device;
[0113] A testing unit 43, configured to test the target to be detected to obtain an initial test result;
[0114] A verification unit 44, configured to verify the initial test result and the expected test result based on the script program instructions, and obtain the corresponding electric drive test result based on the verification result, where the expected test result is the expected result for the target to be detected custom-configured in the script program instructions.
[0115] The device for electric drive testing provided by the present disclosure responds to a script program instruction for testing a target to be detected, and calls a corresponding device driver according to the identification information of the target test device corresponding to the target to be detected. The script program instruction includes the identification information of the target test device, and the target test device is used to test the target to be detected. Control the device driver to turn on the corresponding target test device and test the target to be detected to obtain an initial test result. Based on the script program instruction, perform a verification process on the initial test result and the expected test result, and obtain a corresponding electric drive test result based on the verification result. The expected test result is a custom-configured expected result for the target to be detected in the script program instruction. Compared with the related art, the embodiment of the present disclosure replaces the traditional graphical programming architecture and function library method by directly programming the target test device and the script program instruction, meets the requirements of the off-line test of the electric drive controller, and has the characteristics of high test efficiency, good scalability, good replicability, and easy use.
[0116] Further, in a possible implementation manner of the embodiment of the present disclosure, as Figure 5 shown, the device further includes:
[0117] A determination unit 45, configured to determine, based on the script program instruction, the first port information of the target to be detected and the second port information of the target test device corresponding to the first port information, where the script program instruction includes different first port information and corresponding second port information;
[0118] A connection unit 46, configured to connect the circuit between the port corresponding to the first port information and the port corresponding to the second port information.
[0119] Further, in a possible implementation manner of the embodiment of the present disclosure, as Figure 5 shown, the device further includes:
[0120] An acquisition unit 47, configured to obtain an initialization script instruction of the target test device corresponding to the target to be detected edited by a preset editing method before the calling unit 41 responds to a script program instruction for testing the target to be detected and calls a corresponding device driver according to the identification information of the target test device corresponding to the target to be detected. The initialization script instruction includes initialization information for the target test device that is pre-customized and configured;
[0121] An operation unit 48, configured to perform an initialization operation on the target test device according to the initialization information.
[0122] Further, in a possible implementation manner of the embodiments of the present disclosure, the obtaining unit 47 is further configured to obtain the script program instructions for detecting the target to be detected, which are edited by the preset editing method.
[0123] Further, in a possible implementation manner of the embodiments of the present disclosure, the calling unit 41 is further configured to find the device driver corresponding to the target test device according to the corresponding relationship between the identification information of the target test device and the device driver established in advance.
[0124] It should be noted that the foregoing explanations of the method embodiments also apply to the devices of the embodiments of the present disclosure. The principles are the same and will not be limited in the embodiments of the present disclosure.
[0125] According to the embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0126] Figure 6 FIG. shows a schematic block diagram of an exemplary electronic device 600 that can be used to implement the embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as, for example, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, for example, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely exemplary and are not intended to limit the implementations of the present disclosure described and / or claimed herein.
[0127] As Figure 6 shown, the device 600 includes a computing unit 601, which can execute various appropriate actions and processes according to the computer program stored in the ROM (Read-Only Memory) 602 or the computer program loaded from the storage unit 608 into the RAM (Random Access Memory) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. The I / O (Input / Output) interface 605 is also connected to the bus 604.
[0128] Multiple components in device 600 are connected to I / O interface 605, including: input unit 606, such as a keyboard, mouse, etc.; output unit 607, such as various types of displays, speakers, etc.; storage unit 608, such as a disk, optical disc, etc.; and communication unit 609, such as a network card, modem, wireless communication transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0129] Computing unit 601 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, CPU (Central Processing Unit), GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSP (Digital Signal Processor), and any suitable processor, controller, microcontroller, etc. Computing unit 601 executes the various methods and processes described above, such as the method of electric drive test. For example, in some embodiments, the method of electric drive test can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed onto device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by computing unit 601, one or more steps of the method described above can be executed. Alternatively, in other embodiments, computing unit 601 can be configured to execute the aforementioned method of electric drive test by any other suitable means (e.g., by means of firmware).
[0130] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System On Chip), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.
[0131] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that the program codes, when executed by the processor or controller, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0132] In the context of this disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a RAM, a ROM, an EPROM (Electrically Programmable Read-Only Memory), or a flash memory, an optical fiber, a CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0133] To provide for interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide for interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0134] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a LAN (Local Area Network), a WAN (Wide Area Network), the Internet, and a blockchain network.
[0135] A computer system may include a client and a server. The client and the server are generally far from each other and usually interact through a communication network. The client-server relationship is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system or a server combined with a blockchain.
[0136] Among them, it should be noted that artificial intelligence is a discipline that studies enabling a computer to simulate certain thinking processes and intelligent behaviors of humans (such as learning, reasoning, thinking, planning, etc.), and there are both hardware-level technologies and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include several major directions such as computer vision technology, speech recognition technology, natural language processing technology, and machine learning / deep learning, big data processing technology, and knowledge graph technology.
[0137] It should be understood that various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and no limitation is imposed herein.
[0138] The above specific implementation manners do not constitute a limitation on the protection scope of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of this disclosure shall be included within the protection scope of this disclosure.
Claims
1. A method for electric drive testing, characterized in that, Including: In response to a pre-configured script program instruction for testing a target to be detected, call a corresponding device driver according to the identification information of the target test device corresponding to the target to be detected. The script program instruction includes the identification information of the target test device, and the target test device is used to test the target to be detected; Control the device driver to turn on the corresponding target test device and test the target to be detected to obtain an initial test result; Based on the script program instruction, perform a verification process on the initial test result and the expected test result, and obtain a corresponding electric drive test result based on the verification result. The expected test result is a custom-configured expected result for the target to be detected in the script program instruction.
2. The method according to claim 1, wherein Before testing the target to be detected to obtain an initial test result, it further includes: Based on the script program instruction, determine the first port information of the target to be detected and the second port information of the target test device corresponding to the first port information. The script program instruction includes different first port information and corresponding second port information; Connect the circuit between the port corresponding to the first port information and the port corresponding to the second port information.
3. The method according to claim 1, characterized in that, Before responding to a pre-configured script program instruction for testing a target to be detected and calling a corresponding device driver according to the identification information of the target test device corresponding to the target to be detected, it further includes: Obtain an initialization script instruction of the target test device corresponding to the target to be detected edited by a preset editing method. The initialization script instruction includes pre-customized initialization information for the target test device; Perform an initialization operation on the target test device according to the initialization information.
4. The method according to claim 1, wherein Before responding to a pre-configured script program instruction for testing a target to be detected and calling a corresponding device driver according to the identification information of the target test device corresponding to the target to be detected, it further includes: Obtain the script program instruction for detecting the target to be detected edited by the preset editing method.
5. The method according to claim 1, characterized in that The step of responding to a pre-configured script program instruction for testing a target to be detected and calling a corresponding device driver according to the identification information of the target test device corresponding to the target to be detected includes: According to the pre-established correspondence between the identification information of the target test device and the device driver, search for the device driver corresponding to the target test device.
6. A system for electric drive testing, characterized in that, Including: A central controller and a test fixture. The test fixture includes different test devices for testing the target to be detected; The central controller is configured to respond to a pre-configured script program instruction for testing a target to be detected, and call a corresponding device driver according to the identification information of the target test device corresponding to the target to be detected. The script program instruction includes the identification information of the target test device, and the target test device is used to test the target to be detected; The central controller is further configured to control the device driver to start the corresponding target test device in the test fixture, and to test the target to be detected to obtain an initial test result; The central controller is also used to verify the initial test results and the expected test results based on the script program instructions, and obtain the corresponding electric drive test results based on the verification results. The expected test results are the expected results for the target to be detected that are customized in the script program instructions.
7. The system according to claim 6, characterized in that The test tooling includes: digital IO card, relay box, The central controller is further configured to determine, based on the script program instructions, first port information of the target to be detected and second port information of the target test device corresponding to the first port information, wherein the script program instructions include different first port information and corresponding second port information, and transmit the first port information and the second port information to the digital IO card; The digital IO card is used to send the first port information, the second port information and the circuit control instruction to the relay box; The relay box is used to connect the circuit between the port corresponding to the first port information and the port corresponding to the second port information according to the first port information, the second port information and the circuit control instruction.
8. The system according to claim 6, wherein The central controller is further configured to obtain an initialization script instruction for the target test device corresponding to the target to be detected edited by a preset editing method, wherein the initialization script instruction includes pre-customized initialization information for the target test device; The central controller is further configured to perform an initialization operation on a target test device in the test fixture according to the initialization information.
9. The system according to claim 6, characterized in that The central controller is further configured to obtain the script program instructions for detecting the target to be detected that are edited using the preset editing method.
10. The system according to claim 6, wherein The central controller is further configured to search for the device driver corresponding to the target test device according to a pre-established correspondence between the identification information of the target test device and the device driver.
11. An electric drive test device, characterized in that, include: a calling unit, configured to call a corresponding device driver in response to a pre-configured script program instruction for testing a target to be detected, according to identification information of a target test device corresponding to the target to be detected, wherein the script program instruction includes identification information of the target test device, and the target test device is used to test the target to be detected; A control unit, configured to control the device driver to start the corresponding target test device; A testing unit, configured to test the target to be detected and obtain an initial test result; A verification unit is used to verify the initial test result and the expected test result based on the script program instruction, and obtain the corresponding electric drive test result based on the verification result. The expected test result is the expected result for the target to be detected that is customized in the script program instruction.