CN116383544A - Webpage report generation method, device, equipment and medium - Google Patents

Webpage report generation method, device, equipment and medium Download PDF

Info

Publication number
CN116383544A
CN116383544A CN202310652601.XA CN202310652601A CN116383544A CN 116383544 A CN116383544 A CN 116383544A CN 202310652601 A CN202310652601 A CN 202310652601A CN 116383544 A CN116383544 A CN 116383544A
Authority
CN
China
Prior art keywords
data
report
target
webpage
source address
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.)
Granted
Application number
CN202310652601.XA
Other languages
Chinese (zh)
Other versions
CN116383544B (en
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.)
Beijing Tuopu Fenglian Information Technology Co ltd
Original Assignee
Beijing Tuopu Fenglian Information Technology 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 Beijing Tuopu Fenglian Information Technology Co ltd filed Critical Beijing Tuopu Fenglian Information Technology Co ltd
Priority to CN202310652601.XA priority Critical patent/CN116383544B/en
Publication of CN116383544A publication Critical patent/CN116383544A/en
Application granted granted Critical
Publication of CN116383544B publication Critical patent/CN116383544B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/174Form filling; Merging
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides a method, a device, equipment and a medium for generating a webpage report, wherein the method comprises the following steps: acquiring webpage report template data of a target webpage report and a report filling data source address; the webpage report template data carries attribute information of data required by each cell in the target webpage report; acquiring target data for filling a target webpage report based on the report filling data source address; rendering a target webpage report filled with target data in the headless browser according to the attribute information of each target data; and sending the target webpage report to terminal equipment, and displaying the target webpage report in the terminal equipment.

Description

Webpage report generation method, device, equipment and medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a method, an apparatus, a device, and a medium for generating a web page report.
Background
With the rapid development of information technology in modern society, data visualization has become one of the very important technologies in the field of data analysis in our lives.
At present, a report is an important means of data analysis, a webpage report is usually generated by manually writing codes according to user requirements by a developer, however, in an actual application scene, different enterprises, different departments of the same enterprise and even different operation devices, data required to be filled in the webpage report are different, the data required to be filled is very large, some data can relate to formula calculation, and if the webpage report is directly rendered in a webpage, webpage blockage easily occurs.
Disclosure of Invention
In view of this, an object of the present application is to provide a method, apparatus, device and medium for generating a web page report, which are used for solving the problem of how to increase the rendering speed of the web page report in the prior art.
In a first aspect, an embodiment of the present application provides a method for generating a web page report, which is applied to a server integrated with a headless browser, including:
acquiring webpage report template data of a target webpage report and a report filling data source address; the webpage report template data carries attribute information of data required by each cell in the target webpage report;
acquiring target data for filling a target webpage report based on the report filling data source address;
rendering a target webpage report filled with target data in the headless browser according to the attribute information of each target data;
and sending the target webpage report to terminal equipment, and displaying the target webpage report in the terminal equipment.
Optionally, acquiring the target data for populating the target web page report based on the report population data source address includes:
carrying out validity check on attribute information of data carried by the report form filling data source address through a pre-checking mechanism;
if the data carried by the report form filling data source address is legal, judging request parameters carried by the report form filling data source address through a preset signature rule, and determining the safety of the report form filling data source address;
and if the report filling data source address is safe, acquiring target data for filling a target webpage report from the report filling data source address.
Optionally, according to attribute information of each target data, rendering a target webpage report filled with the target data in the headless browser, including:
traversing each target data, and determining a field corresponding to the target data in the webpage report template data according to attribute information of each target data;
for each piece of target data, according to a field corresponding to the target data, associating the target data with a cell corresponding to the field in the webpage report template data;
and rendering a target webpage report filled with the target data in the headless browser according to the association relation between each target data and the corresponding cell.
Optionally, the method further comprises:
traversing the fields in the webpage report template data, and determining whether fields for acquiring data by using calculation rules exist according to the field attribute of each field; the calculation rule relates to the operation between the data corresponding to at least two cells;
if a field for acquiring data by using a calculation rule exists, acquiring data corresponding to at least two cells related to the calculation rule, and operating the data corresponding to the at least two cells based on the calculation rule to obtain an operation result;
correlating the operation result with the field in which the data acquired by using the calculation rule exists;
and rendering a target webpage report filled with target data in the headless browser according to the association relation between the operation result and the field with the data acquired by using the calculation rule.
Optionally, the method further comprises:
and responding to the change of the target data carried by the report filling data source address, and then the re-executing step obtains the target data for filling the target webpage report based on the report filling data source address.
Optionally, the attribute information of the target data includes the following information:
the field corresponding to the target data and the data type of the target data.
In a second aspect, an embodiment of the present application provides a device for generating a web page report, which is applied to a server integrated with a headless browser, including:
the first acquisition module is used for acquiring webpage report template data of the target webpage report and a report filling data source address; the webpage report template data carries attribute information of data required by each cell in the target webpage report;
the second acquisition module is used for acquiring target data for filling the target webpage report based on the report filling data source address;
the rendering module is used for rendering a target webpage report filled with target data in the headless browser according to the attribute information of each target data;
and the display module is used for sending the target webpage report to terminal equipment and displaying the target webpage report in the terminal equipment.
Optionally, the second obtaining module includes:
the verification unit is used for verifying the validity of the attribute information of the data carried by the report form filling data source address through a pre-detection mechanism; if the data carried by the report form filling data source address is legal, judging request parameters carried by the report form filling data source address through a preset signature rule, and determining the safety of the report form filling data source address; and if the report filling data source address is safe, acquiring target data for filling a target webpage report from the report filling data source address.
In a third aspect, embodiments of the present application provide a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above-described method.
Firstly, acquiring webpage report template data of a target webpage report and a report filling data source address; the webpage report template data carries attribute information of data required by each cell in the target webpage report; then, acquiring target data for filling a target webpage report based on the report filling data source address; secondly, according to the attribute information of each target data, rendering a target webpage report filled with the target data in the headless browser; and finally, sending the target webpage report to a terminal device, and displaying the target webpage report in the terminal device.
In some embodiments, the webpage report displayed in the terminal device is filled and processed in the headless browser in advance, and then the rendering result is sent to the terminal device, so that rendering blocking caused by large data volume and the condition of needing to perform data calculation in real time is avoided when the webpage report is rendered in the terminal device, and the rendering efficiency of the webpage report is improved.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a method for generating a web page report according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a generating device for a web page report according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, 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 apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to be within the scope of the present application.
At present, the method for rendering the webpage report in the webpage is directly based on report data (the report data comprises report style, filling fields in cells, data format of required data of the cells and the like) of the webpage report, and the obtained filling data is directly rendered into the webpage, but the rendering efficiency of the report in the webpage is increased due to the large filling data amount and the existence of some calculation rules and the like in the report.
Based on the above-mentioned drawbacks, an embodiment of the present application provides a method for generating a web page report, as shown in fig. 2, applied to a server integrated with a headless browser, including:
s101, acquiring webpage report template data of a target webpage report and a report filling data source address; the webpage report template data carries attribute information of data required by each cell in the target webpage report;
s102, acquiring target data for filling a target webpage report based on a report filling data source address;
s103, according to the attribute information of each target data, rendering a target webpage report filled with the target data in the headless browser;
s104, the target webpage report is sent to a terminal device, and the target webpage report is displayed in the terminal device.
The headless browser mentioned in the application refers to a Web browser with automation characteristics, which has all functions of the browser transplanted to the background, so that the browser does not have a visual user interface like a traditional browser, which enables the browser to simulate the behavior of the browser in an automatic and non-visual manner, and is more rapid and efficient.
In the step S101, the field associated with each cell, the table style data and the layer rendering structure of the target report template, and the attribute information of the data required by each cell are recorded in the web page report template data, where the fields associated with each cell are some fields related to the target web page report and capable of enabling the user to be connected to some specific functions in the table, such as header fields, fields (merging cells, formulas) corresponding to the editing controls in the editing column, and the like. The table style data of the target webpage report is data recorded with the style of each cell in the target webpage report, and specifically may include any one or more of the following data: index of cells, row of cells, column width of cells, background color of cells, initialization data of cells, configuration of cells, and the like. The layer rendering structure is used for normalizing the rendering sequence of the cells when the report is rendered. The attribute information of the data required for each cell includes any one or more of the following information: the data type, the data cannot be null, the string length of the data cannot exceed a preset length, etc. The report population data source address is a storage address storing data for population of web page reports.
In a specific implementation, the table style data and the report filling data source addresses of the web page report are respectively stored in different databases, and in order to obtain the two types of data, a generation request of the web page report needs to be initiated first, and based on the generation request, the server can respectively obtain corresponding data from the databases storing the table style data and the report filling data source addresses.
In the step S102, the interface provided by the report filling data source address may acquire the target data of the web page report to be filled.
In the step S103, each target data has its own attribute information, and the attribute information of the target data includes the following information: the field corresponding to the target data and the data type of the target data. Each cell in the webpage report template data of the target webpage report also carries the corresponding field and the data type to be filled.
In specific implementation, traversing the target data, finding corresponding cells in the webpage report template data according to fields corresponding to the target data and the data types of the target data carried in the attribute information of each target data, and rendering the target webpage report filled with the target data in the headless browser based on the corresponding relation between the target data and the cells in the webpage report template data, wherein the rendering is equivalent to loading data in the rendering process of the headless browser.
In the step S104, the rendering result of the headless browser is directly sent to the terminal device and displayed in the terminal device, so that the processes of data filling and data processing are reduced, and the problems of web page blocking and slow rendering efficiency of the web page report are avoided.
According to the embodiment provided by the application, through the four steps, the webpage report displayed in the terminal equipment is subjected to data filling and processing in the headless browser in advance, and then the rendering result is sent to the terminal equipment, so that rendering clamping caused by large data volume and the condition of needing to perform data calculation in real time when the webpage report is rendered in the terminal equipment is avoided, and the rendering efficiency of the webpage report is improved.
In this application, after the report form filling data source address is obtained, the data is not directly obtained from the address, because the address may be tampered by a hacker, and in order to ensure data security, the address needs to be checked, that is, the method of this application further includes:
step 109, performing validity check on attribute information of data carried by the report form filling data source address through a pre-checking mechanism;
step 110, if the data carried by the report form filling data source address is legal, judging the request parameters carried by the report form filling data source address through a preset signature rule, and determining the security of the report form filling data source address;
and step 111, if the report filling data source address is safe, acquiring target data for filling a target webpage report from the report filling data source address.
In the above steps 109 to 111, the pre-checking mechanism is configured to check whether the parameters in the API interface of the report form filling data source address can generate the data set, and if the parameters in the API interface are illegal (the illegal case may include any one or more of the following data types are inconsistent with the data types required by the cells, the data is null, the string length of the data exceeds the preset length, etc.), the data of the generated data set is also erroneous, so that the data acquisition from the API interface is directly stopped, or the data acquisition request is sent to the server again. Only if the parameter attribute of the API is legal, the API signature is continuously verified, two parameters, namely a random number and a time stamp, are added in the request parameters before the data acquisition request is sent, an md5 character string is added on the basis, and the data signature is generated based on the request parameters, the random number and the time stamp and the md5 character string. When the server feeds back the data to acquire the API, the corresponding data signature is carried in the API. And verifying the fed-back data signature according to the generation rule of the data signature, and if only the difference between the time stamp and the current time in the fed-back data signature is smaller than the preset difference and the request parameter, the random number and the md5 character string are completely the same, passing the security verification of the API interface. And under the condition that the API interface is safe, acquiring a parameter data packet which is output by the API interface and used for generating a data set, and when the API interface is unsafe, stopping acquiring data from the API interface or resending a data acquisition request to a server.
In this application, the target data needs to be filled into the corresponding cells of the target web page report, and the specific filling manner includes, step S103, including:
step 1031, traversing each target data, and determining a field corresponding to the target data in the webpage report template data according to attribute information of each target data;
step 1032, for each target data, associating the target data with a cell corresponding to the field in the webpage report template data according to the field corresponding to the target data;
and step 1033, rendering a target webpage report filled with the target data in the headless browser according to the association relation between each target data and the corresponding cell.
In the steps 1031 to 1033, the attribute information of the target data carries the field corresponding to the target data, and the web page report template data also has the cell associated with the field, so that the cell to be filled with the target data is found in the web page report template according to the same field, then the corresponding data and the cell are associated based on the same field, and based on the association relationship, the user can know which cell the target data is filled into when rendering the target web page report.
When the data is filled in, the obtained data is directly and shoveled into the table, and the data corresponding to some cells need to be operated, namely, the method further comprises the following steps:
step 105, traversing the fields in the webpage report template data, and determining whether fields for acquiring data by using calculation rules exist according to the field attribute of each field; the calculation rule relates to the operation between the data corresponding to at least two cells;
step 106, if a field for acquiring data by using a calculation rule exists, acquiring data corresponding to at least two cells related to the calculation rule, and calculating the data corresponding to the at least two cells based on the calculation rule to obtain an operation result;
step 107, associating the operation result with the field where the data acquired by using the calculation rule exists;
and step 108, rendering a target webpage report filled with target data in the headless browser according to the association relation between the operation result and the field with the data acquired by using the calculation rule.
In step 105, each field in the web page report template data is traversed first, and whether the field attribute corresponding to the field carries a calculation rule is checked. The calculation rule involves an operation between at least two cell corresponding data, for example, cell 3 is the sum of cell 1 and cell 2.
In step 106, if there is a field for acquiring data by using the calculation rule, the target data corresponding to the related cell is acquired according to the cell related to the calculation rule in the field attribute of the field, and the operation result corresponding to the acquired data is calculated based on the calculation rule.
In the above steps 107 and 108, associating the operation result with the field where the data acquired by using the calculation rule exists; and rendering a target webpage report filled with target data in the headless browser according to the association relation between the operation result and the field with the data acquired by using the calculation rule.
In the method, the target data carried by the report filling data source address is required to be monitored in real time, when the target data carried by the report filling data source address is changed, the step S102 is re-executed, a new rendering result is obtained in the headless browser based on the new target data, and the new rendering result is sent to the terminal equipment used by a user, so that the situation of blocking when the webpage renders the webpage report is reduced, and the timeliness of the data is ensured.
The embodiment of the application also provides a device for generating the webpage report, as shown in fig. 2, applied to a server integrated with a headless browser, comprising:
the first obtaining module 201 is configured to obtain webpage report template data of a target webpage report and a report filling data source address; the webpage report template data carries attribute information of data required by each cell in the target webpage report;
a second obtaining module 202, configured to obtain target data for populating a target web page report based on the report population data source address;
the rendering module 203 is configured to render, according to attribute information of each target data, a target webpage report filled with the target data in the headless browser;
and the display module 204 is used for sending the target webpage report to a terminal device and displaying the target webpage report in the terminal device.
Optionally, the second obtaining module includes:
the verification unit is used for verifying the validity of the attribute information of the data carried by the report form filling data source address through a pre-detection mechanism; if the data carried by the report form filling data source address is legal, judging request parameters carried by the report form filling data source address through a preset signature rule, and determining the safety of the report form filling data source address; and if the report filling data source address is safe, acquiring target data for filling a target webpage report from the report filling data source address.
Optionally, the rendering module includes:
the first traversing unit is used for traversing each piece of target data and determining a field corresponding to the target data in the webpage report template data according to the attribute information of each piece of target data;
the first association unit is used for associating each piece of target data with a cell corresponding to a field in the webpage report template data according to the field corresponding to the target data;
and the first rendering unit is used for rendering the target webpage report filled with the target data in the headless browser according to the association relation between each target data and the corresponding cell.
Optionally, the apparatus further includes:
the second traversing unit is used for traversing the fields in the webpage report template data, and determining whether fields for acquiring data by using calculation rules exist or not according to the field attribute of each field; the calculation rule relates to the operation between the data corresponding to at least two cells; if a field for acquiring data by using a calculation rule exists, acquiring data corresponding to at least two cells related to the calculation rule, and operating the data corresponding to the at least two cells based on the calculation rule to obtain an operation result;
the second association unit is used for associating the operation result with the field in which the data acquired by using the calculation rule exists;
and the second rendering unit is used for rendering a target webpage report filled with target data in the headless browser according to the association relation between the operation result and the field with the data acquired by using the calculation rule.
Optionally, the apparatus further includes:
and the circulation module is used for responding to the change of the target data carried by the report filling data source address, and the re-executing step obtains the target data for filling the target webpage report based on the report filling data source address.
Optionally, the attribute information of the target data includes the following information:
the field corresponding to the target data and the data type of the target data.
Corresponding to the method for generating the web page report in fig. 1, the embodiment of the application further provides a computer device 300, as shown in fig. 3, where the device includes a memory 301, a processor 302, and a computer program stored in the memory 301 and capable of running on the processor 302, where the method for generating the web page report is implemented when the processor 302 executes the computer program.
Specifically, the above memory 301 and the processor 302 can be general memories and processors, which are not specifically limited herein, when the processor 302 runs a computer program stored in the memory 301, the above method for generating a web page report can be executed, which solves the problem of how to increase the rendering speed of the web page report in the prior art.
Corresponding to the method for generating the web page report in fig. 1, the embodiment of the application also provides a computer readable storage medium, where a computer program is stored, and the computer program executes the steps of the method for generating the web page report when being executed by a processor.
Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk and the like, when a computer program on the storage medium is run, the method for generating the webpage report can be executed, the problem of how to improve the rendering speed of the webpage report in the prior art is solved, the webpage report displayed in the terminal equipment is filled with and processed with data in a headless browser in advance, and then a rendering result is sent to the terminal equipment, so that rendering blocking caused by large data volume and the condition of needing to perform data calculation in real time when the webpage report is rendered in the terminal equipment is avoided, and the rendering efficiency of the webpage report is improved.
In the embodiments provided in the present application, it should be understood that the disclosed methods and apparatuses may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown 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 units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments provided in the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It should be noted that: like reference numerals and letters in the following figures denote like items, and thus once an item is defined in one figure, no further definition or explanation of it is required in the following figures, and furthermore, the terms "first," "second," "third," etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the foregoing examples are merely specific embodiments of the present application, and are not intended to limit the scope of the present application, but the present application is not limited thereto, and those skilled in the art will appreciate that while the foregoing examples are described in detail, the present application is not limited thereto. Any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or make equivalent substitutions for some of the technical features within the technical scope of the disclosure of the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the corresponding technical solutions. Are intended to be encompassed within the scope of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. The method for generating the webpage report is characterized by being applied to a server integrated with a headless browser and comprising the following steps:
acquiring webpage report template data of a target webpage report and a report filling data source address; the webpage report template data carries attribute information of data required by each cell in the target webpage report;
acquiring target data for filling a target webpage report based on the report filling data source address;
rendering a target webpage report filled with target data in the headless browser according to the attribute information of each target data;
and sending the target webpage report to terminal equipment, and displaying the target webpage report in the terminal equipment.
2. The method of claim 1, wherein obtaining target data for populating a target web page report based on the report population data source address, comprising:
carrying out validity check on attribute information of data carried by the report form filling data source address through a pre-checking mechanism;
if the data carried by the report form filling data source address is legal, judging request parameters carried by the report form filling data source address through a preset signature rule, and determining the safety of the report form filling data source address;
and if the report filling data source address is safe, acquiring target data for filling a target webpage report from the report filling data source address.
3. The method of claim 1, wherein rendering the target web page report filled with the target data in the headless browser according to the attribute information of each target data, comprises:
traversing each target data, and determining a field corresponding to the target data in the webpage report template data according to attribute information of each target data;
for each piece of target data, according to a field corresponding to the target data, associating the target data with a cell corresponding to the field in the webpage report template data;
and rendering a target webpage report filled with the target data in the headless browser according to the association relation between each target data and the corresponding cell.
4. A method according to claim 3, characterized in that the method further comprises:
traversing the fields in the webpage report template data, and determining whether fields for acquiring data by using calculation rules exist according to the field attribute of each field; the calculation rule relates to the operation between the data corresponding to at least two cells;
if a field for acquiring data by using a calculation rule exists, acquiring data corresponding to at least two cells related to the calculation rule, and operating the data corresponding to the at least two cells based on the calculation rule to obtain an operation result;
correlating the operation result with the field in which the data acquired by using the calculation rule exists;
and rendering a target webpage report filled with target data in the headless browser according to the association relation between the operation result and the field with the data acquired by using the calculation rule.
5. The method according to claim 1, wherein the method further comprises:
and responding to the change of the target data carried by the report filling data source address, and then the re-executing step obtains the target data for filling the target webpage report based on the report filling data source address.
6. The method according to claim 1, wherein the attribute information of the target data is included in the following information:
the field corresponding to the target data and the data type of the target data.
7. The device for generating the webpage report is characterized by being applied to a server integrated with a headless browser, and comprising the following components:
the first acquisition module is used for acquiring webpage report template data of the target webpage report and a report filling data source address; the webpage report template data carries attribute information of data required by each cell in the target webpage report;
the second acquisition module is used for acquiring target data for filling the target webpage report based on the report filling data source address;
the rendering module is used for rendering a target webpage report filled with target data in the headless browser according to the attribute information of each target data;
and the display module is used for sending the target webpage report to terminal equipment and displaying the target webpage report in the terminal equipment.
8. The apparatus of claim 7, wherein the second acquisition module comprises:
the verification unit is used for verifying the validity of the attribute information of the data carried by the report form filling data source address through a pre-detection mechanism; if the data carried by the report form filling data source address is legal, judging request parameters carried by the report form filling data source address through a preset signature rule, and determining the safety of the report form filling data source address; and if the report filling data source address is safe, acquiring target data for filling a target webpage report from the report filling data source address.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of the preceding claims 1-6 when the computer program is executed.
10. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program when executed by a processor performs the steps of the method of any of the preceding claims 1-6.
CN202310652601.XA 2023-06-05 2023-06-05 Webpage report generation method, device, equipment and medium Active CN116383544B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310652601.XA CN116383544B (en) 2023-06-05 2023-06-05 Webpage report generation method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310652601.XA CN116383544B (en) 2023-06-05 2023-06-05 Webpage report generation method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN116383544A true CN116383544A (en) 2023-07-04
CN116383544B CN116383544B (en) 2023-08-25

Family

ID=86961887

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310652601.XA Active CN116383544B (en) 2023-06-05 2023-06-05 Webpage report generation method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN116383544B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040117731A1 (en) * 2002-09-27 2004-06-17 Sergey Blyashov Automated report building system
CN104281447A (en) * 2014-09-01 2015-01-14 国家电网公司 Report form fast generating and issuing system and method
CN107491427A (en) * 2017-06-08 2017-12-19 北京小度信息科技有限公司 Data sheet processing method and processing device
CN110232178A (en) * 2019-05-29 2019-09-13 北京中亦安图科技股份有限公司 Report generation method and device
CN110473080A (en) * 2019-07-30 2019-11-19 阿里巴巴集团控股有限公司 A kind of report processing method, device and computer equipment
CN115576950A (en) * 2022-10-31 2023-01-06 南京熊猫电子股份有限公司 Report generation method based on JSON configuration file

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040117731A1 (en) * 2002-09-27 2004-06-17 Sergey Blyashov Automated report building system
CN104281447A (en) * 2014-09-01 2015-01-14 国家电网公司 Report form fast generating and issuing system and method
CN107491427A (en) * 2017-06-08 2017-12-19 北京小度信息科技有限公司 Data sheet processing method and processing device
CN110232178A (en) * 2019-05-29 2019-09-13 北京中亦安图科技股份有限公司 Report generation method and device
CN110473080A (en) * 2019-07-30 2019-11-19 阿里巴巴集团控股有限公司 A kind of report processing method, device and computer equipment
CN115576950A (en) * 2022-10-31 2023-01-06 南京熊猫电子股份有限公司 Report generation method based on JSON configuration file

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
余建成;: "基于生产系统使用的Web自定义报表设计", 计算机与数字工程, no. 06 *

