Disclosure of Invention
The invention provides a method for generating an MDF4 format file, which comprises the following steps:
s1: recording and storing data required to be stored in an MDF4 format file;
s2: making a feature description file matched with the data; and
s3: the data and the feature description file are transmitted to an MDF4 file generating program to generate an MDF4 format file.
Further, the profile stores information including one or more of a name, a length, a conversion formula, description information, a data type, a maximum value, a minimum value, an address, a sampling period, and tag information of the variable.
Further, the data is stored in the DB database file.
Furthermore, the storage format of the feature description file is the JSON format.
Furthermore, the variables belonging to the same sampling frequency and the same data source in the data are stored in a DB database file in a separate table, and the description information matched with the variables belonging to the same sampling frequency and the same data source is a separate array in the feature description file of the JSON format.
Further, the data in the MDF4 format file is stored in DZBLOCK.
The application also provides an automobile remote measuring device, including: MDF4 format file generating device; the MDF4 format file generating device is used for receiving data sent by the tested device, recording and storing data needing to be stored in the MDF4 format file, receiving the feature description file matched with the data, and transmitting the data and the feature description file to the MDF4 file generating program so as to generate the MDF4 format file and upload the MDF4 format file to the server.
Further, the profile stores information including one or more of a name, a length, a conversion formula, description information, a data type, a maximum value, a minimum value, an address, a sampling period, and tag information of the variable.
Furthermore, the storage format of the data is a DB database file; the storage format of the feature description file is a JSON format.
Further, the information stored in the profile includes XCP/CCP configuration information and DBC configuration information.
Furthermore, the MDF4 format file generating device is used for configuring the device to be tested through XCP/CCP configuration information to acquire data sent by the device to be tested; the MDF4 format file generating device is used for analyzing and acquiring data sent by the tested device through the DBC configuration information.
Further, when the MDF4 format file generating means reaches the preset trigger condition, the MDF4 format file generating means transfers the DB database file and the profile file to the MDF4 file generating program to generate the MDF4 format file.
Further, the preset trigger condition is at least one of that the DB database file reaches a preset size, that the MDF4 format file generating device receives a new measurement task, that the data received by the MDF4 format file generating device reaches a preset value, and that the interruption time of the data received by the MDF4 format file generating device reaches a preset time value.
Further, the MDF4 format file generating device includes a microprocessor and a microcontroller.
Furthermore, the system also comprises a 4G module; the 4G module is used for receiving and uploading the MDF4 format file to the server.
Furthermore, the microcontroller communicates with the tested device through the CAN; the microcontroller and the microprocessor carry out data interaction through the Ethernet; the microprocessor is connected with the 4G module through a USB, and uploads the MDF4 format file to the 4G module.
Furthermore, the automobile remote measuring equipment plays the state information through voice.
Further, the status information is whether the measurement was successful, or whether the data is being recorded, or whether the data storage was successful.
Further, the data in the MDF4 format file is stored in DZBLOCK.
Detailed Description
The technical solutions in the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
It is to be understood that the present invention may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art. In the drawings, the size and relative sizes of layers and regions may be exaggerated for clarity, and the same reference numerals denote the same elements throughout. It will be understood that when an element or layer is referred to as being "on" …, "adjacent to …," "connected to" or "coupled to" other elements or layers, it can be directly on, adjacent to, connected to or coupled to the other elements or layers or intervening elements or layers may be present. In contrast, when an element is referred to as being "directly on …," "directly adjacent to …," "directly connected to" or "directly coupled to" other elements or layers, there are no intervening elements or layers present. It will be understood that, although the terms first, second, third, etc. may be used to describe various elements, components, regions, layers and/or sections, these elements, components, regions, layers and/or sections should not be limited by these terms. These terms are only used to distinguish one element, component, region, layer or section from another element, component, region, layer or section. Thus, a first element, component, region, layer or section discussed below could be termed a second element, component, region, layer or section without departing from the teachings of the present invention.
Spatial relationship terms such as "under …", "under …", "below", "under …", "above …", "above", and the like, may be used herein for ease of description to describe the relationship of one element or feature to another element or feature as illustrated in the figures. It will be understood that the spatially relative terms are intended to encompass different orientations of the device in use or operation in addition to the orientation depicted in the figures. For example, if the device in the figures is turned over, then elements or features described as "below" or "beneath" other elements or features would then be oriented "above" the other elements or features. Thus, the exemplary terms "below …" and "below …" can encompass both an orientation of up and down. The device may be otherwise oriented (rotated 90 degrees or at other orientations) and the spatial descriptors used herein interpreted accordingly.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, 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. As used herein, the term "and/or" includes any and all combinations of the associated listed items.
In an embodiment of the present invention, a method for generating an MDF4 format file is provided, and specifically, please refer to a flowchart of a method for generating an MDF4 format file according to an embodiment of the present invention shown in fig. 1. The flow chart of the method for generating the MDF4 format file in the embodiment of the invention comprises the following steps:
s1: records and stores the data to be stored in the MDF4 format file.
In particular, reference may be made to the block diagram of the automotive remote measuring device shown in fig. 3. The MDF4 format file generating means 31 receives and records various measurement data, such as the engine speed, the engine load, the engine water temperature, the vehicle speed, etc., and stores the various measurement data in the storage format of a db (database) database file, wherein the various measurement data are required to be stored in the MDF4 format file.
In other embodiments, the various measurement data recorded may be stored not using a DB database file, but using other types of files, as long as data belonging to variables of the same sampling frequency and the same sampling source can be distinguished when the data is extracted.
In some embodiments, the MDF4 formatfile generating device 31 includes amicroprocessor 311 and amicrocontroller 312. Themicroprocessor 311 receives, records and stores various measurement data. In some embodiments, themicrocontroller 312 receives various measurement data and transmits the various measurement data to themicroprocessor 311, and themicroprocessor 311 records and stores the various measurement data.
S2: and making a feature description file matched with the data.
Specifically, the profile file may be created outside the MDF4 formatfile generating device 31 and transmitted to the MDF4 formatfile generating device 31. Reference may be made to the block diagram of the automotive remote measuring device shown in fig. 3. In some embodiments, the profile may be completed in a web page of thelocal computer 36 and transmitted to themicroprocessor 311. In other embodiments, the profile may be completed on a web page from the remote computer 35 and transmitted to themicroprocessor 311.
In some embodiments, the storage format of the profile is the JSON format.
In other embodiments, the profile may not be stored using JSON format, so long as data of variables belonging to the same sampling frequency and the same sampling source can be distinguished.
In some embodiments, the information stored by the profile includes one or more of a name, a length, a conversion formula, description information, a data type, a maximum value, a minimum value, an address, a sampling period, and tag information of the variable.
S3: and transmitting the data and the feature description file to an MDF4 file generating program to generate the MDF4 format file.
Specifically, the MDF4 formatfile generating device 31 transmits various measurement data and feature description files to the MDF4 file generating program to generate an MDF4 format file. In some embodiments, the MDF4 file generation program is in themicroprocessor 311.
In some embodiments, the data of the variables belonging to the same sampling frequency and the same data source in the data are stored in the DB database file as separate tables, that is, each separate table stores only the data of the variables belonging to the same sampling frequency and the same data source, and does not store the data of other variables, and each separate table also contains the sampling time of the data. And storing the data with the same sampling frequency and the same data source in the same table in the DB database file according to the sampling frequency and the data source, so that the data is more convenient and simpler to extract. And the description information matched with the variables belonging to the same sampling frequency and the same data source is an independent array in the feature description file in the JSON format.
Refer to fig. 2 for a schematic diagram of the generation of an MDF 4-formatted file. The DB database file stores a plurality of tables, such as table 1 and table 2. Table 1 contains data of time, variable 1, variable 2, etc., where the time is the sampling time of the data of variable 1, variable 2, etc.; table 2 contains data of time, variable 8 and variable 9, where time is the sampling time of data of variable 8 and variable 9. And transmitting the data of the variables in each form in the DB database file and the JSON format feature description file matched with the data of the variables in each form in the DB database file to an MDF4 file generation program so as to generate the MDF4 format file.
In some embodiments, the data in the MDF4 format file is stored in the DZBLOCK and compressed, so that the disk space occupied by the stored MDF4 data can be greatly reduced, for example, by about 5 times, and the data transmission flow and the storage space can be greatly reduced.
The present application further provides an automobile remote measuring device, and specifically, please refer to a block diagram of an automobile remote measuring device according to an embodiment of the present invention shown in fig. 3. The automobile remote measuring device of an embodiment of the invention comprises an MDF4 formatfile generating device 31, which is used for receiving data sent by a device undertest 32, recording and storing data required to be stored in an MDF4 format file, receiving a feature description file matched with the data, and transmitting the data and the feature description file to an MDF4 file generating program to generate the MDF4 format file and upload the MDF4 format file to aserver 34.
In some embodiments, the profile stores information including one or more of a name, a length, a conversion formula, description information, a data type, a maximum value, a minimum value, an address, a sampling period, and tag information of a variable.
In some embodiments, the data is stored in a DB database file; the storage format of the feature description file is a JSON format.
In some embodiments, the device undertest 32 may be an Electronic Control Unit (ECU) or a sensor for uploading various measurement data, such as the rotation speed of the engine, the load of the engine, the water temperature of the engine, the temperature, the vehicle speed, and the like.
In some embodiments, the MDF4 formatfile generating device 31 includes amicroprocessor 311 and amicrocontroller 312. Themicrocontroller 312 receives various measurement data and transmits the measurement data to themicroprocessor 311, and themicroprocessor 311 records and stores the various measurement data.
In some embodiments, the automotive remote measuring device further comprises a4G module 33 for receiving and uploading MDF4 format files to theserver 34. The4G module 33 may perform voice playing, 4G internet surfing, wireless communication, and the like.
In some embodiments, themicrocontroller 312 communicates with the device undertest 32 via a CAN, wherein the microcontroller timestamps the CAN data for subsequent data analysis when transmitting and receiving data. Themicrocontroller 312 and themicroprocessor 311 perform data interaction through ethernet. Themicroprocessor 311 is connected to the4G module 33 via USB, which includes rx and tx pins, and rx and tx pins of MPU and 4G are plugged together. Themicroprocessor 311 uploads the MDF4 format file to the4G module 33. The4G module 33 is connected with thelocal computer 36 through wireless, for example, wifi, to perform data interaction with thelocal computer 36, and the4G module 33 performs data interaction with theserver 34 through the 4G network. Theserver 34 interacts data with remote computers via ethernet.
In some embodiments, themicroprocessor 311 stores the various measurement data in the storage format of a DB (DataBse) database file. The data of the variables belonging to the same sampling frequency and the same data source in the data are stored in the DB database file in separate tables, that is, each separate table only stores the data of the variables belonging to the same sampling frequency and the same data source, and does not store the data of other variables, and each separate table also contains the sampling time of the data. And storing the data with the same sampling frequency and the same data source in the same table in the DB database file according to the sampling frequency and the data source, so that the data is more convenient and simpler to extract.
In other embodiments, the various measurement data recorded may be stored not using a DB database file, but using other types of files, as long as data belonging to variables of the same sampling frequency and the same sampling source can be distinguished when the data is extracted.
In some embodiments, the description information that matches the variables belonging to the same sampling frequency and the same data source is a separate array in the JSON formatted profile.
In other embodiments, the profile may not be stored using JSON format, so long as data of variables belonging to the same sampling frequency and the same sampling source can be distinguished.
In some embodiments, the profile may be completed in a web page of thelocal computer 36 and transmitted to themicroprocessor 311. In other embodiments, the profile may be completed on a web page from the remote computer 35 and transmitted to themicroprocessor 311.
In some embodiments, the information stored by the profile also includes XCP/CCP configuration information and DBC configuration information. The MDF4 formatfile generating device 31 is configured to configure the device undertest 32 through the XCP/CCP configuration information to obtain the data sent by the device undertest 32; the MDF4 formatfile generating device 31 is configured to parse and obtain the data sent by the device undertest 32 through the DBC configuration information. Specifically, themicroprocessor 311 configures the device undertest 32 through the XCP/CPP configuration information to notify the device undertest 32 of measurement data that needs to be uploaded, and the device undertest 32 uploads the corresponding measurement data after receiving the instruction. The device undertest 32 automatically uploads the measurement data through the DBC configuration information, and themicroprocessor 311 needs to parse the measurement data and obtain the required data therefrom.
In some embodiments, when the MDF4 formatfile generating device 31 reaches a preset trigger condition, the MDF4 formatfile generating device 31 transmits the DB database file and the feature description file to an MDF4 file generating program to generate the MDF4 format file. The preset trigger condition may be at least one of that the DB database file reaches a preset size, that the MDF4 format file generating device receives a new measurement task, that data received by the MDF4 format file generating device reaches a preset value, and that an interruption time of the MDF4 format file generating device receiving the data reaches a preset time value. In some of the present embodiments, it may be that the microprocessor receives data.
In some embodiments, the data in the MDF4 format file is stored in the DZBLOCK and compressed, so that the disk space occupied by the stored MDF4 data can be greatly reduced, for example, by about 5 times, and the data transmission flow and the storage space can be greatly reduced.
In some embodiments, the vehicle remote measuring device, such as the4G module 33, plays in real time through voice to inform the user of status information, wherein the status information may be whether the measurement is successful, or whether data is being recorded, or whether data is successfully stored.
Various measurement data and feature description files are transmitted to the MDF4 file generation program in the MDF4 formatfile generation device 31 to generate an MDF4 format file, so that the occupied disk space is small, remote data transmission is facilitated, and the function of remote measurement is realized.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.