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

By dynamically updating the header configuration information, the problem of frequent configuration file modifications in existing technologies is solved, enabling user-demand-driven dynamic Excel file data export, thus improving efficiency and stability.

CN121233652APending Publication Date: 2025-12-30SHENZHEN LANYOU TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511362187.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-23
Publication Date
2025-12-30

AI Technical Summary

Technical Problem

In existing technologies, backend Excel file data export solutions require frequent modifications to the export framework's configuration file to adapt to user needs, resulting in high development and maintenance costs, susceptibility to configuration errors, and complex, inefficient, and unstable data export processes.

Method used

By obtaining data export requests from the front end, the static header configuration information is dynamically updated, including the export column configuration parameters, and dynamic header configuration information is generated. Backend data is dynamically exported to the front end according to user needs, avoiding the need to modify the configuration file every time.

Benefits of technology

It improves data export efficiency, enhances the stability of web applications, and ensures that data is displayed dynamically according to user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121233652A_ABST
    Figure CN121233652A_ABST
Patent Text Reader

Abstract

The invention discloses a table data file dynamic exporting method and device, electronic equipment and a storage medium, and relates to the technical field of network application programs. The method comprises the steps that a data export request triggered by a front end is acquired, and the data export request comprises query condition parameters and export column configuration parameters; reading static header configuration information from a preset export configuration file; according to the export column configuration parameters, dynamically updating export processing rule information in the static header configuration information to obtain dynamically updated dynamic header configuration information; and according to the query condition parameters and the dynamic export header configuration information, performing data export on the target data platform to obtain a target table data file. According to the method, the export column configuration parameter is added in the data export request triggered by the front end, and the static header configuration information is dynamically updated by using the export column configuration parameter, so that the back-end data is dynamically exported according to the front-end data export request, the export efficiency is improved, and the stability of a network application program is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of web application technology, and in particular to a method, apparatus, electronic device, and storage medium for dynamically exporting tabular data files. Background Technology

[0002] A WebApp (Web Application) is a browser-based application that can be accessed and used via the internet without requiring download or installation. WebApps typically consist of a client (front-end) and a server (back-end). Users can send requests to the back-end from the front-end to query specific content in the back-end database. The back-end can then export the retrieved content and return it to the front-end, where it is displayed for the user to view. An Excel file is a common type of back-end database.

[0003] In current backend Excel file data export solutions, the data information in the Excel file is usually statically and fixedly exported according to the predefined configuration file in the export framework, with a fixed column order, field names, column headers, etc.

[0004] However, in real-world scenarios, users may want to dynamically adjust the columns displayed in the Excel file on the front end (e.g., adding, deleting, or modifying fields, or adjusting column order) due to their own needs. If the aforementioned backend Excel file data export solution is used, the predefined configuration file in the export framework must be modified each time according to the user's needs to export the backend Excel file data according to the customer's requirements. This not only results in high application development and maintenance costs, but also makes it easy for configuration errors to occur during frequent modifications to the predefined configuration file in the export framework, thus affecting data export. The data export process is complex, inefficient, and unstable. Summary of the Invention

[0005] The main objective of this application is to propose a method, apparatus, electronic device, and storage medium for dynamically exporting tabular data files, aiming to simplify the backend Excel file data export process, improve export efficiency, and enhance the stability of web applications.

[0006] In a first aspect, the present invention provides a method for dynamically exporting tabular data files, comprising: Obtain the data export request triggered by the front end. The data export request is an export request triggered for the current functional page displayed by the front end. The data export request includes: query condition parameters and export column configuration parameters. The static header configuration information is read from the preset export configuration file. The static header configuration information includes: data source definition information and export processing rule information. The data source definition information is used to define the target data platform to be exported, and the export processing rule information is used to define the table data content. Based on the exported column configuration parameters, the exported processing rule information in the static header configuration information is dynamically updated to obtain the dynamically updated dynamic header configuration information. Based on the query condition parameters and the dynamic export header configuration information, the target data platform is exported to obtain the target table data file.

[0007] In an optional implementation, the data export request further includes: export encoding information, which indicates the type of this export function; the export processing rule information includes: preset title information and preset column configuration information, which indicates the preset file name; The step of dynamically updating the export processing rule information in the static header configuration information according to the exported column configuration parameters to obtain the dynamically updated dynamic header configuration information includes: Based on the exported encoding information, the preset title information in the exported processing rule information is updated, and based on the exported column configuration parameters, the preset column configuration information in the exported processing rule information is updated to obtain the dynamic header configuration information.

[0008] In an optional implementation, the exported column configuration parameters include: format attribute information of multiple exported columns, wherein the format attribute information of multiple exported columns is used to define the column order, header name, and display format in the target table data file; the step of updating the preset column configuration information in the export processing rule information according to the exported column configuration parameters includes: The format attribute information of the multiple exported columns is used to populate and update the preset column configuration information in the export processing rule information.

[0009] In an optional implementation, the export processing rule information further includes: default header indication information, which is used to indicate whether the default header style is adopted; The step of filling and updating the preset column configuration information in the export processing rule information with the format attribute information of the multiple exported columns includes: If the default header indication information indicates that the default header style is not used, then the format attribute information of the multiple exported columns will be filled and updated to the preset column configuration information in the export processing rule information.

[0010] In an optional implementation, the data export request further includes: information of the current operating user; the export processing rule information further includes: watermark configuration information, watermark activation status, and extended behavior configuration information, wherein the watermark configuration information is used to indicate the addition of a dynamic watermark in the target table data file, the watermark activation status is used to indicate whether the watermark addition function is activated, and the extended behavior configuration information is used to indicate whether the column width is automatically adjusted according to the content. The method further includes: If the watermark activation status indicates that the watermark addition function has been activated, then the watermark configuration information in the export processing rule information is updated according to the information of the current user.

[0011] In an optional implementation, the export processing rule information further includes: data item mapping rules, which are used to indicate the mapping relationship between exported data fields and template columns in the data template.

[0012] In an optional implementation, before exporting data from the target data platform to obtain a target table data file based on the query condition parameters and the dynamically exported table header configuration information, the method further includes: Determine whether the dynamic column configuration information in the export processing rules of the dynamic header configuration information is empty; If the dynamic column configuration information is not empty, then determine whether the dynamic column configuration information has a serial number column; If the dynamic column configuration information does not have a serial number column, a default serial number column is added to the dynamic column configuration information. The default serial number column is used to indicate the addition of a serial number column in the target table data file.

[0013] Secondly, the present invention provides a device for dynamically exporting tabular data files, comprising: The acquisition module is used to acquire data export requests triggered by the front end. The data export request is an export request triggered for the current functional page displayed by the front end. The data export request includes: query condition parameters and export column configuration parameters. The configuration module is used to read static header configuration information from a preset export configuration file. The static header configuration information includes: data source definition information and export processing rule information. The data source definition information is used to define the target data platform to be exported, and the export processing rule information is used to define the table data content. The dynamic update module is used to dynamically update the export processing rule information in the static header configuration information according to the exported column configuration parameters, so as to obtain the dynamically updated dynamic header configuration information. The export module is used to export data from the target data platform according to the query condition parameters and the dynamic export header configuration information to obtain a target table data file.

[0014] Thirdly, the present invention provides an electronic device, comprising: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of any of the methods described in the foregoing embodiments.

[0015] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the method as described in any of the foregoing embodiments.

