File fast exporting method and device based on configuration and medium

By generating multiple file export templates and logically configuring them based on configuration, the problems of complex and inefficient traditional data export methods are solved, and the satisfaction of diversified export needs is achieved and efficient and accurate export effects are achieved.

CN119474013APending Publication Date: 2025-02-18浪潮数字粮储科技有限公司
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411520184.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The traditional data export method has complex operation, single export format, and low efficiency, which is difficult to meet the diverse export needs of users, and there may be problems such as inconsistent data or erroneous formats.

Method used

Using a configuration-based file quick export method, by setting multiple file export formats and export information corresponding to the export display content, generating file export templates, and performing field configuration and logical configuration according to field types, binding data to be queried to generate export files .

Benefits of technology

It realizes support for multiple file export formats, simplifies export operations, improves export efficiency, data accuracy and completeness, and enhances system flexibility and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119474013A_ABST
    Figure CN119474013A_ABST
Patent Text Reader

Abstract

The invention discloses a configuration-based file fast exporting method and device and a medium, and relates to the technical field of data processing. The method comprises the steps that multiple file export formats are set, and export display content corresponding to export information is set for each file export format so as to obtain a file export template corresponding to each file export format; performing field configuration on the export information according to a field type corresponding to the export information in the export display content, and performing logic configuration on the corresponding export information based on each configured file export template; and determining export information logic corresponding to the data query request of the user, and binding to-be-queried data corresponding to the export information logic with the field of the export information in the corresponding file export template to generate a corresponding export file for export. Through flexible configuration, repeated coding is reduced, the export requirements of various file formats and various display forms can be met, and the bidirectional efficiency of research and development and users is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a configuration-based rapid file export method, device and medium. Background Art

[0002] At present, with the widespread application of information systems, offline document circulation, archiving and other business needs in daily work management are gradually shifting to online processing. This change has promoted the popularization of function export in daily work, and the rapid and efficient realization of data export has become the focus of users. However, traditional data export methods often have problems such as complex operation, single export format, and low efficiency, which makes it difficult to meet the diverse export needs of users.

[0003] In response to the above problems, some solutions have appeared in the prior art to try to solve the low efficiency of data export. However, these solutions often require a lot of repeated coding to achieve data export in different formats and presentation forms, which not only increases R&D costs, but also reduces the maintainability and flexibility of the system. In addition, some solutions may have problems such as data inconsistency or format errors when exporting data, affecting the quality of export and user experience. Summary of the invention

[0004] The embodiments of the present application provide a configuration-based fast file export method, device and medium to solve the above technical problems.

[0005] On the one hand, an embodiment of the present application provides a configuration-based file rapid export method, including:

[0006] Set multiple file export formats, and for each file export format, set the export display content corresponding to the export information to obtain the file export template corresponding to each file export format;

[0007] According to the field type corresponding to the export information in the export display content, the export information is configured with fields, and based on each configured file export template, the corresponding export information is logically configured; the field type includes a fixed type and a dynamic type, and the dynamic type includes an array format and a collection format;

[0008] The export information logic corresponding to the user's data query request is determined, and the to-be-queried data corresponding to the export information logic is bound to the fields of the export information in the corresponding file export template to generate a corresponding export file for export.

[0009] In one implementation of the present application, for each file export format, the export display content corresponding to the export information is set to obtain a file export template corresponding to each file export format, specifically including:

[0010] For the export information of the Word file export format and the PDF file export format, determine the dynamically changing parts in the Word file and the PDF file, and determine the data format and the dynamically changing position corresponding to the dynamically changing parts;

[0011] Determine, according to the data format, replaceable English letters corresponding to the dynamically changing part, so as to perform data binding based on the replaceable English letters;

[0012] Fill in the replaceable English letters to the dynamically changing position, and set the corresponding export display content to obtain the corresponding file export template.

[0013] In one implementation of the present application, for each file export format, the export display content corresponding to the export information is set to obtain a file export template corresponding to each file export format, specifically including:

[0014] For the export information of the Excel file export format, set the export name and number of sheets corresponding to the Excel file, and set the corresponding sheet display format for each sheet;

[0015] The sheet display format includes: title, subtitle, display column, cell attributes, style attributes, and whether to paginate. The cell attributes include: text, number, currency, date, column width, and whether to total. The style attributes include: font type, font color, cell color, and whether to bold.

[0016] Based on the export name, number of sheets and corresponding sheet display format of the Excel file, the export display content of the Excel file is determined to obtain the corresponding file export template.

[0017] In one implementation of the present application, according to the field type corresponding to the exported information in the exported display content, the field configuration of the exported information specifically includes:

[0018] For the exported information whose field type is a solid-state type, the field of the exported information of the solid-state type is named according to the first naming rule, and the exported information of the solid-state type is set to be a one-to-one original position field replacement;

[0019] For the export information whose field type is a dynamic type, the field of the export information of the dynamic type is named according to the second naming rule, and the field of the export information of the dynamic type is allowed to be extended, and the field of the export information of the dynamic type is automatically filled.

[0020] In an implementation of the present application, for the export information whose field type is a dynamic type, the field of the export information of the dynamic type is named according to the second naming rule, specifically including:

[0021] For the export information whose dynamic type is array format, the fields of the export information in array format are named in an array manner, and the fields in the numbers in the array naming are written according to the third naming rule to obtain the field names in array format;

[0022] For the export information whose dynamic type is a set format, the fields of the export information in the set format are named in a set manner, and the fields in the set in the set naming are written according to the third naming rule to obtain the field names in the set format.

[0023] In one implementation of the present application, for each file export format, after setting the export display content corresponding to the export information to obtain a file export template corresponding to each file export format, the method further includes:

[0024] Set a unique identification code for each file export template to obtain the corresponding template number;

[0025] Based on each configured file export template, perform logical configuration for the corresponding export information, including:

[0026] Determine a file export template corresponding to the export information and a template number corresponding to the file export template, and set an export information number matching the template number for the export information;

[0027] The corresponding query logic is configured for the export information, and the query logic is bound to the corresponding template number and export information number; the query logic includes SQL statements and code logic.

[0028] In one implementation of the present application, configuring corresponding query logic for the export information specifically includes:

[0029] Determine the field name corresponding to the exported information, and write an SQL statement corresponding to the query field consistent with the field name according to the field name;

[0030] According to the export display content corresponding to the export information, the specified display format corresponding to the display field in the export information is determined, and according to the specified display format, the code logic corresponding to the export information is written.

[0031] In one implementation of the present application, the export information logic corresponding to the user's data query request is determined, and the data to be queried corresponding to the export information logic is bound to the field of the export information in the corresponding file export template to generate the corresponding export file for export, specifically including:

[0032] Receive a data query request from a user, and query the export information logic corresponding to the data query request to obtain the to-be-queried data corresponding to the export information logic;

[0033] The data to be queried is bound to the export information field in the corresponding file export template to replace the field to be replaced in the file export template, and a corresponding export file is generated for export.

[0034] On the other hand, an embodiment of the present application further provides a configuration-based file rapid export device, the device comprising:

[0035] at least one processor;

[0036] and, a memory communicatively coupled to the at least one processor;

[0037] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the configuration-based fast file export method as described above.

[0038] On the other hand, an embodiment of the present application further provides a non-volatile computer storage medium storing computer executable instructions, which, when executed, implements a configuration-based rapid file export method as described above.

[0039] The present application provides a configuration-based file rapid export method, device and medium, which at least have the following beneficial effects:

[0040] By supporting multiple file export formats, it can meet users' different file needs and improve the flexibility and applicability of the system; through the preset export display content, users do not need to perform tedious format settings every time when exporting files, which greatly simplifies the operation process; by distinguishing between fixed types and dynamic types, and further subdividing the dynamic types, it can better adapt to different types of data export needs and ensure the accuracy and completeness of the data; logical configuration based on the configured file export template can greatly shorten the export time and improve the export efficiency; the separation of field configuration and logical configuration makes the system easier to maintain and manage. When the export format needs to be modified or updated, only the corresponding configuration needs to be adjusted; by determining the export information logic corresponding to the user's data query request, it can ensure that the exported file content accurately matches the user's needs and avoid the export of invalid data; by binding the data to be queried with the fields in the export template, users do not need to manually select and fill in fields when exporting files, which improves user experience and satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0042] Figure 1 A flowchart of a configuration-based file rapid export method provided in an embodiment of the present application;

[0043] Figure 2 A schematic diagram of the internal structure of a configuration-based file rapid export device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0045] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0046] Figure 1 A flowchart of a configuration-based file rapid export method provided in an embodiment of the present application.

[0047] The analysis method involved in the embodiments of the present application can be implemented by a terminal device or a server, and the present application does not impose any special restrictions on this. For the convenience of understanding and description, the following embodiments are described in detail by taking a server as an example.

[0048] It should be noted that the server may be a single device or a system consisting of multiple devices, that is, a distributed server, and this application does not make any specific limitation on this.

[0049] like Figure 1 As shown, a configuration-based file fast export method provided in an embodiment of the present application includes:

[0050] 101. Set multiple file export formats, and for each file export format, set the export display content corresponding to the export information to obtain a file export template corresponding to each file export format.

[0051] Specifically, in one embodiment of the present application, for each file export format, the export display content corresponding to the export information is set to obtain a file export template corresponding to each file export format, specifically including:

[0052] For the export information of the Word file export format and the PDF file export format, determine the dynamically changing parts in the Word file and the PDF file, and determine the data format and the dynamically changing position corresponding to the dynamically changing parts;

[0053] According to the data format, determine the replaceable English letters corresponding to the dynamically changing part, so as to perform data binding based on the replaceable English letters;

[0054] Fill in the replaceable English letters in the dynamically changing position and set the corresponding export display content to obtain the corresponding file export template.

[0055] In one embodiment, assume that there is a system that needs to export user reports to Word and PDF formats. These reports contain some fixed content, such as titles, introductions, etc., and also contain some dynamically changing parts, such as user specific data, report generation date, etc.

[0056] For Word file export format, it is necessary to determine the dynamically changing parts including the user name, report generation date, and various data indicators of the user. These dynamic contents are distributed in various paragraphs of the report. For PDF file export format, due to the typesetting characteristics of PDF, in addition to determining the dynamically changing parts that are the same as Word, special attention should be paid to the page layout and paging position to ensure the correct display of dynamic content in PDF.

[0057] For user names, the data format is a string, and the dynamic change position is at the beginning of the report. For report generation date, the data format is a date type, and the dynamic change position is at the footer or below the title of the report. For each user's data indicator, the data format may be a number or a string, and the dynamic change position is in the body of the report, and each indicator corresponds to a specific paragraph.

[0058] Assign a unique replaceable English letter to each dynamically changing part. For example, the user name is represented by {USERNAME}, the report generation date is represented by {DATE}, and various data indicators are represented by {DATA1}, {DATA2}, etc. In the system background, write logic code to bind the user's specific data to these replaceable English letters. When exporting the report, the system will automatically replace the bound data to the corresponding position.

[0059] For the Word file export template, directly insert replaceable English letters, such as {USERNAME}, {DATE}, etc., into the Word document, and set the corresponding display attributes such as font, size, color, etc. For the PDF file export template, you may need to use a specific PDF generation tool or library to create the template, and specify the position and display style of the replaceable English letters in the template. After the above steps, you will get the file export templates in Word and PDF formats, which contain fixed report content and dynamically changing placeholders.

[0060] In one embodiment of the present application, for each file export format, export display content corresponding to the export information is set to obtain a file export template corresponding to each file export format, specifically including:

[0061] For the export information of the Excel file export format, set the export name and number of sheets corresponding to the Excel file, and set the corresponding sheet display format for each sheet;

[0062] The sheet display format includes: title, subtitle, display column, cell attributes, style attributes, and whether to paginate. Cell attributes include: text, number, currency, date, column width, and whether to total. Style attributes include: font type, font color, cell color, and whether to bold.

[0063] Based on the export name, number of sheets and corresponding sheet display format of the Excel file, the export display content of the Excel file is determined to obtain the corresponding file export template.

[0064] In one embodiment, suppose that an Excel file export function needs to be designed for a sales data analysis system. The system needs to export an Excel file containing multiple worksheets, each of which displays different types of data and analysis results. The export name is set to "2023 Q1 Sales Data Analysis Report.xlsx". The number of sheets is set to 3, named "Overall Sales Overview", "Product Sales Details" and "Regional Sales Comparison" respectively.

[0065] For each sheet, set the corresponding sheet display format: Overall sales overview:

[0066] Title: Set to "Overview of sales in Q1 2023". Subtitle: None. Display columns: including "Month", "Sales", and "Year-on-year growth rate". Cell properties: Month is text type, sales and year-on-year growth rate are numeric types, and column width is automatically adjusted. Style properties: Title font type is bold Song, font color is dark blue, and cell color is light gray; data row font type is regular Song, font color is black, and there is no cell color. Whether to paginate: No.

[0067] Product sales details:

[0068] Title: Set to "Product Sales Details in Q1 2023". Subtitle: Set to "By Product Classification". Display columns: including "Product Name", "Sales Volume", "Sales Amount", and "Proportion". Cell properties: Product name is text type, sales volume and sales amount are number type, proportion is percentage type, column width is automatically adjusted, and sales amount column is set to total. Style properties: Title font type is bold Songti, font color is green, cell color is light yellow; data row font type is regular Songti, font color is black, no cell color; total row font is bold. Whether to paginate: Yes, paginate after each product classification.

[0069] Regional sales comparison:

[0070] Title: Set to "2023 Q1 Regional Sales Comparison". Subtitle: None. Display columns: including "Region", "Sales", and "Month-on-Month Growth". Cell properties: Region is text type, Sales is currency type (keep two decimal places), Month-on-Month Growth is percentage type, and column width is automatically adjusted. Style properties: Title font type is bold black, font color is red, and cell color is white; data row font type is regular Songti, font color is black, and cell color is light blue; if the month-on-month growth column is a positive number, the font color is green, and if it is a negative number, the font color is red. Whether to paginate: No.

[0071] Based on the above settings, the export display content of the Excel file is determined, including the file name, number of sheets, and display format of each sheet, and an Excel file export template is created according to these settings. The template contains the preset title, subtitle, display column, cell attributes and style attributes, as well as the setting of whether to paginate. When the user requests to export data, the system will generate an Excel file based on the user's specific data and the preset export template, and send the file to the user. The Excel file received by the user will be directly displayed in the preset format without the need for additional format adjustments.

[0072] 102. According to the field type corresponding to the export information in the export display content, the export information is configured with fields, and based on each configured file export template, logic configuration is performed for the corresponding export information.

[0073] It should be noted that the field types in the embodiments of the present application include fixed types and dynamic types, and the dynamic types include array formats and collection formats.

[0074] Specifically, in one embodiment of the present application, according to the field type corresponding to the exported information in the exported display content, the exported information is configured with fields, specifically including:

[0075] For the exported information whose field type is a solid type, the field of the exported information of the solid type is named according to the first naming rule, and the exported information of the solid type is set to be a one-to-one original position field replacement;

[0076] For the export information whose field type is a dynamic type, the field of the export information of the dynamic type is named according to the second naming rule, and the field of the export information of the dynamic type is allowed to be extended, and the field of the export information of the dynamic type is automatically filled.

[0077] In one embodiment, assume that a system for exporting user order information is being developed, and the system needs to process different types of fields, including solid types and dynamic types.

[0078] For the exported information whose field type is solid type, the first naming rule is adopted, that is, a concise and descriptive name is used to name the field of solid type. It should be noted that the first naming rule in the embodiment of the present application is to use G_number for naming. Since the field value of solid type is fixed and will not change with the change of order, these fields are set to one-to-one original position field replacement. When exporting, the system will directly replace the placeholder in the template with the corresponding field value.

[0079] For the export information of dynamic type, for the field of dynamic type, the second naming rule is adopted. The names of these fields usually contain more information, to reflect their dynamic characteristics. It should be noted that the second naming rule in the embodiment of the present application is to use D_numbering to name. Because the field of dynamic type may contain multiple values ​​(such as multiple commodities in an order), these fields are allowed to expand. When exporting, the system can dynamically generate corresponding rows or columns according to the actual number of commodities to accommodate these values, and automatically fill in according to actual data.

[0080] In one embodiment of the present application, for the export information whose field type is a dynamic type, the field of the export information of the dynamic type is named according to the second naming rule, which specifically includes:

[0081] For the export information whose dynamic type is array format, the fields of the export information in array format are named in an array manner, and the fields in the numbers in the array naming are written according to the third naming rule to obtain the field names in array format;

[0082] For the export information whose dynamic type is a set format, the fields of the export information in the set format are named in a set manner, and the fields in the set in the set naming are written according to the third naming rule to obtain the field names in the set format.

[0083] In one embodiment, assume that a data export system is being developed, and the system needs to process information containing dynamic type data, and the dynamic type data may be in array format or collection format.

[0084] For the exported information whose dynamic type is in array format, the field is named in an array manner, that is, a name representing an array is used. For the fields in the numbers in the array naming, the third naming rule is used for writing. This rule may require the field name to be descriptive, concise and easy to understand. For the exported information whose dynamic type is in set format, the field is named in a set manner. Similar to the array, a name representing the set is used. For the fields in the set in the set naming, the third naming rule is also applied for writing. It should be noted that the third naming rule in the embodiment of the present application is D_{set}.number for naming. The naming method of arrays and sets is specifically, array: naming rule D_[number], the fields in the numbers are numbered with D_{set}.; set: naming rule D_{set}, the fields in the set are numbered with D_{set}.

[0085] In one embodiment of the present application, for each file export format, after setting the export display content corresponding to the export information to obtain the file export template corresponding to each file export format, the following steps are included:

[0086] Set a unique identification code for each file export template to obtain the corresponding template number;

[0087] Based on each configured file export template, perform logical configuration for the corresponding export information, including:

[0088] Determine a file export template corresponding to the export information and a template number corresponding to the file export template, and set an export information number matching the template number for the export information;

[0089] Configure corresponding query logic for the exported information, and bind the query logic with the corresponding template number and the exported information number; the query logic includes SQL statements and code logic.

[0090] In one embodiment, assume that a data export system is being developed that supports multiple file export templates and can configure corresponding query logic for each template to obtain the data required for export. First, a set of file export templates are designed, which define the format, layout, and style of the exported files. For example, there may be an Excel template for exporting sales data and another CSV template for exporting user information. A unique template number is assigned to each file export template. For example, an Excel template may be assigned the number "T001" and a CSV template may be assigned the number "T002".

[0091] When a user requests to export specific data, the system generates export information based on the user's selections or inputs. These export information may include the data range to be exported, filter conditions, etc. Each export information is assigned an export information number that matches the template number. For example, if an Excel template is used to export sales data, the export information number may be "E001-S001", where "E001" indicates the Excel template and "S001" indicates that this is the first export information under the template.

[0092] Configure the corresponding query logic for each piece of exported information. The query logic is used to retrieve the data required for export from the database. It may include SQL statements and code logic. For example, for a request to export sales data, the query logic may include an SQL statement to query sales records, and some code logic to process the data (such as calculating totals, sorting, etc.).

[0093] Bind the configured query logic to the corresponding template number and export information number. In this way, when the system performs an export operation, it can find the corresponding query logic based on the export information number and use the correct template to format the data. Inside the system, maintain a mapping table or database to store these binding relationships. For example, a record may indicate "Export information number E001-S001 uses template number T001 and executes query logic XXX".

[0094] In one embodiment of the present application, the corresponding query logic is configured for exporting information, specifically including:

[0095] Determine the field name corresponding to the exported information, and write the SQL statement corresponding to the query field that is consistent with the field name according to the field name;

[0096] According to the export display content corresponding to the export information, determine the specified display format corresponding to the display field in the export information, and write the code logic corresponding to the export information according to the specified display format.

[0097] In one embodiment, the export information number is first set to be consistent with the set template number. Then, the query logic is written according to the number. This part of the logic rendering supports two types, specifically SQL statements and code logic.

[0098] When writing SQL statement logic, you need to determine the field name of the exported information and set the query field to be consistent with the field name. By writing code logic, the final display field is displayed using the specified display format of showContent ("field name", content).

[0099] 103. Determine the export information logic corresponding to the user's data query request, and bind the to-be-queried data corresponding to the export information logic with the fields of the export information in the corresponding file export template to generate a corresponding export file for export.

[0100] Specifically, in one embodiment of the present application, determining the export information logic corresponding to the user's data query request, and binding the to-be-queried data corresponding to the export information logic with the fields of the export information in the corresponding file export template to generate the corresponding export file for export, specifically includes:

[0101] Receive a data query request from a user, and query the export information logic corresponding to the data query request to obtain the to-be-queried data corresponding to the export information logic;

[0102] The data to be queried is bound to the export information field in the corresponding file export template to replace the field to be replaced in the file export template, and a corresponding export file is generated for export.

[0103] In one embodiment, it is assumed that a data export system is being developed, which allows users to export specific data by submitting data query requests. The user submits a data query request on the system's user interface. This request may contain information such as the type of data, range, and conditions that the user wants to export. The system receives this request and parses out the key information for subsequent processing.

[0104] The system queries the corresponding export information logic according to the user's data query request. The export information logic may include the database table, field, condition, etc. to be queried. The system maintains a database or configuration file corresponding to the export information logic, which stores the correspondence between various data query requests and the export information logic.

[0105] According to the queried export information logic, the system retrieves the data to be queried that the user needs from the database. Specifically, SQL statements or other database query languages ​​are used to perform this retrieval operation. Then, the system binds the retrieved data to be queried with the export information fields in the corresponding file export template. The file export template defines the format, layout and style of the export file, as well as the fields to be replaced that need to be replaced. After completing the binding operation, the system generates an export file containing the data required by the user, and provides the generated export file to the user for downloading or saving to a specified location. This file is in Word, PDF, or Excel format.

[0106] The above is an embodiment of the method proposed in this application. Based on the same inventive concept, the embodiment of this application also provides a configuration-based file fast export device, whose structure is as follows: Figure 2 shown.

[0107] Figure 2 The internal structure diagram of a configuration-based file rapid export device provided in an embodiment of the present application. Figure 2 As shown, the device includes:

[0108] at least one processor;

[0109] and, a memory communicatively coupled to the at least one processor;

[0110] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor to enable the at least one processor to:

[0111] Set multiple file export formats, and for each file export format, set the export display content corresponding to the export information to obtain the file export template corresponding to each file export format;

[0112] According to the field type corresponding to the exported information in the exported display content, the exported information is configured for fields, and based on each configured file export template, the corresponding exported information is logically configured; the field types include fixed types and dynamic types, and the dynamic types include array formats and collection formats;

[0113] Determine the export information logic corresponding to the user's data query request, and bind the to-be-queried data corresponding to the export information logic with the fields of the export information in the corresponding file export template to generate the corresponding export file for export.

[0114] The present application also provides a non-volatile computer storage medium storing computer executable instructions. When the computer executable instructions are executed, they can:

[0115] Set multiple file export formats, and for each file export format, set the export display content corresponding to the export information to obtain the file export template corresponding to each file export format;

[0116] According to the field type corresponding to the exported information in the exported display content, the exported information is configured for fields, and based on each configured file export template, the corresponding exported information is logically configured; the field types include fixed types and dynamic types, and the dynamic types include array formats and collection formats;

[0117] Determine the export information logic corresponding to the user's data query request, and bind the to-be-queried data corresponding to the export information logic with the fields of the export information in the corresponding file export template to generate the corresponding export file for export.

[0118] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0119] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0120] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.

[0121] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0122] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0123] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0124] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0125] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0126] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0127] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0128] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0129] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A configuration-based file rapid export method, characterized in that: The method comprises: Set multiple file export formats, and for each file export format, set the export display content corresponding to the export information to obtain the file export template corresponding to each file export format; According to the field type corresponding to the export information in the export display content, the export information is configured with fields, and based on each configured file export template, the corresponding export information is logically configured; the field type includes a fixed type and a dynamic type, and the dynamic type includes an array format and a collection format; The export information logic corresponding to the user's data query request is determined, and the to-be-queried data corresponding to the export information logic is bound to the fields of the export information in the corresponding file export template to generate a corresponding export file for export.

