WO2020259141A1 - 一种文件处理方法、装置及计算机设备 - Google Patents

一种文件处理方法、装置及计算机设备 Download PDF

Info

Publication number
WO2020259141A1
WO2020259141A1 PCT/CN2020/091378 CN2020091378W WO2020259141A1 WO 2020259141 A1 WO2020259141 A1 WO 2020259141A1 CN 2020091378 W CN2020091378 W CN 2020091378W WO 2020259141 A1 WO2020259141 A1 WO 2020259141A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
data
fund
typesetting
field
Prior art date
Application number
PCT/CN2020/091378
Other languages
English (en)
French (fr)
Inventor
胡创大
Original Assignee
深圳前海微众银行股份有限公司
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 深圳前海微众银行股份有限公司 filed Critical 深圳前海微众银行股份有限公司
Publication of WO2020259141A1 publication Critical patent/WO2020259141A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/189Automatic justification

Definitions

  • the present invention relates to the technical field of financial technology (Fintech), in particular to a file processing method, device and computer equipment.
  • each transaction data in the data file in the fund file is a fixed-length message , Including multiple field parameters.
  • the invention provides a file processing method, device and computer equipment, which are used to provide a new processing method for fund files, so as to improve the accuracy of processing fund files and the efficiency of file processing.
  • this application provides a file processing method, which includes:
  • each sub-transaction data includes field data of N fields, each of the N fields has a different field name, and M and N are both integers greater than or equal to 1.
  • each sub-transaction data The N fields of is divided into N columns and the column identifier of the column is set according to the field name corresponding to each column to perform EXCEL typesetting to obtain the first typesetting result for the transaction record data. According to the first typesetting result, Generate an EXCEL file corresponding to the fund file.
  • the N fields of each sub-transaction data are divided into N columns, and the column is set according to the field name of the field corresponding to each column EXCEL typesetting is performed on the column identification to realize the division of different fields in each sub-transaction record data, which can facilitate users to clearly know the field content in each sub-transaction record data and improve the accuracy of processing fund documents.
  • the method further includes: translating the field names of the N fields in a second language different from the first language to obtain N field identifiers in the second language , Wherein the field names of the N fields in the first typesetting result are expressed in the first language; according to the manner in which the field identifiers and column identifiers used to represent the same field name are set correspondingly, the The N field identifiers represented in the second language are respectively set as one column for typesetting corresponding to the N column identifiers in the first typesetting result, so as to obtain the second typesetting result for the N fields; accordingly, according to the first typesetting result;
  • a typesetting result, generating an EXCEL file corresponding to the fund file includes: generating an EXCEL file corresponding to the fund file according to the first typesetting result and the second typesetting result.
  • the field names of the N fields are translated in a second language different from the first language, and the N field identifiers represented by the second language are respectively compared with the N columns in the first typesetting result.
  • the logo is correspondingly set as a column for typesetting, so that users who are used to reading in different languages can directly obtain the meaning of the field name, thereby reducing user operations and improving user experience.
  • obtaining the second typesetting result for the N sub-segments includes: determining the number of bits corresponding to each field according to the number of bits occupied by each of the N fields, The digit identifier of each field is typeset corresponding to the field identifier or column identifier corresponding to the field to obtain the field digit typesetting result, and the second typesetting result is updated according to the field digit typesetting result.
  • the method further includes: determining fixed file description data in the fund file, wherein the fixed file description data includes all information represented by the financial data protocol adopted by the fund file.
  • the data of the same type included in the fund file according to the typesetting format of the fixed file description data in the fund file, EXCEL typesetting the fixed file description data is performed to obtain the third data for the fixed file description data.
  • Typesetting result accordingly, generating an EXCEL file corresponding to the fund file according to the first typesetting result, including: generating an EXCEL file corresponding to the fund file according to the first typesetting result and the third typesetting result EXCEL file.
  • the fixed file description data in the fund file is typeset, and then combined with the first typesetting result to generate the EXCEL file corresponding to the fund file.
  • the generated EXCEL file corresponds to the fund file, and the user can pass
  • the EXCEL file accurately contains all the data content of the fund file, which improves the user experience.
  • an editing operation for the EXCEL file is further received, and the data to be edited in the EXCEL file is determined to be based on the editing operation.
  • the legality of the response result is checked according to the data attribute of the edited data; wherein, the data attribute includes the number of bits occupied by the data and/or the data retention level; If passed, the response to the editing operation is cancelled.
  • an editing operation (such as a modification operation) for the EXCEL file can be received, and then according to the editing operation, the response result of the edited data in the EXCEL file to the editing operation is determined, so as to respond according to the data attributes of the edited data
  • the result is verified for legitimacy; that is, when the user edits the EXCEL file, the user can verify the edited data to improve the accuracy of processing the file.
  • the response to the editing operation can be cancelled, that is, illegal editing by the user is blocked during the editing operation to determine the legality of the edited data.
  • the method further includes: determining the EXCEL file to be converted, wherein the EXCEL file to be converted is an EXCEL file converted according to the fund file; and according to the typesetting format of the fund file, The EXCEL file to be converted is typeset and converted to obtain a fourth typeset result, and a fund file corresponding to the EXCEL file to be converted is generated according to the fourth typeset result.
  • the EXCEL file converted according to the fund file can also be processed, that is, the EXCEL file to be converted is typeset and converted according to the typesetting format of the fund file, and then the fund file corresponding to the EXCEL file to be converted is generated.
  • the converted EXCEL file can be converted to a fund file, so that users can process the transaction record data of the fund file in the EXCEL file, and then convert the processed EXCEL file into a fund file to improve user experience.
  • the method further includes: in the process of converting the EXCEL file to be converted into the corresponding fund file, performing a legality check on key data; wherein, the key data includes field length At least one of the number of parameters and the number of data rows; when the key data passes the legality check, the conversion from the EXCEL file to be converted to the corresponding fund file is continued.
  • the legality of key data can also be checked during the conversion from the EXCEL file to be converted to the corresponding fund file, so as to further ensure the legality of the fund file converted from the EXCEL file and improve the Accuracy of document processing.
  • this application provides a file processing device, the device including:
  • the first determining module is used to determine the fund file to be converted
  • a reading module for reading transaction record data in the fund file where the transaction record data includes M pieces of sub-transaction data spliced in a predetermined order, and each piece of sub-transaction data in the M pieces of sub-transaction data is Including field data of N fields, each of the N fields has a different field name, and M and N are both integers greater than or equal to 1;
  • the first typesetting module is used to divide the N fields of each sub-transaction data into N columns according to the typesetting format of the EXCEL file, and set the column ID of the column corresponding to the field name of each column to perform EXCEL typesetting to obtain The first typesetting result of the transaction record data;
  • the first processing module is configured to generate an EXCEL file corresponding to the fund file according to the first typesetting result.
  • the device further includes a second determining module configured to: translate the field names of the N fields in a second language different from the first language to Obtain the N field identifiers expressed in the second language, wherein the field names of the N fields in the first typesetting result are expressed in the first language; accordingly, the device further includes a second language
  • the typesetting module, the second typesetting module is used to: according to the corresponding setting of field identifiers and column identifiers for representing the same field name, the N field identifiers expressed in the second language are respectively set with the first typesetting
  • the N column identifiers in the result are correspondingly set as one column for typesetting to obtain a second typesetting result for the N fields;
  • the device further includes a second processing module, and the second processing module is configured to:
  • the first typesetting result and the second typesetting result generate an EXCEL file corresponding to the fund file.
  • the second determining module is further configured to: determine the number of bits corresponding to each field according to the number of bits occupied by each of the N fields; accordingly, the second typesetting module , Used for typesetting the digit identifier of each field corresponding to the field identifier or column identifier corresponding to the field to obtain the field digit typesetting result, and updating the second typesetting result according to the field digit typesetting result.
  • the device further includes a third determining module configured to determine fixed file description data in the fund file, wherein the fixed file description data includes The financial data protocol adopted by the fund document includes the same type of data in all fund documents; correspondingly, the device also includes a third typesetting module for: according to the fixed document The typesetting format of the description data in the fund file, EXCEL typesetting the fixed file description data to obtain a third typesetting result for the fixed file description data; the device further includes a third processing module, the The third processing module is configured to generate an EXCEL file corresponding to the fund file according to the first typesetting result and the third typesetting result.
  • the device further includes a verification module.
  • the verification module is configured to: receive an editing operation for the EXCEL file, and The editing operation determines the response result of the edited data in the EXCEL file to the editing operation, and checks the validity of the response result according to the data attribute of the edited data; wherein, the data attribute Including the number of digits occupied by the data and/or the level of data retention; if the inspection fails, the response to the editing operation is cancelled.
  • the device further includes a conversion module configured to determine an EXCEL file to be converted, wherein the EXCEL file to be converted is an EXCEL file obtained by conversion according to a fund file; According to the typesetting format of the fund document, the EXCEL file to be converted is typeset and converted to obtain a fourth typeset result, and a fund file corresponding to the EXCEL file to be converted is generated according to the fourth typeset result.
  • a conversion module configured to determine an EXCEL file to be converted, wherein the EXCEL file to be converted is an EXCEL file obtained by conversion according to a fund file; According to the typesetting format of the fund document, the EXCEL file to be converted is typeset and converted to obtain a fourth typeset result, and a fund file corresponding to the EXCEL file to be converted is generated according to the fourth typeset result.
  • the verification module is further configured to: in the process of converting the EXCEL file to be converted into the corresponding fund file, perform a legality check on the key data; wherein, the key data It includes at least one of the field length, the number of parameters, and the number of data rows; correspondingly, the conversion module is also used to: when the key data passes the legality check, continue to perform the EXCEL to be converted File conversion to the corresponding fund file.
  • this application provides a computer device, which includes:
  • Memory used to store program instructions
  • the processor is configured to call the program instructions stored in the memory, and execute the steps included in any method in the first aspect according to the obtained program instructions.
  • the present application provides a storage medium that stores computer-executable instructions, and the computer-executable instructions are used to make a computer execute the steps included in any of the methods in the first aspect.
  • Figure 1 is a schematic diagram of the content of the data file in the fund file in the embodiment of the application
  • Figure 2 is a schematic diagram of data content in a data file in a fund file in an embodiment of the application
  • Figure 3 is a schematic diagram of the interface of the modifier in an embodiment of the application.
  • FIG. 4 is a schematic diagram of an interface for selecting to open a ZIP file in an embodiment of the application
  • FIG. 5 is a schematic diagram of an EXCLE file in an embodiment of the application.
  • Fig. 6 is a flowchart of a method for converting an EXCLE file into a fund file in an embodiment of the application
  • FIG. 7 is a flowchart of a file processing method in an embodiment of the application.
  • FIG. 8 is a schematic diagram of the arrangement of data content of data files in fund files in an embodiment of the application.
  • FIG. 9 is another schematic diagram of the arrangement of the data content of the data files in the fund files in the embodiment of the application.
  • FIG. 10 is a structural block diagram of a file processing device in an embodiment of the application.
  • FIG. 11 is a schematic structural diagram of a computer device in an embodiment of the application.
  • FIG. 12 is a schematic diagram of another structure of a computer device in an embodiment of this application.
  • the central data exchange platform open-end fund business data exchange agreement stipulates that asset management products (including but not limited to public funds, non-public funds, collective asset management plans, etc., referred to in the text as "funds") related business institutions The data format, data definition and data content used in data exchange between.
  • Fund documents Documents that comply with the central data exchange platform's open-end fund business data exchange protocol are referred to as fund documents, including data index files and data files.
  • the naming rule of the data index file is "OFI/OFJ/OFS/OFK/OFC” + “_” + file creator code + "_” + file recipient code + "_” + date (YYYYMMDD) + ". TXT”, and its content is a list of data files.
  • the naming rules for data files are: "OFD” + “_” + file creator code + “_” + file recipient code + “_” + date (YYYYMMDD) + " _” + two-digit file type code + ".TXT" content is the content of data exchanged between institutions.
  • GUI Graphical User Interface
  • GUI refers to a computer operating user interface displayed in a graphical manner.
  • Graphical user interface is an interface display format for communication between humans and computers. It allows users to use input devices such as a mouse to manipulate icons or menu options on the screen to select commands, call files, start programs, or perform other daily tasks.
  • Tkinter interface Python's standard Tk GUI toolkit interface.
  • a plurality of may mean at least two, for example, it may be two, three, or more, which is not limited in the embodiments of the present application.
  • the term "and/or" in this article is only an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, exist alone B these three situations.
  • the character "/" in this text unless otherwise specified, generally indicates that the associated objects before and after are in an "or" relationship.
  • Figure 1 is a schematic diagram of the data file in the existing trading fund file. It can be seen that the data file in the fund file can consist of the following contents:
  • fixed fields include the central data exchange platform open-end fund business data exchange protocol version number, information creator code, information recipient code, data date, file transmission order flag, file type, sender, recipient, That is 21, 03, 918, 20170106, 999, 04, 03, 918 in Figure 1;
  • Figure 2 is an example diagram of the data content of the data file in the trading fund file shown in Figure 1. It can be seen from the figure that both the first data content and the second data content can include multiple character. In this case, if the solution in the prior art is adopted, only manual viewing or processing of files is required, which is prone to errors.
  • the inventor of the present application has developed a modifier with the function of converting fund files into EXCEL files, and the modifier can be applied to computer equipment.
  • the modifier uses the python development language and uses the Tkinter interface, and is packaged into an exe executable file with Pyinstaller. In this way, the user does not need to install a development integrated environment such as python, which can greatly facilitate the user's use.
  • the interface includes a tool log output area.
  • the tool log output area includes the time when the user uses the modifier and the specific content of the operation performed by the user, so that the user can quickly view the processing time and specific processing process of the fund file, so that the user can clearly know the fund file The process of processing the work content of the file.
  • the tool log output area also includes a file selection area and a function area, such as the functions of generating files, opening xls files, opening zip files, and switching processing files as shown in FIG. 3.
  • the aforementioned two functions enable users to open the generated EXCLE file or fund file without double-clicking on the file manager. Instead, they can open the corresponding file directly by clicking the functional button provided by the modifier, thereby reducing users The operation steps to improve the processing efficiency of fund documents.
  • the GUI interface of the modifier can display multiple data files and data index files in the opened fund file, and then the user can choose to open one of them A data file. For example, as shown in Figure 4, if you choose to open the OFD_03_918_20170106_04.TXT data file, you can see the content of the data file, and you can see: the data content part is displayed because the fields are spliced between fields, resulting in It is difficult for users to read and modify. After the user performs the file generation operation on the OFD_03_918_20170106_04.TXT data file selected to open the fund file, please refer to Figure 5.
  • Figure 5 is a GUI interface diagram for converting the data file FD_03_918_20170106_04.TXT in the fund file into an EXCLE file.
  • Step 601 Obtain a selection operation for the fund file to be processed.
  • Step 602 According to the selection operation, convert the pending fund file into an EXLCE file.
  • Step 603 Obtain the processing operation of opening the xls file, and display the generated EXLCE file according to the processing operation.
  • Step 604 Obtain a modification or viewing operation for the displayed EXLCE file, and process the EXLCE file according to the modification or viewing operation to obtain a target EXLCE file.
  • Step 605 Obtain a conversion operation for the target EXLCE file, and convert the target EXLCE file into a target fund file.
  • Step 606 Obtain a check operation for the target fund file to check the generated fund file.
  • the user can use the modifier to convert the fund file into an EXLCE file, and then use the search and hide functions provided by EXLCE to quickly locate a field in the data file in the fund file, and then perform Check or modify, etc., and you can hide unnecessary fields. Furthermore, after modifying the value of a certain field in the EXLCE file, the switch processing file function of the modifier can be used again to convert the EXLCE file into a fund file.
  • FIG. 7 is a flowchart of a file processing method in an embodiment of the application.
  • Step 701 Determine the fund file to be converted.
  • Step 702 Read transaction record data in the fund file.
  • the transaction record data includes M pieces of sub-transaction data spliced in a predetermined order.
  • each of the M pieces of sub-transaction data includes field data of N fields, and the field name of each of the N fields is different, and M and N are both greater than or equal to 1. Integer.
  • the method proposed in this application can be executed by the aforementioned modifier. Specifically, the user can click the aforementioned fund file to determine the fund file to be converted.
  • the modifier can obtain the data content in the data file.
  • the data content in the data file is called transaction record data, where the transaction record data includes M pieces of sub-transaction data spliced in a predetermined order, and each piece of sub-transaction in the M pieces of sub-transaction data
  • the data includes field data of N fields, and each of the N fields has a different field name.
  • the transaction record data includes three sub-transaction record data, which are the first sub-transaction record data, the second sub-transaction record data, and the third sub-transaction record data, and the first sub-transaction record data
  • the second sub transaction record data and the third sub transaction record data include field 1, field 2, field 3, field 4, field 5, field 6, field 7, and field 8, respectively.
  • the first sub-transaction record data is formed by concatenating data corresponding to Field 1, Field 2, Field 3, Field 4, Field 5, Field 6, Field 7, and Field 8.
  • the transaction record data may also be formed by splicing the first sub-transaction record data, the second sub-transaction record data, and the third sub-transaction record data.
  • the first sub-transaction record data, the first sub-transaction record data, the second sub-transaction record data, and the third sub-transaction in FIG. 8 can be understood as the data content in FIG. 1.
  • each sub-transaction record data may include a predetermined identifier.
  • the predetermined identifier is used to separate the data between the sub-transaction record data.
  • the predetermined identifier can be a space, or *, or of course, it can also be #, which is not limited in the embodiment of this application.
  • the predetermined identifier is a space
  • the transaction record data includes three sub-transaction record data, which are the first sub-transaction record data, the second sub-transaction record data, and the third sub-transaction record data
  • the first sub-transaction record data, the second sub-transaction record data, and the third sub-transaction record data include field 1, field 2, field 3, field 4, and field 5, respectively.
  • the first sub transaction record data can also be formed by splicing the data corresponding to fields 1, field 2, field 3, field 4, and field 5.
  • the second sub transaction record data and the third sub transaction record The data is also formed by concatenating data corresponding to Field 1, Field 2, Field 3, Field 4, and Field 5.
  • the first sub-transaction record data and the second sub-transaction record data include spaces, and the second sub-transaction record data and the third sub-transaction record data include spaces. In this way, the first sub-transaction record data, the second sub-transaction record data and the third sub-transaction record data can be clearly distinguished.
  • Step 703 According to the formatting format of the EXCEL file, divide the N fields of each sub-transaction data into N columns and set the column identifier of the column according to the field name corresponding to each column to perform EXCEL layout to obtain the transaction record The first typesetting result of the data;
  • each sub-transaction data after reading the transaction record data in the fund file, the N fields of each sub-transaction data can be divided into N columns according to the formatting format of the EXCEL file and the field names corresponding to each column Set the column ID of this column for EXCEL typesetting. That is to say, each sub-transaction data is composed of N fields that were originally spliced and arranged, each field occupies one column, and each sub-transaction data occupies one row to format the transaction record data.
  • the transaction record data is typeset according to the format of the EXCEL file, that is, the transaction record data is divided into rows and columns. Specifically, according to the character length limit of each of the N fields, each sub-transaction record data can be divided into columns, so that the typesetting result can be obtained. In other words, the division of rows and columns makes the display of transaction record data clearer, so that users can accurately know the content of each field, thereby enhancing the accuracy of fund file processing.
  • Step 704 According to the first typesetting result, an EXCEL file corresponding to the fund file is generated.
  • the N fields of each sub-transaction data are divided into N columns, and the column identifier of the column is set according to the field name of the field corresponding to each column to perform EXCEL typesetting to obtain the first typesetting result to generate and The EXCEL file corresponding to the fund file. That is to say, the field names included in the sub-transaction record data and the N column data of the sub-transaction record data after typesetting are arranged correspondingly, and then the transaction record data is processed in the aforementioned manner to generate the EXCEL file corresponding to the fund file .
  • Line 13 in the EXCEL file displays the field name
  • lines 14-18 display the transaction record data of the fund file. This display mode allows the user to clearly determine the content of the field, so that Accurately review and/or modify the field content, which improves the efficiency of processing fund documents.
  • the target configuration file corresponding to the target fund file can also be determined, and the field name of each field is determined from the target configuration file according to the field names of the N fields, and then A second language that is different from the first language translates the field names of the N fields to obtain N field identifiers in the second language.
  • the field names of the N fields in the first typesetting result are expressed in the first language.
  • the first language of the field name is English
  • the second language can be Chinese, German, French, Portuguese and other languages. That is, the N field identifiers represented by the second language can be Chinese or French. Logo.
  • the N field identifiers in the second language and the N column identifiers in the first typesetting result are respectively set as one column for typesetting.
  • the second typesetting result for N fields is obtained.
  • an EXCEL file corresponding to the fund file can be generated.
  • the field identification in the second language is converted to Chinese.
  • users who are accustomed to using different languages can clearly know the field names and improve user experience.
  • the fixed file description data in the fund file is determined.
  • the fixed file description data includes data of the same type included in all fund files represented by the financial data protocol adopted by the fund file.
  • the fixed file description data may include file identifiers, fixed records, field names, and end-of-file identifiers.
  • EXCEL typesetting of the fixed file description data can be performed to obtain the third typesetting result for the fixed file description data.
  • an EXCEL file corresponding to the fund file is generated.
  • the EXCEL file corresponding to the fund file can also be generated according to the first typesetting result, the second typesetting result, and the third typesetting result.
  • the generated EXCEL file can correspond to the fund file, so that the user can accurately obtain all the data content of the fund file through the EXCEL file, and improve the user experience.
  • the user when the user wants to modify or view the fund file, the user can perform data modification operations in the EXCEL file after generating the EXCEL file corresponding to the fund file, that is, computer equipment
  • the editing operation for example, modification
  • the editing operation for example, modification
  • the response result of the edited data in the EXCEL file to the editing operation is determined.
  • the legality of the response result can be verified according to the data attribute of the edited data.
  • the data attributes include the number of bits occupied by the data and/or the data retention level.
  • the computer device can determine the response result of the edited data in the EXCEL file to the editing operation, and can be accounted for according to the data The number of digits is checked for the field data.
  • the number of digits of the edited field data is not the same as the number of digits occupied by the field data (for example, the number of digits of the edited field data is greater than the number of digits occupied by the field, or it is edited If the number of digits in the field is less than the number of digits occupied by the field), you can confirm that the verification has failed, thereby canceling the response to the editing operation, that is, the user finds that the modified field data is not displayed in the GUI interface.
  • the data retention level is used to indicate that the data can or cannot be deleted during file conversion.
  • the fixed file description data in the fund file is fixed data
  • the fixed file description data in the fund file can be determined as a lower retention level (data that can be deleted), and the transaction record data can be determined as retained Higher level (data that cannot be deleted).
  • the legality check passes.
  • the data attribute of the edited data is transaction record data
  • the legality check fails, and the response to the editing operation can be withdrawn. In this way, the legality of the transaction record data can be accurately ensured.
  • the user's edit data can be verified to improve the accuracy of processing the file.
  • the verification fails, the response to the editing operation can be canceled, so that illegal editing by the user during the editing operation is blocked to determine the legality of the edited data.
  • the EXCEL file obtained from the conversion of the fund file may also be converted into a fund file.
  • the EXCEL file to be converted can be determined, where the EXCEL file to be converted is an EXCEL file obtained by conversion according to the fund file. Then, according to the typesetting format of the fund file, the EXCEL file to be converted is typeset and converted, and the fourth typesetting result can be obtained, so as to generate the fund file corresponding to the EXCEL file to be converted according to the fourth typesetting result.
  • the converted EXCEL file can be converted to a fund file, so that the user can process the transaction record data of the fund file in the EXCEL file, and then convert the processed EXCEL file into a fund file to improve user experience.
  • the legality of the key data can also be checked during the conversion of the EXCEL file to be converted into the corresponding fund file.
  • the key data includes at least one of field length, number of parameters, and number of data rows.
  • the legality of the key data is checked, so as to further ensure the legality of the fund file converted from the EXCEL file and improve the file Accuracy of processing.
  • an embodiment of the present application provides a file processing device.
  • the file processing device can be a hardware structure, a software module, or a hardware structure plus a software module.
  • the file processing device can be realized by a chip system, and the chip system can be composed of a chip, and can also include a chip and other discrete devices. As shown in FIG. 10, the file processing device in the embodiment of the present application includes:
  • the first determining module 1001 is used to determine the fund file to be converted
  • the reading module 1002 is configured to read transaction record data in the fund file, wherein the transaction record data includes M pieces of sub-transaction data spliced in a predetermined order, and each piece of sub-transaction data in the M pieces of sub-transaction data Each includes field data of N fields, each of the N fields has a different field name, and both M and N are integers greater than or equal to 1;
  • the first typesetting module 1003 is used to divide the N fields of each sub-transaction data into N columns according to the typesetting format of the EXCEL file, and set the column ID of the column corresponding to the field name of each column to perform EXCEL typesetting to obtain The first typesetting result for the transaction record data;
  • the first processing module 1004 is configured to generate an EXCEL file corresponding to the fund file according to the first typesetting result.
  • the file processing apparatus further includes a second determining module, and the second determining module is configured to:
  • the file processing device also includes a second typesetting module, which is used to: according to the corresponding setting of field identifiers and column identifiers for representing the same field name, the N field identifiers expressed in the second language are respectively set with the first The N column identifiers in the typesetting result are correspondingly set as one column for typesetting, so as to obtain the second typesetting result for the N fields;
  • the file processing device further includes a second processing module, and the second processing module is used for generating an EXCEL file corresponding to the fund file according to the first typesetting result and the second typesetting result.
  • the second determining module is further used for:
  • the second typesetting module is used for typesetting the digit identifier of each field corresponding to the field identifier or column identifier corresponding to the field to obtain the typesetting result of the field digit;
  • the file processing apparatus further includes a third determining module, and the third determining module is configured to:
  • the file processing device also includes a third typesetting module, which is used to: perform EXCEL typesetting on the fixed file description data according to the typesetting format of the fixed file description data in the fund file to obtain the third typesetting for the fixed file description data result;
  • the file processing device further includes a third processing module, and the third processing module is configured to generate an EXCEL file corresponding to the fund file according to the first typesetting result and the third typesetting result.
  • the file processing device further includes a verification module. After the EXCEL file corresponding to the fund file is generated, the verification module is used to:
  • the data attribute includes the number of bits occupied by the data and/or the data retention level;
  • the file processing device further includes a conversion module, and the conversion module is used for:
  • the EXCEL file to be converted is typeset and converted to obtain the fourth typesetting result
  • the verification module is also used for:
  • the legality of the key data is checked;
  • the key data includes at least one of the field length, the number of parameters, and the number of data rows;
  • the conversion module is also used for:
  • the division of modules in the embodiments of the present application is illustrative, and is only a logical function division. In actual implementation, there may be other division methods.
  • the functional modules in the various embodiments of the present application may be integrated into one process. In the device, it can also exist alone physically, or two or more modules can be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules.
  • the embodiments of the present application also provide a computer device.
  • the computer device in the embodiment of the present application includes at least one processor 1101, and a memory 1102 and a communication interface 1103 connected to the at least one processor 1101.
  • the embodiment of the present application does not limit the processor 1101 and the memory 1102.
  • the specific connection medium between the processor 1101 and the memory 1102 is connected through a bus 1100 as an example in FIG. 11.
  • the bus 1100 is represented by a thick line in FIG. 11, and the connection between other components is only for illustration. Sexual description is not limited.
  • the bus 1100 can be divided into an address bus, a data bus, a control bus, etc. For ease of presentation, only a thick line is used in FIG. 11 to represent it, but it does not mean that there is only one bus or one type of bus.
  • the memory 1102 stores instructions that can be executed by at least one processor 1101, and the at least one processor 1101 can execute the steps included in the aforementioned fault detection method by executing the instructions stored in the memory 1102.
  • the processor 1101 is the control center of the computer equipment. It can use various interfaces and lines to connect the various parts of the entire fault detection equipment. By running or executing the instructions stored in the memory 1102 and calling the data stored in the memory 1102, it can calculate Various functions and processing data of the equipment, so as to monitor the computing equipment as a whole.
  • the processor 1101 may include one or more processing units, and the processor 1101 may integrate an application processor and a modem processor, where the processor 1101 mainly processes an operating system, a user interface, and application programs, etc.
  • the adjustment processor mainly deals with wireless communication. It is understandable that the foregoing modem processor may not be integrated into the processor 1101.
  • the processor 1101 and the memory 1102 may be implemented on the same chip, and in some embodiments, they may also be implemented on separate chips.
  • the processor 1101 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, Implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application.
  • the general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
  • the memory 1102 can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules.
  • the memory 1102 may include at least one type of storage medium, for example, it may include flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), magnetic memory, disk , CD, etc.
  • the memory 1102 is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
  • the memory 1102 in the embodiment of the present application may also be a circuit or any other device capable of implementing a storage function for storing program instructions and/or data.
  • the communication interface 1103 is a transmission interface that can be used for communication, and data can be received or sent through the communication interface 1103.
  • the computer equipment also includes a basic input/output system (I/O system) 1201 that helps to transfer information between various devices in the computer equipment, and is used to store an operating system. 1202, a mass storage device 1205 for application programs 1203 and other program modules 1204.
  • I/O system basic input/output system
  • the basic input/output system 1201 includes a display 1206 for displaying information and an input device 1207 such as a mouse and a keyboard for the user to input information.
  • the display 1206 and the input device 1207 are both connected to the processor 1101 through the basic input/output system 1201 connected to the system bus 1100.
  • the basic input/output system 1201 may also include an input and output controller for receiving and processing input from multiple other devices such as a keyboard, a mouse, or an electronic stylus.
  • the I/O controller also provides output to a display screen, printer or other type of output device.
  • the mass storage device 1205 is connected to the processor 1101 through a mass storage controller (not shown) connected to the system bus 1100.
  • the mass storage device 1205 and its associated computer readable medium provide non-volatile storage for the server package. That is, the mass storage device 1205 may include a computer-readable medium (not shown) such as a hard disk or a CD-ROM drive.
  • the computing device package may also be connected to a remote computer on the network through a network such as the Internet to run. That is, the computing device can be connected to the network 1208 through the communication interface 1103 connected to the system bus 1100, or in other words, the communication interface 1103 can also be used to connect to other types of networks or remote computer systems (not shown).
  • the embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores computer instructions, and when the computer instructions run on the computer, the computer executes the aforementioned out-of-order marking method A step of.
  • the embodiments of the present application also provide a chip system, which includes a processor and may also include a memory, for implementing the steps of the aforementioned file processing method.
  • the chip system can be composed of chips, or can include chips and other discrete devices.
  • the various aspects of the file processing method provided in the embodiments of the present application can also be implemented in the form of a program product, which includes program code.
  • program product runs on a computer
  • the program The code is used to make the computer execute the steps in the file processing method according to various exemplary embodiments of the present application described above.
  • the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program codes.
  • a computer-usable storage media including but not limited to disk storage, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Document Processing Apparatus (AREA)

Abstract

一种文件处理方法、装置及计算机设备,涉及金融科技(Fintech)领域,用于为基金文件提供一种新的处理方式,提高处理基金文件的准确性。该方法包括:读取待转换的基金文件中的交易记录数据,按照EXCEL文件的排版格式,将交易记录数据中每条子交易数据的N个字段划分为N列以及根据对应每列的字段的字段名设置该列的列标识进行EXCEL排版,以获得针对交易记录数据的第一排版结果;根据第一排版结果,生成与基金文件对应的EXCEL文件。通过对每条子交易记录数据中的不同字段进行划分,可以便于用户清楚的知晓每条子交易记录数据中的字段内容,从而可以提高处理基金文件的准确性。

Description

一种文件处理方法、装置及计算机设备
相关申请的交叉引用
本申请要求在2019年06月27日提交中国专利局、申请号为201910569703.9、申请名称为“一种文件处理方法、装置及计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及金融科技(Fintech)技术领域,特别涉及一种文件处理方法、装置及计算机设备。
背景技术
随着科技的不断发展,越来越多的技术应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变。在现有的金融科技领域中,基金文件在进行数据记录时,均需满足中央数据交换平台开放式基金业务数据交换协议,即基金文件中的数据文件中每条交易数据都为定长报文,包括多个字段参数。
然而,若是需要对数据文件进行查看或修改等处理,现有技术仅依靠人工来定位查看某个字段对应的值是多少或者对该字段的值进行修改,这种方式不仅会使得处理效率低,而且还很容易出错。
可见,现有技术中对基金文件处理时存在处理效率较低、准确性较差的问题。
发明内容
本发明提供一种文件处理方法,装置及计算机设备,用于为基金文件提供一种新的处理方式,以提高处理基金文件的准确性和提高对文件处理的效率。
第一方面,本申请提供一种文件处理方法,该方法包括:
确定待转换的基金文件,读取所述基金文件中的交易记录数据,其中,所述交易记录数据包括按照预定顺序拼接组成的M条子交易数据,所述M条子交易数据中的每条子交易数据均包括N个字段的字段数据,所述N个字段中的每个字段的字段名各不相同,M和N均为大于或等于1的整数;按照EXCEL文件的排版格式,将每条子交易数据的N个字段划分为N列以及根据对应每列的字段的字段名设置该列的列标识进行EXCEL排版,以获得针对所述交易记录数据的第一排版结果,根据所述第一排版结果,生成与所述基金文件对应的EXCEL文件。
上述技术方案中,针对于基金文件中按照M行N个字段拼接组成的交易记录数据, 将每条子交易数据的N个字段划分为N列,并根据对应每列的字段的字段名设置该列的列标识进行EXCEL排版,以实现对每条子交易记录数据中不同字段的划分,可以便于用户清楚的知晓每条子交易记录数据中的字段内容,提高处理基金文件的准确性。
一种可选实施方式中,所述方法还包括:以不同于第一语种的第二语种对所述N个字段的字段名进行翻译,以得到以所述第二语种表示的N个字段标识,其中,所述第一排版结果中的所述N个字段的字段名以所述第一语种表示;按照用于表示同一字段名的字段标识与列标识对应设置的方式,将以所述第二语种表示的N个字段标识分别与所述第一排版结果中的N个列标识对应设置为一列进行排版,以获得针对所述N个字段的第二排版结果;相应地,根据所述第一排版结果,生成与所述基金文件对应的EXCEL文件,包括:根据所述第一排版结果和所述第二排版结果,生成与所述基金文件对应的EXCEL文件。
上述技术方案中,通过以不同于第一语种的第二语种对N个字段的字段名进行翻译,并将第二语种表示的N个字段标识分别与所述第一排版结果中的N个列标识对应设置为一列进行排版,这样,可以使得习惯不同语种阅读的用户均可以直接的获取到字段名表示的含义,从而可以减少用户的操作,提升用户体验。
一种可选实施方式中,获得针对所述N子段的第二排版结果,包括:根据所述N个字段中的每个字段所占据的位数,确定每个字段对应的位数标识,将每个字段的位数标识与该字段对应的字段标识或列标识对应排版,以获得字段位数排版结果,根据所述字段位数排版结果,更新所述第二排版结果。
上述技术方案中,通过确定每个字段对应的位数标识,然后将每个字段的位数标识与该字段对应的字段标识或列标识对应排版,以获得字段位数排版结果,也就是说,用户可以看到显示有N个字段的位数标识的EXCEL文件,从而当用户需要去查看字段位数是否符合协议规定时,可以直接根据显示的N个字段的位数标识确定,从而能够提高处理基金文件的处理效率。
一种可选实施方式中,所述方法还包括:确定所述基金文件中的固定文件描述数据,其中,所述固定文件描述数据包括以所述基金文件所采用的金融数据协议所表示的所有基金文件中包括的类型相同的数据;根据所述固定文件描述数据在所述基金文件中的排版格式,对所述固定文件描述数据进行EXCEL排版,以获得针对所述固定文件描述数据的第三排版结果;相应地,根据所述第一排版结果,生成与所述基金文件对应的EXCEL文件,包括:根据所述第一排版结果和所述第三排版结果,生成与所述基金文件对应的EXCEL文件。
上述技术方案中,将基金文件中的固定文件描述数据进行排版,然后与第一排版结果组合生成与基金文件对应的EXCEL文件,这样的话,生成的EXCEL文件是与基金文件对应的,用户可以通过该EXCEL文件准确的基金文件所有的数据内容,提升用户的使用体 验。
一种可选实施方式中,在生成与所述基金文件对应的EXCEL文件之后,还接收针对所述EXCEL文件的编辑操作,根据所述编辑操作,确定所述EXCEL文件中被编辑的数据对所述编辑操作的响应结果,根据所述被编辑的数据的数据属性对所述响应结果进行合法性校验;其中,所述数据属性包括数据所占位数和/或数据留存级别;若检验未通过,则撤销对所述编辑操作的响应。
上述技术方案中,可以接收针对EXCEL文件的编辑操作(例如修改操作),然后根据编辑操作,确定EXCEL文件中被编辑的数据对编辑操作的响应结果,从而根据被编辑的数据的数据属性对响应结果进行合法性校验;也就是说,在用户对EXCEL文件进行编辑时,可以对用户编辑数据进行校验,以提高处理文件的准确性。当校验未通过时,可以撤销对编辑操作的响应,即在编辑操作时对用户的不合法的编辑进行阻止,以确定被编辑的数据的合法性。
一种可选实施方式中,所述方法还包括:确定待转换的EXCEL文件,其中,所述待转换的EXCEL文件是根据基金文件转换得到的EXCEL文件;按照所述基金文件的排版格式,对所述待转换的EXCEL文件进行排版转换,以获得第四排版结果,根据所述第四排版结果,生成与所述待转换的EXCEL文件对应的基金文件。
上述技术方案中,还可以将根据基金文件转换得到的EXCEL文件进行处理,即按照基金文件的排版格式,对待转换的EXCEL文件进行排版转换,然后生成与待转换的EXCEL文件对应的基金文件。也就是说,可以将转换得到的EXCEL文件再转换到基金文件,便于用户在EXCEL文件对基金文件的交易记录数据进行处理,然后在将处理后的EXCEL文件转换为基金文件,以提升用户体验。
一种可选实施方式中,所述方法还包括:在由所述待转换的EXCEL文件转换为对应的基金文件的过程中,对关键数据进行合法性检验;其中,所述关键数据包括字段长度、参数个数、数据行数中的至少一种;在所述关键数据进行合法性检验通过时,则继续进行由所述待转换的EXCEL文件到对应的基金文件的转换。
上述技术方案中,还可以在由待转换的EXCEL文件转换为对应的基金文件的过程中,对关键数据进行合法性检验,从而可以进一步保证对EXCEL文件转换成的基金文件的合法性,提高对文件处理的准确性。
第二方面,本申请提供一种文件处理装置,所述装置包括:
第一确定模块,用于确定待转换的基金文件;
读取模块,用于读取所述基金文件中的交易记录数据,其中,所述交易记录数据包括按照预定顺序拼接组成的M条子交易数据,所述M条子交易数据中的每条子交易数据均包括N个字段的字段数据,所述N个字段中的每个字段的字段名各不相同,M和N均为 大于或等于1的整数;
第一排版模块,用于按照EXCEL文件的排版格式,将每条子交易数据的N个字段划分为N列以及根据对应每列的字段的字段名设置该列的列标识进行EXCEL排版,以获得针对所述交易记录数据的第一排版结果;
第一处理模块,用于根据所述第一排版结果,生成与所述基金文件对应的EXCEL文件。
一种可选实施方式中,所述装置还包括第二确定模块,所述第二确定模块用于:以不同于第一语种的第二语种对所述N个字段的字段名进行翻译,以得到以所述第二语种表示的N个字段标识,其中,所述第一排版结果中的所述N个字段的字段名以所述第一语种表示;相应地,所述装置还包括第二排版模块,所述第二排版模块用于:按照用于表示同一字段名的字段标识与列标识对应设置的方式,将以所述第二语种表示的N个字段标识分别与所述第一排版结果中的N个列标识对应设置为一列进行排版,以获得针对所述N个字段的第二排版结果;所述装置还包括第二处理模块,所述第二处理模块用于:根据所述第一排版结果和所述第二排版结果,生成与所述基金文件对应的EXCEL文件。
一种可选实施方式中,第二确定模块还用于:根据所述N个字段中的每个字段所占据的位数,确定每个字段对应的位数标识;相应地,第二排版模块,用于:将每个字段的位数标识与该字段对应的字段标识或列标识对应排版,以获得字段位数排版结果,根据所述字段位数排版结果,更新所述第二排版结果。
一种可选实施方式中,所述装置还包括第三确定模块,所述第三确定模块用于:确定所述基金文件中的固定文件描述数据,其中,所述固定文件描述数据包括以所述基金文件所采用的金融数据协议所表示的所有基金文件中包括的类型相同的数据;相应地,所述装置还包括第三排版模块,所述第三排版模块用于:根据所述固定文件描述数据在所述基金文件中的排版格式,对所述固定文件描述数据进行EXCEL排版,以获得针对所述固定文件描述数据的第三排版结果;所述装置还包括第三处理模块,所述第三处理模块用于:根据所述第一排版结果和所述第三排版结果,生成与所述基金文件对应的EXCEL文件。
一种可选实施方式中,所述装置还包括校验模块,在生成与所述基金文件对应的EXCEL文件之后,所述校验模块用于:接收针对所述EXCEL文件的编辑操作,根据所述编辑操作,确定所述EXCEL文件中被编辑的数据对所述编辑操作的响应结果,根据所述被编辑的数据的数据属性对所述响应结果进行合法性校验;其中,所述数据属性包括数据所占位数和/或数据留存级别;若检验未通过,则撤销对所述编辑操作的响应。
一种可选的实施方式中,所述装置还包括转换模块,所述转换模块用于:确定待转换的EXCEL文件,其中,所述待转换的EXCEL文件是根据基金文件转换得到的EXCEL文件;按照所述基金文件的排版格式,对所述待转换的EXCEL文件进行排版转换,以获得 第四排版结果,根据所述第四排版结果,生成与所述待转换的EXCEL文件对应的基金文件。
一种可选实施方式中,所述校验模块还用于:在由所述待转换的EXCEL文件转换为对应的基金文件的过程中,对关键数据进行合法性检验;其中,所述关键数据包括字段长度、参数个数、数据行数中的至少一种;相应地,所述转换模块还用于:在所述关键数据进行合法性检验通过时,则继续进行由所述待转换的EXCEL文件到对应的基金文件的转换。
上述第二方面及第二方面各个实施例的有益效果,可以参考上述第一方面及第一方面各个实施例的有益效果,这里不再赘述。
第三方面,本申请提供一种计算机设备,所述计算机设备包括:
存储器,用于存储程序指令;
处理器,用于调用所述存储器中存储的程序指令,按照获得的程序指令执行第一方面中的任一方法包括的步骤。
第四方面,本申请提供一种存储介质,该存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行第一方面中的任一方法包括的步骤。
本申请的这些方面或其他方面在以下实施例的描述中会更加简明易懂。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1为本申请实施例中的基金文件中数据文件内容的示意图;
图2为本申请实施例中的基金文件中数据文件中数据内容的示意图;
图3为本申请实施例中的修改器的界面示意图;
图4为本申请实施例中的选择打开ZIP文件的界面示意图;
图5为本申请实施例中的EXCLE文件的示意图;
图6为本申请实施例中的将EXCLE文件转换基金文件的方法流程图;
图7为本申请实施例中的文件处理方法的流程图;
图8为本申请实施例中的基金文件中数据文件的数据内容排列方式示意图;
图9为本申请实施例中的基金文件中数据文件的数据内容排列方式另一示意图;
图10为本申请实施例中的文件处理装置的结构框图;
图11为本申请实施例中的计算机设备的结构示意图;
图12为本申请实施例中的计算机设备的另一结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚明白,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
为了便于理解本申请实施例提供的技术方案,这里先对本申请实施例使用的部分用语进行解释:
1、中央数据交换平台开放式基金业务数据交换协议:该协议规定了资产管理产品(包括但不限于公募基金、非公募基金、集合资产管理计划等,文中简称“基金”)相关业务中机构之间进行数据交换时所采用的数据格式、数据定义和数据内容。
2、基金文件:遵守中央数据交换平台开放式基金业务数据交换协议规范的文件简称基金文件,包括数据索引文件与数据文件。其中,数据索引文件的命名规则为“OFI/OFJ/OFS/OFK/OFC”+“_”+文件创建人代码+“_”+文件接收人代码+“_”+日期(YYYYMMDD)+“.TXT”,且其内容为数据文件列表,数据文件的命名规则为:“OFD”+“_”+文件创建人代码+“_”+文件接收人代码+“_”+日期(YYYYMMDD)+“_”+两位文件类型编码+“.TXT”内容为机构之间交换的数据内容。
3、图形用户界面(Graphical User Interface,GUI):是指采用图形方式显示的计算机操作用户界面。图形用户界面是一种人与计算机通信的界面显示格式,允许用户使用鼠标等输入设备操纵屏幕上的图标或菜单选项,以选择命令、调用文件、启动程序或执行其它一些日常任务。
4、Tkinter接口:Python的标准Tk GUI工具包的接口。
另外,本申请实施例中,“多个”可以表示至少两个,例如可以是两个、三个或者更多个,本申请实施例不做限制。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,在不做特别说明的情况下,一般表示前后关联对象是一种“或”的关系。
为了更好地理解本申请实施例提供的技术方案,下面先介绍本申请实施例的技术背景。
在现有技术中,请参见图1,图1为现有的交易基金文件中的数据文件示意图,可知, 基金文件中的数据文件可以由如下内容组成:
1行文件开始标识:即图1中的OFDCFDAT;
8行固定字段:固定字段均包括中央数据交换平台开放式基金业务数据交换协议版本号、信息创建人代码、信息接收人代码、数据日期、文件传输次序标志、文件类型、发送人、接收人,即图1中的21、03、918、20170106、999、04、03、918;
1行字段个数:即图1中的116;
n行字段名:即图1中示出的App Sheet Serial No、Transaction Cfm Date、Currency Type、Confirmed Vol、Confirmed Amount、Fund Code、Large Rede mption Flag(图1中仅示出8个字段名);
1行数据内容行数(m):值为8时,m行数据内容即8行数据内容(图1中仅示出部分数据内容);
1行文件结束标识:即图1中示出的OFDCFEND。
请参见图2,图2为图1中所示的交易基金文件中的数据文件的数据内容的一种示例图,从图中可以看出第一数据内容和第二数据内容均可以包括多个字符。在这种情况下,若采用现有技术中的方案,则仅仅依靠人工查看或者去对文件进行处理,很容易出现错误。
鉴于此,本申请的发明人开发了一种具备将基金文件转换成EXCEL文件的功能的修改器,该修改器可以应用于计算机设备中。其中,该修改器使用python开发语言以及使用Tkinter接口,使用Pyinstaller打包成exe可执行文件,这样的话,使用者可以无须安装python等开发集成环境,能够在极大程度上方便用户的使用。
请参见图3,为本申请中修改器的GUI界面,该界面中包括工具日志输出区。具体的,工具日志输出区包括用户使用修改器的时间、以及用户进行的操作的具体内容,使得用户能够快速的查看对基金文件的处理时间和具体的处理过程,以便用户可以清楚的知晓对基金文件的工作内容的处理过程。进一步地,工具日志输出区还包括选择文件区域以及功能区域,例如图3中所示的生成文件、打开xls文件、打开zip文件以及切换处理文件的功能。
在本申请实施例中,针对于前述修改器GUI界面中显示的打开xls文件功能和打开zip文件功能,当用户使用这两个功能时,可以直接获得相应的文件。即前述的两个功能使得用户可以不用自己去文件管理器双击打开已经生成好的EXCLE文件或基金文件,而是通过点击修改器提供的功能性按钮就可以直接打开对应的文件,从而能够减少用户的操作步骤,提高对基金文件的处理效率。
在具体实施过程中,当用户选择打开ZIP文件功能时,请参见图4,在修改器的GUI界面可以显示打开的基金文件中的多个数据文件和数据索引文件,然后用户可以选择打开其中的一个数据文件。例如,如图4所示,若选择打开OFD_03_918_20170106_04.TXT这个数据文件,则可以看到该数据文件的内容,并且可以看到:数据内容部分由于字段与字 段之间是拼接的方式显示的,导致用户难以阅读和修改。当用户对前述的选择打开基金文件的OFD_03_918_20170106_04.TXT数据文件进行生成文件操作后,请参见图5,图5为将基金文件中的数据文件FD_03_918_20170106_04.TXT转换成EXCLE文件的GUI界面图。
在本申请实施例中,针对于前述修改器GUI界面中显示的切换处理文件功能,当用户使用该功能时,用户可以轻松、快捷地切换“基金文件转成excel文件”和“excel文件转成基金文件”这两个功能,即可以减少用户的操作步骤,节省时间,从而能够提高对基金文件的处理效率。
进一步地,在具体的实施过程中,使用修改器对基金文件进行处理的流程请参见图6,具体步骤如下:
步骤601:获得针对待处理基金文件的选择操作。
步骤602:根据选择操作,将待处理基金文件转换EXLCE文件。
步骤603:获得打开xls文件的处理操作,并根据处理操作显示生成的EXLCE文件。
步骤604:获得针对显示的EXLCE文件的修改或查看操作,并根据修改或查看操作对EXLCE文件处理,以获得目标EXLCE文件。
步骤605:获得针对目标EXLCE文件的转换操作,将目标EXLCE文件转换为目标基金文件。
步骤606:获得针对目标基金文件的检查操作,以检查生成的基金文件。
如前所述,用户可以使用修改器将基金文件转换成EXLCE文件,然后使用利用EXLCE的提供的搜索,隐藏等功能,可以快速定位到基金文件中数据文件的某个字段,然后对该字段进行检查或修改等处理,还可以隐藏不必要的字段。进一步地,在修改EXLCE文件中某个字段的值后,可再次使用修改器的切换处理文件功能将EXLCE文件转化为基金文件。
下面详细介绍本方案中将待处理基金文件转换EXLCE文件为的实施原理部分,请参见图7,图7为本申请实施例中的文件处理方法的流程图。
步骤701:确定待转换的基金文件。
步骤702:读取基金文件中的交易记录数据。其中,交易记录数据包括按照预定顺序拼接组成的M条子交易数据。
本申请实施例中,M条子交易数据中的每条子交易数据均包括N个字段的字段数据,N个字段中的每个字段的字段名各不相同,M和N均为大于或等于1的整数。
在本申请实施例中,可以通过前述的修改器来执行本申请提出的方法,具体的,可以是用户点击前述的基金文件来确定待转换的基金文件。
当修改器获得针对基金文件中的数据文件进行操作的指令时,修改器可以获得数据文件中的数据内容。在本申请实施例中,为了便于描述,将数据文件中的数据内容称作交易 记录数据,其中,交易记录数据包括按照预定顺序拼接组成的M条子交易数据,M条子交易数据中的每条子交易数据均包括N个字段的字段数据,N个字段中的每个字段的字段名各不相同。
例如,如图8所示,交易记录数据共包括3条子交易记录数据,分别为第一子交易记录数据、第二子交易记录数据和第三子交易记录数据,且第一子交易记录数据、第二子交易记录数据和第三子交易记录数据分别包括字段1、字段2、字段3、字段4、字段5、字段6、字段7、字段8。请继续参看图8,第一子交易记录数据是由字段1、字段2、字段3、字段4、字段5、字段6、字段7以及字段8分别对应的数据拼接形成。进一步地,交易记录数据还可以是由第一子交易记录数据、第二子交易记录数据以及第三子交易记录数据拼接形成。另外,图8中的第一子交易记录数据、第一子交易记录数据、第二子交易记录数据以及第三子交易可以理解为附图1中的数据内容。
在实际应用中,每条子交易记录数据之间可以包括有预定标识。其中,预定标识用于将子交易记录数据之间的数据隔开。具体的,预定标识可以为空格、还可以为*、当然,也可以为#,本申请实施例中不做限定。
例如,如图9所示,预定标识为空格,交易记录数据共包括3条子交易记录数据,分别为第一子交易记录数据、第二子交易记录数据和第三子交易记录数据,且第一子交易记录数据、第二子交易记录数据和第三子交易记录数据分别包括字段1、字段2、字段3、字段4、字段5。请继续参看图9,第一子交易记录数据还可以是由字段1、字段2、字段3、字段4、以及字段5分别对应的数据拼接形成,第二子交易记录数据和第三子交易记录数据也是由字段1、字段2、字段3、字段4、以及字段5分别对应的数据拼接形成。第一子交易记录数据和第二子交易记录数据中间包括空格,第二子交易记录数据和第三子交易记录数据之间包括空格。这样,可以清楚的分清第一子交易记录数据、第二子交易记录数据和第三子交易记录数据。
步骤703:按照EXCEL文件的排版格式,将每条子交易数据的N个字段划分为N列以及根据对应每列的字段的字段名设置该列的列标识进行EXCEL排版,以获得针对所述交易记录数据的第一排版结果;
在本申请实施例中,当读取基金文件中的交易记录数据后,可以按照EXCEL文件的排版格式,将每条子交易数据的N个字段划分为N列以及根据对应每列的字段的字段名设置该列的列标识进行EXCEL排版。也就是说,将每条子交易数据由原来拼接排列的N个字段,每个字段占用一列,每条子交易数据占用一行的方式对交易记录数据进行排版。
在具体的实施过程中,以如图4所示的交易记录数据为例,按照EXCEL文件的排版格式,即将交易记录数据划分为行和列来对交易记录数据进行排版。具体的,可以根据N个字段中每个字段的字符长度限制,对每条子交易记录数据进行列的划分,从而可以获得 排版结果。也就是说,通过行和列的划分方式,使得交易记录数据的显示比较清楚,从而用户可以准确的知晓每个字段的内容,从而能够增强对基金文件的处理的准确性。
步骤704:根据所述第一排版结果,生成与所述基金文件对应的EXCEL文件。
在本申请实施例中,将每条子交易数据的N个字段划分为N列,根据对应每列的字段的字段名设置该列的列标识,以进行EXCEL排版获得第一排版结果,来生成与基金文件对应的EXCEL文件。也就是说,将子交易记录数据中均包括的字段名和经过排版的子交易记录数据N列数据对应排列,然后按照前述的方式对交易记录数据进行处理,从而能生成与基金文件对应的EXCEL文件。
具体的请参见图5,EXCEL文件中的第13行显示的是字段名,14-18行显示的为基金文件的交易记录数据,这样的显示方式,使得用户可以清楚确定字段的内容,从而可以准确的对字段内容进行查看和/或修改处理,提升了对基金文件的处理效率。
具体的,在一种可能的实施方式中,还可以确定与目标基金文件对应的目标配置文件,根据N个字段的字段名,从目标配置文件中确定出与每个字段的字段名,然后以不同于第一语种的第二语种对N个字段的字段名进行翻译,以得到以第二语种表示的N个字段标识。其中,第一排版结果中的N个字段的字段名以第一语种表示。例如,字段名的第一语种为英文,第二语种可以为中文、德语、法语、葡萄牙语等语种,即第二语种表示的N个字段标识可以为中文的字段标识,也可以为法语的字段标识。
然后,按照用于表示同一字段名的字段标识与列标识对应设置的方式,将以第二语种表示的N个字段标识分别与第一排版结果中的N个列标识对应设置为一列进行排版,从而获得针对N个字段的第二排版结果。根据第一排版结果和第二排版结果,能够生成与基金文件对应的EXCEL文件。
例如,请参见图5所示,以第二语种表示的字段标识为中文进行转换。这样的话,可以使得习惯使用不同语言的用户都可以清楚的知晓字段名,提升用户使用体验。
具体的,在一种可能的实施方式中,还可以根据N个字段中的每个字段所占据的位数,确定每个字段对应的位数标识,然后将每个字段的位数标识与该字段对应的字段标识或列标识对应排版,从而获得字段位数排版结果,根据字段位数排版结果,更新第二排版结果。
请继续参照图5,其中,每个字段的字段标识和每个字段的数据位数处于一列,这样的话,可以便于用户在进行修改时可以针对性的修改,尽量降低出现修改位数和协议要求不一致的问题。
具体的,在一种可能的实施方式中,确定基金文件中的固定文件描述数据。其中,固定文件描述数据包括以所述基金文件所采用的金融数据协议所表示的所有基金文件中包括的类型相同的数据。具体的,固定文件描述数据可以包括文件标识符、固定记录、字段名以及文件结束标识符。然后,可以根据固定文件描述数据在基金文件中的排版格式,对 固定文件描述数据进行EXCEL排版,获得针对固定文件描述数据的第三排版结果。根据第一排版结果和第三排版结果,生成与基金文件对应的EXCEL文件。当然,在具体的实施过程中,还可以根据第一排版结果、第二排版结果和第三排版结果,生成与基金文件对应的EXCEL文件。
这样的方式,使得生成的EXCEL文件能够与基金文件对应,从而用户可以通过该EXCEL文件准确得到基金文件所有的数据内容,提升用户的使用体验。
具体的,在一种可能的实施方式中,当用户希望对基金文件进行修改或查看处理时,用户可以在生成与基金文件对应的EXCEL文件之后,在EXCEL文件中进行数据修改操作,即计算机设备可以接收针对EXCEL文件的编辑操作(例如修改),然后根据编辑操作,确定EXCEL文件中被编辑的数据对编辑操作的响应结果。
进一步地,在确定EXCEL文件中被编辑的数据对编辑操作的响应结果之后,可以根据被编辑的数据的数据属性对所响应结果进行合法性校验。其中,数据属性包括数据所占位数和/或数据留存级别,当检验未通过时,则可以撤销对编辑操作的响应。
在具体实施过程中,当用户对EXCEL文件中的交易记录数据中某个字段数据进行修改操作时,计算机设备在确定EXCEL文件中被编辑的数据对编辑操作的响应结果之后,可以根据数据所占位数对该字段数据进行校验,当被编辑的字段数据位数与该字段数据所占位数不相同时(例如,被编辑的字段数据位数大于该字段所占位数,或者被编辑的字段数据位数小于该字段所占位数),则可以确认校验未通过,从而撤销对编辑操作的响应,即用户在GUI界面中发现未显示修改的字段数据。
在具体的实施过程中,数据留存级别用于表征该数据在进行文件转换时可以删除或者不可以删除。具体的,考虑到基金文件中的固定文件描述数据为固定不变的数据,因此可以将基金文件中的固定文件描述数据确定为留存级别较低(可以删除的数据),交易记录数据确定为留存级别较高(不可以删除的数据)。
当被编辑的数据的数据属性为固定文件描述数据时,即确认合法性校验通过。当被编辑的数据的数据属性为交易记录数据时,若确定被编辑的数据的字段个数与该数据所占字段个数不同,例如被编辑的数据的字段个数大于该所数据所占字段个数,合法性校验未通过,并可以撤销对编辑操作的响应。这样的话,可以准确的确保交易记录数据的合法性。
在本申请实施例中,在用户对EXCEL文件进行编辑时,可以对用户的编辑数据进行校验,以提高处理文件的准确性。当校验未通过时,可以撤销对编辑操作的响应,从而在编辑操作时对用户的不合法的编辑进行阻止,以确定被编辑的数据的合法性。
具体的,在一种可能的实施方式中,还可以将根据基金文件转换得到的EXCEL文件转换为基金文件。具体的,可以确定待转换的EXCEL文件,其中,待转换的EXCEL文件是根据基金文件转换得到的EXCEL文件。然后按照基金文件的排版格式,对待转换的 EXCEL文件进行排版转换,可以获得第四排版结果,从而根据第四排版结果,生成与待转换的EXCEL文件对应的基金文件。
这样的方式,可以将转换得到的EXCEL文件再转换到基金文件,便于用户在EXCEL文件对基金文件的交易记录数据进行处理,然后在将处理后的EXCEL文件转换为基金文件,以提升用户体验。
具体的,在一种可能的实施方式中,还可以在待转换的EXCEL文件转换为对应的基金文件的过程中,对关键数据进行合法性检验。其中,关键数据包括字段长度、参数个数、数据行数中的至少一种。在关键数据进行合法性检验通过时,可以继续进行由待转换的EXCEL文件到对应的基金文件的转换。
在本申请实施例中,在待转换的EXCEL文件转换为对应的基金文件的过程中,对关键数据进行合法性检验,从而可以进一步保证对EXCEL文件转换成的基金文件的合法性,提高对文件处理的准确性。
基于同一发明构思,本申请实施例提供一种文件处理装置。该文件处理装置可以是硬件结构、软件模块、或硬件结构加软件模块。该文件处理装置可以由芯片***实现,芯片***可以由芯片构成,也可以包含芯片和其他分立器件。请参见图10所示,本申请实施例中的文件处理装置包括:
第一确定模块1001,用于确定待转换的基金文件;
读取模块1002,用于读取所述基金文件中的交易记录数据,其中,所述交易记录数据包括按照预定顺序拼接组成的M条子交易数据,所述M条子交易数据中的每条子交易数据均包括N个字段的字段数据,所述N个字段中的每个字段的字段名各不相同,M和N均为大于或等于1的整数;
第一排版模块1003,用于按照EXCEL文件的排版格式,将每条子交易数据的N个字段划分为N列以及根据对应每列的字段的字段名设置该列的列标识进行EXCEL排版,以获得针对所述交易记录数据的第一排版结果;
第一处理模块1004,用于根据所述第一排版结果,生成与所述基金文件对应的EXCEL文件。
一种可选实施方式中,文件处理装置还包括第二确定模块,第二确定模块用于:
以不同于第一语种的第二语种对N个字段的字段名进行翻译,以得到以第二语种表示的N个字段标识,其中,第一排版结果中的N个字段的字段名以第一语种表示;
文件处理装置还包括第二排版模块,第二排版模块用于:按照用于表示同一字段名的字段标识与列标识对应设置的方式,将以第二语种表示的N个字段标识分别与第一排版结果中的N个列标识对应设置为一列进行排版,以获得针对N个字段的第二排版结果;
文件处理装置还包括第二处理模块,第二处理模块用于:根据第一排版结果和第二排 版结果,生成与基金文件对应的EXCEL文件。
一种可选实施方式中,第二确定模块,还用于:
根据N个字段中的每个字段所占据的位数,确定每个字段对应的位数标识;
第二排版模块,用于:将每个字段的位数标识与该字段对应的字段标识或列标识对应排版,以获得字段位数排版结果;
根据字段位数排版结果,更新第二排版结果。
一种可选实施方式中,文件处理装置还包括第三确定模块,第三确定模块用于:
确定基金文件中的固定文件描述数据,其中,固定文件描述数据包括以基金文件所采用的金融数据协议所表示的所有基金文件中包括的类型相同的数据;
文件处理装置还包括第三排版模块,第三排版模块用于:根据固定文件描述数据在基金文件中的排版格式,对固定文件描述数据进行EXCEL排版,以获得针对固定文件描述数据的第三排版结果;
文件处理装置还包括第三处理模块,第三处理模块用于:根据第一排版结果和第三排版结果,生成与基金文件对应的EXCEL文件。
一种可选实施方式中,文件处理装置还包括校验模块,在生成与基金文件对应的EXCEL文件之后,校验模块用于:
接收针对EXCEL文件的编辑操作;
根据编辑操作,确定EXCEL文件中被编辑的数据对编辑操作的响应结果;
根据被编辑的数据的数据属性对响应结果进行合法性校验;其中,数据属性包括数据所占位数和/或数据留存级别;
若检验未通过,则撤销对编辑操作的响应。
一种可选的实施方式中,文件处理装置还包括转换模块,转换模块用于:
确定待转换的EXCEL文件,其中,待转换的EXCEL文件是根据基金文件转换得到的EXCEL文件;
按照基金文件的排版格式,对待转换的EXCEL文件进行排版转换,以获得第四排版结果;
根据第四排版结果,生成与待转换的EXCEL文件对应的基金文件。
一种可选实施方式中,校验模块,还用于:
在由待转换的EXCEL文件转换为对应的基金文件的过程中,对关键数据进行合法性检验;其中,关键数据包括字段长度、参数个数、数据行数中的至少一种;
转换模块,还用于:
在关键数据进行合法性检验通过时,则继续进行由待转换的EXCEL文件到对应的基金文件的转换。
本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,另外,在本申请各个实施例中的各功能模块可以集成在一个处理器中,也可以是单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
基于同一发明构思,本申请实施例还提供一种计算机设备。如图11所示,本申请实施例中的计算机设备包括至少一个处理器1101,以及与至少一个处理器1101连接的存储器1102和通信接口1103,本申请实施例中不限定处理器1101与存储器1102之间的具体连接介质,图11中是以处理器1101和存储器1102之间通过总线1100连接为例,总线1100在图11中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。总线1100可以分为地址总线、数据总线、控制总线等,为便于表示,图11中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
在本申请实施例中,存储器1102存储有可被至少一个处理器1101执行的指令,至少一个处理器1101通过执行存储器1102存储的指令,可以执行前述的故障检测方法中所包括的步骤。
其中,处理器1101是计算机设备的控制中心,可以利用各种接口和线路连接整个故障检测设备的各个部分,通过运行或执行存储在存储器1102内的指令以及调用存储在存储器1102内的数据,计算设备的各种功能和处理数据,从而对计算设备进行整体监控。可选的,处理器1101可包括一个或多个处理单元,处理器1101可集成应用处理器和调制解调处理器,其中,处理器1101主要处理操作***、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1101中。在一些实施例中,处理器1101和存储器1102可以在同一芯片上实现,在一些实施例中,它们也可以在独立的芯片上分别实现。
处理器1101可以是通用处理器,例如中央处理器(CPU)、数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本申请实施例中公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。
存储器1102作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块。存储器1102可以包括至少一种类型的存储介质,例如可以包括闪存、硬盘、多媒体卡、卡型存储器、随机访问存储器(Random Access Memory,RAM)、静态随机访问存储器(Static Random Access Memory,SRAM)、可编程只读存储器(Programmable Read Only Memory,PROM)、只读存储器(Read Only Memory,ROM)、带电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory, EEPROM)、磁性存储器、磁盘、光盘等等。存储器1102是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。本申请实施例中的存储器1102还可以是电路或者其它任意能够实现存储功能的装置,用于存储程序指令和/或数据。
通信接口1103是能够用于进行通信的传输接口,可以通过通信接口1103接收数据或者发送数据。
参见图12所示的计算机设备的进一步地的结构示意图,该计算机设备还包括帮助计算机设备内的各个器件之间传输信息的基本输入/输出***(I/O***)1201、用于存储操作***1202、应用程序1203和其他程序模块1204的大容量存储设备1205。
基本输入/输出***1201包括有用于显示信息的显示器1206和用于用户输入信息的诸如鼠标、键盘之类的输入设备1207。其中显示器1206和输入设备1207都通过连接到***总线1100的基本输入/输出***1201连接到处理器1101。所述基本输入/输出***1201还可以包括输入输出控制器以用于接收和处理来自键盘、鼠标、或电子触控笔等多个其他设备的输入。类似地,输入输出控制器还提供输出到显示屏、打印机或其他类型的输出设备。
所述大容量存储设备1205通过连接到***总线1100的大容量存储控制器(未示出)连接到处理器1101。所述大容量存储设备1205及其相关联的计算机可读介质为该服务器包提供非易失性存储。也就是说,大容量存储设备1205可以包括诸如硬盘或者CD-ROM驱动器之类的计算机可读介质(未示出)。
根据本申请的各种实施例,该计算设备包还可以通过诸如因特网等网络连接到网络上的远程计算机运行。也即该计算设备可以通过连接在所述***总线1100上的通信接口1103连接到网络1208,或者说,也可以使用通信接口1103来连接到其他类型的网络或远程计算机***(未示出)。
基于同一发明构思,本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质存储有计算机指令,当该计算机指令在计算机上运行时,使得计算机执行如前述的故序标注方法的步骤。
基于同一发明构思,本申请实施例还提供一种芯片***,该芯片***包括处理器,还可以包括存储器,用于实现如前述的文件处理方法的步骤。该芯片***可以由芯片构成,也可以包含芯片和其他分立器件。
在一些可能的实施方式中,本申请实施例提供的文件处理方法的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在计算机上运行时,所述程序代码用于使所述计算机执行前文述描述的根据本申请各种示例性实施方式的文件处理方法中的步骤。
本领域内的技术人员应明白,本申请的实施例可提供为方法、***、或计算机程序产 品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (10)

  1. 一种文件处理方法,其特征在于,所述方法包括:
    确定待转换的基金文件;
    读取所述基金文件中的交易记录数据,其中,所述交易记录数据包括按照预定顺序拼接组成的M条子交易数据,所述M条子交易数据中的每条子交易数据均包括N个字段的字段数据,所述N个字段中的每个字段的字段名各不相同,M和N均为大于或等于1的整数;
    按照EXCEL文件的排版格式,将每条子交易数据的N个字段划分为N列以及根据对应每列的字段的字段名设置该列的列标识进行EXCEL排版,以获得针对所述交易记录数据的第一排版结果;
    根据所述第一排版结果,生成与所述基金文件对应的EXCEL文件。
  2. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    以不同于第一语种的第二语种对所述N个字段的字段名进行翻译,以得到以所述第二语种表示的N个字段标识,其中,所述第一排版结果中的所述N个字段的字段名以所述第一语种表示;
    按照用于表示同一字段名的字段标识与列标识对应设置的方式,将以所述第二语种表示的N个字段标识分别与所述第一排版结果中的N个列标识对应设置为一列进行排版,以获得针对所述N个字段的第二排版结果;
    则,根据所述第一排版结果,生成与所述基金文件对应的EXCEL文件,包括:
    根据所述第一排版结果和所述第二排版结果,生成与所述基金文件对应的EXCEL文件。
  3. 如权利要求2所述的方法,其特征在于,获得针对所述N子段的第二排版结果,包括:
    根据所述N个字段中的每个字段所占据的位数,确定每个字段对应的位数标识;
    将每个字段的位数标识与该字段对应的字段标识或列标识对应排版,以获得字段位数排版结果;
    根据所述字段位数排版结果,更新所述第二排版结果。
  4. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    确定所述基金文件中的固定文件描述数据,其中,所述固定文件描述数据包括以所述基金文件所采用的金融数据协议所表示的所有基金文件中包括的类型相同的数据;
    根据所述固定文件描述数据在所述基金文件中的排版格式,对所述固定文件描述数据进行EXCEL排版,以获得针对所述固定文件描述数据的第三排版结果;
    则,根据所述第一排版结果,生成与所述基金文件对应的EXCEL文件,包括:
    根据所述第一排版结果和所述第三排版结果,生成与所述基金文件对应的EXCEL文件。
  5. 如权利要求1所述的方法,其特征在于,在生成与所述基金文件对应的EXCEL文件之后,所述方法还包括:
    接收针对所述EXCEL文件的编辑操作;
    根据所述编辑操作,确定所述EXCEL文件中被编辑的数据对所述编辑操作的响应结果;
    根据所述被编辑的数据的数据属性对所述响应结果进行合法性校验;其中,所述数据属性包括数据所占位数和/或数据留存级别;
    若检验未通过,则撤销对所述编辑操作的响应。
  6. 如权利要求1-5任一所述的方法,其特征在于,所述方法还包括:
    确定待转换的EXCEL文件,其中,所述待转换的EXCEL文件是根据基金文件转换得到的EXCEL文件;
    按照所述基金文件的排版格式,对所述待转换的EXCEL文件进行排版转换,以获得第四排版结果;
    根据所述第四排版结果,生成与所述待转换的EXCEL文件对应的基金文件。
  7. 如权利要求6所述的方法,其特征在于,所述方法还包括:
    在由所述待转换的EXCEL文件转换为对应的基金文件的过程中,对关键数据进行合法性检验;其中,所述关键数据包括字段长度、参数个数、数据行数中的至少一种;
    在所述关键数据进行合法性检验通过时,则继续进行由所述待转换的EXCEL文件到对应的基金文件的转换。
  8. 一种文件处理装置,其特征在于,所述装置包括:
    第一确定模块,用于确定待转换的基金文件;
    读取模块,用于读取所述基金文件中的交易记录数据,其中,所述交易记录数据包括按照预定顺序拼接组成的M条子交易数据,所述M条子交易数据中的每条子交易数据均包括N个字段的字段数据,所述N个字段中的每个字段的字段名各不相同,M和N均为大于或等于1的整数;
    第一排版模块,用于按照EXCEL文件的排版格式,将每条子交易数据的N个字段划分为N列以及根据对应每列的字段的字段名设置该列的列标识进行EXCEL排版,以获得针对所述交易记录数据的第一排版结果;
    第一处理模块,用于根据所述第一排版结果,生成与所述基金文件对应的EXCEL文件。
  9. 一种计算机设备,其特征在于,所述计算机设备包括:
    存储器,用于存储程序指令;
    处理器,用于调用所述存储器中存储的程序指令,按照获得的程序指令执行权利要求1-7任一所述的方法包括的步骤。
  10. 一种存储介质,其特征在于,所述存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行权利要求1-7任一所述的方法包括的步骤。
