CN110737711A - Report exporting method and device, computer equipment and storage medium - Google Patents

Report exporting method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110737711A
CN110737711A CN201910973164.5A CN201910973164A CN110737711A CN 110737711 A CN110737711 A CN 110737711A CN 201910973164 A CN201910973164 A CN 201910973164A CN 110737711 A CN110737711 A CN 110737711A
Authority
CN
China
Prior art keywords
page
report
document
conversion
position information
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
Application number
CN201910973164.5A
Other languages
Chinese (zh)
Inventor
江鹏凯
柯于界
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Ping An Medical Health Technology Service Co Ltd
Original Assignee
Ping An Medical and Healthcare Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Medical and Healthcare Management Co Ltd filed Critical Ping An Medical and Healthcare Management Co Ltd
Priority to CN201910973164.5A priority Critical patent/CN110737711A/en
Publication of CN110737711A publication Critical patent/CN110737711A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The method comprises the steps of obtaining a report page to be exported, identifying page elements in the report page, and page components, page position information and page element styles which correspond to the page elements, determining a conversion function which corresponds to the page components according to a pre-configured conversion association table, calling the conversion function to convert the page elements into document elements, determining the document element styles of the document elements according to the page element styles, determining the document position information of the document elements according to the page position information, and combining the document elements according to the document position information and the document element styles to obtain an export document.

Description

Report exporting method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to report exporting methods and apparatuses, a computer device, and a storage medium.
Background
With the continuous development of data processing technology, a report system specially used for report data processing gradually appears, wherein the report system dynamically displays data based on elements such as text, table, picture and text, that is, a data view is visually displayed to a user through a report, so that the user can visually know the statistical data of mass data based on the report, and make analysis decision based on the statistical data.
At present, usually, when a report export instruction is detected by a front end, the front end sends report data to a back end, the back end fills the report data into a report template, and feeds back the filled report data to the front end, so as to export the report. However, in the report export method, bandwidth is occupied in the transmission process of the report data and the report, and especially when the report data volume is large or the number of reports to be downloaded is large, the bandwidth occupation is obviously increased, so that the report export efficiency is low.
Disclosure of Invention
In view of the above, it is necessary to provide report exporting methods, apparatuses, computer devices, and storage media capable of improving report exporting efficiency in view of the above technical problems.
report exporting method, the method comprising:
acquiring a report page to be exported;
identifying page elements in the report page, and page components, page position information and page element styles corresponding to the page elements;
determining a conversion function corresponding to the page component according to a pre-configured conversion association table, and calling the conversion function to convert the page element into a document element;
determining the document element style of the document element according to the page element style, and determining the document position information of the document element according to the page position information;
and combining the document elements according to the document position information and the document element styles to obtain a exported document.
In embodiments, the page element includes a picture element, the page component includes a picture component, the determining a conversion function corresponding to the page component according to a preconfigured conversion association table, and calling the conversion function to convert the page element into a document element includes:
determining a picture conversion function corresponding to the picture component according to a pre-configured conversion association table;
and calling the picture conversion function to convert the picture elements into picture objects, acquiring picture coding information of the picture elements, and drawing document elements according to the picture objects and the picture coding information.
In embodiments, before determining a conversion function corresponding to the page component according to a preconfigured conversion association table and calling the conversion function to convert the page element into a document element, the method further comprises:
acquiring a conversion association table updating instruction; the conversion association table updating instruction carries a target page component to be updated and a corresponding target conversion function;
sending the conversion association table updating instruction to a server; the conversion association table updating instruction is used for instructing the server to update the target page component and the target conversion function to a conversion association table;
and receiving the updated conversion association table fed back by the server.
In embodiments, before the obtaining the report page to be exported, the method further includes:
acquiring report data and report configuration data;
determining a report template, a page template style, a page component, and page position information and a page element style corresponding to the page component according to the report configuration data;
calling the page component to generate page elements according to the report data;
filling the page elements into the report template according to the page position information and the page element styles;
and rendering the filled report template according to the page template style to obtain a report page.
In embodiments, the acquiring report data and report configuration data includes:
acquiring a report inquiry instruction carrying a report identifier;
sending the report form query instruction to a server; the report query instruction is used for instructing the server to call a report query function to query report data through a query interface corresponding to the report identifier;
and receiving report data and report configuration data fed back by the server aiming at the report query instruction.
In embodiments, before the obtaining of the report query instruction carrying the report identifier, the method further includes:
detecting a configuration trigger operation;
acquiring a preconfigured operation table and a field table from a server according to the configuration triggering operation, and displaying the operation table and the field table through a configuration page;
detecting a submission triggering operation corresponding to the configuration page, and acquiring configuration data in the configuration page according to the submission triggering operation;
sending the configuration data to the server; the sent configuration data is used for indicating the server to configure a report inquiry function according to the configuration function.
A report exporting apparatus, the apparatus comprising:
the acquisition module is used for acquiring a report page to be exported;
the identification module is used for identifying page elements in the report page, and page components, page position information and page element styles which correspond to the page elements;
the conversion module is used for determining a conversion function corresponding to the page component according to a pre-configured conversion association table and calling the conversion function to convert the page element into a document element;
the conversion module is further used for determining the document element style of the document element according to the page element style and determining the document position information of the document element according to the page position information;
and the export module is used for combining the document elements according to the document position information and the document element styles to obtain an export document.
In of these embodiments, the apparatus further comprises:
the generating module is used for acquiring report data and report configuration data; determining a report template, a page template style, a page component, and page position information and a page element style corresponding to the page component according to the report configuration data; calling the page component to generate page elements according to the report data; filling the page elements into the report template according to the page position information and the page element styles; and rendering the filled report template according to the page template style to obtain a report page.
computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the report exporting method in the above embodiments when executing the computer program.
computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the report derivation method described in the above embodiments.
According to the report exporting method, the report exporting device, the computer equipment and the storage medium, the page elements in the report page to be exported, the corresponding page components, the page position information and the page element styles are automatically identified, the page elements are automatically converted into the document elements according to the conversion function called by the page components according to the pre-configured conversion association table, and the conversion efficiency of the page elements can be improved. According to the page position information and the page element style of the page element, the document position information and the document element style of the corresponding document element are respectively determined, each document element is combined according to the document position information and the document element style to obtain a exported document, the exported document can be quickly and accurately obtained, and therefore the report exporting efficiency can be improved under the condition that the accuracy of the exported document is guaranteed.
Drawings
FIG. 1 is an application scenario diagram of a report export method in embodiments;
FIG. 2 is a flow chart of a report exporting method in embodiments;
FIG. 3 is a flow chart illustrating a report exporting method according to another embodiments;
FIG. 4 is a block diagram of a report exporting apparatus in embodiments;
fig. 5 is an internal structural view of a computer device in embodiments.
Detailed Description
For purposes of making the present application, its objects, aspects and advantages more apparent, the present application is described in further detail with reference to the drawings and the examples.
The report exporting method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 obtains a report page to be exported, identifies page elements in the report page, page components, page position information and page element styles corresponding to the page elements, calls a conversion function according to the page components according to a pre-configured conversion association table to convert the corresponding page elements into document elements, respectively determines document position information and document element styles of the document elements according to the page position information and the page element styles of the page elements, and combines the document elements according to the document position information and the document element styles to obtain an export document. It is understood that the terminal 102 may obtain the report page to be exported through the server 104. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by a stand-alone server or a server cluster composed of a plurality of servers.
In embodiments, as shown in fig. 2, report exporting methods are provided, and the method is applied to the terminal in fig. 1 as an example to explain, including the following steps:
s202, a report page to be exported is obtained.
The report page refers to a report in a page form, and specifically may be an HTML-based report.
In embodiments, the terminal obtains a report page to be exported, identifies a page template style in the report page, and determines a corresponding document template style according to the identified page template style.
In embodiments, the terminal detects a report export trigger event, and when the report export trigger event is detected, acquires a report page to be exported according to the detected report export trigger event.
In embodiments, the terminal locally obtains the report page to be exported according to the detected report export trigger event, or obtains the report page currently displayed in the user operation interface as the report page to be exported.
S204, identifying page elements in the report page, and page components, page position information and page element styles corresponding to the page elements.
The page elements refer to elements displayed in the report page, such as text, pictures, diagrams, tables, buttons and other elements. The page component refers to a component corresponding to a page element, and may specifically refer to a component used for generating the page element, such as a text component, a picture component, a table component, a button component, and the like. A component can be understood as a program or function that can generate a corresponding page element based on report data. The page position information refers to position information of a page element in a report page, and specifically may be absolute position information, such as coordinate position information, or may also be relative position information, such as position information of a page element relative to a preset reference position of the report page, where the preset reference position is, for example, a center position, an upper left corner position, an upper right corner position, or the like of the report page. The page element style refers to style information of a page element, such as an embedded type, a floating type, or a lining-down type.
Specifically, the terminal traverses the report page to be exported to identify the page elements in the report page, and the page components, the page position information and the page element styles corresponding to the page elements.
In embodiments, the terminal traverses the report page and obtains the page element, the page component corresponding to the page element, the page position information, and the page element style when traversing the page element in the report page.
In embodiments, page elements of the same element type in a report page correspond to the same page component, that is, the page elements of the same element type are generated by calling the same page component, therefore, when a terminal identifies a plurality of page elements of the same element type from the report page, the page components corresponding to the plurality of page elements of the same element type can be merged, that is, the identified page component is subjected to deduplication processing.
For example, the element type is a chart type, and the chart type comprises sub-types such as column charts, bar charts or line charts.
S206, determining a conversion function corresponding to the page component according to the pre-configured conversion association table, and calling the conversion function to convert the page element into the document element.
The conversion association table is used for determining the corresponding relation between the page components and the conversion functions. The conversion function is a function for converting a page element into a corresponding document element, and the function can be understood as a computer program having a specified function. Document elements refer to elements such as text, pictures, charts, tables, buttons, and the like that are required to be exposed in the exported document. The document elements correspond to page elements, such as converting page element pictures in a report page to document element pictures in a derived document.
Specifically, the terminal obtains a pre-configured conversion association table, and compares each page component identified from the report page with the conversion association table respectively to determine a conversion function corresponding to each page component. And the terminal calls a conversion function corresponding to the page component and converts the page element corresponding to the page component into a corresponding document element. It can be understood that the terminal may specifically compare the page component identifier corresponding to each page component with the conversion association table, so as to determine the conversion function identifier corresponding to each page component identifier, and use the conversion function identifier as the conversion function identifier corresponding to the page component corresponding to the corresponding page component identifier. And the terminal queries and calls a corresponding conversion function according to the conversion function identifier corresponding to the page component, and converts each page element corresponding to the page component into a corresponding document element respectively.
It is to be understood that the pre-configured correspondence in the conversion association table may be characterized by a correspondence between identifiers, e.g., a correspondence between a page component and a conversion function, which may be characterized by a correspondence between a page component identifier and a conversion function identifier in the conversion association table.
The terminal inquires corresponding document element identification from the conversion association table according to the page component identification of the page component, determines conversion function identification according to the document element identification, calls the preconfigured conversion function according to the conversion function identification to convert the page element corresponding to the page component into the corresponding document element, and determines the document element as the document element corresponding to the document element identification.
S208, determining the document element style of the document element according to the page element style, and determining the document position information of the document element according to the page position information.
The document element style is a style corresponding to a document element in a derived document. The document element style of the document element is the same as or corresponds to the page element style of the corresponding page element. Document location information refers to the location information of a document element in the derived document.
Specifically, the terminal obtains a preconfigured element style association table, determines a document element style corresponding to the page element style corresponding to each page element according to the element style association table, and uses the document element style corresponding to the corresponding document element. And the terminal determines the page position information corresponding to each page element as the document position information of the corresponding document element.
The method comprises the steps of matching a page element style with an element style association table to extract a document element style corresponding to the page element style from the element style association table, and determining the page element style as a document element style by a terminal when the document element style corresponding to the page element style is not extracted from the element style association table.
S210, combining the document elements according to the document position information and the document element styles to obtain the export document.
The exported document is obtained by combining at least document elements according to corresponding document position information and document element styles, namely, the document obtained after the report page is successfully exported.
Specifically, the terminal combines the document elements obtained by conversion according to each page element in the report page according to the document position information and the document element style of each document element to obtain a combined document, and determines the combined document as a export document corresponding to the report page to be exported.
In embodiments, the terminal dynamically creates a blank document, and fills each document element obtained by conversion into the blank document according to the respective document position information and the respective document element style, so as to obtain an export document.
In embodiments, the terminal fills each document element into a blank document according to the document position information, and renders each filled document element according to the document element style corresponding to the document element, so as to obtain a derived document.
In embodiments, the terminal renders the exported document according to the document template style determined according to the report page to be exported to obtain the exported document with the document template style matching with the page template style of the report page to be exported, it can be understood that the exported document rendered according to the document template style corresponds to the overall layout style of the page report to be exported.
In embodiments, the terminal determines a document template style identification according to a page template style of a report page, in the process of rendering the combined document, the terminal queries a corresponding document template style from a local template style library according to the document template style identification, and renders the combined document according to the queried document template style to obtain a derived document.
In embodiments, the terminal renders the combined document according to the document template style to obtain an initial export document, and performs type conversion on the initial export document according to a preset document type to obtain an export document, that is, converts the initial export document into an export document of a preset document type.
In embodiments, the terminal presents the resulting derived document to the user via the user interface.
According to the report exporting method, the page elements in the report page to be exported, the corresponding page components, the page position information and the page element styles are automatically identified, the conversion functions are called according to the page components according to the pre-configured conversion association table to automatically convert the page elements into the document elements, and the conversion efficiency of the page elements can be improved. According to the page position information and the page element style of the page elements, the document position information and the document element style of the corresponding document elements are respectively determined, and the document elements are combined according to the document position information and the document element style to obtain a combined document, so that the combined document can be quickly and accurately obtained, and the report exporting efficiency can be improved under the condition of ensuring the document exporting accuracy.
In embodiments, the page element includes a picture element, the page component includes a picture component, and step S206 includes determining a picture conversion function corresponding to the picture component according to a preconfigured conversion association table, calling the picture conversion function to convert the picture element into a picture object, obtaining picture coding information of the picture element, and drawing the document element according to the picture object and the picture coding information.
The picture coding information is coding information obtained by coding the picture, and specifically may be a character string composed of at least of characters such as numbers, letters, symbols, and the like, and the picture coding information may specifically be base64 coding of the picture, and may be used to represent an address attribute of the picture, such as a URL (Uniform Resource Locator, Uniform Resource Locator) attribute.
Specifically, the page elements identified from the report page to be exported include picture elements, and accordingly, the identified page components include picture components. And the terminal acquires a pre-configured conversion association table and determines a picture conversion function corresponding to the picture assembly according to the conversion association table. And calling a picture conversion function corresponding to the picture assembly by the terminal to convert each picture element identified from the report page into a corresponding picture object and acquire picture coding information of each picture element. And the terminal calls the picture conversion function to draw pictures according to the picture objects and the picture coding information corresponding to each picture element, and determines the drawn pictures as the document elements corresponding to the picture elements.
In embodiments, the picture conversion function corresponding to the picture element is a canvas script function pre-configured to correspond to the picture element.
In embodiments, the terminal draws the document element corresponding to the picture element on the canvas according to the picture object corresponding to the picture element and the picture coding information.
In embodiments, the page elements identified from the report page further include text elements, and the identified page components further include text components.
In embodiments, the page elements identified from the report page further include chart elements, and the identified page components further include chart components, the terminal calls a preconfigured chart coding information obtaining function to obtain chart coding information of each chart element according to the chart components, the terminal calls a canvas script function preconfigured for the chart components, and draws document elements corresponding to the chart elements on a canvas according to the chart coding information, the chart coding information is, for example, base64 coding.
In the above embodiment, for the picture elements in the report page, the picture conversion function corresponding to the picture component is called to obtain the picture object and the picture coding information corresponding to the picture elements, and the document elements are drawn based on the picture object and the picture coding information, so that the conversion from the picture elements to the document elements is realized, and the conversion efficiency and accuracy of the picture elements can be improved.
In embodiments, before step S206, the report exporting method further includes obtaining a conversion association table updating instruction, where the conversion association table updating instruction carries a target page component to be updated and a corresponding target conversion function, sending the conversion association table updating instruction to the server, where the conversion association table updating instruction is used to instruct the server to update the target page component and the target conversion function to the conversion association table, and receiving an updated conversion association table fed back by the server.
The conversion association table updating instruction is an instruction for triggering the conversion association table updating operation, and can specifically carry a target page component to be updated and a corresponding target conversion function. The target page component to be updated may specifically be a newly added page component to be updated to the conversion association table.
Specifically, the terminal acquires a conversion association table updating instruction and sends the acquired conversion association table updating instruction to the server. And the server analyzes the received conversion association table updating instruction to obtain a target page component to be updated and a corresponding target conversion function. And the server correspondingly updates the target page component obtained by analysis and the corresponding target conversion function into the conversion association table, and feeds back the updated conversion association table to the terminal corresponding to the conversion association table updating instruction.
In embodiments, the conversion association table update instruction carries a target page component identifier corresponding to a target page component to be updated and a target conversion function identifier corresponding to a target conversion function corresponding to the target page component.
The server analyzes the received conversion association table updating instruction to obtain a target page component to be updated, a target page component identifier, a target conversion function and a target conversion function identifier, stores the analyzed target page component and target conversion function locally, and updates the target page component identifier and the target conversion function identifier to a conversion function table in an associated manner.
In embodiments, the conversion association table update instruction may further carry a target document element identifier corresponding to the target page component identifier, and the server updates the target page component identifier, the target document element identifier, and the target conversion function identifier obtained by parsing to the conversion association table correspondingly.
In embodiments, the terminal locally updates the conversion association table according to the acquired conversion association table updating instruction, according to a conversion association table updating flow similar to the above.
In the above embodiment, the conversion association table is dynamically updated based on the conversion association table update instruction, so that in a subsequent report exporting process, a conversion function corresponding to each page component can be quickly and accurately obtained based on the updated conversion association table, and then page elements are converted based on the conversion function, thereby improving report exporting efficiency and accuracy.
In embodiments, before step S202, the report exporting method further includes obtaining report data and report configuration data, determining a report template, a page template style, a page component, and page position information and a page element style corresponding to the page component according to the report configuration data, calling the page component to generate a page element according to the report data, filling the page element into the report template according to the page position information and the page element style, and rendering the filled report template according to the page template style to obtain a report page.
The report data refers to basic data in a report page, that is, original data on which the report page is generated. The report configuration data is configuration data corresponding to the report page and is used for specifying a report template, a report template style and a page component corresponding to the report page, page position information, a page element style and other data corresponding to the page component.
Specifically, the terminal acquires report data and report configuration data corresponding to a report page to be generated from the server, and analyzes the acquired report configuration data to obtain a report template, a page template style and page components corresponding to the report page to be generated, and page position information and page element styles corresponding to each page component. And the terminal calls each page component obtained by analysis to generate a corresponding page element according to the acquired report data, and fills each generated page element into the report template obtained by analysis according to respective page position information and page element styles. And the terminal renders the filled report template according to the analyzed page template pattern to obtain a report page.
In embodiments, the terminal analyzes the report configuration data to obtain the page components and the page position information and the page element style corresponding to each page component, extracts the report sub-data corresponding to each page component from the report data, calls each page component to generate the corresponding page element according to the extracted report sub-data, and associates the generated page element with the corresponding page position information and the corresponding page element style, when page components correspond to a plurality of page position information and the corresponding page element style, the terminal calls the page component to generate a plurality of page elements, and associates the generated page elements with the corresponding page position information and the corresponding page element style.
The terminal takes the report sub-data corresponding to the page component as the input parameter of the script function, and calls the script function to generate the page element.
In embodiments, the report configuration data includes a report template, a page template style identifier, a page component identifier, and page position information and a page element style identifier corresponding to each page component identifier.
In embodiments, the terminal presents the generated report page to the user through the user operation interface, the terminal can also cache the generated report page locally, so that the cached report page can be directly obtained from the local when the report page is exported, and the export efficiency of the report page can be improved.
In the above embodiment, the corresponding report page is generated based on the report data and the report configuration data, so that a user can visually know the report data, the generated report page can be directly acquired as the report page to be exported when the report is exported, and the export efficiency of the report page can be improved.
In embodiments, the obtaining of the report data and the report configuration data includes obtaining a report query instruction carrying a report identifier, sending the report query instruction to the server, where the report query instruction is used to instruct the server to call a report query function through a query interface corresponding to the report identifier to query the report data, and receiving the report data and the report configuration data fed back by the server for the report query instruction.
The report query instruction is an instruction for triggering a report data query operation, and may specifically carry a report identifier.
Specifically, the terminal acquires a report query instruction carrying a report identifier, and sends the acquired report query instruction to the server. The server analyzes the received report inquiry instruction to obtain a report identifier, determines a preconfigured inquiry interface according to the analyzed report identifier, and calls a preconfigured report inquiry function to inquire report data through the inquiry interface. And the server inquires corresponding report configuration data according to the analyzed report identifier and feeds the inquired report configuration data and the report data back to the terminal.
In embodiments, the server calls a report query function through the query interface corresponding to the report identifier, and queries the report data and the report configuration data corresponding to the report identifier.
In embodiments, the query interface may specifically be an SQL query interface, and the report query function may specifically be a query function containing SQL logic.
In the above embodiment, the preconfigured report query function is called according to the query interface corresponding to the report identifier, and the corresponding report data can be quickly and accurately obtained, so that the efficiency of generating the report page based on the report data can be improved.
In embodiments, before acquiring a report query instruction carrying a report identifier, the report export method further includes detecting a configuration trigger operation, acquiring a preconfigured operation table and a field table from the server according to the configuration trigger operation, displaying the operation table and the field table through a configuration page, detecting a submission trigger operation corresponding to the configuration page, acquiring configuration data in the configuration page according to the submission trigger operation, and sending the configuration data to the server, where the sent configuration data is used to instruct the server to configure a report query function according to the configuration function.
The configuration trigger operation may specifically refer to a trigger operation of jumping to a configuration page, or a trigger operation such as clicking, sliding, or dragging on a configuration page, etc. the operation table is a set consisting of a plurality of operations, such as a grouping operation, a sorting operation, a connecting operation, a judging operation, or a function operation, etc. the connecting operation, such as an operation of field connection with and or, a judging operation, such as an operation of characterizing a YY step performed under XX conditions, a function operation, such as summing, maximizing, averaging, etc. the field table is a set consisting of a plurality of fields.
Specifically, the terminal detects a configuration trigger operation, acquires a preconfigured operation table and a field table from the server according to the detected configuration trigger operation when the configuration trigger operation is detected, and displays the acquired operation table and field table to the user through a configuration page. The terminal detects the configuration data input or selected by the user on the configuration page aiming at the displayed operation table and the field table in real time, and detects the submission triggering operation triggered by the user aiming at the configuration page in real time. When the submission triggering operation of the user is detected, the terminal acquires configuration data pre-entered or pre-acquired in the configuration page by the user according to the submission triggering operation, and sends the acquired configuration data to the server. The server analyzes the received configuration data to obtain the operation and the field to be configured and the combination form of the operation and the field, configures the report query function according to the operation and the field obtained by analysis and the corresponding combination form, and stores the report query function and the report identifier in a correlation manner.
In embodiments, after the server configures the report query function, it generates a query interface corresponding to the report query function.
In the above embodiment, the report query function is preconfigured based on the configuration triggering operation, so that when the report data is queried, the preconfigured report query function can be quickly located based on the report identifier specified by the report query instruction, and the report query function is called to quickly query the corresponding report data.
As shown in fig. 3, in embodiments, report exporting methods are provided, which specifically include the following steps:
s302, a report query instruction carrying a report identifier is obtained.
S304, sending the report inquiry instruction to a server; the report query instruction is used for instructing the server to call a report query function to query the report data through the query interface corresponding to the report identifier.
S306, report data and report configuration data fed back by the server according to the report query instruction are received.
S308, determining the report template, the page template style, the page component, and the page position information and the page element style corresponding to the page component according to the report configuration data.
And S310, calling the page component to generate page elements according to the report data.
And S312, filling the page elements into the report template according to the page position information and the page element styles.
And S314, rendering the filled report template according to the page template style to obtain a report page.
And S316, acquiring a report page to be exported.
S318, identifying the page elements in the report page, and the page components, the page position information and the page element styles corresponding to the page elements.
S320, determining a conversion function corresponding to the page component according to the pre-configured conversion association table, and calling the conversion function to convert the page element into the document element.
S322, determining the document element style of the document element according to the page element style, and determining the document position information of the document element according to the page position information.
And S324, combining the document elements according to the document position information and the document element styles to obtain the export document.
It should be understood that although the various steps in the flow charts of fig. 2-3 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in the order indicated by the arrows, unless explicitly stated herein, the steps may be performed in other sequences without strict order limitations, and further, at least the portion of the step of in fig. 2-3 may include multiple sub-steps or stages that are not necessarily performed at the same time , but may be performed at different times, the order of performance of the sub-steps or stages may not necessarily be performed in sequence, but may be rotated or alternated with at least portions of other steps or sub-steps or stages of other steps.
In embodiments, as shown in fig. 4, report exporting apparatuses 400 are provided, which include an obtaining module 402, a recognition module 404, a conversion module 406, and an exporting module 408, wherein:
an obtaining module 402, configured to obtain a report page to be exported.
The identifying module 404 is configured to identify a page element in the report page, and a page component, page position information, and a page element style corresponding to the page element.
A conversion module 406, configured to determine a conversion function corresponding to the page component according to a preconfigured conversion association table, and call the conversion function to convert the page element into a document element.
The conversion module 406 is further configured to determine a document element style of the document element according to the page element style, and determine document position information of the document element according to the page position information.
And the export module 408 is configured to combine the document element according to the document position information and the document element style to obtain an export document.
In embodiments, the page element includes a picture element, the page component includes a picture component, and the conversion module 406 is further configured to determine a picture conversion function corresponding to the picture component according to a preconfigured conversion association table, call the picture conversion function to convert the picture element into a picture object, obtain picture coding information of the picture element, and draw a document element according to the picture object and the picture coding information.
In embodiments, the report exporting apparatus 400 further comprises an updating module;
the updating module is used for acquiring an updating instruction of the conversion association table; the conversion association table updating instruction carries a target page component to be updated and a corresponding target conversion function; sending the conversion association table updating instruction to a server; the conversion association table updating instruction is used for instructing the server to update the target page component and the target conversion function to a conversion association table; and receiving the updated conversion association table fed back by the server.
In embodiments, the obtaining module 402 is further configured to obtain report data and report configuration data, determine a report template, a page template style, a page component, and page position information and a page element style corresponding to the page component according to the report configuration data, invoke the page component to generate a page element according to the report data, fill the page element into the report template according to the page position information and the page element style, and render the filled report template according to the page template style to obtain a report page.
In embodiments, the obtaining module 402 is further configured to obtain a report query instruction carrying a report identifier, send the report query instruction to a server, instruct the server to call a report query function through a query interface corresponding to the report identifier to query report data, and receive the report data and report configuration data fed back by the server for the report query instruction.
In embodiments, the report exporting apparatus 400 further comprises a configuration module;
a configuration module for detecting a configuration trigger operation; acquiring a preconfigured operation table and a field table from a server according to the configuration triggering operation, and displaying the operation table and the field table through a configuration page; detecting a submission triggering operation corresponding to the configuration page, and acquiring configuration data in the configuration page according to the submission triggering operation; sending the configuration data to the server; the sent configuration data is used for indicating the server to configure a report inquiry function according to the configuration function.
For the specific definition of the report exporting apparatus, reference may be made to the above definition of the report exporting method, which is not described herein again. All modules in the report exporting device can be completely or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In embodiments, there are kinds of computer devices, which may be terminals, the internal structure of which may be as shown in fig. 5, including a processor, a memory, a network interface, a display screen and an input device connected through a system bus, wherein the processor of the computer device is used to provide computing and control capabilities.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In embodiments, computer devices are provided, including a memory storing a computer program and a processor, the processor implementing the steps of the report exporting method in the above embodiments when executing the computer program.
In embodiments, computer readable storage media are provided, on which a computer program is stored, which when executed by a processor, implements the steps of the report derivation method in the various embodiments described above.
It will be understood by those of ordinary skill in the art that all or a portion of the processes of the methods of the embodiments described above may be implemented by a computer program that may be stored in a non-volatile computer-readable storage medium, which when executed, may include the processes of the embodiments of the methods described above, wherein any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1, report exporting method, the method comprising:
acquiring a report page to be exported;
identifying page elements in the report page, and page components, page position information and page element styles corresponding to the page elements;
determining a conversion function corresponding to the page component according to a pre-configured conversion association table, and calling the conversion function to convert the page element into a document element;
determining the document element style of the document element according to the page element style, and determining the document position information of the document element according to the page position information;
and combining the document elements according to the document position information and the document element styles to obtain a exported document.
2. The method of claim 1, wherein the page element comprises a picture element; the page component comprises a picture component; the determining a conversion function corresponding to the page component according to the preconfigured conversion association table, and calling the conversion function to convert the page element into a document element includes:
determining a picture conversion function corresponding to the picture component according to a pre-configured conversion association table;
and calling the picture conversion function to convert the picture elements into picture objects, acquiring picture coding information of the picture elements, and drawing document elements according to the picture objects and the picture coding information.
3. The method of claim 1, wherein before determining a conversion function corresponding to the page component according to a preconfigured conversion association table and invoking the conversion function to convert the page element into a document element, the method further comprises:
acquiring a conversion association table updating instruction; the conversion association table updating instruction carries a target page component to be updated and a corresponding target conversion function;
sending the conversion association table updating instruction to a server; the conversion association table updating instruction is used for instructing the server to update the target page component and the target conversion function to a conversion association table;
and receiving the updated conversion association table fed back by the server.
4. The method according to claim 1, wherein before the obtaining of the report page to be exported, the method further comprises:
acquiring report data and report configuration data;
determining a report template, a page template style, a page component, and page position information and a page element style corresponding to the page component according to the report configuration data;
calling the page component to generate page elements according to the report data;
filling the page elements into the report template according to the page position information and the page element styles;
and rendering the filled report template according to the page template style to obtain a report page.
5. The method of claim 4, wherein the obtaining report data and report configuration data comprises:
acquiring a report inquiry instruction carrying a report identifier;
sending the report form query instruction to a server; the report query instruction is used for instructing the server to call a report query function to query report data through a query interface corresponding to the report identifier;
and receiving report data and report configuration data fed back by the server aiming at the report query instruction.
6. The method according to claim 5, wherein before the obtaining of the report query instruction carrying the report identifier, the method further comprises:
detecting a configuration trigger operation;
acquiring a preconfigured operation table and a field table from a server according to the configuration triggering operation, and displaying the operation table and the field table through a configuration page;
detecting a submission triggering operation corresponding to the configuration page, and acquiring configuration data in the configuration page according to the submission triggering operation;
sending the configuration data to the server; the sent configuration data is used for indicating the server to configure a report inquiry function according to the configuration function.
7, report form leading-out device, characterized in that, the device includes:
the acquisition module is used for acquiring a report page to be exported;
the identification module is used for identifying page elements in the report page, and page components, page position information and page element styles which correspond to the page elements;
the conversion module is used for determining a conversion function corresponding to the page component according to a pre-configured conversion association table and calling the conversion function to convert the page element into a document element;
the conversion module is further used for determining the document element style of the document element according to the page element style and determining the document position information of the document element according to the page position information;
and the export module is used for combining the document elements according to the document position information and the document element styles to obtain an export document.
8. The apparatus of claim 7, further comprising:
the generating module is used for acquiring report data and report configuration data; determining a report template, a page template style, a page component, and page position information and a page element style corresponding to the page component according to the report configuration data; calling the page component to generate page elements according to the report data; filling the page elements into the report template according to the page position information and the page element styles; and rendering the filled report template according to the page template style to obtain a report page.
Computer device of , comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program is configured to carry out the steps of the method of any of claims 1 to 6 as claimed in .
10, computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any of claims 1 to 6, wherein represents a set of instructions for carrying out the method.
CN201910973164.5A 2019-10-14 2019-10-14 Report exporting method and device, computer equipment and storage medium Pending CN110737711A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910973164.5A CN110737711A (en) 2019-10-14 2019-10-14 Report exporting method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910973164.5A CN110737711A (en) 2019-10-14 2019-10-14 Report exporting method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110737711A true CN110737711A (en) 2020-01-31

Family

ID=69269990

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910973164.5A Pending CN110737711A (en) 2019-10-14 2019-10-14 Report exporting method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110737711A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111523067A (en) * 2020-03-19 2020-08-11 北京辰森世纪科技股份有限公司 Page style processing method and device, storage medium and computer equipment
CN113361234A (en) * 2021-07-09 2021-09-07 南方电网数字电网研究院有限公司 Document exporting method, system, device and storage medium based on template engine
CN113971993A (en) * 2021-10-22 2022-01-25 浙江太美医疗科技股份有限公司 Clinical test data conversion method and device, computer equipment and storage medium
CN114415896A (en) * 2021-12-15 2022-04-29 中孚安全技术有限公司 System capable of leading out word document through draggable dynamic configuration

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103034658A (en) * 2011-09-29 2013-04-10 福建睿能电子有限公司 Method and system for querying data and exporting report
CN103473234A (en) * 2012-06-07 2013-12-25 中兴通讯股份有限公司 Method, device and system for deriving report forms from web inquiring system
CN104750796A (en) * 2014-11-13 2015-07-01 安徽四创电子股份有限公司 Method for leading out Word under BS system
CN107015958A (en) * 2017-04-14 2017-08-04 东莞中国科学院云计算产业技术创新与育成中心 Report form generation method and device
CN108805098A (en) * 2018-06-21 2018-11-13 云城(北京)数据科技有限公司 The comparison method of paper document and electronic document, device and system
US20190012356A1 (en) * 2017-07-10 2019-01-10 Palantir Technologies Inc. Systems and methods for data analysis and visualization and managing data conflicts
CN109491743A (en) * 2018-11-05 2019-03-19 上海鋆创信息技术有限公司 Visual Report Forms generation method, device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103034658A (en) * 2011-09-29 2013-04-10 福建睿能电子有限公司 Method and system for querying data and exporting report
CN103473234A (en) * 2012-06-07 2013-12-25 中兴通讯股份有限公司 Method, device and system for deriving report forms from web inquiring system
CN104750796A (en) * 2014-11-13 2015-07-01 安徽四创电子股份有限公司 Method for leading out Word under BS system
CN107015958A (en) * 2017-04-14 2017-08-04 东莞中国科学院云计算产业技术创新与育成中心 Report form generation method and device
US20190012356A1 (en) * 2017-07-10 2019-01-10 Palantir Technologies Inc. Systems and methods for data analysis and visualization and managing data conflicts
CN108805098A (en) * 2018-06-21 2018-11-13 云城(北京)数据科技有限公司 The comparison method of paper document and electronic document, device and system
CN109491743A (en) * 2018-11-05 2019-03-19 上海鋆创信息技术有限公司 Visual Report Forms generation method, device, electronic equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111523067A (en) * 2020-03-19 2020-08-11 北京辰森世纪科技股份有限公司 Page style processing method and device, storage medium and computer equipment
CN113361234A (en) * 2021-07-09 2021-09-07 南方电网数字电网研究院有限公司 Document exporting method, system, device and storage medium based on template engine
CN113971993A (en) * 2021-10-22 2022-01-25 浙江太美医疗科技股份有限公司 Clinical test data conversion method and device, computer equipment and storage medium
CN114415896A (en) * 2021-12-15 2022-04-29 中孚安全技术有限公司 System capable of leading out word document through draggable dynamic configuration
CN114415896B (en) * 2021-12-15 2023-12-15 中孚安全技术有限公司 System capable of dragging dynamic configuration to export word document

Similar Documents

Publication Publication Date Title
CN110737711A (en) Report exporting method and device, computer equipment and storage medium
CN106502736B (en) Applied program processing method and device
CN108388598B (en) Electronic device, data storage method, and storage medium
CN110489312B (en) Data association method and device for triggering data acquisition by control
CN108008992B (en) Input operation processing method, processing device and computer readable storage medium
US11244153B2 (en) Method and apparatus for processing information
CN107807841B (en) Server simulation method, device, equipment and readable storage medium
CN107203312B (en) Mobile terminal and picture rendering method and storage device thereof
CN113190152A (en) Method and device for switching application program theme
CN108287707B (en) JSX file generation method and device, storage medium and computer equipment
CN111444253A (en) Data import method and device, computer readable storage medium and computer equipment
CN111125205A (en) Signboard data display method, terminal and storage medium
CN111191087A (en) Character matching method, terminal device and computer-readable storage medium
CN109614592B (en) Text processing method and device, storage medium and electronic equipment
CN111078562A (en) Interface test method, terminal device and computer readable storage medium
CN110865943A (en) Interface testing method and device, computer equipment and storage medium
CN110781378A (en) Data graphical processing method and device, computer equipment and storage medium
CN108196921B (en) Document development method and device, computer equipment and storage medium
CN113656731B (en) Advertisement page processing method and device, electronic equipment and storage medium
CN112507100B (en) Update processing method and device of question-answering system
CN111553283B (en) Method and device for generating model
CN111177558B (en) Channel service construction method and device
CN114116712A (en) Extended field processing method and device, electronic equipment and storage medium
CN107995176B (en) SCADA system picture cache system
CN111090457A (en) Interface analysis method, terminal device and computer-readable 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
TA01 Transfer of patent application right

Effective date of registration: 20220520

Address after: 518048 China Aviation Center 2901, No. 1018, Huafu Road, Huahang community, Huaqiang North Street, Futian District, Shenzhen, Guangdong Province

Applicant after: Shenzhen Ping An medical and Health Technology Service Co.,Ltd.

Address before: Room 12G, Area H, 666 Beijing East Road, Huangpu District, Shanghai 200001

Applicant before: PING AN MEDICAL AND HEALTHCARE MANAGEMENT Co.,Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20200131

RJ01 Rejection of invention patent application after publication