A method and device for converting test data file format based on metamodel

Through the meta-model-based experimental data file format conversion method, the compatibility problem between different scientific research experimental data file formats is solved, and the unified conversion of file formats is realized, which improves the convenience and flexibility of conversion.

CN119782255APending Publication Date: 2025-04-08AEROSPACE SCIENCE & TECHNOLOGY GROUP DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411841201.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively solve the compatibility problem between file formats of different scientific research and experiment data, resulting in high difficulty in converting file formats and low reusability.

Method used

The experimental data file format conversion method based on the metamodel is adopted to convert the converted files through the pre-constructed experimental data file format metamodel, or the metamodel is extended to adapt to the format attributes that are not included, so as to achieve unified conversion of file formats.

Benefits of technology

It realizes the integration between different experimental data file formats, simplifies the difficulty of compiling file format conversion programs, and improves the convenience and flexibility of the conversion of experimental data file formats.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782255A_ABST
    Figure CN119782255A_ABST
Patent Text Reader

Abstract

The disclosed embodiment relates to a metamodel-based test data file format conversion method and device, wherein the method includes: obtaining a test data file to be converted, a format to be converted, and a target format; when a pre-constructed test data file format metamodel contains the attributes of the format to be converted and the target format, converting the test data file to be converted based on the test data file format metamodel to obtain a target format test data file; or when the pre-constructed test data file format metamodel does not contain the attributes of the format to be converted and / or the target format, expanding the test data file format metamodel based on the format to be converted and / or the target format to obtain a target test data file format metamodel; converting the test data file to be converted based on the target test data file format metamodel to obtain a target format test data file. Thus, the convenience and flexibility of the test data file format conversion are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a meta-model-based test data file format conversion method, device, equipment and medium. Background Art

[0002] In the existing scientific research test system, the changes in the actual physical parameters of the test object play an important role in helping researchers understand and grasp the specific status of the test target. The current way to record the working condition information during the test is mainly to record analog signals through various types of sensors such as gyroscopes and pressure gauges and data processing hardware, and output the test data file after a certain signal processing method. The main way to use this data is to use specific processing software to calculate the corresponding physical parameters.

[0003] In the long-term process of technological iteration, various sensors and hardware processing methods have also changed, new file types are constantly generated, the content and description formats of various new and old files are different, and the meaning of parameters is not unified, which makes it difficult to reuse and analyze test data in various fields. At the same time, even in the same era, different research teams often have large differences in the file formats of test data for the same scene.

[0004] In order to promote long-term experiments and cooperative research, there is a demand for meta-model-based experimental data file format conversion in current scientific research. Currently, low-level programming tools such as binary file editors are generally used to confirm the actual experimental data file storage rules and parameter table forms after a long period of comparison and analysis. There is also a specific practice of establishing a data format feature code library for identification and conversion. However, this method has the disadvantage that it can only be applied to completely known similar data formats in the same field, and the file format knowledge is formed into a black box through programming and cannot be systematically reused. Summary of the invention

[0005] In order to solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides a metamodel-based test data file format conversion method, device, equipment and medium.

[0006] The embodiment of the present disclosure provides a meta-model-based test data file format conversion method, comprising: obtaining a test data file to be converted, a format to be converted and a target format corresponding to the test data file to be converted; when a pre-constructed test data file format meta-model contains attributes of the format to be converted and the target format, converting the test data file to be converted based on the test data file format meta-model to obtain a target format test data file; or, when a pre-constructed test data file format meta-model does not contain attributes of the format to be converted and / or the target format, expanding the test data file format meta-model based on the format to be converted and / or the target format to obtain a target test data file format meta-model; converting the test data file to be converted based on the target test data file format meta-model to obtain the target format test data file.

[0007] Optionally, the method also includes: obtaining multiple test data files to be processed containing header and tail files; analyzing the multiple test data files to be processed containing header and tail files to obtain original parameter sets; determining model construction information based on the original parameter sets, and constructing the test data file format metamodel based on the model construction information.

[0008] Optionally, the method of obtaining a plurality of test data files to be processed containing header and tail files includes: obtaining a plurality of recorded physical quantities, and converting the plurality of recorded physical quantities into a plurality of electrical signals based on a preset sensor; performing signal conditioning on each of the electrical signals and inputting the signals into data acquisition hardware to obtain a plurality of binary digital signals; obtaining metadata describing the file body data as the header and tail files and the plurality of binary digital signals to generate the test data files to be processed containing the header and tail files; and obtaining a plurality of test data files to be processed containing the header and tail files by changing the sampling time multiple times and controlling the physical quantity method of the sampling object.