[0016] The beneficial effects of this application are: The method for dynamically exporting table data files provided in this application includes: obtaining a data export request triggered by the front end, wherein the data export request is an export request triggered by the current functional page displayed on the front end, and the data export request includes: query condition parameters and export column configuration parameters; reading static table header configuration information from a preset export configuration file, wherein the static table header configuration information includes: data source definition information and export processing rule information; the data source definition information is used to define the target data platform to be exported, and the export processing rule information is used to define the table data content; dynamically updating the export processing rule information in the static table header configuration information according to the export column configuration parameters to obtain dynamically updated dynamic table header configuration information; and exporting data from the target data platform according to the query condition parameters and the dynamic export table header configuration information to obtain a target table data file. In this embodiment, by adding export column configuration parameters in the data export request triggered by the front end according to the user's front end settings or adjustments, and then using the export column configuration parameters to dynamically update the export processing rule information in the static header configuration information, the traditional static header configuration information is replaced by dynamically updated dynamic header configuration information. The backend data is dynamically exported to the front end according to the export column configuration parameters corresponding to the user's needs, so that the data on the front end is displayed according to the user's needs. This avoids the problem that the predefined configuration file in the export framework needs to be modified according to the user's needs every time the backend table data file is exported, thereby improving the export efficiency and enhancing the stability of the web application. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0018] Figure 1 A schematic flowchart of a method for dynamically exporting tabular data files provided in an embodiment of this application; Figure 2 A schematic flowchart of a method for dynamically exporting tabular data files provided in another embodiment of this application; Figure 3 A schematic diagram of the structure of a device for dynamically exporting tabular data files provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0020] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0021] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. The terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0022] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0023] Current backend Excel file data export solutions typically export data statically and fixedly from Excel files according to a predefined configuration file within the export framework, with fixed column order, field names, and column headers. This is mainly suitable for meeting static display requirements. However, when users need to dynamically adjust the displayed content (e.g., adding, deleting, or modifying fields, or adjusting column order), the predefined configuration file within the export framework must be modified each time to meet user needs in order to export backend Excel file data to the frontend. However, modifying the predefined configuration file within the export framework consumes a lot of resources, and frequent modifications can easily introduce bugs that cause network application malfunctions. The data export process is complex, inefficient, and unstable.

[0024] To address the aforementioned issues, the main objective of this application is to propose a method for dynamically exporting tabular data files, aiming to simplify the backend Excel file data export process, improve export efficiency, and enhance the stability of web applications.

[0025] Figure 1 This is a schematic flowchart of a method for dynamically exporting tabular data files according to an embodiment of this application. The execution subject of this method can be, for example, a computer, a server, or other device with computing power, but is not limited thereto. Figure 1 As shown, the method includes: S101. Obtain the data export request triggered by the front end. The data export request is an export request triggered by the current functional page displayed by the front end. The data export request includes: query condition parameters and export column configuration parameters.

[0026] For example, the aforementioned data export request can be triggered by the user's actions such as clicking, browsing, or setting on the current function page on the front end. That is, the data export request can be triggered when the user enters the current function page for the first time, or when the user is already on the current function page and makes settings such as adding, deleting, or modifying fields, or adjusting column order on the data information displayed on the current function page.

[0027] The query condition parameters mentioned above can be used to indicate, for example, the type and time range of the data to be exported corresponding to the current data export request. However, the specific content indicated by the query condition parameters is not limited to the examples above, and the purpose is to accurately limit the search scope of the backend table data files.

[0028] The exported column configuration parameters mentioned above may include configuration parameters related to the display format, type, order, name, etc. of the exported columns, but the specific types of configuration parameters included are not limited to the above content and can be adjusted and determined according to actual needs, and are not restricted here.

[0029] S102. Read the static header configuration information from the preset export configuration file. The static header configuration information includes: data source definition information and export processing rule information. The data source definition information is used to define the target data platform to be exported, and the export processing rule information is used to define the table data content.

[0030] For example, the aforementioned preset export configuration file may refer to the dataflux configuration file corresponding to the dataflux export framework, but is not limited thereto. The aforementioned preset export configuration file may, for example, store the header DSL (domain-specific language) configuration, but is also not limited thereto.

[0031] The above export processing rule information is used to define the content of the table data. For example, it can specifically guide the processing rule information to include processing rule information such as the display format, type, order, and name of the exported columns, but it is not limited to this. For example, the export processing rule information can also include the name of the specific table data file to be exported, etc., which can be adjusted and determined according to the actual situation.

[0032] S103. Based on the exported column configuration parameters, dynamically update the exported processing rule information in the static header configuration information to obtain the dynamically updated dynamic header configuration information.

