CN106407266B - Three-dimensional calculation result formatting extraction method and device - Google Patents

Three-dimensional calculation result formatting extraction method and device Download PDF

Info

Publication number
CN106407266B
CN106407266B CN201610726543.0A CN201610726543A CN106407266B CN 106407266 B CN106407266 B CN 106407266B CN 201610726543 A CN201610726543 A CN 201610726543A CN 106407266 B CN106407266 B CN 106407266B
Authority
CN
China
Prior art keywords
crsf
data
value
file
name
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.)
Active
Application number
CN201610726543.0A
Other languages
Chinese (zh)
Other versions
CN106407266A (en
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.)
China General Nuclear Power Corp
China Nuclear Power Engineering Co Ltd
Original Assignee
China General Nuclear Power Corp
China Nuclear Power Engineering 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 China General Nuclear Power Corp, China Nuclear Power Engineering Co Ltd filed Critical China General Nuclear Power Corp
Priority to CN201610726543.0A priority Critical patent/CN106407266B/en
Publication of CN106407266A publication Critical patent/CN106407266A/en
Application granted granted Critical
Publication of CN106407266B publication Critical patent/CN106407266B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/84Mapping; Conversion
    • G06F16/86Mapping to a database

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a three-dimensional calculation result formatting extraction method and a device, wherein the method comprises the steps of data uploading, CRSF _ TABLE generation and CRSF _ TABLE display; the device comprises a three-dimensional calculation server for three-dimensional data calculation, a CRSF data server for receiving and uploading CRSF data files, a data field for extracting the CRSF data files, a first operating system for generating and outputting CRSF _ TABLE, and a second operating system for converting attributes of the received CRSF _ TABLE files and facilitating viewing. Based on a Linux platform, the formatted CRSF _ TABLE can be generated within 1 minute by using traversal, iterative search, input-output redirection and combining open source software AWK and SED technologies, and the problems of time consumption, labor waste, omission and error data extraction caused by adopting a manual method in the process of extracting the three-dimensional calculation result of the nuclear power design are solved.

Description

Three-dimensional calculation result formatting extraction method and device
Technical Field
The invention relates to the field of computer data processing, in particular to a three-dimensional calculation result formatting extraction method and device, and particularly relates to a three-dimensional calculation result formatting extraction method and device for nuclear power design.
Background
In the three-dimensional design process, especially in the nuclear power three-dimensional design process, tens of thousands of CRSF (namely data files of three-dimensional calculation results) are generated, and most of data in the CRSF have the characteristics of non-structuring, disorder, poor readability and the like. Therefore, designers need to manually extract data fields valuable for design from each CRSF, copy and paste the data fields into Microsoft Excel documents one by one, perform secondary processing, and finally obtain a CRSF _ TABLE (i.e., a three-dimensional calculation result technical parameter TABLE), and the specific operation steps are as follows: 1) manually finding needed data fields from the CRSF; 2) copying a data field, and pasting the data field to a data item corresponding to the Microsoft Excel file; 3) continuously repeating the steps 1) and 2), and finally forming the CRSF _ TABLE; 4) and performing secondary check and correction on the CRSF _ TABLE.
Since the CRSF _ TABLE is generated through manual labor, the method usually takes a great deal of effort and time of designers, resulting in low design work efficiency, and since the CRSF _ TABLE is generated through manual field extraction, the CRSF _ TABLE is limited by human energy, risks of data omission or data error extraction are generated, the accuracy of data cannot be ensured, and the CRSF _ TABLE can be used after being checked for many times.
Therefore, it is necessary to provide a technical scheme for rapidly, efficiently and accurately extracting important data from a large amount of CRSF in a three-dimensional design calculation process, especially a nuclear power design three-dimensional calculation process, and automatically generating CRSF _ TABLE, so as to solve the problems of long time consumption, high cost, omission and erroneous data extraction in the process of generating CRSF _ TABLE through manual labor in the prior art.
Disclosure of Invention
In view of the problems in the prior art, the invention provides a method and a device for three-dimensional design calculation, in particular for rapidly, efficiently and accurately extracting important data from mass CRSF and automatically generating CRSF _ TABLE in the three-dimensional calculation process of nuclear power design, so as to improve the efficiency of nuclear power three-dimensional design.
The technical scheme provided by the invention for the technical problem is as follows:
on one hand, the method for formatting and extracting the three-dimensional calculation result comprises the following steps:
s1, data uploading: receiving and uploading all CRSF data files in the three-dimensional calculation result;
s2, CRSF _ TABLE generation: obtaining the CRSF data file by a first operating system server, extracting a data field of the CRSF data file, formatting the data field, generating a CRSF _ TABLE and outputting the CRSF _ TABLE;
s3, CRSF _ TABLE shows: receiving, by a second operating system server, the CRSF _ TABLE and translating first operating system file attributes of the CRSF _ TABLE into second operating system file attributes for viewing the CRSF _ TABLE under the second operating system server.
Preferably, the first operating system comprises a Linux system.
Preferably, the second operating system includes a Windows system.
Preferably, the file attribute of the second operating system is an Excel file.
Preferably, step S2 specifically includes the following steps:
s21, data traversal: uploading the CRSF data file to the Linux system, traversing CRSF _ DIR, and listing directory and file detailed information;
s22, field extraction: iteratively searching each CRSF data file according to the file name, and finding out the data items needing to be extracted;
s23, multiple output renormalization: performing AWK and SED multiple output re-item processing on the data item to be extracted to obtain corresponding parameters of the data item to be extracted;
s24, CRSF _ TABLE generation: and formatting and outputting the data items needing to be extracted, and forming the CRSF _ TABLE.
Preferably, in step S21, the step of listing directory and file details includes: and filtering each CRSF _ NAME in the CRSF _ DIR by using a print parameter in the AWK, and finally forming a CRSF _ NAME _ LIST containing each CRSF _ NAME _ LIST.
Preferably, in step S22, the method for extracting fields includes:
and taking out one CRSF _ NAME from the CRSF _ NAME _ LIST, performing traversal operation, extracting a DATA1 DATA segment, a DATA2 DATA segment, a DATA3 DATA segment and a DATA4 DATA segment from the CRSF _ NAME _ LIST, sequentially taking out other CRSF _ NAMEs by the same method after the DATA is finished, sequentially performing traversal operation, and sequentially extracting a DATA1 DATA segment, a DATA2 DATA segment, a DATA3 DATA segment and a DATA4 DATA segment until all the CRSF _ NAMEs in the CRSF _ NAME _ LIST perform traversal operation once, and respectively extracting a DATA1 DATA segment, a DATA2 DATA segment, a DATA3 DATA segment and a DATA4 DATA segment in each CRSF _ NAME.
Preferably, a TAIL tool is used to dereference each CRSF _ NAME file in the CRSF _ DIR, and the data of the last four lines in each CRSF _ NAME file is taken out.
Preferably, in step S23, the method for implementing the multiple output re-item processing includes:
extraction of the final DATA1 value: finding out the symbol "═" from the DATA1 DATA segment obtained in said step S22, listing the DATA of the row in which the symbol "═" is located by the AWK method, and outputting the second column value bounded by the symbol "═" as a boundary; transmitting the second column value to SED as an input parameter, deleting all spaces before the second column value, taking out a first numerical value in a first row in the second column value, and finally formatting and outputting the first numerical value by using an AWK method, wherein the first numerical value is the final value of DATA 1;
extraction of the final DATA2 value: finding out the symbol "═" from the DATA2 DATA segment obtained in said step S22, listing the DATA of the row in which the symbol "═" is located by the AWK method, and outputting the second column value bounded by the symbol "═" as a boundary; transmitting the second column value to SED as an input parameter, deleting all spaces before the second column value, taking out a first numerical value in a second row in the second column value, and finally formatting and outputting the first numerical value by using an AWK method, wherein the first numerical value is the final value of DATA 2;
extraction of the final DATA3 value: finding out the symbol "═" from the DATA3 DATA segment obtained in said step S22, listing the DATA of the row in which the symbol "═" is located by the AWK method, and outputting the second column value bounded by the symbol "═" as a boundary; transmitting the second column number value to SED as an input parameter, deleting all spaces before the second column number value, taking out a first numerical value in a third row in the second column number value, and finally formatting and outputting the first numerical value by using an AWK method, wherein the first numerical value is the final value of DATA 3;
extraction of the final DATA4 value: finding out the symbol "═" from the DATA4 DATA segment obtained in said step S22, listing the DATA of the row in which the symbol "═" is located by the AWK method, and outputting the second column value bounded by the symbol "═" as a boundary; and then transmitting the second column number value to SED as an input parameter, deleting all spaces before the second column number value, taking out a first numerical value in a fourth row in the second column number value, and finally formatting and outputting the first numerical value by using an AWK method, wherein the first numerical value is the value of the final DATA 4.
Preferably, in step S24, the formed CRSF _ TABLE is named CRSF _ TABLE. csv, and the format of output is "CRSF _ NAME, DATA1, DATA2, DATA3, DATA 4" by using ECHO method.
Preferably, the three-dimensional calculation result is a nuclear power design three-dimensional calculation result.
In another aspect, a three-dimensional calculation result formatting and extracting device is provided, which comprises a three-dimensional calculation server for data calculation in a three-dimensional design process;
the CRSF data server is connected with the calculation server and is used for receiving and uploading all CRSF data files in the calculation result of the calculation server;
the first operating system is connected with the CRSF data server and used for acquiring the CRSF data file, extracting a data field of the CRSF data file, formatting the data field, generating a CRSF _ TABLE and outputting the CRSF _ TABLE;
and the second operating system is connected with the first operating system and is used for receiving the CRSF _ TABLE, converting the file attribute of the first operating system of the CRSF _ TABLE into the file attribute of the second operating system and viewing the CRSF _ TABLE in the second operating system.
Preferably, the first operating system includes the following modules:
the data traversing module is used for uploading the CRSF data file to a Linux system, traversing CRSF _ DIR and listing directory and file detailed information;
a field extraction module, configured to iteratively search each CRSF data file according to a file name, and find a data item to be extracted from the CRSF data file;
a repeated output re-item module, configured to perform AWK and SED repeated output re-item processing on the data item to be extracted to obtain a corresponding parameter of the data item to be extracted;
and the CRSF _ TABLE generation module is used for formatting and outputting the data items needing to be extracted and forming the CRSF _ TABLE.
Preferably, the second operating system includes a Windows system.
Preferably, the file attribute of the second operating system is an Excel file.
Preferably, the step of listing the directory and file details comprises: and filtering each CRSF _ NAME in the CRSF _ DIR by using a print parameter in the AWK, and finally forming a CRSF _ NAME _ LIST containing each CRSF _ NAME _ LIST.
Preferably, the method for extracting the field includes:
and taking out one CRSF _ NAME from the CRSF _ NAME _ LIST, performing traversal operation, extracting a DATA1 DATA segment, a DATA2 DATA segment, a DATA3 DATA segment and a DATA4 DATA segment from the CRSF _ NAME _ LIST, sequentially taking out other CRSF _ NAMEs by the same method after the DATA is finished, sequentially performing traversal operation, and sequentially extracting a DATA1 DATA segment, a DATA2 DATA segment, a DATA3 DATA segment and a DATA4 DATA segment until all the CRSF _ NAMEs in the CRSF _ NAME _ LIST perform traversal operation once, and respectively extracting a DATA1 DATA segment, a DATA2 DATA segment, a DATA3 DATA segment and a DATA4 DATA segment in each CRSF _ NAME.
Preferably, a TAIL tool is used to dereference each CRSF _ NAME file in the CRSF _ DIR, and the data of the last four lines in each CRSF _ NAME file is taken out.
Preferably, the implementation method of the multiple output re-item processing includes:
extraction of the final DATA1 value: finding out the symbol "═" from the DATA1 DATA segment obtained in said step S22, listing the DATA of the row in which the symbol "═" is located by the AWK method, and outputting the second column value bounded by the symbol "═" as a boundary; transmitting the second column value to SED as an input parameter, deleting all spaces before the second column value, taking out a first numerical value in a first row in the second column value, and finally formatting and outputting the first numerical value by using an AWK method, wherein the first numerical value is the final value of DATA 1;
extraction of the final DATA2 value: finding out the symbol "═" from the DATA2 DATA segment obtained in said step S22, listing the DATA of the row in which the symbol "═" is located by the AWK method, and outputting the second column value bounded by the symbol "═" as a boundary; transmitting the second column value to SED as an input parameter, deleting all spaces before the second column value, taking out a first numerical value in a second row in the second column value, and finally formatting and outputting the first numerical value by using an AWK method, wherein the first numerical value is the final value of DATA 2;
extraction of the final DATA3 value: finding out the symbol "═" from the DATA3 DATA segment obtained in said step S22, listing the DATA of the row in which the symbol "═" is located by the AWK method, and outputting the second column value bounded by the symbol "═" as a boundary; transmitting the second column number value to SED as an input parameter, deleting all spaces before the second column number value, taking out a first numerical value in a third row in the second column number value, and finally formatting and outputting the first numerical value by using an AWK method, wherein the first numerical value is the final value of DATA 3;
extraction of the final DATA4 value: finding out the symbol "═" from the DATA4 DATA segment obtained in said step S22, listing the DATA of the row in which the symbol "═" is located by the AWK method, and outputting the second column value bounded by the symbol "═" as a boundary; and then transmitting the second column number value to SED as an input parameter, deleting all spaces before the second column number value, taking out a first numerical value in a fourth row in the second column number value, and finally formatting and outputting the first numerical value by using an AWK method, wherein the first numerical value is the value of the final DATA 4.
Preferably, in step S24, the formed CRSF _ TABLE is named CRSF _ TABLE. csv, and the format of output is "CRSF _ NAME, DATA1, DATA2, DATA3, DATA 4" by using ECHO method.
Preferably, the three-dimensional calculation result is a nuclear power design three-dimensional calculation result.
The technical effects brought by the technical scheme of the invention are as follows:
1) the CRSF _ DIR can be quickly traversed, data items required by designers are extracted from the CRSF, and the CRSF _ TABLE is automatically generated within 1 minute, so that the working efficiency of the designers is greatly improved.
2) The generated CRSF _ TABLE.CSV can be used in a cross-platform mode and has the advantages of intuition, reading, comprehension and visualization and the like.
3) The process of generating the CRSF _ TABLE only participates in one time manually, and the risk of data omission or data error extraction during manual extraction is greatly reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flowchart illustrating steps of a method for formatting and extracting three-dimensional computation results according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a three-dimensional calculation result formatting and extracting device according to a second embodiment of the present invention.
Detailed Description
The invention provides a method and a device for rapidly, efficiently and accurately extracting important data from a mass of CRSF and automatically generating CRSF _ TABLE, aiming at the problems of high labor consumption, low efficiency, high error rate and the like when data are extracted by adopting a manual labor mode and CRSF _ TABLE is generated in the existing three-dimensional design, especially in the nuclear power three-dimensional design process, so that the nuclear power three-dimensional design efficiency is improved. The core idea is as follows: based on a Linux platform, the formatted CRSF _ TABLE can be generated within 1 minute by using traversal, iterative search, input-output redirection and combining open source software AWK and SED technologies, and the problems of time consumption, labor waste and data extraction errors of a manual method are solved.
The first embodiment is as follows:
fig. 1 shows a flow chart of steps of a three-dimensional calculation result formatting extraction method, which can be used for extracting three-dimensional calculation results of nuclear power design, and includes:
s1, data uploading: receiving and uploading all CRSF data files in the nuclear power design three-dimensional calculation result;
s2, CRSF _ TABLE generation: obtaining the CRSF data file by a first operating system server, extracting a data field of the CRSF data file, formatting the data field, generating a CRSF _ TABLE and outputting the CRSF _ TABLE; the method specifically comprises the following steps:
s21, data traversal: uploading the CRSF to a first operating system, traversing CRSF _ DIR, and listing directory and file detailed information, wherein the directory and file detailed information comprises 9 fields which are respectively as follows: the file attribute field is the same, the number of hard links of the file, the file owner, the group in which the file owner is located, the file size, the file creation time and the file name. The LIST CRSF _ NAME _ LIST containing each CRSF _ NAME is obtained by filtering using the print parameter in the AWK. The implementation method comprises the following steps: ls-lCRSF _ DIR | AWK '{ print $9 }'; the first operating system comprises a Linux system.
S22, field extraction: iteratively searching each CRSF data file according to the file name, and finding out the data items needing to be extracted; the specific implementation method comprises the following steps:
forCRSF_NAMEin CRSF_NAME_LIST
do
DATA1=$(GET_DATA_OPERATION)
DATA2=$(GET_DATA_OPERATION)
DATA3=$(GET_DATA_OPERATION)
DATA4=$(GET_DATA_OPERATION)
done
since the DATA items to be extracted are in the last four rows of each CRSF, a TAIL tool can be used to take values of each CRSF _ NAME file in the CRSF _ DIR, and the DATA in the last four rows of each CRSF _ NAME file is taken out, that is, the specific method of GET _ DATA _ OPERATION may be preferably TAIL-4CRSF _ DIR/CRSF _ NAME.
S23, multiple output renormalization: performing AWK and SED multiple output re-item processing on the data item to be extracted to obtain corresponding parameters of the data item to be extracted; the realization method comprises the following steps:
DATA1=$(GET_DATA_OPERATION|awk'BEGIN{FS="="}{print$2}'|sed's/^\s*//g'|sed-n"1,1p"|awk'{print$1}')
DATA 2=$(GET_DATA_OPERATION|awk'BEGIN{FS="="}{print$2}'|sed's/^\s*//g'|sed-n"2,1p"|awk'{print$1}')
DATA 3=$(GET_DATA_OPERATION|awk'BEGIN{FS="="}{print$2}'|sed's/^\s*//g'|sed-n"3,1p"|awk'{print$1}')
DATA 4=$(GET_DATA_OPERATION|awk'BEGIN{FS="="}{print$2}'|sed's/^\s*//g'|sed-n"4,1p"|awk'{print$1}')
s24, CRSF _ TABLE generation: the DATA items extracted by the formatting output form a CRSF _ TABLE, which is named CRSF _ TABLE. CSV, and is realized by echo "CRSF _ NAME, DATA1, DATA2, DATA3, DATA 4".
S3, CRSF _ TABLE shows: receiving, by a second operating system server, the CRSF _ TABLE and translating file attributes of a first operating system of the CRSF _ TABLE into file attributes of a second operating system for viewing the CRSF _ TABLE under the second operating system server. The second operating system comprises a windows system; and the file attribute of the second operating system is an Excel file. The CRSF _ TABLE file generated by the Linux system can be downloaded to the Windows platform and opened by using Microsoft excel, so that the CRSF _ TABLE can be visually displayed and checked on the Windows platform.
It should be noted that the three-dimensional calculation result of the nuclear power design in this embodiment may also be replaced by other similar three-dimensional calculation results that need to be processed.
Fig. 2 is a schematic structural diagram of a three-dimensional calculation result formatting and extracting device, which can be used for extracting a three-dimensional calculation result of a nuclear power design, and includes:
the three-dimensional calculation server is used for calculating data in the three-dimensional design process;
the CRSF data server is connected with the calculation server and is used for receiving and uploading all CRSF data files in the calculation result of the calculation server;
the first operating system is connected with the CRSF data server and used for acquiring the CRSF data file, extracting a data field of the CRSF data file, formatting the data field, generating a CRSF _ TABLE and outputting the CRSF _ TABLE;
and the second operating system is connected with the first operating system and is used for receiving the CRSF _ TABLE, converting the file attribute of the first operating system of the CRSF _ TABLE into the file attribute of the second operating system and viewing the CRSF _ TABLE in the second operating system.
Similarly, the second operating system comprises a windows system; the file attribute of the second operating system is preferably an Excel file.
Further, the first operating system comprises the following modules:
the data traversing module is used for uploading the CRSF data file to a Linux system, traversing CRSF _ DIR and listing directory and file detailed information;
a field extraction module, configured to iteratively search each CRSF data file according to a file name, and find a data item to be extracted from the CRSF data file;
a repeated output re-item module, configured to perform AWK and SED repeated output re-item processing on the data item to be extracted to obtain a corresponding parameter of the data item to be extracted;
and the CRSF _ TABLE generating module is used for formatting and outputting the data items needing to be extracted and forming the CRSF _ TABLE.
Preferably, the formed CRSF _ TABLE may also be named CRSF _ TABLE.
The steps of listing the directory and file details, the implementation method of field extraction, the implementation method of GET _ DATA _ OPERATION, the implementation method of multiple output re-entry processing, and the implementation method of naming the formed CRSF _ TABLE as CRSF _ TABLE.
Similarly, it should be noted that the three-dimensional calculation result of the nuclear power design in this embodiment may also be replaced by other similar three-dimensional calculation results that need to be processed.
In summary, based on the Linux platform, the invention can generate formatted CRSF _ TABLE within 1 minute by using traversal, iterative search, input/output redirection and combining open source software AWK and SED technologies, can export the generated CRSF _ TABLE to the Windows platform, and can open the platform by using Excel in Microsoft Office, thereby facilitating viewing and display, and solving the problems of time consumption, labor consumption, low efficiency, omission and data extraction errors caused by adopting a manual method in the process of extracting the three-dimensional calculation result, especially the three-dimensional calculation result of nuclear power design.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (18)

1. A three-dimensional calculation result formatting and extracting method is characterized by comprising the following steps:
s1, data uploading: receiving and uploading all CRSF data files in the three-dimensional calculation result; unstructured data are in the CRSF data file;
s2, CRSF _ TABLE generation: obtaining the CRSF data file by a first operating system server, extracting a data field of the CRSF data file, formatting the data field, generating a CRSF _ TABLE and outputting the CRSF _ TABLE;
s3, CRSF _ TABLE shows: receiving, by a second operating system server, the CRSF _ TABLE and translating first operating system file attributes of the CRSF _ TABLE into second operating system file attributes for viewing the CRSF _ TABLE under the second operating system; the first operating system comprises a Linux system;
the step S2 specifically includes the following steps:
s21, data traversal: uploading the CRSF data file, traversing CRSF _ DIR, and listing directory and file detailed information;
s22, field extraction: iteratively searching each CRSF data file according to the file name, and finding out the data items needing to be extracted;
s23, multiple output renormalization: performing AWK and SED multiple output re-item processing on the data item to be extracted to obtain corresponding parameters of the data item to be extracted;
s24, CRSF _ TABLE generation: and formatting and outputting the data items needing to be extracted by using an ECHO method, and forming CRSF _ TABLE.
2. The method of claim 1, wherein the second operating system comprises a Windows system.
3. The method of claim 2, wherein the file attribute of the second operating system is an Excel file.
4. The method of claim 1, wherein in step S21, the step of listing directory and file details comprises: and filtering each CRSF _ NAME in the CRSF _ DIR by using a print parameter in the AWK, and finally forming a CRSF _ NAME _ LIST containing each CRSF _ NAME _ LIST.
5. The method as claimed in claim 4, wherein in step S22, the field extraction is implemented by: and taking out one CRSF _ NAME from the CRSF _ NAME _ LIST, performing traversal operation, extracting a DATA1 DATA segment, a DATA2 DATA segment, a DATA3 DATA segment and a DATA4 DATA segment from the CRSF _ NAME _ LIST, sequentially taking out other CRSF _ NAMEs by the same method after the DATA is finished, sequentially performing traversal operation, and sequentially extracting a DATA1 DATA segment, a DATA2 DATA segment, a DATA3 DATA segment and a DATA4 DATA segment until all the CRSF _ NAMEs in the CRSF _ NAME _ LIST perform traversal operation once, and respectively extracting a DATA1 DATA segment, a DATA2 DATA segment, a DATA3 DATA segment and a DATA4 DATA segment in each CRSF _ NAME.
6. The method of claim 5, wherein a TAIL tool is used to evaluate each CRSF _ NAME file in the CRSF _ DIR and to retrieve the data of the last four rows in each CRSF _ NAME file.
7. The method of claim 5, wherein in step S23, the method of implementing the multiple output re-term processing comprises:
extraction of the final DATA1 value: finding out the symbol "═" from the DATA1 DATA segment obtained in said step S22, listing the DATA of the row in which the symbol "═" is located by the AWK method, and outputting the second column value bounded by the symbol "═" as a boundary; transmitting the second column value to SED as an input parameter, deleting all spaces before the second column value, taking out a first numerical value in a first row in the second column value, and finally formatting and outputting the first numerical value by using an AWK method, wherein the first numerical value is the final value of DATA 1;
extraction of the final DATA2 value: finding out the symbol "═" from the DATA2 DATA segment obtained in said step S22, listing the DATA of the row in which the symbol "═" is located by the AWK method, and outputting the second column value bounded by the symbol "═" as a boundary; transmitting the second column value to SED as an input parameter, deleting all spaces before the second column value, taking out a first numerical value in a second row in the second column value, and finally formatting and outputting the first numerical value by using an AWK method, wherein the first numerical value is the final value of DATA 2;
extraction of the final DATA3 value: finding out the symbol "═" from the DATA3 DATA segment obtained in said step S22, listing the DATA of the row in which the symbol "═" is located by the AWK method, and outputting the second column value bounded by the symbol "═" as a boundary; transmitting the second column number value to SED as an input parameter, deleting all spaces before the second column number value, taking out a first numerical value in a third row in the second column number value, and finally formatting and outputting the first numerical value by using an AWK method, wherein the first numerical value is the final value of DATA 3;
extraction of the final DATA4 value: finding out the symbol "═" from the DATA4 DATA segment obtained in said step S22, listing the DATA of the row in which the symbol "═" is located by the AWK method, and outputting the second column value bounded by the symbol "═" as a boundary; and then transmitting the second column number value to SED as an input parameter, deleting all spaces before the second column number value, taking out a first numerical value in a fourth row in the second column number value, and finally formatting and outputting the first numerical value by using an AWK method, wherein the first numerical value is the value of the final DATA 4.
8. The method according to claim 1, wherein in step S24, the formed CRSF _ TABLE is named CRSF _ TABLE. csv, and the format of the output is "CRSF _ NAME, DATA1, DATA2, DATA3, DATA 4".
9. The method of any one of claims 1-8, wherein the three-dimensional computation result is a nuclear power design three-dimensional computation result.
10. A three-dimensional calculation result formatting and extracting device, which is suitable for the three-dimensional calculation result formatting and extracting method as claimed in claim 1, comprising a three-dimensional calculation server for data calculation in a three-dimensional design process, and further comprising:
the CRSF data server is connected with the calculation server and is used for receiving and uploading all CRSF data files in the calculation result of the calculation server; unstructured data are in the CRSF data file;
the first operating system is connected with the CRSF data server and used for acquiring the CRSF data file, extracting a data field of the CRSF data file, formatting the data field, generating a CRSF _ TABLE and outputting the CRSF _ TABLE;
the second operating system is connected with the first operating system and is used for receiving the CRSF _ TABLE and converting the first operating system file attribute of the CRSF _ TABLE into a second operating system file attribute for viewing the CRSF _ TABLE in the second operating system;
the first operating system includes the following modules:
the data traversing module is used for uploading the CRSF data file to a Linux system, traversing CRSF _ DIR and listing directory and file detailed information;
a field extraction module, configured to iteratively search each CRSF data file according to a file name, and find a data item to be extracted from the CRSF data file;
a repeated output re-item module, configured to perform AWK and SED repeated output re-item processing on the data item to be extracted to obtain a corresponding parameter of the data item to be extracted;
and the CRSF _ TABLE generation module is used for formatting and outputting the data items needing to be extracted by using an ECHO method and forming CRSF _ TABLE.
11. The apparatus of claim 10, wherein the second operating system comprises a Windows system.
12. The apparatus of claim 11, wherein the file attribute of the second operating system is an Excel file.
13. The apparatus of claim 10, wherein the step of listing directory and file details comprises: and filtering each CRSF _ NAME in the CRSF _ DIR by using a print parameter in the AWK, and finally forming a CRSF _ NAME _ LIST containing each CRSF _ NAME _ LIST.
14. The apparatus of claim 13, wherein field extraction is implemented by:
and taking out one CRSF _ NAME from the CRSF _ NAME _ LIST, performing traversal operation, extracting a DATA1 DATA segment, a DATA2 DATA segment, a DATA3 DATA segment and a DATA4 DATA segment from the CRSF _ NAME _ LIST, sequentially taking out other CRSF _ NAMEs by the same method after the DATA is finished, sequentially performing traversal operation, and sequentially extracting a DATA1 DATA segment, a DATA2 DATA segment, a DATA3 DATA segment and a DATA4 DATA segment until all the CRSF _ NAMEs in the CRSF _ NAME _ LIST perform traversal operation once, and respectively extracting a DATA1 DATA segment, a DATA2 DATA segment, a DATA3 DATA segment and a DATA4 DATA segment in each CRSF _ NAME.
15. The apparatus of claim 14, wherein a TAIL tool is used to evaluate each CRSF _ NAME file in the CRSF _ DIR and to retrieve the last four rows of data in each CRSF _ NAME file.
16. The apparatus of claim 14, wherein a method of implementing the multiple output re-item processing comprises:
extraction of the final DATA1 value: finding out the symbol "═" from the DATA1 DATA segment obtained in said step S22, listing the DATA of the row in which the symbol "═" is located by the AWK method, and outputting the second column value bounded by the symbol "═" as a boundary; transmitting the second column value to SED as an input parameter, deleting all spaces before the second column value, taking out a first numerical value in a first row in the second column value, and finally formatting and outputting the first numerical value by using an AWK method, wherein the first numerical value is the final value of DATA 1;
extraction of the final DATA2 value: finding out the symbol "═" from the DATA2 DATA segment obtained in said step S22, listing the DATA of the row in which the symbol "═" is located by the AWK method, and outputting the second column value bounded by the symbol "═" as a boundary; transmitting the second column value to SED as an input parameter, deleting all spaces before the second column value, taking out a first numerical value in a second row in the second column value, and finally formatting and outputting the first numerical value by using an AWK method, wherein the first numerical value is the final value of DATA 2;
extraction of the final DATA3 value: finding out the symbol "═" from the DATA3 DATA segment obtained in said step S22, listing the DATA of the row in which the symbol "═" is located by the AWK method, and outputting the second column value bounded by the symbol "═" as a boundary; transmitting the second column number value to SED as an input parameter, deleting all spaces before the second column number value, taking out a first numerical value in a third row in the second column number value, and finally formatting and outputting the first numerical value by using an AWK method, wherein the first numerical value is the final value of DATA 3;
extraction of the final DATA4 value: finding out the symbol "═" from the DATA4 DATA segment obtained in said step S22, listing the DATA of the row in which the symbol "═" is located by the AWK method, and outputting the second column value bounded by the symbol "═" as a boundary; and then transmitting the second column number value to SED as an input parameter, deleting all spaces before the second column number value, taking out a first numerical value in a fourth row in the second column number value, and finally formatting and outputting the first numerical value by using an AWK method, wherein the first numerical value is the value of the final DATA 4.
17. The apparatus of claim 10, wherein the formed CRSF _ TABLE is named CRSF _ TABLE. csv, and the format of the output is "CRSF _ NAME, DATA1, DATA2, DATA3, DATA 4".
18. The apparatus of any one of claims 10-17, wherein the three-dimensional computation result is a nuclear power design three-dimensional computation result.
CN201610726543.0A 2016-08-25 2016-08-25 Three-dimensional calculation result formatting extraction method and device Active CN106407266B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610726543.0A CN106407266B (en) 2016-08-25 2016-08-25 Three-dimensional calculation result formatting extraction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610726543.0A CN106407266B (en) 2016-08-25 2016-08-25 Three-dimensional calculation result formatting extraction method and device

Publications (2)

Publication Number Publication Date
CN106407266A CN106407266A (en) 2017-02-15
CN106407266B true CN106407266B (en) 2019-12-31

Family

ID=58004787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610726543.0A Active CN106407266B (en) 2016-08-25 2016-08-25 Three-dimensional calculation result formatting extraction method and device

Country Status (1)

Country Link
CN (1) CN106407266B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112598783B (en) * 2020-12-17 2023-08-25 中国城市规划设计研究院 Three-dimensional geometric data calculation method and three-dimensional geometric data calculation network architecture

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103793865A (en) * 2000-10-11 2014-05-14 健康三重奏有限责任公司 System for communication of health care data
WO2014155761A1 (en) * 2013-03-29 2014-10-02 株式会社日立システムズ Customer-specific data cleansing processing system and customer-specific data cleansing processing method
CN104360839A (en) * 2014-10-20 2015-02-18 浪潮电子信息产业股份有限公司 Method for automatically migrating LINUX system to WINDOWS system
CN104408150A (en) * 2014-12-03 2015-03-11 天津南大通用数据技术股份有限公司 Data import/ export method and device adapted to a plurality of data formats of databases
CN105760515A (en) * 2016-02-24 2016-07-13 国家电网公司 Fusion method for same object data of multiple data sources

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103793865A (en) * 2000-10-11 2014-05-14 健康三重奏有限责任公司 System for communication of health care data
WO2014155761A1 (en) * 2013-03-29 2014-10-02 株式会社日立システムズ Customer-specific data cleansing processing system and customer-specific data cleansing processing method
CN104360839A (en) * 2014-10-20 2015-02-18 浪潮电子信息产业股份有限公司 Method for automatically migrating LINUX system to WINDOWS system
CN104408150A (en) * 2014-12-03 2015-03-11 天津南大通用数据技术股份有限公司 Data import/ export method and device adapted to a plurality of data formats of databases
CN105760515A (en) * 2016-02-24 2016-07-13 国家电网公司 Fusion method for same object data of multiple data sources

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
电力行业分布式ETL数据集成系统研究与实现;林建昌;《中国优秀硕士学位论文全文数据库·信息科技辑》;20160715;I138-689第2-19页 *

Also Published As

Publication number Publication date
CN106407266A (en) 2017-02-15

Similar Documents

Publication Publication Date Title
CN107958057B (en) Code generation method and device for data migration in heterogeneous database
CN105701098B (en) The method and apparatus for generating index for the table in database
CN103226606B (en) Inquiry choosing method and system
EP3671526B1 (en) Dependency graph based natural language processing
TW201419014A (en) Extracting semantic relationships from table structures in electronic documents
CN106326202A (en) Method and device for automatically generating data analysis report
CN110990467B (en) BIM model format conversion method and conversion system
US20070073675A1 (en) Database query translation
CN112612664B (en) Electronic equipment testing method and device, electronic equipment and storage medium
US20210149920A1 (en) Generating an olap model from a spreadsheet
CN106776779B (en) Method for generating entity file by JSON data based on Mac platform
Brown et al. Overview–The Social Media Data Processing Pipeline
CN106407266B (en) Three-dimensional calculation result formatting extraction method and device
KR20220016933A (en) Method and apparatus for ingesting data, device, storage medium and computer program stored in the medium
CN105718376A (en) Method for establishing relations between bug, commit and related personnel
CN111125045B (en) Lightweight ETL processing platform
CN116595934A (en) Automatic generation method for configuration of gluing system, electronic device and storage medium
CN110704635A (en) Conversion method and device for ternary group data in knowledge graph
CN116225902A (en) Method, device and equipment for generating test cases
CN114519071A (en) Generation method, matching method, system, device and medium of rule matching model
WO2022159202A1 (en) Efficient creation and/or restatement of database tables
CN110232055B (en) OLAP data analysis migration method and system
CN110515913B (en) Log processing method and device
US20190205482A1 (en) Computer Aided Design Model Conversion
US11966371B1 (en) Systems and methods for automated data dictionary generation and validation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant