Test method and system of vehicle-mounted equipment, electronic equipment and storage medium
By using the power controller to connect the serial communication port of the test equipment in the on-board equipment test, the automated power-on and power-off test of the on-board equipment is realized, solving the problem of manual operation of existing tests and improving the degree of automation and efficiency of the test.
Patent Information
- Application Number
- CN202411963791.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-22
AI Technical Summary
The test process of existing vehicle-mounted equipment requires manual repetitive operation, and the test time is limited and cannot be carried out day and night.
By connecting the test equipment to the serial communication port of the power controller, the power controller relay is used to realize the automatic power-on and power-off test of the vehicle-mounted equipment. The test equipment obtains the test parameters input by the user through the interface, generates the power controller signal, controls the power controller to switch the relay status, and realizes automated testing.
It improves the automation of on-board equipment testing, reduces the burden of manual operation, realizes uninterrupted testing day and night, and significantly reduces the problem of manual time control.
Smart Images

Figure CN119861685A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a testing method, system, electronic device and storage medium for vehicle-mounted equipment. Background Art
[0002] With the rapid development of the automotive industry and technological progress, the demand for vehicle-mounted equipment is growing. Existing power controllers play an important role in processing the power-on and power-off of the vehicle host test bench, system testing, and high-voltage power-off memory function testing. In the existing testing process, manual repetitive operations are often required, and the testing time is limited, making it impossible to test continuously day and night. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a testing method, system, electronic device and storage medium for vehicle-mounted equipment, so as to improve the degree of automation of vehicle-mounted equipment testing and reduce the manual burden.
[0004] In a first aspect, the present invention provides a method for testing an on-vehicle device, which is applicable to the test device, wherein a relay of a power controller is connected between a simulated power supply and the on-vehicle device to be tested, and a communication port of the power controller is connected to a serial communication port of the test device, and the method comprises:
[0005] Determine a current serial communication port list, the serial communication port list includes at least one serial communication port identifier, and the serial communication port is a serial communication port in a connected state on the test device;
[0006] Obtaining the target serial communication port identifier, test date, test round, and test time interval edited by the user through the test interface, wherein the test time interval is used to indicate the time interval between powering on and powering off the vehicle power supply in each round of testing, and the target serial communication port identifier is one of the serial communication port lists;
[0007] In response to the test signal sent by the user through the test interface, when the test date arrives, a power controller signal is generated based on the test rounds and test time intervals, and sent to the power controller through the target serial communication port, so that the power controller controls the connected vehicle-mounted equipment to power on or off.
[0008] In an optional implementation manner, before the step of generating a power controller signal, the method further includes:
[0009] Determine whether a test condition is met according to the connection status of the target serial communication port;
[0010] If yes, then the step of generating a power controller signal is performed;
[0011] If not, the test is stopped and a prompt message is generated and displayed.
[0012] In an optional implementation, the step of generating a power controller signal based on the test round and the test time interval specifically includes:
[0013] Perform the following steps at a preset frequency:
[0014] Determine the current round T=n, where n is the test round edited by the user;
[0015] Generate a first power controller signal and send it to the power controller through the target serial communication port, so that the power controller controls the connected vehicle-mounted device to power on and counts time through the counter;
[0016] Determine whether the time recorded by the counter is equal to the test time interval;
[0017] If yes, a second power controller signal is generated and sent to the power controller through the target serial communication port, so that the power controller controls the connected vehicle-mounted device to power off;
[0018] Subtract 1 from the current round T and determine whether T is 0;
[0019] If yes, the test is concluded, if not, the next cycle is awaited.
[0020] In an optional embodiment, the power controller switches the working state of its relay according to the received power controller signal to power on or off the connected vehicle-mounted device; and
[0021] Obtaining a relay feedback signal generated by the power controller to determine whether a power-on or power-off step is successfully executed based on the relay feedback signal;
[0022] If not, the test is stopped and a prompt message is generated and displayed.
[0023] In an optional implementation, after each round of testing is completed, the test time and test results are recorded, and the test time and test results are associated and stored locally.
[0024] In an optional embodiment, the test interface includes a serial communication port control, a test round control, a test time interval control, and a test date control.
[0025] In response to a trigger operation on a serial communication port control, a serial communication port list is displayed;
[0026] In response to a selection operation on a serial communication port identifier in the serial communication port list, determining a serial communication port identifier;
[0027] In response to an input operation on a test round control, a test round is determined;
[0028] In response to an input operation on a test time interval control, determining a test time interval;
[0029] In response to a click operation on a test date control, a test date is determined.
[0030] In a second aspect, the present invention provides a vehicle-mounted device testing system, the system comprising a testing device, a power supply controller, and a simulation power supply;
[0031] The relay of the power controller is connected between the simulated power supply and the vehicle-mounted device to be tested. The power controller is used to switch the working state of the relay based on the power controller signal sent by the test device to power on or off the connected vehicle-mounted device;
[0032] The test device is used to obtain the target serial communication port identifier, test date, test round and test time interval edited by the user through the test interface, respond to the test signal sent by the user through the test interface, and when the test date is reached, generate a power controller signal based on the test round and test time interval, and send it to the power controller through the target serial communication port.
[0033] In an optional embodiment, the test device is used to perform the following steps at a preset frequency:
[0034] Determine the current round T=n, where n is the test round edited by the user;
[0035] Generate a first power controller signal and send it to the power controller through the target serial communication port, so that the power controller controls the connected vehicle-mounted device to power on and counts time through the counter;
[0036] Determine whether the time recorded by the counter is equal to the test time interval;
[0037] If yes, a second power controller signal is generated and sent to the power controller through the target serial communication port, so that the power controller controls the connected vehicle-mounted device to power off;
[0038] Subtract 1 from the current round T and determine whether T is 0;
[0039] If yes, the test is concluded, if not, the next cycle is awaited.
[0040] In a third aspect, the present invention provides an electronic device comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate through the bus, and the processor executes the machine-readable instructions to perform the steps of the testing method of the vehicle-mounted equipment in any of the aforementioned embodiments.
[0041] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for testing a vehicle-mounted device in any of the aforementioned embodiments are executed.
[0042] The present application provides a testing method, system, electronic device and storage medium for vehicle-mounted equipment, wherein a relay of a power controller is connected between a simulated power supply and a vehicle-mounted equipment to be tested, and a communication port of the power controller is connected to a serial communication port of the test equipment. The method comprises determining a current serial communication port list, wherein the serial communication port list comprises at least one serial communication port identifier, and the serial communication port is a serial communication port in a connected state on the test equipment; obtaining a target serial communication port identifier, a test date, a test round and a test time interval edited by a user through a test interface, wherein the test time interval is used to indicate the time interval between powering on and powering off the vehicle-mounted power supply in each round of testing, and the target serial communication port identifier is one of the serial communication port list; responding to a test signal sent by the user through the test interface, when the test date is reached, generating a power controller signal based on the test round and the test time interval, and sending the signal to the power controller through the target serial communication port, so that the power controller controls the vehicle-mounted equipment connected thereto to power on or off. It provides a software process for automated power-on and power-off testing, which improves the automation level of vehicle-mounted equipment testing and reduces the manual burden. It can run uninterruptedly day and night, greatly reducing the repetitive work of manual operations. It powers on and off at fixed times, significantly reducing the problem of manual time control and providing convenience for testers. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 A structural diagram of a vehicle-mounted equipment testing system provided in an embodiment of the present application;
[0045] Figure 2 A schematic diagram of a test interface provided in an embodiment of the present application;
[0046] Figure 3 A flowchart of the execution of a test software provided in an embodiment of the present application;
[0047] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0049] Embodiment 1
[0050] Figure 1 The structure diagram of a vehicle-mounted device test system provided in an embodiment of the present application, wherein the system includes a test device, a power controller, and a simulation power supply.
[0051] The relay of the power controller is connected between the simulated power supply and the vehicle-mounted device to be tested.
[0052] The power controller is used to switch the working state of the relay based on the power controller signal sent by the test equipment to power on or off the connected vehicle equipment.
[0053] The test device is used to obtain the target serial communication port identifier, test date, test round and test time interval edited by the user through the test interface, respond to the test signal sent by the user through the test interface, and when the test date is reached, generate a power controller signal based on the test round and test time interval, and send it to the power controller through the target serial communication port.
[0054] In a specific embodiment, the test device may be a host computer / computer, the power controller may be a DAM0404D relay control board, and the analog power supply may be a vehicle-mounted power supply for testing.
[0055] In this embodiment, a test software suitable for a test device is provided, a control interface is created based on the qtpydsigner visual framework tool of Python, and hardware devices connected to the test device are dynamically captured.
[0056] Figure 2 A schematic diagram of a test interface provided in an embodiment of the present application. Figure 2 As shown, the test interface includes a serial communication port control, a test round control, a test time interval control, and a test date control. The test device can be used for:
[0057] In response to a trigger action on a serial communication port control, a list of serial communication ports is displayed.
[0058] In response to a selection operation on a serial communication port identifier in the serial communication port list, a serial communication port identifier is determined.
[0059] The serial communication port control here can be a drop-down list box. Its drop-down list will display the corresponding identifiers of all captured serial communication ports, such as com1, com2, etc. The user needs to select the serial communication port according to the actual connection situation.
[0060] After starting, the test software will monitor the connection status of the serial communication port and determine the current serial communication port list. The serial communication port list includes at least one serial communication port identifier, and the serial communication port is a serial communication port in a connected state on the test device.
[0061] In response to an input operation on a test round control, a test round is determined.
[0062] In response to an input operation on the test time interval control, a test time interval is determined.
[0063] The test round control and test time interval control here can be an input box or a drop-down list box, etc.
[0064] The user can enter the specified test rounds and test time intervals according to the test requirements. The test rounds are the number of times the vehicle-mounted device to be tested completes the entire power-on and power-off process test. The test time interval is used to indicate the time interval between powering on and powering off the vehicle power supply in each test round.
[0065] In response to a click operation on a test date control, a test date is determined.
[0066] The test date control here can be in the form of an editable calendar control, which is used to select a specific time for the test. The test date here can include units such as year, month, day, week, hour, minute, and second.
[0067] The test interface also includes a run control. After the user edits the above information, he can click the run control to start the test task. The run control here can display the word "Start" and the word "Pause" after the test starts. The user can pause the corresponding test task by clicking again.
[0068] The test interface also includes a test result display area. After each round of testing, the software will record the test time and test results, and store the test time and test results in a local file. The test results can be displayed in real time in the test result display area, and a query interface can also be provided for users to query and export historical test results.
[0069] The following takes a test task as an example to explain the steps of executing the test software. Figure 3 As shown, the test equipment is used to perform the following steps when running the test software:
[0070] S100, responding to a test signal sent by a user through a test interface.
[0071] S101. Determine whether a test condition is met according to a connection status of a target serial communication port.
[0072] S102: If not, stop the test, generate and display a prompt message.
[0073] Avoid checking whether the target serial communication port is correctly connected. If it is disconnected, a prompt message can be generated and displayed through a pop-up window.
[0074] If so, when the test date arrives, the step of generating a power controller signal based on the test rounds and test time intervals is executed, and sending the signal to the power controller through the target serial communication port so that the power controller controls the connected vehicle-mounted device to power on or off.
[0075] Specifically, each round of testing includes the following steps:
[0076] S103: Determine the current round T=n, where n is the test round edited by the user.
[0077] S104: Generate a first power controller signal and send it to the power controller through the target serial communication port, so that the power controller controls the connected vehicle-mounted device to power on and performs timing through a counter.
[0078] S105: Determine whether the time recorded by the counter is equal to the test time interval.
[0079] S106: If yes, generate a second power controller signal and send it to the power controller through the target serial communication port, so that the power controller controls the connected vehicle-mounted device to power off.
[0080] S107: Subtract 1 from the current round T, and determine whether T is 0.
[0081] S108: If yes, then determine that the test is finished. If no, then wait for the next cycle.
[0082] Further, the power controller switches the working state of its relay according to the received power controller signal, so as to power on or off the vehicle-mounted device connected thereto; and
[0083] After step S104 and after step S106, a relay feedback signal generated by the power supply controller can also be obtained to determine whether the power-on or power-off step is successfully executed based on the relay feedback signal. If not, the test is stopped, and a prompt message is generated and displayed. If yes, the next step is continued.
[0084] The relay feedback signal is used to indicate whether the relay working state is switched successfully. If it fails, a prompt message needs to be generated and displayed through a pop-up window.
[0085] By providing a software process for automated power-on and power-off testing, the automation level of vehicle-mounted equipment testing is improved, and the manual burden is reduced. It can run uninterruptedly day and night, greatly reducing the repetitive work of manual operations. Powering on and off at fixed times significantly reduces the problem of manual time control, providing convenience for testers.
[0086] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown in , the electronic device 400 includes a processor 410 , a memory 420 and a bus 430 .
[0087] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 communicates with the memory 420 through the bus 430. When the machine-readable instructions are executed by the processor 410, the steps of a vehicle-mounted equipment testing method in the above-mentioned method embodiment can be executed. The specific implementation method can be found in the method embodiment, which will not be repeated here.
[0088] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a testing method for a vehicle-mounted device in the above-mentioned method embodiment can be executed. The specific implementation method can be found in the method embodiment, which will not be repeated here.
[0089] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0090] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0091] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0092] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0093] It should be noted that if the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes a number of signals to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM) random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0094] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0095] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for testing a vehicle-mounted device, characterized in that: Applicable to the test equipment, the relay of the power controller is connected between the simulated power supply and the vehicle-mounted equipment to be tested, the communication port of the power controller is connected to the serial communication port of the test equipment, and the method includes: Determine a current serial communication port list, wherein the serial communication port list includes at least one serial communication port identifier, and the serial communication port is a serial communication port in a connected state on the test device; Obtaining, through the test interface, the target serial communication port identifier, test date, test round, and test time interval edited by the user, wherein the test time interval is used to indicate the time interval between powering on and powering off the vehicle power supply in each round of testing, and the target serial communication port identifier is one of the serial communication port list; In response to a test signal sent by the user through the test interface, when the test date arrives, a power controller signal is generated based on the test rounds and test time intervals, and sent to the power controller through the target serial communication port, so that the power controller controls the connected vehicle-mounted equipment to power on or off.
2. The method according to claim 1, characterized in that Before the step of generating a power controller signal, the step further includes: Determine whether a test condition is met according to the connection status of the target serial communication port; If yes, then the step of generating a power controller signal is performed; If not, the test is stopped and a prompt message is generated and displayed.
3. The method according to claim 1, characterized in that: The step of generating a power controller signal based on the test rounds and the test time intervals specifically includes: Perform the following steps at a preset frequency: Determine the current round T=n, where n is the test round edited by the user; Generate a first power controller signal and send it to the power controller through the target serial communication port, so that the power controller controls the connected vehicle-mounted device to power on and counts time through the counter; determining whether the time recorded by the counter is equal to the test time interval; If yes, a second power controller signal is generated and sent to the power controller through the target serial communication port, so that the power controller controls the connected vehicle-mounted device to power off; Subtract 1 from the current round T and determine whether T is 0; If yes, the test is concluded, if not, the next cycle is awaited.
4. The method according to claim 3, characterized in that The power controller switches the working state of its relay according to the received power controller signal to power on or off the connected vehicle-mounted device; and Obtaining a relay feedback signal generated by a power supply controller to determine whether a power-on or power-off step is successfully executed based on the relay feedback signal; If not, the test is stopped and a prompt message is generated and displayed.
5. The method according to claim 3, characterized in that: After each round of testing is completed, the test time and test results are recorded, and the test time and test results are associated and stored locally.
6. The method according to claim 1, characterized in that The test interface includes a serial communication port control, a test round control, a test time interval control, and a test date control. In response to a trigger operation on the serial communication port control, displaying a serial communication port list; In response to a selection operation on a serial communication port identifier in the serial communication port list, determining a serial communication port identifier; In response to an input operation to the test round control, determining a test round; In response to an input operation to the test time interval control, determining a test time interval; In response to a click operation on the test date control, a test date is determined.
7. A vehicle-mounted equipment testing system, characterized in that: The system includes a test device, a power supply controller, and a simulation power supply; The relay of the power controller is connected between the simulated power supply and the vehicle-mounted device to be tested, and the power controller is used to switch the working state of the relay based on the power controller signal sent by the test device, so as to power on or off the vehicle-mounted device connected thereto; The test device is used to obtain the target serial communication port identifier, test date, test round and test time interval edited by the user through the test interface, respond to the test signal sent by the user through the test interface, and when the test date is reached, generate a power controller signal based on the test round and test time interval, and send it to the power controller through the target serial communication port.
8. The system according to claim 7, characterized in that The test device is used to perform the following steps at a preset frequency: Determine the current round T=n, where n is the test round edited by the user; Generate a first power controller signal and send it to the power controller through the target serial communication port, so that the power controller controls the connected vehicle-mounted device to power on and counts time through the counter; determining whether the time recorded by the counter is equal to the test time interval; If yes, a second power controller signal is generated and sent to the power controller through the target serial communication port, so that the power controller controls the connected vehicle-mounted device to power off; Subtract 1 from the current round T and determine whether T is 0; If yes, the test is concluded, if not, the next cycle is awaited.
9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the vehicle-mounted device testing method as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the vehicle-mounted device testing method according to any one of claims 1 to 6 are executed.