[0033] For example, the above-mentioned export processing rule information in the static header configuration information is dynamically updated based on the above-mentioned export column configuration parameters to obtain dynamically updated dynamic header configuration information. For example, it may refer to using the configuration parameters in the above-mentioned export column configuration parameters related to the display format, type, order, name, etc. of the export columns to update the processing rule information related to the display format, type, order, name, etc. of the export columns in the above-mentioned static header configuration information. However, it is understood that the above content is not intended to limit the content in the export column configuration parameters to be completely consistent with the content in the above-mentioned export processing rule information in the static header configuration information.

[0034] S104. Based on the above query condition parameters and the above dynamic export table header configuration information, export the data from the above target data platform to obtain the target table data file.

[0035] For example, the content of the target table data file can be displayed on the corresponding current function page on the front end. The displayed content is the data exported according to the data export request triggered by the front end.

[0036] The method for dynamically exporting tabular data files provided in this application includes: obtaining a data export request triggered by a front-end, wherein the data export request is triggered by the current functional page displayed on the front-end, and the data export request includes query condition parameters and export column configuration parameters; reading static header configuration information from a preset export configuration file, wherein the static header configuration information includes data source definition information and export processing rule information; the data source definition information is used to define the target data platform to be exported, and the export processing rule information is used to define the tabular data content; dynamically updating the export processing rule information in the static header configuration information according to the export column configuration parameters to obtain dynamically updated dynamic header configuration information; and exporting data from the target data platform according to the query condition parameters and the dynamic export header configuration information to obtain a target tabular data file. In this embodiment, by adding export column configuration parameters in the data export request triggered by the front end according to the user's front end settings or adjustments, and then using the export column configuration parameters to dynamically update the export processing rule information in the static header configuration information, the traditional static header configuration information is replaced by dynamically updated dynamic header configuration information. The backend data is dynamically exported to the front end according to the export column configuration parameters corresponding to the user's needs, so that the data on the front end is displayed according to the user's needs. This avoids the problem that the predefined configuration file in the export framework needs to be modified according to the user's needs every time the backend table data file is exported, thereby improving the export efficiency and enhancing the stability of the web application.

[0037] Optionally, in the above Figure 1 Based on the embodiments, the data export request may further include: export encoding information, which indicates the type of export function. The export processing rule information may include: preset title information and preset column configuration information, whereby the preset title information indicates a preset file name.

[0038] Based on the exported column configuration parameters, the exported processing rule information in the static header configuration information is dynamically updated to obtain the dynamically updated header configuration information, which may include: Based on the exported encoding information, the preset header information in the exported processing rule information is updated, and based on the exported column configuration parameters, the preset column configuration information in the exported processing rule information is updated to obtain the dynamic header configuration information.

[0039] For example, the export encoding information mentioned above is used to indicate the type of export function. Specifically, it can indicate that different types of export functions correspond to different backend platforms, backend databases, etc., in order to achieve purposes including but not limited to classifying and storing data, exporting data with different ports according to different data storage formats, etc. Of course, the above indication of the type of export function is not limited to indicating the corresponding backend platform, backend database, etc.

[0040] The aforementioned preset file name, for example, could refer to the filename of the file containing the data to be exported (also known as the file to be exported), i.e. Figure 1 The table data file to be exported in the example.

[0041] The preset column configuration information in the above export processing rule information may, for example, refer to... Figure 1 The static header configuration information in the embodiment contains processing rules information regarding the display format, type, order, name, etc. of the exported columns.

[0042] Furthermore, based on the above embodiments, the exported column configuration parameters include: format attribute information of multiple exported columns, which is used to define the column order, header name, and display format in the target table data file. Updating the preset column configuration information in the export processing rule information according to the exported column configuration parameters includes: The format attribute information of the above-mentioned multiple exported columns is filled and updated into the preset column configuration information in the above-mentioned export processing rule information.

[0043] For example, the format attribute information of the exported column mentioned above may refer to the configuration parameters related to the display format, type, order, name, etc. of the exported column in the exported column configuration parameters of the aforementioned embodiments. Among them, the format attribute information of the exported column that defines the column order in the target table data file may indicate the arrangement order of the corresponding exported column data when displayed on the front end. The format attribute information of the exported column that defines the header name in the target table data file may indicate the Chinese name of the header of the corresponding exported column data when displayed on the front end. The format attribute information of the exported column that defines the display format in the target table data file may indicate the column width, column height, number of rows, etc. of the corresponding exported column data when displayed on the front end. However, it is understood that the above content is only a possible example, and the types and functions of the actual exported column format attribute information are not limited to the above examples. It may also include other information that affects the display status of the exported column data when displayed on the front end.

[0044] Furthermore, based on the above embodiments, the exported processing rule information also includes: default header indication information, which is used to indicate whether the default header style is adopted.

[0045] The above-mentioned format attribute information of the multiple exported columns is used to populate and update the preset column configuration information in the above-mentioned export processing rule information, including: If the above default header indication information indicates that the default header style is not used, then the format attribute information of the above multiple exported columns will be filled and updated to the above preset column configuration information in the above export processing rule information.

[0046] For example, the default header style mentioned above may refer to the situation when a user first enters the current function page and triggers the data export request. Since the data information displayed on the current function page has not yet been set or adjusted, the export column configuration parameters may be empty or have the default value corresponding to the default header indication information. Correspondingly, the default header indication information indicates that the default header style is used. Therefore, the data information displayed on the current function page is displayed in the column order, header name, and display format corresponding to the default header style.

[0047] When a user is already on the current function page and triggers a data export request by adding, deleting, or modifying fields, adjusting column order, or other settings on the data displayed on the current function page, the export column configuration parameters have changed according to the user's settings or adjustments. Correspondingly, the default header indication information indicates that the default header style will not be used. At this time, the format attribute information of multiple export columns can be filled and updated to the preset column configuration information in the above export processing rule information so that the exported data is displayed according to the user's settings or adjustments. Of course, information that has been set or adjusted can also have its column order, header name, and display format restored to the default header style due to the user's clearing adjustments, initializing formats, etc., without any specific restrictions here.

[0048] In addition, based on the aforementioned embodiments, the data export request also includes: information of the current operating user. The export processing rule information also includes: watermark configuration information, watermark activation status, and extended behavior configuration information. Specifically, the watermark configuration information indicates whether to add a dynamic watermark to the target table data file; the watermark activation status indicates whether to activate the watermark adding function; and the extended behavior configuration information indicates whether to automatically adjust column widths based on content.

[0049] The above methods also include: If the above watermark activation status indicates that the watermark addition function is activated, then the watermark configuration information in the above export processing rule information is updated according to the information of the current user.

[0050] For example, the watermark mentioned above can be used to implement operation traceability and anti-leakage functions. In addition to indicating whether to automatically adjust the column width according to the content, the extended behavior configuration information can also be used to indicate whether to automatically wrap lines or automatically adjust font styles according to the content, etc., without any specific limitations here.

[0051] Optionally, in the foregoing Figure 1 Based on the embodiments, the above-mentioned export processing rule information also includes: data item mapping rules, which are used to indicate the mapping relationship between exported data fields and template columns in the data template.

[0052] For example, the above data item mapping rule is used to indicate the mapping relationship between the exported data fields and the template columns in the data template. Specifically, it indicates which column in the target table data file the data stored in the above-mentioned file to be exported will be exported to. That is, after the data template is constructed through the above-mentioned dynamic header configuration information, the corresponding data will be exported to the corresponding column in the target table data file through the above-mentioned mapping relationship between the exported data fields and the template columns in the data template. For example, the data item mapping rule can construct a mapping relationship through data field names and header names.

[0053] Figure 2 This is a schematic flowchart of a method for dynamically exporting tabular data files according to another embodiment of this application, as shown below. Figure 2 As shown, based on the foregoing embodiments, before exporting data from the target data platform to obtain the target table data file according to the query condition parameters and the dynamically exported table header configuration information, the method may further include: S201. Determine whether the dynamic column configuration information in the above export processing rules of the above dynamic header configuration information is empty.

[0054] For example, whether the dynamic column configuration information in the export processing rules of the above dynamic header configuration information is empty can be used, for example, to indicate whether the user has added, deleted, or modified fields, adjusted column order, or made other settings or adjustments to the data information displayed on the current function page, but is not limited to this.

[0055] S202. If the above dynamic column configuration information is not empty, then determine whether the above dynamic column configuration information has a serial number column.

[0056] For example, the dynamic column configuration information mentioned above is not empty. For instance, it may indicate that the user has added, deleted, or modified fields, adjusted column order, or made other settings or adjustments to the data information displayed on the current function page, but this is not the only limitation.

[0057] S203. If the above dynamic column configuration information does not have a serial number column, then add a default serial number column to the above dynamic column configuration information. The above default serial number column is used to indicate that a serial number column should be added to the above target table data file.

[0058] For example, the above-mentioned addition of a default serial number column to the above-mentioned dynamic column configuration information, the default serial number column can be, for example, 1, 2, 3, 4, 5... to indicate the corresponding row number, so as to increase the readability of the data displayed on the front end.

[0059] In addition, during the process of exporting data from the target data platform to obtain the target table data file, a streaming export method can be used, where the file to be exported is queried and exported page by page. This can effectively reduce memory usage and improve export efficiency.

[0060] During the export process, if the total number of exported data records exceeds the preset export record threshold (e.g., 100,000 records, but not limited to this), the export can be stopped to prevent the amount of data in the export file from being too large, the export time from being too long, and the export resources (such as memory as mentioned above) from being too large.

[0061] It is understood that the above are just possible examples. The actual data export methods and related restrictions are not limited to the examples above, but can be adapted to different actual scenarios.

[0062] Figure 3 This is a schematic diagram of a device for dynamically exporting tabular data files according to an embodiment of this application. This device can execute the aforementioned method for dynamically exporting tabular data files. The device can be integrated into devices with computing capabilities, such as computers and servers. Figure 3 As shown, the device may include: The acquisition module 310 is used to acquire the data export request triggered by the front end. The data export request is an export request triggered for the current functional page displayed by the front end. The data export request includes: query condition parameters and export column configuration parameters.

[0063] Configuration module 320 is used to read static header configuration information from a preset export configuration file. This static header configuration information includes: data source definition information and export processing rule information. The data source definition information defines the target data platform to be exported, and the export processing rule information defines the table data content.

[0064] The dynamic update module 330 is used to dynamically update the export processing rule information in the static header configuration information according to the exported column configuration parameters, so as to obtain the dynamically updated dynamic header configuration information.

[0065] The export module 340 is used to export data from the target data platform based on the above query condition parameters and the above dynamic export header configuration information to obtain the target table data file.

[0066] The method for dynamically exporting tabular data files provided in this application includes: obtaining a data export request triggered by a front-end, wherein the data export request is triggered by the current functional page displayed on the front-end, and the data export request includes query condition parameters and export column configuration parameters; reading static header configuration information from a preset export configuration file, wherein the static header configuration information includes data source definition information and export processing rule information; the data source definition information is used to define the target data platform to be exported, and the export processing rule information is used to define the tabular data content; dynamically updating the export processing rule information in the static header configuration information according to the export column configuration parameters to obtain dynamically updated dynamic header configuration information; and exporting data from the target data platform according to the query condition parameters and the dynamic export header configuration information to obtain a target tabular data file. In this embodiment, by adding export column configuration parameters in the data export request triggered by the front end according to the user's front end settings or adjustments, and then using the export column configuration parameters to dynamically update the export processing rule information in the static header configuration information, the traditional static header configuration information is replaced by dynamically updated dynamic header configuration information. The backend data is dynamically exported to the front end according to the export column configuration parameters corresponding to the user's needs, so that the data on the front end is displayed according to the user's needs. This avoids the problem that the predefined configuration file in the export framework needs to be modified according to the user's needs every time the backend table data file is exported, thereby improving the export efficiency and enhancing the stability of the web application.