[0009] Optionally, the multiple test data files to be processed containing header and tail files are analyzed to obtain the original parameter set, including: converting each of the binary digital signals into a hexadecimal digital signal based on a preset text editing software; encoding each of the hexadecimal digital signals to obtain the original parameter set.

[0010] Optionally, the method of determining the model construction information based on the original parameter set and constructing the test data file format metamodel based on the model construction information includes: determining a unified representation identifier that describes different parameters of the same object based on the original parameter set; using the unified representation identifier as a metamodel attribute, and obtaining a subordinate parameter library corresponding to the metamodel attribute; establishing a matching correspondence between the metamodel attribute and the subordinate parameter library based on a synonym corpus, and obtaining the test data file format metamodel.

[0011] Optionally, the test data file format metamodel is expanded based on the format to be converted and / or the target format to obtain a target test data file format metamodel, including: using the file parameter instance set in the test data file format metamodel and the file parameters of the test data file to be converted to perform synonym comparison calculations in sequence to obtain calculation results; if the calculation result is greater than or equal to a preset similarity threshold, mapping the file parameters of the test data file to be converted corresponding to the highest calculation result and the metamodel attributes corresponding to the file parameter instance set; if the calculation result is less than the preset similarity threshold, adding the file parameters of the test data file to be converted as the names of new metamodel attributes to the test data file format metamodel to obtain the target test data file format metamodel.

[0012] Optionally, the test data file to be converted is converted based on the test data file format metamodel to obtain a target format test data file, including: determining all target data of the target format constructed by the format to be converted by querying the subordinate parameter names of the attributes of the test data file format metamodel; determining part of the target data under the parameter instance model of the target format according to the subordinate parameter names, and writing actual file data in the format to be converted according to the part of the target data as a standard; determining other target data based on the all target data and the part of the target data, and selecting a file template in the model instance library to fill in the other target data to obtain the target format test data file.

[0013] The disclosed embodiment also provides a meta-model-based test data file format conversion device, comprising: a first acquisition module, used to acquire a test data file to be converted, a format to be converted and a target format corresponding to the test data file to be converted; a processing module, used to convert the test data file to be converted based on the test data file format meta-model to obtain a target format test data file when a pre-constructed test data file format meta-model contains the attributes of the format to be converted and the target format; or, the extension module, used to expand the test data file format meta-model based on the format to be converted and / or the target format to obtain a target test data file format meta-model when the pre-constructed test data file format meta-model does not contain the attributes of the format to be converted and / or the target format; the processing module is also used to convert the test data file to be converted based on the target test data file format meta-model to obtain the target format test data file.

[0014] An embodiment of the present disclosure also provides an electronic device, which includes: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the meta-model-based test data file format conversion method provided in the embodiment of the present disclosure.

[0015] The embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the metamodel-based test data file format conversion method provided in the embodiment of the present disclosure.

[0016] The embodiment of the present disclosure further provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the metamodel-based test data file format conversion method described in the above aspect is implemented.

[0017] The technical solution provided by the embodiments of the present disclosure has the following advantages over the prior art: the metamodel-based test data file format conversion solution provided by the embodiments of the present disclosure includes: obtaining the test data file to be converted, the format to be converted and the target format corresponding to the test data file to be converted; when the pre-constructed test data file format metamodel contains the attributes of the format to be converted and the target format, converting the test data file to be converted based on the test data file format metamodel to obtain the target format test data file; or, when the pre-constructed test data file format metamodel does not contain the attributes of the format to be converted and / or the target format, expanding the test data file format metamodel based on the format to be converted and / or the target format to obtain the target test data file format metamodel; converting the test data file to be converted based on the target test data file format metamodel to obtain the target format test data file. As a result, the problems existing in the prior art of difficulty in file format conversion and low reusability of data format parsing work in the same test scenario are solved. The test data files are converted based on the test data file format metamodel, the scientific research test data file format model is connected, the difficulty of compiling file format conversion programs is simplified, and the test data file format metamodel can be expanded in real time to convert test data files, further improving the convenience and flexibility of test data file format conversion. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0019] Figure 1A schematic diagram of a process flow of a metamodel-based test data file format conversion method provided in an embodiment of the present disclosure;

