A method and system for automatic inspection of vehicle-mounted Ethernet services

Through CANoe software and Python programs, the on-board Ethernet packets are automatically analyzed, and combined with the service template table, efficient and automatic inspection of on-board Ethernet services is realized, solving the problems of low efficiency and difficult quality assurance of manual inspection.

CN115550206BActive Publication Date: 2025-08-26WUHAN KOTEI INFORMATICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211064513.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2025-08-26
Estimated Expiration
2042-08-31

AI Technical Summary

Technical Problem

The manual inspection of vehicle-mounted Ethernet services is low in efficiency and difficult to guarantee quality, especially when a large number of Ethernet packets are analyzed, it is easy to miss the test and miscalculate.

Method used

CANoe software is used to record Ethernet packets, parse and store them into two-dimensional data tables using Python programs, and combine them with Ethernet service template tables to automatically extract and verify the inspection items, generate inspection results and write them to the template table.

Benefits of technology

It greatly improves the inspection efficiency and quality of on-board Ethernet services, and reduces the time of manual analysis and missed detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115550206B_ABST
    Figure CN115550206B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for automatic spot inspection of in-vehicle Ethernet services. The method comprises: recording Ethernet messages requiring spot inspection using CANoe software; parsing the Ethernet messages using a Python program, and storing the parsed Ethernet messages into corresponding two-dimensional data tables according to message type; parsing an Ethernet service template table using a Python program to extract information about all services requiring spot inspection; based on the service information of any service requiring spot inspection, checking the spot inspection items corresponding to the current service in the two-dimensional data table to obtain a spot inspection result for each spot inspection item; and writing the spot inspection results into the Ethernet service template table, wherein the spot inspection results correspond to the service information. The present invention can analyze complex Ethernet messages using a Python program and then combine them with an Ethernet service spot inspection table template to significantly improve spot inspection efficiency and ensure spot inspection quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle-mounted Ethernet testing, and more particularly to a method and system for automatic spot checking of vehicle-mounted Ethernet services. Background Art

[0002] In-vehicle Ethernet testing projects, to ensure the quality of released versions, Ethernet services are individually inspected. This primarily involves checking the publish-subscribe process for each service, as well as related periodic events. Inspections primarily rely on manual analysis of Ethernet packets. However, in-vehicle Ethernet services are typically numerous, often numbering in the hundreds. Inspections typically require analysis of hundreds of thousands of Ethernet packets, making manual inspections time-consuming and prone to missed or misdetected results. Summary of the Invention

[0003] In order to solve the problems of low manual inspection efficiency and difficult quality assurance of in-vehicle Ethernet services, the present invention provides an automatic inspection method and system for in-vehicle Ethernet services, so as to improve the inspection efficiency of in-vehicle Ethernet services and ensure the inspection quality.

[0004] According to a first aspect of the present invention, there is provided a method for automatically checking an in-vehicle Ethernet service, comprising:

[0005] Record Ethernet messages that need to be inspected based on CANoe software;

[0006] Parsing the Ethernet message based on the Python program, and storing the parsed Ethernet message into a corresponding two-dimensional data table according to the message type;

[0007] Parse the Ethernet service template table based on Python program and extract all service information that needs to be checked;

[0008] Based on the service information of any service that needs inspection, check the inspection items corresponding to the current service in the two-dimensional data table and obtain the inspection results of each inspection item;

[0009] The inspection result is written into the Ethernet service template table, where the inspection result corresponds to the service information.

[0010] On the basis of the above technical solution, the present invention can also make the following improvements.

[0011] Optionally, the message type includes Offer Service, Subscribe, and Event Notification;

[0012] The Python program is used to parse the Ethernet message, and the parsed Ethernet message is stored as a corresponding two-dimensional data table according to the message type, including:

[0013] The Ethernet messages are stored in different two-dimensional data tables according to different message types. The two-dimensional data tables include a timestamp field and a service information field.

[0014] Optionally, also include:

[0015] An Ethernet service template table is compiled based on the service table of the in-vehicle Ethernet. The Ethernet service template table includes service information of all services that need to be inspected and expected results of each inspection item of each service.

[0016] Optionally, the Python program is used to parse the Ethernet service template table and extract service information of all services that require inspection, including:

[0017] The Python program is used to parse the Ethernet service template table and extract all service information and the expected results of each inspection item of each service.

[0018] Optionally, based on the service information of any service requiring inspection, checking the inspection items corresponding to the current service in the two-dimensional data table to obtain the inspection result of each inspection item includes:

[0019] According to the inspection type of any service that needs inspection, find the corresponding two-dimensional data table;

[0020] Based on the service information of any service requiring inspection, finding all corresponding inspection items in the corresponding two-dimensional data table;

[0021] Analyze the Ethernet message of each inspection item and obtain the analysis results;

[0022] Compare the analysis result of each inspection item with the corresponding expected result. If they are consistent, the inspection result is successful; if they are inconsistent, the inspection result is failed.

[0023] Optionally, if the inspection type is inspection service delivery, obtain a two-dimensional data table of Offer Service type;

[0024] Check the Offer Service message cycle in the two-dimensional data table of the Offer Service type and whether the socket information of each message is correct to obtain the analysis results.

[0025] Optionally, writing the inspection result into the Ethernet service template table, wherein the inspection result corresponds to the service information, includes:

[0026] The inspection results are written into the Ethernet service template table, and for failed inspection results, the abnormal reasons are indicated.

[0027] According to a second aspect of the present invention, there is provided a vehicle-mounted Ethernet service automatic inspection system, comprising:

[0028] Recording module, used to record Ethernet messages that need to be inspected based on CANoe software;

[0029] A parsing module, configured to parse the Ethernet message based on a Python program, and store the parsed Ethernet message into a corresponding two-dimensional data table according to the message type;

[0030] The extraction module is used to parse the Ethernet service template table based on Python program and extract all service information that needs to be checked;

[0031] The inspection module is used to check the inspection items corresponding to the current service in the two-dimensional data table based on the service information of any service that needs inspection, and obtain the inspection results of each inspection item;

[0032] A writing module is used to write the inspection result into the Ethernet service template table, where the inspection result corresponds to the service information.

[0033] According to a third aspect of the present invention, an electronic device is provided, comprising a memory and a processor, wherein the processor is configured to implement the steps of a method for automatically checking an in-vehicle Ethernet service when executing a computer management program stored in the memory.

[0034] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer management program is stored. When the computer management program is executed by a processor, the steps of the automatic inspection method of the in-vehicle Ethernet service are implemented.

[0035] The present invention provides an automatic inspection method and system for in-vehicle Ethernet services. The system can analyze complex Ethernet messages through a Python program and then combine it with an Ethernet service inspection table template to significantly improve inspection efficiency and ensure inspection quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A flow chart of an automatic inspection method for in-vehicle Ethernet services provided by the present invention;

[0037] Figure 2 A schematic diagram of the overall process of the automatic inspection method for in-vehicle Ethernet services;

[0038] Figure 3 A schematic diagram of the structure of an automatic inspection system for in-vehicle Ethernet services provided by the present invention;

[0039] Figure 4 A schematic diagram of the hardware structure of a possible electronic device provided by the present invention;

[0040] Figure 5 A schematic diagram of the hardware structure of a possible computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. In addition, the technical features in the various embodiments or single embodiments provided by the present invention can be arbitrarily combined with each other to form a feasible technical solution. This combination is not restricted by the sequence of steps and / or structural composition mode, but must be based on the ability of ordinary technicians in this field to implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0042] To address the low efficiency and quality assurance issues of manual inspections of existing in-vehicle Ethernet services, the present invention proposes a method that can analyze complex Ethernet messages through a Python program and then combine it with an Ethernet service inspection form template to significantly improve inspection efficiency and ensure inspection quality.

[0043] Figure 1 The present invention provides a flow chart of an automatic inspection method for vehicle Ethernet services, such as Figure 1 As shown, the automatic inspection method mainly includes the following steps:

[0044] S1, recording Ethernet messages that need to be inspected based on CANoe software.

[0045] It is understandable that for Ethernet messages that need to be inspected, CANoe software is used to record the Ethernet messages that need to be inspected, and the records are exported and saved in an asc format file.

[0046] S2, parsing the Ethernet message based on the Python program, and storing the parsed Ethernet message into a corresponding two-dimensional data table according to the message type.

[0047] As an embodiment, the message types include Offer Service, Subscribe and EventNotification; the Python program is used to parse the Ethernet message, and the parsed Ethernet message is stored as a corresponding two-dimensional data table according to the message type, including: storing the Ethernet message in different two-dimensional data tables according to different message types, and the two-dimensional data table includes a timestamp field and a service information field.

[0048] As you can understand, a Python program is written to parse the Ethernet message file generated above and store the parsed messages into different two-dimensional data tables based on message type. In other words, different two-dimensional data tables store different types of Ethernet messages. Depending on inspection requirements, message types that need to be stored include Offer Service, Subscribe, and EventNotification. In addition to basic fields like timestamp and Service ID (service information), the data in the two-dimensional data tables also contains attributes specific to each message type.

[0049] S3, based on Python program, parses the Ethernet service template table and extracts all service information that needs to be checked.

[0050] As an embodiment, an Ethernet service template table is compiled based on the service table of the in-vehicle Ethernet. The Ethernet service template table includes service information of all services that need to be inspected and expected results of each inspection item of each service.

[0051] The method of parsing the Ethernet service template table based on a Python program and extracting service information of all services requiring inspection includes: parsing the Ethernet service template table based on a Python program and extracting all service information therein and the expected result of each inspection item of each service.

[0052] It is understandable that an Ethernet service template table is pre-established, and the Ethernet service template table includes service information (service unique identification ID) of all services that need to be inspected and the expected result of each inspection item of each service.

[0053] When the Ethernet service needs to be inspected subsequently, service information of all services that need to be inspected and the expected result of each inspection item of each service are extracted from the Ethernet service template table.

[0054] S4, based on the service information of any service that needs to be inspected, the inspection items corresponding to the current service are checked in the two-dimensional data table to obtain the inspection result of each inspection item.

[0055] As an embodiment, the service information of any service that needs to be inspected checks the inspection items corresponding to the current service in the two-dimensional data table to obtain the inspection results of each inspection item, including: finding the corresponding type of two-dimensional data table based on the inspection type of any service that needs to be inspected; finding all corresponding inspection items in the corresponding two-dimensional data table based on the service information of any service that needs to be inspected; analyzing the Ethernet message of each inspection item to obtain the analysis result; comparing the analysis result of each inspection item with the corresponding expected result, if they are consistent, the inspection result is successful; if they are inconsistent, the inspection result is failed.

[0056] If the inspection type is inspection service delivery, obtain a two-dimensional data table of Offer Service type; check the period of Offer Service messages in the two-dimensional data table of Offer Service type and whether the Socket information of each message is correct to obtain an analysis result.

[0057] It is understandable that according to the extracted service information and the expected results of the inspection items, the corresponding two-dimensional data table is analyzed. For example, if the service delivery needs to be inspected, the Offer Service two-dimensional table is analyzed to check the cycle of the Offer Service message and whether the Socket information of each message is correct.

[0058] S5, writing the inspection result into the Ethernet service template table, wherein the inspection result corresponds to the service information.

[0059] As an embodiment, the step of writing the inspection result into the Ethernet service template table, wherein the inspection result corresponds to the service information, includes: writing the inspection result into the Ethernet service template table, and indicating the abnormal reason for a failed inspection result.

[0060] See also Figure 2 The following is a flowchart of the automatic inspection method for in-vehicle Ethernet services provided by the present invention. First, Ethernet messages requiring inspection are recorded using CANoe and exported as ASC files. The Ethernet messages are then parsed and stored in different two-dimensional data tables according to message type. The Ethernet service template table is then parsed to extract service information for all services requiring inspection and the expected results for each inspection item for each service. The extracted service information and expected results for each inspection item are stored in a service queue.

[0061] When performing a spot check on a service, the service that needs to be inspected (the service to be inspected) and the expected results of each spot check item of the service are taken out from the service queue. According to the spot check type of the service to be inspected, the corresponding two-dimensional data table is found. According to the service information of the service to be inspected, all spot check items for the service are found from the two-dimensional data table. The Ethernet message of each spot check item is analyzed to obtain the analysis result. The analysis result of each spot check item is compared with the expected result to obtain the spot check result. Finally, the obtained spot check result is written into the Ethernet service template table.

[0062] Figure 3 This is a structural diagram of an automatic inspection system for vehicle Ethernet services provided by an embodiment of the present invention, such as Figure 3 As shown, an automatic inspection system for in-vehicle Ethernet services includes a recording module 301, a parsing module 302, an extraction module 303, an inspection module 304, and a writing module 305, wherein:

[0063] The recording module 301 is used to record Ethernet messages that need to be inspected based on the CANoe software; the parsing module 302 is used to parse the Ethernet messages based on the Python program and store the parsed Ethernet messages as corresponding two-dimensional data tables according to the message type; the extraction module 303 is used to parse the Ethernet service template table based on the Python program and extract all service information that needs to be inspected; the inspection module 304 is used to check the inspection items corresponding to the current service in the two-dimensional data table based on the service information of any service that needs to be inspected, and obtain the inspection results of each inspection item; the writing module 305 is used to write the inspection results into the Ethernet service template table, and the inspection results correspond to the service information.

[0064] It can be understood that the automatic inspection system for in-vehicle Ethernet services provided by the present invention corresponds to the automatic inspection method for in-vehicle Ethernet services provided by the aforementioned embodiments. The relevant technical features of the automatic inspection system for in-vehicle Ethernet services can refer to the relevant technical features of the automatic inspection method for in-vehicle Ethernet services, and will not be repeated here.

[0065] See also Figure 4 , Figure 4 Schematic diagram of an embodiment of an electronic device provided by an embodiment of the present invention. Figure 4As shown, an embodiment of the present invention provides an electronic device 400, including a memory 410, a processor 420, and a computer program 411 stored in the memory 410 and executable on the processor 420. When the processor 420 executes the computer program 411, the following steps are implemented: recording Ethernet messages that require inspection based on CANoe software; parsing the Ethernet messages based on a Python program, and storing the parsed Ethernet messages as corresponding two-dimensional data tables according to message types; parsing the Ethernet service template table based on the Python program, and extracting all service information that requires inspection; based on the service information of any service that requires inspection, checking the inspection items corresponding to the current service in the two-dimensional data table, and obtaining the inspection results of each inspection item; writing the inspection results into the Ethernet service template table, and the inspection results corresponding to the service information.

[0066] See also Figure 5 , Figure 5 Schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. Figure 5 As shown, this embodiment provides a computer-readable storage medium 500, on which a computer program 511 is stored. When the computer program 511 is executed by a processor, the following steps are implemented: recording Ethernet messages that need to be inspected based on CANoe software; parsing the Ethernet messages based on a Python program, and storing the parsed Ethernet messages as corresponding two-dimensional data tables according to message types; parsing the Ethernet service template table based on the Python program, and extracting all service information that needs to be inspected; based on the service information of any service that needs to be inspected, checking the inspection items corresponding to the current service in the two-dimensional data table, and obtaining the inspection results of each inspection item; writing the inspection results into the Ethernet service template table, and the inspection results correspond to the service information.

[0067] An embodiment of the present invention provides a method and system for automatically inspecting in-vehicle Ethernet services. The system uses CANoe software to record Ethernet messages requiring inspection; uses a Python program to parse the Ethernet messages, storing the parsed Ethernet messages in corresponding two-dimensional data tables by message type; uses a Python program to parse an Ethernet service template table to extract all service information requiring inspection; based on the service information of any service requiring inspection, the system verifies the inspection items corresponding to the current service in the two-dimensional data table to obtain inspection results for each inspection item; and writes the inspection results into the Ethernet service template table, where the inspection results correspond to the service information. The present invention can use a Python program to analyze complex Ethernet messages, and then combine them with an Ethernet service inspection table template to significantly improve inspection efficiency and ensure inspection quality.