Also Published As

Publication number Publication date
CN116383544B (en) 2023-08-25

Similar Documents

Publication Publication Date Title
JP2019502192A (en) Method and device for application information risk management
CN108667840A (en) Injection loophole detection method and device
CN105791178A (en) Message assembly method and device
CN112115026A (en) Server cluster monitoring method and device, electronic equipment and readable storage medium
CN113448862B (en) Software version testing method and device and computer equipment
CN107102908A (en) Data verification method, data fault tolerance method and device
CN106897211A (en) For the localization method and system of obscuring script
CN107357588B (en) Object code generation method and device
CN111475494A (en) Mass data processing method, system, terminal and storage medium
CN108090364B (en) Method and system for positioning data leakage source
CN107103243A (en) The detection method and device of leak
CN108153663B (en) Page data processing method and device
CN116383544B (en) Webpage report generation method, device, equipment and medium
CN110688823A (en) XML file verification method and device
CN115905225A (en) Data service publishing system, method, device and computer storage medium
CN115730012A (en) Database desensitization method and system
CN111737090B (en) Log simulation method and device, computer equipment and storage medium
CN113934729A (en) Data management method based on knowledge graph, related equipment and medium
CN110807037B (en) Data modification method and device, electronic equipment and storage medium
CN113342647A (en) Test data generation method and device
CN113157671A (en) Data monitoring method and device
EP4184356A1 (en) Webpage integrity monitoring
CN108628909B (en) Information pushing method and device
CN114116244A (en) Data processing method, device and system, electronic equipment and storage medium
CN111901299A (en) Application authentication method and device, electronic 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
GR01 Patent grant
GR01 Patent grant