[0067] Optionally, the data export request may further include: export encoding information, which indicates the type of this export function. The export processing rule information includes: preset title information and preset column configuration information, whereby the preset title information indicates the preset file name.

[0068] The aforementioned dynamic update module 330 can be used to update the preset header information in the export processing rule information according to the aforementioned export encoding information, and update the preset column configuration information in the aforementioned export processing rule information according to the aforementioned export column configuration parameters, so as to obtain the aforementioned dynamic header configuration information.

[0069] Optionally, the above-mentioned exported column configuration parameters include: format attribute information of multiple exported columns, which is used to define the column order, header name and display format in the target table data file.

[0070] The aforementioned dynamic update module 330 can be used to populate and update the preset column configuration information in the aforementioned export processing rule information with the format attribute information of the aforementioned multiple exported columns.

[0071] Optionally, the above export processing rule information also includes: default header indication information, which is used to indicate whether the default header style is adopted.

[0072] The aforementioned dynamic update module 330 can be used to fill and update the format attribute information of the aforementioned multiple exported columns to the aforementioned preset column configuration information in the aforementioned export processing rule information if the aforementioned default header indication information indicates that the default header style is not used.

[0073] Optionally, the data export request may also include: information of the current user. The export processing rule information may also include: watermark configuration information, watermark activation status, and extended behavior configuration information, wherein the watermark configuration information is used to indicate whether to add a dynamic watermark to the target table data file, the watermark activation status is used to indicate whether to enable the watermark adding function, and the extended behavior configuration information is used to indicate whether to automatically adjust the column width according to the content.

[0074] The aforementioned dynamic update module 330 can also be used to update the watermark configuration information in the aforementioned export processing rule information based on the information of the current operating user if the aforementioned watermark activation status indicates that the watermark addition function has been activated.

[0075] Optionally, the above export processing rule information also includes: data item mapping rules, which are used to indicate the mapping relationship between exported data fields and template columns in the data template.

[0076] Optionally, the aforementioned dynamic export device for tabular data files may further include: a sequence number module, used to determine whether the dynamic column configuration information in the export processing rules of the aforementioned dynamic header configuration information is empty. If the aforementioned dynamic column configuration information is not empty, then it is determined whether the aforementioned dynamic column configuration information has a sequence number column. If the aforementioned dynamic column configuration information does not have a sequence number column, then a default sequence number column is added to the aforementioned dynamic column configuration information, the aforementioned default sequence number column being used to indicate the addition of a sequence number column in the aforementioned target tabular data file.

[0077] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.

[0078] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device can be a computer, server, or other device with computing power, as described above. Figure 4 As shown, the device 400 includes: The processor 410, storage medium 420, and bus 430 are connected and communicate with each other via bus 430.

[0079] The storage medium 420 stores machine-readable instructions that can be executed by the processor 410. When the electronic device is running, the processor 410 executes the machine-readable instructions to perform the above-mentioned method for dynamically exporting table data files.

[0080] It should be understood that, Figure 4 The structure shown is only a schematic diagram of an electronic device; the electronic device may also include components that are larger than those shown. Figure 4 The more or fewer components shown, or having the same Figure 4 The different configurations shown. Figure 4 The components shown can be implemented using hardware, software, or a combination thereof.

[0081] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method for dynamically exporting tabular data files described in the above method embodiments.

[0082] Computer-readable storage media can be electronic storage devices such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, computer-readable storage media includes non-transitory computer-readable storage medium. The computer-readable storage medium has storage space for program code that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code can be compressed, for example, in a suitable form.

[0083] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0084] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0085] If a function is implemented as a software module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0086] The above description is merely a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural transformations made based on the inventive concept of this application and the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included within the patent protection scope of this application.

Claims