[0020] Figure 2 A schematic diagram of a flow chart of another metamodel-based test data file format conversion method provided in an embodiment of the present disclosure;

[0021] Figure 3 An example diagram of a metamodel-based test data file format conversion method provided in an embodiment of the present disclosure;

[0022] Figure 4 A scenario example diagram of a metamodel-based test data file format conversion provided in an embodiment of the present disclosure;

[0023] Figure 5 A schematic diagram of the structure of a metamodel-based test data file format conversion device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0024] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0025] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0026] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0027] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0028] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0030] At present, low-level programming tools such as binary file editors are used to convert the test data file format after a long period of comparison and analysis to confirm the actual test data file storage rules and parameter table format. This method has the disadvantages of only being applicable to completely known similar data formats in the same field, and the file format knowledge is formed into a black box through programming and cannot be systematically reused.

[0031] In response to the above problems, it is understandable that different test data file formats have different storage rules, but they often include file header and footer structures. For example, attributes such as data unit, number of bytes of data unit, whether it is an integer, number of storage bits, encoding method, etc. are common attributes of most data file types. Constructing a test data file format metamodel as a bridge to connect various types of test data files can greatly speed up the conversion speed of different types of test data files and achieve the connection of test data files. The present disclosure implements a test data file format conversion method based on a metamodel to obtain a test data file to be converted and a to-be-converted file corresponding to the test data file to be converted. format and target format, when the pre-constructed test data file format metamodel contains the attributes of the format to be converted and the target format, the test data file to be converted is converted based on the test data file format metamodel to obtain the target format test data file; or, when the pre-constructed test data file format metamodel does not contain the attributes of the format to be converted and / or the target format, the test data file format metamodel is expanded based on the format to be converted and / or the target format to obtain the target test data file format metamodel; based on the target test data file format metamodel, the test data file to be converted is converted to obtain the target format test data file. Thus, the problems of high difficulty in file format conversion and low reusability of data format parsing work in the same test scenario in the prior art are solved, the test data file is converted based on the test data file format metamodel, the scientific research test data file format model is connected, the difficulty of compiling the file format conversion program is simplified, and the test data file format metamodel can be expanded in real time to convert the test data file, further improving the convenience and flexibility of the test data file format conversion.

[0032] Figure 1The present invention provides a flow chart of a meta-model-based test data file format conversion method, which can be performed by a meta-model-based test data file format conversion device, wherein the device can be implemented by software and / or hardware, and can generally be integrated in an electronic device. Figure 1 As shown, the method includes:

[0033] Step 101: Obtain a test data file to be converted, a format to be converted corresponding to the test data file to be converted, and a target format.

[0034] In the embodiments of the present disclosure, the test data file to be converted refers to a test data file that needs to be format converted, such as a pressure electrical signal collected by a pressure sensor, which is subjected to signal conditioning to obtain a binary signal and to which header and tail files with information such as the time, location, type of pressure sensor, measurement range, sampling rate, etc. of collection are added as the test data file to be converted.

[0035] In the embodiment of the present disclosure, the format to be converted refers to the current file format of the test data file to be converted, that is, the file format before the conversion, and the target format refers to the file format of the test data file to be converted after the test data file format conversion processing based on the meta-model. The target format can be selected and set according to actual application needs.

[0036] Step 102: When the pre-constructed test data file format metamodel contains attributes of the format to be converted and the target format, convert the test data file to be converted based on the test data file format metamodel to obtain a test data file in a target format.

[0037] In the embodiment of the present disclosure, a test data file format metamodel is pre-constructed, specifically, Figure 2 As shown, including:

[0038] Step 201: Obtain a plurality of test data files to be processed containing header and tail files.

[0039] In an embodiment of the present disclosure, a plurality of test data files to be processed containing header and tail files are obtained, including: obtaining a plurality of recorded physical quantities, and converting the plurality of recorded physical quantities into a plurality of electrical signals based on a preset sensor, inputting each electrical signal into data acquisition hardware after signal conditioning to obtain a plurality of binary digital signals, obtaining metadata describing the file body data as header and tail files and a plurality of binary digital signals to generate a test data file to be processed containing header and tail files, and obtaining a plurality of test data files to be processed containing header and tail files by changing the sampling time multiple times and controlling the physical quantity method of the sampling object.

