CN107092625B - Data configuration method, data processing method and device - Google Patents
Data configuration method, data processing method and device Download PDFInfo
- Publication number
- CN107092625B CN107092625B CN201611237822.7A CN201611237822A CN107092625B CN 107092625 B CN107092625 B CN 107092625B CN 201611237822 A CN201611237822 A CN 201611237822A CN 107092625 B CN107092625 B CN 107092625B
- Authority
- CN
- China
- Prior art keywords
- tag
- data
- information
- html
- query statement
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 104
- 238000003672 processing method Methods 0.000 title claims abstract description 15
- 230000008520 organization Effects 0.000 claims abstract description 144
- 238000006243 chemical reaction Methods 0.000 claims description 19
- 238000004458 analytical method Methods 0.000 claims description 16
- 238000012545 processing Methods 0.000 claims description 11
- 230000004044 response Effects 0.000 claims description 3
- 238000004590 computer program Methods 0.000 claims 2
- 238000009877 rendering Methods 0.000 claims 2
- 238000010586 diagram Methods 0.000 description 7
- 238000012986 modification Methods 0.000 description 6
- 230000004048 modification Effects 0.000 description 6
- 238000011160 research Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 241000282813 Aepyceros melampus Species 0.000 description 1
- 241001122767 Theaceae Species 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000001172 regenerating effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2457—Query processing with adaptation to user needs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9577—Optimising the visualization of content, e.g. distillation of HTML documents
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Mathematical Physics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application discloses a data configuration method, a data processing method and a device, which are used for displaying a pre-configured html template; the html template comprises a predefined data organization tag; acquiring a query statement of the data organization label input by a user; generating a template file based on the query statement; the template file is used for converting into an html file so as to display target data acquired by the query statement; analyzing a predefined data organization label in the template file to obtain a query statement; the template file is generated based on a pre-configured html template and the query statement input into the data organization tag; converting the template file into an html file; the html file is used for displaying target data acquired by the query statement; and sending the html file to a receiving end. The embodiment of the application realizes efficient and flexible data access.
Description
Technical Field
The present application belongs to the field of computer technology, and in particular, relates to a data access configuration method, a data access processing method, and a device.
Background
In some service scenarios, data generated by service operation needs to be provided to a data user, so that the data user can monitor, analyze, process, and the like the data, and thus, control, management, and the like of the service can be realized according to a processing result.
Disclosure of Invention
The inventor researches and discovers that if data content and data form can be defined in advance by the data user and the data provider, the data provider develops sql (structured query language) statements and solidifies the statements in program codes according to the definition, and the system executes the program codes to realize data query and provide the data to the data user, but in this way, as the sql statements are solidified in the program, modification is inconvenient, maintenance cost is high, and once the data user has any requirement, the data provider needs to be informed to modify, and efficiency is low and flexible; accordingly, the inventor provides a technical scheme of the present application through further research, and the present application provides a data configuration method, a data using method and a device, so as to realize efficient and flexible data access.
A first aspect of the present application provides a data configuration method, including:
displaying a pre-configured html template;
the html template comprises a predefined data organization tag;
acquiring a query statement of the data organization label input by a user;
generating a template file based on the query statement; the template file is used for converting into an html file so as to display target data acquired by the query statement;
and sending the template file to a server.
Optionally, the html template further includes an html form tag for defining a form; the data organization tag comprises a report tag embedded in the html form tag and is used for defining target data for filling the form;
the query statement acquiring step includes:
acquiring a query statement of the report label input by a user;
the method further comprises the following steps:
acquiring header information of the html form tag input by a user;
the template file generating step comprises:
generating a template file based on the header information and the query statement; and the field information in the query statement corresponds to the header information one by one according to the appearance sequence.
Optionally, the data organization tag further comprises a trigger tag embedded in the report tag; the trigger tag is used for defining a middle table; the query statement is used for acquiring target data from the intermediate table;
the method further comprises the following steps:
acquiring at least one query sub-statement of the trigger tag input by a user and table attribute information of the intermediate table; the at least one query sub-statement is used for acquiring filling data for filling the intermediate table;
the template file generating step comprises:
and generating a template file based on the header information, the query statement, the table attribute information of the intermediate table and the at least one query sub-statement.
Optionally, the data organization tag comprises a graphic tag for defining a statistical graph and target data required for drawing the statistical graph;
the query statement acquiring step includes:
acquiring a query statement of the graphical label input by a user;
the method further comprises the following steps:
acquiring the graph drawing information of the graph label input by a user;
the template file generating step comprises:
and generating a template file based on the graph drawing information and the query statement.
A second aspect of the present application provides a data configuration method, including:
analyzing a predefined data organization label in the template file to obtain a query statement; the template file is generated based on a pre-configured html template and the query statement input into the data organization tag;
converting the template file into an html file; the html file is used for displaying target data acquired by the query statement;
and sending the html file to a receiving end.
Optionally, the data organization tag comprises a report tag embedded with an html form tag; the html form tag is used for defining a form; the report tag is used for defining target data for filling the form; the field information in the query statement corresponds to the header information of the table one by one according to the appearance sequence;
the step of converting comprises:
acquiring the target data by using the query statement;
corresponding to the header information of the table, determining the cell data filled into each row of the table;
generating html line tags based on the cell data of each line;
and filling the html line tag into the template file to replace the report tag to obtain an html file.
Optionally, a trigger tag is embedded in the report tag; the trigger tag is used for defining a middle table;
the analyzing step comprises the following steps:
analyzing the data organization label to obtain a query statement, the table attribute information of the intermediate table and at least one query sub-statement;
the target data acquiring step includes:
constructing an intermediate table according to the table attribute information;
acquiring filling data by utilizing the at least one query sub-statement so as to fill the intermediate table;
and acquiring the target data from the intermediate table by using the query statement.
Optionally, the data organization tag comprises a graphical tag; the graph label is used for defining a statistical graph and drawing target data required by the statistical graph;
the analyzing step comprises the following steps:
analyzing the data organization label to obtain graph drawing information and query statements;
the step of converting comprises:
acquiring target data by using the query statement;
drawing a statistical graph according to the target data and the graph drawing information;
and filling the path address of the statistical graph into the template file to replace the graph label to obtain an html file.
A third aspect of the present application provides a data configuration apparatus, including:
the display module is used for displaying the pre-configured html template; the html template comprises a predefined data organization tag;
the acquisition module is used for acquiring a query statement of the data organization tag input by a user;
the generating module is used for generating a template file based on the query statement; the template file is used for converting into an html file so as to display target data acquired by the query statement;
and the first sending module is used for sending the template file to a server.
A fourth aspect of the present application provides a data configuration apparatus, including:
the analysis module is used for analyzing the predefined data organization label in the template file to obtain a query statement; the template file is generated based on a pre-configured html template and the query statement input into the data organization tag;
the conversion module is used for converting the template file into an html file; the html file is used for displaying target data acquired by the query statement;
and the second sending module is used for sending the html file to a receiving end.
Compared with the prior art, the application can obtain the following technical effects
The method comprises the steps that a pre-configured html (hyper text markup language) template comprises a pre-defined data organization tag, the pre-configured html template is displayed so that a user can edit and obtain input contents input by the user, and a template file is generated at least based on query sentences of the data organization tag input by the user; the method comprises the steps of analyzing a data organization label in a template file to obtain a query statement, converting the template file into an html file, displaying target data obtained by the query statement by the html file, sending the html file to a receiving end, and normally displaying the html file by the receiving end.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart of one embodiment of a data configuration method of the present application;
FIG. 2 is a flow chart of one embodiment of a data processing method of the present application;
FIG. 3 is a flow chart of yet another embodiment of a method for data configuration according to an embodiment of the present application;
FIG. 4 is a flow chart of yet another embodiment of a method of data processing according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating a display of a table in an html (hypertext markup language) document according to an embodiment of the present application;
FIG. 6 is a flow chart of yet another embodiment of a method for data configuration according to an embodiment of the present application;
FIG. 7 is a flow chart of yet another embodiment of a method of data processing according to an embodiment of the present application;
FIG. 8 is a schematic diagram of another display of a table in an html document in the embodiment of the present application;
FIG. 9 is a flow chart of yet another embodiment of a method for data configuration according to an embodiment of the present application;
FIG. 10 is a flow chart of yet another embodiment of a method of data processing according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a display of statistical graphs in an html document according to an embodiment of the present application;
FIG. 12 is a flow chart of yet another embodiment of a method of data processing according to an embodiment of the present application;
FIG. 13 is a block diagram of an embodiment of a data configuration apparatus according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of an embodiment of a data processing apparatus according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in detail with reference to the drawings and examples, so that how to implement technical means to solve technical problems and achieve technical effects of the present application can be fully understood and implemented.
The technical scheme of the embodiment of the application can be applied to any application scene for accessing the database data, and how to efficiently and flexibly realize data access becomes an important technical problem to be solved.
The inventor finds in research that data obtained from a database and provided to a data user is usually presented in the form of a report, i.e., a table, and/or a statistical graph, i.e., an image. In most application scenarios, the data is sent to the data user by mail. Data users often have certain requirements for presenting the style of reports or statistical graphs of data. These requirements are clearly not met if data access is achieved only by sql (structured query language) statements. Then, how to present the data obtained from the database in the form of report or statistical graph and with a certain presentation style, the inventor further studies to find that an html (hypertext markup language) file is a content document that can present tables and images and has rich style definitions, and can be read by a mail client, a browser, etc. to present the content or be downloaded as a mail attachment, and if html and sql are combined, the requirement of data query and data presentation can be met.
The inventor provides the technical scheme of the application based on the creative discovery, in the embodiment of the application, an html template is pre-configured, and the html template comprises a predefined data organization tag; and displaying the html template to a user, editing the html template by the user, and generating a template file at least based on a query statement of the data organization tag input by the user. The data organization tag is a self-defined tag, so that the template file is only needed to be analyzed to obtain the query statement in the data organization tag, the target data is queried according to the query statement, the template file is converted into the html file according to the html standard format based on the target data, the html file can be used for displaying the target data, the html file is sent to the receiving end, the receiving end can normally display the html file, and data access can be achieved. According to the method and the device, data access can be achieved only by inputting the query statement in the data organization tag of the html template, modification is convenient, the template file can be reconfigured only by updating the input content, and therefore efficient and flexible data access is achieved. The method is not only suitable for the data provider, but also suitable for the data user, and the data user can know the data which the data user wants to obtain, so that the data user can conveniently perform personalized configuration.
Fig. 1 is a flowchart of an embodiment of a data configuration method provided in an embodiment of the present application, where the method may include the following steps:
101: displaying the preconfigured html template.
html (which is a markup language used to describe web pages, and is a set of markup tags (english: markup tag), html describes web pages using markup tags.
In this embodiment, the html template is formed by markup tags, including predefined data organization tags and standard html tags, it should be noted that, according to the html code editing principle, some necessary html tags are necessarily included in the html template, such as an < html > tag defining a web page, a < body > tag defining page content, and the like. The standard described in this application refers to the international common usage.
In the embodiment of the application, the data organization tag is not a standard html tag but a self-defined tag, and can provide data query and the like, and in the data organization tag, a user can write a query statement as element content of the data organization tag.
The custom tag includes a custom tag name and custom tag syntax, and the custom tag syntax may include, for example, which attributes the tag possesses.
Since the markup tags usually appear in pairs, the tag pairs are composed of a start tag and an end tag, all codes between the start tag and the end tag can be called as elements, and the content between the start tag and the end tag is element content. For example, the tag pairs < html >, which is the start tag, and </html >, which is the end tag. In the html file, the element content between < html > and </html > describes a webpage, and the element content between < body > and </body > describes a page content.
When a template configuration request triggered by a user is received, the requested pre-configured html template is obtained from the server, and the pre-configured html template is displayed.
The server side can provide a plurality of pre-configured html templates and output prompt messages of the html templates for the user to select.
102: and acquiring a query statement of the data organization label input by the user.
The various markup tags in the html template may not be configured with element content for user input.
Certainly, preset content may also be preconfigured for each tag to prompt a user to edit a code rule, and the user may write a code according to the preset content to update element content of each tag.
Therefore, optionally, a preset statement for data query may be preconfigured in the data organization tag to prompt the user how to write the query statement.
The query statement input by the user can realize the access of the data in the database, and the query statement can be specifically an sql statement.
103: generating a template file based on the query statement; and the template file is used for converting into an html file so as to display the target data acquired by the query statement.
The method includes the steps that element contents of all markup tags in an html template can be updated, so that input contents input by a user into the html template can be obtained specifically, the input contents at least include query statements input into the data organization tags, and the input contents also can include contents input into other markup tags. So that a template file can be generated based on the input content.
After the user finishes editing in the html template, the file generation operation can be executed, and the template file can be generated based on the query statement by responding to the file generation operation. The file generation operation may be implemented by operating a preset button or a preset control in the display interface.
In some embodiments, the input content of the html template input by the user may further include data source information of the data organization tag input by the user, so that the data source information of the data organization tag input by the user may be further obtained, and the template file may be generated based on at least the query statement and the data source information. The server side can select a corresponding data source to perform query operation according to the data source information in the template file, and can also select other available data sources to perform query operation if the data source information in the template file corresponds to the data source and is unavailable. According to actual requirements, the data sources may be impala, hive, mysql, or the like, it should be noted that the embodiments of the present application are not limited to these data sources, the server may support switching of multiple data sources, and the data sources may be dynamically added or deleted according to actual requirements, so that the extensibility is strong. In addition, the input content of the html template input by the user can also comprise database information of the data organization tag input so as to specify data query from the database.
104: and sending the template file to a server.
The server side receives the template file, namely the template file can be converted into the html file, and the html file can be sent to the receiving side.
The receiving end may include a plurality of receiving ends to correspond to different data users.
The server may parse the template file routinely.
Therefore, in some embodiments, an html file sending request can be sent to the server according to a user trigger operation; the html file sending request comprises a receiving end identification and a routine sending interval.
And the server analyzes the template file according to the routine sending interval and sends the html file to the receiving end corresponding to the receiving end identification.
When the receiving end is a mail client, the receiving end identifier may be a mail account.
In the embodiment, the data configuration is carried out in the form of html + sql, so that the data can be displayed in an html file, the html template is pre-configured, modification can be completed only by modifying the element content of the tag, the modification is simple and efficient, the query statement can be flexibly configured, the data provider or the data user can conveniently use the query statement, and efficient and flexible data access is realized.
Optionally, after sending the template file to the server, the method may further include:
acquiring the html file provided by the server;
and displaying the html file in a webpage form.
By displaying the html file converted by the server, the user can conveniently check whether the html file is normally displayed and the like. So that the template file can be updated if an error occurs.
Thus, in some embodiments, the method may further comprise:
and updating the template file based on the updating content input by the user in response to the updating operation aiming at the template file.
The updated content input by the user includes content for updating one or more markup tags in the template file.
Because the data organization tag in the template file is a self-defined tag, the file content cannot be displayed according to the html standard. Therefore, the template file needs to be converted into the html file, and based on the data configuration method corresponding to fig. 1, an embodiment of the present application further provides a data processing method, as shown in fig. 2, a flowchart of an embodiment of the data processing method provided by the present application is applied to a server, and the method may include:
201: and analyzing the predefined data organization tag in the template file to obtain the query statement.
Wherein the template file is generated based on a preconfigured html template and the query statement input to the data organization tag.
The template file may be sent by the sending end to the server end, and the template file is generated at the sending end.
The server side can send a pre-configured html template to the sending end and can receive a template file which is sent by the sending end and generated based on the html template.
The sending end can be a terminal device operated by a data user, so that the embodiment of the application can realize personalized data access of the data user, and efficiently and flexibly realize data access.
Of course, the sending end may also be a terminal device operated by a data provider (data maintainer), so that the data provider can conveniently perform configuration and modification, and efficient and flexible data access is realized.
In practical application, the predefined data organization tag in the template file is analyzed to obtain the query statement, and instead of analyzing the received template file, after receiving the template file, a copy of the template file is generated, and operations such as analysis and conversion are performed on the copy of the template file.
202: and converting the template file into an html file.
And the html file is used for displaying the target data acquired by the query statement.
The server side can firstly obtain target data by using the query statement, so that the template file can be converted into an html file based on the target data.
203: and sending the html file to a receiving end.
The html file can be read by the receiving end and displays the target data.
Optionally, when the data organization tag further includes data source information and/or database information, the server may further obtain the data source information and/or the database information from the data organization tag through parsing. The server may call a corresponding data source to query the target data from the database by using the query statement, and specifically, the server may submit the query statement to the data source, and perform data query by using the data source to obtain the target data.
In some embodiments, after the sending end generates the template file, the sending end may also send an html file sending request to the server end according to a user request, where the html file sending request includes a receiving end identifier and a routine sending interval;
therefore, the server can also receive the html file sending request sent by the sender.
The parsing step may include:
analyzing a predefined data organization tag in the template file every interval of the routine sending interval to obtain a query statement;
the transmitting step may include:
and sending the html file to a receiving end corresponding to the receiving end identification.
That is, the server will periodically parse the template file, and will perform the operations of step 201 to step 203 in each routine sending period.
In some embodiments, the server parses the template file to obtain query statements at intervals of the routine sending intervals, and performs data query using the query statements, and since performing data query is time-consuming, optionally, the server may cache result data obtained by querying using any query statement; the arbitrary query statement may include a query statement submitted according to the technical solution of the embodiment of the present application, or may include a query statement submitted in another query manner, such as a query statement manually input by a user. The server can also set a cache time limit for the cached result data, delete the result data reaching the cache time limit from the cache, and the like.
Therefore, for the current routine sending period, whether target data exists or not can be firstly inquired from the cache, and if not, the inquiry statement is submitted to the data source for data inquiry so as to obtain the target data.
Since the data can be presented at least in tabular form or in the form of a statistical graph.
In one possible implementation, the html file may present the target data in a tabular form. So that the user can visually check the target data through the form.
Therefore, as another embodiment, as shown in fig. 3, the data configuration method may include:
301: displaying the preconfigured html template.
Wherein the html template includes predefined data organization tags.
In addition, the html template further comprises an html table tag, namely a < table > tag, which is used for defining a table;
the data organization tag includes a report tag embedded in the html form tag, and is used for defining target data for filling the form, and specifically may include a query statement, a filling flow, and the like for defining the target data.
The html form tag is specifically defined as a header of the form, and the report tag is specifically defined as target data for filling the form body.
302: and acquiring the header information of the html form tag input by the user.
303: and acquiring a query statement of the report tag input by the user.
304: and generating a template file based on the header information and the query statement.
The input content of the html template input by the user at least comprises the header information and the query statement.
Where a table typically includes several rows, each row may be divided into several cells. The header information may also be a row in the table, so as to be a possible implementation manner, an html row tag may be embedded in the html table tag, that is, the < tr > tag defines a table row in which the header is located, and an html cell tag is embedded in the html table tag, that is, the < td > tag defines a cell in the table row in which the header is located. < table >, < tr >, and < td > are html standard tags. The header information input by the user in the html form tag is specifically input in the html cell tag in the html form tag. The code content shown in the following example shows a definition form of header information in an html form tag:
the city id and the city name are header information of the html form tag input by the user.
Optionally, a title tag may be further embedded in the html table tag, and is used for defining a title name of the table. The input content of the html template may also include the title name of the title tag entered by the user.
In this embodiment, the query statement is specifically input into the report tag.
The label name of the report label is assumed to be named as < table-rows-operator >, so as to facilitate configuration, when the report label is customized, the attribute owned by the report label can be further defined, and in some embodiments, the report label may include a query attribute, a data source attribute, and/or a database attribute.
The query attribute specifies a query statement of the data query, the data source attribute specifies a data source of the data query, and the database attribute specifies a data storage system for storing data. The user may thus enter a query statement in the query attributes, may also enter data source information in the data source attributes, and/or may enter database information in the database attributes. The input content of the user input html template may also include data source information and/or database information.
Attributes are typically defined in the start tag, as the code content shown in the following example:
<table-rows-iterator source=“hive”db="waimai"
sql="selectcity_id,city_namefromaoi_citywhere is_zhiying=@@zhiying@@limit@@limit@@">
……
</table-rows-iterator>
wherein, the < table-rows-operator > is a report tag, the source is a data source attribute of the report tag, db is a database attribute of the report tag, and sql is a query attribute of the report tag. As can be seen from the above example, the attribute is defined in the start tag, the query statement is input into the query attribute, and the user can also input the data source information into the data source attribute and input the database information into the database attribute.
It should be noted that the query statements listed in the embodiments of the present application are only for illustration, and are not meant to be practical. The query statement is explained by taking an sql statement as an example, the writing rule of the query statement only needs to be in accordance with the sql grammar, and the specific writing of the sql statement is not limited in the embodiment of the application. The specific meaning of the sql statement is well known to the person skilled in the art and is not explained in its entirety.
In addition, the query statement in this embodiment of the application supports placeholders, the placeholders may be defined by "@ @ XX @" in the query statement, the time placeholder is exemplified as @ @ TODAY-1@ @ representing yesterday, @ @ TODAY-7@ @ representing seven DAYs ago, @ @ MONTH-FIRST-DAY @ LAST-DAY @ and the like, and non-fixed information, such as non-fixed time, may be set by the placeholder.
In order to enable target data obtained by query according to a query statement to be capable of being filled into a form corresponding to header information, field information in the query statement and the header information need to be in one-to-one correspondence according to an appearance sequence.
Therefore, as a possible implementation manner, an html line tag and an html cell tag can be embedded in a report tag to specify the corresponding relationship between the field information and the header information of the target data. Therefore, the input content input by the user in the html template can also comprise field information in the input report tag, and the field information is the field information in the query statement.
The following example is a code content of report tag:
wherein class is a standard attribute in html, specifying the class name (classname) of the element.
The report tag is embedded with html line tag < tr > and html table tag < td >, and each html table tag < td > is used for defining field information.
In the above two examples, "city id" and "city name" are header information of html form tags entered by the user.
The field information in the report tag is "city _ id" and "city _ name", wherein the "city _ id" corresponds to the "city id", and the "city _ name" corresponds to the "city name". And filling the obtained target data of the city _ id into a table corresponding to the city id, and filling the obtained target data of the city _ name into the table corresponding to the city name.
305: and sending the template file to a server.
In practical application, the html form tag is embedded in a < body > tag, the definition of the < body > tag is the same as that of the prior art, and details are not repeated here.
It should be noted that, in the embodiments of the present application, all the examples are described with a template file obtained by filling input content into an html template, where the html template refers to an html code composed of tag tags and/or part of preconfigured element content when the input content is not filled.
In the template file, the element content and the attribute value of part of the tag may be input by a user, or may be preconfigured in the html template for the user to modify. For example, the "hive" value of the source attribute may be input by the user or pre-configured in the html template.
Based on the data configuration method corresponding to fig. 3, the present application further provides another embodiment of a data processing method, as shown in fig. 4, the method may include:
401: and analyzing the predefined data organization tag in the template file to obtain the query statement.
Wherein the html template comprises an html form tag; the data organization tag includes a report tag.
The report tag is embedded into the html form tag and used for defining target data for filling the form; and inputting query sentences into the report tags, wherein the field information in the query sentences corresponds to the header information of the form one by one according to the appearance sequence.
The specific generation of the template file can be referred to the embodiment shown in fig. 3.
402: and acquiring the target data by using the query statement.
403: and determining the cell data filled into each row of the table corresponding to the header information of the table.
404: generating html line tags based on the cell data for each line.
405: and filling the html line tag into the template file to replace the report tag to obtain an html file.
406: and sending the html file to a receiving end.
Html cell tags can be embedded in html line tags generated based on the cell data of each line, and corresponding field information defines the cell data of each line.
The code content of the html form tag in the template file listed in the embodiment shown in fig. 3 is assumed that the obtained target data is as shown in the following table according to the query statement "select city _ id, city _ name from aoi _ city where is _ zhiying @ @ zhiying @ limit @":
city_id | city_name |
125 | |
121 | |
75 | All of the |
146 | Guiyang tea |
Because the city id 'and the city name' are used for inputting the header information of the html form tag for the user. It can be known that "city _ id" corresponds to "city id" and "city _ name" corresponds to "city name".
Thus, for a "city _ id" of 125 and a "city _ name" of a Haiko, the generated html line tag code may be:
where < span > is the html section tag used to combine elements in the row.
Then, filling the html line tag into the template file to replace the report tag, so as to obtain an html file, where based on the code content of the html form tag in the template file listed in the embodiment shown in fig. 3, the conversion into the html file may be:
when the html file is read and displayed, the html table is obtained as shown in fig. 5.
When data is presented in tabular form, different data users such as tabular form and target data form may have different requirements. Whereas html can provide rich style definitions. Thus, each markup tag in the html template may also be preconfigured with style attributes to specify the style of the element content.
The Style attribute may be defined in css (Cascading Style Sheets). The style attribute may be pre-configured with style information, or the style information may be provided by a user or the pre-configured style information may be updated, etc.
Optionally, in some embodiments, the < table > tag in the html template may be preconfigured with table style attributes for specifying the table style of the table, such as the width and height of the table and the borders, the size and color of the table, the size, spacing, color, etc. of the table font.
Form style information can be pre-configured for the form style attribute in the html template; of course, the form style information may also be provided by the user or updated, and so on, and therefore, optionally, the input content of the html template input by the user may also include the form style information in the form style attribute of the html form tag input by the user. The form style information may be written in css. Rich style information can be defined by means of html + css.
Therefore, in the data configuration method of the embodiment shown in fig. 3, the method may further include:
acquiring form style information in the form style attribute of the html form label input by a user;
specifically, a template file may be generated based on at least the query statement, the header information, and the form style information.
The table style attribute is defined in the start tag of the < table > tag, for example, < table style ═ font-family: 'Microsoft YaHei'; font-size of 12 px; ">; the form style property is represented here by a standard style property and the form style information can be written in the standard css syntax, in this example font-family is the font, here specified as microsoft ja-black font, and font-size is the font size, here specified as a font size of 12px (pixels). It should be noted that the cs can provide rich style definitions, such as font-weight: bold; the font is defined as bold, which is the same as the prior art and is not described herein again.
Optionally, in some embodiments, a < tr > tag or a < td > tag in a < table > tag in an html template may be preconfigured with a data style attribute to specify a data style for the header information; therefore, the input content of the html template input by the user can also comprise the data style information of the html form tag input by the user.
Definition of data style properties in the start tag, for example:
<td style="text-align:center;">。
or
<tr style="text-align:center;">。
Furthermore, in some embodiments, for the target data to populate the table, the data format and/or data style, etc. of the target data may also be specified in the report tag.
The data format may be, for example, a thousandth bit format, a percentage format, etc., and the data pattern may be a data color, etc.
Thus, in some embodiments, the input content entered by the user into the html template may also include data format information and/or data style information for the input report tags. The template file generating step may be to generate a template file based on at least the header information, the query statement, and the data format information and/or the data style information.
As can be seen from the above description, the report tag may define field information of the target data through the html line tag and the html cell tag, so that the html line tag or the html cell tag in the report tag may be preconfigured to have a data format attribute and/or a data style attribute. The data format information and the data style information can be respectively in the data format attribute and the data style attribute of an html line tag or an html cell tag in the input report tag.
Alternatively, since the target data of different fields may have different requirements for the data format, the data format or data style may be specified in the html cell tag.
For example:
<tdstyle="text-align:right"data-format="###,###">
or:
<tdstyle="text-align:right"data-format="0.00%"data-type="percent">
wherein, the style attribute and the data-type are both used for representing the data style attribute. The style attribute specifies the css style; data-type is used for percentage type data only, where the data-type value "percent" indicates that if the data is positive, it is displayed in red, and if it is negative, it is displayed in green; the assignment "pp" indicates that the color is darker as the positive number red gradient is larger, and the color is darker as the negative number green gradient is smaller; if not, the cs color set by the user is followed.
data-format is used to represent data format attributes, where "# # #, ####" represents the thousandth bit format and "0.00%" represents the percentage format.
When the server analyzes the template file, the server may also analyze data format information and/or data style information from the report form tag, so that the server generates the html line tag based on the cell data of each line, specifically, the html line tag is generated based on the cell data of each line according to the data format information and/or the data style information.
According to the data format information and/or data style information, the cell data of each line can be formatted and/or styled: and regenerating the html line tag based on the cell data after formatting and/or stylizing.
For example, the generated html line tag code may be:
in addition, the < table > tag in the html template may be preconfigured with an attachment attribute for specifying that the form is to be converted to an attachment of a predefined file type; the input content of the user input html template may also include the attachment information in the attachment attribute of the < table > tag entered by the user.
Accordingly, the method may further comprise:
and acquiring the attachment information in the attachment attribute of the html form tag input by the user.
The attachment attribute is also defined in the start tag of the html form tag.
For example < table attribute > true >;
wherein attribute represents attachment attribute, and assigning attribute to true can convert the form into an excel attachment.
It should be noted that the above is only an exemplary attribute that different tag labels may possess, and in practical applications, the attribute that different tag labels possess may be preconfigured for different tag labels according to practical situations.
Since query statements for querying target data tend to be complex, in order to simplify writing of the query statements, as another embodiment, as shown in fig. 6, the data configuration method may include:
601: displaying the preconfigured html template.
The html template also comprises an html form tag used for defining a form; the data organization tag comprises a report tag embedded in the html form tag and is used for defining target data for filling the form;
the data organization tag also comprises a trigger tag embedded in the report tag; the trigger tag is used for defining a middle table; the query statement is used for acquiring target data from the intermediate table;
602: and acquiring the header information of the html form tag input by the user.
603: and acquiring a query statement of the report tag input by the user.
604: and acquiring at least one query sub-statement of the trigger tag input by a user and the table attribute information of the intermediate table.
The at least one query sub-statement is used for acquiring filling data for filling the intermediate table;
605: and generating a template file based on the header information, the query statement, the table attribute information of the intermediate table and the at least one query sub-statement.
606: and sending the template file to a server.
The difference from the embodiment corresponding to fig. 3 is that in this embodiment, an intermediate table is defined by a trigger tag, so that a query statement in a report tag is specifically used to acquire target data from the intermediate table, and at least one query sub-statement may be written in the trigger tag and used to acquire filling data for filling the intermediate table from a database.
The report tags may include at least one trigger tag, and each trigger tag is used to define an intermediate table,
At least one query sub-statement may be written in the trigger tag.
Optionally, the trigger tag may embed a predefined dimension column tag, an index column tag, and a query tag, where the dimension column tag and the index column tag are used to define table attribute information of the intermediate table, that is, a table structure, and mainly include column information of the intermediate table, and thus a table field of the intermediate table is described by the dimension column tag and the index list tag.
The query tag defines at least one query sub-statement corresponding to filling data for filling the intermediate table, wherein the table fields of the intermediate table described by the dimension column tag and the index column tag correspond to the field information of the at least one query sub-statement one by one.
In this embodiment, it is assumed that the report tag is named as < table-rows-aggregator >, the trigger tag is named as < aggregator-trigger >, the dimension column tag is named as < dimension-list >, the index column tag is named as < measure-list >, and the query tag is named as < sql-list >, although the attributes may also be preconfigured in these custom tags.
As a possible implementation manner, as shown in the following example, the html form tag code content in the template file is:
in the template file, the element content and the attribute value of part of the tag may be input by a user, or may be preconfigured in the html template for the user to modify. The user can input at least the query statement, the query sub-statement and the field information.
Here, "@ @ AUTO-TABLE @" in the query statement is used to denote an intermediate TABLE generated by < aggregator-trigger >.
In this embodiment, writing of the query statement may be simplified by triggering the tag, and one complex query statement is split into a plurality of query sub-statements, so that data configuration operations may be simplified.
Based on the data configuration method corresponding to fig. 6, fig. 7 shows a flowchart of another embodiment of the data processing method provided in the embodiment of the present application, where the method may include:
701: and analyzing the predefined data organization tag in the template file to obtain a query statement, the table attribute information of the intermediate table and at least one query sub-statement.
The data organization tag comprises a report tag, and a trigger tag is embedded in the report tag. The html template comprises an html form tag, and the report tag is embedded into the html form tag.
Thus parsing the report tag and the trigger tag specifically. The query statement, the table attribute information of the intermediate table, and at least one query sub-statement are obtained.
702: and constructing an intermediate table according to the table attribute information.
The table attribute information is list information of the intermediate table, and includes table fields of each column, so that the intermediate table can be constructed. The table fields correspond to the field information in the query sub-statement one to one.
703: and acquiring filling data by utilizing the at least one query sub-statement so as to fill the intermediate table.
The table fields corresponding to the intermediate table are also filled with padding data into the intermediate table.
704: and acquiring the target data from the intermediate table by using the query statement.
705: and determining the cell data filled into each row of the table corresponding to the header information of the table.
706: generating html line tags based on the cell data for each line.
707: and filling the html line tag into the template file to replace the report tag to obtain an html file.
708: and sending the html file to a receiving end.
The operations of step 705 to step 708 are the same as those of step 403 to step 406, and are not described herein again.
Still taking the code content of the template file listed in the embodiment shown in fig. 6 as an example, after the template file is analyzed, an intermediate table is constructed and the intermediate table is filled according to the query sub-statement, and the obtained intermediate table is shown as the following table:
index_day | city_id | city_name | xiadan_user_num | xin_yonghu_num |
20160625 | 125 | |
200 | 100 |
20160626 | 125 | |
200 | 150 |
It should be noted that the above numerical values are merely exemplary, and do not mean that they have a practical meaning.
Then, the target data is queried from the intermediate table according to the query statement, and the table shown in the html file generated after conversion is shown in fig. 8.
In another possible implementation, the html file may present the target data in the form of a statistical graph.
Therefore, as another embodiment, as shown in fig. 9, the data configuration method may include:
901: displaying the preconfigured html template.
The data organization tag comprises a graph tag used for defining a statistical graph and target data required for drawing the statistical graph.
902: and acquiring the graph drawing information of the graph label input by the user.
903: and acquiring a query statement input by the user into the graphic label.
904: and generating a template file based on the graph drawing information and the query statement.
905: and sending the template file to a server.
Optionally, a graphic attribute tag may be embedded in the graphic tag to define the graphic drawing information.
The graphic drawing information may include a graphic type and a graphic feature;
the graphic types may include, for example, bar chart, pie chart, line chart, area pile chart stack, funnel chart, scatter chart scatter, and the like, and the graphic features may include a graphic main title, a horizontal axis title, a vertical axis title, and presentation style information, and the like.
The graphic type may be defined by a type tag embedded in a graphic property tag. The graphic features may be defined by embedding feature tags in graphic attribute tags, and the feature tags may have a main title attribute, a horizontal axis title attribute, a vertical axis title attribute, a presentation style attribute, and the like to specify graphic main title, horizontal axis title, vertical axis title, presentation style information, and the like, respectively.
Optionally, a data source tag may be embedded in the graph tag to define target data required for drawing the statistical graph, and the query statement is input into the data source tag.
For ease of understanding, the code content of the graphic tab of the template file is illustrated as follows:
in the above example, < chart-builder > represents a graphic tag, < chart-property > represents an image property tag, and < data-source > represents a data source tag. < chart-type > is a type tag embedded in the < chart-property > tag, and the graph type is known as bar; the < chart-feature > is a feature tag embedded in the < chart-property > tag, and is a histogram, so that the feature tag comprises a title as a main title attribute, an x-axis-title as a horizontal axis title attribute, and a y-axis-title as a vertical axis title attribute.
The < data-source > tag can have a data source attribute source, a database attribute db and a query attribute sql, and a query statement is input into the query attribute as an attribute value of the query attribute.
At the < data-source > tag, a grouping tag < group-name > may be embedded to specify a grouping field, a key tag < key-name > defines a horizontal axis field to specify what data is displayed on the horizontal axis, and a value tag < value-name > defines a vertical axis field to specify what data is displayed on the vertical axis.
After receiving the template file, the server analyzes the graph label in the template file, and can obtain graph drawing information and query statements, so that a statistical graph can be drawn to show target data obtained by the query statements. Specifically, as shown in fig. 10, a flowchart of another embodiment of a data processing method provided in the embodiment of the present application is shown, where the method may include the following steps:
1001: and analyzing the data organization label in the template file to obtain the graph drawing information and the query statement.
1002: and acquiring target data by using the query statement.
1003: and drawing a statistical graph according to the target data and the graph drawing information.
1004: and filling the path address of the statistical graph into the template file to replace the graph label to obtain an html file.
1005: and sending the html file to a receiving end.
And taking the drawn statistical graph as a local picture, and replacing the graph label in the template file with the path address of the statistical graph to obtain the html file.
As shown in fig. 11, that is, the statistical graph generated corresponding to the template file listed in the embodiment shown in fig. 9, it should be noted that specific data in the statistical graph does not necessarily have a realistic application meaning, and is only for convenience of understanding. As can be seen from fig. 11, the main title of the statistical graph is "order amount", the horizontal axis is "time", and the vertical axis is "order amount". The query statement is to obtain target data corresponding to the three fields of "city _ name", "order _ day _ key" and order _ num, as can be seen from fig. 11, that is, to obtain the order quantities of the four cities of shanghai, beijing, guangzhou and shenzhen during periods 20160816-20160818, and accordingly, draw to obtain fig. 11.
In some embodiments, sending the html file to the receiving end may be sending the html file to the receiving end in the form of an email, which may include:
scanning the html file to obtain the path address;
and sending the html file and the statistical graph corresponding to the path address to a receiving end in an email mode.
In addition, as another possible implementation manner, the html file can show the target data in a table form and a statistical graph form. Therefore, the predefined data organization tag can comprise both a report tag and a graphic tag, and query statements for querying the target data are respectively input into the report tag and the graphic tag, so that the target data can be displayed in a form and a statistical graph. For the detailed description of the report tag and the graphic tag, reference is made to the above embodiments, and details are not repeated here.
In some embodiments, the html template may further include a predefined information tag, where the information tag is used to define related information of the target data;
therefore, the input content in the html template input by the user also comprises the attribute information of the relevant information input by the user.
Therefore, the server can also analyze the information tag in the template file to obtain the attribute information of the related information, and obtain the related information according to the attribute information.
Therefore, the template file can be converted into the html file based on the target data acquired by the query statement and the relevant information.
The type of the related information of the target data can be limited according to the actual application situation.
Take the relevant information as weather information as an example. The information tag may be named as < weather >, the attribute information may include a city, a date, and the like, and the attribute information may be written in the attribute owned by the information tag.
As a possible implementation, < weather > code content as described in the following example:
< weather cityname [ 'Beijing' ], "fromday ═ 20161125," endday ═ 20161125 "> < weather >
cityname, fromday, and endday are information of information tags for writing attribute information, specifying information such as a city and a date. The information tag of the above example is the weather information of Beijing that is intended to show 2016, 11, 25 months. The server side can capture weather information of Beijing of 2016, 11, 25 and 2016 from the Internet or a preset weather library according to the attribute information obtained by analysis, convert the weather information into a standard html code and fill the standard html code into the template file so as to replace the weather label, and then the html file can be generated. And reading the html file by the receiving end, so that the weather information can be displayed.
The template file can be generated by a sending end and sent to a server, the sending end and the server can establish connection through a network, and the sending end can be a terminal device used by a data user or a data provider (including a data maintainer).
Of course, the server may also provide a display interface for the data maintainer to use, so that the server may also generate the template file based on the input content of the html template input by the user, and therefore, as shown in fig. 12, a flowchart of another embodiment of the data processing method provided in the embodiment of the present application may include:
1201: displaying the preconfigured html template.
The html template includes predefined data organization tags.
1202: and acquiring a query statement of the data organization label input by the user.
1203: and generating a template file based on the query statement.
1204: and analyzing the data organization label in the template file to obtain a query statement.
1205: converting the template file into an html file; the html file is used for displaying the target data acquired by the query statement.
1206: and sending the html file to a receiving end.
The generation of the template file and the analysis of the template file may be shown in the above embodiments, and are not described herein again.
Fig. 13 is a schematic structural diagram of an embodiment of a data configuration apparatus provided in an embodiment of the present application, where the apparatus is configured at a server or at a sending end that establishes a connection with the server, and the apparatus may include:
a display module 1301, configured to display a preconfigured html template; the html template comprises a predefined data organization tag;
an obtaining module 1302, configured to obtain a query statement of the data organization tag input by a user;
a generating module 1303, configured to generate a template file based on the query statement; the template file is used for converting into an html file so as to display target data acquired by the query statement;
a first sending module 1304, configured to send the template file to the server.
The server side receives the template file, namely the template file can be converted into the html file, and the html file can be sent to the receiving side.
Optionally, in some embodiments, the apparatus may further include:
sending an html file sending request to the server; the html file sending request comprises a receiving end identification and a routine sending interval.
The server analyzes the template file according to the routine sending interval and sends the html file to the receiving end corresponding to the receiving end identification.
Optionally, the obtaining module may further obtain data source information of the data organization tag input by the user;
the generation module generates a template file based on at least the query statement and the data source information.
Optionally, the display module is further configured to:
acquiring the html file provided by the server;
and displaying the html file in a webpage form.
By displaying the html file converted by the server, the user can conveniently check whether the html file is normally displayed and the like. So that the template file can be updated if an error occurs.
Thus, in some embodiments, the apparatus may further comprise:
and the updating module is used for responding to the updating operation aiming at the template file and updating the template file based on the updating content input by the user.
Since the data can be presented at least in tabular form or in the form of a statistical graph.
In one possible implementation, the html file may present the target data in a tabular form. So that the user can visually check the target data through the form.
Thus, as a further embodiment, the html template further includes an html form tag for defining a form; the data organization tag comprises a report tag embedded in the html form tag and is used for defining target data for filling the form;
the acquisition module is specifically used for acquiring the query statement of the report tag input by the user; acquiring the header information of the html form tag input by the user;
the generating module generates a template file at least based on the header information and the query statement; and the field information in the query statement corresponds to the header information one by one according to the appearance sequence.
Because the query statement for querying the target data is often complex, in order to simplify the writing of the query statement, in some embodiments, the data organization tag further includes a trigger tag embedded in the report tag; the trigger tag is used for defining a middle table; the query statement is used for acquiring target data from the intermediate table;
the acquisition module is further used for acquiring at least one query sub-statement of the trigger tag input by a user and table attribute information of the intermediate table; the at least one query sub-statement is used for acquiring filling data for filling the intermediate table;
the generating module generates a template file at least based on the header information, the query statement, the table attribute information of the intermediate table, and the at least one query sub-statement.
When data is presented in tabular form, different data users such as tabular form and target data form may have different requirements. In some embodiments, the html form tag includes a form style attribute for specifying a form style of the form;
the acquisition module is also used for acquiring form style information of the form style attribute input by a user;
the generation module generates a template file based on at least the query statement, the header information, and the form style information.
Additionally, in some embodiments, the html form tab may also include an attachment attribute to specify that the form is to be converted to an attachment of a predefined file type;
the acquisition module is also used for acquiring the accessory information of the accessory attribute input by the user;
the generation module further generates the template file based on the attachment information.
In addition, in some embodiments, for the target data of the filling form, the data format, the data style and the like of the target data can also be specified in the report tag. The report tag is therefore also used to define the data format and/or data style of the target data;
the acquisition module is further configured to:
acquiring data format information and/or data style information of the report tag input by a user;
the generating module generates a template file at least based on the header information, the query statement, and the data format information and/or the data style information.
In another possible implementation, the html file may present the target data in the form of a statistical graph.
Thus, as a further embodiment, the data organization tag comprises a graphical tag for defining a statistical graph and target data required for drawing the statistical graph;
the acquisition module is specifically used for acquiring a query statement of the graphical label input by a user; acquiring the graph drawing information of the graph label input by a user;
the generating module generates a template file based on at least the graph drawing information and the query statement.
In some embodiments, the html template may further include a predefined information tag, where the information tag is used to define related information of the target data;
the acquisition module is further used for acquiring attribute information of the related information of the information tag input by a user;
and the generating module generates a template file at least based on the query statement and the attribute information of the relevant information.
It is clear to a person skilled in the art that the present application can be implemented by means of software plus a necessary general hardware platform, and in one possible design, the data processing apparatus described above with reference to fig. 13 can be integrated into the sender. Therefore, the embodiment of the present application further provides a sending end, which includes a memory and a processor;
the memory is to store one or more computer instructions, where the one or more computer instructions are for the processor to invoke for execution.
The processor is configured to invoke the one or more computer instructions stored by the memory to perform the following operations:
displaying a pre-configured html template;
the html template comprises a predefined data organization tag;
acquiring a query statement of the data organization label input by a user;
generating a template file based on the query statement; the template file is used for converting into an html file so as to display target data acquired by the query statement;
and sending the template file to a server.
Fig. 14 is a schematic structural diagram of an embodiment of a data processing apparatus according to the present application, where the apparatus is configured at a server and may include:
an analysis module 1401, configured to analyze a predefined data organization tag in a template file to obtain a query statement; the template file is generated based on a pre-configured html template and the query statement input into the data organization tag;
the conversion module 1402 is configured to convert the template file into an html file; the html file is used for displaying target data acquired by the query statement;
a second sending module 1403, configured to send the html file to a receiving end.
As a possible implementation manner, optionally, the apparatus may further include:
and the receiving module is used for receiving the template file sent by the sending end.
In some embodiments, the apparatus may further comprise:
the request module is used for receiving an html file sending request sent by the sending end; the html file sending request comprises a receiving end identification and a routine sending interval;
the analysis module is specifically configured to analyze a predefined data organization tag in the template file every interval of the routine sending interval to obtain a query statement;
the second sending module is specifically configured to send the html file to a receiving end corresponding to the receiving end identifier.
As another possible implementation manner, the apparatus may further include:
the display module is used for displaying the pre-configured html template; the html template comprises the data organization tag;
the acquisition module is used for acquiring a query statement of the data organization tag input by a user;
and the generating module is used for generating a template file based on the query statement.
Since the data can be presented at least in tabular form or in the form of a statistical graph.
In one possible implementation, the html file may present the target data in a tabular form. So that the user can visually check the target data through the form.
Thus, as yet another embodiment, the data organization tag comprises a report tag embedded with an html form tag; the html form tag is used for defining a form; the report tag is used for defining target data for filling the form; the field information in the query statement corresponds to the header information of the table one by one according to the appearance sequence;
the conversion module may include:
an obtaining unit configured to obtain the target data using the query statement;
the determining unit is used for determining the cell data filled into each row of the table corresponding to the header information of the table;
the generating unit is used for generating html line labels based on the cell data of each line;
and the conversion unit is used for filling the html line tag into the template file so as to replace the report tag and obtain the html file.
When a trigger tag is embedded in the report tag; the trigger tag is used for defining a middle table;
the parsing module may be specifically configured to parse the data organization tag to obtain a query statement, table attribute information of the intermediate table, and at least one query sub-statement;
the obtaining unit may be specifically configured to construct an intermediate table according to the table attribute information; acquiring filling data by utilizing the at least one query sub-statement so as to fill the intermediate table; and acquiring the target data from the intermediate table by using the query statement.
In some embodiments, the report tag is further used for defining a data format and/or a data style of the target data;
the parsing module may be specifically configured to parse the data organization tag to obtain a query statement and data format information and/or data style information;
the generating unit is specifically configured to format and/or style the cell data of each line according to the data format information and/or the data style information: generating the html line tag based on the cell data after formatting and/or stylizing.
In another possible implementation, the html file may present the target data in the form of a statistical graph.
Thus, as a further embodiment, when the data organization tag comprises a graphical tag; the graph label is used for defining a statistical graph and drawing target data required by the statistical graph;
the parsing module may be specifically configured to parse the data organization tag to obtain graph drawing information and a query statement;
the conversion module may be specifically configured to obtain target data using the query statement; drawing a statistical graph according to the target data and the graph drawing information; and filling the path address of the statistical graph into the template file to replace the graph label to obtain an html file.
In some embodiments, the html template may further include a predefined information tag, where the information tag is used to define related information of the target data;
therefore, the parsing module is further configured to parse the information tag in the template file to obtain attribute information of the related information;
acquiring the related information according to the attribute information;
the conversion module is specifically configured to convert the template file into an html file based on the target data and the related information.
By the technical scheme of the embodiment of the application, efficient and flexible data access is realized.
It is clear to those skilled in the art that the present application can be implemented by means of software plus a necessary general hardware platform, and in one possible design, the data processing apparatus described above with reference to fig. 14 can be integrated into a server. Therefore, the embodiment of the present application further provides a server, which includes a memory and a processor;
the memory is to store one or more computer instructions, where the one or more computer instructions are for the processor to invoke for execution.
The processor is configured to invoke the one or more computer instructions stored by the memory to perform the following operations:
analyzing a predefined data organization label in the template file to obtain a query statement; the template file is generated based on a pre-configured html template and the query statement input into the data organization tag;
converting the template file into an html file; the html file is used for displaying target data acquired by the query statement;
and sending the html file to a receiving end.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.
The invention discloses a1 and a data configuration method, comprising the following steps:
displaying a pre-configured html template;
the html template comprises a predefined data organization tag;
acquiring a query statement of the data organization label input by a user;
generating a template file based on the query statement; the template file is used for converting into an html file so as to display target data acquired by the query statement;
and sending the template file to a server.
A2, the method according to A1, further comprising:
sending an html file sending request to the server; the html file sending request comprises a receiving end identification and a routine sending interval.
A3, the method according to A1, wherein the html template further comprises html form tags for defining forms; the data organization tag comprises a report tag embedded in the html form tag and is used for defining target data for filling the form;
the query statement acquiring step includes:
acquiring a query statement of the report label input by a user;
the method further comprises the following steps:
acquiring header information of the html form tag input by a user;
the template file generating step comprises:
generating a template file based on the header information and the query statement; and the field information in the query statement corresponds to the header information one by one according to the appearance sequence.
A4, the method according to A3, wherein the data organization tag further comprises a trigger tag embedded in the report tag; the trigger tag is used for defining a middle table; the query statement is used for acquiring target data from the intermediate table;
the method further comprises the following steps:
acquiring at least one query sub-statement of the trigger tag input by a user and table attribute information of the intermediate table; the at least one query sub-statement is used for acquiring filling data for filling the intermediate table;
the template file generating step comprises:
and generating a template file based on the header information, the query statement, the table attribute information of the intermediate table and the at least one query sub-statement.
A5, the method according to A3, wherein the html form tag includes a form style attribute for specifying a form style of the form; and/or an attachment attribute for specifying that the form is to be converted to an attachment of a predefined file type;
the method further comprises the following steps:
acquiring form style information of the form style attribute input by a user and/or accessory information of the accessory attribute input by the user;
the template file generating step comprises:
and generating a template file based on the query statement, the header information, and the form style information and/or the attachment information.
A6, the method according to A3, wherein the report tag is further used for defining the data format and/or data style of the target data;
the method further comprises the following steps:
acquiring data format information and/or data style information of the report tag input by a user;
the template file generating step comprises:
and generating a template file based on the header information, the query statement and the data format information and/or the data style information.
A7, the method according to A1, wherein the data organization tag includes a graphic tag for defining a statistical figure and target data required for drawing the statistical figure;
the query statement acquiring step includes:
acquiring a query statement of the graphical label input by a user;
the method further comprises the following steps:
acquiring the graph drawing information of the graph label input by a user;
the template file generating step comprises:
and generating a template file based on the graph drawing information and the query statement.
A8, the method according to A1, wherein the html template further comprises predefined information tags, and the predefined information tags are used for defining the related information of the target data;
the method further comprises the following steps:
acquiring attribute information of the related information of the information tag input by a user;
the template file generating step comprises:
and generating a template file based on the query statement and the attribute information of the relevant information.
A9, the method according to A1, wherein the method further comprises:
acquiring data source information of the data organization label input by a user;
the template file generating step comprises:
and generating a template file based on the query statement and the data source information.
A10, the method according to A1, further comprising:
acquiring the html file provided by the server;
and displaying the html file in a webpage form.
A11, the method according to A1 or A10, wherein after the template file generating step, the method further comprises:
and updating the template file based on the input updating content in response to the updating operation aiming at the template file.
The invention also discloses B12 and a data processing method, which comprises the following steps:
analyzing a predefined data organization label in the template file to obtain a query statement; the template file is generated based on a pre-configured html template and the query statement input into the data organization tag;
converting the template file into an html file; the html file is used for displaying target data acquired by the query statement;
and sending the html file to a receiving end.
B13 the method according to B12, further comprising, before the analyzing step:
and receiving the template file sent by the sending end.
B14, the method according to B13, further comprising:
receiving an html file sending request sent by the sending end; the html file sending request comprises a receiving end identification and a routine sending interval;
the analyzing step comprises the following steps:
analyzing a predefined data organization tag in the template file every interval of the routine sending interval to obtain a query statement;
the transmitting step includes:
and sending the html file to a receiving end corresponding to the receiving end identification.
B15 the method according to B12, further comprising, before the analyzing step:
displaying a pre-configured html template; the html template comprises the data organization tag;
acquiring a query statement of the data organization label input by a user;
and generating a template file based on the query statement.
B16, the method according to B12, wherein the data organization tag comprises a report tag embedded with an html form tag; the html form tag is used for defining a form; the report tag is used for defining target data for filling the form; the field information in the query statement corresponds to the header information of the table one by one according to the appearance sequence;
the step of converting comprises:
acquiring the target data by using the query statement;
corresponding to the header information of the table, determining the cell data filled into each row of the table;
generating html line tags based on the cell data of each line;
and filling the html line tag into the template file to replace the report tag to obtain an html file.
B17, the method according to B16, wherein the report tag is embedded with a trigger tag; the trigger tag is used for defining a middle table;
the analyzing step comprises the following steps:
analyzing the data organization label to obtain a query statement, the table attribute information of the intermediate table and at least one query sub-statement;
the target data acquiring step includes:
constructing an intermediate table according to the table attribute information;
acquiring filling data by utilizing the at least one query sub-statement so as to fill the intermediate table;
and acquiring the target data from the intermediate table by using the query statement.
B18, the method according to B16, wherein the report tag is also used for defining the data format and/or data style of the target data;
the analyzing step comprises the following steps:
analyzing the data organization label to obtain a query statement and data format information and/or data style information;
the html line tag generating step includes:
formatting and/or stylizing the cell data of each line according to the data format information and/or the data style information:
generating the html line tag based on the cell data after formatting and/or stylizing.
B19, the method according to B12, wherein the data organization tag comprises a graphic tag; the graph label is used for defining a statistical graph and drawing target data required by the statistical graph;
the analyzing step comprises the following steps:
analyzing the data organization label to obtain graph drawing information and query statements;
the step of converting comprises:
acquiring target data by using the query statement;
drawing a statistical graph according to the target data and the graph drawing information;
and filling the path address of the statistical graph into the template file to replace the graph label to obtain an html file.
B20, the method according to B12, wherein the parsing step comprises:
analyzing the data organization label to obtain the query statement and data source information;
the target data acquiring step includes:
and calling a corresponding data source to acquire the target data by using the query statement.
B21, the method according to B12, wherein the html template further comprises predefined information tags, and the information tags are used for defining the related information of the target data;
the method further comprises the following steps:
analyzing the information tag in the template file to obtain attribute information of the related information;
acquiring the related information according to the attribute information;
the step of converting comprises:
and converting the template file into an html file based on the target data and the related information.
The invention also discloses C22, a data configuration device, comprising:
the display module is used for displaying the pre-configured html template; the html template comprises a predefined data organization tag;
the acquisition module is used for acquiring a query statement of the data organization tag input by a user;
the generating module is used for generating a template file based on the query statement; the template file is used for converting into an html file so as to display target data acquired by the query statement;
and the first sending module is used for sending the template file to a server.
C23, the device according to C22, wherein the html template further comprises html form tags for defining forms; the data organization tag comprises a report tag embedded in the html form tag and is used for defining target data for filling the form;
the acquisition module is specifically used for acquiring the query statement of the report tag input by the user; acquiring the header information of the html form tag input by the user;
the generating module is specifically configured to generate a template file based on the header information and the query statement; and the field information in the query statement corresponds to the header information one by one according to the appearance sequence.
C24, the apparatus according to C23, wherein the data organization tag further comprises a trigger tag embedded in the report tag; the trigger tag is used for defining a middle table; the query statement is used for acquiring target data from the intermediate table;
the acquisition module is further used for acquiring at least one query sub-statement of the trigger tag input by a user and table attribute information of the intermediate table; the at least one query sub-statement is used for acquiring filling data for filling the intermediate table;
the generating module is specifically configured to generate a template file based on the header information, the query statement, the table attribute information of the intermediate table, and the at least one query sub-statement.
C25, the apparatus according to C23, wherein the html form tag includes a form style attribute for specifying a form style of the form; and/or an attachment attribute for specifying that the form is to be converted to an attachment of a predefined file type;
the acquisition module is also used for acquiring form style information of the form style attribute input by a user and/or accessory information of the accessory attribute input by the user;
the generating module is specifically configured to generate a template file based on the query statement, the header information, and the form style information and/or the attachment information.
C26, the apparatus according to C23, wherein the report tag is further used for defining the data format and/or data style of the target data;
the obtaining module is further used for the method further comprising:
acquiring data format information and/or data style information of the report tag input by a user;
the generating module is specifically configured to generate a template file based on the header information, the query statement, and the data format information and/or the data style information.
C27, the device according to C22, wherein the data organization label includes a graphic label for defining a statistical graph and target data required for drawing the statistical graph;
the acquisition module is specifically used for acquiring a query statement of the graphical label input by a user; acquiring the graph drawing information of the graph label input by a user;
the generating module is specifically configured to generate a template file based on the graph drawing information and the query statement.
C28, the device according to C22, wherein the html template further comprises predefined information tags, and the information tags are used for defining the related information of the target data;
the acquisition module is further used for acquiring attribute information of the related information of the information tag input by a user;
the generating module is specifically configured to generate a template file based on the query statement and the attribute information of the relevant information.
The present invention also provides D29, a data processing apparatus comprising:
the analysis module is used for analyzing the predefined data organization label in the template file to obtain a query statement; the template file is generated based on a pre-configured html template and the query statement input into the data organization tag;
the conversion module is used for converting the template file into an html file; the html file is used for displaying target data acquired by the query statement;
and the second sending module is used for sending the html file to a receiving end.
D30, the device according to D29, further comprising:
and the receiving module is used for receiving the template file sent by the sending end.
D31, the device according to D29, further comprising:
the display module is used for displaying the pre-configured html template; the html template comprises the data organization tag;
the acquisition module is used for acquiring a query statement of the data organization tag input by a user;
and the generating module is used for generating a template file based on the query statement.
D32, the apparatus of D29, wherein the data organization tag includes a report tag embedded with html form tag; the html form tag is used for defining a form; the report tag is used for defining target data for filling the form; the field information in the query statement corresponds to the header information of the table one by one according to the appearance sequence;
the conversion module comprises:
an obtaining unit configured to obtain the target data using the query statement;
the determining unit is used for determining the cell data filled into each row of the table corresponding to the header information of the table;
the generating unit is used for generating html line labels based on the cell data of each line;
and the conversion unit is used for filling the html line tag into the template file so as to replace the report tag and obtain the html file.
D33, the device according to D32, characterized in that, the report tag embeds the trigger tag; the trigger tag is used for defining a middle table;
the analysis module is specifically configured to analyze the data organization tag to obtain a query statement, table attribute information of the intermediate table, and at least one query sub-statement;
the acquisition unit is specifically used for constructing an intermediate table according to the table attribute information; acquiring filling data by utilizing the at least one query sub-statement so as to fill the intermediate table; and acquiring the target data from the intermediate table by using the query statement.
D34, the apparatus according to D32, wherein the report tag is further used for defining the data format and/or data style of the target data;
the analysis module is specifically used for analyzing the data organization tag to obtain a query statement and data format information and/or data style information;
the generating unit is specifically configured to format and/or style the cell data of each line according to the data format information and/or the data style information: generating the html line tag based on the cell data after formatting and/or stylizing.
D35, the device of D29, wherein the data organization tag comprises a graphical tag; the graph label is used for defining a statistical graph and drawing target data required by the statistical graph;
the analysis module is specifically used for analyzing the data organization label to obtain graph drawing information and query statements;
the conversion module is specifically configured to obtain target data by using the query statement; drawing a statistical graph according to the target data and the graph drawing information; and filling the path address of the statistical graph into the template file to replace the graph label to obtain an html file.
D36, the device according to D29, characterized in that the html template further comprises a predefined information tag, and the information tag is used for defining the related information of the target data;
the analysis module is further used for analyzing the information tags in the template file to obtain attribute information of the related information;
acquiring the related information according to the attribute information;
the conversion module is specifically configured to convert the template file into an html file based on the target data and the related information.
Claims (36)
1. A method for configuring data, comprising:
displaying a pre-configured html template;
the html template comprises a predefined data organization tag;
acquiring a query statement of the data organization label input by a user;
the data organization tag is pre-configured with a preset statement for data query, and the preset statement is used for prompting a user to write a query statement;
generating a template file based on the query statement; the template file is used for converting into an html file so as to display target data acquired by the query statement;
sending the template file to a server;
the html template also comprises a predefined information tag, and the information tag is used for defining the related information of the target data;
the method further comprises the following steps:
acquiring attribute information of the related information of the information tag input by a user;
the template file generating step comprises:
and generating a template file based on the query statement and the attribute information of the relevant information.
2. The method of claim 1, further comprising:
sending an html file sending request to the server; the html file sending request comprises a receiving end identification and a routine sending interval.
3. The method of claim 1, wherein the html template further comprises an html form tag for defining a form; the data organization tag comprises a report tag embedded in the html form tag and is used for defining target data for filling the form;
the query statement acquiring step includes:
acquiring a query statement of the report label input by a user;
the method further comprises the following steps:
acquiring header information of the html form tag input by a user;
the template file generating step comprises:
generating a template file based on the header information and the query statement; and the field information in the query statement corresponds to the header information one by one according to the appearance sequence.
4. The method of claim 3, wherein the data organization tag further comprises a trigger tag embedded in the report tag; the trigger tag is used for defining a middle table; the query statement is used for acquiring target data from the intermediate table;
the method further comprises the following steps:
acquiring at least one query sub-statement of the trigger tag input by a user and table attribute information of the intermediate table; the at least one query sub-statement is used for acquiring filling data for filling the intermediate table;
the template file generating step comprises:
and generating a template file based on the header information, the query statement, the table attribute information of the intermediate table and the at least one query sub-statement.
5. The method of claim 3, wherein the html form tag includes a form style attribute for specifying a form style of the form; and/or an attachment attribute for specifying that the form is to be converted to an attachment of a predefined file type;
the method further comprises the following steps:
acquiring form style information of the form style attribute input by a user and/or accessory information of the accessory attribute input by the user;
the template file generating step comprises:
and generating a template file based on the query statement, the header information, and the form style information and/or the attachment information.
6. The method of claim 3, wherein the report tag is further used to define a data format and/or a data style of the target data;
the method further comprises the following steps:
acquiring data format information and/or data style information of the report tag input by a user;
the template file generating step comprises:
and generating a template file based on the header information, the query statement and the data format information and/or the data style information.
7. The method of claim 1, wherein the data organization tag comprises a graphical tag for defining a statistical graph and target data required for rendering the statistical graph;
the query statement acquiring step includes:
acquiring a query statement of the graphical label input by a user;
the method further comprises the following steps:
acquiring the graph drawing information of the graph label input by a user;
the template file generating step comprises:
and generating a template file based on the graph drawing information and the query statement.
8. The method of claim 1, further comprising:
acquiring data source information of the data organization label input by a user;
the template file generating step comprises:
and generating a template file based on the query statement and the data source information.
9. The method of claim 1, further comprising:
acquiring the html file provided by the server;
and displaying the html file in a webpage form.
10. The method according to claim 1 or 9, wherein after the step of generating the template file, the method further comprises:
and updating the template file based on the input updating content in response to the updating operation aiming at the template file.
11. A data processing method, comprising:
analyzing a predefined data organization label in the template file to obtain a query statement; the template file is generated based on a pre-configured html template and the query statement input into the data organization tag;
the data organization tag is pre-configured with a preset statement for data query, and the preset statement is used for prompting a user to write a query statement;
converting the template file into an html file; the html file is used for displaying target data acquired by the query statement;
sending the html file to a receiving end;
the html template also comprises a predefined information tag, and the information tag is used for defining the related information of the target data;
the method further comprises the following steps:
analyzing the information tag in the template file to obtain attribute information of the related information;
acquiring the related information according to the attribute information;
the step of converting comprises:
and converting the template file into an html file based on the target data and the related information.
12. The method of claim 11, wherein the parsing step is preceded by:
and receiving the template file sent by the sending end.
13. The method of claim 12, further comprising:
receiving an html file sending request sent by the sending end; the html file sending request comprises a receiving end identification and a routine sending interval;
the analyzing step comprises the following steps:
analyzing a predefined data organization tag in the template file every interval of the routine sending interval to obtain a query statement;
the transmitting step includes:
and sending the html file to a receiving end corresponding to the receiving end identification.
14. The method of claim 11, wherein the parsing step is preceded by:
displaying a pre-configured html template; the html template comprises the data organization tag;
acquiring a query statement of the data organization label input by a user;
and generating a template file based on the query statement.
15. The method of claim 11, wherein the data organization tag comprises a report tag embedded with an html form tag; the html form tag is used for defining a form; the report tag is used for defining target data for filling the form; the field information in the query statement corresponds to the header information of the table one by one according to the appearance sequence;
the step of converting comprises:
acquiring the target data by using the query statement;
corresponding to the header information of the table, determining the cell data filled into each row of the table;
generating html line tags based on the cell data of each line;
and filling the html line tag into the template file to replace the report tag to obtain an html file.
16. The method of claim 15, wherein a trigger tag is embedded in the report tag; the trigger tag is used for defining a middle table;
the analyzing step comprises the following steps:
analyzing the data organization label to obtain a query statement, the table attribute information of the intermediate table and at least one query sub-statement;
the target data acquiring step includes:
constructing an intermediate table according to the table attribute information;
acquiring filling data by utilizing the at least one query sub-statement so as to fill the intermediate table;
and acquiring the target data from the intermediate table by using the query statement.
17. The method of claim 15, wherein the report tag is further used to define a data format and/or a data style of the target data;
the analyzing step comprises the following steps:
analyzing the data organization label to obtain a query statement and data format information and/or data style information;
the html line tag generating step includes:
formatting and/or stylizing the cell data of each line according to the data format information and/or the data style information:
generating the html line tag based on the cell data after formatting and/or stylizing.
18. The method of claim 11, wherein the data organization tag comprises a graphical tag; the graph label is used for defining a statistical graph and drawing target data required by the statistical graph;
the analyzing step comprises the following steps:
analyzing the data organization label to obtain graph drawing information and query statements;
the step of converting comprises:
acquiring target data by using the query statement;
drawing a statistical graph according to the target data and the graph drawing information;
and filling the path address of the statistical graph into the template file to replace the graph label to obtain an html file.
19. The method of claim 11, wherein the parsing step comprises:
analyzing the data organization label to obtain the query statement and data source information;
the target data acquiring step includes:
and calling a corresponding data source to acquire the target data by using the query statement.
20. A data configuration apparatus, comprising:
the display module is used for displaying the pre-configured html template; the html template comprises a predefined data organization tag;
the acquisition module is used for acquiring a query statement of the data organization tag input by a user;
the data organization tag is pre-configured with a preset statement for data query, and the preset statement is used for prompting a user to write a query statement;
the generating module is used for generating a template file based on the query statement; the template file is used for converting into an html file so as to display target data acquired by the query statement;
the first sending module is used for sending the template file to a server;
the html template also comprises a predefined information tag, and the information tag is used for defining the related information of the target data;
the acquisition module is further used for acquiring attribute information of the related information of the information tag input by a user;
the generating module is specifically configured to generate a template file based on the query statement and the attribute information of the relevant information.
21. The apparatus of claim 20, wherein the html template further comprises an html form tag for defining a form; the data organization tag comprises a report tag embedded in the html form tag and is used for defining target data for filling the form;
the acquisition module is specifically used for acquiring the query statement of the report tag input by the user; acquiring the header information of the html form tag input by the user;
the generating module is specifically configured to generate a template file based on the header information and the query statement; and the field information in the query statement corresponds to the header information one by one according to the appearance sequence.
22. The apparatus of claim 21, wherein the data organization tag further comprises a trigger tag embedded in the report tag; the trigger tag is used for defining a middle table; the query statement is used for acquiring target data from the intermediate table;
the acquisition module is further used for acquiring at least one query sub-statement of the trigger tag input by a user and table attribute information of the intermediate table; the at least one query sub-statement is used for acquiring filling data for filling the intermediate table;
the generating module is specifically configured to generate a template file based on the header information, the query statement, the table attribute information of the intermediate table, and the at least one query sub-statement.
23. The apparatus of claim 21, wherein the html form tag includes a form style attribute for specifying a form style of the form; and/or an attachment attribute for specifying that the form is to be converted to an attachment of a predefined file type;
the acquisition module is also used for acquiring form style information of the form style attribute input by a user and/or accessory information of the accessory attribute input by the user;
the generating module is specifically configured to generate a template file based on the query statement, the header information, and the form style information and/or the attachment information.
24. The apparatus according to claim 21, wherein the report tag is further used for defining a data format and/or a data style of the target data;
the acquisition module is further configured to:
acquiring data format information and/or data style information of the report tag input by a user;
the generating module is specifically configured to generate a template file based on the header information, the query statement, and the data format information and/or the data style information.
25. The apparatus of claim 20, wherein the data organization tag comprises a graphical tag for defining a statistical graph and target data required for rendering the statistical graph;
the acquisition module is specifically used for acquiring a query statement of the graphical label input by a user; acquiring the graph drawing information of the graph label input by a user;
the generating module is specifically configured to generate a template file based on the graph drawing information and the query statement.
26. A data processing apparatus, comprising:
the analysis module is used for analyzing the predefined data organization label in the template file to obtain a query statement; the template file is generated based on a pre-configured html template and the query statement input into the data organization tag;
the data organization tag is pre-configured with a preset statement for data query, and the preset statement is used for prompting a user to write a query statement;
the conversion module is used for converting the template file into an html file; the html file is used for displaying target data acquired by the query statement;
the second sending module is used for sending the html file to a receiving end;
the html template also comprises a predefined information tag, and the information tag is used for defining the related information of the target data;
the analysis module is further used for analyzing the information tags in the template file to obtain attribute information of the related information;
acquiring the related information according to the attribute information;
the conversion module is specifically configured to convert the template file into an html file based on the target data and the related information.
27. The apparatus of claim 26, further comprising:
and the receiving module is used for receiving the template file sent by the sending end.
28. The apparatus of claim 26, further comprising:
the display module is used for displaying the pre-configured html template; the html template comprises the data organization tag;
the acquisition module is used for acquiring a query statement of the data organization tag input by a user;
and the generating module is used for generating a template file based on the query statement.
29. The apparatus of claim 26, wherein the data organization tag comprises a report tag embedded with an html form tag; the html form tag is used for defining a form; the report tag is used for defining target data for filling the form; the field information in the query statement corresponds to the header information of the table one by one according to the appearance sequence;
the conversion module comprises:
an obtaining unit configured to obtain the target data using the query statement;
the determining unit is used for determining the cell data filled into each row of the table corresponding to the header information of the table;
the generating unit is used for generating html line labels based on the cell data of each line;
and the conversion unit is used for filling the html line tag into the template file so as to replace the report tag and obtain the html file.
30. The apparatus according to claim 29, wherein a trigger tag is embedded in the report tag; the trigger tag is used for defining a middle table;
the analysis module is specifically configured to analyze the data organization tag to obtain a query statement, table attribute information of the intermediate table, and at least one query sub-statement;
the acquisition unit is specifically used for constructing an intermediate table according to the table attribute information; acquiring filling data by utilizing the at least one query sub-statement so as to fill the intermediate table; and acquiring the target data from the intermediate table by using the query statement.
31. The apparatus according to claim 29, wherein the report tag is further used for defining a data format and/or a data style of the target data;
the analysis module is specifically used for analyzing the data organization tag to obtain a query statement and data format information and/or data style information;
the generating unit is specifically configured to format and/or style the cell data of each line according to the data format information and/or the data style information: generating the html line tag based on the cell data after formatting and/or stylizing.
32. The apparatus of claim 26, wherein the data organization tag comprises a graphical tag; the graph label is used for defining a statistical graph and drawing target data required by the statistical graph;
the analysis module is specifically used for analyzing the data organization label to obtain graph drawing information and query statements;
the conversion module is specifically used for acquiring target data by using the query statement; drawing a statistical graph according to the target data and the graph drawing information; and filling the path address of the statistical graph into the template file to replace the graph label to obtain an html file.
33. A transmitting end, comprising: a memory and a processor;
the memory is configured to store one or more computer instructions for the processor to invoke to perform implementing the data configuration method of any of claims 1 to 10.
34. A server comprises a memory and a processor;
the memory is configured to store one or more computer instructions for the processor to invoke to perform implementing the data processing method of any of claims 11 to 19.
35. A computer storage medium storing a computer program which causes a computer to execute a data configuration method according to any one of claims 1 to 10.
36. A computer storage medium storing a computer program which causes a computer to implement a data processing method according to any one of claims 11 to 19 when executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611237822.7A CN107092625B (en) | 2016-12-28 | 2016-12-28 | Data configuration method, data processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611237822.7A CN107092625B (en) | 2016-12-28 | 2016-12-28 | Data configuration method, data processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107092625A CN107092625A (en) | 2017-08-25 |
CN107092625B true CN107092625B (en) | 2020-10-09 |
Family
ID=59648728
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611237822.7A Expired - Fee Related CN107092625B (en) | 2016-12-28 | 2016-12-28 | Data configuration method, data processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107092625B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US12136138B2 (en) | 2022-02-11 | 2024-11-05 | Samsung Electronics Co., Ltd. | Neural network training with acceleration |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107943767A (en) * | 2017-10-17 | 2018-04-20 | 链家网(北京)科技有限公司 | A kind of report form generation method and device based on html template mail |
CN108132925A (en) * | 2017-12-15 | 2018-06-08 | 中盈优创资讯科技有限公司 | A kind of report file generation method and device |
CN107977459B (en) * | 2017-12-19 | 2020-11-03 | 北京星选科技有限公司 | Report generation method and device |
CN110019307B (en) * | 2017-12-28 | 2023-09-01 | 阿里巴巴集团控股有限公司 | Data processing method and device |
CN108280230A (en) * | 2018-02-27 | 2018-07-13 | 北京中关村科金技术有限公司 | A kind of method, apparatus, equipment and the storage medium of analysis data |
CN109165377A (en) * | 2018-06-11 | 2019-01-08 | 玖富金科控股集团有限责任公司 | Generate the method and tabulating equipment of form data |
CN108897728B (en) * | 2018-06-27 | 2023-04-07 | 平安科技(深圳)有限公司 | Short message splicing processing method and device, computer equipment and storage medium |
CN108959631B (en) * | 2018-07-24 | 2022-07-15 | 北京百度网讯科技有限公司 | Method and device for querying information |
CN109766529B (en) * | 2018-12-03 | 2022-09-27 | 中国联合网络通信集团有限公司 | Report generation method and equipment |
CN112825087A (en) * | 2019-11-21 | 2021-05-21 | 浙江大搜车软件技术有限公司 | User information searching method and device, computer equipment and storage medium |
CN113673211B (en) * | 2020-05-13 | 2023-09-29 | 百度在线网络技术(北京)有限公司 | Content tag setting method, device, electronic equipment and storage medium |
CN113434612B (en) * | 2021-07-09 | 2024-01-26 | 青岛海尔科技有限公司 | Data statistics method and device, storage medium and electronic device |
CN113806670A (en) * | 2021-10-11 | 2021-12-17 | 中国银行股份有限公司 | Method for processing hypertext markup language data, related device and storage medium |
CN114238807A (en) * | 2021-11-29 | 2022-03-25 | 中国工商银行股份有限公司 | Processing method and device for data visualization page |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101609399A (en) * | 2008-06-20 | 2009-12-23 | 鸿富锦精密工业(深圳)有限公司 | Intelligent website development system and method based on modeling |
CN101976260A (en) * | 2010-11-04 | 2011-02-16 | 上海银杏界信息科技有限公司 | Visual label and method for generating webpage by using visual label |
CN105989010A (en) * | 2015-01-28 | 2016-10-05 | 上海飞维信息技术有限公司 | Web page data generation method, WEBITOX server and Web application system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102270206A (en) * | 2010-06-03 | 2011-12-07 | 北京迅捷英翔网络科技有限公司 | Method and device for capturing valid web page contents |
-
2016
- 2016-12-28 CN CN201611237822.7A patent/CN107092625B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101609399A (en) * | 2008-06-20 | 2009-12-23 | 鸿富锦精密工业(深圳)有限公司 | Intelligent website development system and method based on modeling |
CN101976260A (en) * | 2010-11-04 | 2011-02-16 | 上海银杏界信息科技有限公司 | Visual label and method for generating webpage by using visual label |
CN105989010A (en) * | 2015-01-28 | 2016-10-05 | 上海飞维信息技术有限公司 | Web page data generation method, WEBITOX server and Web application system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US12136138B2 (en) | 2022-02-11 | 2024-11-05 | Samsung Electronics Co., Ltd. | Neural network training with acceleration |
Also Published As
Publication number | Publication date |
---|---|
CN107092625A (en) | 2017-08-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107092625B (en) | Data configuration method, data processing method and device | |
US10726195B2 (en) | Filtered stylesheets | |
US10606921B2 (en) | Document architecture with fragment-driven role-based access controls | |
CN109933752B (en) | Method and device for exporting electronic document | |
US9953007B2 (en) | Template-based content creation | |
US12058086B2 (en) | Conversation-enabled document system and method | |
CN110705237B (en) | Automatic document generation method, data processing device and storage medium | |
US9646103B2 (en) | Client-side template engine and method for constructing a nested DOM module for a website | |
CN111819534A (en) | Spreadsheet-based software application development | |
US8239754B1 (en) | System and method for annotating data through a document metaphor | |
US20150149884A1 (en) | Distributed computing environment based document personalizer | |
CN111651966A (en) | Data report file generation method and device and electronic equipment | |
US9128986B2 (en) | Method and system for managing a database having a plurality of tables | |
CN110308907B (en) | Data conversion method and device, storage medium and electronic equipment | |
JP2001125855A (en) | Dynamic web page generation program | |
CN116227454A (en) | Universal automatic report generation method and system | |
CN115809056A (en) | Component multiplexing implementation method and device, terminal equipment and readable storage medium | |
CN111858595B (en) | Dynamic configuration method and system for electric power engineering examination record table | |
CN107977459A (en) | Report form generation method and device | |
CN113918194A (en) | Page component display method and device, electronic equipment and storage medium | |
US20170031881A1 (en) | Method for creating web program and corresponding table interface according to column comment | |
CN112783960A (en) | Data processing system and method, electronic device, computer-readable storage medium | |
US20160012146A1 (en) | Client Web Browser and Method for Constructing a Website DOM Module With Client-Side Functional Code | |
CN111708592B (en) | Program component display method and device | |
CN114116759A (en) | MyBatis-based low-code automatic report generation processing method and related equipment |
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 | ||
CB02 | Change of applicant information |
Address after: Building N3, Jinyu Zhizao workshop, No. 27, Jiancai Chengzhong Road, Haidian District, Beijing 100096 Applicant after: Beijing Xingxuan Technology Co.,Ltd. Address before: 100085 Beijing, Haidian District on the road to the information on the ground floor of the 1 to the 3 floor of the 2 floor, room 11, 202 Applicant before: Beijing Xiaodu Information Technology Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20201009 |
|
CF01 | Termination of patent right due to non-payment of annual fee |