Automobile electrical function test method, device and equipment and storage medium
By generating test sequences and converting test instructions through preset test models, the strict dependency problem of SOA service layering in existing technologies is solved, automated detection and rapid testing of electrical functions are achieved, and test speed and efficiency are improved.
Patent Information
- Application Number
- CN202510881550.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-09-23
AI Technical Summary
In the existing technology, the three layers of SOA service layering have strict pre-dependencies. Atomic services can only be abstracted and aggregated into composite services, and composite services can be abstracted and aggregated into scenario services. It is impossible to directly abstract and aggregate from atomic services to scenario services, which reduces the overall flexibility of the system and cannot achieve rapid and automated detection of electrical functions.
The test sequence of the target vehicle model is generated through the scenario layer of the preset test model. The operation instructions of the preset functions are packaged and combined into the test sequence according to the function layer of the preset test model. The target test sequence is converted into target detection instructions through the instruction layer of the preset test model and sent to the vehicle end. The message data fed back by the vehicle end is received to generate a test report to realize the automated detection of electrical functions.
It realizes the customization of scene detection sequence according to vehicle model. Through the three-layer model and flexible reference between layers, it can quickly develop scene test cases to ensure the stability of vehicle quality and improve the speed and efficiency of automobile electrical function testing.
Smart Images