2. A configuration-based file rapid export method according to claim 1, characterized in that: For each file export format, set the export display content corresponding to the export information to obtain the file export template corresponding to each file export format, including: For the export information of the Word file export format and the PDF file export format, determine the dynamically changing parts in the Word file and the PDF file, and determine the data format and the dynamically changing position corresponding to the dynamically changing parts; Determine, according to the data format, replaceable English letters corresponding to the dynamically changing part, so as to perform data binding based on the replaceable English letters; Fill in the replaceable English letters to the dynamically changing position, and set the corresponding export display content to obtain the corresponding file export template.

3. The configuration-based file rapid export method according to claim 1, characterized in that: For each file export format, set the export display content corresponding to the export information to obtain the file export template corresponding to each file export format, including: For the export information of the Excel file export format, set the export name and number of sheets corresponding to the Excel file, and set the corresponding sheet display format for each sheet; The sheet display format includes: title, subtitle, display column, cell attributes, style attributes, and whether to paginate. The cell attributes include: text, number, currency, date, column width, and whether to total. The style attributes include: font type, font color, cell color, and whether to bold. Based on the export name, number of sheets and corresponding sheet display format of the Excel file, the export display content of the Excel file is determined to obtain the corresponding file export template.

4. The method for quickly exporting files based on configuration according to claim 1, characterized in that: According to the field type corresponding to the exported information in the exported display content, the exported information is configured with fields, specifically including: For the exported information whose field type is a solid-state type, the field of the exported information of the solid-state type is named according to the first naming rule, and the exported information of the solid-state type is set to be a one-to-one original position field replacement; For the export information whose field type is a dynamic type, the field of the export information of the dynamic type is named according to the second naming rule, and the field of the export information of the dynamic type is allowed to be extended, and the field of the export information of the dynamic type is automatically filled.

5. A configuration-based file rapid export method according to claim 4, characterized in that: For the exported information whose field type is dynamic type, the field of the exported information of dynamic type is named according to the second naming rule, which specifically includes: For the export information whose dynamic type is array format, the fields of the export information in array format are named in an array manner, and the fields in the numbers in the array naming are written according to the third naming rule to obtain the field names in array format; For the export information whose dynamic type is a set format, the fields of the export information in the set format are named in a set manner, and the fields in the set in the set naming are written according to the third naming rule to obtain the field names in the set format.

6. The method for quickly exporting files based on configuration according to claim 1, characterized in that: For each file export format, after setting the export display content corresponding to the export information to obtain a file export template corresponding to each file export format, the method further includes: Set a unique identification code for each file export template to obtain the corresponding template number; Based on each configured file export template, perform logical configuration for the corresponding export information, including: Determine a file export template corresponding to the export information and a template number corresponding to the file export template, and set an export information number matching the template number for the export information; The corresponding query logic is configured for the export information, and the query logic is bound to the corresponding template number and export information number; the query logic includes SQL statements and code logic.

7. A configuration-based file rapid export method according to claim 6, characterized in that: Configuring corresponding query logic for the exported information specifically includes: Determine the field name corresponding to the exported information, and write an SQL statement corresponding to the query field consistent with the field name according to the field name; According to the export display content corresponding to the export information, the specified display format corresponding to the display field in the export information is determined, and according to the specified display format, the code logic corresponding to the export information is written.

8. The method for quickly exporting files based on configuration according to claim 1, characterized in that: Determine the export information logic corresponding to the user's data query request, and bind the to-be-queried data corresponding to the export information logic with the fields of the export information in the corresponding file export template to generate a corresponding export file for export, specifically including: Receive a data query request from a user, and query the export information logic corresponding to the data query request to obtain the to-be-queried data corresponding to the export information logic; The data to be queried is bound to the export information field in the corresponding file export template to replace the field to be replaced in the file export template, and a corresponding export file is generated for export.

9. A configuration-based file rapid export device, characterized in that: The device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a configuration-based file rapid export method as described in any one of claims 1-8.

10. A non-volatile computer storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed, a configuration-based fast file export method as described in any one of claims 1 to 8 is implemented.

Citation Information

Cited By

  • Table data file dynamic exporting method and device, electronic equipment and storage medium

    CN121233652A