PCT/CN2020/091378 2019-06-27 2020-05-20 一种文件处理方法、装置及计算机设备 WO2020259141A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910569703.9 2019-06-27
CN201910569703.9A CN110263316A (zh) 2019-06-27 2019-06-27 一种文件处理方法、装置及计算机设备

Publications (1)

Publication Number Publication Date
WO2020259141A1 true WO2020259141A1 (zh) 2020-12-30

Family

ID=67922528

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/091378 WO2020259141A1 (zh) 2019-06-27 2020-05-20 一种文件处理方法、装置及计算机设备

Country Status (2)

Country Link
CN (1) CN110263316A (zh)
WO (1) WO2020259141A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110263316A (zh) * 2019-06-27 2019-09-20 深圳前海微众银行股份有限公司 一种文件处理方法、装置及计算机设备
CN110929485B (zh) * 2019-12-06 2023-09-19 ***股份有限公司 文件生成方法、装置、设备及介质
CN111221738A (zh) * 2020-01-10 2020-06-02 深圳前海环融联易信息科技服务有限公司 数据执行文件生成方法、装置、计算机设备以及存储介质
CN112037074B (zh) * 2020-09-11 2024-04-19 中国银行股份有限公司 基于可视化的数据文件解析方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105117378A (zh) * 2015-08-05 2015-12-02 联动优势电子商务有限公司 一种json文件转换为excel文件的方法及装置
CN106095992A (zh) * 2016-06-21 2016-11-09 浪潮通用软件有限公司 一种ERP数据与Excel文档数据交换的方法
US20170147540A1 (en) * 2015-11-24 2017-05-25 Bank Of America Corporation Transforming unstructured documents
CN107341109A (zh) * 2017-07-07 2017-11-10 中国银行股份有限公司 一种测试数据的生成方法和***
CN110263316A (zh) * 2019-06-27 2019-09-20 深圳前海微众银行股份有限公司 一种文件处理方法、装置及计算机设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105117378A (zh) * 2015-08-05 2015-12-02 联动优势电子商务有限公司 一种json文件转换为excel文件的方法及装置
US20170147540A1 (en) * 2015-11-24 2017-05-25 Bank Of America Corporation Transforming unstructured documents
CN106095992A (zh) * 2016-06-21 2016-11-09 浪潮通用软件有限公司 一种ERP数据与Excel文档数据交换的方法
CN107341109A (zh) * 2017-07-07 2017-11-10 中国银行股份有限公司 一种测试数据的生成方法和***
CN110263316A (zh) * 2019-06-27 2019-09-20 深圳前海微众银行股份有限公司 一种文件处理方法、装置及计算机设备

Also Published As

Publication number Publication date
CN110263316A (zh) 2019-09-20

Similar Documents

Publication Publication Date Title
WO2020259141A1 (zh) 一种文件处理方法、装置及计算机设备
CN100485616C (zh) 用于生成对象设置脚本的图形辅助的方法和***
CN108292231B (zh) 从数据生成应用的方法和***
CN106471487B (zh) 用于使用应用引擎来编辑非本原应用中的文件的***和方法
US10657313B2 (en) Method and system for editing virtual documents
WO2022095520A1 (zh) 文档编辑方法、装置、服务器、终端和存储介质
WO2021042521A1 (zh) 一种合同自动生成方法、计算机设备及计算机非易失性存储介质
WO2019184138A1 (zh) 票据信息录入方法、装置、计算机设备和存储介质
US10740550B1 (en) Network-accessible data management service with web-of-sheets data model
US20120158742A1 (en) Managing documents using weighted prevalence data for statements
US8839251B2 (en) Automating sequential cross-application data transfer operations
WO2019144547A1 (zh) 数据录入方法、装置、计算机设备和存储介质
CN109977383A (zh) 一种基于Excel的表单信息提取方法
WO2019042349A1 (zh) 操作***框架的翻译方法、移动终端和存储装置
JP2008052740A (ja) マーク付けされたデータ・ブロックを伴う文書に対するスペル・チェックの方法および信号搬送媒体
US11243934B1 (en) Systems and methods for copying and pasting suggestion metadata
CN112783482A (zh) 一种可视化表单生成方法、装置、设备及存储介质
CN112507660A (zh) 一种用于复合文档的同源判定、差异化显示方法和***
CN111984674A (zh) 结构化查询语言的生成方法及***
CN115629763A (zh) 目标代码的生成方法、npu指令的显示方法及装置
CN113254455A (zh) 数据库的动态配置方法、装置、计算机设备及存储介质
EP2972666B1 (en) Visualization interface for information object system
CN112507677A (zh) 一种电子表单录入及展示的方法和装置
CN111651696A (zh) 产品标签的定制方法及装置、计算机存储介质、电子设备
CN103440289B (zh) 基于MapReduce的网页不兼容标签并行查找方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20831109

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 220422)

122 Ep: pct application non-entry in european phase

Ref document number: 20831109

Country of ref document: EP

Kind code of ref document: A1