CN114817043A - Method, device and medium for extracting product test data - Google Patents

Method, device and medium for extracting product test data Download PDF

Info

Publication number
CN114817043A
CN114817043A CN202210468233.9A CN202210468233A CN114817043A CN 114817043 A CN114817043 A CN 114817043A CN 202210468233 A CN202210468233 A CN 202210468233A CN 114817043 A CN114817043 A CN 114817043A
Authority
CN
China
Prior art keywords
extracted
data
result
test
processing mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210468233.9A
Other languages
Chinese (zh)
Inventor
燕旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210468233.9A priority Critical patent/CN114817043A/en
Publication of CN114817043A publication Critical patent/CN114817043A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/116Details of conversion of file system types or formats

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application and the product test field disclose a method, a device and a medium for extracting product test data, which comprise: and acquiring a test result to be extracted, selecting a format mode according to the file format after determining the file format and the number of the files of the test result to be extracted, and selecting a processing mode according to the number and the composition structure of the files, wherein the format mode is a mode preset according to each file format. And finally, carrying out data extraction on the test result to be extracted by combining the format mode and the processing mode to obtain an extraction result. Therefore, different format modes and processing modes are selected according to the file format of the test result to be extracted, the number and the composition structure of the file, namely, the data extraction mode is adjusted according to different phase adaptation of the product test result, so that the problem that effective data cannot be extracted or the data is extracted mistakenly due to the fact that one data extraction mode is used for all the product test results is avoided, the extraction range is expanded, and the extraction efficiency of the product test result is improved.

Description