Figure CN120686793A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automotive electronic control technology, and in particular to an automotive electrical function testing method, device, equipment and storage medium. Background Art
[0002] The existing automobile function control method, taking CN113467436A - a vehicle function implementation method and system based on SOA service layering as an example, adopts a layered design concept to achieve flexible and diverse functions without changing the atomic service; based on the current electronic and electrical architecture and corresponding hardware resources, atomic services can be sorted out and defined, and then based on the division of the vehicle's electronic and electrical system, composite services can be defined, and the atomic services can be associated with each composite service; according to the user's usage scenario, scenario services are defined, and the composite services are associated with each scenario service; thus, a three-layer service architecture is constructed: atomic services, composite services, and scenario services; the three-layer services are deployed to different electronic controllers according to the electronic and electrical architecture and network topology.
[0003] However, the existing technology has the following technical defects: the three layers have strict pre-dependencies, atomic services can only be abstracted and aggregated into composite services, and composite services can be abstracted and aggregated into scenario services. It is impossible to directly abstract and aggregate from atomic services to scenario services, which reduces the overall flexibility of the system. Summary of the Invention
[0004] The main purpose of the present invention is to provide an automotive electrical function testing method, device, equipment and storage medium, aiming to solve the technical problem in the existing technology that the three layers of SOA service layering have strict pre-dependencies, atomic services can only be abstracted and aggregated into composite services, and composite services are abstracted and aggregated into scenario services, but cannot be directly abstracted and aggregated from atomic services to scenario services, which reduces the overall flexibility of the system and cannot achieve rapid and automated detection of electrical functions.
[0005] In a first aspect, the present invention provides a method for testing the electrical function of an automobile, the method comprising the following steps: Generate a test sequence for the target vehicle model based on the scenario layer of the preset test model; Packing and combining the operation instructions of the preset functions into the test sequence according to the functional layer of the preset test model to obtain a configured target test sequence; According to the instruction layer of the preset test model, the target test sequence is converted into a target detection instruction, and the target detection instruction is sent to the vehicle end so that the vehicle end executes the target detection instruction, and the message data fed back by the vehicle end is received, and a test report is generated according to the message data.
[0006] Optionally, generating a test sequence for a target vehicle type according to a scene layer of a preset test model includes: Obtain vehicle identification information of the target vehicle model, and search the target vehicle model configuration database for a matching target vehicle model according to the vehicle identification information; The actual usage scenario of the user is obtained, and a test sequence of the target vehicle model is generated by using the target vehicle model configuration database and the actual usage scenario of the user according to the scenario layer of the preset test model.
[0007] Optionally, obtaining the user's actual usage scenario and generating a test sequence for the target vehicle model using the target vehicle model configuration database and the user's actual usage scenario according to a scenario layer of a preset test model includes: Obtain the user's actual usage scenario, and obtain the corresponding electrical system topology structure using the target vehicle configuration database according to the scenario layer of the preset test model; Automatically identifying testable electrical function nodes according to the electrical system topology, and recommending matching test sequence templates according to the electrical function nodes; Determining the execution conditions and priorities of the test sequence templates according to the scenario layer and using the actual usage scenario of the user; The timing relationship between the operations of the functional layer of the preset test model is obtained, and a test sequence for the target vehicle model is generated according to the timing relationship, the execution condition, the priority and the test sequence template.
[0008] Optionally, the step of packaging and combining the operation instructions of the preset functions into the test sequence according to the functional layer of the preset test model to obtain a configured target test sequence includes: Packaging and combining the operation instructions of the preset functions according to the functional layer of the preset test model to obtain combined instructions; The execution logic of different electrical functions is adapted for the target vehicle model, and the test sequence is configured according to the execution logic and the combined instruction to obtain a configured target test sequence.
[0009] Optionally, converting the target test sequence into a target detection instruction according to the instruction layer of the preset test model, sending the target detection instruction to the vehicle side so that the vehicle side executes the target detection instruction, receiving message data fed back by the vehicle side, and generating a test report according to the message data includes: Converting the target test sequence into a target detection instruction based on the Unified Diagnostic Service (UDS) protocol through an on-board diagnostic system (OBD-II) interface according to the instruction layer of the preset test model; The target detection instruction is sent to the vehicle-side electronic control unit ECU via the CAN bus, the target detection instruction is executed by the ECU, and the CAN bus message data fed back by the ECU is received, and a test report is generated based on the CAN bus message data.
[0010] Optionally, the instruction layer according to the preset test model converts the target test sequence into a target detection instruction based on the Unified Diagnostic Service (UDS) protocol through an on-board diagnostic system (OBD-II) interface, including: According to the instruction layer of the preset test model, the target test sequence is encapsulated by the unified diagnostic service (UDS) through the on-board diagnostic system (OBD-II) interface to obtain the encapsulated UDS instruction; The UDS instruction is verified to obtain a target detection instruction after passing the verification.
[0011] Optionally, the sending of the target detection instruction to a vehicle-side electronic control unit (ECU) via a CAN bus, executing the target detection instruction by the ECU, receiving CAN bus message data fed back by the ECU, and generating a test report according to the CAN bus message data includes: Send the target detection instruction to the vehicle-side electronic control unit ECU via the CAN bus; Obtaining the ECU response mechanism of the target vehicle model, and determining a timeout period and a retransmission strategy for issuing instructions based on the ECU response mechanism; Establishing a mapping relationship between an ECU and the target detection instruction according to the timeout period and the retransmission strategy, and executing the target detection instruction by the ECU; Receive CAN bus message data collected in real time by the ECU, parse and detect abnormalities in the CAN bus message data, and generate a test report containing test results, abnormality codes, timestamps, and diagnostic information specific to the target vehicle model.
[0012] In a second aspect, to achieve the above-mentioned objectives, the present invention further provides an automotive electrical function test device, the automotive electrical function test device comprising: A sequence generation module is used to generate a test sequence for the target vehicle model based on the scenario layer of the preset test model; A sequence configuration module, configured to package and combine the operation instructions of the preset functions into the test sequence according to the functional layer of the preset test model to obtain a configured target test sequence; The test module is used to convert the target test sequence into a target detection instruction according to the instruction layer of the preset test model, send the target detection instruction to the vehicle side so that the vehicle side executes the target detection instruction, receive the message data fed back by the vehicle side, and generate a test report based on the message data.
[0013] In the third aspect, in order to achieve the above-mentioned purpose, the present invention also proposes an automobile electrical function testing device, which includes: a memory, a processor, and an automobile electrical function testing program stored in the memory and executable on the processor, and the automobile electrical function testing program is configured to implement the steps of the automobile electrical function testing method as described above.
[0014] In a fourth aspect, in order to achieve the above-mentioned purpose, the present invention also proposes a storage medium, on which an automobile electrical function test program is stored. When the automobile electrical function test program is executed by a processor, the steps of the automobile electrical function test method described above are implemented.
[0015] The automobile electrical function testing method proposed in the present invention generates a test sequence for a target vehicle model through a scenario layer of a preset test model; packages and combines the operation instructions of the preset function into the test sequence according to the function layer of the preset test model to obtain a configured target test sequence; converts the target test sequence into a target detection instruction according to the instruction layer of the preset test model, sends the target detection instruction to the vehicle end so that the vehicle end executes the target detection instruction, receives message data fed back by the vehicle end, and generates a test report according to the message data. The scenario detection sequence can be customized according to the vehicle model to realize automatic detection of electrical functions; through the three-layer model and flexible references between layers, scenario test cases can be quickly developed, ensuring the stability of vehicle quality and improving the speed and efficiency of automobile electrical function testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention; Figure 2 This is a flow chart of a first embodiment of a method for testing automotive electrical functions according to the present invention; Figure 3 This is a flow chart of a second embodiment of a method for testing automotive electrical functions according to the present invention; Figure 4 This is a flow chart of a third embodiment of a method for testing automotive electrical functions according to the present invention; Figure 5 This is a flow chart of a fourth embodiment of a method for testing automotive electrical functions according to the present invention; Figure 6 This is a schematic diagram of the structure of a preset test model in the automobile electrical function test method of the present invention; Figure 7 This is a functional module diagram of the first embodiment of the automobile electrical function test device of the present invention.
[0017] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0018] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0019] The solution of the embodiment of the present invention is mainly: generating a test sequence for the target vehicle model through the scenario layer of the preset test model; packaging and combining the operation instructions of the preset function into the test sequence according to the function layer of the preset test model to obtain a configured target test sequence; converting the target test sequence into a target detection instruction according to the instruction layer of the preset test model, sending the target detection instruction to the vehicle end so that the vehicle end executes the target detection instruction, and receiving the message data fed back by the vehicle end, generating a test report according to the message data, and being able to customize the scenario detection sequence according to the vehicle model to realize automatic detection of electrical functions; through the three-layer model and flexible references between layers, scenario test cases can be quickly developed; ensuring the stability of vehicle quality, improving the speed and efficiency of automobile electrical function testing, and solving the technical problem that the three layers of SOA service layering in the existing technology have strict pre-dependencies, atomic services can only be abstracted and aggregated into composite services, and composite services are abstracted and aggregated into scenario services, but cannot be directly abstracted and aggregated from atomic services to scenario services, which reduces the overall flexibility of the system and cannot realize rapid automatic detection of electrical functions.
[0020] Reference Figure 1 , Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.
[0021] like Figure 1 As shown, the device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to implement communication between these components. The user interface 1003 may include a display and an input unit such as a keyboard. Optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as a disk storage. The memory 1005 may also be a storage device independent of the processor 1001.
[0022] Those skilled in the art will understand that Figure 1The device structure shown in the figure does not constitute a limitation of the device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0023] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating device, a network communication module, a user interface module, and an automobile electrical function test program.
[0024] The device of the present invention calls the automobile electrical function test program stored in the memory 1005 through the processor 1001 and performs the following operations: Generate a test sequence for the target vehicle model based on the scenario layer of the preset test model; Packing and combining the operation instructions of the preset functions into the test sequence according to the functional layer of the preset test model to obtain a configured target test sequence; According to the instruction layer of the preset test model, the target test sequence is converted into a target detection instruction, and the target detection instruction is sent to the vehicle end so that the vehicle end executes the target detection instruction, and the message data fed back by the vehicle end is received, and a test report is generated according to the message data.
[0025] The device of the present invention calls the automobile electrical function test program stored in the memory 1005 through the processor 1001, and further performs the following operations: Obtaining the vehicle identification information of the target vehicle model, and searching the target vehicle model configuration database for a matching target vehicle model according to the vehicle identification information; The actual usage scenario of the user is obtained, and a test sequence of the target vehicle model is generated by using the target vehicle model configuration database and the actual usage scenario of the user according to the scenario layer of the preset test model.
[0026] The device of the present invention calls the automobile electrical function test program stored in the memory 1005 through the processor 1001, and further performs the following operations: Obtain the user's actual usage scenario, and obtain the corresponding electrical system topology structure using the target vehicle configuration database according to the scenario layer of the preset test model; Automatically identifying testable electrical function nodes according to the electrical system topology, and recommending matching test sequence templates according to the electrical function nodes; Determining the execution conditions and priorities of the test sequence templates according to the scenario layer and using the actual usage scenario of the user; The timing relationship between the operations of the functional layer of the preset test model is obtained, and a test sequence for the target vehicle model is generated according to the timing relationship, the execution condition, the priority and the test sequence template.
[0027] The device of the present invention calls the automobile electrical function test program stored in the memory 1005 through the processor 1001, and further performs the following operations: Packaging and combining the operation instructions of the preset functions according to the functional layer of the preset test model to obtain combined instructions; The execution logic of different electrical functions is adapted for the target vehicle model, and the test sequence is configured according to the execution logic and the combined instruction to obtain a configured target test sequence.
[0028] The device of the present invention calls the automobile electrical function test program stored in the memory 1005 through the processor 1001, and further performs the following operations: Converting the target test sequence into a target detection instruction based on the Unified Diagnostic Service (UDS) protocol through an on-board diagnostic system (OBD-II) interface according to the instruction layer of the preset test model; The target detection instruction is sent to the vehicle-side electronic control unit ECU via the CAN bus, the target detection instruction is executed by the ECU, and the CAN bus message data fed back by the ECU is received, and a test report is generated based on the CAN bus message data.
[0029] The device of the present invention calls the automobile electrical function test program stored in the memory 1005 through the processor 1001, and further performs the following operations: According to the instruction layer of the preset test model, the target test sequence is encapsulated by the unified diagnostic service (UDS) through the on-board diagnostic system (OBD-II) interface to obtain the encapsulated UDS instruction; The UDS instruction is verified to obtain a target detection instruction after passing the verification.
[0030] The device of the present invention calls the automobile electrical function test program stored in the memory 1005 through the processor 1001, and further performs the following operations: Send the target detection instruction to the vehicle-side electronic control unit ECU via the CAN bus; Obtaining the ECU response mechanism of the target vehicle model, and determining a timeout period and a retransmission strategy for issuing instructions based on the ECU response mechanism; Establishing a mapping relationship between an ECU and the target detection instruction according to the timeout period and the retransmission strategy, and executing the target detection instruction by the ECU; Receive CAN bus message data collected in real time by the ECU, parse and detect abnormalities in the CAN bus message data, and generate a test report containing test results, abnormality codes, timestamps, and diagnostic information specific to the target vehicle model.
[0031] Through the above scheme, this embodiment generates a test sequence for the target vehicle model through the scenario layer of the preset test model; according to the function layer of the preset test model, the operation instructions of the preset function are packaged and combined into the test sequence to obtain a configured target test sequence; according to the instruction layer of the preset test model, the target test sequence is converted into a target detection instruction, and the target detection instruction is sent to the vehicle end so that the vehicle end executes the target detection instruction, and receives the message data fed back by the vehicle end, and generates a test report according to the message data. It can customize the scenario detection sequence according to the vehicle model and realize automatic detection of electrical functions; through the three-layer model and flexible references between layers, scenario test cases can be quickly developed, ensuring the stability of vehicle quality and improving the speed and efficiency of automotive electrical function testing.
[0032] Based on the above hardware structure, an embodiment of the automobile electrical function testing method of the present invention is proposed.
[0033] Reference Figure 2 , Figure 2 FIG. 1 is a flow chart of a first embodiment of a method for testing automobile electrical functions according to the present invention.
[0034] In a first embodiment, the vehicle electrical function testing method includes the following steps: Step S10: Generate a test sequence for the target vehicle type according to the scene layer of the preset test model.
[0035] It should be noted that a test sequence for a target vehicle model can be generated based on a pre-set test model scenario layer.
[0036] Step S20: Pack and combine the operation instructions of the preset functions into the test sequence according to the functional layer of the preset test model to obtain a configured target test sequence.
[0037] It should be understood that according to the functional layer of the preset test model, the operating instructions of the preset functions can be packaged and combined on the basis of the scenario layer to realize the definition of user functions, that is, the operating instructions are packaged and combined into a test sequence to obtain a configured target test sequence.
[0038] Step S30: convert the target test sequence into a target detection instruction according to the instruction layer of the preset test model, send the target detection instruction to the vehicle side so that the vehicle side executes the target detection instruction, and receive the message data fed back by the vehicle side, and generate a test report based on the message data.
[0039] It can be understood that the target test sequence is converted into a target detection instruction according to the instruction layer of the preset test model, and then the target detection instruction is sent to the vehicle end. After receiving it, the vehicle end will immediately respond to execute the target detection instruction and report the message data in real time. A test report can be generated based on the message data.
[0040] Through the above scheme, this embodiment generates a test sequence for the target vehicle model through the scenario layer of the preset test model; according to the function layer of the preset test model, the operation instructions of the preset function are packaged and combined into the test sequence to obtain a configured target test sequence; according to the instruction layer of the preset test model, the target test sequence is converted into a target detection instruction, and the target detection instruction is sent to the vehicle end so that the vehicle end executes the target detection instruction, and receives the message data fed back by the vehicle end, and generates a test report according to the message data. It can customize the scenario detection sequence according to the vehicle model and realize automatic detection of electrical functions; through the three-layer model and flexible references between layers, scenario test cases can be quickly developed, ensuring the stability of vehicle quality and improving the speed and efficiency of automotive electrical function testing.
[0041] Furthermore, Figure 3 FIG. 1 is a flow chart of a second embodiment of the automobile electrical function test method of the present invention. Figure 3 As shown, a second embodiment of the automobile electrical function testing method of the present invention is proposed based on the first embodiment. In this embodiment, step S10 specifically includes the following steps: Step S11: Acquire vehicle identification information of a target vehicle type, and search a target vehicle type configuration database for a matching target vehicle type according to the vehicle identification information.
[0042] It should be noted that vehicle identification information is identification information that can be used to identify the vehicle type. After obtaining the vehicle identification information, the corresponding target vehicle model configuration database can be searched and matched based on the vehicle identification information. When there are multiple target vehicle models, different vehicle identification information can find different vehicle models and different vehicle model configuration databases.
[0043] Step S12: obtaining the user's actual usage scenario, and generating a test sequence for the target vehicle model using the target vehicle model configuration database and the user's actual usage scenario according to the scenario layer of the preset test model.
[0044] It is understandable that after obtaining the user's actual usage scenario, the target vehicle configuration database can be used in combination with the user's actual usage scenario to generate a corresponding test sequence according to the scenario layer of the preset test model.
[0045] Furthermore, the step S12 specifically includes the following steps: Obtain the user's actual usage scenario, and obtain the corresponding electrical system topology structure using the target vehicle configuration database according to the scenario layer of the preset test model; Automatically identifying testable electrical function nodes according to the electrical system topology, and recommending matching test sequence templates according to the electrical function nodes; Determining the execution conditions and priorities of the test sequence templates according to the scenario layer and using the actual usage scenario of the user; The timing relationship between the operations of the functional layer of the preset test model is obtained, and a test sequence for the target vehicle model is generated according to the timing relationship, the execution condition, the priority and the test sequence template.
[0046] It should be understood that the target vehicle model configuration database is used to obtain the corresponding electrical system topology structure according to the scenario layer of the preset test model; then, the testable electrical function nodes are automatically identified according to the electrical system topology structure, and matching test sequence templates are recommended according to the electrical function nodes; the execution conditions and priorities of the test sequence templates are determined according to the actual user usage scenarios; after obtaining the timing relationship between the operations of the functional layer of the preset test model, the test sequence of the target vehicle model can be generated according to the timing relationship, the execution conditions, the priority and the test sequence template.
[0047] In a specific implementation, the vehicle configuration database includes but is not limited to the electrical system topology of different vehicle models, electronic control unit (ECU) communication protocol parameters, electrical function interface definitions, etc.; based on the electrical system topology in the vehicle configuration library, it automatically identifies testable electrical function nodes and recommends matching test sequence templates; different execution conditions and priorities can be set according to different user scenarios, and based on the collaborative working logic of the vehicle electrical system, the timing relationship between operations at different functional layers can be configured.
[0048] Through the above scheme, this embodiment obtains the vehicle identification information of the target vehicle model, searches for and matches the corresponding target vehicle model configuration database based on the vehicle identification information, obtains the user's actual usage scenario, and generates a test sequence for the target vehicle model based on the scenario layer of a preset test model using the target vehicle model configuration database and the user's actual usage scenario; it can quickly generate a test sequence corresponding to the target vehicle model, thereby improving the accuracy of the vehicle electrical function test and improving the speed and efficiency of the vehicle electrical function test.
[0049] Furthermore, Figure 4 FIG. 1 is a flow chart of a third embodiment of a method for testing automobile electrical functions according to the present invention. Figure 4As shown, a third embodiment of the automobile electrical function testing method of the present invention is proposed based on the first embodiment. In this embodiment, step S20 specifically includes the following steps: Step S21 : Pack and combine the operation instructions of the preset functions according to the functional layer of the preset test model to obtain a combined instruction.
[0050] It should be noted that, according to the functional layer of the preset test model, the pre-set operating instructions of different functions can be packaged and combined to obtain corresponding combined instructions.
[0051] Step S22: adapting the execution logic of different electrical functions to the target vehicle model, configuring the test sequence according to the execution logic and the combined instruction, and obtaining a configured target test sequence.
[0052] It is understandable that after the execution logic of different electrical functions is adapted for the target vehicle model, the test sequence can be configured according to the execution logic and the combined instruction, thereby obtaining a configured target test sequence.
[0053] In a specific implementation, the atomic operation instructions of the instruction layer can be packaged and combined at the functional layer. According to the characteristics of the vehicle's electrical system, the execution logic of a single electrical function of the vehicle can be adapted to the vehicle's model, including but not limited to the instruction execution sequence, interval time, and number of repetitions. When there are multiple target vehicle models, the instruction parameters can be adjusted according to the interface protocols of different vehicle models, and the same electrical functions of different vehicle models can be automatically adapted and detected based on the adjusted instruction parameters. In view of the differences in electrical functions of different vehicle models, dynamic combination of instruction layer operation instructions is supported, including adjusting instruction parameters according to the interface protocol of the vehicle's electrical system, to achieve automatic adaptation and detection of the same electrical functions of different vehicle models.
[0054] Through the above scheme, this embodiment packages and combines the operating instructions of the preset functions through the functional layer of the preset test model to obtain combined instructions; adapts the execution logic of different electrical functions to the target vehicle model, configures the test sequence according to the execution logic and the combined instructions, and obtains a configured target test sequence; can accurately configure the test sequence, thereby customizing the scene detection sequence according to the vehicle model, realizing automatic detection of electrical functions, and improving the speed and efficiency of automobile electrical function testing.
[0055] Furthermore, Figure 5 FIG. 4 is a flow chart of a fourth embodiment of a method for testing automobile electrical functions according to the present invention. Figure 5 As shown, a fourth embodiment of the automobile electrical function testing method of the present invention is proposed based on the first embodiment. In this embodiment, step S30 specifically includes the following steps: Step S31 : converting the target test sequence into a target detection instruction based on the Unified Diagnostic Service (UDS) protocol through the on-board diagnostic system (OBD-II) interface according to the instruction layer of the preset test model.
[0056] It should be noted that the configured test sequence is converted into Unified Diagnostic Services (UDS) instructions through the On-Board Diagnostics (OBD) system's OBD-II interface. OBD-II is the standard interface for the second-generation on-board diagnostics system and a technical specification promoted by the automotive industry to unify fault diagnosis standards.
[0057] Furthermore, the step S31 specifically includes the following steps: According to the instruction layer of the preset test model, the target test sequence is encapsulated by the unified diagnostic service (UDS) through the on-board diagnostic system (OBD-II) interface to obtain the encapsulated UDS instruction; The UDS instruction is verified to obtain a target detection instruction after passing the verification.
[0058] It should be understood that the test sequence can be encapsulated as a UDS service through the OBD-II interface, and the UDS instruction can be verified to obtain a target detection instruction after passing the verification.
[0059] In the specific implementation, according to the vehicle model ECU communication protocol, the atomic operation instructions are encapsulated through the UDS service, supporting multiple verification methods, including but not limited to CRC verification, Checksum verification or custom verification algorithms.
[0060] Step S32: Send the target detection instruction to the vehicle-side electronic control unit ECU via the CAN bus, execute the target detection instruction through the ECU, receive the CAN bus message data fed back by the ECU, and generate a test report based on the CAN bus message data.
[0061] It can be understood that the target detection instruction is sent to the vehicle-side ECU via the Controller Area Network (CAN) bus, and the CAN bus message data is collected in real time to verify the test results, that is, the target detection instruction is executed by the Electronic Control Unit (ECU), and the CAN bus message data fed back by the ECU is received, and a test report is generated based on the CAN bus message data.
[0062] Furthermore, the step S32 specifically includes the following steps: Send the target detection instruction to the vehicle-side electronic control unit ECU via the CAN bus; Obtaining the ECU response mechanism of the target vehicle model, and determining a timeout period and a retransmission strategy for issuing instructions based on the ECU response mechanism; Establishing a mapping relationship between an ECU and the target detection instruction according to the timeout period and the retransmission strategy, and executing the target detection instruction by the ECU; Receive CAN bus message data collected in real time by the ECU, parse and detect abnormalities in the CAN bus message data, and generate a test report containing test results, abnormality codes, timestamps, and diagnostic information specific to the target vehicle model.
[0063] It should be understood that after the detection instruction is sent to the vehicle-side ECU via the CAN bus, the timeout time and retransmission strategy of the instruction can be determined according to the ECU response mechanism, and then a mapping relationship between the ECU and the detection instruction can be established; after the ECU executes the instruction, the CAN bus message data is collected in real time, and the CAN bus message data is parsed and abnormalities are judged, thereby generating a test report containing test results, abnormality codes, timestamps and diagnostic information specific to the target vehicle model.
[0064] It should be noted that the timeout period and retransmission strategy for command issuance can be dynamically adjusted according to the ECU response mechanism of different vehicle models; a mapping relationship between test commands and ECU responses can be established based on the ECU communication protocol in the vehicle model configuration library; the real-time collected CAN message data can be parsed and anomalies can be judged in combination with the normal data threshold range of the vehicle model's electrical system; and a test report containing test results, anomaly codes, timestamps, and vehicle model-specific diagnostic information can be generated.
[0065] Accordingly, error recovery strategies and test interruption conditions can be set according to vehicle fault diagnosis specifications. By storing the configuration parameters and corresponding version information of each vehicle model, the import / export and cross-model reuse of configuration parameters of different vehicle models can be supported. In addition, the difference comparison and rollback functions of vehicle model configuration parameters can be provided, and the configuration parameters can be dynamically updated according to the vehicle model upgrade requirements.
[0066] Accordingly, the test priority and test duration of each electrical function in the test sequence can be automatically adjusted based on the historical test data and failure rate analysis of the vehicle model, thereby optimizing the efficiency of automated detection of electrical functions for different vehicle models.
[0067] In the specific implementation, see Figure 6 , Figure 6 This is a schematic diagram of the structure of the preset test model in the automobile electrical function test method of the present invention, such as Figure 6As shown, the preset test model is divided into three layers: the command layer (UDS commands and remote control commands), the function layer (appliance function definitions), and the scenario layer (user perspective). The configuration process is: scenario -> function -> command. After configuration is complete, the test command is sent to the vehicle through the OBD-II port. Upon receipt, the vehicle immediately responds and executes the command, uploading the message data in real time.
[0068] Instruction layer: The configuration of the ECU diagnostic instruction level is the atomic layer. At this layer, each instruction is defined in detail, including instruction content, sampling time, verification method and other information. The instructions defined at this layer are ultimately sent to the vehicle under test. The sending link is to send the encapsulated UDS instructions (services) to each ECU on the vehicle through the CAN protocol. After receiving the instructions, the ECU responds, and at the same time, the message information on the CAN line is uploaded to the server in real time. Functional layer: Based on the scenario layer, the UDS instructions are packaged and combined to implement the definition of a user function, including the instruction interval time. For example, to raise and lower the left window, two models need to be associated and referenced. In the functional layer, models can be freely combined and packaged according to the car's functions, and some simple functional combinations can be constructed in sequence. In the functional layer, the number of referenced models can also be freely defined to achieve repeated execution of a certain operation.
[0069] Scenario layer: In the instruction layer, the functional layers can be further combined to implement operations for a series of automotive functions. In electrical function testing, scenario detection use cases can be designed and developed based on the user's usage scenarios. Different scenarios correspond to different test sequences. In the process of developing test scenarios, some ECU operations need to be interspersed, such as ECU remote wake-up instructions. At this time, the corresponding operation instructions can be directly referenced from the model. There is no need to follow the three-layer definition and first add the instruction to the template and then reference it from the template. This simplifies the configuration process and improves the flexibility of the system.
[0070] It can be understood that this embodiment customizes the scene detection sequence according to the vehicle model to realize the automatic detection of electrical functions; through the three-layer model and flexible references between layers, scenario test cases can be quickly developed; through the encapsulation of UDS instructions, the difficulty of scenario use case development is reduced; the stability of vehicle quality is guaranteed, and the brand reputation and credibility are improved; new cloud-based testing technology capabilities are established, and relevant high-skilled talents are cultivated.
[0071] In the specific implementation, taking the remote one-touch cooling / heating of the air conditioner as an example, the process is as follows: Command layer: S24-1-one-touch cooling on, S24-2-one-touch cooling on verification (heat pump), S24-3-one-touch cooling verification (non-heat pump), S25-one-touch cooling off; select the air conditioning cooling template 1 in the function layer, and detect the scene through the scene layer to realize remote one-touch turning on of the air conditioning cooling, that is: remote wake-up command, followed by one-touch turning on of the air conditioning - template. After the above configuration, when the vehicle to be detected triggers the detection task, the platform will automatically match the corresponding template (air conditioning cooling M) and command layer (remote wake-up) according to the detection scenario (eg: remote one-touch turning on of air conditioning cooling), thereby generating the UDS diagnostic command and remote control command executed by the vehicle end, and sending it to the vehicle end for execution via the CAN protocol; through the above link, the function of remote one-touch turning on of the air conditioner cooling can be quickly tested. If other functions need to be added in the detection scenario later, they can be quickly configured in this way.
[0072] Through the above scheme, this embodiment packages and combines the operating instructions of the preset functions through the functional layer of the preset test model to obtain combined instructions; adapts the execution logic of different electrical functions to the target vehicle model, configures the test sequence according to the execution logic and the combined instructions, and obtains a configured target test sequence; can accurately configure the test sequence, thereby customizing the scene detection sequence according to the vehicle model, realizing automatic detection of electrical functions, and improving the speed and efficiency of automobile electrical function testing.
[0073] Accordingly, the present invention further provides an automobile electrical function testing device.
[0074] Reference Figure 7 , Figure 7 This is a functional module diagram of the first embodiment of the automobile electrical function test device of the present invention.
[0075] In a first embodiment of the automobile electrical function test device of the present invention, the automobile electrical function test device comprises: The sequence generation module 10 is used to generate a test sequence for a target vehicle type according to a scene layer of a preset test model.
[0076] The sequence configuration module 20 is used to package and combine the operation instructions of the preset functions into the test sequence according to the functional layer of the preset test model to obtain a configured target test sequence.
[0077] The test module 30 is used to convert the target test sequence into a target detection instruction according to the instruction layer of the preset test model, send the target detection instruction to the vehicle side so that the vehicle side executes the target detection instruction, receive the message data fed back by the vehicle side, and generate a test report based on the message data.
[0078] The sequence generation module 10 is further configured to obtain vehicle identification information of a target vehicle model, search a target vehicle model configuration database for a matching target vehicle model based on the vehicle identification information, obtain the user's actual usage scenario, and generate a test sequence for the target vehicle model based on the scenario layer of a preset test model using the target vehicle model configuration database and the user's actual usage scenario.
[0079] The sequence generation module 10 is further configured to obtain the user's actual usage scenario, and obtain the corresponding electrical system topology structure using the target vehicle configuration database according to the scenario layer of the preset test model; automatically identify testable electrical function nodes according to the electrical system topology structure, and recommend matching test sequence templates based on the electrical function nodes; determine the execution conditions and priority of the test sequence template using the user's actual usage scenario according to the scenario layer; obtain the timing relationship between the operations of the functional layer of the preset test model, and generate a test sequence for the target vehicle model based on the timing relationship, the execution conditions, the priority, and the test sequence template.
[0080] The sequence configuration module 20 is further used to package and combine the operating instructions of the preset functions according to the functional layer of the preset test model to obtain combined instructions; adapt the execution logic of different electrical functions to the target vehicle model, configure the test sequence according to the execution logic and the combined instructions, and obtain a configured target test sequence.
[0081] The test module 30 is also used to convert the target test sequence into a target detection instruction based on the unified diagnostic service UDS protocol through the on-board diagnostic system OBD-II interface according to the instruction layer of the preset test model; send the target detection instruction to the vehicle-side electronic control unit ECU through the CAN bus, execute the target detection instruction through the ECU, and receive the CAN bus message data fed back by the ECU, and generate a test report based on the CAN bus message data.
[0082] The test module 30 is further configured to encapsulate the target test sequence through the unified diagnostic service (UDS) via the on-board diagnostic system (OBD-II) interface according to the instruction layer of the preset test model to obtain the encapsulated UDS instruction; and verify the UDS instruction to obtain the target detection instruction after verification.
[0083] The test module 30 is further configured to send the target detection instruction to the vehicle-side electronic control unit ECU via the CAN bus; obtain the ECU response mechanism of the target vehicle model, and determine the timeout time and retransmission strategy for sending the instruction based on the ECU response mechanism; establish a mapping relationship between the ECU and the target detection instruction based on the timeout time and the retransmission strategy, and execute the target detection instruction through the ECU; receive CAN bus message data collected in real time by the ECU, parse and judge abnormalities of the CAN bus message data, and generate a test report containing test results, abnormality codes, timestamps, and diagnostic information specific to the target vehicle model.
[0084] The steps implemented by the various functional modules of the automobile electrical function testing device may refer to the various embodiments of the automobile electrical function testing method of the present invention, and will not be repeated here.
[0085] In addition, an embodiment of the present invention further provides a storage medium, wherein the storage medium stores an automobile electrical function test program. When the automobile electrical function test program is executed by a processor, the following operations are performed: Generate a test sequence for the target vehicle type based on the scenario layer of the preset test model; Packing and combining the operation instructions of the preset functions into the test sequence according to the functional layer of the preset test model to obtain a configured target test sequence; According to the instruction layer of the preset test model, the target test sequence is converted into a target detection instruction, and the target detection instruction is sent to the vehicle end so that the vehicle end executes the target detection instruction, and the message data fed back by the vehicle end is received, and a test report is generated according to the message data.
[0086] Furthermore, when the automobile electrical function test program is executed by the processor, the following operations are also implemented: Obtain vehicle identification information of the target vehicle model, and search the target vehicle model configuration database for a matching target vehicle model according to the vehicle identification information; The actual usage scenario of the user is obtained, and a test sequence of the target vehicle model is generated by using the target vehicle model configuration database and the actual usage scenario of the user according to the scenario layer of the preset test model.
[0087] Furthermore, when the automobile electrical function test program is executed by the processor, the following operations are also implemented: Obtain the user's actual usage scenario, and obtain the corresponding electrical system topology structure using the target vehicle configuration database according to the scenario layer of the preset test model; Automatically identifying testable electrical function nodes according to the electrical system topology, and recommending matching test sequence templates according to the electrical function nodes; Determining the execution conditions and priorities of the test sequence templates according to the scenario layer and using the actual usage scenario of the user; The timing relationship between the operations of the functional layer of the preset test model is obtained, and a test sequence for the target vehicle model is generated according to the timing relationship, the execution condition, the priority and the test sequence template.
[0088] Furthermore, when the automobile electrical function test program is executed by the processor, the following operations are also implemented: Packaging and combining the operation instructions of the preset functions according to the functional layer of the preset test model to obtain combined instructions; The execution logic of different electrical functions is adapted for the target vehicle model, and the test sequence is configured according to the execution logic and the combined instruction to obtain a configured target test sequence.
[0089] Furthermore, when the automobile electrical function test program is executed by the processor, the following operations are also implemented: Converting the target test sequence into a target detection instruction based on the Unified Diagnostic Service (UDS) protocol through an on-board diagnostic system (OBD-II) interface according to the instruction layer of the preset test model; The target detection instruction is sent to the vehicle-side electronic control unit ECU via the CAN bus, the target detection instruction is executed by the ECU, and the CAN bus message data fed back by the ECU is received, and a test report is generated based on the CAN bus message data.
[0090] Furthermore, when the automobile electrical function test program is executed by the processor, the following operations are also implemented: According to the instruction layer of the preset test model, the target test sequence is encapsulated by the unified diagnostic service (UDS) through the on-board diagnostic system (OBD-II) interface to obtain the encapsulated UDS instruction; The UDS instruction is verified to obtain a target detection instruction after passing the verification.
[0091] Furthermore, when the automobile electrical function test program is executed by the processor, the following operations are also implemented: Send the target detection instruction to the vehicle-side electronic control unit ECU via the CAN bus; Obtaining the ECU response mechanism of the target vehicle model, and determining a timeout period and a retransmission strategy for issuing instructions based on the ECU response mechanism; Establishing a mapping relationship between an ECU and the target detection instruction according to the timeout period and the retransmission strategy, and executing the target detection instruction by the ECU; Receive CAN bus message data collected in real time by the ECU, parse and detect abnormalities in the CAN bus message data, and generate a test report containing test results, abnormality codes, timestamps, and diagnostic information specific to the target vehicle model.
[0092] Those skilled in the art will understand that all or part of the steps in the above-mentioned implementation methods can be implemented by instructing related hardware through a program. The program is stored in a storage medium and includes a number of instructions for enabling a device (which may be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application; and the aforementioned storage medium is a computer-readable storage medium, including: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0093] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0094] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0095] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for testing automobile electrical functions, characterized in that: The automotive electrical function testing method comprises: Generate a test sequence for the target vehicle type based on the scenario layer of the preset test model; Packing and combining the operation instructions of the preset functions into the test sequence according to the functional layer of the preset test model to obtain a configured target test sequence; According to the instruction layer of the preset test model, the target test sequence is converted into a target detection instruction, and the target detection instruction is sent to the vehicle end so that the vehicle end executes the target detection instruction, and the message data fed back by the vehicle end is received, and a test report is generated according to the message data.
2. The automotive electrical function testing method according to claim 1, wherein: Generating a test sequence for a target vehicle type according to a scene layer of a preset test model includes: Obtain vehicle identification information of the target vehicle model, and search the target vehicle model configuration database for a matching target vehicle model according to the vehicle identification information; The actual usage scenario of the user is obtained, and a test sequence of the target vehicle model is generated by using the target vehicle model configuration database and the actual usage scenario of the user according to the scenario layer of the preset test model.
3. The automotive electrical function testing method according to claim 2, wherein: The step of obtaining the actual user usage scenario and generating a test sequence for the target vehicle model using the target vehicle model configuration database and the actual user usage scenario according to the scenario layer of the preset test model includes: Obtain the user's actual usage scenario, and obtain the corresponding electrical system topology structure using the target vehicle configuration database according to the scenario layer of the preset test model; Automatically identifying testable electrical function nodes according to the electrical system topology, and recommending matching test sequence templates according to the electrical function nodes; Determining the execution conditions and priorities of the test sequence templates according to the scenario layer and using the actual usage scenario of the user; The timing relationship between the operations of the functional layer of the preset test model is obtained, and a test sequence for the target vehicle model is generated according to the timing relationship, the execution condition, the priority and the test sequence template.
4. The automotive electrical function testing method according to claim 1, wherein: The step of packaging and combining the operation instructions of the preset functions into the test sequence according to the functional layer of the preset test model to obtain a configured target test sequence includes: Packaging and combining the operation instructions of the preset functions according to the functional layer of the preset test model to obtain combined instructions; The execution logic of different electrical functions is adapted for the target vehicle model, and the test sequence is configured according to the execution logic and the combined instruction to obtain a configured target test sequence.
5. The automotive electrical function testing method according to claim 1, wherein: The instruction layer according to the preset test model converts the target test sequence into a target detection instruction, sends the target detection instruction to the vehicle end so that the vehicle end executes the target detection instruction, receives message data fed back by the vehicle end, and generates a test report according to the message data, including: Converting the target test sequence into a target detection instruction based on the Unified Diagnostic Service (UDS) protocol through an on-board diagnostic system (OBD-II) interface according to the instruction layer of the preset test model; The target detection instruction is sent to the vehicle-side electronic control unit ECU via the CAN bus, the target detection instruction is executed by the ECU, and the CAN bus message data fed back by the ECU is received, and a test report is generated based on the CAN bus message data.
6. The automotive electrical function testing method according to claim 5, wherein: The instruction layer according to the preset test model converts the target test sequence into a target detection instruction based on the unified diagnostic service UDS protocol through the vehicle diagnostic system OBD-II interface, including: According to the instruction layer of the preset test model, the target test sequence is encapsulated by the unified diagnostic service (UDS) through the on-board diagnostic system (OBD-II) interface to obtain the encapsulated UDS instruction; The UDS instruction is verified to obtain a target detection instruction after passing the verification.
7. The automotive electrical function testing method according to claim 5, wherein: The target detection instruction is sent to the vehicle-side electronic control unit ECU via the CAN bus, the target detection instruction is executed by the ECU, and the CAN bus message data fed back by the ECU is received, and a test report is generated according to the CAN bus message data, including: Send the target detection instruction to the vehicle-side electronic control unit ECU via the CAN bus; Obtaining the ECU response mechanism of the target vehicle model, and determining a timeout period and a retransmission strategy for issuing instructions based on the ECU response mechanism; Establishing a mapping relationship between an ECU and the target detection instruction according to the timeout period and the retransmission strategy, and executing the target detection instruction by the ECU; Receive CAN bus message data collected in real time by the ECU, parse and detect abnormalities in the CAN bus message data, and generate a test report containing test results, abnormality codes, timestamps, and diagnostic information specific to the target vehicle model.
8. An automotive electrical function test device, characterized in that: The automobile electrical function test device comprises: A sequence generation module is used to generate a test sequence for the target vehicle model based on the scenario layer of the preset test model; A sequence configuration module, configured to package and combine the operation instructions of the preset functions into the test sequence according to the functional layer of the preset test model to obtain a configured target test sequence; The test module is used to convert the target test sequence into a target detection instruction according to the instruction layer of the preset test model, send the target detection instruction to the vehicle side so that the vehicle side executes the target detection instruction, receive the message data fed back by the vehicle side, and generate a test report based on the message data.
9. An automotive electrical function test device, characterized in that: The automobile electrical function test device includes: a memory, a processor, and an automobile electrical function test program stored in the memory and executable on the processor, wherein the automobile electrical function test program is configured to implement the steps of the automobile electrical function test method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores an automobile electrical function test program, which, when executed by a processor, implements the steps of the automobile electrical function test method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Whole vehicle function implementation method based on SOA service layering and system
CN113467436A
Cited By
Control function test system of drive-by-wire dumper
CN121523287A