CN110807304A - Table exporting method, device and equipment - Google Patents
Table exporting method, device and equipment Download PDFInfo
- Publication number
- CN110807304A CN110807304A CN201910893292.9A CN201910893292A CN110807304A CN 110807304 A CN110807304 A CN 110807304A CN 201910893292 A CN201910893292 A CN 201910893292A CN 110807304 A CN110807304 A CN 110807304A
- Authority
- CN
- China
- Prior art keywords
- data
- exported
- metadata
- request
- background
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000009795 derivation Methods 0.000 claims description 16
- 238000010276 construction Methods 0.000 claims description 5
- 238000004590 computer program Methods 0.000 claims description 4
- 238000012423 maintenance Methods 0.000 abstract description 7
- 230000006870 function Effects 0.000 description 15
- 238000010586 diagram Methods 0.000 description 10
- 230000003993 interaction Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application discloses a table exporting method, a table exporting device and table exporting equipment, wherein the method comprises the following steps: a background receives data request metadata and form metadata of a form to be exported, which are acquired by a foreground; after the background constructs a data acquisition request by using the data request metadata, acquiring data in the table to be exported based on the data acquisition request; and the background creates a template of the table to be exported based on the table metadata; and writing the data in the table to be exported into the template by the background to obtain a table file so as to export the table to be exported. The form export function can be automatically realized, the working strength of developers is reduced, and the maintenance cost is reduced.
Description
Technical Field
The present application relates to the field of data processing, and in particular, to a method, an apparatus, and a device for table export.
Background
While the business system utilizes the form to display data, the business system also needs to provide a form export function.
At present, in a method for implementing a table export function, a developer needs to write a request for acquiring data in a table separately in a background of a business system, and the developer maintains a template file completely consistent with metadata of the table separately in the background. Once the table metadata in the foreground or the request for obtaining data in the table changes, the developer needs to modify the request for obtaining data in the table and the template file written in the background at any time, and thus the table export method has insufficient flexibility.
In summary, current table derivation methods are labor intensive and costly to develop for developers.
Disclosure of Invention
In view of this, the present application provides a form exporting method, apparatus and device, which can automatically implement a form exporting function, reduce the working strength of developers, and reduce the maintenance cost.
In a first aspect, to achieve the above object, the present application provides a table derivation method, including:
a background receives data request metadata and form metadata of a form to be exported, which are acquired by a foreground;
after the background constructs a data acquisition request by using the data request metadata, acquiring data in the table to be exported based on the data acquisition request;
and the background creates a template for the table to be exported based on the table metadata;
and the background writes the data in the table to be exported into the template to obtain a table file so as to export the table to be exported.
In an optional implementation manner, after the background constructs a data obtaining request by using the data request metadata, obtaining data in the table to be exported based on the data obtaining request includes:
the background constructs N data acquisition requests by using the data request metadata; wherein N is a positive integer;
the background obtains data in the table to be exported in a one-to-one mode in a parallel paging mode by respectively utilizing N pre-established threads based on the N data obtaining requests;
and the background assembles the data in the table to be exported, which is acquired by paging, according to the sequence of paging numbers.
In a second aspect, the present application further provides a table derivation method, including:
the method comprises the steps that a foreground analyzes a data acquisition request for acquiring data displayed by a table to be exported to obtain data request metadata;
and the foreground acquires the form metadata of the form to be exported;
and after the foreground establishes the corresponding relation among the data request metadata, the form metadata and the form to be exported, the corresponding relation is sent to the background, so that the background can export the form to be exported based on the corresponding relation.
In an optional implementation manner, the foreground parsing a data obtaining request for obtaining data shown in a table to be exported to obtain data request metadata includes:
when a foreground sends a data acquisition request to a background, analyzing the data acquisition request to obtain data request metadata; the data acquisition request is used for acquiring data displayed by a table to be exported.
In a third aspect, the present application provides a table derivation method, including:
the method comprises the steps that a foreground analyzes a data acquisition request for acquiring data displayed by a table to be exported to obtain data request metadata and table metadata of the table to be exported;
after the foreground establishes the corresponding relation among the data request metadata, the form metadata and the form to be exported, the corresponding relation is sent to the background;
after the background constructs a data acquisition request by using the data request metadata in the corresponding relationship, acquiring data in the table to be exported based on the data acquisition request, and creating a template of the table to be exported based on the table metadata;
and the background writes the data in the table to be exported into the template to obtain a table file so as to export the table to be exported.
In a fourth aspect, the present application provides a table derivation apparatus, the apparatus comprising:
the first receiving module is used for receiving data request metadata and table metadata of a table to be exported, which are acquired by a foreground;
a construction module for constructing a data acquisition request using the data request metadata;
a first obtaining module, configured to obtain data in the table to be derived based on the data obtaining request;
a creation module for creating a template of the table to be derived based on the table metadata;
and the writing module is used for writing the data in the table to be exported into the template to obtain a table file so as to export the table to be exported.
In an alternative embodiment, the construction module is specifically configured to:
constructing N data acquisition requests by using the data request metadata;
accordingly, the first obtaining module includes:
the obtaining submodule is used for respectively utilizing N pre-established threads to page in parallel in a one-to-one mode to obtain data in the table to be exported based on the N data obtaining requests;
and the assembling submodule is used for assembling the data in the table to be exported, which is obtained by the obtaining submodule in a paging mode, according to the paging number sequence.
In a fifth aspect, the present application provides a table derivation apparatus, the apparatus comprising:
the analysis module is used for analyzing a data acquisition request for acquiring data displayed by a table to be exported to obtain data request metadata;
the acquisition module is used for acquiring the form metadata of the form to be exported;
and the sending module is used for sending the corresponding relation to a background after the corresponding relation among the data request metadata, the form metadata and the form to be exported is established, so that the background can export the form to be exported based on the corresponding relation.
In an optional implementation manner, the parsing module is specifically configured to:
when a data acquisition request is sent to a background, analyzing the data acquisition request to obtain data request metadata; the data acquisition request is used for acquiring data displayed by a table to be exported.
In a sixth aspect, the present application provides a form export system, the system comprising a foreground and a background;
the foreground is used for analyzing a data acquisition request for acquiring data displayed by a table to be exported to obtain data request metadata and acquiring the table metadata of the table to be exported; after the corresponding relation among the data request metadata, the form metadata and the form to be exported is established, the corresponding relation is sent to a background;
the background is used for constructing a data acquisition request by using the data request metadata in the corresponding relation, acquiring data in the table to be exported based on the data acquisition request, and creating a template of the table to be exported based on the table metadata; and writing the data in the table to be exported into the template to obtain a table file so as to export the table to be exported.
In a seventh aspect, the present application provides a computer-readable storage medium having stored therein instructions that, when run on a terminal device, cause the terminal device to perform the method according to any of the above.
In an eighth aspect, the present application provides a table derivation apparatus, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, when executing the computer program, implementing the method as in any one of the above.
The application provides a table export method, which comprises the steps that data request metadata and table metadata of a table are obtained from a foreground, a data obtaining request is reconstructed by a background through the data request metadata, and data in the table are obtained from a database again based on the data obtaining request; in addition, the background creates a template of the form by using the form metadata, and finally writes the acquired data into the template to finish the export of the form. Therefore, the form export function can be automatically completed, and developers do not need to independently maintain codes in the background, so that the working intensity of the developers is reduced, and the maintenance cost is also reduced.
In addition, the foreground dynamically acquires the metadata of the data request and the metadata of the form in the application so as to ensure the timeliness of the data acquisition request reconstructed by the background and the template and finally ensure that the derived form is consistent with the form displayed by the foreground.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1A is a schematic overall architecture diagram of a table export system according to an embodiment of the present disclosure;
fig. 1B is a flowchart of a table export method according to an embodiment of the present application;
FIG. 2 is a data interaction diagram of a table export method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a table deriving device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of another table deriving device provided in the embodiment of the present application;
fig. 5 is a schematic structural diagram of another table deriving device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a table deriving device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The table export refers to that a background forms data displayed by a table in a database into a file, such as an Excel file. Currently, the form export function is implemented based on a developer writing a request for obtaining form data separately in the background and maintaining a template file of the form separately. Once the table metadata in the foreground or the request for obtaining data in the table changes, the developer needs to modify the request for obtaining data in the table and the template file written in the background at any time, and thus the table export method has insufficient flexibility. In summary, current table derivation methods are labor intensive and costly to develop for developers.
For this purpose, the application provides a table export method, which comprises the steps of acquiring data request metadata and table metadata of a table from a foreground, reconstructing a data acquisition request by using the data request metadata by a background, and acquiring data in the table from a database based on the data acquisition request; in addition, the background creates a template of the form by using the form metadata, and finally writes the acquired data into the template to finish the export of the form.
Therefore, the form export function can be automatically completed, and developers do not need to independently maintain codes in the background, so that the working intensity of the developers is reduced, and the maintenance cost is also reduced.
In addition, the foreground dynamically acquires the metadata of the data request and the metadata of the form in the application so as to ensure the timeliness of the data acquisition request reconstructed by the background and the template and finally ensure that the derived form is consistent with the form displayed by the foreground.
In order to facilitate understanding of the technical solution of the present application, the following briefly introduces an overall system architecture of the table derivation method provided in the present application. Referring to fig. 1A, a schematic diagram of an overall architecture of a table export system according to an embodiment of the present application is provided. The system 100 includes a foreground 1-n (110) and a background 120, where each foreground 110 is typically a client for implementing a table export method, and the background 120 is typically a server for implementing the table export method.
Specifically, after receiving a data obtaining request for obtaining data displayed by a table to be exported, the foreground 110 parses the data obtaining request to obtain metadata of the data request. In addition, the front stage 110 is also used to obtain table metadata for the table to be exported. After acquiring the data request metadata and the form metadata, the foreground 110 establishes a corresponding relationship between the data request metadata, the form metadata, and the form to be exported, and sends the data request metadata, the form metadata, and the form to be exported to the background 120.
Since each foreground can send data request metadata, form metadata, and a form to be exported to the background 120, in order to accurately implement the export function of the form, the data request metadata, the form metadata, and the form to be exported that are sent to the background need to establish a corresponding relationship.
After receiving the corresponding relationship between the data request metadata, the table metadata, and the table to be exported, the background 120 reconstructs a data acquisition request based on the data request metadata, and acquires data in the table to be exported based on the reconstructed data acquisition request. In addition, the background 120 is further configured to create a template of the table to be exported based on the table metadata, write data in the table to be exported into the template, obtain a table file, and finally complete the export work of the table to be exported.
In a word, the form export function can be automatically completed, and developers do not need to independently maintain codes in the background, so that the working intensity of the developers is reduced, and the maintenance cost is also reduced.
Based on the introduction of the system architecture, an embodiment of the present application provides a table export method, and referring to fig. 1B, the method is a flowchart of the table export method provided by the embodiment of the present application, and the method includes:
s101: the foreground analyzes a data acquisition request for acquiring data displayed by a table to be exported to obtain data request metadata and table metadata of the table to be exported.
And the data acquisition request is used for acquiring the data to be displayed in the table to be exported from the background database.
In the embodiment of the application, after the foreground acquires the data acquisition request, the foreground analyzes the data acquisition request to obtain the data request metadata of the data acquisition request. The data request metadata is data for describing a data request, and includes a request type, a request path, a query parameter, paging information, and the like of the data acquisition request. The request path is used for indicating a path of a background method corresponding to the data acquisition request, such as a URL path; the query parameter is the basis of data in the background filtering database, such as a table name and the like; the paging information generally includes the current page number, the number of each page, and the total record number, and in practical applications, in order to increase the speed of requesting data, paging query may be performed on data, for example, only the first 10 data are queried for the first time, and the next 10 data are queried after page turning.
In addition, the table metadata of the table to be derived needs to be obtained, where the table metadata is data used to describe the table, and includes related information of the table itself, such as format information of the table, which columns the table includes, names of the columns, transcoding of the columns, formatting of the columns, and the like. In addition, the table metadata may further include database fields corresponding to columns, widths of the columns, an order of the columns, types of data in the columns, transcoding rule information, and the like, wherein the transcoding rule information is used for escaping some meaningless data into meaningful content, such as S and F stored in the database, and the escaped content is successful and failed according to the transcoding rule information, respectively.
In an alternative implementation manner, the table metadata of the table to be derived is obtained, and specifically, the table to be derived records and provides its own table metadata. In addition, the embodiment of the present application does not limit the manner of obtaining the table metadata.
S102: and after the foreground establishes the corresponding relation among the data request metadata, the form metadata and the form to be exported, the corresponding relation is sent to the background.
In the embodiment of the application, after the foreground acquires the data request metadata and the form metadata of the form to be exported, the data request metadata and the form metadata are bound with the form to be exported to obtain the corresponding relation among the data request metadata, the form metadata and the form to be exported, and the corresponding relation is sent to the background to realize the export function of the form to be exported.
For example, the data request metadata includes a request type, a request path, query parameters, and paging information, the table metadata includes which columns, names of the columns, and transcoding of the columns, and then the request type, the request path, the query parameters, the paging information, and the columns included in the table, the names of the columns, the transcoding of the columns, and identifiers of the tables to be exported are bound together, so as to establish a correspondence relationship between the data request metadata, the table metadata, and the tables to be exported, and then export work of the tables to be exported can be completed based on the correspondence relationship.
S103: and after the background constructs a data acquisition request by using the data request metadata in the corresponding relationship, acquiring data in the table to be exported based on the data acquisition request, and creating a template of the table to be exported based on the table metadata.
In the embodiment of the application, after receiving the corresponding relationship from the foreground, the background acquires the data request metadata in the corresponding relationship, and constructs a data acquisition request by using the data request metadata. Specifically, the background reconstructs a new data acquisition request by using request metadata such as a request path, query parameters, paging information, and the like, so as to acquire data in the table to be exported from the database.
In an optional implementation manner, the background may dynamically create a request object according to the request type, the URL address, and the like in the request metadata, and then construct the query condition and the like of the request object according to the query parameter in the request metadata, thereby finally completing construction of the data acquisition request. In addition, the present application is not limited to the manner in which the request metadata is used to construct the data acquisition request.
In practical application, the background acquires the data in the table to be exported from the database again based on the reconstructed data acquisition request, so as to realize the table export function subsequently.
In the embodiment of the application, after the background acquires the received form metadata in the corresponding relationship, the form metadata is utilized to create the template of the form to be exported. In an alternative embodiment, the background draws the header required by the template according to the name, width, order, etc. of the columns in the table metadata; then, screening and sequencing the data to be exported according to the database fields, the sequence and the like corresponding to the columns in the table metadata, and ensuring that the data can correspond to each column of the header; and finally, converting the data to be exported according to the type of the data, transcoding information and the like, and further obtaining a template of the form to be exported.
It should be noted that, the execution sequence of the background configuration data acquisition request and the creation of the template is not limited in the embodiment of the present application.
S104: and the background writes the data in the table to be exported into the template to obtain a table file so as to export the table to be exported.
In the embodiment of the application, after the background acquires the data of the table to be exported based on the reconstructed data acquisition request and creates the template of the table to be exported, the data of the table to be exported is written into the template to obtain the table file, and the table export is completed. The table file obtained by exporting the table can be an Excel file, a wps file, a pdf file, a txt file, and the like.
In the table export method provided by the embodiment of the application, the data request metadata and the table metadata of the table are acquired from the foreground, the background reconstructs the data acquisition request by using the data request metadata, and the data in the table is acquired from the database again based on the data acquisition request; in addition, the background creates a template of the form by using the form metadata, and finally writes the acquired data into the template to finish the export of the form. According to the embodiment of the application, the form export function can be automatically completed, and developers do not need to independently maintain codes at the backstage, so that the working intensity of the developers is reduced, and the maintenance cost is also reduced.
The following describes a form derivation method provided by the present application by taking a specific implementation manner as an example, and referring to fig. 2, a data interaction diagram of a form derivation method provided by the present application is shown. The method comprises the following steps:
s201: when a user accesses a page of any form, a foreground sends a data acquisition request for acquiring data required to be displayed by the form to a background.
S202: the foreground receives the data from the background and will display the data on the page using the table.
S203: and the foreground analyzes the data acquisition request to obtain data request metadata.
S204: and calling a foreground exporting method of the form by the foreground to acquire the form metadata of the form.
S205: after the foreground establishes the corresponding relation among the data request metadata, the form metadata and the form, the corresponding relation is sent to the background.
S206: and the background constructs N data acquisition requests by using the data request metadata.
S207: and the background creates N threads, and each thread acquires data corresponding to the paging number from the database by using a data acquisition request.
In an alternative embodiment, the N threads page the data in the table in parallel from the database in a one-to-one manner using the N data obtaining requests, respectively.
S208: and the background assembles the data in the table acquired by paging according to the sequence of the paging numbers.
In the embodiment of the application, if the data volume of the data in the table is large, the data in the table can be acquired in parallel by using a plurality of threads. Specifically, a plurality of threads are created, and a constructed data acquisition request is allocated to each thread, wherein each data acquisition request carries a page number. For example, if the data obtaining request carries a page number of 1-10, the thread assigned with the data obtaining request is responsible for obtaining data of 1-10 pages in the table, and if another data obtaining request carries a page number of 11-20, the thread assigned with the data obtaining request is responsible for obtaining data of 11-20 pages in the table, and so on, and finally obtaining data of all pages in the table is completed.
In practical application, after the data of each page in the table is acquired, the data of each page is assembled according to the paging number, and finally all the data in the table are obtained.
S209: the background creates a template for the form based on the form metadata.
S210: and writing the assembled data in the table into the template by the background to obtain a table file so as to realize the export of the table.
In the form export method provided by the embodiment of the application, the foreground dynamically acquires the data request metadata and the form metadata, so that the timeliness of the data acquisition request reconstructed by the background and the template can be ensured, and finally, the exported form is consistent with the form displayed by the foreground.
Corresponding to the above method embodiment, the present application further provides a table deriving device, and referring to fig. 3, the structure diagram of the table deriving device provided in the embodiment of the present application is shown, and the device includes:
a first receiving module 301, configured to receive data request metadata and table metadata of a table to be derived obtained by a foreground;
a construction module 302 for constructing a data acquisition request using the data request metadata;
a first obtaining module 303, configured to obtain data in the table to be derived based on the data obtaining request;
a creating module 304, configured to create a template of the table to be derived based on the table metadata;
a writing module 305, configured to write the data in the table to be exported into the template to obtain a table file, so as to implement export of the table to be exported.
In an alternative embodiment, the configuration module 302 is specifically configured to:
constructing N data acquisition requests by using the data request metadata;
accordingly, the first obtaining module 303 includes:
the obtaining submodule is used for respectively utilizing N pre-established threads to page in parallel in a one-to-one mode to obtain data in the table to be exported based on the N data obtaining requests;
and the assembling submodule is used for assembling the data in the table to be exported, which is obtained by the obtaining submodule in a paging mode, according to the paging number sequence.
Corresponding to the above method embodiment, the present application further provides a table deriving device, and with reference to fig. 4, a schematic structural diagram of another table deriving device provided in the present application embodiment is shown, where the device includes:
the analysis module 401 is configured to analyze a data acquisition request for acquiring data displayed by a table to be exported, so as to obtain data request metadata;
an obtaining module 402, configured to obtain table metadata of the table to be derived;
a sending module 403, configured to send the corresponding relationship to a background after establishing the corresponding relationship between the data request metadata, the table metadata, and the table to be exported, so that the background can export the table to be exported based on the corresponding relationship.
The parsing module 401 is specifically configured to:
when a data acquisition request is sent to a background, analyzing the data acquisition request to obtain data request metadata; the data acquisition request is used for acquiring data displayed by a table to be exported.
In addition, corresponding to the above method embodiment, the embodiment of the present application further provides a table export system, and referring to fig. 5, the table export system provided in the embodiment of the present application is schematically configured, where the table export system includes a foreground 501 and a background 502;
the foreground 501 is configured to parse a data obtaining request for obtaining data displayed by a table to be exported, obtain data request metadata, and obtain table metadata of the table to be exported; after the corresponding relation among the data request metadata, the form metadata and the form to be exported is established, the corresponding relation is sent to a background;
the background 502 is configured to, after constructing a data acquisition request by using the data request metadata in the corresponding relationship, acquire data in the table to be exported based on the data acquisition request, and create a template of the table to be exported based on the table metadata; and writing the data in the table to be exported into the template to obtain a table file so as to export the table to be exported.
According to the table exporting device and the table exporting system, the data request metadata and the table metadata of the table are acquired from the foreground, the background reconstructs the data acquisition request by using the data request metadata, and the data in the table is acquired from the database again based on the data acquisition request; in addition, the background creates a template of the form by using the form metadata, and finally writes the acquired data into the template to finish the export of the form. According to the embodiment of the application, the form export function can be automatically completed, and developers do not need to independently maintain codes at the backstage, so that the working intensity of the developers is reduced, and the maintenance cost is also reduced.
In addition, the foreground dynamically acquires the metadata of the data request and the metadata of the form, so that the timeliness of the data acquisition request reconstructed by the background and the template can be ensured, and finally, the derived form is ensured to be consistent with the form displayed by the foreground.
In addition, an embodiment of the present application further provides a table deriving device, as shown in fig. 6, which may include:
a processor 601, a memory 602, an input device 603, and an output device 604. The number of processors 601 in the table deriving device may be one or more, and one processor is taken as an example in fig. 6. In some embodiments of the invention, the processor 601, the memory 602, the input device 603 and the output device 604 may be connected by a bus or other means, wherein the connection by the bus is exemplified in fig. 6.
The memory 602 may be used to store software programs and modules, and the processor 601 executes various functional applications and data processing of the table deriving device by operating the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like. Further, the memory 602 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Input device 603 may be used to receive entered numeric or character information and generate signal inputs relating to user settings and function controls of the form derivation apparatus.
Specifically, in this embodiment, the processor 601 loads an executable file corresponding to one or more processes of the application program into the memory 602 according to the following instructions, and the processor 601 runs the application program stored in the memory 602, thereby implementing various functions in the table export method.
In addition, the present application also provides a computer-readable storage medium, in which instructions are stored, and when the instructions are executed on a terminal device, the terminal device is caused to execute the above table derivation method.
It is understood that for the apparatus embodiments, since they correspond substantially to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above detailed description is given to a table exporting method, apparatus and device provided by the embodiments of the present application, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (10)
1. A table derivation method, the method comprising:
a background receives data request metadata and form metadata of a form to be exported, which are acquired by a foreground;
after the background constructs a data acquisition request by using the data request metadata, acquiring data in the table to be exported based on the data acquisition request;
and the background creates a template for the table to be exported based on the table metadata;
and the background writes the data in the table to be exported into the template to obtain a table file so as to export the table to be exported.
2. The method of claim 1, wherein after the background constructs a data acquisition request using the data request metadata, acquiring data in the table to be exported based on the data acquisition request, comprising:
the background constructs N data acquisition requests by using the data request metadata; wherein N is a positive integer;
the background obtains data in the table to be exported in a one-to-one mode in a parallel paging mode by respectively utilizing N pre-established threads based on the N data obtaining requests;
and the background assembles the data in the table to be exported, which is acquired by paging, according to the sequence of paging numbers.
3. A table derivation method, the method comprising:
the method comprises the steps that a foreground analyzes a data acquisition request for acquiring data displayed by a table to be exported to obtain data request metadata;
and the foreground acquires the form metadata of the form to be exported;
and after the foreground establishes the corresponding relation among the data request metadata, the form metadata and the form to be exported, the corresponding relation is sent to the background, so that the background can export the form to be exported based on the corresponding relation.
4. The method of claim 3, wherein the foreground parses a data acquisition request for acquiring data of a table presentation to be exported, obtaining data request metadata, comprising:
when a foreground sends a data acquisition request to a background, analyzing the data acquisition request to obtain data request metadata; the data acquisition request is used for acquiring data displayed by a table to be exported.
5. A table derivation method, the method comprising:
the method comprises the steps that a foreground analyzes a data acquisition request for acquiring data displayed by a table to be exported to obtain data request metadata and table metadata of the table to be exported;
after the foreground establishes the corresponding relation among the data request metadata, the form metadata and the form to be exported, the corresponding relation is sent to the background;
after the background constructs a data acquisition request by using the data request metadata in the corresponding relationship, acquiring data in the table to be exported based on the data acquisition request, and creating a template of the table to be exported based on the table metadata;
and the background writes the data in the table to be exported into the template to obtain a table file so as to export the table to be exported.
6. A table deriving device, characterized in that the device comprises:
the first receiving module is used for receiving data request metadata and table metadata of a table to be exported, which are acquired by a foreground;
a construction module for constructing a data acquisition request using the data request metadata;
a first obtaining module, configured to obtain data in the table to be derived based on the data obtaining request;
a creation module for creating a template of the table to be derived based on the table metadata;
and the writing module is used for writing the data in the table to be exported into the template to obtain a table file so as to export the table to be exported.
7. A table deriving device, characterized in that the device comprises:
the analysis module is used for analyzing a data acquisition request for acquiring data displayed by a table to be exported to obtain data request metadata;
the acquisition module is used for acquiring the form metadata of the form to be exported;
and the sending module is used for sending the corresponding relation to a background after the corresponding relation among the data request metadata, the form metadata and the form to be exported is established, so that the background can export the form to be exported based on the corresponding relation.
8. A table export system, the system comprising a foreground and a background;
the foreground is used for analyzing a data acquisition request for acquiring data displayed by a table to be exported to obtain data request metadata and acquiring the table metadata of the table to be exported; after the corresponding relation among the data request metadata, the form metadata and the form to be exported is established, the corresponding relation is sent to a background;
the background is used for constructing a data acquisition request by using the data request metadata in the corresponding relation, acquiring data in the table to be exported based on the data acquisition request, and creating a template of the table to be exported based on the table metadata; and writing the data in the table to be exported into the template to obtain a table file so as to export the table to be exported.
9. A computer-readable storage medium having stored therein instructions that, when executed on a terminal device, cause the terminal device to perform the method of any one of claims 1-5.
10. A table deriving device characterized by comprising: memory, a processor, and a computer program stored on the memory and executable on the processor, when executing the computer program, implementing the method of any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910893292.9A CN110807304A (en) | 2019-09-20 | 2019-09-20 | Table exporting method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910893292.9A CN110807304A (en) | 2019-09-20 | 2019-09-20 | Table exporting method, device and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110807304A true CN110807304A (en) | 2020-02-18 |
Family
ID=69487624
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910893292.9A Pending CN110807304A (en) | 2019-09-20 | 2019-09-20 | Table exporting method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110807304A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105426465A (en) * | 2015-11-13 | 2016-03-23 | 中国建设银行股份有限公司 | Method and device for online exporting statements |
CN108153919A (en) * | 2018-02-28 | 2018-06-12 | 弘成科技发展有限公司 | DBF data export platform and its deriving method |
CN108920436A (en) * | 2018-06-29 | 2018-11-30 | 郑州云海信息技术有限公司 | A kind of file data comparison method, tool and equipment |
-
2019
- 2019-09-20 CN CN201910893292.9A patent/CN110807304A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105426465A (en) * | 2015-11-13 | 2016-03-23 | 中国建设银行股份有限公司 | Method and device for online exporting statements |
CN108153919A (en) * | 2018-02-28 | 2018-06-12 | 弘成科技发展有限公司 | DBF data export platform and its deriving method |
CN108920436A (en) * | 2018-06-29 | 2018-11-30 | 郑州云海信息技术有限公司 | A kind of file data comparison method, tool and equipment |
Non-Patent Citations (1)
Title |
---|
谭学清等: "商务智能", 31 October 2006, 武汉大学出版社, pages: 159 - 161 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104484216A (en) | Method and device for generating service interface document and on-line test tool | |
CN112765023B (en) | Test case generation method and device | |
CN111241182A (en) | Data processing method and apparatus, storage medium, and electronic apparatus | |
CN110727429B (en) | Front-end page generation method, device and equipment | |
CN108268525A (en) | A kind of report implementation method and device based on Excel template | |
CN108170602B (en) | Test case generation method and device, terminal and computer readable medium | |
CN106557307B (en) | Service data processing method and system | |
CN111124379B (en) | Page generation method and device, electronic equipment and storage medium | |
CN110580189A (en) | method and device for generating front-end page, computer equipment and storage medium | |
CN111818175B (en) | Enterprise service bus configuration file generation method, device, equipment and storage medium | |
CN108664546B (en) | XML data structure conversion method and device | |
CN109062906B (en) | Translation method and device for program language resources | |
CN111290996A (en) | Document format conversion method, device, equipment and readable storage medium | |
CN110674083A (en) | Workflow migration method, device, equipment and computer readable storage medium | |
CN112035207A (en) | Page menu dynamic loading method and device based on database | |
CN113448985A (en) | API (application program interface) interface generation method, calling method and device and electronic equipment | |
CN112835901A (en) | File storage method and device, computer equipment and computer readable storage medium | |
CN117827218A (en) | Development method, device and electronic equipment for supporting multiple languages by low-code application | |
CN113011145A (en) | Data export method and device, terminal equipment and storage medium | |
CN110807304A (en) | Table exporting method, device and equipment | |
CN115757174A (en) | Database difference detection method and device | |
CN110928540A (en) | Page generation method and device | |
CN114116712A (en) | Extended field processing method and device, electronic equipment and storage medium | |
CN114968917A (en) | Method and device for rapidly importing file data | |
CN114371848A (en) | Page joint debugging method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |