Engine test data processing method, storage medium, and device
Patent Information
- Application Number
- CN202211626632.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-16
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-12-16
AI Technical Summary
[0004]本发明为解决目前发动机试验数据处理过程中,格式排版和数据比较分析均需要手工完成,导致处理效率低且容易出错的技术问题,提供一种发动机试验数据处理方法、计算机可读存储介质、终端设备
[0023]1.本发明提出一种发动机试验数据处理方法,针对具有表头+数据的文本文件进行数据处理与分析,可实现大批量该类型数据的格式自动切换、数据分析,数据处理速度快、效率高。另外,可结合MATLAB和office,对数据进行处理,并以表格和图形的格式予以展现,在高效的同时大幅降低了出错率,简化了整个处理流程。
Smart Images

Figure CN116384341B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a data processing method, and in particular to an engine test data processing method, a computer-readable storage medium, and a terminal device. Background Art
[0002] At present, the process of engine test data processing is relatively cumbersome, and generally goes through the following steps: data processing, formatting, data aggregation, data comparison and analysis, and data report generation. Among them, data processing mainly collects and obtains data of various measurement parameters according to the requirements of the test outline; the purpose of formatting is that the format of the data file processed by the acquisition software is relatively messy, and it is necessary to manually adjust the format. Because the amount of data is relatively large and there are many parameters, the workload of data processing is relatively large and prone to errors; data aggregation is mainly to organize and classify the data result files obtained after data processing; data comparison and analysis is to compare and analyze the data obtained after processing with the previous test data of the same model to determine whether the data processing is abnormal or whether there is a problem with the measurement status; data report generation is the process of compiling the data after the above steps into a standard report file according to the requirements of the test outline for data. In the above data processing process, formatting and data comparison and analysis are all based on manual completion, which accounts for a large proportion of the entire processing process, resulting in low data processing efficiency, and due to the large workload, errors are inevitable, which reduces the reliability of data processing.
[0003] The difficulties of formatting mainly lie in the following points: 1. There are many types of data acquisition equipment, which are manufactured by different manufacturers. The format and content of the text data obtained by them are quite different. The common point of these data files is that the text data content format is displayed in the form of header + data. The header and data are a whole file and cannot be directly divided, resulting in the inability to directly extract and analyze the data parameters; 2. When the text data file is imported into the data processing software (such as EXCEL, ORIGIN), due to the existence of the header, these processing software cannot correctly identify the content of its data file. It is necessary to manually delete the header and add parameter name information corresponding to the data column. Therefore, in the case of many data files, the amount of data parameters is large. Relying on manual processing is time-consuming and labor-intensive, and it is easy to make mistakes during the extraction process. In addition, the process of data comparison and analysis is also cumbersome, and data analysis needs to be carried out step by step. The data results generated in each step also need to be manually operated before the next step of processing can be carried out, and then the final required report can be generated. If there are many intermediate analysis processes, the work efficiency will be greatly reduced, and the error rate will be high. Summary of the invention
[0004] The present invention aims to solve the technical problem that in the current engine test data processing process, formatting and data comparison and analysis need to be completed manually, resulting in low processing efficiency and prone to errors. An engine test data processing method, a computer-readable storage medium, and a terminal device are provided.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] A method for processing engine test data, which is special in that it includes the following steps:
[0007] S1, separating the header and data of the data result file;
[0008] S2, locating the data corresponding to each parameter name in the header according to the sampling frequency, the number of data rows and the number of data bytes in the header;
[0009] S3, grouping the data according to the data corresponding to each parameter name to obtain multiple data groups;
[0010] S4, storing all parameter names and each data group separately to form a parameter name file and multiple data group files, and forming a mapping relationship between the parameter name file and each data group file;
[0011] S5, reading the parameter name file and each data group file, using OLE technology, importing the parameter name file and each data group file into the working memory space of MATLAB, and calling the internal data processing algorithm of the MATLAB program to perform data processing and calculation to obtain the calculation result;
[0012] S6, through the linking and embedding mechanism between VBA and documents, the calculation results are associated with the parameter names in the format of data tables and graphics in Office.
[0013] Furthermore, before step S1, step S0 is also included, converting the data result file into a text format file; in step S4, the independent storage is specifically independent storage in a text file.
[0014] Furthermore, step S1 is specifically as follows:
[0015] If the parameter name in the header has an identification feature, the header and data are distinguished by reading the line where the identification feature is located; otherwise, the data result file is scanned line by line, and the corresponding parameter name features are parsed through the keyword information combined with the symbol to distinguish the header and data.
[0016] Furthermore, step S2 is specifically to locate the data corresponding to each parameter name in the header by multiplying the sampling frequency, the number of data rows and the number of data bytes.
[0017] Further, in step S5, the reading of the parameter name file and each data group file specifically includes calculating the required total memory storage space according to the size of the parameter name file and each data group file, allocating the number of memory blocks according to the size of the total memory storage space, and storing the parameter name file and each data group file in each memory block;
[0018] In step S5, the step of importing the parameter name file and each data group file into the working memory space of MATLAB specifically includes importing the parameter name file and each data group file into the working memory space of MATLAB one by one in the order of generating the memory blocks.
[0019] Furthermore, step S6 further includes step S7, writing a word to generate a result report.
[0020] The present invention also proposes a computer-readable storage medium on which a computer program is stored. The special feature of the computer-readable storage medium is that when the program is executed by a processor, the steps of the above-mentioned engine test data processing method are implemented.
[0021] In addition, the present invention also proposes a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The terminal device is special in that when the processor executes the computer program, it implements the steps of the above-mentioned engine test data processing method.
[0022] Compared with the prior art, the present invention has the following beneficial effects:
[0023] 1. The present invention proposes an engine test data processing method, which processes and analyzes text files with headers + data, and can realize automatic format switching and data analysis of large quantities of such data, with fast data processing speed and high efficiency. In addition, MATLAB and office can be combined to process the data and display them in the form of tables and graphics, which greatly reduces the error rate while being highly efficient and simplifies the entire processing flow.
[0024] 2. The processing method of the present invention can screen parameters of files with large data volumes or multiple data files based on selection and generate independent data processing files.
[0025] 3. The processing method of the present invention locates the data first, ensuring the accuracy of subsequent processing, and can also generate a result report, thereby realizing the generation of a large number of test data analysis reports. Since the results are associated with the parameter names, the data can be classified and managed.
[0026] 4. The present invention provides two methods for separating the header and data. The method can utilize the identification features of the parameter name or scan line by line, so that the method of the present invention has a wider application range. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 This is a schematic diagram of the text data result file of the engine test;
[0028] Figure 2 The present invention is a flowchart of an embodiment of an engine test data processing method of the present invention. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0030] Data analysis is based on statistics. Usually, in order to obtain the data parameters of each test, it is necessary to search in the data result files of the equipment collected by many manufacturers. For the data parameters of many tests and a large number of data result files, it is time-consuming and labor-intensive, requires boring and repetitive work, and is prone to errors.
[0031] By analyzing the data result files to be found, it can be seen that the data result files generated by the acquisition software of different manufacturers are mainly in the text file (Txt) format. If they are other types of files, they can also be converted into text file formats. Figure 1 As shown, these text data result files usually have a common data format. The most commonly used format is the header + data format, where the header contains channel setting information, channel slope, parameter name, parameter unit, equipment manufacturer and other information, which can be expressed in a single line or multiple lines. The data contains the time series and the data series of the corresponding parameters. Such a data structure is very convenient for extracting the required data by compiling the corresponding program.
[0032] The present invention proposes a method for converting the text data format of an engine test, which can improve the efficiency of text data format conversion and the efficiency of generating analysis reports, while reducing the error rate and reflecting the objective situation of the test data in a more centralized, comprehensive and accurate manner. Figure 2 As shown, the specific method is as follows:
[0033] S1, convert the data result file format output by each acquisition device into a text format file. If the data result file format output by the acquisition device itself is a text format file, no further conversion is required. In other embodiments of the present invention, the data result file format can also be converted into other format files.
[0034] S2, reading the text data result file converted into text format obtained in step S1, and separating the header from the data.
[0035] There are three main ways to separate the header from the data:
[0036] (1) If the parameter name in the table header has specific features (identification features): such as the parameter name is in the first row of the table header, the parameter unit is in the first row of the table header, the number of data rows is in the first row, the sampling frequency is in the first row, etc. By reading these specific rows and using the keywords in them, such as pressure parameters start with P, vibration parameters start with a, temperature parameters start with T, flow parameters start with G, speed parameters start with n, etc., the table header and data are distinguished through the specific features of the parameters, and the corresponding parameter name features are parsed.
[0037] (2) If the parameter name in the header does not have specific features, you can use a line-by-line scanning method to use keyword information combined with separators, tabs, spaces, etc. to parse out the corresponding parameter name features and distinguish between the header and data.
[0038] S3, data location and segmentation: locate the data according to the sampling frequency, number of data rows and number of data bytes in the table header. The data corresponding to each parameter is located by calculating the sampling frequency * number of data rows * number of data bytes in the table header. According to the data corresponding to each located parameter, the data is divided into multiple groups to form multiple data groups, each of which includes the data corresponding to each parameter. At the same time, a mapping relationship between the parameter name and the data group in the table header is formed so that each parameter name corresponds to the data group one by one.
[0039] S4, parameter names and data groups are stored separately
[0040] The parameter name is stored separately in a text file, and each data group is also stored separately in a text file. If each column of data in the data corresponds to a parameter, each column of data is stored separately in a text file. If each row of data in the data corresponds to a parameter, each row of data is stored separately in a text file. The advantage of this storage is that since each parameter generates a separate text file with a smaller volume and less memory allocation, it is convenient to use multi-threading technology to read multiple text data result files separately at the same time, and the file reading speed is fast and the operation efficiency is high. At the same time, the parameter name is separated from the data, so even if there is an error in the parameter name, it is easy to modify without changing other parts, which improves data utilization efficiency and reduces implementation complexity.
[0041] S5, parsing and generating reports using memory allocation technology, using the computer's own performance (different computers have different memory sizes), according to the size of the read-in text file, calculate the total memory storage space required (total memory storage space = number of lines ╳ number of bytes), and allocate the number of memory blocks according to the computer's own memory size. Using OLE technology, through the two-way communication method between the programming language and the MATLAB program, the text files are imported into the working memory space in MATLAB one by one in the order of generating memory blocks, and then the internal data processing algorithm of the MATLAB program is called to perform data processing and calculation. Then, using the two-way communication method between office and programming language, and the linking and embedding mechanism between VBA and documents, the calculation results in MATLAB are associated with the parameter names in the format of data tables and graphics, and written into word to generate a result report.
[0042] When the above method is implemented, it can be converted into a program product through a programming language, such as VB, VC or C++.
[0043] The monitoring method of the present invention can be applied in a computer-readable storage medium, which stores a computer program. The above processing method can be stored in the computer-readable storage medium as a computer program, and the computer program implements the steps of the above processing method when executed by a processor.
[0044] In addition, the processing method of the present invention can also be applied to a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the processing method of the present invention when executing the computer program. The terminal device here can be a computer, a notebook, a PDA, and various cloud servers and other computing devices, and the processor can be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, or other programmable logic device, etc.
[0045] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for processing engine test data, It is characterized in that The following steps are involved: S0, convert the data result file into a text format file; S1, separating the header and data of the data result file, specifically: if the parameter name in the header has an identification feature, distinguish the header and data by reading the line where the identification feature is located; otherwise, scan the data result file line by line, parse the corresponding parameter name features through the combination of keyword information and symbols, and distinguish the header and data; S2, locate the data corresponding to each parameter name in the table header by multiplying the sampling frequency, the number of data rows and the number of data bytes; S3, grouping the data according to the data corresponding to each parameter name to obtain multiple data groups; S4, storing all parameter names and each data group independently in a text file to form a parameter name file and multiple data group files, and forming a mapping relationship between the parameter name file and each data group file; S5, according to the size of the parameter name file and each data group file, calculate the required total memory storage space, allocate the number of memory blocks according to the size of the total memory storage space, and store the parameter name file and each data group file in each memory block; using OLE technology, import the parameter name file and each data group file into the working memory space of MATLAB one by one in the order of generating memory blocks, and call the internal data processing algorithm of the MATLAB program to perform data processing and calculation to obtain the calculation result; S6, through the linking and embedding mechanism between VBA and documents, the calculation results are associated with the parameter names in the format of data tables and graphics in Office.
2. According to the engine test data processing method of claim 1, Features: Step S6 also includes step S7, writing into word to generate result report.
3. A computer-readable storage medium having a computer program stored thereon, Features: When the program is executed by a processor, the steps of an engine test data processing method as claimed in claim 1 or 2 are implemented.
4. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, Features: When the processor executes the computer program, the steps of the engine test data processing method as claimed in claim 1 or 2 are implemented.
