CN113608518B - Data generation method, device, terminal equipment and medium - Google Patents

Data generation method, device, terminal equipment and medium Download PDF

Info

Publication number
CN113608518B
CN113608518B CN202110839743.8A CN202110839743A CN113608518B CN 113608518 B CN113608518 B CN 113608518B CN 202110839743 A CN202110839743 A CN 202110839743A CN 113608518 B CN113608518 B CN 113608518B
Authority
CN
China
Prior art keywords
service
target
data
unit
response
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.)
Active
Application number
CN202110839743.8A
Other languages
Chinese (zh)
Other versions
CN113608518A (en
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.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch 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 Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN202110839743.8A priority Critical patent/CN113608518B/en
Publication of CN113608518A publication Critical patent/CN113608518A/en
Application granted granted Critical
Publication of CN113608518B publication Critical patent/CN113608518B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0218Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterised by the fault detection method dealing with either existing or incipient faults
    • G05B23/0221Preprocessing measurements, e.g. data collection rate adjustment; Standardization of measurements; Time series or signal analysis, e.g. frequency analysis or wavelets; Trustworthiness of measurements; Indexes therefor; Measurements using easily measured parameters to estimate parameters difficult to measure; Virtual sensor creation; De-noising; Sensor fusion; Unconventional preprocessing inherently present in specific fault detection methods like PCA-based methods

Abstract

The application is applicable to the technical field of computers, and provides a data generation method, which comprises the following steps: acquiring a vehicle configuration file of a target vehicle; analyzing the vehicle configuration file, and acquiring unit identification information of a target electronic control unit in a target vehicle and service information of a target service in the target electronic control unit, wherein the service information comprises protocol information and protocol related data, and the unit identification information comprises a unit request identification and a unit response identification; and aiming at the target service, generating simulation data of the target service according to the unit identification information and the service information, wherein the simulation data is used for testing the diagnostic equipment for realizing the target service, and the simulation data comprises simulation request data and simulation response data. The method and the device can quickly generate the simulation data for testing the diagnostic equipment, and are favorable for improving the efficiency of testing the diagnostic equipment.

Description

Data generation method, device, terminal equipment and medium
Technical Field
The present application belongs to the field of computer technologies, and in particular, to a data generation method, apparatus, terminal device, and medium.
Background
With the continuous development of vehicle Electronic technology, electronic Control Units (ECUs) are widely used in modern vehicles. The ECU not only improves the dynamic property, economy, comfort and safety of the vehicle, but also makes the electronic and electrical system in the vehicle more and more complex, which also promotes the greater development of vehicle diagnosis technology. In practice, a plurality of ECUs may be provided in a vehicle, and each ECU has a plurality of services, such as a service of detecting ECU voltage. A vehicle diagnostic apparatus is generally an apparatus that diagnoses a service function of each ECU in a vehicle by using a vehicle diagnostic technique. In practice, there is typically a corresponding vehicle diagnostic device for each type of vehicle.
In the production process of the vehicle diagnostic equipment, the data meeting the data specification of the tested vehicle is required to be adopted to test the vehicle diagnostic equipment. In the related art, it is common for a tester to manually edit simulation data for testing a vehicle diagnostic apparatus with reference to data specifications of services in an ECU. The mode of obtaining the simulation data by manual editing has low efficiency and is easy to make mistakes.
Disclosure of Invention
The embodiment of the application provides a data generation method, a data generation device, terminal equipment and a medium, and aims to solve the problems that in the related art, the efficiency is low and errors are easy to occur due to the mode of obtaining simulation data through manual editing.
In a first aspect, an embodiment of the present application provides a data generation method, where the method includes:
acquiring a vehicle configuration file of a target vehicle;
analyzing the vehicle configuration file, and acquiring unit identification information of a target ECU in the target vehicle and service information of target services in the target ECU, wherein the service information comprises protocol information and protocol related data, and the unit identification information comprises a unit request identification and a unit response identification;
and aiming at the target service, generating simulation data of the target service according to the unit identification information and the service information, wherein the simulation data is used for testing the diagnostic equipment for realizing the target service, and the simulation data comprises simulation request data and simulation response data.
Further, analyzing the vehicle configuration file to obtain unit identification information of the target ECU in the target vehicle, including:
analyzing the vehicle configuration file to obtain an ECU list of a target vehicle;
acquiring basic variables of a target ECU (electronic control unit) aiming at the target ECU in the ECU list;
and acquiring a unit request identifier and a unit response identifier of the target ECU according to the basic variable.
Further, analyzing the vehicle configuration file to obtain service information of the target service in the target ECU, including:
aiming at a target ECU in the ECU list, acquiring unit variables of the target ECU;
acquiring a service list of a target ECU according to the unit variable;
acquiring protocol information of a target service aiming at the target service in the service list;
and acquiring protocol related data of the target service according to the protocol information, wherein the protocol related data comprises a service request command and a service response command of the target service.
Further, for the target service, generating simulation data of the target service according to the unit identification information and the service information, including:
analyzing a service request command of a target service to obtain a service request identifier of the service request command;
and generating simulation request data according to the unit request identifier, the service request identifier and a preset simulation request format.
Further, for the target service, generating simulation data of the target service according to the unit identification information and the service information, including:
analyzing a service response command of the target service, and acquiring a service response identifier and response data information of the service response command;
and generating simulated response data according to the unit response identifier, the service response identifier, the response data information and a preset simulated response format.
Further, the response data information includes a data response interval, and the simulated response data is generated according to the unit response identifier, the service response identifier, the response data information and the preset simulated response format, and includes:
randomly selecting a target value from the data response interval, and converting the target value into a command byte format according to a preset data conversion rule to obtain target data;
and generating simulated response data by using the unit response identifier, the service response identifier, the target data and a preset simulated response format of the ECU.
Further, the method also comprises the following steps:
after the service list of the target ECU is obtained, services in the service list are traversed one by one, the steps of obtaining protocol information of the target service aiming at the target service in the service list and obtaining protocol related data of the target service according to the protocol information are executed, the step of generating simulation data of the target service according to the unit identification information, the protocol information and the protocol related data aiming at the target service is executed, and simulation data corresponding to all services of the target ECU are obtained.
In a second aspect, an embodiment of the present application provides a data generating apparatus, where the apparatus includes:
a file acquisition unit for acquiring a vehicle profile of a target vehicle;
the system comprises a file analysis unit, a service management unit and a service management unit, wherein the file analysis unit is used for analyzing a vehicle configuration file and acquiring unit identification information of a target ECU in a target vehicle and service information of a target service in the target ECU, the service information comprises protocol information and protocol related data, and the unit identification information comprises a unit request identification and a unit response identification;
and the data generation unit is used for generating simulation data of the target service according to the unit identification information and the service information aiming at the target service, wherein the simulation data is used for testing the diagnostic equipment for realizing the target service, and the simulation data comprises simulation request data and simulation response data.
In a third aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the data generation method when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored, and the computer program, when executed by a processor, implements the steps of the data generation method.
In a fifth aspect, an embodiment of the present application provides a computer program product, which, when run on a terminal device, causes the terminal device to execute the data generation method of any one of the above first aspects.
Compared with the related technology, the embodiment of the application has the beneficial effects that: because the vehicle configuration file of the vehicle usually comprises protocol information of each service of the vehicle, the protocol information can describe data specifications of the corresponding service, and the protocol information and protocol related data of each service can be obtained by analyzing the vehicle configuration file, so that the simulation data of each service can be automatically synthesized according to the protocol information and the protocol related data. The method and the device can realize the rapid generation of the simulation data for testing the diagnostic equipment, and are beneficial to improving the efficiency of testing the diagnostic equipment.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the embodiments or the related technical descriptions 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 it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a system architecture diagram of an application of a data generation method provided by an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram of a data generation method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of simulation data provided by an embodiment of the present application;
FIG. 4 is a schematic flow chart diagram of a data generation method according to another embodiment of the present application;
fig. 5 is a schematic structural diagram of a data generating apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, 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, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing a relative importance or importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather mean "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless otherwise specifically stated.
In order to explain the technical means of the present application, the following examples are given below.
Example one
Referring to fig. 1, a system architecture diagram of an application of a data generation method according to an embodiment of the present application is shown.
As shown in fig. 1, the system architecture may include a vehicle 101 and a terminal device 102, where the vehicle 101 and the terminal device 102 may be communicatively connected through a communication interface On the vehicle, such as an On Board Diagnostics (OBD) interface, so as to implement interaction of data and/or signaling.
The vehicle 101 may be various vehicles. Such as unmanned vehicles, cars, trucks, etc. It is noted that the vehicle 101 may also be a variety of other vehicles. Such as an aircraft, a ship.
The terminal device 102 may include, but is not limited to, various terminal devices such as a smart phone, a tablet computer, a laptop portable computer, and a desktop computer, and the embodiment is not particularly limited. In practice, the terminal device 102 may obtain a vehicle profile of the target vehicle; analyzing the vehicle configuration file, and acquiring unit identification information of a target ECU in the target vehicle and service information of target services in the target ECU, wherein the service information comprises protocol information and protocol related data, and the unit identification information comprises a unit request identification and a unit response identification; and aiming at the target service, generating simulation data of the target service according to the unit identification information and the service information, wherein the simulation data is used for testing the diagnostic equipment for realizing the target service, and the simulation data comprises simulation request data and simulation response data.
It should be noted that the data generation method provided in the embodiment of the present application is generally executed by the terminal device 102, and accordingly, the data generation apparatus is generally disposed in the terminal device 102.
It should be understood that the number of terminal devices and vehicles in fig. 1 is merely illustrative. There may be any number of terminal devices and vehicles, as desired for implementation.
Example two
Referring to fig. 2, a schematic flow diagram of a data generation method provided in an embodiment of the present application is shown, where the data generation method shown in fig. 2 includes:
in step 201, a vehicle profile of a target vehicle is obtained.
The target vehicle is usually a preset vehicle. In practice, the target vehicle is typically a vehicle of a certain type or a vehicle of a certain model.
Among other things, vehicle profiles typically carry diagnostic-related configuration information for all components in the vehicle. In practice, the vehicle profile is typically an Open Diagnostic eXchange format (ODX) file.
The ODX is an open-source standardized diagnostic data format, is an ODX standard based on an Extensible Markup Language (XML) Language, considers the interchangeability of data in the whole diagnostic development process during the preparation process, and standardizes the data format.
In this embodiment, an execution subject for executing the data generation method is generally a terminal device (for example, the terminal device 102 shown in fig. 1). The terminal device may acquire a vehicle profile of the target vehicle and then process the acquired vehicle profile.
It should be noted that the vehicle configuration file may be directly stored locally, or may be stored in other electronic devices communicatively connected to the execution subject, such as a target vehicle. When the vehicle profile is stored locally, the executing agent may directly extract the locally stored vehicle profile for processing. When the vehicle profile is stored in another electronic device that is communicatively connected to the execution subject, the execution subject may acquire the vehicle profile for processing by wired connection or wireless connection.
Step 202, analyzing the vehicle configuration file, and acquiring unit identification information of a target electronic control unit in the target vehicle and service information of a target service in the target electronic control unit.
Among them, the target ECU is usually a predetermined ECU. The target service is generally a service set in advance in the target ECU.
In practice, the target vehicle typically has one or more of the following ECUs therein: an Auxiliary Control Module (ACM), an Engine Control Module (ECM), a Body controller (Body Control Module, BCM), a keyless Entry and Start system (PEPS), an automatic Transmission Control Unit (TCU), and the like.
The service information comprises protocol information and protocol related data, and the unit identification information comprises a unit request identification and a unit response identification. The unit request flag is typically data for instructing the ECU to receive, and the unit response flag is typically data for instructing the ECU to respond. In practice, the ACM's unit request identification may be ox715 and the unit reply identification may be ox77f. For example, if the unit identification information of a certain data is ox715, the data is suitable for ACM reception.
The above-mentioned protocol information is generally information for describing a communication rule. The protocol-related data is generally data related to protocol information, such as a component of the data, a value range of the data, and the like.
Here, since the vehicle profile usually has a fixed format, and the vehicle profile usually carries unit identification information of each ECU of the vehicle, protocol information and protocol-related data of each service in each ECU, and the like, the execution subject may parse the vehicle profile based on the format of the vehicle profile, thereby obtaining the unit identification information of the target ECU in the target vehicle and the protocol information and protocol-related data of the target service in the target ECU.
And step 203, aiming at the target service, generating simulation data of the target service according to the unit identification information and the service information.
The simulation data is used for testing the diagnostic equipment for realizing the target service, and comprises simulation request data and simulation response data. The simulated answer data is typically used in response to the simulated request data. The diagnostic device is generally referred to as a vehicle diagnostic device. For example, when the simulation data is used to test the diagnostic device, the terminal device may send the simulation data to the diagnostic device and then receive an analysis result returned by the diagnostic device for the simulation data. And finally, comparing the returned analysis result with the real result of the simulation data, and if the returned analysis result is consistent with the real result of the simulation data, determining that the diagnosis equipment can accurately diagnose the service corresponding to the simulation data. Otherwise, if the two are not consistent, the diagnostic device is considered to be unable to accurately diagnose the service corresponding to the analog data.
Fig. 3 is a schematic diagram of simulation data provided in an embodiment of the present application. Fig. 3 shows 5 sets of simulation data, each set of simulation data includes a simulation request data and a simulation response data corresponding to the simulation request data. In fig. 3, the first row of data is simulation request data in simulation data, and the second row of data is simulation response data of the simulation data. The third line data is simulation request data in another simulation data, and the fourth line data is simulation response data of the another simulation data. And so on.
According to the method provided by the embodiment, the vehicle configuration file of the vehicle usually comprises the protocol information of each service of the vehicle, the protocol information can describe the data specification of the corresponding service, and the protocol information and the protocol related data of each service can be obtained by analyzing the vehicle configuration file, so that the simulation data of each service can be automatically synthesized according to the protocol information and the protocol related data. The method and the device can realize the rapid generation of the simulation data for testing the diagnostic equipment, and are beneficial to improving the efficiency of testing the diagnostic equipment.
In some optional implementations, parsing the vehicle configuration file to obtain unit identification information of the target ECU in the target vehicle may include:
first, the vehicle configuration file is analyzed to obtain an ECU list of the target vehicle.
Here, the execution subject may analyze the ECU list of the target vehicle when analyzing the vehicle profile. The ECU list includes names of the respective ECUs in the target vehicle.
Then, for a target ECU in the ECU list, basic variables of the target ECU are acquired.
Here, the execution subject may select an ECU from the ECU list as a target ECU, and then extract basic variables of the target ECU based on the name of the target ECU.
And finally, acquiring a unit request identifier and a unit response identifier of the target ECU according to the basic variable.
Here, the execution subject may extract the unit request flag and the unit response flag of the target ECU using the basic variables of the target ECU. Therefore, the unit identification information of the target ECU in the target vehicle is obtained by analyzing the vehicle configuration file.
In some optional implementations, parsing the vehicle configuration file to obtain service information of the target service in the target ECU may include:
first, unit variables of a target ECU are acquired for the target ECU in the ECU list.
Here, the execution subject may extract the unit variables of the target ECU based on the name of the target ECU.
It is noted that each ECU typically has a base variable and a unit variable. The basic variable is usually a variable with a fixed value of the ECU, and the unit variable is usually a variable with a variable value of the ECU.
Then, a service list of the target ECU is acquired according to the unit variables.
Here, the execution subject may extract the service list of the target ECU using the unit variables of the target ECU. The service list is typically a list of names of services.
And then, acquiring protocol information of the target service aiming at the target service in the service list.
Here, the execution agent may select a service from the service list as a target service. Then, the execution agent may extract protocol information of the target service by using the service name of the target service.
And finally, acquiring protocol related data of the target service according to the protocol information.
The protocol related data comprises a service request command and a service response command of the target service.
Here, the execution body may extract the protocol-related data from the protocol information. Specifically, the service request command and the service response command of the target service may be extracted from the protocol information of the target service. Therefore, the service information of the target service in the target ECU is obtained by analyzing the vehicle configuration file. It is noted that the service request command and the service response command of the target service are usually format commands for the target service to communicate with other devices.
In some optional implementation manners, after the service list of the target ECU is obtained, the executing body may traverse the services in the service list one by one, execute a step of obtaining protocol information of the target service and obtaining protocol-related data of the target service according to the protocol information for the target service in the service list, and execute a step of generating simulation data of the target service according to the unit identification information, the protocol information, and the protocol-related data for the target service, so as to obtain simulation data corresponding to all services of the target ECU.
In some optional implementation manners, for a target service, generating simulation data of the target service according to the unit identification information and the service information includes: and analyzing the service request command of the target service to obtain the service request identifier of the service request command. And generating simulation request data according to the unit request identifier, the service request identifier and a preset simulation request format.
Wherein the service request identity is typically an identity indicating that the service receives data. In practice, for a voltage detection service in the ACM, the service request identification for that service may be ox222222.
The preset simulation request format is usually a preset format. As an example, the preset emulation request format may be a combination of a unit request identifier, a service request identifier, and an effective byte number to generate the emulation request data.
Here, the execution agent may parse the service request command of the target service to obtain the service request identifier of the service request command. Then, the execution body may generate the simulation request data by using the unit request identifier, the service request identifier, and a preset simulation request format.
In some optional implementations, for the target service, generating simulation data of the target service according to the unit identification information and the service information includes: and analyzing the service response command of the target service, and acquiring the service response identifier and response data information of the service response command. And generating simulated response data according to the unit response identifier, the service response identifier, the response data information and a preset simulated response format.
The service response identifier is typically an identifier indicating service response data. In practice, for a voltage detection service in an ACM, the service answer identification for that service may be ox622222.
The preset analog response format is usually a preset format. As an example, the preset simulated response format may be that the simulated response data is generated by combining a unit request identifier, a service request identifier, an effective byte number, and response data information.
Here, the execution body may analyze the service response command of the target service to obtain a service response identifier of the service response command. Then, the execution body may generate the simulation response data by using the unit response identifier, the service response identifier, the response data information, and a preset simulation response format.
In some optional implementation manners, the response data information includes a data response interval, and the generating of the simulated response data according to the unit response identifier, the service response identifier, the response data information, and the preset simulated response format includes:
firstly, randomly selecting a target value from a data response interval, and converting the target value into a command byte format according to a preset data conversion rule to obtain target data.
The data response interval is generally used to describe a value range of response data. As an example, the response voltage may range from 0 to 14.
Here, the terminal device may randomly select a value from the data response interval corresponding to the service as the target value. Then, the target value can be converted into a command byte format by adopting a preset data conversion rule for the target service to obtain the target data.
For example, if the data response interval of the voltage corresponding to the voltage detection service in the ACM may be 0 to 14, the terminal device may randomly select a value from the data response interval, e.g., 12. The target value is 12 at this time. In addition, if the data conversion rule corresponding to the voltage detection service in the ACM is Y = X1 × 256+ X2, where Y is the target value and X1-X2 are the target data in the command byte format obtained by conversion. At this time, when Y =12, X1=0X00, X2=0X0c, and the target data is 0X000c can be calculated.
And then, generating simulated response data by using the unit response identifier, the service response identifier, the target data and a preset simulated response format of the ECU.
Here, the execution subject simulation response format combines the unit response id, the service response id, and the target data to obtain simulation response data. For example, the unit response identifier, the service response identifier, and the target data may be sequentially combined to generate simulated response data.
In practice, the analog data generated by the diagnostic service reading the ECU voltage may be as follows:
simulation request data 08 0715 03 222222 00 00 00
08 077f 05 622222000c 00 simulated response data
The format of the simulation request data is described as follows: 08 is the number of bytes except the unit request identifier, 0715 is the unit request identifier, 03 is the number of valid bytes, 222222 is the valid byte, and is used to indicate that the ACM voltage is requested to be read, and the following 00 is the invalid byte.
The format for the analog response data is described below: 08 is the number of bytes except the unit response identifier, 077f is the unit response identifier, 05 is the number of valid bytes, 622222000c is the number of valid bytes, indicating that the response ACM voltage is 12 v, and the following 00 is the number of invalid bytes.
EXAMPLE III
Further referring to fig. 4, a schematic flow chart of a data generation method provided in the embodiment of the present application is shown. The data generation method comprises the following steps:
step 401, a vehicle profile of a target vehicle is obtained.
Step 402, analyzing the vehicle configuration file, and acquiring unit identification information of the target ECU in the target vehicle and service information of the target service in the target ECU.
The service information comprises protocol information and protocol related data, and the unit identification information comprises a unit request identification and a unit response identification.
Step 403, generating simulation data of the target service according to the unit identification information and the service information.
The simulation data is used for testing the diagnostic equipment for realizing the target service, and comprises simulation request data and simulation response data.
In this embodiment, the specific operations of steps 401 to 403 are substantially the same as the operations of steps 201 to 203 in the embodiment shown in fig. 2, and are not described again here.
Step 404, in response to receiving the test request data sent by the diagnostic device to be tested, searching target simulation data with the same simulation request data as the test request data from the simulation data set.
Wherein the simulation data set includes simulation data for each service in the target vehicle. In practice, when the terminal device generates simulation data for each service of the target vehicle, the generated simulation data is generally directly stored in the simulation data set. Each simulation data in the simulation data set includes simulation request data and simulation response data.
Wherein, the diagnostic equipment to be tested is generally vehicle diagnostic equipment to be tested.
Here, the diagnostic device under test may transmit the test request data to the terminal device through the network. The terminal device may receive the test request data and, upon receiving the test request data, look up target simulation data from the simulation data set. The target simulation data is simulation data in which the simulation request data is the same as the test request data. For convenience of description, the simulation response data in the target simulation data is referred to as target simulation response data.
Step 405, sending target simulation response data in the target simulation data to the diagnostic device to be tested, and receiving analysis result data returned by the diagnostic device to be tested for the target simulation response data.
Here, the terminal device may transmit the target simulation response data to the diagnostic device under test through the network. Therefore, the diagnostic equipment to be tested can analyze the target simulation response data and send the analysis result data obtained by analysis to the terminal equipment.
And 406, determining the fault state of the to-be-detected diagnosis equipment according to the analysis result data and the expected analysis result of the target simulation response data.
The fault state is used for indicating whether the diagnostic equipment to be tested has a diagnostic fault.
Here, the terminal device may compare the analysis result data with an expected analysis result of the target simulation response data, thereby determining a fault state of the diagnostic device under test.
In practice, if the analysis result data is consistent with the expected analysis result, the fault state of the device to be tested is determined to be a state for indicating that the diagnostic device to be tested does not have the diagnostic fault.
And if the analysis result data is inconsistent with the expected analysis result, determining the fault state of the equipment to be tested as a state for indicating that the diagnostic equipment to be tested has a diagnostic fault.
The method provided by the embodiment can adopt the simulation data of each service of the target vehicle to effectively test the diagnostic equipment to be tested.
In some optional implementation manners, the data generation method may further include the following steps: and if the fault state indicates that the diagnostic equipment to be tested has a diagnostic fault, determining a target ECU and a target service corresponding to the target simulation response data, and outputting information for prompting the diagnostic equipment to be tested to have a diagnostic fault on the target service of the target ECU of the target vehicle.
Here, since each analog data corresponds to an ECU and a service, when the fault state indicates that the diagnostic device under test has a diagnostic fault, the executing entity may further determine the ECU and the service corresponding to the target analog response data, which are referred to as a target ECU and a target service for convenience of description. Then, the execution subject may output prompt information for prompting the diagnostic device under test to have a diagnostic failure for the target service of the target ECU of the target vehicle.
In the implementation mode, a tester can quickly and accurately determine the fault point of the diagnostic equipment to be tested under the prompt of the prompt information, so that the fault of the diagnostic equipment to be tested can be quickly and pertinently adjusted.
In practice, the diagnostic device under test diagnoses a fault for a certain service, usually due to a position analysis error of data and/or an algorithm error adopted for data analysis. As an example, when data a is parsed, the parsing should be started from the third byte, but the parsing is started from the fourth byte position, which results in an error in parsing the position of the data. As another example, when data B is analyzed, algorithm a should be used for analysis, but algorithm B is used for analysis, which results in an error of the algorithm used for data analysis.
Example four
Further referring to fig. 5, corresponding to the data generating method of the foregoing embodiment, fig. 5 is a block diagram of a data generating apparatus 500 provided in the embodiment of the present application, and for convenience of description, only the parts related to the embodiment of the present application are shown.
Referring to fig. 5, the apparatus includes:
a file acquisition unit 501 for acquiring a vehicle profile of a target vehicle;
a file parsing unit 502, configured to parse the vehicle configuration file, and obtain unit identification information of a target ECU in the target vehicle and service information of a target service in the target ECU, where the service information includes protocol information and protocol-related data, and the unit identification information includes a unit request identifier and a unit response identifier;
the data generating unit 503 is configured to generate, for the target service, simulation data of the target service according to the unit identification information and the service information, where the simulation data is used to test a diagnostic device that implements the target service, and the simulation data includes simulation request data and simulation response data.
In some embodiments, the file parsing unit 502 is specifically configured to parse a vehicle configuration file to obtain an ECU list of a target vehicle; acquiring basic variables of a target ECU aiming at the target ECU in the ECU list; and acquiring a unit request identifier and a unit response identifier of the target ECU according to the basic variable.
In some embodiments, the file parsing unit 502 is further configured to, specifically, obtain, for a target ECU in the ECU list, a unit variable of the target ECU; acquiring a service list of a target ECU according to the unit variable; acquiring protocol information of a target service aiming at the target service in the service list; and acquiring protocol related data of the target service according to the protocol information, wherein the protocol related data comprises a service request command and a service response command of the target service.
In some embodiments, the data generation unit 503 may include a first command parsing module and a first data generation module.
The first command analysis module is used for analyzing the service request command of the target service and acquiring a service request identifier of the service request command;
and the first data generation module is used for generating simulation request data according to the unit request identifier, the service request identifier and a preset simulation request format.
In some embodiments, the data generation unit 503 may further include a second command parsing module and a second data generation module.
The second command analysis module is used for analyzing the service response command of the target service and acquiring the service response identifier and response data information of the service response command;
and the second data generation module is used for generating simulated response data according to the unit response identifier, the service response identifier, the response data information and a preset simulated response format.
In some embodiments, the second data generation module is specifically configured to randomly select a target value from the data response interval, and convert the target value into a command byte format according to a preset data conversion rule to obtain target data; and generating the simulated response data by using the unit response identifier, the service response identifier, the target data and a preset simulated response format of the ECU.
In some embodiments, the file parsing unit 502 is further specifically configured to, after obtaining the service list of the target ECU, traverse services in the service list one by one, perform steps of obtaining protocol information of the target service and obtaining protocol-related data of the target service according to the protocol information for the target service in the service list, and perform steps of generating simulation data of the target service according to the unit identification information, the protocol information, and the protocol-related data for the target service, so as to obtain simulation data corresponding to all services of the target ECU.
According to the device provided by the embodiment, the vehicle configuration file of the vehicle usually comprises the protocol information of each service of the vehicle, the protocol information can describe the data specification of the corresponding service, and the protocol information and the protocol related data of each service can be obtained by analyzing the vehicle configuration file, so that the simulation data of each service is automatically synthesized according to the protocol information and the protocol related data. The method and the device can realize the rapid generation of the simulation data for testing the diagnostic equipment, and are beneficial to improving the efficiency of testing the diagnostic equipment.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
EXAMPLE five
With further reference to fig. 6, fig. 6 is a schematic structural diagram of a terminal device 600 according to an embodiment of the present application. As shown in fig. 6, the terminal device 600 of this embodiment includes: at least one processor 601 (only one processor is shown in fig. 6), a memory 602, and a computer program 603, such as a data generation program, stored in the memory 602 and executable on the at least one processor 601. The steps in any of the various method embodiments described above are implemented when the computer program 603 is executed by the processor 601. The steps in the embodiments of the respective data generation methods described above are implemented when the processor 601 executes the computer program 603. The processor 601, when executing the computer program 603, implements the functions of each module/unit in the above-described apparatus embodiments, for example, the functions of the units 501 to 503 shown in fig. 5.
Illustratively, the computer program 603 may be partitioned into one or more modules/units, which are stored in the memory 602 and executed by the processor 601 to complete the present application. One or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 603 in the terminal device 600. For example, the computer program 603 may be divided into a file obtaining unit, a file parsing unit, and a data generating unit, and specific functions of each unit are described in the foregoing embodiments, and are not described herein again.
The terminal device 600 may be a terminal device, a desktop computer, a tablet computer, a cloud server, a mobile terminal, and other computing devices. The terminal device 600 may include, but is not limited to, a processor 601, a memory 602. Those skilled in the art will appreciate that fig. 6 is merely an example of a terminal device 600, and does not constitute a limitation of the terminal device 600, and may include more or fewer components than shown, or some of the components may be combined, or different components, e.g., the terminal device may also include input-output devices, network access devices, buses, etc.
Processor 601 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 602 may be an internal storage unit of the terminal device 600, such as a hard disk or a memory of the terminal device 600. The memory 602 may also be an external storage device of the terminal device 600, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the terminal device 600. Further, the memory 602 may also include both internal and external memory units of the terminal device 600. The memory 602 is used for storing computer programs and other programs and data required by the terminal device. The memory 602 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules, so as to perform all or part of the functions described above. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described apparatus/terminal device embodiments are merely illustrative, and for example, a module or a unit may be divided into only one type of logic function, and another division manner may be provided in actual implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated module, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. The computer readable storage medium may be non-volatile or volatile. Based on such understanding, all or part of the processes in the methods of the embodiments described above may be implemented by hardware related to instructions of a computer program, which may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the steps of the methods described above may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable storage medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable storage media that does not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present application, and they should be construed as being included in the present application.

Claims (7)

1. A method of data generation, the method comprising:
acquiring a vehicle configuration file of a target vehicle;
analyzing the vehicle configuration file to obtain unit identification information of a target electronic control unit in the target vehicle and service information of a target service in the target electronic control unit, wherein the service information comprises protocol information and protocol related data, and the unit identification information comprises a unit request identification and a unit response identification;
aiming at the target service, generating simulation data of the target service according to the unit identification information and the service information, wherein the simulation data is used for testing diagnostic equipment for realizing the target service and comprises simulation request data and simulation response data;
the analyzing the vehicle configuration file to obtain unit identification information of a target electronic control unit in the target vehicle includes:
analyzing the vehicle configuration file to obtain an electronic control unit list of the target vehicle;
acquiring basic variables of a target electronic control unit aiming at the target electronic control unit in the electronic control unit list;
acquiring a unit request identifier and a unit response identifier of the target electronic control unit according to the basic variable;
the analyzing the vehicle configuration file to obtain the service information of the target service in the target electronic control unit includes:
acquiring unit variables of a target electronic control unit aiming at the target electronic control unit in the electronic control unit list;
acquiring a service list of the target electronic control unit according to the unit variable;
acquiring protocol information of the target service aiming at the target service in the service list;
acquiring protocol related data of the target service according to the protocol information, wherein the protocol related data comprises a service request command and a service response command of the target service;
the generating, for the target service, simulation data of the target service according to the unit identification information and the service information includes:
analyzing the service request command of the target service to obtain a service request identifier of the service request command;
and generating the simulation request data according to the unit request identifier, the service request identifier and a preset simulation request format.
2. The method of claim 1, wherein generating, for the target service, simulation data of the target service according to the unit identification information and the service information comprises:
analyzing the service response command of the target service to acquire a service response identifier and response data information of the service response command;
and generating the simulated response data according to the unit response identification, the service response identification, the response data information and a preset simulated response format.
3. The method of claim 2, wherein the response data message comprises a data response interval, and wherein generating the simulated response data according to the unit response identifier, the service response identifier, the response data message, and a preset simulated response format comprises:
randomly selecting a target value from the data response interval, and converting the target value into a command byte format according to a preset data conversion rule to obtain target data;
and generating the simulation response data by using the unit response identifier, the service response identifier, the target data and a preset simulation response format of the electronic control unit.
4. The method of claim 1, further comprising:
after the service list of the target electronic control unit is obtained, traversing the services in the service list one by one, executing the steps of obtaining protocol information of the target service aiming at the target service in the service list and obtaining protocol related data of the target service according to the protocol information, and executing the step of generating simulation data of the target service aiming at the target service according to the unit identification information, the protocol information and the protocol related data, so as to obtain simulation data corresponding to all services of the target electronic control unit.
5. An apparatus for generating data, the apparatus comprising:
a file acquisition unit for acquiring a vehicle profile of a target vehicle;
the file analysis unit is used for analyzing the vehicle configuration file to acquire unit identification information of a target electronic control unit in the target vehicle and service information of a target service in the target electronic control unit, wherein the service information comprises protocol information and protocol related data, and the unit identification information comprises a unit request identification and a unit response identification;
the data generating unit is used for generating simulation data of the target service according to the unit identification information and the service information aiming at the target service, wherein the simulation data is used for testing diagnostic equipment for realizing the target service and comprises simulation request data and simulation response data;
the analyzing the vehicle configuration file to obtain unit identification information of a target electronic control unit in the target vehicle includes:
analyzing the vehicle configuration file to obtain an electronic control unit list of the target vehicle;
acquiring basic variables of a target electronic control unit aiming at the target electronic control unit in the electronic control unit list;
acquiring a unit request identifier and a unit response identifier of a target electronic control unit according to the basic variable;
the analyzing the vehicle configuration file to obtain the service information of the target service in the target electronic control unit includes:
acquiring unit variables of a target electronic control unit aiming at the target electronic control unit in the electronic control unit list;
acquiring a service list of the target electronic control unit according to the unit variable;
acquiring protocol information of the target service aiming at the target service in the service list;
acquiring protocol related data of the target service according to the protocol information, wherein the protocol related data comprises a service request command and a service response command of the target service;
the generating, for the target service, simulation data of the target service according to the unit identification information and the service information includes:
analyzing the service request command of the target service to obtain a service request identifier of the service request command;
and generating the simulation request data according to the unit request identifier, the service request identifier and a preset simulation request format.
6. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 4.
CN202110839743.8A 2021-07-23 2021-07-23 Data generation method, device, terminal equipment and medium Active CN113608518B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110839743.8A CN113608518B (en) 2021-07-23 2021-07-23 Data generation method, device, terminal equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110839743.8A CN113608518B (en) 2021-07-23 2021-07-23 Data generation method, device, terminal equipment and medium

Publications (2)

Publication Number Publication Date
CN113608518A CN113608518A (en) 2021-11-05
CN113608518B true CN113608518B (en) 2022-12-27

Family

ID=78305320

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110839743.8A Active CN113608518B (en) 2021-07-23 2021-07-23 Data generation method, device, terminal equipment and medium

Country Status (1)

Country Link
CN (1) CN113608518B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114756585A (en) * 2022-03-23 2022-07-15 深圳市元征科技股份有限公司 Vehicle data acquisition method and device, electronic equipment and storage medium
CN116224976B (en) * 2023-05-08 2023-08-25 北京集度科技有限公司 Test method and device
CN117112048A (en) * 2023-07-03 2023-11-24 红石阳光(北京)科技股份有限公司 UDS Clinet realization method based on XML file

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102023922B (en) * 2010-12-28 2012-09-26 重庆恩菲斯软件有限公司 System and method for testing automotive electronic diagnostic software
KR20150076846A (en) * 2013-12-27 2015-07-07 기아자동차주식회사 System and method for acquiring data of electronic control unit
CN108132663A (en) * 2017-12-19 2018-06-08 风度(常州)汽车研发院有限公司 The analytic method of vehicle trouble messages, device and system
WO2021142822A1 (en) * 2020-01-19 2021-07-22 深圳市元征科技股份有限公司 Vehicle diagnosis method, vehicle diagnosis device and storage medium
CN111741074B (en) * 2020-05-28 2023-06-30 深圳市元征科技股份有限公司 Vehicle remote diagnosis method, system, vehicle connector and equipment connector
CN112235263B (en) * 2020-09-27 2023-01-24 深圳市元征科技股份有限公司 Diagnostic device security authentication method, server, vehicle, and storage medium
CN112860563B (en) * 2021-02-25 2023-11-21 东风柳州汽车有限公司 Automobile diagnostic instrument testing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN113608518A (en) 2021-11-05

Similar Documents

Publication Publication Date Title
CN113608518B (en) Data generation method, device, terminal equipment and medium
CN108563214B (en) Vehicle diagnosis method, device and equipment
CN111024405B (en) Automobile diagnosis method, related device and system
WO2019109915A1 (en) Vehicle trouble diagnosis method, vehicle trouble diagnosis apparatus and electronic device
US20040112124A1 (en) Method for carrying out a telediagnosis on a motor vehicle, vehicle diagnosis module and service center
US11514731B2 (en) Method and system for remote vehicle diagnostics
CN111506047B (en) Vehicle diagnosis method, device and storage medium
CN112558584B (en) Diagnostic data acquisition method and device and diagnostic equipment
CN114489766A (en) Method, device, medium and equipment for checking version information of vehicle-mounted controller
CN113433923A (en) Vehicle remote diagnosis method, system, readable storage medium and device
CN114326672A (en) ECU simulation detection method, electronic device and storage medium
CN113406944B (en) Vehicle diagnosis method, device, equipment and computer readable storage medium
CN113114659B (en) Diagnostic equipment detection method and device, terminal equipment and storage medium
CN111857103B (en) Vehicle diagnosis method, device, equipment and storage medium
CN112306041A (en) Vehicle configuration information writing method and device and electronic equipment
CN116701177A (en) Method and device for testing interface pins of vehicle-mounted diagnostic system and electronic equipment
CN115542875A (en) Vehicle detection method based on SOA service and related equipment
CN113934198A (en) Vehicle diagnosis method, vehicle diagnosis device, electronic device, and storage medium
CN114490713A (en) Fault code management method, device, equipment and readable storage medium
CN115118577A (en) Method and device for determining remote upgrade abnormal reason, electronic equipment and storage medium
CN114356769A (en) Software learning method, device, equipment and storage medium
CN114115170A (en) Method and device for determining vehicle configuration module and after-sale diagnostic apparatus
CN112306040A (en) Vehicle detection method, device, equipment and server
CN114756258B (en) ECU software refreshing method and system based on ODX
CN112863008B (en) Fault recording method and device, storage medium and computer equipment

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
TA01 Transfer of patent application right

Effective date of registration: 20221013

Address after: 518000 Guangdong province Shenzhen Longgang District Bantian Street five and Avenue North 4012 Yuan Zheng Industrial Park.

Applicant after: LAUNCH TECH Co.,Ltd.

Address before: 518000 522, headquarters office building of Yuanzheng technology plant, No. 4012, North Wuhe Avenue, Bantian street, Longgang District, Shenzhen, Guangdong Province

Applicant before: Shenzhen Yuanzheng Future Automobile Technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant