WO2021184574A1 - Document data importing method and apparatus, document data exporting method and apparatus, and storage medium - Google Patents

Document data importing method and apparatus, document data exporting method and apparatus, and storage medium Download PDF

Info

Publication number
WO2021184574A1
WO2021184574A1 PCT/CN2020/098708 CN2020098708W WO2021184574A1 WO 2021184574 A1 WO2021184574 A1 WO 2021184574A1 CN 2020098708 W CN2020098708 W CN 2020098708W WO 2021184574 A1 WO2021184574 A1 WO 2021184574A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
document
annotation
imported
object name
Prior art date
Application number
PCT/CN2020/098708
Other languages
French (fr)
Chinese (zh)
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 WO2021184574A1 publication Critical patent/WO2021184574A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database

Definitions

  • This application relates to a document data import method, document data export method, device, computer equipment and storage medium.
  • the business system is a system provided to basic personnel. It is an information system that provides targeted support to the business processing process. It can provide powerful tool support for the completion of a certain job.
  • the import and export functions of the document data of the business system are different. Very commonly used functions in this business system.
  • the inventor realizes that the current import and export of document data in a business system generally only provides a single import or export function, such as: correspondingly uploading the document data to the business system, or exporting the corresponding data file from the business system.
  • the format of the document and the format of the document data in the document are complex and changeable. When a new format appears, it is necessary to write different codes in different formats and change the code of the business system to meet the import or export of documents or document data in the new format.
  • the development workload is large.
  • a document data import method, document data export method, device, computer equipment, and storage medium are provided.
  • a method for importing document data comprising:
  • a method for exporting document data comprising:
  • a document data importing device comprising:
  • the format analysis module is configured to analyze the file format of the document to be imported when receiving the document data import instruction carrying the document to be imported, and determine the file format of the document to be imported;
  • the document parsing module is configured to call a corresponding parsing program according to the file format of the document to be imported, parse the document to be imported, and obtain text data and annotation data in the document to be imported;
  • the first data processing module is configured to process the text data according to the annotation data to obtain processed data
  • the data import module is used to import the processed data into the business system according to the annotation data.
  • a document data export device includes:
  • a template obtaining module configured to obtain a corresponding export document template according to the document data export instruction when the document data export instruction is received;
  • a template parsing module for parsing the exported document template and extracting annotation data
  • the second data processing module is used to process the data to be exported in the business system according to the annotation data to obtain the processed data;
  • the data export module is configured to write the processed data into the location corresponding to the export document template according to the object name in the annotation data.
  • a computer device including a memory and one or more processors, the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the one or more processors execute The following steps:
  • One or more computer-readable storage media storing computer-readable instructions.
  • the one or more processors perform the following steps:
  • a computer device including a memory and one or more processors, the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the one or more processors execute The following steps:
  • One or more computer-readable storage media storing computer-readable instructions.
  • the one or more processors perform the following steps:
  • FIG. 1 is an application scenario diagram of a method for importing document data or a method for exporting document data according to one or more embodiments;
  • FIG. 2 is a schematic flowchart of a method for importing document data according to one or more embodiments
  • FIG. 3 is a schematic flowchart of a method for exporting document data according to one or more embodiments
  • Fig. 4 is a structural block diagram of a document data importing device according to one or more embodiments.
  • Figure 5 is a structural block diagram of a document data importing device in another embodiment
  • Fig. 6 is a structural block diagram of a document data export device according to one or more embodiments.
  • Figure 7 is a block diagram of a computer device in one embodiment.
  • the document data import method and document data export method provided in this application can be applied to the application environment as shown in FIG. 1.
  • the terminal 102 communicates with the server 104 through the network through the network.
  • the document data import method is executed, when the server 104 receives the document data import instruction that carries the document to be imported from the terminal 102, the file format of the document to be imported is analyzed to determine the file format of the document to be imported; the server 104 according to the document to be imported
  • the file format calls the corresponding parsing program to parse the document to be imported, and obtain the text data and annotation data in the document to be imported; process the text data according to the annotation data to obtain the processed data; the processed data is based on the annotation data Import into the business system.
  • the server 104 When the document data export method is executed, when the server 104 receives the document data export instruction sent by the terminal 102, it obtains the corresponding exported document template according to the document data export instruction; the server 104 parses the exported document template and extracts the annotation data; according to the annotations Data, the data to be exported in the business system is processed to obtain the processed data; the processed data is written into the location corresponding to the export document template according to the object name in the annotation data.
  • the terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • the server 104 may be implemented by an independent server or a server cluster composed of multiple servers.
  • a method for importing document data is provided. Taking the method applied to the server in FIG. 1 as an example for description, the method includes the following steps:
  • step S220 when the document data import instruction carrying the document to be imported is received, the file format of the document to be imported is analyzed to determine the file format of the document to be imported.
  • the document to be imported is to record the graphic data that needs to be imported into the business system, and for documents with annotated data, such as: the name, age, mobile phone number, height, weight and other data recorded in the document need to be imported into the business system to record
  • the document containing the name, age, mobile phone number, height, weight and other data is the document to be imported.
  • the format of the document to be imported can be dox format, dcox format, xls format, pdf format, etc.
  • the way to analyze the file format of the document to be imported is to judge by the file extension.
  • step S240 the corresponding parsing program is called according to the file format of the document to be imported, the document to be imported is parsed, and the text data and annotation data in the document to be imported are obtained.
  • pre-write the parsing program corresponding to different file formats such as: pre-write the parsing program for parsing the file format as dox format, pre-write the parsing program for parsing the file format as dcox format, Pre-write the parsing program for parsing the file format as xls format, pre-write the parsing program for parsing the file format as pdf format, and so on.
  • the text data is the content selected by the annotation in the body of the document to be imported, and the annotation data is the data in the annotation box of the annotation.
  • step S260 the text data is processed according to the annotation data to obtain processed data.
  • the annotation data can be the object name, the object name and the name of the converter for data format conversion, the object name and the data validity verification code, and so on.
  • the step of processing the text data according to the annotation data to obtain the processed data includes:
  • the annotated content in the text data is obtained as the processed data; when the annotated data is the name of the converter converted from the object name and the data format, the corresponding converter is called according to the converter name, and the text
  • the annotated content in the data is formatted to obtain the processed data; when the annotated data is the object name and the data validity verification code, the data validity verification code is run to verify the data validity of the annotated content in the text data to obtain The valid data is treated as the processed data.
  • the object name matches the name of the object or structure variable in the business system.
  • the object name can be used to determine where to fill the annotated text data in the business system.
  • the annotated text data can be directly used as the processed data, and step S280 is executed.
  • the text data in the document to be imported does not require any processing, and can be directly imported into the business system.
  • the object name in the annotated data determine the location of the text data in the business system, and import the text data into the business The corresponding position of the system is sufficient, which can improve the import efficiency of the documents to be imported.
  • the corresponding converter is called according to the converter name, and the annotated content in the text data is formatted to obtain the processed data.
  • the name of the converter has a one-to-one correspondence with the converter.
  • the converter can include a converter for date format conversion, a converter for number format conversion, a converter for letter case conversion, etc., such as date format conversion, text
  • the date format in the data is "XXXX year XX month XX day”
  • the date format is required to be "XXXX/XX/XX” when importing into the business system
  • the date in the text data is converted by calling the converter for converting the date format
  • the date format is required as the processed data when importing into the business system.
  • the business system can call the converter to perform the format conversion by using the converter name of the data format conversion in the annotation data.
  • the code logic for format conversion does not need to develop code logic such as how to determine which converter to use for format conversion, just call it directly according to the converter name.
  • annotated data is the object name and data validity verification code
  • run the data validity verification code to verify the data validity of the annotated content in the text data, and obtain the valid data as the processed data, such as: by running the code
  • the data in the text data is validated by valid data scope and rules. When it does not meet the corresponding scope or rules, the relevant data will be ignored and recorded.
  • the data that meets the requirements are processed data. You can verify age, mobile phone number, IP address, etc., and you can customize the verification rules, such as age verification.
  • the business system can run the data validity verification code in the annotation data, which can extract the corresponding data from the text data in the document to be imported.
  • Data import without the need to develop and build a large amount of data validity verification code in the business system, just run it directly.
  • Step S280 Import the processed data into the business system according to the annotation data.
  • the age data is obtained from the processed data obtained after age verification and mapped to the object or structure of the business system.
  • the above-mentioned document data import method when a document data import instruction carrying a document to be imported is received, the corresponding parsing program is called according to the file format of the document to be imported, the document to be imported is parsed, and the text data and comments in the document to be imported are obtained Data;
  • Annotation data can process text data. After processing the text data according to the annotation data, it is mapped to the object or structure of the business system according to the object name in the annotation data. There is no need to change the code in the business system, avoiding a large amount of work of modifying the system code, reducing the development workload, reducing the complexity of the business system, and improving the operating speed of the business system.
  • the step of importing the processed data into the business system according to the annotation data includes: determining the correspondence between the object name and the processed data according to the object name in the annotation data; and processing according to the object name The corresponding relationship of the subsequent data maps the processed data to the object or structure of the business system.
  • the object is a certain component in the business system.
  • Structure is a kind of data structure, a kind of aggregate data type in C language.
  • the object name in the annotation data matches the object or structure variable name in the business system.
  • the object name can be used to determine where to fill the annotation text data in the business system.
  • the method before the step of receiving the document data import instruction carrying the document to be imported, the method further includes: obtaining the pre-imported document; calling the annotation script file to perform annotation processing on the pre-imported document to obtain the document to be imported.
  • the pre-imported document is a document that records the graphic data that needs to be imported into the business system and does not have annotated data.
  • the annotation script file is used to annotate the pre-imported document.
  • the annotation script file writes the corresponding annotation program according to the format and layout of the pre-imported document, such as: Word document, run the annotation script File, find the corresponding paragraph of the Word document, annotate the annotation data of the corresponding paragraph, obtain the document to be imported that records the graphic data that needs to be imported into the business system, and annotate the document to be imported with the annotation data, and annotate the pre-imported document by calling the annotation script file Processing can improve the efficiency of document data import.
  • a method for importing document data is illustrated by an example, and the example is as follows:
  • the data in the document includes name, age (minimum 0 years old, maximum 120 years old), mobile phone number ( Domestic operators), height (unit: cm, minimum 30 cm, maximum 230 cm, rounded), weight (unit: kg, minimum 1.0 kg, maximum 200.0 kg).
  • annotation data of the annotation is:
  • the data validity verification When importing, the data validity verification will be carried out through the annotation data, and the valid data will be obtained as the processed data and mapped to the newly instanced Person object. The data that has not passed the data validity verification will be recorded and prompted later .
  • the above-mentioned document data import method when a document data import instruction carrying a document to be imported is received, the corresponding parsing program is called according to the file format of the document to be imported, the document to be imported is parsed, and the text data and comments in the document to be imported are obtained Data;
  • Annotation data can process text data. After processing the text data according to the annotation data, it is mapped to the object or structure of the business system according to the object name in the annotation data. There is no need to change the code in the business system, avoiding a large amount of work of modifying the system code, reducing the development workload, reducing the complexity of the business system, and improving the operating speed of the business system.
  • the annotation script file By calling the annotation script file to perform annotation processing on the pre-imported document, the efficiency of document data import can be improved.
  • a method for exporting document data is provided. Taking the method applied to the server in FIG. 1 as an example for description, the method includes the following steps:
  • step S420 when the document data export instruction is received, a corresponding export document template is obtained according to the document data export instruction.
  • the export document template is used to receive the written graphic data.
  • At least one export document template can be preset according to the document format.
  • the export document template can include: export document template in dox format, dcox format
  • the export document template can also be set according to the data type of the data to be exported. For example, a certain type of data needs to be written into the export document template after a specific processing before being exported, and the export document template is preset according to the data type and so on.
  • the document data export instruction carries the relevant information of the data to be exported. When the document data export instruction is received, the export document format is determined according to the relevant information of the data to be exported in the document data export instruction, and the export document template is determined according to the export document format. Path; Obtain the export document template according to the obtained path.
  • the path for obtaining the document template can be obtained from a disk file, a document template uploaded by the user through the terminal, or a remote procedure call. According to the position selected by the annotation in the export document template as the position where the data to be exported is written, the annotation data corresponding to the annotation is used to process the data to be exported.
  • step S440 the exported document template is parsed, and the annotation data is extracted.
  • the annotation data can be the object name, the object name and the name of the converter for data format conversion, or the object name and expression.
  • the object name guides the variable name in the target data structure when exporting or the variable name in the source data structure when exporting.
  • the object name can be formed by code or automatically generated by predefined rules.
  • the object name matches the name of the object or structure variable of the data to be exported, which means that the data to be exported is filled into the corresponding comment position.
  • the template is usually pre-written or generated, but the data is filled in afterwards and may not be uniform.
  • the common date and time format conversion requires only the date, but the source data may contain a time part, which needs to be converted into a date format.
  • step S460 the data to be exported in the business system is processed according to the annotation data, and the processed data is obtained.
  • the annotation data can be the object name, the object name and the name of the converter for data format conversion, or the object name and expression.
  • the step of processing the data to be exported in the business system according to the annotation data to obtain the processed data includes: when the annotation data is only the object name, according to the object name, obtaining the data associated with the object in the business system
  • the data to be exported corresponding to the name is used as the processed data; when the annotation data is the name of the object name and the converter name for data format conversion, the corresponding converter is called according to the converter name, and the data to be exported corresponding to the object name in the business system is called Perform format conversion to obtain processed data; when the annotated data is an object name and expression, the expression engine is called to parse and execute the expression, and the data to be exported corresponding to the object name in the business system is processed, and the processed data is obtained.
  • the data when the annotation data is only the object name, according to the object name, obtaining the data associated with the object in the business system
  • the data to be exported corresponding to the name is used as the processed data; when the annotation data is the name of the object name and the converter name for data format conversion,
  • the object name matches the object or structure variable name of the data to be exported, which means that the data to be exported is filled in the corresponding annotation position, and the object name corresponding to the object name in the business system is obtained according to the object name.
  • the data can be directly filled into the corresponding annotation position.
  • the data to be exported does not require any processing, and can be directly written into the export document template.
  • the object name in the annotated data can be used to determine the application of the data to be exported. To fill in the position, just write the data to be exported into the corresponding position of the export document template, which can improve the export efficiency of the data to be exported.
  • the corresponding converter is called according to the converter name, the format conversion of the data to be exported corresponding to the object name in the business system is performed, and the processed data is obtained.
  • the name corresponds to the converter one-to-one.
  • the converter can include a converter for date format conversion, a converter for digital format conversion, a converter for letter case conversion, etc., such as date format conversion, business system
  • the date format is "XXXX/XX/XX"
  • the date format required for exporting the document template is "XXXX year XX month XX day”.
  • the date in the business system is converted by calling the converter for converting the date format to obtain the exported document
  • the data in the date format required by the template is used as the processed data.
  • the business system uses the converter name of the data format conversion in the annotation data to call the converter to perform the format conversion, and then fill in the exported document template according to the object name.
  • the business system develops the code logic of how to perform format conversion, without the need to develop code logic such as how to determine which converter to use for format conversion, just call it directly according to the name of the converter.
  • the expression engine When the annotation data is the object name and expression, the expression engine is called to parse and execute the expression, and the data to be exported corresponding to the object name in the business system is processed to obtain the processed data; in actual applications, in order to achieve some If the formula cannot be satisfied, or provide some external data exchange functions, the expression will be parsed and executed through the expression engine.
  • the expression can be loaded with custom functions to achieve more flexible data processing functions. For example: there is a batch of employee salary information in the business system, and it is necessary to export the salary table based on the employee salary information.
  • the salary table needs to include the name, the salary that should be paid, the amount of tax deduction, and the actual salary.
  • step S480 the processed data is written into the position corresponding to the exported document template according to the object name in the annotation data.
  • the processed data into the corresponding location of the exported document template according to the object name in the annotation data. For example, if the annotation in the Excel workbook is filled in the column of the worksheet, then the processed data is filled in the cell below it or Specify the start and end cells in the comment.
  • the above-mentioned document data export method when receiving the document data export instruction, obtain the corresponding exported document template according to the document data export instruction; analyze the exported document template, extract the annotation data, and the annotation data can be processed for the exported data;
  • the data to be exported in the system is processed to obtain the processed data;
  • the processed data is written into the position corresponding to the export document template according to the object name in the annotation data.
  • a method for exporting document data is illustrated with an example, and the example is as follows:
  • the data required by the table includes name, salary to be paid, individual tax deduction amount, and actual salary.
  • the annotation data of the following annotations in the export document template is:
  • the code exported by the business system writes the following data structure:
  • a document data import device which includes: a format analysis module 310, a document analysis module 320, a first data processing module 330, and a data import module 340, wherein:
  • the format analysis module 310 is configured to analyze the file format of the document to be imported when a document data import instruction carrying the document to be imported is received, and determine the file format of the document to be imported;
  • the document parsing module 320 is configured to call a corresponding parsing program according to the file format of the document to be imported, parse the document to be imported, and obtain text data and annotation data in the document to be imported;
  • the first data processing module 330 is used to process the text data according to the annotation data to obtain the processed data;
  • the data import module 340 is used to import the processed data into the business system according to the annotation data.
  • the first data processing module 330 is also used to: when the annotation data is only the object name, obtain the annotated content in the text data as the processed data; when the annotation data is converted from the object name and data format When converting the name of the converter, call the corresponding converter according to the converter name to convert the annotated content in the text data to obtain the processed data; when the annotated data is the object name and the data validity verification code, the data validity is run The verification code is used to verify the data validity of the annotated content in the text data, and obtain valid data as the processed data.
  • the data import module 340 is also used to: determine the correspondence between the object name and the processed data according to the object name in the annotation data; according to the correspondence between the object name and the processed data, the processed data The data is mapped to the object or structure of the business system.
  • the document data importing device further includes an annotation processing module 350 for obtaining the pre-imported document; calling an annotation script file to perform an annotation processing on the pre-imported document to obtain the document to be imported.
  • a document data export device including: a template acquisition module 510, a template analysis module 520, a second data processing module 530, and a data export module 540, wherein:
  • the template obtaining module 510 is configured to obtain a corresponding export document template according to the document data export instruction when a document data export instruction is received;
  • the template analysis module 520 is configured to analyze the exported document template and extract annotation data
  • the second data processing module 530 is configured to process the data to be exported in the business system according to the annotation data to obtain the processed data;
  • the data export module 540 is configured to write the processed data into the location corresponding to the export document template according to the object name in the annotation data.
  • the second data processing module 530 is further configured to: when the annotation data is only the object name, according to the object name, obtain the data to be exported corresponding to the object name in the business system as the processed data; When the data is the name of the converter for the object name and data format conversion, the corresponding converter is called according to the converter name, and the data to be exported corresponding to the object name in the business system is formatted to obtain the processed data; when the annotation data is When the object name and expression are used, the expression engine is called to parse and execute the expression, and the data to be exported corresponding to the object name in the business system is processed to obtain the processed data.
  • Each module in the above-mentioned document data importing device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • Each module in the above-mentioned document data exporting device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 7.
  • the computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus.
  • the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the database of the computer equipment is used to store document data.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • FIG. 7 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied.
  • the specific computer equipment may include More or fewer parts than shown in the figure, or some parts are combined, or have a different arrangement of parts.
  • a computer device includes a memory and one or more processors.
  • the memory stores computer-readable instructions.
  • the one or more processors execute the steps of the document data importing method.
  • One or more computer-readable storage media storing computer-readable instructions.
  • the computer-readable instructions When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the above-mentioned document data import method; wherein, the The computer-readable storage medium may be non-volatile or volatile.
  • a computer device includes a memory and one or more processors.
  • the memory stores computer readable instructions.
  • the one or more processors execute the steps of the document data export method.
  • One or more computer-readable storage media storing computer-readable instructions.
  • the one or more processors execute the steps of the method for exporting document data; wherein, the computer
  • the readable storage medium may be non-volatile or volatile.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

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)
  • Document Processing Apparatus (AREA)

Abstract

Disclosed are a document data importing method and apparatus, a document data exporting method and apparatus, a computer device and a storage medium. The document data importing method comprises: when a document data importing instruction carrying a document to be imported is received, calling a corresponding parsing program according to the file format of said document, and parsing said document, so as to acquire text data and annotation data in said document (S240); and after processing the text data according to the annotation data, mapping the text data to an object or a structural body of a service system according to an object name in the annotation data. The document data exporting method comprises: when a document data exporting instruction is received, acquiring a corresponding document exporting template, extracting annotation data to process data to be exported in a service system, so as to acquire processed data; and according to an object name in the annotation data, writing the processed data into a position corresponding to the document exporting template. The complexity of a service system is reduced, and the operating speed of the service system is improved.

Description

文档数据导入方法、文档数据导出方法、装置和存储介质Document data import method, document data export method, device and storage medium
相关申请的交叉引用Cross-references to related applications
本申请要求于2020年03月20日提交中国专利局,申请号为2020102000514,申请名称为″文档数据导入方法、文档数据导出方法、装置和存储介质″的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the Chinese Patent Office on March 20, 2020, the application number is 2020102000514, and the application name is "document data import method, document data export method, device and storage medium", and its entire content Incorporated in this application by reference.
技术领域Technical field
本申请涉及一种文档数据导入方法、文档数据导出方法、装置、计算机设备和存储介质。This application relates to a document data import method, document data export method, device, computer equipment and storage medium.
背景技术Background technique
业务系统是提供给基础人员使用的系统,是对业务处理过程进行针对性支持的信息系统,能够为某项工作的完成提供有力的工具支撑,而业务系统的文档数据的导入和导出功能是各种业务系统中很常用功能。The business system is a system provided to basic personnel. It is an information system that provides targeted support to the business processing process. It can provide powerful tool support for the completion of a certain job. The import and export functions of the document data of the business system are different. Very commonly used functions in this business system.
发明人意识到,目前的业务系统的文档数据的导入导出,一般只提供单一的导入或导出功能,如:将文档数据对应上传至业务系统中,或从业务系统中导出对应的数据文档。文档的格式和文档中文档数据的格式复杂多变,当出现新的格式时,需要不同格式编写不同的代码,和更改业务系统的代码来满足新格式的文档或文档数据的导入或导出,导致开发工作量大。The inventor realizes that the current import and export of document data in a business system generally only provides a single import or export function, such as: correspondingly uploading the document data to the business system, or exporting the corresponding data file from the business system. The format of the document and the format of the document data in the document are complex and changeable. When a new format appears, it is necessary to write different codes in different formats and change the code of the business system to meet the import or export of documents or document data in the new format. The development workload is large.
发明内容Summary of the invention
根据本申请公开的各种实施例,提供一种文档数据导入方法、文档数据导出方法、装置、计算机设备和存储介质。According to various embodiments disclosed in the present application, a document data import method, document data export method, device, computer equipment, and storage medium are provided.
一种文档数据导入方法,所述方法包括:A method for importing document data, the method comprising:
当接收到携带有待导入文档的文档数据导入指令时,对所述待导入文档的文件格式进行分析,确定所述待导入文档的文件格式;When receiving a document data import instruction carrying a document to be imported, analyze the file format of the document to be imported to determine the file format of the document to be imported;
根据待导入文档的文件格式调用对应的解析程序,对所述待导入文档进行解析,获取所述待导入文档中的文本数据及批注数据;Call a corresponding parsing program according to the file format of the document to be imported, parse the document to be imported, and obtain text data and annotation data in the document to be imported;
根据所述批注数据对所述文本数据进行处理,获得处理后的数据;及Process the text data according to the annotation data to obtain processed data; and
将所述处理后的数据根据所述批注数据导入到业务系统中。Import the processed data into the business system according to the annotation data.
一种文档数据导出方法,所述方法包括:A method for exporting document data, the method comprising:
当接收到文档数据导出指令时,根据所述文档数据导出指令获取对应的导出文档模板;When receiving a document data export instruction, obtain a corresponding export document template according to the document data export instruction;
对所述导出文档模板进行解析,提取批注数据;Parse the exported document template and extract annotation data;
根据所述批注数据,对业务系统中待导出数据进行处理,获得处理后的数据;及According to the annotation data, process the data to be exported in the business system to obtain the processed data; and
根据所述批注数据中的对象名称将所述处理后的数据写入导出文档模板对应的位置。Write the processed data into the location corresponding to the exported document template according to the object name in the annotation data.
一种文档数据导入装置,所述装置包括:A document data importing device, the device comprising:
格式分析模块,用于当接收到携带有待导入文档的文档数据导入指令时,对所述待导入文档的文件格式进行分析,确定所述待导入文档的文件格式;The format analysis module is configured to analyze the file format of the document to be imported when receiving the document data import instruction carrying the document to be imported, and determine the file format of the document to be imported;
文档解析模块,用于根据待导入文档的文件格式调用对应的解析程序,对所述待导入文档进行解析,获取所述待导入文档中的文本数据及批注数据;The document parsing module is configured to call a corresponding parsing program according to the file format of the document to be imported, parse the document to be imported, and obtain text data and annotation data in the document to be imported;
第一数据处理模块,用于根据所述批注数据对所述文本数据进行处理,获得处理后的数据;及The first data processing module is configured to process the text data according to the annotation data to obtain processed data; and
数据导入模块,用于将所述处理后的数据根据所述批注数据导入到业务系统中。The data import module is used to import the processed data into the business system according to the annotation data.
一种文档数据导出装置,所述装置包括:A document data export device, the device includes:
模板获取模块,用于当接收到文档数据导出指令时,根据所述文档数据导出指令获取对应的导出文档模板;A template obtaining module, configured to obtain a corresponding export document template according to the document data export instruction when the document data export instruction is received;
模板解析模块,用于对所述导出文档模板进行解析,提取批注数据;A template parsing module for parsing the exported document template and extracting annotation data;
第二数据处理模块,用于根据所述批注数据,对业务系统中待导出数据进行处理,获得处理后的数据;及The second data processing module is used to process the data to be exported in the business system according to the annotation data to obtain the processed data; and
数据导出模块,用于根据所述批注数据中的对象名称将所述处理后的数据写入导出文档模板对应的位置。The data export module is configured to write the processed data into the location corresponding to the export document template according to the object name in the annotation data.
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device, including a memory and one or more processors, the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the one or more processors execute The following steps:
当接收到携带有待导入文档的文档数据导入指令时,对所述待导入文档的文件格式进行分析,确定所述待导入文档的文件格式;When receiving a document data import instruction carrying a document to be imported, analyze the file format of the document to be imported to determine the file format of the document to be imported;
根据待导入文档的文件格式调用对应的解析程序,对所述待导入文档进行解析,获取所述待导入文档中的文本数据及批注数据;Call a corresponding parsing program according to the file format of the document to be imported, parse the document to be imported, and obtain text data and annotation data in the document to be imported;
根据所述批注数据对所述文本数据进行处理,获得处理后的数据;及Process the text data according to the annotation data to obtain processed data; and
将所述处理后的数据根据所述批注数据导入到业务系统中。Import the processed data into the business system according to the annotation data.
一个或多个存储有计算机可读指令的计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:One or more computer-readable storage media storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors perform the following steps:
当接收到携带有待导入文档的文档数据导入指令时,对所述待导入文档的文件格式进行分析,确定所述待导入文档的文件格式;When receiving a document data import instruction carrying a document to be imported, analyze the file format of the document to be imported to determine the file format of the document to be imported;
根据待导入文档的文件格式调用对应的解析程序,对所述待导入文档进行解析,获取所述待导入文档中的文本数据及批注数据;Call a corresponding parsing program according to the file format of the document to be imported, parse the document to be imported, and obtain text data and annotation data in the document to be imported;
根据所述批注数据对所述文本数据进行处理,获得处理后的数据;及Process the text data according to the annotation data to obtain processed data; and
将所述处理后的数据根据所述批注数据导入到业务系统中。Import the processed data into the business system according to the annotation data.
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device, including a memory and one or more processors, the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the one or more processors execute The following steps:
当接收到文档数据导出指令时,根据所述文档数据导出指令获取对应的导出文档模板;When receiving a document data export instruction, obtain a corresponding export document template according to the document data export instruction;
对所述导出文档模板进行解析,提取批注数据;Parse the exported document template and extract annotation data;
根据所述批注数据,对业务系统中待导出数据进行处理,获得处理后的数据;及According to the annotation data, process the data to be exported in the business system to obtain the processed data; and
根据所述批注数据中的对象名称将所述处理后的数据写入导出文档模板对应的位置。Write the processed data into the location corresponding to the exported document template according to the object name in the annotation data.
一个或多个存储有计算机可读指令的计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:One or more computer-readable storage media storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors perform the following steps:
当接收到文档数据导出指令时,根据所述文档数据导出指令获取对应的导出文档模板;When receiving a document data export instruction, obtain a corresponding export document template according to the document data export instruction;
对所述导出文档模板进行解析,提取批注数据;Parse the exported document template and extract annotation data;
根据所述批注数据,对业务系统中待导出数据进行处理,获得处理后的数据;及According to the annotation data, process the data to be exported in the business system to obtain the processed data; and
根据所述批注数据中的对象名称将所述处理后的数据写入导出文档模板对应的位置。Write the processed data into the location corresponding to the exported document template according to the object name in the annotation data.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。The details of one or more embodiments of the present application are set forth in the following drawings and description. Other features and advantages of this application will become apparent from the description, drawings and claims.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. A person of ordinary skill in the art can obtain other drawings based on these drawings without creative work.
图1为根据一个或多个实施例中文档数据导入方法或文档数据导出方法的应用场景图;FIG. 1 is an application scenario diagram of a method for importing document data or a method for exporting document data according to one or more embodiments;
图2为根据一个或多个实施例中文档数据导入方法的流程示意图;2 is a schematic flowchart of a method for importing document data according to one or more embodiments;
图3为根据一个或多个实施例中文档数据导出方法的流程示意图;3 is a schematic flowchart of a method for exporting document data according to one or more embodiments;
图4为根据一个或多个实施例中文档数据导入装置的结构框图;Fig. 4 is a structural block diagram of a document data importing device according to one or more embodiments;
图5为另一个实施例中文档数据导入装置的结构框图;Figure 5 is a structural block diagram of a document data importing device in another embodiment;
图6为根据一个或多个实施例中文档数据导出装置的结构框图;Fig. 6 is a structural block diagram of a document data export device according to one or more embodiments;
图7为一个实施例中计算机设备的框图。Figure 7 is a block diagram of a computer device in one embodiment.
具体实施方式Detailed ways
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限 定本申请。In order to make the technical solutions and advantages of the present application clearer, the following further describes the present application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not used to limit the present application.
本申请提供的文档数据导入方法和文档数据导出方法,可以应用于如图1所示的应用环境中。终端102通过网络与服务器104通过网络进行通信。当执行文档数据导入方法时,当服务器104接收到终端102发送携带有待导入文档的文档数据导入指令时,对待导入文档的文件格式进行分析,确定待导入文档的文件格式;服务器104根据待导入文档的文件格式调用对应的解析程序,对待导入文档进行解析,获取待导入文档中的文本数据及批注数据;根据批注数据对文本数据进行处理,获得处理后的数据;将处理后的数据根据批注数据导入到业务系统中。The document data import method and document data export method provided in this application can be applied to the application environment as shown in FIG. 1. The terminal 102 communicates with the server 104 through the network through the network. When the document data import method is executed, when the server 104 receives the document data import instruction that carries the document to be imported from the terminal 102, the file format of the document to be imported is analyzed to determine the file format of the document to be imported; the server 104 according to the document to be imported The file format calls the corresponding parsing program to parse the document to be imported, and obtain the text data and annotation data in the document to be imported; process the text data according to the annotation data to obtain the processed data; the processed data is based on the annotation data Import into the business system.
当执行文档数据导出方法时,当服务器104接收到终端102发送的文档数据导出指令时,根据文档数据导出指令获取对应的导出文档模板;服务器104对导出文档模板进行解析,提取批注数据;根据批注数据,对业务系统中待导出数据进行处理,获得处理后的数据;根据批注数据中的对象名称将处理后的数据写入导出文档模板对应的位置。其中,终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。When the document data export method is executed, when the server 104 receives the document data export instruction sent by the terminal 102, it obtains the corresponding exported document template according to the document data export instruction; the server 104 parses the exported document template and extracts the annotation data; according to the annotations Data, the data to be exported in the business system is processed to obtain the processed data; the processed data is written into the location corresponding to the export document template according to the object name in the annotation data. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server 104 may be implemented by an independent server or a server cluster composed of multiple servers.
在其中一个实施例中,如图2所示,提供了一种文档数据导入方法,以该方法应用于图1中的服务器为例进行说明,包括以下步骤:In one of the embodiments, as shown in FIG. 2, a method for importing document data is provided. Taking the method applied to the server in FIG. 1 as an example for description, the method includes the following steps:
步骤S220,当接收到携带有待导入文档的文档数据导入指令时,对待导入文档的文件格式进行分析,确定待导入文档的文件格式。In step S220, when the document data import instruction carrying the document to be imported is received, the file format of the document to be imported is analyzed to determine the file format of the document to be imported.
待导入文档是记录了需要导入业务系统的图文数据,并对于批注了批注数据的文档,如:需要将记录在文档中的姓名、年龄、手机号、身高、体重等数据导入业务系统,记录了姓名、年龄、手机号、身高、体重等数据的文档则为待导入文档。待导入文档的格式可以是有dox格式、dcox格式、xls格式、pdf格式等等。对待导入文档的文件格式进行分析的方式如通过文件的扩展名来判断。The document to be imported is to record the graphic data that needs to be imported into the business system, and for documents with annotated data, such as: the name, age, mobile phone number, height, weight and other data recorded in the document need to be imported into the business system to record The document containing the name, age, mobile phone number, height, weight and other data is the document to be imported. The format of the document to be imported can be dox format, dcox format, xls format, pdf format, etc. The way to analyze the file format of the document to be imported is to judge by the file extension.
步骤S240,根据待导入文档的文件格式调用对应的解析程序,对待导入文档进行解析,获取待导入文档中的文本数据及批注数据。In step S240, the corresponding parsing program is called according to the file format of the document to be imported, the document to be imported is parsed, and the text data and annotation data in the document to be imported are obtained.
根据不同的文件格式,预先编写好对应不同的文件格式的解析程序,如:预先编写好用于解析文件格式为dox格式的解析程序、预先编写好用于解析文件格式为dcox格式的解析程序、预先编写好用于解析文件格式为xls格式的解析程序、预先编写好用于解析文件格式为pdf格式的解析程序等等。文本数据为待导入文档中正文中被批注选中的内容,批注数据为该批注的批注框中的数据。According to different file formats, pre-write the parsing program corresponding to different file formats, such as: pre-write the parsing program for parsing the file format as dox format, pre-write the parsing program for parsing the file format as dcox format, Pre-write the parsing program for parsing the file format as xls format, pre-write the parsing program for parsing the file format as pdf format, and so on. The text data is the content selected by the annotation in the body of the document to be imported, and the annotation data is the data in the annotation box of the annotation.
步骤S260,根据批注数据对文本数据进行处理,获得处理后的数据。In step S260, the text data is processed according to the annotation data to obtain processed data.
批注数据中可以是对象名称,也可以是对象名称和数据格式转换的转换器名称,还可以是对象名称和数据有效性验证代码等等。The annotation data can be the object name, the object name and the name of the converter for data format conversion, the object name and the data validity verification code, and so on.
在其中一个实施例中,根据批注数据对文本数据进行处理,获得处理后的数据的步骤,包括:In one of the embodiments, the step of processing the text data according to the annotation data to obtain the processed data includes:
当批注数据仅为对象名称时,获取文本数据中被批注内容作为处理后的数据;当批注数据为对象名称和数据格式转换的转换器名称时,根据转换器名称调用对应的转换器,对文本数据中被批注内容进行格式转换,获得处理后的数据;当批注数据为对象名称和数据有效性验证代码时,运行数据有效性验证代码,对文本数据中被批注内容进行数据有效性验证,获得有效数据作为处理后的数据。When the annotated data is only the object name, the annotated content in the text data is obtained as the processed data; when the annotated data is the name of the converter converted from the object name and the data format, the corresponding converter is called according to the converter name, and the text The annotated content in the data is formatted to obtain the processed data; when the annotated data is the object name and the data validity verification code, the data validity verification code is run to verify the data validity of the annotated content in the text data to obtain The valid data is treated as the processed data.
对象名称与业务系统中的对象或结构体变量名称相匹配,通过该对象名称可以确定将批注的文本数据填充到业务系统的什么位置。当批注数据为对象名称时,直接可以将批注的文本数据作为处理后的数据,执行步骤S280。如:待导入文档中的文本数据无需任何处理,是可以直接导入业务系统的数据,通过批注的批注数据中的对象名称,确定将文本数据在业务系统中存储的位置,将文本数据导入到业务系统的对应位置即可,可以提高待导入文档的导入效率。The object name matches the name of the object or structure variable in the business system. The object name can be used to determine where to fill the annotated text data in the business system. When the annotated data is the object name, the annotated text data can be directly used as the processed data, and step S280 is executed. For example, the text data in the document to be imported does not require any processing, and can be directly imported into the business system. Through the object name in the annotated data, determine the location of the text data in the business system, and import the text data into the business The corresponding position of the system is sufficient, which can improve the import efficiency of the documents to be imported.
当批注数据为对象名称和数据格式转换的转换器名称时,根据转换器名称调用对应的转换器,对文本数据中被批注内容进行格式转换,获得处理后的数据。转换器名称与转换器一一对应,转换器可以包括用于日期格式转换的转换器、用于数字格式转换的转换器、用于字母大小写转换的转换器等等,如日期格式转换,文本数据中的日期格式是″XXXX年XX月XX日″,而导入业务系统时需要日期格式是″XXXX/XX/XX″,通过调用用于转换日期格式的转换器对文本数据中的日期进行转换,获得导入业务系统时需要日期格式作为处理后的数据。当待导入文档中的文本数据的格式与业务系统的数据存储的格式不同时,业务系统通过批注数据中数据格式转换的转换器名称调用转换器进行格式转换即可,无需大量在业务系统开发如何进行格式转换的代码逻辑,无需开发如何确定用什么转换器进行格式转换等代码逻辑,直接根据转换器名称调用即可。When the annotation data is the name of the converter for the object name and data format conversion, the corresponding converter is called according to the converter name, and the annotated content in the text data is formatted to obtain the processed data. The name of the converter has a one-to-one correspondence with the converter. The converter can include a converter for date format conversion, a converter for number format conversion, a converter for letter case conversion, etc., such as date format conversion, text The date format in the data is "XXXX year XX month XX day", and the date format is required to be "XXXX/XX/XX" when importing into the business system, and the date in the text data is converted by calling the converter for converting the date format , The date format is required as the processed data when importing into the business system. When the format of the text data in the document to be imported is different from the data storage format of the business system, the business system can call the converter to perform the format conversion by using the converter name of the data format conversion in the annotation data. The code logic for format conversion does not need to develop code logic such as how to determine which converter to use for format conversion, just call it directly according to the converter name.
当批注数据为对象名称和数据有效性验证代码时,运行数据有效性验证代码,对文本数据中被批注内容进行数据有效性验证,获得有效数据作为处理后的数据,如:通过运行该代码,对文本数据中的数据进行有效数据的范围和规则进行验证,当不符合相应的范围或规则时,会忽略相关的数据,并进行记录,符合的数据为处理后的数据。可以验证年龄、手机号、IP地址等,也可以自定义验证规则,例如年龄验证,文本数据中的年龄数据的有效范围是18-65岁,则批注数据为″${age,max=65,min=18}″。当待导入文档中的文本数据中存在错误数据、或一些无需导入业务系统的数据时,业务系统通过运行批注数据中数据有效性验证代码即可,可以从待导入文档中的文本数据提取出符合的数据导入,无需大量在业务系统开发和搭建进行数据有效性验证代码,直接运行即可。When the annotated data is the object name and data validity verification code, run the data validity verification code to verify the data validity of the annotated content in the text data, and obtain the valid data as the processed data, such as: by running the code, The data in the text data is validated by valid data scope and rules. When it does not meet the corresponding scope or rules, the relevant data will be ignored and recorded. The data that meets the requirements are processed data. You can verify age, mobile phone number, IP address, etc., and you can customize the verification rules, such as age verification. The valid range of the age data in the text data is 18-65, and the annotation data is "${age, max=65, min=18}". When there is error data in the text data in the document to be imported, or some data that does not need to be imported into the business system, the business system can run the data validity verification code in the annotation data, which can extract the corresponding data from the text data in the document to be imported. Data import without the need to develop and build a large amount of data validity verification code in the business system, just run it directly.
步骤S280,将处理后的数据根据批注数据导入到业务系统中。Step S280: Import the processed data into the business system according to the annotation data.
如:当前需要录入业务系统的是年龄,则从进行年龄验证后获得的处理后的数据中,获取年龄数据,映射到业务系统的对象或结构体中。For example, if it is the age that needs to be entered into the business system, the age data is obtained from the processed data obtained after age verification and mapped to the object or structure of the business system.
上述文档数据导入方法,通过当接收到携带有待导入文档的文档数据导入指令时,根据待导入文档的文件格式调用对应的解析程序,对待导入文档进行解析,获取待导入文档 中的文本数据及批注数据;批注数据可以对文本数据进行处理,根据批注数据对文本数据进行处理后,根据批注数据中的对象名称映射到业务系统的对象或结构体中。无需更改业务系统中的代码,避免大量修改系统代码的工作,减少了开发工作量,也降低了业务系统的复杂度,提高了业务系统的运行速度。The above-mentioned document data import method, when a document data import instruction carrying a document to be imported is received, the corresponding parsing program is called according to the file format of the document to be imported, the document to be imported is parsed, and the text data and comments in the document to be imported are obtained Data; Annotation data can process text data. After processing the text data according to the annotation data, it is mapped to the object or structure of the business system according to the object name in the annotation data. There is no need to change the code in the business system, avoiding a large amount of work of modifying the system code, reducing the development workload, reducing the complexity of the business system, and improving the operating speed of the business system.
在其中一个实施例中,将处理后的数据根据批注数据导入到业务系统中的步骤,包括:根据批注数据中的对象名称,确定对象名称与处理后的数据的对应关系;根据对象名称与处理后的数据的对应关系,将处理后的数据映射到业务系统的对象或结构体中。In one of the embodiments, the step of importing the processed data into the business system according to the annotation data includes: determining the correspondence between the object name and the processed data according to the object name in the annotation data; and processing according to the object name The corresponding relationship of the subsequent data maps the processed data to the object or structure of the business system.
对象是业务系统中的某一个成分。结构体是一种数据结构,是C语言中聚合数据类型的一类。批注数据中的对象名称与业务系统中的对象或结构体变量名称相匹配,通过该对象名称可以确定将批注的文本数据填充到业务系统的什么位置,通过确定对象名称与处理后的数据的对应关系,将处理后的数据映射到与对象名称相匹配的业务系统的对象或结构体中。The object is a certain component in the business system. Structure is a kind of data structure, a kind of aggregate data type in C language. The object name in the annotation data matches the object or structure variable name in the business system. The object name can be used to determine where to fill the annotation text data in the business system. By determining the correspondence between the object name and the processed data Relationship, which maps the processed data to the object or structure of the business system that matches the object name.
在其中一个实施例中,在接收到携带有待导入文档的文档数据导入指令的步骤之前,还包括:获取预导入文档;调用批注脚本文件对预导入文档进行批注处理,获得待导入文档。In one of the embodiments, before the step of receiving the document data import instruction carrying the document to be imported, the method further includes: obtaining the pre-imported document; calling the annotation script file to perform annotation processing on the pre-imported document to obtain the document to be imported.
预导入文档是记录了需要导入业务系统的图文数据,且没有批注批注数据的文档。通过批注脚本文件对预导入文档进行批注处理,该批注脚本文件用于对预导入文档进行批注,该批注脚本文件根据预导入文档的格式布局编写对应的批注程序,如:Word文档,运行批注脚本文件,找到Word文档对应的段,批注上对应段的批注数据,获得记录了需要导入业务系统的图文数据,且批注有批注数据的待导入文档,通过调用批注脚本文件对预导入文档进行批注处理,可以提高文档数据导入的效率。The pre-imported document is a document that records the graphic data that needs to be imported into the business system and does not have annotated data. Annotate the pre-imported document through the annotation script file. The annotation script file is used to annotate the pre-imported document. The annotation script file writes the corresponding annotation program according to the format and layout of the pre-imported document, such as: Word document, run the annotation script File, find the corresponding paragraph of the Word document, annotate the annotation data of the corresponding paragraph, obtain the document to be imported that records the graphic data that needs to be imported into the business system, and annotate the document to be imported with the annotation data, and annotate the pre-imported document by calling the annotation script file Processing can improve the efficiency of document data import.
在其中一个实施例中,一种文档数据导入方法,举例进行说明,例子如下:In one of the embodiments, a method for importing document data is illustrated by an example, and the example is as follows:
有一批调研数据需要导入到业务系统中,来源于人工采集后手工录入Word文档的,数据有可能录入有误,文档中的数据有姓名、年龄(最小0岁,最大120岁)、手机号(国内运营商),身高(单位厘米,最低30厘米,最高230厘米,取整数)、体重(单位为公斤,最低1.0公斤,最高200.0公斤)。There is a batch of survey data that needs to be imported into the business system. It is derived from manual collection and manually entered into the Word document. The data may be entered incorrectly. The data in the document includes name, age (minimum 0 years old, maximum 120 years old), mobile phone number ( Domestic operators), height (unit: cm, minimum 30 cm, maximum 230 cm, rounded), weight (unit: kg, minimum 1.0 kg, maximum 200.0 kg).
通过在该Word文档中选中文档中的数据(即文本数据)进行批注,批注的批注数据为:Annotate by selecting the data (ie text data) in the document in the Word document, the annotation data of the annotation is:
姓名:${name}Name: ${name}
年龄:${age,min=0,max=120}Age: ${age, min=0, max=120}
手机号:${mobile,type=″mobile″}Mobile phone number: ${mobile, type="mobile"}
身高:${height,min=30,max=230}Height: ${height, min=30, max=230}
体重:${weight,type=″decimal″,min=1.0,max=200.0}Weight: ${weight, type="decimal", min=1.0, max=200.0}
业务系统导入的代码编写如下数据结构:The code imported into the business system compiles the following data structure:
Figure PCTCN2020098708-appb-000001
Figure PCTCN2020098708-appb-000001
Figure PCTCN2020098708-appb-000002
Figure PCTCN2020098708-appb-000002
在导入时,会将通过批注数据进行数据有效性验证,获得有效数据作为处理后的数据,映射到新实例出的Person对象,没有通过数据有效性验证的数据将记录下来,并在后续进行提示。When importing, the data validity verification will be carried out through the annotation data, and the valid data will be obtained as the processed data and mapped to the newly instanced Person object. The data that has not passed the data validity verification will be recorded and prompted later .
上述文档数据导入方法,通过当接收到携带有待导入文档的文档数据导入指令时,根据待导入文档的文件格式调用对应的解析程序,对待导入文档进行解析,获取待导入文档中的文本数据及批注数据;批注数据可以对文本数据进行处理,根据批注数据对文本数据进行处理后,根据批注数据中的对象名称映射到业务系统的对象或结构体中。无需更改业务系统中的代码,避免大量修改系统代码的工作,减少了开发工作量,也降低了业务系统的复杂度,提高了业务系统的运行速度。通过调用批注脚本文件对预导入文档进行批注处理,可以提高文档数据导入的效率。The above-mentioned document data import method, when a document data import instruction carrying a document to be imported is received, the corresponding parsing program is called according to the file format of the document to be imported, the document to be imported is parsed, and the text data and comments in the document to be imported are obtained Data; Annotation data can process text data. After processing the text data according to the annotation data, it is mapped to the object or structure of the business system according to the object name in the annotation data. There is no need to change the code in the business system, avoiding a large amount of work of modifying the system code, reducing the development workload, reducing the complexity of the business system, and improving the operating speed of the business system. By calling the annotation script file to perform annotation processing on the pre-imported document, the efficiency of document data import can be improved.
在其中一个实施例中,如图3所示,提供了一种文档数据导出方法,以该方法应用于图1中的服务器为例进行说明,包括以下步骤:In one of the embodiments, as shown in FIG. 3, a method for exporting document data is provided. Taking the method applied to the server in FIG. 1 as an example for description, the method includes the following steps:
步骤S420,当接收到文档数据导出指令时,根据文档数据导出指令获取对应的导出文档模板。In step S420, when the document data export instruction is received, a corresponding export document template is obtained according to the document data export instruction.
导出文档模板是用于接收写入的图文数据的文档,导出文档模板至少一个以上,可以根据文档格式预先设置导出文档模板,如:导出文档模板可以包括:dox格式的导出文档模板、dcox格式的导出文档模板、xls格式的导出文档模板、pdf格式的导出文档模板等等。还可以根据需要导出的数据的数据类型设置导出文档模板,如:某一类数据到导出前需要使用某一个特定的处理后写入导出文档模板,则根据数据类型预先设置导出文档模板等等。文档数据导出指令中携带了待导出数据的相关信息,当接收到文档数据导出指令时,根据文档数据导出指令中待导出数据的相关信息确定导出文档格式,根据导出文档格式确定导出文档模板的获取路径;根据获取路径获取导出文档模板。The export document template is used to receive the written graphic data. At least one export document template can be preset according to the document format. For example, the export document template can include: export document template in dox format, dcox format The export document template of, the export document template of xls format, the export document template of pdf format and so on. The export document template can also be set according to the data type of the data to be exported. For example, a certain type of data needs to be written into the export document template after a specific processing before being exported, and the export document template is preset according to the data type and so on. The document data export instruction carries the relevant information of the data to be exported. When the document data export instruction is received, the export document format is determined according to the relevant information of the data to be exported in the document data export instruction, and the export document template is determined according to the export document format. Path; Obtain the export document template according to the obtained path.
文档模板获取路径可以是从磁盘文件获取,也可是用户通过终端上传的文档模板,还可以是远程过程调用获取。根据导出文档模板中被批注选中的位置为写入待导出数据的位置,对应批注的批注数据用于对待导出数据进行处理。The path for obtaining the document template can be obtained from a disk file, a document template uploaded by the user through the terminal, or a remote procedure call. According to the position selected by the annotation in the export document template as the position where the data to be exported is written, the annotation data corresponding to the annotation is used to process the data to be exported.
步骤S440,对导出文档模板进行解析,提取批注数据。In step S440, the exported document template is parsed, and the annotation data is extracted.
批注数据中可以是对象名称,也可以是对象名称和数据格式转换的转换器名称,还可以是对象名称和表达式。对象名称指导出时目标数据结构中变量名称或导出时来源数据结构中变量名称,对象名称可以由代码形成,也可以由预定义规则自动生成。对象名称与待 导出数据的对象或结构体变量名称相匹配,表示将待导出数据填充到对应批注位置。例子:比如有一个数据结构中有两个成员变量,分别为name和age,那么可以在模板的批注中可以填写类似于″${name}″和″${age}″,匹配到数据结构中的name和age成员变量。在实际应用中,模板通常是预先编写或生成的,但数据是后续填写的,不一定统一。例如常见的日期时间格式转换,只需要日期,但来源数据中可能会包含时间部分,就需要转换成日期格式。表达式类似于Excel中的公式,可以提供额外的计算、统计、分支判断等功能。比如需要提供某种计算功能,可以提供一个方法名称来表示。例如个税计算功能,输入参数为薪资收入,那么可以在批注中填写${tax,expr=″tax(salary)″},输出时内容就是个税缴纳的金额。The annotation data can be the object name, the object name and the name of the converter for data format conversion, or the object name and expression. The object name guides the variable name in the target data structure when exporting or the variable name in the source data structure when exporting. The object name can be formed by code or automatically generated by predefined rules. The object name matches the name of the object or structure variable of the data to be exported, which means that the data to be exported is filled into the corresponding comment position. Example: For example, there are two member variables in a data structure, namely name and age, then you can fill in the comments of the template similar to "${name}" and "${age}" to match the data structure The name and age member variables. In practical applications, the template is usually pre-written or generated, but the data is filled in afterwards and may not be uniform. For example, the common date and time format conversion requires only the date, but the source data may contain a time part, which needs to be converted into a date format. Expressions are similar to formulas in Excel and can provide additional functions such as calculations, statistics, and branch judgments. For example, if you need to provide a certain calculation function, you can provide a method name to indicate it. For example, for a tax calculation function, the input parameter is salary income, then you can fill in ${tax, expr="tax(salary)"} in the remarks, and the output content is the amount of tax paid.
步骤S460,根据批注数据,对业务系统中待导出数据进行处理,获得处理后的数据。In step S460, the data to be exported in the business system is processed according to the annotation data, and the processed data is obtained.
批注数据中可以是对象名称,也可以是对象名称和数据格式转换的转换器名称,还可以是对象名称和表达式。The annotation data can be the object name, the object name and the name of the converter for data format conversion, or the object name and expression.
在其中一个实施例中,根据批注数据,对业务系统中待导出数据进行处理,获得处理后的数据的步骤,包括:当批注数据仅为对象名称时,根据对象名称,获取业务系统中与对象名称对应的待导出数据作为处理后的数据;当批注数据为对象名称和数据格式转换的转换器名称时,根据转换器名称调用对应的转换器,对业务系统中与对象名称对应的待导出数据进行格式转换,获得处理后的数据;当批注数据为对象名称和表达式时,调用表达式引擎解析和执行表达式,对业务系统中与对象名称对应的待导出数据进行数据处理,获得处理后的数据。In one of the embodiments, the step of processing the data to be exported in the business system according to the annotation data to obtain the processed data includes: when the annotation data is only the object name, according to the object name, obtaining the data associated with the object in the business system The data to be exported corresponding to the name is used as the processed data; when the annotation data is the name of the object name and the converter name for data format conversion, the corresponding converter is called according to the converter name, and the data to be exported corresponding to the object name in the business system is called Perform format conversion to obtain processed data; when the annotated data is an object name and expression, the expression engine is called to parse and execute the expression, and the data to be exported corresponding to the object name in the business system is processed, and the processed data is obtained. The data.
当批注数据为对象名称时,对象名称与待导出数据的对象或结构体变量名称相匹配,表示将待导出数据填充到对应批注位置,根据对象名称,获取业务系统中与对象名称对应的待导出数据作为处理后的数据,直接填充到对应批注位置即可,如:待导出数据无需任何处理,是可以直接写入导出文档模板的,通过批注的批注数据中的对象名称,确定待导出数据应填充的位置,将待导出数据写入导出文档模板对应位置即可,可以提高待导出数据的导出效率。When the annotation data is the object name, the object name matches the object or structure variable name of the data to be exported, which means that the data to be exported is filled in the corresponding annotation position, and the object name corresponding to the object name in the business system is obtained according to the object name. As processed data, the data can be directly filled into the corresponding annotation position. For example, the data to be exported does not require any processing, and can be directly written into the export document template. The object name in the annotated data can be used to determine the application of the data to be exported. To fill in the position, just write the data to be exported into the corresponding position of the export document template, which can improve the export efficiency of the data to be exported.
当批注数据为对象名称和数据格式转换的转换器名称时,根据转换器名称调用对应的转换器,对业务系统中与对象名称对应的待导出数据进行格式转换,获得处理后的数据,转换器名称与转换器一一对应,转换器可以包括用于日期格式转换的转换器、用于数字格式转换的转换器、用于字母大小写转换的转换器等等,如日期格式转换,业务系统的日期格式是″XXXX/XX/XX″,导出文档模板需要的日期格式是″XXXX年XX月XX日″,通过调用用于转换日期格式的转换器对业务系统中的日期进行转换,获得导出文档模板需要的日期格式的数据作为处理后的数据。当待导出数据的格式与导出文档模板的格式不同时,业务系统通过批注数据中数据格式转换的转换器名称调用转换器进行格式转换后,根据对象名称填入导出文档模板即可,无需大量在业务系统开发如何进行格式转换的代码逻辑,无需开发如何确定用什么转换器进行格式转换等代码逻辑,直接根据转换器名称调用 即可。When the annotation data is the name of the converter for the object name and data format conversion, the corresponding converter is called according to the converter name, the format conversion of the data to be exported corresponding to the object name in the business system is performed, and the processed data is obtained. The name corresponds to the converter one-to-one. The converter can include a converter for date format conversion, a converter for digital format conversion, a converter for letter case conversion, etc., such as date format conversion, business system The date format is "XXXX/XX/XX", and the date format required for exporting the document template is "XXXX year XX month XX day". The date in the business system is converted by calling the converter for converting the date format to obtain the exported document The data in the date format required by the template is used as the processed data. When the format of the data to be exported is different from the format of the exported document template, the business system uses the converter name of the data format conversion in the annotation data to call the converter to perform the format conversion, and then fill in the exported document template according to the object name. The business system develops the code logic of how to perform format conversion, without the need to develop code logic such as how to determine which converter to use for format conversion, just call it directly according to the name of the converter.
当批注数据为对象名称和表达式时,调用表达式引擎解析和执行表达式,对业务系统中与对象名称对应的待导出数据进行数据处理,获得处理后的数据;实际应用中,为了实现一些公式无法满足的情况,或提供一些外部数据交换功能,会通过表达式引擎对表达式进行解析和执行,表达式可以加载自定义函数,实现更灵活的数据处理功能。如:有一批员工薪酬信息在业务系统中,需要根据员工薪酬信息导出薪资表格,薪资表格中需要有姓名、应发薪资、个税扣除金额、实发薪资,薪资表格的有些数据需要通过员工薪酬信息进行计算获得,则在导出文档模板中批注对应的计算公式,在导出时,基于员工薪酬信息直接执行对应的计算公式获得应发薪资、个税扣除金额、实发薪资等等。无需大量在业务系统开发表达式的代码逻辑,直接根据批注数据中的表达式调用表达式引擎解析和执行表达式即可。When the annotation data is the object name and expression, the expression engine is called to parse and execute the expression, and the data to be exported corresponding to the object name in the business system is processed to obtain the processed data; in actual applications, in order to achieve some If the formula cannot be satisfied, or provide some external data exchange functions, the expression will be parsed and executed through the expression engine. The expression can be loaded with custom functions to achieve more flexible data processing functions. For example: there is a batch of employee salary information in the business system, and it is necessary to export the salary table based on the employee salary information. The salary table needs to include the name, the salary that should be paid, the amount of tax deduction, and the actual salary. Some data in the salary table need to pass the employee salary When the information is calculated and obtained, the corresponding calculation formula is annotated in the export document template. When exporting, the corresponding calculation formula is directly executed based on the employee salary information to obtain the salary payable, the amount of personal tax deduction, the actual salary, etc. There is no need to develop a lot of expression code logic in the business system, just call the expression engine to parse and execute the expression directly according to the expression in the annotation data.
步骤S480,根据批注数据中的对象名称将处理后的数据写入导出文档模板对应的位置。In step S480, the processed data is written into the position corresponding to the exported document template according to the object name in the annotation data.
根据批注数据中的对象名称将处理后的数据写入导出文档模板对应的位置,如:比如Excel工作簿中批注填写在工作表的列上,那么处理后的数据填入它下方的单元格或批注中指定起止单元格。Write the processed data into the corresponding location of the exported document template according to the object name in the annotation data. For example, if the annotation in the Excel workbook is filled in the column of the worksheet, then the processed data is filled in the cell below it or Specify the start and end cells in the comment.
上述文档数据导出方法,通过当接收到文档数据导出指令时,根据文档数据导出指令获取对应的导出文档模板;对导出文档模板进行解析,提取批注数据,批注数据可以对待导出数据进行处理;对业务系统中待导出数据进行处理,获得处理后的数据;根据批注数据中的对象名称将所述处理后的数据写入导出文档模板对应的位置。无需更改业务系统中的代码,避免大量修改系统代码的工作,减少了开发工作量,也降低了业务系统的复杂度,提高了业务系统的运行速度。The above-mentioned document data export method, when receiving the document data export instruction, obtain the corresponding exported document template according to the document data export instruction; analyze the exported document template, extract the annotation data, and the annotation data can be processed for the exported data; The data to be exported in the system is processed to obtain the processed data; the processed data is written into the position corresponding to the export document template according to the object name in the annotation data. There is no need to change the code in the business system, avoiding a large amount of work of modifying the system code, reducing the development workload, reducing the complexity of the business system, and improving the operating speed of the business system.
在其中一个实施例中,一种文档数据导出方法,举例进行说明,例子如下:In one of the embodiments, a method for exporting document data is illustrated with an example, and the example is as follows:
有一批员工薪酬信息在业务系统中,需要导出到表格,表格需要的数据有姓名、应发薪资、个税扣除金额、实发薪资。There is a group of employee salary information in the business system that needs to be exported to a table. The data required by the table includes name, salary to be paid, individual tax deduction amount, and actual salary.
导出文档模板中编写如下批注的批注数据为:The annotation data of the following annotations in the export document template is:
姓名:${name}Name: ${name}
应发薪资:${total,type=″decimal″,min=2200.0}Salary payable: ${total, type="decimal", min=2200.0}
个税扣除:${tax,expr=″tax(total)″}Tax deduction: ${tax, expr="tax(total)"}
实发薪资:${final,type=″decimal″,expr=″${total}-${tax}″}Actual salary: ${final, type="decimal", expr="${total}-${tax}"}
业务系统导出的代码编写如下数据结构:The code exported by the business system writes the following data structure:
Figure PCTCN2020098708-appb-000003
Figure PCTCN2020098708-appb-000003
Figure PCTCN2020098708-appb-000004
Figure PCTCN2020098708-appb-000004
在导出时,经过解析批注数据中的表达式,调用编写的″tax″方法计算个税扣除金额,并计算实发薪资。When exporting, after parsing the expression in the annotation data, call the written "tax" method to calculate the tax deduction amount and calculate the actual salary.
应该理解的是,虽然图2-3的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-3中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that, although the various steps in the flowchart of FIGS. 2-3 are displayed in sequence as indicated by the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless specifically stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least some of the steps in Figure 2-3 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. These sub-steps or stages The execution order of is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
在其中一个实施例中,如图4所示,提供了一种文档数据导入装置,包括:格式分析模块310、文档解析模块320、第一数据处理模块330和数据导入模块340,其中:In one of the embodiments, as shown in FIG. 4, a document data import device is provided, which includes: a format analysis module 310, a document analysis module 320, a first data processing module 330, and a data import module 340, wherein:
格式分析模块310,用于当接收到携带有待导入文档的文档数据导入指令时,对待导入文档的文件格式进行分析,确定待导入文档的文件格式;The format analysis module 310 is configured to analyze the file format of the document to be imported when a document data import instruction carrying the document to be imported is received, and determine the file format of the document to be imported;
文档解析模块320,用于根据待导入文档的文件格式调用对应的解析程序,对待导入文档进行解析,获取待导入文档中的文本数据及批注数据;The document parsing module 320 is configured to call a corresponding parsing program according to the file format of the document to be imported, parse the document to be imported, and obtain text data and annotation data in the document to be imported;
第一数据处理模块330,用于根据批注数据对文本数据进行处理,获得处理后的数据;及The first data processing module 330 is used to process the text data according to the annotation data to obtain the processed data; and
数据导入模块340,用于将处理后的数据根据批注数据导入到业务系统中。The data import module 340 is used to import the processed data into the business system according to the annotation data.
在其中一个实施例中,第一数据处理模块330还用于:当批注数据仅为对象名称时,获取文本数据中被批注内容作为处理后的数据;当批注数据为对象名称和数据格式转换的转换器名称时,根据转换器名称调用对应的转换器,对文本数据中被批注内容进行格式转换,获得处理后的数据;当批注数据为对象名称和数据有效性验证代码时,运行数据有效性验证代码,对文本数据中被批注内容进行数据有效性验证,获得有效数据作为处理后的数据。In one of the embodiments, the first data processing module 330 is also used to: when the annotation data is only the object name, obtain the annotated content in the text data as the processed data; when the annotation data is converted from the object name and data format When converting the name of the converter, call the corresponding converter according to the converter name to convert the annotated content in the text data to obtain the processed data; when the annotated data is the object name and the data validity verification code, the data validity is run The verification code is used to verify the data validity of the annotated content in the text data, and obtain valid data as the processed data.
在其中一个实施例中,数据导入模块340还用于:根据批注数据中的对象名称,确定对象名称与处理后的数据的对应关系;根据对象名称与处理后的数据的对应关系,将处理后的数据映射到业务系统的对象或结构体中。In one of the embodiments, the data import module 340 is also used to: determine the correspondence between the object name and the processed data according to the object name in the annotation data; according to the correspondence between the object name and the processed data, the processed data The data is mapped to the object or structure of the business system.
在其中一个实施例中,如图5所示,文档数据导入装置还包括批注处理模块350,用于获取预导入文档;调用批注脚本文件对预导入文档进行批注处理,获得待导入文档。In one of the embodiments, as shown in FIG. 5, the document data importing device further includes an annotation processing module 350 for obtaining the pre-imported document; calling an annotation script file to perform an annotation processing on the pre-imported document to obtain the document to be imported.
在其中一个实施例中,如图6所示,提供了一种文档数据导出装置,包括:模板获取模块510、模板解析模块520、第二数据处理模块530和数据导出模块540,其中:In one of the embodiments, as shown in FIG. 6, a document data export device is provided, including: a template acquisition module 510, a template analysis module 520, a second data processing module 530, and a data export module 540, wherein:
模板获取模块510,用于当接收到文档数据导出指令时,根据所述文档数据导出指令获取对应的导出文档模板;The template obtaining module 510 is configured to obtain a corresponding export document template according to the document data export instruction when a document data export instruction is received;
模板解析模块520,用于对所述导出文档模板进行解析,提取批注数据;The template analysis module 520 is configured to analyze the exported document template and extract annotation data;
第二数据处理模块530,用于根据所述批注数据,对业务系统中待导出数据进行处理,获得处理后的数据;及The second data processing module 530 is configured to process the data to be exported in the business system according to the annotation data to obtain the processed data; and
数据导出模块540,用于根据所述批注数据中的对象名称将所述处理后的数据写入导出文档模板对应的位置。The data export module 540 is configured to write the processed data into the location corresponding to the export document template according to the object name in the annotation data.
在其中一个实施例中,第二数据处理模块530还用于:当批注数据仅为对象名称时,根据对象名称,获取业务系统中与对象名称对应的待导出数据作为处理后的数据;当批注数据为对象名称和数据格式转换的转换器名称时,根据转换器名称调用对应的转换器,对业务系统中与对象名称对应的待导出数据进行格式转换,获得处理后的数据;当批注数据为对象名称和表达式时,调用表达式引擎解析和执行表达式,对业务系统中与对象名称对应的待导出数据进行数据处理,获得处理后的数据。In one of the embodiments, the second data processing module 530 is further configured to: when the annotation data is only the object name, according to the object name, obtain the data to be exported corresponding to the object name in the business system as the processed data; When the data is the name of the converter for the object name and data format conversion, the corresponding converter is called according to the converter name, and the data to be exported corresponding to the object name in the business system is formatted to obtain the processed data; when the annotation data is When the object name and expression are used, the expression engine is called to parse and execute the expression, and the data to be exported corresponding to the object name in the business system is processed to obtain the processed data.
关于文档数据导入装置的具体限定可以参见上文中对于文档数据导入方法的限定,在此不再赘述。上述文档数据导入装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the document data importing device, please refer to the above limitation of the document data importing method, which will not be repeated here. Each module in the above-mentioned document data importing device can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
关于文档数据导出装置的具体限定可以参见上文中对于文档数据导出方法的限定,在此不再赘述。上述文档数据导出装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Regarding the specific limitation of the document data exporting device, please refer to the above limitation of the document data exporting method, which will not be repeated here. Each module in the above-mentioned document data exporting device can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
在其中一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图7所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储文档数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种文档数据导入方法或/和一种文档数据导出方法。In one of the embodiments, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. 7. The computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer readable instructions, and a database. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. The database of the computer equipment is used to store document data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer readable instruction is executed by the processor, a method for importing document data or/and a method for exporting document data is realized.
本领域技术人员可以理解,图7示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 7 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. The specific computer equipment may include More or fewer parts than shown in the figure, or some parts are combined, or have a different arrangement of parts.
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器执行上述文档数据导入方法的步骤。A computer device includes a memory and one or more processors. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the one or more processors execute the steps of the document data importing method.
一个或多个存储有计算机可读指令的计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述文档数据导入方法的步骤;其中,该计算机可读存储介质可以是非易失性,也可以是易失性的。One or more computer-readable storage media storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the above-mentioned document data import method; wherein, the The computer-readable storage medium may be non-volatile or volatile.
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器执行上述文档数据导出方法的步骤。A computer device includes a memory and one or more processors. The memory stores computer readable instructions. When the computer readable instructions are executed by the processor, the one or more processors execute the steps of the document data export method.
一个或多个存储有计算机可读指令的计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行文档数据导出方法的步骤;其中,该计算机可读存储介质可以是非易失性,也可以是易失性的。One or more computer-readable storage media storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the method for exporting document data; wherein, the computer The readable storage medium may be non-volatile or volatile.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the methods of the foregoing embodiments can be implemented by instructing relevant hardware through computer-readable instructions. The computer-readable instructions can be stored in a non-volatile computer. In a readable storage medium, when the computer-readable instructions are executed, they may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database, or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered as the range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the scope of the invention patent. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can be made, and these all fall within the protection scope of this application. Therefore, the scope of protection of the patent of this application shall be subject to the appended claims.