1. A method for dynamically exporting tabular data files, characterized in that, The method comprises: acquiring a front-end triggered data export request, the data export request being an export request triggered for a current function page displayed by the front end, the data export request comprising query condition parameters and export column configuration parameters; reading static table header configuration information from a preset export configuration file, the static table header configuration information comprising data source definition information and export processing rule information, the data source definition information being used to define a target data platform to be exported, and the export processing rule information being used to define table data content; dynamically updating the export processing rule information in the static table header configuration information according to the export column configuration parameters, to obtain dynamically updated dynamic table header configuration information; performing data export on the target data platform according to the query condition parameters and the dynamic export table header configuration information, to obtain a target table data file.

2. The method of claim 1, wherein, The data export request further comprises export encoding information, the export encoding information being used to indicate a type of the export function; and the export processing rule information comprises preset title information and preset column configuration information, the preset title information being used to indicate a preset file name. The dynamically updating the export processing rule information in the static table header configuration information according to the export column configuration parameters, to obtain dynamically updated dynamic table header configuration information, comprises: updating the preset title information in the export processing rule information according to the export encoding information, and updating the preset column configuration information in the export processing rule information according to the export column configuration parameters, to obtain the dynamic table header configuration information.

3. The method of claim 2, wherein, The export column configuration parameters comprise format attribute information of a plurality of export columns, the format attribute information of the plurality of export columns being used to define column order, table header names, and display formats in the target table data file; and the updating the preset column configuration information in the export processing rule information according to the export column configuration parameters comprises: filling and updating the format attribute information of the plurality of export columns to the preset column configuration information in the export processing rule information.

4. The method of claim 3, wherein, The export processing rule information further comprises default table header indication information, the default table header indication information being used to indicate whether to adopt a table header default style. The filling and updating the format attribute information of the plurality of export columns to the preset column configuration information in the export processing rule information comprises: if the default table header indication information indicates that the table header default style is not adopted, filling and updating the format attribute information of the plurality of export columns to the preset column configuration information in the export processing rule information.

5. The method of claim 2, wherein, The data export request further comprises information of a current operation user; and the export processing rule information further comprises watermark configuration information, a watermark start state, and extension behavior configuration information, wherein the watermark configuration information is used to indicate that a dynamic watermark is added in the target table data file, the watermark start state is used to indicate whether to start a watermark adding function, and the extension behavior configuration information is used to indicate whether to automatically adjust column width according to content. The method further comprises: If the watermark start state indicates starting the watermark adding function, the watermark configuration information in the export processing rule information is updated according to the information of the current operation user.

6. The method of claim 1, wherein, The export processing rule information further comprises a data item mapping rule, which is used to indicate a mapping relationship between an export data field and a template column in a data template.

7. The method of claim 2, wherein, Before the target data platform is subjected to data export to obtain a target table data file according to the query condition parameter and the dynamic export header configuration information, the method further comprises: It is determined whether the dynamic column configuration information in the export processing rule in the dynamic header configuration information is empty; If the dynamic column configuration information is not empty, it is determined whether the dynamic column configuration information has a serial number column; If the dynamic column configuration information does not have a serial number column, a default serial number column is added to the dynamic column configuration information, and the default serial number column is used to indicate that a serial number column is added in the target table data file.

8. A table data file dynamic export apparatus characterized by comprising: Comprise: An acquisition module is configured to acquire a data export request triggered by a front end, the data export request being an export request triggered by a current function page displayed by the front end, the data export request comprising a query condition parameter and an export column configuration parameter; A configuration module is configured to read static header configuration information from a preset export configuration file, the static header configuration information comprising data source definition information and export processing rule information, the data source definition information being used to define a target data platform to be exported, and the export processing rule information being used to define table data content; A dynamic updating module is configured to dynamically update the export processing rule information in the static header configuration information according to the export column configuration parameter, to obtain dynamically updated dynamic header configuration information; An export module is configured to perform data export on the target data platform according to the query condition parameter and the dynamic export header configuration information, to obtain a target table data file.

9. An electronic device, comprising: Comprise: A processor, a storage medium and a bus, the storage medium storing machine readable instructions executable by the processor, when the electronic device is running, the processor and the storage medium communicate through the bus, the processor executes the machine readable instructions to perform the steps of the method of any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to perform the steps of the method of any one of claims 1-7.