[0040] Specifically, actual scientific research test data is collected, the collection objects and physical quantities are determined, and according to the above requirements, details such as sensor laying methods, circuit wiring modes, and DAC (Distributed Autonomous Corporation, digital-to-analog converter) device installation locations are determined, and finally, the test data file to be processed containing header and tail files is obtained.

[0041] Specifically, according to the physical quantities such as current, voltage, temperature, vibration, strain, pressure and force that need to be recorded in scientific research and engineering, appropriate sensors are selected to convert them into electrical signals, which are then amplified, filtered and other conversion operations are performed through signal conditioning circuits composed of cables to improve the quality. Then, the signals are transmitted to the data acquisition hardware to convert the physical analog signals into binary digital signals. According to the characteristics of the hardware equipment and the physical quantities themselves, file header and tail files containing information such as the time, location, sensor type, measurement range, sampling rate and other information of data collection are added as metadata describing the file body data.

[0042] Step 202: Analyze multiple test data files to be processed containing header and tail files to obtain an original parameter set.

[0043] In some embodiments, a plurality of test data files to be processed containing header and tail files are analyzed to obtain an original parameter set, including: converting each binary digital signal into a hexadecimal digital signal based on a preset text editing software, encoding each hexadecimal digital signal, and obtaining the original parameter set.

[0044] Specifically, by using the method of controlling variables and using various text editor functions, the specific range of the header and tail files of the test data files obtained in the first step, as well as the basic information contained therein, such as parameter names, parameter numbers, parameter values, specific meanings, etc., are analyzed. More specifically, multiple test data files are obtained by changing the sampling time multiple times and controlling the physical quantity of the sampling object, such as by using text editing software such as UltraEdit to parse the files into hexadecimal, and using encoding methods such as ASCII and UTF-8 to restore the parameter name information, and to form an original parameter set that will be incorporated into the existing attributes of the metamodel or newly listed as metamodel attributes.

[0045] Step 203: determine model building information based on the original parameter set, and build a test data file format metamodel based on the model building information.

[0046] In an embodiment of the present disclosure, model building information is determined based on an original parameter set, and a test data file format metamodel is constructed based on the model building information, including: determining a unified representation identifier that describes different parameters of the same object based on the original parameter set; using the unified representation identifier as a metamodel attribute, and obtaining a subordinate parameter library corresponding to the metamodel attribute; establishing a matching correspondence between the metamodel attribute and the subordinate parameter library based on a synonym corpus, and obtaining the test data file format metamodel.

[0047] Specifically, to establish a metamodel of the test data file format, it is necessary to comprehensively analyze the parameter information in a large amount of file formats involving test data in different physical fields, determine the specific meaning of the parameters and classify them, define the core attributes of the initial metamodel, and construct the basic structure of the metamodel. The metamodel of the test data file format is established based on the relationship between entities such as metamodel attributes, parameter libraries under metamodel attributes, and internal attributes of parameter models.

[0048] Specifically, the original parameter sets of various test data files obtained are sorted out, and the different parameter names describing the same object are expressed in a unified language and name. The name is used as the test data file format metamodel attribute, and a mapping is established between this part of the parameters and the corresponding metamodel attributes. This makes the test data file format metamodel a bridge for metamodel-based conversion of test data files of different formats. At the same time, the relative position and encoding method of each parameter under each attribute are recorded in a form, and a primary and foreign key relationship with the metamodel is established to ensure that the parsed file knowledge is clear and available.

[0049] As an example, as shown in Table 1:

[0050] Table 1 Metamodel attributes and the relative positions of the parameters under the attributes, encoding methods and other parameters

[0051]

[0052] Furthermore, a matching correspondence between the parameters in the data format in the existing data format library and the attribute names in the metamodel is established based on the synonym corpus, so as to realize a many-to-one correspondence between the parsed file parameter instances and the unified attributes in the experimental data file format metamodel. The parsed file parameter instances are used as the synonym recognition training set to identify and classify the original parameters after parsing the converted file.

[0053] Specifically, after obtaining the test data file to be converted, the format to be converted and the target format corresponding to the test data file to be converted, if the test data file format metamodel contains the attributes of the format to be converted and the target format, the test data file to be converted is converted based on the test data file format metamodel to obtain the target format test data file.

[0054] In some embodiments, by querying the subordinate parameter names of the attributes of the test data file format metamodel, all target data of the target format constructed by the format to be converted is determined, and partial target data under the parameter instance model of the target format is determined according to the subordinate parameter names. The actual file data in the format to be converted is written according to the partial target data as the standard, other target data is determined based on all target data and partial target data, and a file template is selected in the model instance library to fill in other target data to obtain a test data file in the target format.

[0055] Step 103: When the pre-built test data file format metamodel does not include the attributes of the format to be converted and / or the target format, the test data file format metamodel is expanded based on the format to be converted and / or the target format to obtain a target test data file format metamodel.

[0056] Step 104: convert the test data file to be converted based on the target test data file format metamodel to obtain a target format test data file.

[0057] Specifically, after obtaining the test data file to be converted, the format to be converted and / or the target format corresponding to the test data file to be converted, if the test data file format metamodel does not contain the attributes of the format to be converted and / or the target format, the test data file format metamodel is expanded based on the format to be converted and / or the target format to obtain the target test data file format metamodel, and the test data file to be converted is converted to obtain the target format test data file.

[0058] In some embodiments, the test data file format metamodel is expanded based on the format to be converted and / or the target format to obtain the target test data file format metamodel, including: using the file parameter instance set in the test data file format metamodel and the file parameters of the test data file to be converted in sequence to perform synonym comparison calculations to obtain calculation results; if the calculation result is greater than or equal to a preset similarity threshold, mapping the file parameters of the test data file to be converted corresponding to the highest calculation result with the metamodel attributes corresponding to the file parameter instance set; if the calculation result is less than the preset similarity threshold, adding the file parameters of the test data file to be converted as the name of a new metamodel attribute to the test data file format metamodel to obtain the target test data file format metamodel.

[0059] Specifically, based on the metamodel attribute extension of the file format to be parsed (the format to be converted corresponding to the test data file to be converted), by calculating the synonym similarity between the instance parameters under the metamodel attributes and the parameters of the file to be parsed, the attribution relationship between the parameter names in the current file to be parsed and the existing metamodel attributes is measured and evaluated in turn, and on this basis, it is determined whether to classify the new parameters into the parameter instances under the metamodel attributes or to create a new metamodel attribute with the new parameters as the original name.

[0060] More specifically, after identifying the parameter name, parameter starting point, parameter ending point, parameter type and other information of the format data file to be converted, the parsed file parameter instances in the experimental data file format metamodel are used in turn to perform synonym comparison calculations with the parameters of the file to be converted, and a similarity threshold is set. The file parameters that exceed the similarity threshold and have the highest similarity are incorporated into the synonym set. If the similarity is lower than the threshold, a new metamodel attribute with the name of the parameter is created.

[0061] It should be noted that since the parameter types in the data files are highly standardized and the number and types are relatively small, different languages ​​can be divided into multiple independent corpus sub-libraries. For example, the Skip-gram model can be used to calculate word vectors for the readable parameters obtained after decoding the parsed files. All models use the same vocabulary and embedding dimension, and perform hyperparameter adjustment to optimize performance on their respective data subsets.

[0062]

[0063] In formula (1), is the vector of the target word, is the vector of the context word.

[0064] Specifically, models with small corpus sample size and poor performance are removed and translated into Chinese and then merged with the Chinese corpus for training, as shown in formula (2).

[0065] v new =αv original +βv translated (2)

[0066] In formula (2), v original is the original foreign word vector, v translated is the translated word vector, α and β are the corresponding weight coefficients respectively.

[0067] Furthermore, the similarity between the parameters in the test data file to be converted, for example, interpreted using the ASCII encoding rule and the parameter instance words in the current file is calculated, as shown in formula (3).

[0068]

[0069] Specifically, the sum of the similarities of the parameter names with the highest similarity to the test data file parameters to be converted in each file parameter instance set of the test data file format metamodel is calculated. If the value is greater than or equal to the similarity threshold and is relatively the highest, a mapping is established between the parameter of the file to be converted and the metamodel attribute corresponding to the file parameter instance set, and the parameter instance set is added. If the value is less than the similarity threshold, it means that the test data file parameter to be converted does not belong to any attribute in the current metamodel, and the parameter is used as the initial name of the new attribute of the metamodel.

[0070] Finally, based on the experimental data file format metamodel, the data format conversion program is compiled. First, it is necessary to determine, for example, the file format A to be converted and the target file format B. By querying the parameter names under the metamodel attributes, the necessary data (all target data) required to build format B in format A is exported, and other information (departmental target data) under the parameter instance model of format B is searched according to the parameter name. The actual file data in format A is written according to this part of information as the standard. For the non-essential parameters of format B that are missing in A, the file template is selected in the model instance library to fill in, thereby realizing the experimental data file format conversion based on the metamodel.

[0071] Therefore, if all parameter information of the test data file to be converted and the target format have been parsed and mapped with the metamodel attributes of the test data file format, code can be written based on the complete parameter information to read the byte position and length corresponding to the current file format parameters and parameter supplementary information to be converted, and after encoding rule conversion, the parameters of the same metamodel attribute mapped to the conversion target file are written in sequence as specific content information; the current test data files often contain a large number of non-essential parameters that have no meaning for the actual parsed data. For these parameters, the method of extracting the target format instance file is used to fill them in.

[0072] If there are unparsed formats in the file format to be converted and the target file format, the test data file format metamodel is expanded. After parsing all parameter names, the synonym similarity is calculated one by one with the parameters contained in the parameter library under the current metamodel attributes and classified according to the algorithm. The target test data file format metamodel is obtained to convert the test data file to be converted and obtain the target format test data file.

[0073] Based on the above description, the experimental data file format is converted based on the experimental data file format metamodel to achieve the connection of the scientific research experimental data file format model, simplify the difficulty of compiling the file format conversion program, and use the synonym similarity parameter to decide the new behavior of the metamodel attributes and instance information, further improving the convenience and flexibility of the experimental data file format conversion.

[0074] Specifically, Figure 3As shown, it includes step 3.1 determining the file format to be converted and the conversion target file format; step 3.2 if there are formats in the file format to be converted and the conversion target file format that have not been parsed and included in the metamodel management, continue to the next step, if they have all been parsed, jump to step 3.12; step 3.3 converts the binary test data file obtained according to the experiment to obtain a hexadecimal digital signal; step 3.4 encodes the hexadecimal digital signal to obtain the file parameter name; step 3.5 compares the file parameter names to obtain the metamodel attribute parameter word library; step 3.6 performs word encoding based on the metamodel attribute parameter word library Quantity calculation; Step 3.7 Determine similarity calculation and sorting based on word vector calculation; 3.8 Determine whether the maximum similarity is greater than or equal to the similarity threshold; If so, execute Step 3.9 to write the corresponding metamodel attribute parameter library; Step 3.10 Establish attribute-parameter mapping; If not, execute Step 3.11 to add metamodel attributes; Step 3.12 Get the file format parameters and supplementary information to be converted; Step 3.13 Map to the metamodel attribute and the target file format parameter name under the attribute; Step 3.14 Write the corresponding parameter content of the target file format; Step 3.15 Extract the target format file instance to complete the non-essential parameters and complete the conversion.

[0075] For example, Figure 4 As shown, parameters 1 to 6 in the format to be converted can be converted through attribute 1, attribute 3, attribute 6, attribute 7, attribute 9 and attribute 11 of the metamodel to obtain parameters 1, parameter 2, parameter 5, parameter 6, parameter 7 and parameter 9 of the target format, and the conversion is completed by copying parameters 3, parameter 4 and parameter 8 in the target format instance to parameters 3, parameter 4 and parameter 8 in the target format.

[0076] Therefore, different parameter names of the same object described in different file formats of the currently known structures are uniformly summarized as the same attribute of the test data file format metamodel, and a many-to-one mapping relationship is established to achieve the description of data file formats in a unified framework, which effectively solves the problem of difficulty in reusing knowledge of scientific research test data file formats, improves the convenience and flexibility of test data file format conversion, and provides a scientific, reliable and reusable knowledge reserve for the compilation of test data file format conversion programs based on metamodels; and while systematically and completely recording important information such as the parsed file format, parameter composition, number of bytes, and position, a synonym similarity parameter is introduced to assist in the analysis and classification of unparsed test data file parameter names, which effectively solves the problem of many parameters and complex classification of scientific research test data files, and provides technical support for the establishment of a sustainable, expandable and improved scientific research test data file metamodel.

[0077] Figure 5The schematic diagram of the structure of a meta-model-based test data file format conversion device provided by the embodiment of the present disclosure, the device can be implemented by software and / or hardware, and can generally be integrated in an electronic device. Figure 5 As shown, the device comprises:

[0078] The first acquisition module 301 is used to acquire a test data file to be converted, a format to be converted and a target format corresponding to the test data file to be converted;

[0079] The processing module 302 is used to convert the test data file to be converted based on the test data file format metamodel to obtain the test data file in the target format when the pre-constructed test data file format metamodel contains the attributes of the format to be converted and the target format; or

[0080] The extension module 303 is used to extend the test data file format metamodel based on the format to be converted and / or the target format to obtain a target test data file format metamodel when the pre-constructed test data file format metamodel does not contain the attributes of the format to be converted and / or the target format;

[0081] The processing module 302 is further configured to convert the test data file to be converted based on the target test data file format metamodel to obtain the target format test data file.

[0082] Optionally, the device further comprises:

[0083] The second acquisition module is used to acquire a plurality of test data files to be processed including header and tail files;

[0084] An analysis module, used for analyzing the plurality of test data files to be processed containing header and tail files to obtain an original parameter set;

[0085] A construction module is used to determine model construction information based on the original parameter set, and to construct the test data file format metamodel based on the model construction information.

[0086] Optionally, the second acquisition module is specifically used to:

[0087] Acquire a plurality of recorded physical quantities, and convert the plurality of recorded physical quantities into a plurality of electrical signals based on a preset sensor;

[0088] After signal conditioning, each of the electrical signals is input into data acquisition hardware to obtain a plurality of binary digital signals;

[0089] Obtaining metadata describing the file body data as the header and tail files and the multiple binary digital signals to generate the test data file to be processed containing the header and tail files;

[0090] By changing the sampling time multiple times and controlling the physical quantity method of the sampling object, a plurality of test data files to be processed containing header and tail files are obtained.

[0091] Optionally, the analysis module is specifically used to:

[0092] Convert each of the binary digital signals into a hexadecimal digital signal based on a preset text editing software;

[0093] Each of the hexadecimal digital signals is encoded to obtain the original parameter set.

[0094] Optionally, the building module is specifically used to:

[0095] Determine a unified representation identifier describing different parameters of the same object based on the original parameter set;

[0096] Using the unified representation identifier as the metamodel attribute, and obtaining a subordinate parameter library corresponding to the metamodel attribute;

[0097] A matching correspondence relationship between the metamodel attributes and the subordinate parameter library is established according to the synonym database to obtain the test data file format metamodel.

[0098] Optionally, the expansion module 303 is specifically used to:

[0099] Using the file parameter instance set in the test data file format metamodel and the file parameters of the test data file to be converted in sequence to perform synonym comparison calculation to obtain a calculation result;

[0100] If the calculation result is greater than or equal to a preset similarity threshold, mapping the file parameter of the test data file to be converted corresponding to the highest calculation result with the meta-model attribute corresponding to the file parameter instance set;

[0101] If the calculation result is less than a preset similarity threshold, the file parameter of the test data file to be converted is added to the test data file format metamodel as the name of a new metamodel attribute to obtain the target test data file format metamodel.

[0102] Optionally, the processing module 302 is specifically configured to:

[0103] Determine all target data of the target format constructed by the format to be converted by querying the subordinate parameter names of the attributes of the test data file format metamodel;

[0104] Determine partial target data under the parameter instance model of the target format according to the subordinate parameter name, and write the actual file data in the format to be converted according to the partial target data as a standard;

[0105] Based on the entire target data and the partial target data, other target data are determined, and a file template is selected in a model instance library to fill in the other target data, so as to obtain the target format test data file.

[0106] The metamodel-based test data file format conversion device provided in the embodiments of the present disclosure can execute the metamodel-based test data file format conversion method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0107] The embodiments of the present disclosure also provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the metamodel-based test data file format conversion method provided by any embodiment of the present disclosure.

[0108] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0109] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0110] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0111] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0112] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0113] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

[0114] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0115] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0116] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:

[0117] processor;

[0118] a memory for storing instructions executable by the processor;

[0119] The processor is used to read the executable instructions from the memory and execute the instructions to implement any metamodel-based test data file format conversion method provided in the present disclosure.

[0120] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, wherein the computer program is used to execute any metamodel-based test data file format conversion method provided by the present disclosure.

[0121] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0122] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0123] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for converting test data file format based on metamodel, characterized in that: The method comprises: Acquire a test data file to be converted, a format to be converted and a target format corresponding to the test data file to be converted; When the pre-constructed test data file format metamodel contains the attributes of the format to be converted and the target format, converting the test data file to be converted based on the test data file format metamodel to obtain a test data file in the target format; or, When the pre-constructed test data file format metamodel does not include the attributes of the format to be converted and / or the target format, expanding the test data file format metamodel based on the format to be converted and / or the target format to obtain a target test data file format metamodel; The test data file to be converted is converted based on the target test data file format metamodel to obtain the target format test data file.

2. The metamodel-based test data file format conversion method according to claim 1, characterized in that: The method further comprises: Obtain multiple test data files to be processed containing header and tail files; Analyzing the plurality of test data files to be processed containing header and tail files to obtain an original parameter set; Model building information is determined based on the original parameter set, and the test data file format metamodel is constructed based on the model building information.

3. The metamodel-based test data file format conversion method according to claim 2, characterized in that: The step of obtaining a plurality of test data files to be processed containing header and tail files includes: Acquire a plurality of recorded physical quantities, and convert the plurality of recorded physical quantities into a plurality of electrical signals based on a preset sensor; After signal conditioning, each of the electrical signals is input into data acquisition hardware to obtain a plurality of binary digital signals; Obtaining metadata describing the file body data as the header and tail files and the multiple binary digital signals to generate the test data file to be processed containing the header and tail files; By changing the sampling time multiple times and controlling the physical quantity method of the sampling object, multiple test data files to be processed containing header and tail files are obtained.

4. The metamodel-based test data file format conversion method according to claim 3, characterized in that: The analyzing the plurality of test data files to be processed containing header and tail files to obtain the original parameter set includes: Convert each of the binary digital signals into a hexadecimal digital signal based on a preset text editing software; Each of the hexadecimal digital signals is encoded to obtain the original parameter set.

5. The metamodel-based test data file format conversion method according to claim 3, characterized in that: The determining of model building information based on the original parameter set, and building the test data file format metamodel based on the model building information, comprises: Determine a unified representation identifier describing different parameters of the same object based on the original parameter set; Using the unified representation identifier as a metamodel attribute, and obtaining a subordinate parameter library corresponding to the metamodel attribute; A matching correspondence relationship between the metamodel attributes and the subordinate parameter library is established according to the synonym database to obtain the test data file format metamodel.

6. The metamodel-based test data file format conversion method according to claim 1, characterized in that: The step of expanding the test data file format metamodel based on the format to be converted and / or the target format to obtain a target test data file format metamodel includes: Using the file parameter instance set in the test data file format metamodel and the file parameters of the test data file to be converted in sequence to perform synonym comparison calculation to obtain a calculation result; If the calculation result is greater than or equal to a preset similarity threshold, mapping the file parameter of the test data file to be converted corresponding to the highest calculation result with the meta-model attribute corresponding to the file parameter instance set; If the calculation result is less than a preset similarity threshold, the file parameter of the test data file to be converted is added to the test data file format metamodel as the name of a new metamodel attribute to obtain the target test data file format metamodel.

7. The metamodel-based test data file format conversion method according to claim 1, characterized in that: The converting the test data file to be converted based on the test data file format metamodel to obtain a target format test data file includes: Determine all target data of the target format constructed by the format to be converted by querying the subordinate parameter names of the attributes of the test data file format metamodel; Determine partial target data under the parameter instance model of the target format according to the subordinate parameter name, and write the actual file data in the format to be converted according to the partial target data as a standard; Based on the entire target data and the partial target data, other target data are determined, and a file template is selected in a model instance library to fill in the other target data, so as to obtain the target format test data file.

8. A test data file format conversion device based on metamodel, characterized in that: include: A first acquisition module is used to acquire a test data file to be converted, a format to be converted and a target format corresponding to the test data file to be converted; a processing module, configured to convert the test data file to be converted based on the test data file format metamodel to obtain a test data file in a target format when the pre-constructed test data file format metamodel contains attributes of the format to be converted and the target format; or The extension module is used to extend the test data file format metamodel based on the format to be converted and / or the target format to obtain a target test data file format metamodel when the pre-constructed test data file format metamodel does not contain the attributes of the format to be converted and / or the target format; The processing module is further used to convert the test data file to be converted based on the target test data file format metamodel to obtain the target format test data file.

9. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the metamodel-based test data file format conversion method described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the metamodel-based test data file format conversion method described in claims 1-7.