Claims (20)

  1. 一种文档数据导入方法,包括:A method for importing document data, including:
    当接收到携带有待导入文档的文档数据导入指令时,对所述待导入文档的文件格式进行分析,确定所述待导入文档的文件格式;When receiving a document data import instruction carrying a document to be imported, analyze the file format of the document to be imported to determine the file format of the document to be imported;
    根据待导入文档的文件格式调用对应的解析程序,对所述待导入文档进行解析,获取所述待导入文档中的文本数据及批注数据;Call a corresponding parsing program according to the file format of the document to be imported, parse the document to be imported, and obtain text data and annotation data in the document to be imported;
    根据所述批注数据对所述文本数据进行处理,获得处理后的数据;及Process the text data according to the annotation data to obtain processed data; and
    将所述处理后的数据根据所述批注数据导入到业务系统中。Import the processed data into the business system according to the annotation data.
  2. 根据权利要求1所述的方法,其中,所述根据所述批注数据对所述文本数据进行处理,获得处理后的数据的步骤,包括:The method according to claim 1, wherein the step of processing the text data according to the annotation data to obtain the processed data comprises:
    当所述批注数据仅为对象名称时,获取所述文本数据中被批注内容作为处理后的数据;When the annotation data is only the object name, acquiring the annotated content in the text data as the processed data;
    当所述批注数据为对象名称和数据格式转换的转换器名称时,根据所述转换器名称调用对应的转换器,对所述文本数据中被批注内容进行格式转换,获得处理后的数据;及When the annotation data is the name of the converter converted from the object name and the data format, invoking the corresponding converter according to the converter name to perform format conversion on the annotated content in the text data to obtain the processed data; and
    当所述批注数据为对象名称和数据有效性验证代码时,运行所述数据有效性验证代码,对所述文本数据中被批注内容进行数据有效性验证,获得有效数据作为处理后的数据。When the annotated data is the object name and the data validity verification code, the data validity verification code is run to perform data validity verification on the annotated content in the text data, and the valid data is obtained as the processed data.
  3. 根据权利要求2所述的方法,其中,所述将所述处理后的数据根据所述批注数据导入到业务系统中的步骤,包括:The method according to claim 2, wherein the step of importing the processed data into a business system according to the annotation data comprises:
    根据所述批注数据中的对象名称,确定所述对象名称与所述处理后的数据的对应关系;及Determine the correspondence between the object name and the processed data according to the object name in the annotation data; and
    根据所述对象名称与所述处理后的数据的对应关系,将所述处理后的数据映射到业务系统的对象或结构体中。According to the correspondence between the object name and the processed data, the processed data is mapped to the object or structure of the business system.
  4. 根据权利要求1所述的方法,其中,在所述接收到携带有待导入文档的文档数据导入指令的步骤之前,所述方法还包括:The method according to claim 1, wherein before the step of receiving the document data import instruction carrying the document to be imported, the method further comprises:
    获取预导入文档;及Obtain pre-imported documents; and
    调用批注脚本文件对预导入文档进行批注处理,获得所述待导入文档。Call the annotation script file to perform annotation processing on the pre-imported document, and obtain the document to be imported.
  5. 一种文档数据导出方法,包括:A method for exporting document data, including:
    当接收到文档数据导出指令时,根据所述文档数据导出指令获取对应的导出文档模板;When receiving a document data export instruction, obtain a corresponding export document template according to the document data export instruction;
    对所述导出文档模板进行解析,提取批注数据;Parse the exported document template and extract annotation data;
    根据所述批注数据,对业务系统中待导出数据进行处理,获得处理后的数据;及According to the annotation data, process the data to be exported in the business system to obtain the processed data; and
    根据所述批注数据中的对象名称将所述处理后的数据写入导出文档模板对应的位置。Write the processed data into the location corresponding to the exported document template according to the object name in the annotation data.
  6. 根据权利要求5所述的方法,其中,所述根据所述批注数据,对业务系统中待导出数据进行处理,获得处理后的数据的步骤,包括:The method according to claim 5, wherein the step of processing the data to be exported in the business system according to the annotation data to obtain the processed data comprises:
    当所述批注数据仅为对象名称时,根据所述对象名称,获取业务系统中与所述对象名 称对应的待导出数据作为处理后的数据;When the annotation data is only the object name, according to the object name, obtain the data to be exported corresponding to the object name in the business system as the processed data;
    当所述批注数据为对象名称和数据格式转换的转换器名称时,根据所述转换器名称调用对应的转换器,对业务系统中与所述对象名称对应的待导出数据进行格式转换,获得处理后的数据;及When the annotation data is the name of the object name and the converter name of the data format conversion, the corresponding converter is called according to the converter name, the format conversion of the data to be exported corresponding to the object name in the business system is performed, and the processing is obtained. After the data; and
    当所述批注数据为对象名称和表达式时,调用表达式引擎解析和执行所述表达式,对业务系统中与所述对象名称对应的待导出数据进行数据处理,获得处理后的数据。When the annotation data is an object name and an expression, the expression engine is called to parse and execute the expression, and the data to be exported corresponding to the object name in the business system is processed to obtain the processed data.
  7. 一种文档数据导入装置,包括:A document data importing device, including:
    格式分析模块,用于当接收到携带有待导入文档的文档数据导入指令时,对所述待导入文档的文件格式进行分析,确定所述待导入文档的文件格式;The format analysis module is configured to analyze the file format of the document to be imported when receiving the document data import instruction carrying the document to be imported, and determine the file format of the document to be imported;
    文档解析模块,用于根据待导入文档的文件格式调用对应的解析程序,对所述待导入文档进行解析,获取所述待导入文档中的文本数据及批注数据;The document parsing module is configured to call a corresponding parsing program according to the file format of the document to be imported, parse the document to be imported, and obtain text data and annotation data in the document to be imported;
    第一数据处理模块,用于根据所述批注数据对所述文本数据进行处理,获得处理后的数据;及The first data processing module is configured to process the text data according to the annotation data to obtain processed data; and
    数据导入模块,用于将所述处理后的数据根据所述批注数据导入到业务系统中。The data import module is used to import the processed data into the business system according to the annotation data.
  8. 一种文档数据导出装置,包括:A document data export device, including:
    模板获取模块,用于当接收到文档数据导出指令时,根据所述文档数据导出指令获取对应的导出文档模板;A template obtaining module, configured to obtain a corresponding export document template according to the document data export instruction when the document data export instruction is received;
    模板解析模块,用于对所述导出文档模板进行解析,提取批注数据;A template parsing module for parsing the exported document template and extracting annotation data;
    第二数据处理模块,用于根据所述批注数据,对业务系统中待导出数据进行处理,获得处理后的数据;及The second data processing module is used to process the data to be exported in the business system according to the annotation data to obtain the processed data; and
    数据导出模块,用于根据所述批注数据中的对象名称将所述处理后的数据写入导出文档模板对应的位置。The data export module is configured to write the processed data into the location corresponding to the export document template according to the object name in the annotation data.
  9. 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device includes a memory and one or more processors. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the one or more processors, the one or more Each processor performs the following steps:
    当接收到携带有待导入文档的文档数据导入指令时,对所述待导入文档的文件格式进行分析,确定所述待导入文档的文件格式;When receiving a document data import instruction carrying a document to be imported, analyze the file format of the document to be imported to determine the file format of the document to be imported;
    根据待导入文档的文件格式调用对应的解析程序,对所述待导入文档进行解析,获取所述待导入文档中的文本数据及批注数据;Call a corresponding parsing program according to the file format of the document to be imported, parse the document to be imported, and obtain text data and annotation data in the document to be imported;
    根据所述批注数据对所述文本数据进行处理,获得处理后的数据;及Process the text data according to the annotation data to obtain processed data; and
    将所述处理后的数据根据所述批注数据导入到业务系统中。Import the processed data into the business system according to the annotation data.
  10. 根据权利要求9所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 9, wherein the processor further executes the following steps when executing the computer readable instruction:
    当所述批注数据仅为对象名称时,获取所述文本数据中被批注内容作为处理后的数据;When the annotation data is only the object name, acquiring the annotated content in the text data as the processed data;
    当所述批注数据为对象名称和数据格式转换的转换器名称时,根据所述转换器名称调用对应的转换器,对所述文本数据中被批注内容进行格式转换,获得处理后的数据;及When the annotation data is the name of the converter converted from the object name and the data format, invoking the corresponding converter according to the converter name to perform format conversion on the annotated content in the text data to obtain the processed data; and
    当所述批注数据为对象名称和数据有效性验证代码时,运行所述数据有效性验证代码,对所述文本数据中被批注内容进行数据有效性验证,获得有效数据作为处理后的数据。When the annotated data is the object name and the data validity verification code, the data validity verification code is run to perform data validity verification on the annotated content in the text data, and the valid data is obtained as the processed data.
  11. 根据权利要求10所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 10, wherein the processor further executes the following steps when executing the computer-readable instructions:
    根据所述批注数据中的对象名称,确定所述对象名称与所述处理后的数据的对应关系;及Determine the correspondence between the object name and the processed data according to the object name in the annotation data; and
    根据所述对象名称与所述处理后的数据的对应关系,将所述处理后的数据映射到业务系统的对象或结构体中。According to the correspondence between the object name and the processed data, the processed data is mapped to the object or structure of the business system.
  12. 根据权利要求9所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 9, wherein the processor further executes the following steps when executing the computer readable instruction:
    获取预导入文档;及Obtain pre-imported documents; and
    调用批注脚本文件对预导入文档进行批注处理,获得所述待导入文档。Call the annotation script file to perform annotation processing on the pre-imported document, and obtain the document to be imported.
  13. 一个或多个存储有计算机可读指令的计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:One or more computer-readable storage media storing computer-readable instructions, which when executed by one or more processors, cause the one or more processors to perform the following steps:
    当接收到携带有待导入文档的文档数据导入指令时,对所述待导入文档的文件格式进行分析,确定所述待导入文档的文件格式;When receiving a document data import instruction carrying a document to be imported, analyze the file format of the document to be imported to determine the file format of the document to be imported;
    根据待导入文档的文件格式调用对应的解析程序,对所述待导入文档进行解析,获取所述待导入文档中的文本数据及批注数据;Call a corresponding parsing program according to the file format of the document to be imported, parse the document to be imported, and obtain text data and annotation data in the document to be imported;
    根据所述批注数据对所述文本数据进行处理,获得处理后的数据;及Process the text data according to the annotation data to obtain processed data; and
    将所述处理后的数据根据所述批注数据导入到业务系统中。Import the processed data into the business system according to the annotation data.
  14. 根据权利要求13所述的存储介质,其中,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 13, wherein the following steps are further performed when the computer-readable instructions are executed by the processor:
    当所述批注数据仅为对象名称时,获取所述文本数据中被批注内容作为处理后的数据;When the annotation data is only the object name, acquiring the annotated content in the text data as the processed data;
    当所述批注数据为对象名称和数据格式转换的转换器名称时,根据所述转换器名称调用对应的转换器,对所述文本数据中被批注内容进行格式转换,获得处理后的数据;及When the annotation data is the name of the converter converted from the object name and the data format, invoking the corresponding converter according to the converter name to perform format conversion on the annotated content in the text data to obtain the processed data; and
    当所述批注数据为对象名称和数据有效性验证代码时,运行所述数据有效性验证代码,对所述文本数据中被批注内容进行数据有效性验证,获得有效数据作为处理后的数据。When the annotated data is the object name and the data validity verification code, the data validity verification code is run to perform data validity verification on the annotated content in the text data, and the valid data is obtained as the processed data.
  15. 根据权利要求14所述的存储介质,其中,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 14, wherein the following steps are further performed when the computer-readable instructions are executed by the processor:
    根据所述批注数据中的对象名称,确定所述对象名称与所述处理后的数据的对应关系;及Determine the correspondence between the object name and the processed data according to the object name in the annotation data; and
    根据所述对象名称与所述处理后的数据的对应关系,将所述处理后的数据映射到业务 系统的对象或结构体中。According to the correspondence between the object name and the processed data, the processed data is mapped to the object or structure of the business system.
  16. 根据权利要求13所述的存储介质,其中,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 13, wherein the following steps are further performed when the computer-readable instructions are executed by the processor:
    获取预导入文档;及Obtain pre-imported documents; and
    调用批注脚本文件对预导入文档进行批注处理,获得所述待导入文档。Call the annotation script file to perform annotation processing on the pre-imported document, and obtain the document to be imported.
  17. 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device includes a memory and one or more processors. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the one or more processors, the one or more Each processor performs the following steps:
    当接收到文档数据导出指令时,根据所述文档数据导出指令获取对应的导出文档模板;When receiving a document data export instruction, obtain a corresponding export document template according to the document data export instruction;
    对所述导出文档模板进行解析,提取批注数据;Parse the exported document template and extract annotation data;
    根据所述批注数据,对业务系统中待导出数据进行处理,获得处理后的数据;及According to the annotation data, process the data to be exported in the business system to obtain the processed data; and
    根据所述批注数据中的对象名称将所述处理后的数据写入导出文档模板对应的位置。Write the processed data into the location corresponding to the exported document template according to the object name in the annotation data.
  18. 根据权利要求17所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 17, wherein the processor further executes the following steps when executing the computer-readable instructions:
    当所述批注数据仅为对象名称时,根据所述对象名称,获取业务系统中与所述对象名称对应的待导出数据作为处理后的数据;When the annotation data is only the object name, obtain the data to be exported corresponding to the object name in the business system as the processed data according to the object name;
    当所述批注数据为对象名称和数据格式转换的转换器名称时,根据所述转换器名称调用对应的转换器,对业务系统中与所述对象名称对应的待导出数据进行格式转换,获得处理后的数据;及When the annotation data is the name of the object name and the converter name of the data format conversion, the corresponding converter is called according to the converter name, the format conversion of the data to be exported corresponding to the object name in the business system is performed, and the processing is obtained. After the data; and
    当所述批注数据为对象名称和表达式时,调用表达式引擎解析和执行所述表达式,对业务系统中与所述对象名称对应的待导出数据进行数据处理,获得处理后的数据。When the annotation data is an object name and an expression, the expression engine is called to parse and execute the expression, and the data to be exported corresponding to the object name in the business system is processed to obtain the processed data.
  19. 一个或多个存储有计算机可读指令的计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:One or more computer-readable storage media storing computer-readable instructions, which when executed by one or more processors, cause the one or more processors to perform the following steps:
    当接收到文档数据导出指令时,根据所述文档数据导出指令获取对应的导出文档模板;When receiving a document data export instruction, obtain a corresponding export document template according to the document data export instruction;
    对所述导出文档模板进行解析,提取批注数据;Parse the exported document template and extract annotation data;
    根据所述批注数据,对业务系统中待导出数据进行处理,获得处理后的数据;及According to the annotation data, process the data to be exported in the business system to obtain the processed data; and
    根据所述批注数据中的对象名称将所述处理后的数据写入导出文档模板对应的位置。Write the processed data into the location corresponding to the exported document template according to the object name in the annotation data.
  20. 根据权利要求19所述的存储介质,其中,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 19, wherein the following steps are further performed when the computer-readable instructions are executed by the processor:
    当所述批注数据仅为对象名称时,根据所述对象名称,获取业务系统中与所述对象名称对应的待导出数据作为处理后的数据;When the annotation data is only the object name, obtain the data to be exported corresponding to the object name in the business system as the processed data according to the object name;
    当所述批注数据为对象名称和数据格式转换的转换器名称时,根据所述转换器名称调用对应的转换器,对业务系统中与所述对象名称对应的待导出数据进行格式转换,获得处 理后的数据;及When the annotation data is the name of the object name and the converter name of the data format conversion, the corresponding converter is called according to the converter name, the format conversion of the data to be exported corresponding to the object name in the business system is performed, and the processing is obtained. After the data; and
    当所述批注数据为对象名称和表达式时,调用表达式引擎解析和执行所述表达式,对业务系统中与所述对象名称对应的待导出数据进行数据处理,获得处理后的数据。When the annotation data is an object name and an expression, the expression engine is called to parse and execute the expression, and the data to be exported corresponding to the object name in the business system is processed to obtain the processed data.
PCT/CN2020/098708 2020-03-20 2020-06-29 Document data importing method and apparatus, document data exporting method and apparatus, and storage medium WO2021184574A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010200051.4A CN111460017A (en) 2020-03-20 2020-03-20 Document data import method, document data export method, device and storage medium
CN202010200051.4 2020-03-20

Publications (1)

Publication Number Publication Date
WO2021184574A1 true WO2021184574A1 (en) 2021-09-23

Family

ID=71682933

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/098708 WO2021184574A1 (en) 2020-03-20 2020-06-29 Document data importing method and apparatus, document data exporting method and apparatus, and storage medium

Country Status (2)

Country Link
CN (1) CN111460017A (en)
WO (1) WO2021184574A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115659929A (en) * 2022-10-24 2023-01-31 南京涵韬信息科技有限公司 Multi-document-based annotation interaction method and system
CN115827310A (en) * 2023-02-21 2023-03-21 成都天成电科科技有限公司 Information verification method and device, storage medium and electronic equipment

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115391439B (en) * 2022-08-24 2023-04-07 中化现代农业有限公司 Document data export method, device, electronic equipment and storage medium
CN115618841A (en) * 2022-11-29 2023-01-17 明度智云(浙江)科技有限公司 Document export method, device, equipment and storage medium
CN117272953B (en) * 2023-11-15 2024-03-12 明度智云(浙江)科技有限公司 Automatic document information filling method, system and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9753908B2 (en) * 2007-11-05 2017-09-05 The Neat Company, Inc. Method and system for transferring data from a scanned document into a spreadsheet
CN109783558A (en) * 2018-12-28 2019-05-21 益萃网络科技(中国)有限公司 Introduction method, device, computer equipment and the storage medium of Excel data
CN110147402A (en) * 2019-05-22 2019-08-20 北大方正集团有限公司 Excel file introduction method and equipment, deriving method and equipment
CN110377563A (en) * 2019-07-23 2019-10-25 中国工商银行股份有限公司 Document handling method and device and electronic equipment and readable storage medium storing program for executing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9753908B2 (en) * 2007-11-05 2017-09-05 The Neat Company, Inc. Method and system for transferring data from a scanned document into a spreadsheet
CN109783558A (en) * 2018-12-28 2019-05-21 益萃网络科技(中国)有限公司 Introduction method, device, computer equipment and the storage medium of Excel data
CN110147402A (en) * 2019-05-22 2019-08-20 北大方正集团有限公司 Excel file introduction method and equipment, deriving method and equipment
CN110377563A (en) * 2019-07-23 2019-10-25 中国工商银行股份有限公司 Document handling method and device and electronic equipment and readable storage medium storing program for executing

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115659929A (en) * 2022-10-24 2023-01-31 南京涵韬信息科技有限公司 Multi-document-based annotation interaction method and system
CN115659929B (en) * 2022-10-24 2023-09-15 南京涵韬信息科技有限公司 Annotating interaction method and system based on multiple documents
CN115827310A (en) * 2023-02-21 2023-03-21 成都天成电科科技有限公司 Information verification method and device, storage medium and electronic equipment
CN115827310B (en) * 2023-02-21 2023-05-23 成都天成电科科技有限公司 Information verification method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN111460017A (en) 2020-07-28

Similar Documents

Publication Publication Date Title
WO2021184574A1 (en) Document data importing method and apparatus, document data exporting method and apparatus, and storage medium
CN109947789B (en) Method, device, computer equipment and storage medium for processing data of multiple databases
CN110909226B (en) Financial document information processing method and device, electronic equipment and storage medium
WO2021184571A1 (en) Dynamic form generation method, apparatus, computer device, and storage medium
WO2019169725A1 (en) Test data generation method, device, and apparatus, and computer readable storage medium
WO2021003913A1 (en) Method and device for processing annotation information, computer apparatus, and storage medium
JP2019520615A (en) Character recognition method, device, server and storage medium of claim document for damages
WO2019134340A1 (en) Salary calculation method, application server, and computer readable storage medium
CN110162524B (en) Configuration data management method, device, computer equipment and storage medium
CN110780860A (en) Generation method and device of table building script, computer equipment and storage medium
CN114357943A (en) Universal efficient Excel reading processing method, tool, medium and equipment
CN111177113A (en) Data migration method and device, computer equipment and storage medium
WO2021051501A1 (en) Sql extraction method and apparatus, computer device, and storage medium
CN110647350A (en) Interface document generation method and device, computer equipment and storage medium
CN117077650B (en) Document generation system, method, equipment and medium based on dynamic template configuration
CN113158988A (en) Financial statement processing method and device and computer readable storage medium
CN115904482B (en) Interface document generation method, device, equipment and storage medium
WO2023115833A1 (en) Streaming document generation method, computing device, and computer readable medium
CN115905397A (en) Visual display method, device, system and medium for business data
CN116579580A (en) Method, device, computer equipment and storage medium for processing bill
CN115758973A (en) Method, device and equipment for generating chip register design file and storage medium
CN109767072A (en) Accreditation data creation method, device, computer equipment and storage medium
CN112559541B (en) Document auditing method, device, equipment and storage medium
WO2021217915A1 (en) Human-machine dialog method and apparatus, and computer device and storage medium
CN113761858A (en) Form data processing method and device, computer equipment and storage medium

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: 20925676

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 1205 DATED 11/01/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20925676

Country of ref document: EP

Kind code of ref document: A1