CN118348958A - Performance test method and device of vehicle-mounted controller, electric vehicle and medium - Google Patents

Performance test method and device of vehicle-mounted controller, electric vehicle and medium Download PDF

Info

Publication number
CN118348958A
CN118348958A CN202410475627.6A CN202410475627A CN118348958A CN 118348958 A CN118348958 A CN 118348958A CN 202410475627 A CN202410475627 A CN 202410475627A CN 118348958 A CN118348958 A CN 118348958A
Authority
CN
China
Prior art keywords
message
information
vehicle
routing
mounted controller
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410475627.6A
Other languages
Chinese (zh)
Inventor
李夫
涂少波
蒋湘鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Selis Phoenix Intelligent Innovation Technology Co ltd
Original Assignee
Chongqing Selis Phoenix Intelligent Innovation Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Selis Phoenix Intelligent Innovation Technology Co ltd filed Critical Chongqing Selis Phoenix Intelligent Innovation Technology Co ltd
Priority to CN202410475627.6A priority Critical patent/CN118348958A/en
Publication of CN118348958A publication Critical patent/CN118348958A/en
Pending legal-status Critical Current

Links

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The application relates to a performance test method and device of a vehicle-mounted controller, an electric vehicle and a medium. The method comprises the following steps: acquiring a DBC file carrying message definition information; the message definition information is definition information for sending and receiving CAN messages; analyzing the DBC file and determining routing information composed of message definition information; based on the routing information, the vehicle-mounted controller is controlled to send CAN messages to the gateway equipment, and corresponding message sending information and message receiving information are recorded, so that the routing forwarding function of the vehicle-mounted controller is realized; based on the message sending information and the message receiving information, a performance test result aiming at the vehicle-mounted controller when the routing forwarding function is executed is obtained. The method can effectively reduce the performance test cost of the vehicle-mounted controller, improve the efficiency and accuracy of performance test of the vehicle-mounted controller, and is beneficial to development and application of electric vehicles.

Description