[0068] It should be noted that, in the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0069] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0070] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0071] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0072] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0073] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0074] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.

Claims

1. A method for automatic inspection of vehicle-mounted Ethernet services, characterized in that: include: Record Ethernet messages that need to be inspected based on CANoe software; Parsing the Ethernet message based on the Python program, and storing the parsed Ethernet message into a corresponding two-dimensional data table according to the message type; Parse the Ethernet service template table based on Python program and extract all service information that needs to be checked; Based on the service information of any service that needs inspection, check the inspection items corresponding to the current service in the two-dimensional data table and obtain the inspection results of each inspection item; Writing the inspection result into the Ethernet service template table, wherein the inspection result corresponds to the service information; the message types include Offer Service, Subscribe, and Event Notification; The Python program is used to parse the Ethernet message, and the parsed Ethernet message is stored as a corresponding two-dimensional data table according to the message type, including: The Ethernet messages are stored in different two-dimensional data tables according to different message types. The two-dimensional data tables include a timestamp field and a service information field.

2. The automatic inspection method according to claim 1, characterized in that: Also includes: An Ethernet service template table is compiled based on the service table of the in-vehicle Ethernet. The Ethernet service template table includes service information of all services that need to be inspected and expected results of each inspection item of each service.

3. The automatic inspection method according to claim 2, characterized in that: The Python-based program parses the Ethernet service template table and extracts service information of all services that need to be inspected, including: The Python program is used to parse the Ethernet service template table and extract all service information and the expected results of each inspection item of each service.

4. The automatic inspection method according to claim 3, characterized in that: Based on the service information of any service that needs to be inspected, the inspection items corresponding to the current service are checked in the two-dimensional data table to obtain the inspection results of each inspection item, including: According to the inspection type of any service that needs inspection, find the corresponding two-dimensional data table; Based on the service information of any service requiring inspection, finding all corresponding inspection items in the corresponding two-dimensional data table; Analyze the Ethernet message of each inspection item and obtain the analysis results; Compare the analysis result of each inspection item with the corresponding expected result. If they are consistent, the inspection result is successful; if they are inconsistent, the inspection result is failed.

5. The automatic inspection method according to claim 4, characterized in that: If the inspection type is inspection service delivery, obtain a two-dimensional data table of Offer Service type; Check the Offer Service message cycle in the two-dimensional data table of the Offer Service type and whether the socket information of each message is correct to obtain the analysis results.

6. The automatic inspection method according to claim 1, characterized in that: The step of writing the inspection result into the Ethernet service template table, wherein the inspection result corresponds to the service information, includes: The inspection results are written into the Ethernet service template table, and for failed inspection results, the abnormal reasons are indicated.

7. An automatic inspection system for vehicle-mounted Ethernet services, characterized in that: include: Recording module, used to record Ethernet messages that need to be inspected based on CANoe software; A parsing module, configured to parse the Ethernet message based on a Python program, and store the parsed Ethernet message into a corresponding two-dimensional data table according to the message type; The extraction module is used to parse the Ethernet service template table based on Python program and extract all service information that needs to be checked; The inspection module is used to check the inspection items corresponding to the current service in the two-dimensional data table based on the service information of any service that needs inspection, and obtain the inspection results of each inspection item; a writing module, configured to write a spot check result into the Ethernet service template table, wherein the spot check result corresponds to the service information; The message types include Offer Service, Subscribe, and Event Notification. The parsing module is specifically used to: The Ethernet messages are stored in different two-dimensional data tables according to different message types. The two-dimensional data tables include a timestamp field and a service information field.

8. An electronic device, characterized in that: The system comprises a memory and a processor, wherein the processor is configured to implement the steps of the method for automatic inspection of in-vehicle Ethernet services according to any one of claims 1 to 6 when executing a computer management program stored in the memory.

9. A computer-readable storage medium, characterized in that A computer management program is stored thereon, and when the computer management program is executed by the processor, the steps of the automatic inspection method for in-vehicle Ethernet services according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Vehicle-mounted service authorization anti-counterfeiting monitoring method and vehicle

    CN112615850A

  • Consistency testing method for vehicle-mounted Ethernet

    CN113468070A