Rapid extraction method for aerospace product test data

The rapid extraction method of test data of aerospace products developed through the Python programming language solves the problems of inefficient and prone to errors in the existing technology, and realizes efficient and accurate data processing, meeting the needs of product research and development.

CN119849439APending Publication Date: 2025-04-18BEIJING XINGHANG MECHANICAL ELECTRICAL EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411797187.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

In the prior art, the processing of test data of aerospace products mainly relies on manual processing and conventional data processing software, which is inefficient and prone to errors, and cannot meet the requirements of product research and development.

Method used

The rapid extraction method of test data of aerospace products developed using the Python programming language includes data source management module, data extraction module, data conversion module and data output module. Through the steps of parameter transmission, data extraction, data conversion and data output, the rapid extraction and processing of test data is achieved.

Benefits of technology

It effectively improves the processing efficiency and accuracy of product test data, reduces manual intervention, improves the degree of automation of data processing, and meets the needs of product research and development for efficient data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119849439A_ABST
    Figure CN119849439A_ABST
Patent Text Reader

Abstract

The invention relates to a spaceflight product test data rapid extraction method, and solves the problems that the current product test data processing efficiency is low and errors are easy to occur. The method comprises the following specific steps: 1) parameter transmission; 2) data extraction, wherein a data extraction function executes the following steps: a) judging a test data file format; b) if the format of the test data file is'. Dbf ', respectively extracting'product numbers', 'test items' and'test results' according to database file header information; c) if the format of the test data file is'. Txt ', searching and extracting' product numbers', 'test items' and 'test results' according to text content; d) storing the extracted data in the form of a dictionary and sorting the data according to product numbers; and 3) outputting data. According to the product test data processing method developed based on the Python language, the processing efficiency and accuracy of the product test data can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a data extraction method, in particular to a method for quickly extracting test data of aerospace products. Background Art

[0002] Aerospace product testing is a very important part of the product development process. During the testing process, a large amount of test data needs to be collected, analyzed, and processed to evaluate the performance and reliability of the product. At present, product test data processing mainly relies on manual processing and conventional data processing software. However, this processing method is inefficient and prone to errors, and cannot meet the requirements of product development. Summary of the invention

[0003] The present invention provides a method for quickly extracting aerospace product test data, thereby solving the problem that current product test data processing mainly relies on manual processing and conventional data processing software, which is inefficient, prone to errors, and cannot meet the requirements of product research and development.

[0004] The present invention is achieved by the following technical solutions:

[0005] A method for quickly extracting test data of aerospace products, using Python programming language, the software includes a data source management module, a data extraction module, a data conversion module and a data output module, and the specific steps are as follows:

[0006] 1) Parameter passing: The parameter passing function performs the following steps:

[0007] a) Get the test data file path;

[0008] b) Obtain the test items you want to extract;

[0009] c) Add the test items to be extracted to the "Keyword" list;

[0010] 2) Data extraction: The data extraction function performs the following steps:

[0011] a) Determine the test data file format;

[0012] b) If the test data file format is ".dbf", extract "product number", "test item" and "test result" respectively according to the database file header information;

[0013] c) If the test data file format is ".txt", search and extract "product number", "test item" and "test result" according to the text content;

[0014] d) storing the extracted data in a dictionary format and sorting them according to the size of the product numbers;

[0015] 3) Data output: The data output function performs the following steps:

[0016] a) Generate an Excel worksheet;

[0017] b) Write the product numbers in order into the first column of the worksheet;

[0018] c) Write the test item name into the first row of the worksheet;

[0019] d) Write the test results extracted in step 2) into the corresponding cells in the worksheet.

[0020] The product test data processing method developed based on the Python language of the present invention can effectively improve the processing efficiency and accuracy of product test data. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0022] Python is a high-level programming language widely used in scientific computing, data analysis and machine learning. It is easy to learn and use, has simple syntax and rich modules. The software includes data source management module, data extraction module, data conversion module and data output module.

[0023] 1) Data source management module, which is used to configure and manage different types of data sources, such as databases, files, network interfaces, etc., and provide corresponding interfaces and protocols; the data source function has two functions: one is to obtain the storage path of the data source file, and the other is to obtain the test items to be extracted. In order to facilitate processing, the test data is uniformly stored in the source folder, and the keywords of the test items to be extracted are saved in the keyword.txt text file. The program then automatically opens the file to read the keyword information and stores it in the keyword_list list. Through the processing of the data source function, two return values, the file path 'path' and the keyword list 'keyword_list', are obtained. Passing these two values ​​as variables to the data extraction function can perform test traversal and extraction.

[0024] 2) Data extraction module, used to extract the required test data, such as fields, records, attributes, etc., from the data source according to the conditions and rules specified by the user, and perform necessary filtering and verification; the data extraction function traverses all test data files under the path 'path' through os.walk(), and after judging the file type, it compares each element in the 'keyword_list' list one by one, and extracts the corresponding test results after finding the corresponding test items. Through the processing of the data processing function, the traversal query and extraction of all test data are realized, and a return value result_dict{} in the dictionary format is obtained. The "key" of the dictionary is the product number, and the "value" of the dictionary is the test result list corresponding to the test item.

[0025] 3) Data conversion module, used to convert the extracted test data into the format required by the target system and perform necessary formatting and verification;

[0026] 4) Data output module, used to output the converted test data to the target system or store it in a file for subsequent testing or analysis. Its function is to write the previously obtained data into an Excel file in a certain format. In order to enhance the readability of the result file, the "keys" in the result_dict{} dictionary are sorted before writing, that is, the sorted() function is used to sort them in the order of product numbers, and then the test items and corresponding results are written line by line.

[0027] like Figure 1 As shown, the implementation mode of the present invention is as follows:

[0028] 1) Parameter passing: The parameter passing function performs the following steps:

[0029] a) Get the test data file path;

[0030] b) Obtain the test items you want to extract;

[0031] c) Add the test items that need to be extracted to the "Keywords" list.

[0032] 2) Data extraction: The data extraction function performs the following steps:

[0033] a) Determine the test data file format;

[0034] b) If the test data file format is ".dbf", extract "product number", "test item" and "test result" respectively according to the database file header information;

[0035] c) If the test data file format is ".txt", search and extract "product number", "test item" and "test result" according to the text content;

[0036] d) Store the extracted data in dictionary form and sort them according to the size of the product numbers.

[0037] 3) Data output: The data output function performs the following steps:

[0038] a) Generate an Excel worksheet;

[0039] b) Write the product numbers in order into the first column of the worksheet;

[0040] c) Write the test item name into the first row of the worksheet;

[0041] d) Write the test results extracted in step 2) into the corresponding cells in the worksheet.

Claims

1. A method for quickly extracting test data of aerospace products, characterized by: Using Python programming language, the software includes data source management module, data extraction module, data conversion module and data output module. The specific steps are as follows: 1) Parameter passing: The parameter passing function performs the following steps: a) Get the test data file path; b) Obtain the test items you want to extract; c) Add the test items to be extracted to the "Keywords" list; 2) Data extraction: The data extraction function performs the following steps: a) Determine the test data file format; b) If the test data file format is ".dbf", extract "product number", "test item" and "test result" respectively according to the database file header information; c) If the test data file format is ".txt", search and extract "product number", "test item", and "test result" according to the text content; d) storing the extracted data in a dictionary format and sorting them according to the size of the product numbers; 3) Data output: The data output function performs the following steps: a) Generate an Excel worksheet; b) Write the product numbers in order into the first column of the worksheet; c) Write the test item name into the first row of the worksheet; d) Write the test results extracted in step 2) into the corresponding cells in the worksheet.