Performance test method and device of vehicle-mounted controller, electric vehicle and medium
Technical Field
The present application relates to the field of vehicle controllers, and in particular, to a performance testing method of a vehicle controller, a performance testing device of a vehicle controller, an electric vehicle, a computer readable storage medium, and a computer program product.
Background
In the development of automobiles, an on-board gateway controller plays a vital role in an internal communication network of an electric vehicle, and is equivalent to a transportation junction and responsible for information transmission and processing between different modules and different controllers (ECUs). Before the vehicle-mounted gateway controller is applied to an electric vehicle, a series of pressure simulation tests are required to be carried out on the vehicle-mounted gateway controller so as to detect that the performance of the vehicle-mounted gateway controller meets the use requirement.
At present, performance of the vehicle-mounted gateway controller is generally detected by simulating and testing performance of the vehicle-mounted gateway controller when the routing forwarding function is executed. However, in the current simulation test method, a plurality of test programs need to be executed manually, for example, manual analysis is performed on vehicle data and manual analysis is performed on route forwarding data, so that the test process is very complicated and error is easy to occur, and thus the problems of low efficiency and low accuracy of performance test results of the vehicle-mounted controller exist.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a performance testing method of an in-vehicle controller, a performance testing apparatus of an in-vehicle controller, an electric vehicle, a computer-readable storage medium, and a computer program product. The technical scheme of the present disclosure is as follows:
according to a first aspect of an embodiment of the present disclosure, there is provided a performance test method of an in-vehicle controller, including:
acquiring a DBC file carrying message definition information; the message definition information is definition information for sending and receiving CAN messages;
analyzing the DBC file and determining routing information composed of the message definition information;
Based on the routing information, the vehicle-mounted controller is controlled to send CAN messages to gateway equipment, and corresponding message sending information and message receiving information are recorded, so that a routing forwarding function of the vehicle-mounted controller is realized;
And obtaining a performance test result aiming at the vehicle-mounted controller when the routing forwarding function is executed based on the message sending information and the message receiving information.
In an exemplary embodiment, the obtaining, based on the message sending information and the message receiving information, a performance test result for the vehicle-mounted controller when executing the routing forwarding function includes:
And calculating the packet loss rate and the routing time delay of the vehicle-mounted controller when the routing forwarding function is executed based on the message sending information and the message receiving information so as to obtain a performance test result.
In an exemplary embodiment, the message sending information includes a message sending period, a message sending time and a message sending count of a CAN channel to which each CAN message corresponds; the surrounding receiving information comprises a message receiving period, a message receiving time and a message receiving count of each CAN message corresponding to the CAN channel to which the CAN message belongs;
The step of calculating the packet loss rate and the routing delay of the vehicle-mounted controller when the routing forwarding function is executed based on the message sending information and the message receiving information to obtain a performance test result, including:
calculating to obtain a packet loss rate of the vehicle-mounted controller when the routing forwarding function is executed based on the message sending count, the message receiving count, the message sending period and the statistical data between the message receiving periods; and
And calculating the routing time delay of the vehicle-mounted controller when the routing forwarding function is executed based on the statistical data between the message sending time and the message receiving time.
In an exemplary embodiment, the parsing the DBC file to determine routing information composed of the packet definition information includes:
reading out file information of each row in the DBC file based on a preset function;
Respectively carrying out information matching on the file information of each row to obtain message definition information stored in the DBC file; the message definition information at least comprises channel information, message names, unique identifiers, message lengths, message sending identifiers and message receiving identifiers to which the CAN message corresponds;
Constructing a C language data structure body based on the message definition information, and representing routing information through the array content in the C language data structure body; the routing information is used for indicating a routing relation of the vehicle-mounted controller when the routing forwarding function is executed.
In an exemplary embodiment, the controlling the vehicle-mounted controller to send a CAN message to a gateway device based on the routing information, and recording corresponding message sending information and message receiving information, so as to implement a routing forwarding function of the vehicle-mounted controller, includes:
the vehicle-mounted controller is controlled to call a preset first function interface so as to send a plurality of CAN messages to the gateway equipment according to the routing relation based on the function interface, and corresponding message sending information is recorded;
and controlling the gateway equipment to call a preset second function interface to receive a plurality of CAN messages, and recording corresponding message receiving information.
In an exemplary embodiment, the obtaining the DBC file carrying the message definition information includes:
Responding to a test button corresponding to a target test vehicle type triggered by a user in an image interface, and acquiring a file storage path of a DBC file associated with the target test vehicle type; the versions of the routing tables in the DBC files corresponding to the different types of test vehicle types are different, and the routing tables are used for describing the message definition information;
And extracting the DBC file corresponding to the CAN channel from the data folder based on the file storage path.
In an exemplary embodiment, after the obtaining the performance test result for the in-vehicle controller when the routing forwarding function is executed, the method further includes:
and when the performance test result indicates that the routing delay of the target CAN message is larger than a preset threshold, based on a preset function, the channel information, the unique identifier, the message sending period, the message receiving period and the routing delay data of the target CAN message are written into a preset log file for storage.
According to a second aspect of the embodiments of the present disclosure, there is provided a performance test apparatus for an in-vehicle controller, including:
The file acquisition module is used for acquiring the DBC file carrying the message definition information; the message definition information is definition information for sending and receiving CAN messages;
The file analysis module is used for analyzing the DBC file and determining the route information composed of the message definition information;
The function test module is used for controlling the vehicle-mounted controller to send CAN messages to the gateway equipment based on the routing information, and recording corresponding message sending information and message receiving information so as to realize the routing forwarding function of the vehicle-mounted controller;
and the test result module is used for obtaining a performance test result aiming at the vehicle-mounted controller when the routing forwarding function is executed based on the message sending information and the message receiving information.
According to a third aspect of the embodiments of the present disclosure, there is provided an electric vehicle including:
The system comprises a processor and a memory connected with the processor, wherein the memory stores program data, and the processor is used for calling the program data stored in the memory so as to realize the performance test method of the vehicle-mounted controller.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium including therein program data which, when executed by a processor of a computer device, enables the computer device to perform the performance test method of an in-vehicle controller as set forth in any one of the above.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising program instructions therein, which when executed by a processor of a computer device, enable the computer device to perform the method of testing the performance of an in-vehicle controller as described in any one of the above.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
On one hand, the method comprises the steps of analyzing a DBC file carrying message definition information to determine routing information in the DBC file, then controlling a vehicle-mounted controller to send CAN messages to gateway equipment based on the routing information, recording corresponding message sending information and message receiving information, and finally obtaining a performance test result aiming at the vehicle-mounted controller based on the message sending information and the message receiving information, thereby optimizing a performance test flow of the vehicle-mounted controller, effectively improving efficiency of performance test, and reducing consumption of manpower and material resources; on the other hand, the method is different from the existing performance test mode, the DBC file is analyzed to determine the routing information formed by the message definition information, so that the vehicle-mounted controller is controlled to send CAN messages to the gateway equipment based on the routing information, and the corresponding message sending information and message receiving information are recorded, so that the performance test result of the vehicle-mounted controller when the routing forwarding function is executed CAN be obtained by utilizing the message sending information and the message receiving information, the production cost of enterprises is effectively reduced, the efficiency and the accuracy of performance test of the vehicle-mounted controller are improved, and development and application of electric vehicles are facilitated.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are needed in the description of the embodiments of the present application or the related technologies will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other related drawings may be obtained according to these drawings without inventive effort to those of ordinary skill in the art.
Fig. 1 is an application environment diagram illustrating a performance test method of an in-vehicle controller according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating a performance testing method of an in-vehicle controller according to an exemplary embodiment.
FIG. 3 is a flowchart illustrating a step of extracting DBC files according to an exemplary embodiment.
FIG. 4 is a block diagram illustrating a parsing step for a DBC file according to an exemplary embodiment.
Fig. 5 is a block diagram illustrating steps for implementing a routing forwarding function implemented by an in-vehicle controller according to one exemplary embodiment.
Fig. 6 is a block diagram showing a performance test apparatus of an in-vehicle controller according to an exemplary embodiment.
Fig. 7 is a block diagram of an electric vehicle for on-board controller performance testing, according to an example embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The term "and/or" in embodiments of the present application is meant to include any and all possible combinations of one or more of the associated listed items. Also described are: as used in this specification, the terms "comprises/comprising" and/or "includes" specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, and/or components, and/or groups thereof.
The terms "first," "second," and the like in this disclosure are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
In addition, although the terms "first," "second," etc. may be used several times in the present application to describe various operations (or various elements or various applications or various instructions or various data) etc., these operations (or elements or applications or instructions or data) should not be limited by these terms. These terms are only used to distinguish one operation (or element or application or instruction or data) from another operation (or element or application or instruction or data).
The performance test method of the vehicle-mounted controller provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a communication network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server.
In some embodiments, referring to fig. 1, server 104 obtains a DBC file carrying message definition information; the message definition information is definition information for sending and receiving CAN messages; analyzing the DBC file and determining routing information composed of message definition information; based on the routing information, the vehicle-mounted controller is controlled to send CAN messages to the gateway equipment, and corresponding message sending information and message receiving information are recorded, so that the routing forwarding function of the vehicle-mounted controller is realized; based on the message sending information and the message receiving information, a performance test result aiming at the vehicle-mounted controller when the routing forwarding function is executed is obtained.
In some embodiments, the terminal 102 (e.g., mobile terminal, fixed terminal) may be implemented in various forms. The terminal 102 may be a mobile terminal including a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a portable handheld device, a Personal Digital Assistant (PDA), a tablet Personal computer (PAD), etc., and the terminal 102 may also be a fixed terminal of an Automated teller machine (Automated TELLER MACHINE, ATM), an automatic all-in-one machine, a digital TV, a desktop computer, a stationary computer, etc.
In the following, it is assumed that the terminal 102 is a fixed terminal. However, those skilled in the art will appreciate that the configuration according to the disclosed embodiments of the present application can also be applied to a mobile type terminal 102 if there are operations or elements specifically for the purpose of movement.
In some embodiments, the data processing components running on server 104 may load any of a variety of additional server applications and/or middle tier applications being executed, including, for example, HTTP (hypertext transfer protocol), FTP (file transfer protocol), CGI (common gateway interface), RDBMS (relational database management system), and the like.
In some embodiments, the server 104 may be implemented as a stand-alone server or as a cluster of servers. The server 104 may be adapted to run one or more application services or software components that provide the terminal 102 described in the foregoing disclosure.
In some embodiments, the operating systems on which the application services or software components run may include various versions of Microsoft Windows, apple Macintosh, and/or Linux operating systems, various commercial or UNIX-like operating systems (including but not limited to various GNU/Linux operating systems, google Chrome OS, etc.), and/or mobile operating systems, such as iOS, windows Phone, android, OS, blackBerry, palm OS operating systems, and other online or offline operating systems, without specific limitation herein.
In some embodiments, as shown in fig. 2, a method for testing performance of an on-vehicle controller is provided, and the method is applied to the server 104 in fig. 1 for illustration, and the method includes the following steps:
step S11: and acquiring the DBC file carrying the message definition information.
The message definition information is definition information for sending and receiving CAN messages.
The DBC file is a file for carrying Controller Area Network (CAN) message description information. In the automotive industry and other fields, the CAN bus is a common communication protocol for communication between control units.
In one embodiment, the DBC file contains information such as messages, signals, nodes, and communication rates used in the CAN network to exchange and communicate data between the different devices.
In one embodiment, the DBC file is provided by the vehicle manufacturer, which is an important basis for ensuring that the onboard controllers (e.g., gateway controllers) are functioning properly. The source of the routing table in the on-board controller is typically a DBC file, which is a standard data format file that contains definitions of all signals in the vehicle network, such as their IDs, periods, sizes, names, etc. This information is used to generate a routing table for directing the onboard controllers how to process and forward the data packets.
In one embodiment, the DBC file includes various base elements, keywords, and data fields for expressing its particular information meaning.
In some embodiments, the base elements include:
Version, which specifies the format Version of the DBC file, ensures compatibility.
Nodes, which list the number and names of nodes on the CAN bus, each node representing an ECU (electronic control unit), the node name of which is unique.
Messages, which describe Messages transmitted on the CAN bus, include information of their ID, name, length and period.
Signals, which defines the detailed information of the name, length, location, units, factors, ranges, etc. of the individual Signals in each CAN message.
Environment Variables, which may define environment variables, are used to represent constants or variable values.
Value Tables, which create a mapping table between signal values and actual physical values, facilitate data resolution.
Comments, their notes section is used to record additional information or instructions about the CAN bus.
In some embodiments, the keywords include:
Bu_, followed by a series of space-separated node names, which must be unique throughout the DBC file.
Bo_, which refers to a message or message, containing its attributes and related signals.
Sg_, which is used to define the properties of the individual signals, such as their position in the message and the number of bits occupied.
In some embodiments, the data field includes: the DBC file is capable of handling 8 bytes of hexadecimal CAN messages and raw CAN data, and the data field of a CAN frame may contain at most 8 single byte values, 64 single bit values, or a 64-bit value, or any combination of these values.
In one embodiment, the CAN message is a bit sequence describing the CAN signal emitted by the target vehicle.
In one embodiment, the CAN message is a data unit transmitted on the CAN bus, and includes information such as an identifier of the sender, a control field, a data field, and a check field. The CAN message may carry one or more CAN signals. The CAN signal is a data segment in a CAN message that is used to represent a particular message or parameter. A CAN message may contain a plurality of CAN signals, each having its own start bit, length, data type and value range.
In practical applications, CAN signals are typically used to represent specific information such as sensor data, actuator control commands, and the like. The CAN message carries one or more CAN signals, so that data exchange and communication among different control units are realized. By analyzing the CAN signal in the CAN message, the receiving end CAN acquire the specific data content sent by the sending end, thereby realizing real-time communication and data exchange between the systems.
Step S12: and analyzing the DBC file to determine the routing information composed of the message definition information.
In some embodiments, the server may first perform file reading on the DBC file, such as using a file reading function in a programming language (e.g., C-speech, python, etc.), opening and reading the DBC file to read the contents of the DBC file into a data structure in memory for subsequent text scanning and analysis; then scanning the text, namely traversing the read DBC file content, and scanning the text line by line, wherein in the scanning process, a regular expression (regular expression) CAN be used for matching the definition of the CAN message so as to determine the message information of the CAN message, namely in the scanning process, searching the row containing the definition of the CAN message (for example, screening the row at the beginning of a 'BO_', the content of a keyword 'BO_' is a unique identifier of the message, and then sequentially a message name, a message length and a sending/receiving mark) so as to determine the message definition information of the CAN message by matching the rows, wherein the message definition information is used for forming a routing table in the DBC file; and finally, generating routing information for representing the routing relation according to the message definition information in the routing table, and importing the routing information into a program for subsequent processing and use.
In development of the electric automobile, a common storage format of the routing table is a DBC file, that is, the server stores the message definition information of each CAN channel in the corresponding DBC file in advance according to the form of the routing table.
The routing information representing the routing relation is used for indicating which CAN channel a certain target CAN message belongs to, which CAN channel is sent out in what sending period, and which CAN channel(s) are finally sent to.
Step S13: based on the routing information, the vehicle-mounted controller is controlled to send CAN messages to the gateway equipment, and corresponding message sending information and message receiving information are recorded, so that the routing forwarding function of the vehicle-mounted controller is realized.
Specifically, the server CAN control the vehicle-mounted controller to call a preset function interface on one hand, continuously send a plurality of CAN messages to the gateway equipment according to the routing relation corresponding to the routing information, and record the corresponding message sending information. The server CAN control the gateway equipment to call a preset function interface to receive the CAN message according to the routing relation corresponding to the routing information, and record the corresponding message receiving information.
In one embodiment, the message sending information includes a message sending period, a message sending time and a message sending count of each CAN message corresponding to the corresponding CAN channel; and the surrounding receiving information comprises a message receiving period, a message receiving time and a message receiving count of each CAN message corresponding to the belonged CAN channel.
Step S14: based on the message sending information and the message receiving information, a performance test result aiming at the vehicle-mounted controller when the routing forwarding function is executed is obtained.
Specifically, the server calculates a packet loss rate and a routing delay of the vehicle-mounted controller when the routing forwarding function is executed based on the message sending information and the message receiving information, so as to obtain a performance test result.
The process of calculating the packet loss rate of the vehicle-mounted controller when executing the routing forwarding function by the server based on the message sending information and the message receiving information can comprise the following steps: and calculating to obtain the packet loss rate of the vehicle-mounted controller when the routing forwarding function is executed based on the message sending count, the message receiving count, the message sending period and the statistical data between the message receiving periods.
In an exemplary embodiment, the server may calculate the packet loss rate of the vehicle-mounted controller when executing the route forwarding function based on the following packet loss rate calculation formula:
lost=rxCount-txCount*txPeriod/rxCount。
Wherein lost is lost, rxCount is message receiving count, txCount is message sending count, txPeriod is message sending period.
The process of calculating the routing delay of the vehicle-mounted controller when executing the routing forwarding function by the server based on the message sending information and the message receiving information can comprise the following steps: and calculating to obtain the routing time delay of the vehicle-mounted controller when the routing forwarding function is executed based on the statistical data between the message sending time and the message receiving time.
In an exemplary embodiment, the server may calculate the routing delay of the vehicle-mounted controller when performing the routing forwarding function based on the following routing delay calculation formula:
difLatency=(rxTime-txTime)/1000000。
wherein DIFLATENCY is a routing delay (the unit is converted from nanosecond to millisecond), rxTime is a message receiving time, and txTime is a message transmitting time.
In some embodiments, the server may perform performance assessment, optimization guidance, and quality control for the on-board controller based on the performance test results. Specifically, in the first aspect, the server can perform quantitative evaluation of routing performance on the vehicle-mounted controllers with different models and versions, so as to help a developer to know the performance of the product under the condition of high load; in the second aspect, the server provides data support and improvement direction for further optimization of the vehicle-mounted controller by taking the packet loss rate and the routing delay as measurement indexes; in a third aspect, the onboard controllers are pressure tested prior to release of the associated vehicle product to ensure reliability of the onboard controllers under extreme conditions, thereby improving product quality.
In the performance test process of the vehicle-mounted controller, on one hand, the method comprises the steps of firstly analyzing the DBC file carrying the message definition information to determine the routing information in the DBC file, then controlling the vehicle-mounted controller to send CAN messages to gateway equipment based on the routing information, recording corresponding message sending information and message receiving information, and finally obtaining a performance test result aiming at the vehicle-mounted controller based on the message sending information and the message receiving information, thereby optimizing the performance test flow of the vehicle-mounted controller, effectively improving the efficiency of performance test and reducing the consumption of manpower and material resources; on the other hand, the method is different from the existing performance test mode, the DBC file is analyzed to determine the routing information formed by the message definition information, so that the vehicle-mounted controller is controlled to send CAN messages to the gateway equipment based on the routing information, and the corresponding message sending information and message receiving information are recorded, so that the performance test result of the vehicle-mounted controller when the routing forwarding function is executed CAN be obtained by utilizing the message sending information and the message receiving information, the production cost of enterprises is effectively reduced, the efficiency and the accuracy of performance test of the vehicle-mounted controller are improved, and development and application of electric vehicles are facilitated.
It will be appreciated by those skilled in the art that in the above-described methods of the embodiments, the disclosed methods may be implemented in a more specific manner. For example, the embodiment described above in which the server controls the in-vehicle controller to send the CAN message to the gateway device based on the routing information, and records the corresponding message sending information and message receiving information to implement the routing forwarding function of the in-vehicle controller is merely illustrative.
The performance test method of the vehicle-mounted controller disclosed by the application can be applied to an automobile development tool, such as VEHICLE SPY. The automobile development tool integrates the functions of diagnosis, node/ECU (Electronic Control Unit) simulation, data acquisition, automatic test, in-car communication network monitoring and the like, and can communicate with various vehicle-mounted ECUs through connecting hardware equipment (such as gateway equipment).
In some embodiments, the automotive development tool includes a hardware connection Function (SetUp-HardWare), a message view page (Spy Networks-Messages), an image panel (measure-GRAPHICAL PANELS), a reuse software module (Function Block), data variables (Application Signal), and a c-code interface (C Code lnterface).
The Function Block can run engineers to configure corresponding scripts and automatically execute the scripts so as to complete tasks of automatic execution.
Wherein the hardware connection function is used for connecting the automobile development tool with a hardware device (such as a gateway device).
The graphical interface is a user interface or a graphical interface in an automobile development tool, which allows engineers to customize the user interface, supporting adding a plurality of different types of tools, such as charts (graphs), bar-graphs, send buttons (transmitbuttons), drop-down menus (dropdowns), test buttons (test buttons), meters (meters), handles (knobs), displays (LEDs/lights), text displays (numericentrybox), and the like. Each tool can be resized and placed on the faceplate as desired. A set of tools and their test buttons may be selected and set in alignment. After the display is set, the panel may be locked to prevent tool position changes due to mouse movement. Engineers may create a collection of some graphical panels and distribute them to other people.
Wherein Application Signal is used to store variables that can hold values set by the user or that do not have to infer a computed signal from the network message. For example, a signal is created whose value changes with the function generator when it is associated with the function generator.
Wherein the c-code interface (C Code lnterface) provides a way to communicate with a communication protocol operated by the automotive development tool using the c-code. The use of the C code in the automotive development tool can reuse all of the functionality of the automotive development tool, such as: message decoding, message acceptance, database decoding, signal display, buffer capture, etc., the c-code interface supports event and step-by-step process type programming.
In one embodiment, the server may execute the following steps to perform the functions of the vehicle development tool according to the present application, as follows:
step one: and adding signal variables in Application Signal functions, wherein the added variables are used as variables in a C Code Interface and are transmitted to codes by a value selected by a user in a system Interface, such as variables representing a start signal, a load, a packet loss number, a time delay, a test vehicle type dbc file storage path and the like.
Step two: adding the signal variable in the first step into a C Code Interface-Edit-EVENT HANDLER Code, and then generating a C Code function variable and an Interface of a corresponding message by the C Code Interface, so that an engineer can control the input and the output of the corresponding variable by calling the interfaces in a C Code; the generated information responds to the button management of the function interface and the image interface, and when an engineer clicks the button of the image interface, the function interface in the corresponding C code is executed to realize logic expected by the engineer.
Step three: in GRAPHICAL PANELS, various buttons required for realizing the functions of the automobile development tool are added, and the buttons are associated with corresponding signal messages and signal variables in the attribute setting function-signal function of each button so as to realize the functions of controlling the whole automobile development tool and the output functions in the display program.
In some embodiments, the implementation of the functions of the automobile development tool is as follows:
Testing the ECU function: and adding a drop down list button on the image interface, editing the following options on the attribute page, and adding a supported gateway controller. Its value is associated to variable GWTstSW, and the different gateway controller programs are switched in accordance with variable GWTstSW in the C code of CCodeInterface.
Testing the functions of a vehicle model: the drop down list button is used for selecting different DBCs to import into the C code CCodeInterface. And adding a drop down list button on the image interface, editing the following options on the attribute page, and adding a storage path of the DBC file of the routing table supporting the test. And associating the values of the routing table with the variables GWTSTVEHICLETYPE, reading the DBC file of the corresponding routing table according to the values of the variables GWTSTVEHICLETYPE in the C code of CCodeInterface, and analyzing the routing relation of the messages and the sending periods of different messages according to the format of the DBC file.
Starting the operation function: an on off button control program is added to run and is associated with the C code of control CCodeInterface in variable GWTset On Off to begin execution.
Channel name acquisition function: typed in by the interface, different DBC files may have slightly different CAN channel names per way.
Current load calculation function: adding TextDisplay buttons for each CAN channel, setting the associated model of the buttons as 'percentage Use' of the corresponding CAN channel on the attribute page of the buttons, and automatically calculating and obtaining the function by hardware equipment.
Maximum load recording function: the maximum load value during program operation is recorded.
Packet loss statistics function: and counting whether each can channel has the number of route forwarding packet losses or not. One TextDisplay button is added to each CAN channel and variables MsgRouteLost are associated in its properties page. The button has a numerical display function for displaying a load array variable MsgRouteLost added to the variable, the value of which is calculated in the C Code Interface C Code.
Wherein variable MsgRouteLost represents the case of a message loss. In a communication system, a transmitted message is considered to be lost if it fails to reach the target node. This may be due to network failure, transmission errors, node failure, etc. Message loss may lead to data inconsistencies in the communication system, and thus the communication system is designed with consideration for the message loss and corresponding measures taken.
And (3) a time delay counting function: and counting the time delay of each can channel route forwarding. One TextDisplay button is added to each CAN channel and variables MsgRouteLatency are associated in its properties page. The button has a numerical display function for displaying a delay array variable MsgRouteLatency added to the variable, the value of the array being calculated in the C Code Interface C Code.
Where variable MsgRouteLatency represents the delay time of message transmission. In a communication system, a certain delay exists in the transmission process of a message from a sending end to a receiving end, and the delay time is the delay of message transmission. The delay in message transmission is affected by a number of factors including network congestion, transmission distance, transmission medium, etc. In a real-time communication system, a delay time of message transmission is generally required to be controlled within a certain range to ensure real-time performance and reliability of the system.
Increasing the load function: for displaying the increased load value of the manual load control.
Load control function: the method is used for realizing the load increasing and decreasing function of each CAN channel so as to simulate and test the performance of the gateway controller under different load conditions. One TextDisplay button is added to each CAN channel and variables NetworkLoadCtr are associated in its properties page. Meanwhile, the button has a numerical display function for displaying a load array variable NetworkLoadCtr added in the variable, and the value of the array is used for controlling the transmission quantity of the load message in the C code of CCodeInterface.
Where variable NetworkLoadCtr represents a network load controller. In network communication systems, network load controllers are typically used to monitor and manage network loads to ensure reasonable utilization of network resources and stable system performance. The network load controller can dynamically adjust the data transmission rate, optimize the data transmission path, realize the load balancing and other functions according to the network traffic condition, thereby effectively managing the network load and improving the reliability and efficiency of the network.
When an engineer increases or decreases the value of load control on a graphical interface, a variable NetworkLoadCtr array corresponding to a program is changed, the current CAN channel load and the magnitude of input load are judged, and if the current CAN channel load is less than the magnitude of the input load, the ① increases the sending rate of a load message; ② If the current CAN channel load is larger than the input load, the sending rate of the load message is reduced.
The load message is a message specially filled for controlling the load in the program C, the message CANid is obtained from a routing table, the length is unified to be 8 (CAN)/64 (CANFD), and each bit of data is automatically and circularly filled with a value of 0x00-0 xff.
In an exemplary embodiment, referring to fig. 3, fig. 3 is a flow chart illustrating an embodiment of extracting DBC files according to the present application. In step S11, that is, a process that the server obtains the DBC file carrying the message definition information, specifically includes the following steps:
step S111: and responding to the triggering of a test button corresponding to the target test vehicle type in the image interface by a user, and acquiring a file storage path of the DBC file associated with the target test vehicle type.
The versions of the routing tables in the DBC files corresponding to the different types of test vehicle types are different, and the routing tables are used for describing message definition information.
Step S112: and extracting DBC files corresponding to the CAN channels from the data folder based on the file storage path.
Specifically, an engineer firstly triggers a test button corresponding to a target test vehicle model in an image interface, and then a server acquires a file storage path of a DBC file associated with the target test vehicle model; and finally, the server extracts the DBC file corresponding to the CAN channel from the data folder according to the file storage path.
In an exemplary embodiment, referring to fig. 4, fig. 4 is a flow chart illustrating an embodiment of parsing a DBC file according to the present application. In step S12, that is, the server parses the DBC file to determine the routing information composed of the message definition information, the method specifically includes the following steps:
Step S121: based on a preset function, reading out file information of each row in the DBC file.
In some embodiments, the server may input the file storage path of the DBC file into the fopen () function, so that the fopen () function opens the DBC file, and reads out each line of file information in the DBC file by a fget method.
Step S122: and respectively carrying out information matching on the file information of each row to obtain the message definition information stored in the DBC file.
The message definition information at least comprises channel information, message names, unique identifiers, message lengths, message sending identifiers and message receiving identifiers to which the CAN messages correspond.
In some embodiments, the server may use an if (line. Sub (0, 3) = = "bu_") statement to screen the line beginning with "bu_") from the file information, so as to obtain the channel information to which the CAN packet corresponds. Wherein, the CAN channel is the content after the key word BU_, such as BU_: node_1 GW represents Node_1 channel.
In some embodiments, the server may use an if (line. Sub (0, 3) = = "bo_") statement to screen the line beginning with "bo_", the key "bo_" is followed by a unique identifier, and then a message name, a message length, a message sending identifier/a message receiving identifier in sequence. The content analyzed by BO_ 261 VCU1_vehicleTorque_105:8Node_1 is as follows: canid =261, packet name vcu1_ vehicleTorque _105, packet length=8, and the packet is sent out on the CAN channel of node_1. If the message is the channel, the final transmitting/receiving standard is GW.
In some embodiments, the server may use an if (line. Sub (0, 3) = = "ba_") statement to screen the line beginning with "ba_") from the file information, so as to obtain the message sending period corresponding to the CAN message. The content after the keyword "BA_" is a message sending period, for example, BA_ "GENMSGCYCLETIME" BO_324 10, and the period of the representative message GENMSGCYCLETIME is 10ms.
Step S123: constructing a C language data structure body based on the message definition information, and representing the routing information through the array content in the C language data structure body.
The routing information is used for indicating the routing relation of the vehicle-mounted controller when the vehicle-mounted controller executes the routing forwarding function.
The server CAN better organize and manage the message information in CAN communication by defining a data structure body corresponding to the CAN message, so that the program CAN conveniently analyze and process the CAN message data. In practical embedded system development, a data structure corresponding to a CAN message is generally used to describe various states and parameter information of an electric vehicle, so that the system CAN accurately analyze and process CAN message data.
In some embodiments, the server may first create a container map using a C language structure simulation, where the key of the container map is a unique identifier of each CAN message, that is, a message ID, and the value of the container map is an array whose array content is a channel name, a message length, a message period, and a message transmission/reception flag of the container map on the occurring CAN channel; then, the server stores all the analyzed message definition information into the map according to the unique identifier of the CAN message so as to be used for representing the C language data structure body of the route information, so that the value in the data structure body CAN be used for obtaining the CAN channel of which path the CAN message is sent out from, which message period is sent out and transmitted to which path(s).
In an exemplary embodiment, referring to fig. 5, fig. 5 is a schematic flow chart of an embodiment of implementing a routing forwarding function by an in-vehicle controller according to the present application. In step S13, that is, the server controls the vehicle-mounted controller to send a CAN message to the gateway device based on the routing information, and records corresponding message sending information and message receiving information, so as to implement a process of a routing forwarding function of the vehicle-mounted controller, and specifically includes the following steps:
Step S131: and controlling the vehicle-mounted controller to call a preset first function interface so as to send a plurality of CAN messages to the gateway equipment according to the routing relation based on the function interface, and recording corresponding message sending information.
Specifically, the server may control the vehicle-mounted controller to call a preset first function interface to continuously send a plurality of CAN messages to the gateway device according to the routing relationship corresponding to the routing information, and record corresponding message sending information.
The server CAN simulate the vehicle-mounted controller to send CAN messages to the gateway equipment so as to test whether the CAN messages CAN be forwarded, wherein the server CAN control the related variable Network Load Ctr according to the real-time Load of the vehicle-mounted control to increase or decrease the frequency of message sending, and the frequency of message sending CAN be controlled by using a millisecond timer.
In an embodiment, the server may control the vehicle-mounted controller to call the GENERIC MESSAGE TRANSMIT () function Interface corresponding to the C Code frame in the C Code Interface to continuously send CAN messages to the gateway device, and when the sending is successful, record the message sending count txCount, the message sending period txPeriod and the message sending time txTime of the CAN channel to which the CAN message corresponds to in the structural variables.
In the process of sending the CAN message, the count value of the sent CAN message CAN be automatically filled to be 0x 00-0 xFF.
Step S132: and the control gateway equipment calls a preset second function interface to receive a plurality of CAN messages and records corresponding message receiving information.
Specifically, the server may control the gateway device to call a preset second function interface, receive each CAN message sent by the vehicle-mounted controller according to the routing relationship corresponding to the routing information, and record corresponding message receiving information.
In an embodiment, the server may control the gateway device to call a EVERY MESSAGE () function Interface corresponding to the C Code frame in the C Code Interface to receive each CAN message sent by the vehicle controller. The function interface automatically executes corresponding message logic every time the gateway equipment grabs the CAN message every time, and records the message receiving period rxPeriod of the corresponding CAN channel of each CAN message received by the gateway equipment, the message receiving time rxTime and the message receiving count rxCount. Wherein the gateway device counts up a CAN message whenever it receives it.
In an exemplary embodiment, after the server obtains the performance test result when the routing forwarding function is executed for the vehicle-mounted controller, the method may further include the following steps: when the performance test result shows that the routing delay of the target CAN message is larger than a preset threshold, based on a preset function, the channel information, the unique identifier, the message sending period, the message receiving period and the routing delay data of the target CAN message are written into a preset log file for storage.
Specifically, when the server calculates that the routing delay of a certain target CAN message is greater than a preset threshold, the vehicle-mounted controller is characterized in that the routing delay is abnormal when the routing forwarding function is executed on the target CAN message, and then the server automatically uses a preset function (such as an fwrite function) to write the CAN channel information, the unique identifier, the message sending period, the message receiving period and the routing delay data of the target CAN message into a log file for storage, so that an engineer CAN follow-up data tracking, and potential faults CAN be prevented before actual deployment.
In another exemplary embodiment, after the server obtains the performance test result when the routing forwarding function is performed for the in-vehicle controller, the method may further include the steps of: based on a preset function, the channel information, the unique identifier and the performance test result of each CAN message are written into a preset log file for storage.
Specifically, when the vehicle-mounted controller executes the routing forwarding function and obtains the corresponding performance test result, the vehicle-mounted controller is characterized in that the vehicle-mounted controller executes the routing forwarding function on all CAN messages, and then the server automatically uses a preset function (such as an fwrite function) to write CAN channel information, a unique identifier and the performance test result of each CAN message into a log file for storage, so that an engineer CAN follow-up data tracking, and potential faults CAN be prevented before actual deployment.
On one hand, the method comprises the steps of firstly analyzing a DBC file carrying message definition information to determine routing information in the DBC file, then controlling a vehicle-mounted controller to send CAN messages to gateway equipment based on the routing information, recording corresponding message sending information and message receiving information, and finally obtaining performance test results aiming at the vehicle-mounted controller based on the message sending information and the message receiving information, so that the performance test flow of the vehicle-mounted controller is optimized, the efficiency of performance test is effectively improved, and the consumption of manpower and material resources is reduced; on the other hand, the method is different from the existing performance test mode, the DBC file is analyzed to determine the routing information formed by the message definition information, so that the vehicle-mounted controller is controlled to send CAN messages to the gateway equipment based on the routing information, and the corresponding message sending information and message receiving information are recorded, so that the performance test result of the vehicle-mounted controller when the routing forwarding function is executed CAN be obtained by utilizing the message sending information and the message receiving information, the production cost of enterprises is effectively reduced, the efficiency and the accuracy of performance test of the vehicle-mounted controller are improved, and development and application of electric vehicles are facilitated.
It should be understood that, although the steps in the figures of fig. 2-5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps may be performed in other sequences without strict order of execution unless explicitly stated herein. Moreover, at least a portion of the steps of fig. 2-5 may include multiple steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the steps or stages are performed necessarily occur sequentially, but may be performed alternately or alternately with at least a portion of the steps or stages in other steps or other steps.
It should be understood that the same/similar parts of the embodiments of the method described above in this specification may be referred to each other, and each embodiment focuses on differences from other embodiments, and references to descriptions of other method embodiments are only needed.
Fig. 6 is a block diagram of a performance testing apparatus for a vehicle-mounted controller according to an embodiment of the present application. Referring to fig. 6, the performance test apparatus 10 of the in-vehicle controller includes: a file acquisition module 11, a file analysis module 12, a function test module 13 and a test result module 14.
The file obtaining module 11 is configured to obtain a DBC file carrying message definition information; the message definition information is definition information for sending and receiving CAN messages;
The file parsing module 12 is configured to parse the DBC file and determine routing information composed of the message definition information;
the function test module 13 is configured to control the vehicle-mounted controller to send a CAN message to the gateway device based on the routing information, and record corresponding message sending information and message receiving information, so as to implement a routing forwarding function of the vehicle-mounted controller;
The test result module 14 is configured to obtain a performance test result for the vehicle-mounted controller when the routing forwarding function is executed, based on the message sending information and the message receiving information.
In one embodiment, the idle operation data includes power generation rotational speed data, ambient temperature data, and idle operation duration;
in the aspect of obtaining the performance test result for the vehicle-mounted controller when executing the routing forwarding function based on the message sending information and the message receiving information, the performance test device 10 of the vehicle-mounted controller is further configured to execute:
And calculating the packet loss rate and the routing time delay of the vehicle-mounted controller when the routing forwarding function is executed based on the message sending information and the message receiving information so as to obtain a performance test result.
In an embodiment, the message sending information includes a message sending period, a message sending time and a message sending count of a CAN channel to which each CAN message corresponds; the surrounding receiving information comprises a message receiving period, a message receiving time and a message receiving count of each CAN message corresponding to the CAN channel to which the CAN message belongs;
in the aspect of calculating the packet loss rate and the routing delay of the vehicle-mounted controller when executing the routing forwarding function based on the message sending information and the message receiving information so as to obtain a performance test result, the performance test device 10 of the vehicle-mounted controller is further configured to execute:
calculating to obtain a packet loss rate of the vehicle-mounted controller when the routing forwarding function is executed based on the message sending count, the message receiving count, the message sending period and the statistical data between the message receiving periods; and
And calculating the routing time delay of the vehicle-mounted controller when the routing forwarding function is executed based on the statistical data between the message sending time and the message receiving time.
In one embodiment, in the aspect of parsing the DBC file to determine the routing information composed of the message definition information, the performance test apparatus 10 of the in-vehicle controller is further configured to perform:
reading out file information of each row in the DBC file based on a preset function;
Respectively carrying out information matching on the file information of each row to obtain message definition information stored in the DBC file; the message definition information at least comprises channel information, message names, unique identifiers, message lengths, message sending identifiers and message receiving identifiers to which the CAN message corresponds;
Constructing a C language data structure body based on the message definition information, and representing routing information through the array content in the C language data structure body; the routing information is used for indicating a routing relation of the vehicle-mounted controller when the routing forwarding function is executed.
In an embodiment, in the aspect of controlling the vehicle-mounted controller to send a CAN message to a gateway device based on the routing information and recording corresponding message sending information and message receiving information to implement a routing forwarding function of the vehicle-mounted controller, the performance test device 10 of the vehicle-mounted controller is further configured to perform:
the vehicle-mounted controller is controlled to call a preset first function interface so as to send a plurality of CAN messages to the gateway equipment according to the routing relation based on the function interface, and corresponding message sending information is recorded;
and controlling the gateway equipment to call a preset second function interface to receive a plurality of CAN messages, and recording corresponding message receiving information.
In an embodiment, in the aspect of acquiring the DBC file carrying the message definition information, the performance test apparatus 10 of the vehicle-mounted controller is further configured to perform:
Responding to a test button corresponding to a target test vehicle type triggered by a user in an image interface, and acquiring a file storage path of a DBC file associated with the target test vehicle type; the versions of the routing tables in the DBC files corresponding to the different types of test vehicle types are different, and the routing tables are used for describing the message definition information;
And extracting the DBC file corresponding to the CAN channel from the data folder based on the file storage path.
In one embodiment, after the performance test result for the in-vehicle controller is obtained when the routing forwarding function is executed, the performance test device 10 of the in-vehicle controller is further configured to execute:
and when the performance test result indicates that the routing delay of the target CAN message is larger than a preset threshold, based on a preset function, the channel information, the unique identifier, the message sending period, the message receiving period and the routing delay data of the target CAN message are written into a preset log file for storage.
Fig. 7 is a block diagram of an electric vehicle provided by an embodiment of the present application. Referring to fig. 7, the electric vehicle includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the electric vehicle is configured to provide computing and control capabilities. The memory of the electric vehicle includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the electric vehicle is used for storing mileage maintenance data of the electric vehicle. The input/output interface of the electric vehicle is used for exchanging information between the processor and an external device. The communication interface of the electric vehicle is used for communicating with an external terminal through a network connection. The computer program, when executed by the processor, implements the performance test method of the in-vehicle controller as described above.
In some embodiments, the electric vehicle is an electronic device in which a computing system may run one or more operating systems, including any of the operating systems discussed above as well as any commercially available server operating systems. The electric vehicle may also run any of a variety of additional server applications and/or middle tier applications, including HTTP (hypertext transfer protocol) servers, FTP (file transfer protocol) servers, CGI (common gateway interface) servers, super servers, database servers, and the like. Exemplary database servers include, but are not limited to, those commercially available from (International Business machines) and the like.
In some embodiments, the processor generally controls overall operation of the electric vehicle, such as operations associated with display, data processing, data communication, and recording operations. The processor may include one or more processor components to execute a computer program to perform all or part of the steps of the methods described above. Further, the processor component may include one or more modules that facilitate interactions between the processor component and other components. For example, the processor assembly may include a multimedia module to facilitate controlling interactions between the user electric vehicle and the processor with the multimedia assembly.
The embodiment of the application provides a computer readable storage medium. The computer readable storage medium stores a computer program, wherein the computer program when executed by a processor implements the performance test method of the vehicle-mounted controller.
The units integrated with the functional units in the various embodiments of the present application may be stored in a computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be embodied essentially or partly in the form of a software product or all or part of the technical solution, where the computer-readable storage medium includes several instructions to cause a computer device (which may be a personal computer, a system server, or a network device, etc.), an electronic device (such as MP3, MP4, etc., also may be a smart terminal such as a mobile phone, a tablet computer, a wearable device, etc., also may be a desktop computer, etc.), or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application.
The embodiment of the application provides a computer program product. The computer program product includes program instructions executable by a processor of an electric vehicle to implement a method of testing performance of an onboard controller as described above.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided with a performance testing method of an in-vehicle controller, a performance testing apparatus of an in-vehicle controller, an electric vehicle, a computer readable storage medium, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer program instructions (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods of testing performance of an in-vehicle controller, apparatus for testing performance of an in-vehicle controller, an electric vehicle, a computer-readable storage medium, or a computer program product according to embodiments of the application. It will be understood that each flowchart and/or block of the flowchart and/or block diagrams, and combinations of flowcharts and/or block diagrams, can be implemented by computer program products. These computer program products may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the program instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program products may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the program instructions stored in the computer program product produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the program instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that the descriptions of the above methods, apparatuses, electronic devices, computer-readable storage media, computer program products and the like according to the method embodiments may further include other implementations, and specific implementations may refer to descriptions of related method embodiments, which are not described herein in detail.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A performance test method for a vehicle-mounted controller, the method comprising:
acquiring a DBC file carrying message definition information; the message definition information is definition information for sending and receiving CAN messages;
analyzing the DBC file and determining routing information composed of the message definition information;
Based on the routing information, the vehicle-mounted controller is controlled to send CAN messages to gateway equipment, and corresponding message sending information and message receiving information are recorded, so that a routing forwarding function of the vehicle-mounted controller is realized;
And obtaining a performance test result aiming at the vehicle-mounted controller when the routing forwarding function is executed based on the message sending information and the message receiving information.
2. The method according to claim 1, wherein the obtaining, based on the message sending information and the message receiving information, a performance test result for the vehicle-mounted controller when executing the routing forwarding function includes:
And calculating the packet loss rate and the routing time delay of the vehicle-mounted controller when the routing forwarding function is executed based on the message sending information and the message receiving information so as to obtain a performance test result.
3. The method of claim 2, wherein the message transmission information includes a message transmission period, a message transmission time and a message transmission count of a CAN channel to which each CAN message corresponds; the surrounding receiving information comprises a message receiving period, a message receiving time and a message receiving count of each CAN message corresponding to the CAN channel to which the CAN message belongs;
The step of calculating the packet loss rate and the routing delay of the vehicle-mounted controller when the routing forwarding function is executed based on the message sending information and the message receiving information to obtain a performance test result, including:
calculating to obtain a packet loss rate of the vehicle-mounted controller when the routing forwarding function is executed based on the message sending count, the message receiving count, the message sending period and the statistical data between the message receiving periods; and
And calculating the routing time delay of the vehicle-mounted controller when the routing forwarding function is executed based on the statistical data between the message sending time and the message receiving time.
4. The method of claim 1, wherein parsing the DBC file to determine routing information comprised of the message definition information comprises:
reading out file information of each row in the DBC file based on a preset function;
Respectively carrying out information matching on the file information of each row to obtain message definition information stored in the DBC file; the message definition information at least comprises channel information, message names, unique identifiers, message lengths, message sending identifiers and message receiving identifiers to which the CAN message corresponds;
Constructing a C language data structure body based on the message definition information, and representing routing information through the array content in the C language data structure body; the routing information is used for indicating a routing relation of the vehicle-mounted controller when the routing forwarding function is executed.
5. The method of claim 4, wherein the controlling the vehicle-mounted controller to send a CAN message to a gateway device based on the routing information, and recording corresponding message sending information and message receiving information, so as to implement a routing forwarding function of the vehicle-mounted controller, includes:
the vehicle-mounted controller is controlled to call a preset first function interface so as to send a plurality of CAN messages to the gateway equipment according to the routing relation based on the function interface, and corresponding message sending information is recorded;
and controlling the gateway equipment to call a preset second function interface to receive a plurality of CAN messages, and recording corresponding message receiving information.
6. The method of claim 1, wherein the obtaining the DBC file carrying the message definition information comprises:
Responding to a test button corresponding to a target test vehicle type triggered by a user in an image interface, and acquiring a file storage path of a DBC file associated with the target test vehicle type; the versions of the routing tables in the DBC files corresponding to the different types of test vehicle types are different, and the routing tables are used for describing the message definition information;
And extracting the DBC file corresponding to the CAN channel from the data folder based on the file storage path.
7. The method of claim 1, further comprising, after the obtaining the performance test result for the in-vehicle controller when performing the route forwarding function:
and when the performance test result indicates that the routing delay of the target CAN message is larger than a preset threshold, based on a preset function, the channel information, the unique identifier, the message sending period, the message receiving period and the routing delay data of the target CAN message are written into a preset log file for storage.
8. A performance testing apparatus for an in-vehicle controller, the apparatus comprising:
The file acquisition module is used for acquiring the DBC file carrying the message definition information; the message definition information is definition information for sending and receiving CAN messages;
The file analysis module is used for analyzing the DBC file and determining the route information composed of the message definition information;
The function test module is used for controlling the vehicle-mounted controller to send CAN messages to the gateway equipment based on the routing information, and recording corresponding message sending information and message receiving information so as to realize the routing forwarding function of the vehicle-mounted controller;
and the test result module is used for obtaining a performance test result aiming at the vehicle-mounted controller when the routing forwarding function is executed based on the message sending information and the message receiving information.
9. An electric vehicle comprising a processor and a memory coupled to the processor, wherein the memory has program data stored therein, the processor being configured to retrieve the program data stored in the memory to perform the method of any of claims 1-7.
10. A computer readable storage medium having stored therein program instructions, which when executed by a processor, implement the method of any of claims 1-7.
CN202410475627.6A 2024-04-19 2024-04-19 Performance test method and device of vehicle-mounted controller, electric vehicle and medium Pending CN118348958A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410475627.6A CN118348958A (en) 2024-04-19 2024-04-19 Performance test method and device of vehicle-mounted controller, electric vehicle and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410475627.6A CN118348958A (en) 2024-04-19 2024-04-19 Performance test method and device of vehicle-mounted controller, electric vehicle and medium

Publications (1)

Publication Number Publication Date
CN118348958A true CN118348958A (en) 2024-07-16

Family

ID=91811452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410475627.6A Pending CN118348958A (en) 2024-04-19 2024-04-19 Performance test method and device of vehicle-mounted controller, electric vehicle and medium

Country Status (1)

Country Link
CN (1) CN118348958A (en)

Similar Documents

Publication Publication Date Title
CN111083225B (en) Data processing method and device in Internet of things platform and Internet of things platform
US11914605B2 (en) Database system for time series data storage, processing, and analysis
CN108563214A (en) Vehicular diagnostic method, device and equipment
WO2023155619A1 (en) Fault diagnosis method and apparatus, vehicle, and storage medium
US11740997B2 (en) Method and apparatus for debugging a device
CN111198797A (en) Operation monitoring method and device and operation analysis method and device
KR20120133711A (en) Apparatus and method for providing vehicle data for testing product
US20240179045A1 (en) Method and Apparatus for Determining Network Fault Root Cause, Device, and Storage Medium
CN113010208B (en) Version information generation method, device, equipment and storage medium
US20200117799A1 (en) Graphical user interface tool for configuring a vehicle's intrusion detection system
CN111506305B (en) Tool pack generation method, device, computer equipment and readable storage medium
CN106892134B (en) Virtual instrument testing method and device
CN114896168B (en) Quick debugging system, method and memory for automatic driving algorithm development
CN118348958A (en) Performance test method and device of vehicle-mounted controller, electric vehicle and medium
CN109144864B (en) Method and device for testing window
CN115348320A (en) Communication data conversion method and device and electronic equipment
CN112612663B (en) Method for reversely solving 1553B bus ICD
CN111966394B (en) ETL-based data analysis method, device, equipment and storage medium
CN114416597A (en) Test case record generation method and device
CN114937316A (en) Software fault detection method, device, equipment and medium
CN114866447A (en) Automatic test method and device for message receiving and sending of vehicle controller
CN114416441A (en) Real-time database automatic testing method and system, electronic equipment and storage medium
CN112363915A (en) Method and device for page performance test, terminal equipment and storage medium
CN110971483A (en) Pressure testing method and device and computer system
CN115118754B (en) Remote monitoring test system and monitoring test method for electric automobile

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination