Disclosure of Invention
The present application aims to solve at least one of the technical problems existing in the prior art. Therefore, the application provides a method and equipment for carrying out data merging processing on ADAMS analysis results.
According to an embodiment of the first aspect of the present application, a method for merging and data processing ADAMS analysis result data includes:
step S1: determining time requirements, reading all res files in ADAMS analysis results, and establishing a read file list A;
step S2: establishing a result file B, and copying part of the content of one res file in the file list A to the result file B;
step S3: extracting data segments meeting the time requirement in the step S1 from the result file B in the step S2, and sequentially modifying and adding the data segments into the result file B according to the sequence of the file list A in the step;
step S4: reading the result file B, and extracting and analyzing the demand data aiming at the result file B;
step S5: combining and data processing are completed on ADAMS analysis result data;
in the step S2, the content of the res file part is the common content of the model and the parameters;
the step S2 specifically comprises the following steps:
step S21: when a node of a certain res file "Data" in the file list a is read, if the attribute is "quasistatic" and "dynamic_001", if the res file is the first res file in the file list, step S22 is performed, and if the res file is not the first res file in the file list, step S23 is performed;
step S22: all Data before the Data node are extracted and stored in a result file B;
step S23: reading the first Data of all Steps in the 'Data' node;
the step S3 specifically comprises the following steps:
step S31: judging whether the Step data in the Step S23 meets the time requirement, if so, performing the Step S32, and if not, performing the Step S1;
step S32: and (3) modifying the time points of Step data meeting the time requirement according to the reading sequence based on the result file B, so that the time data are increased, and finally merging the time data into the result file B.
According to the method for merging and data processing of ADAMS analysis result data, according to the requirements, the data of a plurality of analysis results under the same model are merged into the result file in a data result state at a specific moment through specifying a certain moment, so that load extraction, characteristic data comparison analysis and the like are facilitated, a convenient and reliable method is provided for subsequent data analysis work, meanwhile, the size of the analysis results can be obviously reduced, and the storage space can be reduced.
According to some embodiments of the application, step S1 is specifically:
step S11: determining a required time region and a required res file list A;
step S12: and reading the res file list sequentially.
According to some embodiments of the application, the res file is composed of a main node "Result" and two byte points "bibliographic" and "Analysis" in which it is mainly composed of a plurality of "Data" nodes, and different "Data" nodes have different attributes.
According to some embodiments of the application, the "quasiStatic" or "dynamic_001" primarily stores data at each moment, and confirms the time and data turntable in each "Step".
According to some embodiments of the application, the file stored in the file list a is an ADAMS output result file.
According to some embodiments of the application, the res file is document text.
An apparatus for performing data merging processing on an ADAMS analysis result according to an embodiment of the second aspect of the present application includes:
the data transmission module is used for transmitting data among the modules;
the data input module is used for inputting ADAMS analysis result data and time domain requirements into the equipment through the data input module;
the data reading module reads the data input by the data input module;
the file establishing module establishes a file for storing data, so that the output of a result is facilitated;
the data analysis processing module is used for analyzing the data in the required time domain and carrying out packaging processing;
the data output module is used for outputting the packaged result file;
according to the device for merging and data processing of ADAMS analysis result data, the required result file can be directly obtained only by inputting the result output by ADAMS into the device and then inputting the required time domain, so that load extraction, characteristic data comparison analysis and the like are facilitated, a convenient and reliable device is provided for subsequent data analysis work, meanwhile, the size of an analysis result can be obviously reduced through the device, and the storage space can be reduced.
Additional aspects and advantages of the application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application.
Detailed Description
The following detailed description of embodiments of the application, with reference to the accompanying drawings, is illustrative of the embodiments described herein, and it is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application.
It will be understood that when an element is referred to as being "fixed to" another element, it can be directly on the other element or intervening elements may also be present. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
Example 1
Referring to fig. 1 and 2, a method for performing data merging processing on an ADAMS analysis result includes,
step S1: determining time requirements, reading all res files in ADAMS analysis results, and establishing a read file list A;
step S2: establishing a result file B, and copying part of the content of one res file in the file list A to the result file B;
step S3: extracting data segments meeting the time requirement in the step S1 from the result file B in the step S2, and sequentially modifying and adding the data segments into the result file B according to the sequence of the file list A in the step;
step S4: reading the result file B, and extracting and analyzing the demand data aiming at the result file B;
step S5: combining and data processing are completed on ADAMS analysis result data;
the step S1 specifically includes:
step S11: determining a required time region and a required res file list A;
step S12: sequentially reading according to the res file list;
the step S2 specifically comprises the following steps:
step S21: when a node of a certain res file "Data" in the file list a is read, if the attribute is "quasistatic" or "dynamic_001", if the res file is the first res file in the file list, step S22 is performed, and if the res file is not the first res file in the file list, step S23 is performed;
step S22: the Data before the Data node is completely read out and stored in a result file B;
step S23: reading the first Data of all Steps in the 'Data' node;
the step S3 specifically comprises the following steps:
step S31: judging whether the first data in all Step data segments in the Step S23 meet the time requirement, if so, performing the Step S32, and if not, performing the Step S1, and reading the next res file in the res list;
step S32: and (3) modifying the Step data meeting the time requirement according to the reading sequence based on the result file B, so that the time data is increased, and finally, the Step data is combined into the result file B.
Based on the above operation steps, referring to fig. 2, the specific working principle is as follows:
the first step: setting a required time domain and a required res file list A;
and a second step of: sequentially reading according to the res file list;
and a third step of: when reading a Data node of a certain res file in the file list A, if the attribute is "quasistatic" or "dynamic_001", judging whether the res file is the first res file in the file list, if so, performing a fourth step, and if not, jumping to a fifth step;
fourth step: the Data before the Data node is completely read out and stored in a result file B;
fifth step: reading the first Data of all Steps in the 'Data' node;
sixth step: judging whether Step data in the fifth Step meets the time requirement, if so, performing a seventh Step, and if not, jumping to the second Step;
seventh step: based on the result file B, modifying time points of Step data meeting time requirements according to a reading sequence, enabling the time data to be increased, and finally merging the time data into the result file B;
the final result file B is the result file obtained by combining ADAMS analysis results, and after the result file is obtained, the needed data content is extracted from the result file, so that the time for searching the data is greatly shortened, and the working efficiency is improved.
Example 2
An apparatus for data merge processing of ADAMS analysis results using the method of example 1, comprising:
the data transmission module is used for transmitting data among the modules;
the data input module is used for inputting ADAMS analysis result data and time domain requirements into the equipment through the data input module;
the data reading module reads the data input by the data input module;
the file establishing module establishes a file for storing data, so that the output of a result is facilitated;
the data analysis processing module is used for analyzing the data in the required time domain and carrying out packaging processing;
the data output module is used for outputting the packaged result file;
the device is suitable for a method for carrying out data combination processing on ADAMS analysis results, and comprises the following steps,
step S1: determining time requirements, reading all res files in ADAMS analysis results, and establishing a read file list A;
step S2: establishing a result file B, and copying part of the content of one res file in the file list A to the result file B;
step S3: extracting data segments meeting the time requirement in the step S1 from the result file B in the step S2, and sequentially modifying and adding the data segments into the result file B according to the sequence of the file list A in the step;
step S4: reading the result file B, and extracting and analyzing the demand data aiming at the result file B;
step S5: combining and data processing are completed on ADAMS analysis result data;
the step S1 specifically includes:
step S11: determining a required time region and a required res file list A;
step S12: sequentially reading according to the res file list;
the step S2 specifically comprises the following steps:
step S21: when a node of a certain res file "Data" in the file list a is read, if the attribute is "quasistatic" or "dynamic_001", if the res file is the first res file in the file list, step S22 is performed, and if the res file is not the first res file in the file list, step S23 is performed;
step S22: the Data before the Data node is completely read out and stored in a result file B;
step S23: reading the first Data of all Steps in the 'Data' node;
the step S3 specifically comprises the following steps:
step S31: judging whether the first data in all Step data segments in the Step S23 meet the time requirement, if so, performing the Step S32, and if not, performing the Step S1, and reading the next res file in the res list;
step S32: and (3) modifying the Step data meeting the time requirement according to the reading sequence based on the result file B, so that the time data is increased, and finally, the Step data is combined into the result file B.
The device is suitable for the method for carrying out data merging processing on ADAMS analysis results, and specifically comprises the steps of inputting ADAMS processing results into the device through a data input module, transmitting data to a data reading module through a data transmission module, establishing a file list A by a file establishing module aiming at the read data, storing the read file into the file list A, continuously sending res files to a data analysis processing module by the file establishing module, judging after the res files are received by the file analysis processing module, sending res files meeting requirements to a result file B established by the file establishing module, and finally outputting the result file B through a data output module without any sending instruction; the hardware equipment and the software system are combined, so that load extraction, characteristic data comparison analysis and the like are facilitated, convenient and reliable equipment is provided for subsequent data analysis work, and meanwhile, the size of an analysis result can be obviously reduced through the equipment, and the storage space can be reduced.
In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings are merely for convenience in describing the present application and simplifying the description, and do not indicate or imply that the device or element being referred to must have a specific orientation, be configured and operated in a specific orientation, and therefore should not be construed as limiting the application.
In the description of the present specification, reference to the terms "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples.
It will be apparent that the described embodiments are only some, but not all, embodiments of the application. Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application for the embodiment. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly understand that the embodiments described herein may be combined with other embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
While embodiments of the present application have been shown and described, it will be understood by those of ordinary skill in the art that: many changes, modifications, substitutions and variations may be made to the embodiments without departing from the spirit and principles of the application, the scope of which is defined by the claims and their equivalents.