Method, device and medium for extracting product test data
Technical Field
The present application relates to the field of product testing, and in particular, to a method, an apparatus, and a medium for extracting product test data.
Background
The product test is an important link in the product production cycle, and the extraction and the arrangement of important data in the test result after the product test are important steps in the product test link, and the extraction and the arrangement of the important data in the product test result are related to the product quality, the product benefit and the like of an enterprise.
At present, when important data in a test result is extracted and sorted, a data extraction mode is usually used for a class of test results or a class of test items, and when the output format of the test results is not standard, effective data cannot be extracted or extracted data is wrong. And the current data extraction mode is inflexible, and when the test content changes, the corresponding data extraction method cannot be automatically adjusted, so that the extracted data is omitted or the extracted data is wrong, and the data extraction efficiency of the product test result is reduced.
Therefore, the technical staff in the field needs to solve the problem of how to expand the range of extracting the test result data of the product and still smoothly extract the data after the test content is changed, thereby improving the efficiency of extracting the test data of the product.
Disclosure of Invention
The method, the device and the medium for extracting the product test data select a corresponding format mode and a corresponding processing mode according to a file format, the number of files and a composition structure of a test result to be extracted, wherein the format mode is a mode preset according to each file format. And then the data extraction mode is adaptively adjusted according to different to-be-extracted test results of the product, so that the extraction range is enlarged, and the extraction efficiency is improved.
In order to solve the above technical problem, the present application provides a method for extracting product test data, including:
obtaining a test result to be extracted;
after the file format of the test result to be extracted is determined, selecting a corresponding format mode according to the file format; the format mode is a mode which is preset according to each file format;
after the number of the files of the test result to be extracted is determined, selecting a corresponding processing mode according to the number of the files and the composition structure of the test result to be extracted;
and carrying out data extraction on the test result to be extracted according to the format mode and the processing mode to obtain an extraction result.
Preferably, the processing modes include a batch processing mode, a location processing mode, and a keyword processing mode.
Preferably, when the number of the files of the test result to be extracted is single, the selecting the corresponding processing mode according to the number of the files and the composition structure of the test result to be extracted includes:
judging whether the test result to be extracted consists of a plurality of same structures;
if so, selecting the batch processing mode;
if not, determining whether the position of the data to be extracted in the file is fixed, if so, selecting the position processing mode, and if not, selecting the keyword processing mode.
Preferably, when the number of the files where the test result to be extracted is located is multiple, the selecting the corresponding processing mode according to the number of the files and the composition structure of the test result to be extracted includes:
judging whether the types of the files of the test result to be extracted are the same;
if the types are the same, judging whether the test results to be extracted in each file are of the same structure, if so, selecting the batch processing mode, if not, determining whether the position of the data to be extracted in the file is fixed, if so, selecting the position processing mode, and if not, selecting the keyword processing mode;
if the types are different, classifying the files where the test results to be extracted are located according to a preset classification standard, and selecting the processing mode according to the composition structure of the test results to be extracted of the files in the classification results.
Preferably, when the processing mode is a batch processing mode, the extracting the data of the test result to be extracted according to the format mode and the processing mode to obtain an extraction result includes:
calibrating and framing the test result to be extracted of each same structure to obtain a calibration result and a framing result;
determining the specific position of the data to be extracted according to the calibration result and the selection result;
and performing data extraction on the test result to be extracted according to the specific position of the data to be extracted to obtain the extraction result.
Preferably, when the processing mode is a position processing mode, the extracting the data of the test result to be extracted according to the format mode and the processing mode to obtain an extraction result includes:
determining the extraction range of the data to be extracted according to the fixed position of the data to be extracted;
judging whether the data name corresponding to the data to be extracted and the data are serialized or not, and if so, splicing the data name and the data to obtain a splicing result;
calibrating and storing the fixed position of the data to be extracted;
and extracting the splicing result and the fixed position information to obtain the extraction result.
Preferably, when the processing mode is a keyword processing mode, the extracting the data of the test result to be extracted according to the format mode and the processing mode to obtain an extraction result includes:
acquiring a keyword corresponding to the data to be extracted; the position of the keyword is located near the position of the data to be extracted;
determining the position of the data to be extracted according to the position of the keyword;
calibrating and storing the position of the data to be extracted;
and extracting the data to be extracted according to the position of the data to be extracted to obtain the extraction result.
Preferably, after the data extraction of the test result to be extracted according to the format mode and the processing mode to obtain an extraction result, the method further includes:
converting each data unit in the extraction result to unify the data units;
and selecting the display type of the extraction result, and performing integrated display on the extraction result according to the display type.
In order to solve the above technical problem, the present application further provides an apparatus for extracting product test data, including:
the acquisition module is used for acquiring a test result to be extracted;
the first selection module is used for selecting a corresponding format mode according to the file format after the file format of the test result to be extracted is determined; the format mode is a mode which is preset according to each file format;
the second selection module is used for selecting a corresponding processing mode according to the number of the files and the composition structure of the test result to be extracted after the number of the files where the test result to be extracted is located is determined;
and the extraction module is used for carrying out data extraction on the test result to be extracted according to the format mode and the processing mode to obtain an extraction result.
In order to solve the above technical problem, the present application further provides an apparatus for extracting product test data, including a memory for storing a computer program;
a processor for implementing the steps of the method of extracting product test data as described when executing the computer program.
In order to solve the above technical problem, the present application further provides a computer-readable storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement the steps of the method for extracting product test data as described above.
The invention provides a method for extracting product test data, which comprises the following steps: and acquiring a test result to be extracted, and selecting a corresponding format mode according to the file format after determining the file format of the test result to be extracted, wherein the format mode is a mode preset according to each file format. Determining the number of files where the test results to be extracted are located, selecting a corresponding processing mode according to the number of the files and the composition structure of the test results to be extracted after determining the number, and extracting data of the test results to be extracted by combining the format mode and the processing mode to obtain the extraction results. Therefore, according to the technical means provided by the application, different format modes and processing modes are selected according to the file format of the test result to be extracted, the number of the files of the test result to be extracted and the composition structure of the test result to be extracted, namely, the data extraction mode is adjusted according to different phase adaptation of the test result of the product, so that the problem that effective data cannot be extracted due to the fact that one data extraction mode is used for all the test results of the product, errors in data extraction or data extraction are caused due to data omission is avoided, the extraction range of the test result of the product is expanded, and the extraction efficiency of the test result of the product is improved.
In addition, the application also provides a device and a medium for extracting the product test data, which correspond to the method for extracting the product test data, and the effects are the same as the above.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments 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 that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is a flow chart of a method for extracting product test data according to an embodiment of the present disclosure;
FIG. 2 is a block diagram of an apparatus for extracting product test data according to an embodiment of the present disclosure;
fig. 3 is a block diagram of an apparatus for extracting product test data according to another embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the present application.
The core of the application is to provide a method, a device and a medium for extracting product test data, obtain a test result to be extracted, and select different format modes and processing modes according to the file format, the number of files and the composition structure of the test result to be extracted, wherein the format mode is a mode which is preset according to each file format. Therefore, the data extraction mode is adaptively adjusted according to different phases of the product test results, the problems that effective data cannot be extracted due to the fact that one data extraction mode is used for all test results, data is omitted to be extracted or data is extracted mistakenly are avoided, and the data extraction efficiency is improved.
In order that those skilled in the art will better understand the disclosure, the following detailed description is given with reference to the accompanying drawings.
The product test is an important link in the product production cycle, and the extraction and the arrangement of important data in the test result after the product test are important steps in the product test link, and the extraction and the arrangement of the important data in the product test result are related to the product quality, the product benefit and the like of an enterprise.
At present, when important data in a test result is extracted and sorted, a data extraction mode is usually used for a class of test results or a class of test items, and when the output format of the test results is not standard, effective data cannot be extracted or extracted data is wrong. And the current data extraction mode is inflexible, and when the test content changes, the corresponding data extraction method cannot be automatically adjusted, so that the extracted data is omitted or the extracted data is wrong, and the data extraction efficiency of the product test result is reduced.
In order to expand the range of extracting product test result data and improve the efficiency of extracting product test data, the embodiment of the application provides a method for extracting product test data, different format modes and processing modes are selected according to the file format, the number of files and the composition result of the test result to be extracted, namely, the data extraction mode is adaptively adjusted according to different product test results.
Fig. 1 is a flowchart of a method for extracting product test data according to an embodiment of the present application, as shown in fig. 1, the method includes:
s10: and obtaining a test result to be extracted.
S11: after determining the file format of the test result to be extracted, selecting a corresponding format mode according to the file format; the format mode is a mode which is set in advance according to each file format.
In a specific embodiment, when extracting important data in a test result of a product, firstly, a test result to be extracted needs to be obtained, after the test result to be extracted is obtained, a format of a file where the test result to be extracted is located is determined, and a corresponding format mode needs to be selected according to the file format. It can be understood that the format mode is a mode preset according to each file format, and the file formats include PDF, Word, html, and the like, and the type setting of the format mode is not limited in the present application, and can be set according to actual service requirements as long as it can be ensured that the test result to be extracted in different file formats can be accurately identified and extracted.
In fact, a format mode library may also be preset, and then the User selects a format mode corresponding to the current test product through a Graphical User Interface (GUI for short), where the selection of the format mode may be automatic matching selection or may be self-selection by the User, which is not limited in this application.
S12: and after the number of the files of the test result to be extracted is determined, selecting a corresponding processing mode according to the number of the files and the composition structure of the test result to be extracted.
In the implementation, the test results of different items or different devices may be stored in one file or different files, so that when the number of the files in which the test results to be extracted are located is single, it is determined whether the composition structures of the test results to be extracted in the files are the same, if so, a batch processing mode is selected, if not, it is determined whether the positions of the data to be extracted in the files are fixed, if so, a position processing mode is selected, and if not, a keyword processing mode is selected.
When the number of the files where the test results to be extracted are located is multiple, it is necessary to determine whether the important data to be extracted from the test results to be extracted in each file is data of one type or whether the devices or items corresponding to the test results to be extracted are the same, that is, whether the types of the files where the test results to be extracted are located are the same. It can be understood that, when the data to be extracted is a type of data or the corresponding devices or items are the same, the mode of selecting the processing mode is the same as the mode of selecting the number of files individually. However, when the data to be extracted is not the same type of data or the corresponding devices or items are different, the processing mode needs to be determined according to the classification result and the composition result of the test result to be extracted in each file after each file where the test result to be extracted is located is classified.
S13: and extracting data of the test result to be extracted according to the format mode and the processing mode to obtain an extraction result.
In step S13, when data is extracted from the test result to be extracted according to the format mode and the processing mode to obtain an extraction result, if the processing mode is the batch processing mode, firstly, the test result to be extracted with the same structure needs to be calibrated and framed to obtain a calibration result and a framing result, and a specific position of the data to be extracted is determined according to the obtained calibration result and framing result, where calibration refers to calibration and recording of information such as the number of lines and the number of characters where the data to be extracted is located. And finally, extracting data according to the specific position of the data to be extracted to obtain an extraction result.
It should be noted that the steps S10 to S13 can be implemented by a programming language, and the application is not limited to the selection of a specific programming language. At present, because the Python programming language is widely used for data analysis and processing, and the Python programming language has high readability of codes, good maintainability, and a certain depth in terms of data analysis, graph processing, and data visualization, the tools and libraries included therein are not only numerous and convenient, but also the compatibility of the Python programming language related library is high, and can be "sticky" with other languages, so that it is convenient for the Python programming language to be implemented with the assistance of other programming languages when it is difficult for the Python programming language to implement a certain function, in the embodiment of the present application, the foregoing steps S10 to S13 are preferably implemented using the Python programming language.
When the position of the data to be extracted in the test result to be extracted in the file is fixed, a position processing mode is selected for data extraction, at this time, the extraction range of the data to be extracted is determined according to the fixed position of the data to be extracted, whether the data name corresponding to the data to be extracted and the data itself are serial is judged, if the data name and the data itself are serial, the data name and the data themselves are spliced to obtain a spliced result, and certainly, the position of the data to be extracted in the file is convenient for a user to check, so that the fixed position of the data to be extracted needs to be calibrated and stored. And finally, obtaining an extraction result according to the splicing result and the vaccinium uliginosum position information.
Step S12 shows that when the position of the data to be extracted in the test result to be extracted in the file is not fixed, the keyword processing mode is selected, and at this time, a keyword corresponding to the data to be extracted is obtained, where it should be noted that the position of the keyword is located near the position of the data to be extracted. And determining the position of the data to be extracted according to the position of the keyword, and calibrating and storing the position information of the data to be extracted. And finally, extracting the data to be extracted according to the position of the data to be extracted to obtain an extraction result. It should be noted that the keyword may be selected by the user through a GUI, or may be automatically selected according to different items and test results to be extracted, which is not limited in this application.
It can be understood that when the test result to be extracted exists in one file, there may be a portion of the data to be extracted that is suitable for the batch processing mode, the location processing mode, and the keyword processing mode, and certainly, when the test result to be extracted exists in a plurality of files, there may also be a case where a plurality of files respectively have a portion that is suitable for the batch processing mode, the location processing mode, and the keyword processing mode, at this time, different processing modes are respectively invoked to extract the data to obtain the extraction result, and finally, each extraction result is integrated to output one result.
It should be noted that the extracted data often has units, and therefore, after the extraction result is obtained through each processing mode, unit conversion needs to be performed on each data in the extraction result, that is, data units are unified, and the display type of the extraction result is obtained, so that the extracted data is integrated and output according to the display type, and it is required that the display type may be a table or a bar graph, and the application is not limited thereto.
The method for extracting the product test data provided by the embodiment of the application comprises the following steps: and acquiring a test result to be extracted, and selecting a corresponding format mode according to the file format after determining the file format of the test result to be extracted, wherein the format mode is a mode preset according to each file format. Determining the number of files where the test results to be extracted are located, selecting a corresponding processing mode according to the number of the files and the composition structure of the test results to be extracted after determining the number, and extracting data of the test results to be extracted by combining the format mode and the processing mode to obtain the extraction results. Therefore, according to the technical means provided by the application, different format modes and processing modes are selected according to the file format of the test result to be extracted, the number of the files of the test result to be extracted and the composition structure of the test result to be extracted, namely, the data extraction mode is adjusted according to different phase adaptation of the test result of the product, so that the problem that effective data cannot be extracted due to the fact that one data extraction mode is used for all the test results of the product, errors in data extraction or data extraction are caused due to data omission is avoided, the extraction range of the test result of the product is expanded, and the extraction efficiency of the test result of the product is improved.
In particular embodiments, the processing modes include a batch processing mode, a location processing mode, and a keyword processing mode, it can be understood that when the number of the files where the test result to be extracted is located is single, the test results representing all the test devices or test items are all output in one file, at this time, it is necessary to determine whether the test output result of the product is composed of a plurality of same structures, for example, the test results of 6 test devices or test items are in a Word file, and the results of each test device or test item are in different pages stored in the Word file, and when determining that the structures of the test results to be gradually tested in each page are the same, selecting a batch processing mode, when the composition structures are different, determining whether the position of the data to be extracted in the file is fixed, if so, selecting the position processing mode, and if not, selecting the keyword processing mode.
It should be noted that the structural identity means that the structural identity of the test results is the same, for example, the structure of the test results of 6 test items in a Word file in each page is: the first action is the name of the test item, the second action is the name of the data to be extracted, and the third action is the data itself of the data to be extracted.
According to the method for extracting the product test data, when the number of the files where the test results to be extracted are located is single, whether the test results to be extracted are composed of a plurality of same structures is judged, if yes, a batch processing mode is selected, if not, whether the positions of the files where the data to be extracted are located are fixed is determined, if yes, the position processing mode is selected, and if not, the keyword processing mode is selected. Therefore, the final data extraction mode is determined according to the composition structure of the test result to be extracted, namely, the data extraction method can be flexibly changed in the face of different test output results, and the data extraction efficiency is improved.
On the basis of the above embodiment, it can be understood that the test result to be extracted may exist in multiple files, and at this time, it is necessary to determine whether the test result to be extracted in each file is a type of data or whether the devices or items corresponding to the test result to be extracted are the same, that is, whether the types of the files in which the test result to be extracted is located are the same.
And when the types of the files of the test results to be extracted are the same, judging whether the test results to be extracted in the files are of the same structure, if so, selecting a batch processing mode, if not, determining whether the position of the data to be extracted in the files is fixed, if so, selecting a position processing mode, and if not, selecting a keyword processing mode. In fact, when the types of the files in which the test results to be extracted are located are the same, the principle of selecting the processing mode is the same as that of selecting the processing mode when the test results to be extracted are stored in one file.
When the types of the files in which the test results to be extracted are located are different, for example, the test results of 6 test items are respectively stored in 6 Word files, and 3 of the Word files are files related to the extraction rate, and the other 3 of the Word files are files for extracting the acceleration, so that the files in which the test results to be extracted are located are classified according to a preset classification standard, after the classification, whether the test results to be extracted in the files are of the same structure is judged, and a corresponding processing mode is selected according to the structure.
It should be noted that the pre-classification criterion may be a classification according to a type of data to be extracted, or a classification according to a type of an item, and the present application is not limited thereto.
According to the method for extracting the product test data, when the number of the files where the test results to be extracted are located is multiple, whether the types of the files where the test results to be extracted are located are the same is judged, if the types of the files are the same, whether the test results to be extracted in the files are of the same structure is judged, if the types of the files are the same, a batch processing mode is selected, if the types of the files are not the same structure, whether the positions of the files where the data to be extracted are located are fixed is determined, if the types of the files are not the same structure, a position processing mode is selected, and if the types of the files are not the same, a keyword processing mode is selected. If the types are different, classifying the files of the test result to be extracted according to a preset classification standard, and selecting a processing mode according to the composition structure of the test result to be extracted of each file in the classification result. Therefore, the processing mode can be selected according to the number and the composition structure of the files where the test results to be extracted are located, the data extraction inefficacy caused by the fact that different test items use one data extraction mode is avoided, and the data extraction efficiency of the test results is improved.
In the specific implementation, no matter the number of the files where the test results to be extracted are located is one or more, as long as the test results to be extracted have the same composition structure, the batch processing mode is selected as the processing mode, and when the batch processing is performed, the test results to be extracted with the same structure are calibrated and framed to obtain the calibration results and the framing results. It should be noted that, during calibration, calibration may be performed according to information such as the number of lines or the number of characters where data to be extracted is located, and the application is not limited thereto.
And after the calibration result and the framing result are obtained, determining the specific position of the data to be extracted according to the calibration result and the framing result, and extracting the data of the test result to be extracted according to the specific position of the data to be extracted to obtain an extraction result. In fact, since there are parts with the same structure in the test result to be extracted, batch extraction can be performed after the extraction range selection is performed. It should be noted that the range of the frame selection may be set by the user through the GUI, or may be automatically frame selection according to the position of the data to be extracted in each identical structure, which is not limited in this application.
According to the method for extracting the product test data, when the processing mode is the batch processing mode, the test results to be extracted with the same structures can be calibrated and framed so as to determine the specific position of the data to be extracted, further realize batch extraction of the test results to be extracted, and improve the efficiency of data extraction.
In fact, if the test result to be extracted does not have the same composition structure, but the position of the data to be extracted in the file is fixed, the position processing mode is selected. For example, the test results of 6 test items are output in a Word file, the test result of each test item has different pages of the Word file, the names of the test items are different, the name of the required data to be extracted and the data themselves are different, but the data themselves to be extracted are all the fourth data in the third row of the Word page where the current test item is located, that is, the locations of the data to be extracted are the same, and at this time, a location processing mode is selected for data extraction.
When the position processing mode is called for processing, the extraction range of the data to be extracted is determined according to the fixed position of the data to be extracted, whether the data name corresponding to the data to be extracted and the data are serialized or not is judged, and if the data name and the data are serialized, the data name and the data are spliced to obtain a splicing result. Similarly, the extraction range may be set by a user through a GUI, or may be automatically determined according to a fixed position of the data to be extracted, which is not limited in this application. In addition, in order to facilitate the user to view the position of data extraction, the fixed position of the data to be extracted needs to be calibrated and stored. And finally, obtaining an extraction result according to the splicing result and the fixed position information, namely finishing the data extraction of the test result to be extracted. Of course, if the data name and the data themselves are not serialized, the data can be directly extracted.
According to the method for extracting the product test data, the extraction range of the data to be extracted is determined according to the fixed position of the data to be extracted, when the data name and the data corresponding to the data to be extracted are determined to be serial, the data name and the data are spliced to obtain a splicing result, and then the extraction result is obtained according to the extraction splicing result and the fixed position information. Therefore, when the position of the data to be extracted is fixed, the purpose of rapidly extracting the data is achieved through the positioning of the fixed position, and the data extraction efficiency is improved.
On the basis of the above embodiment, if the same composition structure does not exist in the test result to be extracted, and the position of the data to be extracted in the document is not fixed, but a keyword is always associated with the data to be extracted in the vicinity of the data to be extracted, the keyword processing mode is selected.
When a keyword processing mode is called for data extraction, keywords corresponding to data to be extracted are obtained first, wherein the positions of the keywords are located near the positions of the data to be extracted. And determining the position of the data to be extracted according to the position of the keyword, calibrating and storing the position of the data to be extracted, and further extracting the data to be extracted according to the position of the data to be extracted to obtain an extraction result.
Usually, explanatory words or characters with a fixed format, i.e., keywords, are located near the upper and lower character strings of the location where the data to be extracted is located, and therefore, the location where the data is located can be determined by selecting the keywords. It can be understood that the keyword may be an explanatory document, may also be a character, may be a chinese character, may also be a letter, and the like, and the application is not limited to this. In addition, it should be noted that the selection of the keyword may be performed by a user through a GUI, or may also be performed by scanning and automatically determining a test result to be extracted.
For example, the Keyword is "bandwidth Data", and there is a fixed relationship between the Keyword and Data to be extracted, for example, N character strings are spaced in the middle, so that the index distance between the Keyword and Data is inevitably a fixed value, and further, the specific position of Data can be determined according to the Keyword, and after the specific position of Data is calibrated and stored, Data is extracted to obtain an extraction result.
It is understood that the position processing mode is extracted according to the absolute position of the data to be extracted, and the keyword processing mode is extracted according to the relative position of the data to be extracted.
According to the method for extracting the product test data, the specific position of the data to be extracted is determined according to the position information of the key word with the fixed position relation with the data to be extracted, and then the purpose of extracting the data according to the key word is achieved, so that the data extraction range is enlarged, the data extraction efficiency is improved, and the product quality is improved.
It can be understood that the extracted data often has units, and the data units that may be extracted are different according to different test results, and after the data extraction is performed on the test result to be extracted according to the format mode and the processing mode to obtain the extraction result, each data unit in the extraction result needs to be converted to unify the data units. For example, when the packet size is extracted, the packet size units include "GB", "MB", "KB", and "B", and may be unified into "KB" after the data is extracted.
And after unifying the units of the questions, selecting the display type of the extraction result, and performing integrated display on the extraction result according to the display type. It should be noted that the display type may be a table, a picture, or the like, and the present application is not limited thereto, and of course, the selection of the display type may be a selection by a user through a GUI, or may be a type in which data is actually extracted and automatically assigned, and the present application is not limited thereto.
According to the method for extracting the product test data, after the data extraction is carried out on the test result to be extracted according to the format mode and the processing mode to obtain the extraction result, all data units in the extraction result are converted to unify the data units, the display type of the extraction result is selected, and the extraction result is integrally displayed according to the display type, so that a user can visually observe the data extraction condition.
In the above embodiments, a method for extracting product test data is described in detail, and the present application also provides a corresponding embodiment of an apparatus for extracting product test data. It should be noted that the present application describes the embodiments of the apparatus portion from two perspectives, one is based on the functional module, and the other is based on the hardware structure.
Fig. 2 is a block diagram of an apparatus for extracting product test data according to an embodiment of the present application, and as shown in fig. 2, the apparatus includes:
and the obtaining module 10 is used for obtaining the test result to be extracted.
The first selection module 11 is configured to select a corresponding format mode according to a file format after determining the file format of the test result to be extracted; the format mode is a mode which is set in advance according to each file format.
The second selection module 12 is configured to select a corresponding processing mode according to the number of files and the composition structure of the test result to be extracted after determining the number of files in which the test result to be extracted is located;
and the extraction module 13 is configured to perform data extraction on the test result to be extracted according to the format mode and the processing mode to obtain an extraction result.
Since the embodiments of the apparatus portion and the method portion correspond to each other, please refer to the description of the embodiments of the method portion for the embodiments of the apparatus portion, which is not repeated here.
The device of extraction product test data that this application embodiment provided includes: and acquiring a test result to be extracted, and selecting a corresponding format mode according to the file format after determining the file format of the test result to be extracted, wherein the format mode is a mode preset according to each file format. Determining the number of files where the test results to be extracted are located, selecting a corresponding processing mode according to the number of the files and the composition structure of the test results to be extracted after determining the number, and extracting data of the test results to be extracted by combining the format mode and the processing mode to obtain the extraction results. Therefore, according to the technical means provided by the application, different format modes and processing modes are selected according to the file format of the test result to be extracted, the number of the files of the test result to be extracted and the composition structure of the test result to be extracted, namely, the data extraction mode is adjusted according to different phase adaptation of the test result of the product, so that the problem that effective data cannot be extracted due to the fact that one data extraction mode is used for all the test results of the product, errors in data extraction or data extraction are caused due to data omission is avoided, the extraction range of the test result of the product is expanded, and the extraction efficiency of the test result of the product is improved.
Fig. 3 is a block diagram of an apparatus for extracting product test data according to another embodiment of the present application, and as shown in fig. 3, the apparatus for extracting product test data includes: a memory 20 for storing a computer program;
a processor 21 for implementing the steps of the method of extracting product test data as mentioned in the above embodiments when executing the computer program.
The device for extracting product test data provided by the embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, or the like.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The Processor 21 may be implemented in at least one hardware form of a Digital Signal Processor (DSP), a Field-Programmable Gate Array (FPGA), and a Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with an image processor (GPU), and the GPU is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 21 may further include an Artificial Intelligence (AI) processor for processing computing operations related to machine learning.
The memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing a computer program 201, wherein the computer program is loaded and executed by the processor 21, and then the relevant steps of the method for extracting product test data disclosed in any one of the foregoing embodiments can be implemented. In addition, the resources stored in the memory 20 may also include an operating system 202, data 203, and the like, and the storage manner may be a transient storage manner or a permanent storage manner. Operating system 202 may include, among others, Windows, Unix, Linux, and the like. Data 203 may include, but is not limited to, relevant data involved in the method of extracting product test data.
In some embodiments, the means for extracting product test data may further comprise a display 22, an input/output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the configuration shown in FIG. 3 does not constitute a limitation of the means for extracting product test data and may include more or fewer components than those shown.
The device for extracting the product test data provided by the embodiment of the application comprises a memory and a processor, wherein when the processor executes a program stored in the memory, the following method can be realized: a method for extracting product test data.
According to the device for extracting the product test data, different format modes and processing modes are selected according to the file format of the test result to be extracted, the number of the files of the test result to be extracted and the composition structure of the test result to be extracted, namely, the data extraction mode is adjusted according to different phase adaptations of the product test result, the problem that effective data cannot be extracted due to the fact that one data extraction mode is used for all the product test results is avoided, data omission extraction or data extraction errors occur, the extraction range of the product test result is enlarged, and meanwhile the extraction efficiency of the product test result is improved.
Finally, the application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps as set forth in the above-mentioned method embodiments.
It is to be understood that if the method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods described in the embodiments of the present application, or all or part of the technical solutions. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The method, apparatus, and medium for extracting product test data provided by the present application are described in detail above. The embodiments are described in a progressive mode in the specification, the emphasis of each embodiment is on the difference from the other embodiments, and the same and similar parts among the embodiments can be referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (11)

1. A method of extracting product test data, comprising:
obtaining a test result to be extracted;
after the file format of the test result to be extracted is determined, selecting a corresponding format mode according to the file format; the format mode is a mode which is preset according to each file format;
after the number of the files of the test result to be extracted is determined, selecting a corresponding processing mode according to the number of the files and the composition structure of the test result to be extracted;
and carrying out data extraction on the test result to be extracted according to the format mode and the processing mode to obtain an extraction result.
2. The method of extracting product test data of claim 1, wherein the processing modes include a batch processing mode, a location processing mode, and a keyword processing mode.
3. The method for extracting product test data according to claim 2, wherein when the number of the files in which the test results to be extracted are located is single, the selecting the corresponding processing mode according to the number of the files and the composition structure of the test results to be extracted comprises:
judging whether the test result to be extracted consists of a plurality of same structures;
if so, selecting the batch processing mode;
if not, determining whether the position of the data to be extracted in the file is fixed, if so, selecting the position processing mode, and if not, selecting the keyword processing mode.
4. The method for extracting product test data according to claim 2, wherein when the number of the files in which the test result to be extracted is located is plural, the selecting the corresponding processing mode according to the number of the files and the composition structure of the test result to be extracted comprises:
judging whether the types of the files of the test result to be extracted are the same;
if the types are the same, judging whether the test results to be extracted in each file are of the same structure, if so, selecting the batch processing mode, if not, determining whether the position of the data to be extracted in the file is fixed, if so, selecting the position processing mode, and if not, selecting the keyword processing mode;
if the types are different, classifying the files where the test results to be extracted are located according to a preset classification standard, and selecting the processing mode according to the composition structure of the test results to be extracted of the files in the classification results.
5. The method for extracting test data of a product according to claim 3 or 4, wherein when the processing mode is a batch processing mode, the extracting the test result to be extracted according to the format mode and the processing mode to obtain the extraction result comprises:
calibrating and framing the test result to be extracted of each same structure to obtain a calibration result and a framing result;
determining the specific position of the data to be extracted according to the calibration result and the selection result;
and performing data extraction on the test result to be extracted according to the specific position of the data to be extracted to obtain the extraction result.
6. The method according to claim 3 or 4, wherein when the processing mode is a position processing mode, the extracting the data of the test result to be extracted according to the format mode and the processing mode to obtain the extraction result comprises:
determining the extraction range of the data to be extracted according to the fixed position of the data to be extracted;
judging whether the data name corresponding to the data to be extracted and the data are serialized or not, and if so, splicing the data name and the data to obtain a splicing result;
calibrating and storing the fixed position of the data to be extracted;
and extracting the splicing result and the fixed position information to obtain the extraction result.
7. The method for extracting product test data according to claim 3 or 4, wherein when the processing mode is a keyword processing mode, the extracting the data of the test result to be extracted according to the format mode and the processing mode to obtain the extraction result comprises:
obtaining a keyword corresponding to the data to be extracted; the position of the keyword is located near the position of the data to be extracted;
determining the position of the data to be extracted according to the position of the keyword;
calibrating and storing the position of the data to be extracted;
and extracting the data to be extracted according to the position of the data to be extracted to obtain the extraction result.
8. The method for extracting test data of a product according to claim 1, wherein after the extracting the test result to be extracted according to the format mode and the processing mode to obtain the extracted result, the method further comprises:
converting each data unit in the extraction result to unify the data units;
and selecting the display type of the extraction result, and performing integrated display on the extraction result according to the display type.
9. An apparatus for extracting product test data, comprising:
the acquisition module is used for acquiring a test result to be extracted;
the first selection module is used for selecting a corresponding format mode according to the file format after the file format of the test result to be extracted is determined; the format mode is a mode which is preset according to each file format;
the second selection module is used for selecting a corresponding processing mode according to the number of the files and the composition structure of the test result to be extracted after the number of the files where the test result to be extracted is located is determined;
and the extraction module is used for carrying out data extraction on the test result to be extracted according to the format mode and the processing mode to obtain an extraction result.
10. An apparatus for extracting product test data, comprising a memory for storing a computer program;
a processor for implementing the steps of the method of extracting product test data according to any one of claims 1 to 8 when executing said computer program.
11. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the method of extracting product test data according to any one of claims 1 to 8.
CN202210468233.9A 2022-04-29 2022-04-29 Method, device and medium for extracting product test data Pending CN114817043A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210468233.9A CN114817043A (en) 2022-04-29 2022-04-29 Method, device and medium for extracting product test data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210468233.9A CN114817043A (en) 2022-04-29 2022-04-29 Method, device and medium for extracting product test data

Publications (1)

Publication Number Publication Date
CN114817043A true CN114817043A (en) 2022-07-29

Family

ID=82508787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210468233.9A Pending CN114817043A (en) 2022-04-29 2022-04-29 Method, device and medium for extracting product test data

Country Status (1)

Country Link
CN (1) CN114817043A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117035561A (en) * 2023-10-09 2023-11-10 江苏鼎豪电力工程有限公司 Electric power engineering quality supervision and management method and system based on artificial intelligence

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117035561A (en) * 2023-10-09 2023-11-10 江苏鼎豪电力工程有限公司 Electric power engineering quality supervision and management method and system based on artificial intelligence

Similar Documents

Publication Publication Date Title
CN108108342B (en) Structured text generation method, search method and device
US9690788B2 (en) File type recognition analysis method and system
US10713437B2 (en) Method and apparatus for identifying questionable line break characters in an application
CN109828906B (en) UI (user interface) automatic testing method and device, electronic equipment and storage medium
CN112882947B (en) Interface testing method, device, equipment and storage medium
US8745521B2 (en) System and method for annotating graphical user interface
US20170132216A1 (en) Systems and methods for facilitating software infterface localization between multiple languages
CN114116441A (en) UI (user interface) testing method and device, electronic equipment and storage medium
CN114817043A (en) Method, device and medium for extracting product test data
CN114359533B (en) Page number identification method based on page text and computer equipment
CN111240962B (en) Test method, test device, computer equipment and computer storage medium
US10853558B2 (en) Transforming digital text content using expressions
CN110008807A (en) A kind of training method, device and the equipment of treaty content identification model
CN110647573B (en) Chart visualization editing method and system based on database technology
CN116339799B (en) Method, system, terminal equipment and storage medium for intelligent data interface management
CN111142871A (en) Front-end page development system, method, equipment and medium
CN113553454B (en) Primitive data processing method and device and electronic equipment
CN115544620A (en) Method, device and equipment for analyzing door and window tables in drawing and storage medium
CN114661975A (en) Method, device and medium for extracting fingerprint features of WEB home page
CN114115831A (en) Data processing method, device, equipment and storage medium
CN114281761A (en) Data file loading method and device, computer equipment and storage medium
CN109656821B (en) Test method and device
CN112784527A (en) Document merging method and device and electronic equipment
US20240126573A1 (en) Display control device, display control method, and display control program
CN116136825B (en) Data detection method and system

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