CN113934384B - Data rendering method, device, computer equipment and storage medium - Google Patents

Data rendering method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN113934384B
CN113934384B CN202111127017.XA CN202111127017A CN113934384B CN 113934384 B CN113934384 B CN 113934384B CN 202111127017 A CN202111127017 A CN 202111127017A CN 113934384 B CN113934384 B CN 113934384B
Authority
CN
China
Prior art keywords
data
table body
area
body data
rendering
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.)
Active
Application number
CN202111127017.XA
Other languages
Chinese (zh)
Other versions
CN113934384A (en
Inventor
高奋博
肖荣兰
苏妮妮
郭志伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN202111127017.XA priority Critical patent/CN113934384B/en
Publication of CN113934384A publication Critical patent/CN113934384A/en
Application granted granted Critical
Publication of CN113934384B publication Critical patent/CN113934384B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1253Configuration of print job parameters, e.g. using UI at the client
    • G06F3/1257Configuration of print job parameters, e.g. using UI at the client by using pre-stored settings, e.g. job templates, presets, print styles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Record Information Processing For Printing (AREA)

Abstract

The application relates to a data rendering method, a data rendering device, computer equipment and a storage medium. The method comprises the following steps: acquiring a printing template, wherein the printing template comprises an area keyword for dividing a first expansion area and a data keyword positioned in the first expansion area; classifying the table body data corresponding to the data keywords into different expansion areas according to the processing parameters set in the printing template; the extension area comprises a first extension area and a second extension area; rendering the table body data corresponding to the first expansion area into the first expansion area based on the data key words; and when the table body data corresponding to the second expansion area is rendered, copying the first expansion area of the unrendered table body data to obtain the second expansion area, and rendering the table body data corresponding to the second expansion area into the second expansion area based on the data keywords in the second expansion area. Therefore, the setting difficulty of the printing template is reduced, and the flexibility is improved.

Description

Data rendering method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of data processing, and in particular, to a data rendering method, apparatus, computer device, and storage medium.
Background
With the continuous development of informatization construction, more and more data are processed by various industries, and the requirement for data rendering also tends to be complicated and diversified. Currently, the process of rendering data to a blank form depends on various print controls defined in the print template, e.g., rendering of the form data depends on the form controls defined in the print template; the table control loads the table body data, dynamically increases the number of rows of the table control and fills the table body data according to the number of rows of the table body data during rendering.
Because each printing control is independent, one printing control can only realize one rendering effect, if the linkage relation between the data needs to be set for rendering, a complex printing control combination needs to be set, for example, in the document data processing process, the complex printing control combination needs to be set for classifying and respectively summing the data in the document, so that the setting difficulty of a printing template is high, the printing template is not flexible enough, the printing efficiency of a user is low, and the experience is poor.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a data rendering method, apparatus, computer device, and storage medium that can improve flexibility.
A method of data rendering, the method comprising:
acquiring a printing template, wherein the printing template comprises an area keyword used for dividing a first expansion area and a data keyword positioned in the first expansion area;
classifying the table body data corresponding to the data keywords into different expansion areas according to the processing parameters set in the printing template; the extension area comprises the first extension area and a second extension area;
rendering table body data corresponding to a first expansion area into the first expansion area based on the data key words;
and when rendering the table body data corresponding to the second expansion area, copying the first expansion area of the unrendered table body data to obtain the second expansion area, and rendering the table body data corresponding to the second expansion area into the second expansion area based on the data keywords in the second expansion area.
In one embodiment, the processing parameters include grouping parameters set for the table body data corresponding to the specified data key;
the classifying the table body data corresponding to the data keywords into different expansion areas according to the processing parameters set in the printing template comprises:
Grouping the table body data based on the grouping parameter; each set of table body data has a corresponding extension area.
In one embodiment, the processing parameters include paging parameters set for table body data corresponding to the data key words;
the classifying the table body data corresponding to the data keywords into different expansion areas according to the processing parameters set in the printing template comprises:
paging the table body data based on the paging parameter; each page table has a corresponding extended region.
In one embodiment, the processing parameters include summary parameters;
after the rendering of the table body data corresponding to the second extension area into the second extension area, the method further includes:
after summarizing the target table body data based on the summarizing parameters, rendering a summarizing result into the second expansion area; and the target table body data is the table body data corresponding to the data key words appointed in the second expansion area.
In one embodiment, the data key is disposed in a cell in the first extension region;
the rendering of the table body data corresponding to the first expansion area into the first expansion area based on the data key comprises:
Searching table body data corresponding to the cell from the table body data corresponding to the first expansion area based on the data keyword arranged in the cell;
and rendering the table body data corresponding to the cells into the corresponding cells based on the printing format information corresponding to the cells.
In one embodiment, the data key is a first data key; the first extension area further includes a second data key; the method further comprises the steps of:
acquiring non-table body data corresponding to the second data key words;
rendering the non-surface data into the first extension region based on a second data key;
the copying the first expansion area of the unrendered table body data to obtain a second expansion area comprises the following steps:
copying the first expansion area which is rendered with the non-table body data and is not rendered with the table body data to obtain the second expansion area.
In one embodiment, the print template further comprises a fixed region distinct from the first expansion region; the fixed area contains a third data key;
the method further comprises the steps of:
acquiring target data corresponding to the third data keyword;
Rendering the target data into the fixed region based on a third data key.
A data rendering apparatus, the apparatus comprising:
the system comprises an acquisition template module, a printing template module and a printing module, wherein the acquisition template module is used for acquiring a printing template, and the printing template comprises an area keyword for dividing a first expansion area and a data keyword positioned in the first expansion area;
the classification module is used for classifying the table body data corresponding to the data keywords into different expansion areas according to the processing parameters set in the printing template; the extension area comprises the first extension area and a second extension area;
a rendering module, configured to render, based on the data key, table body data corresponding to a first extension area into the first extension area; and when rendering the table body data corresponding to the second expansion area, copying the first expansion area of the unrendered table body data to obtain the second expansion area, and rendering the table body data corresponding to the second expansion area into the second expansion area based on the data keywords in the second expansion area.
A computer device comprising a memory storing a computer program and a processor executing the steps of the above described data rendering method.
A computer-readable storage medium having stored thereon a computer program which is executed by a processor to perform the steps of the data rendering method described above.
The data rendering method, the data rendering device, the computer equipment and the storage medium are characterized in that a printing template is obtained, wherein the printing template comprises an area keyword used for dividing a first area and a data keyword located in the first area. Classifying the table body data corresponding to the data keywords into different areas according to the processing parameters set in the printing template; the region includes a first region and a second region. And rendering the table body data corresponding to the first area based on the data key. And when the table body data corresponding to the second area is rendered, copying the first area of the unrendered table body data to obtain the second area, and rendering the table body data corresponding to the second area into the second area based on the data keywords in the second area. Therefore, by setting the simple printing templates comprising the region keywords, the data keywords and the processing parameters, the surface data can be classified and rendered in different expansion regions based on the processing parameters, and the complex printing templates are not required to be set, so that the setting difficulty of the printing templates is reduced, and the flexibility is improved.
Drawings
FIG. 1 is a flow diagram of a method of data rendering in one embodiment;
FIG. 2 is a schematic diagram of data to be rendered in one embodiment;
FIG. 3 is a schematic diagram of an interface of a print template in one embodiment;
FIG. 4 is an interface schematic of rendered data in one embodiment;
FIG. 5 is a schematic diagram of an interface of a print template in one embodiment;
FIG. 6 is an interface schematic of rendered data in one embodiment;
FIG. 7 is a schematic diagram of an interface of a print template in one embodiment;
FIG. 8 is an interface schematic of rendered data in one embodiment;
FIG. 9 is a block diagram of a data rendering apparatus in one embodiment
Fig. 10 is an internal structural view of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
In one embodiment, as shown in fig. 1, a data rendering method is provided, where the method is applied to a terminal to illustrate the method, it is understood that the method may also be applied to a server, and may also be applied to a system including the terminal and the server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the steps of:
S102, acquiring a printing template, wherein the printing template comprises an area keyword for dividing a first expansion area and a data keyword positioned in the first expansion area.
The printing template is a file for recording information such as printing format information, data names, data keywords and the like, and is used for telling the terminal what rules are used for processing the data to be rendered and outputting the data. It will be appreciated that the print template corresponds to a blank template of unrendered data. The rendering process may be regarded as a process of executing a step corresponding to a preset rule, rendering data into a blank print template, and finally outputting the data. And the data key words are used for determining corresponding data from the data to be rendered. The data key may include an access key. And the access key words are used for acquiring corresponding data from the data to be rendered.
For example, as shown in fig. 2, fig. 2 illustrates data to be rendered, as shown in fig. 3, the content of 301 includes a data keyword "amountj, and the terminal may find 201 the corresponding data shown in fig. 2, that is, find a corresponding specific amount, from the data to be rendered shown in fig. 2 according to the data keyword" amountj. It should be noted that, the storage format of the data to be rendered is not required, and fig. 2 is merely an example.
In one embodiment, the print template is a print template for document data processing, i.e., a document print template.
The extension area is an area capable of being extended, for example, the number of lines can be increased in the rendering process. The region key is used to divide at least one extension region in the print template. The region key includes a start region key and an end region key, and as shown in fig. 3, the start region key "region_begin" indicated by 302 and the end region key "region_end" indicated by 303 divide a first extension region on the print template. Specifically, the area key contains information for identifying the start of the extended area and for identifying the end of the extended area.
The first expansion area refers to an expansion area which is preset in the printing template and is used for representing a sample of the expansion area. As shown in fig. 3, the area divided by 302 and 303 is a first extension area.
In one embodiment, special characters may be used to distinguish the region key and the data key from the data name in the print template. The data names refer to information which is preset in the printing template and does not need to be rendered, and the "materials", "units", the "quantity" and the like contained in the printing template shown in fig. 3 belong to the preset data names in the printing template.
In one embodiment, the terminal distinguishes regional keywords with a special character of "$ { }".
In one embodiment, the terminal uses "region_begin" to indicate an extended region start and "region_end" to indicate an extended region end in the region key information. As shown at 302 and 303, 302 represents the beginning of an extended area and 303 represents the end of an extended area.
In one embodiment, the terminal distinguishes data keywords using "$ [ ]". As shown at 301.
Specifically, the user may set one or more first extension areas in the print template. Also, in the first extension area, the user may set a cell format, input a data keyword, and the like.
Specifically, the terminal acquires the print template, and may acquire the region keyword included in the print template and the data keyword in the first extension region.
In one embodiment, the terminal may identify the region key from the print template to locate the first extension region in the print template based on the identified region key. The terminal may identify the data key from the first extension area.
In one embodiment, the print template may further include a data key in the fixed area, and the terminal may directly render the data corresponding to the data key without performing step 104 and step 106 on the fixed area. As shown at 304 in fig. 3, the data key of 304 is not within the first extension region and the terminal may render directly. The fixed area is a fixed set non-expanded area.
S104, classifying the table body data corresponding to the data keywords into different expansion areas according to the processing parameters set in the printing template; the extension region includes a first extension region and a second extension region.
Wherein the data to be rendered into the print template includes tabular body data and non-tabular body data. The table body data refers to data to be rendered into a table. As shown in fig. 2, 201 is table body data, 202 is non-table body data, and the non-table body data is not required to be rendered into a table.
In one embodiment, the data corresponding to the data key included in the first extension area includes table body data and non-table body data.
In another embodiment, the data corresponding to the data key included in the first extension area includes table body data, and does not include non-table body data. As shown in fig. 3, the data corresponding to the data key included in the first extension area is table body data.
The second extension area is an extension area generated during the rendering process based on the result of the classification of the table body data, and it should be noted that classifying the table body data corresponding to the data key into different extension areas does not mean that a plurality of extension areas are generated, but identifies the table body data to indicate which extension area belongs to. The table body data corresponding to the data key words are classified in different expansion areas, so that the corresponding table body data is displayed in the different expansion areas through step 106. For example, fig. 4 shows a rendering result corresponding to fig. 3, fig. 3 includes a first extension area, 401 is a first extension area after rendering, 402 and 403 are second extension areas generated in the rendering process, and three extension areas shown in fig. 4 include different table body data.
In one embodiment, the print template may comprise a plurality of first extension regions, the regions then comprising a plurality of first extension regions and a corresponding plurality of second extension regions.
S106, rendering the table body data corresponding to the first expansion area into the first expansion area based on the data keywords; and when the table body data corresponding to the second expansion area is rendered, copying the first expansion area of the unrendered table body data to obtain the second expansion area, and rendering the table body data corresponding to the second expansion area into the second expansion area based on the data keywords in the second expansion area.
Specifically, the terminal copies the first extension area of the unrendered table body data to the memory, then obtains the table body data corresponding to the first extension area based on the classification of the table body data in step S104, and renders the table body data to the first extension area based on the data key. When rendering the table body data corresponding to the second expansion area, copying the first expansion area of the unrendered table body data to obtain the second expansion area, acquiring the table body data corresponding to the second expansion area, and rendering the table body data into the second expansion area based on the data keywords in the second expansion area.
In one embodiment, if the table body data is classified into one first extension area and a plurality of second extension areas in step S204, the terminal renders the table body data corresponding to the second extension areas multiple times. For example, as shown in fig. 4, the terminal renders a first extended region as shown in 401 and a second extended region as shown in 402 and 403 based on the classification of the volume data in step S204.
In one embodiment, after rendering the table body data, the terminal may also calculate and display the table body data, for example, the terminal may find the maximum value or the minimum value of the table body data corresponding to a specified data keyword and display the maximum value or the minimum value in the corresponding extension area.
In one embodiment, the data corresponding to the data key included in the first extension area further includes non-table body data. Rendering non-surface volume data corresponding to the first extension region into the first extension region; and generating rendered non-surface data of the corresponding second extension region based on the rendered non-surface data of the first extension region.
In one embodiment, the print template further includes a set of the format of the sleeve, and the terminal may copy the format of the sleeve to a different area during rendering, i.e. the different area uses the format of the sleeve. For example, the table head of the first expansion area is set to be gray in the printing template, the table body is light red, the terminal copies and applies the table format in the rendering process, the table heads of the tables in the displayed expansion area are all gray, and the table body is light red.
In one embodiment, the print template is made up of cells, and the print template also contains a setting of the cell format, e.g., setting the numerical format of a cell to date or a numerical value. For example, the data format of 301 is set to a numerical value.
The data rendering method, the data rendering device, the computer equipment and the storage medium are characterized in that a printing template is obtained, wherein the printing template comprises an area keyword used for dividing a first area and a data keyword located in the first area. Classifying the table body data corresponding to the data keywords into different areas according to the processing parameters set in the printing template; the region includes a first region and a second region. And rendering the table body data corresponding to the first area based on the data key. And when the table body data corresponding to the second area is rendered, copying the first area of the unrendered table body data to obtain the second area, and rendering the table body data corresponding to the second area into the second area based on the data keywords in the second area. Therefore, by setting the simple printing templates comprising the region keywords, the data keywords and the processing parameters, the surface data can be classified and rendered in different expansion regions based on the processing parameters, and the complex printing templates are not required to be set, so that the setting difficulty of the printing templates is reduced, and the flexibility is improved. Therefore, the user can obtain flexible and various form printing patterns through the scheme of the invention, the complex and various printing requirements of the user can be met flexibly and efficiently, and the printing efficiency and the user use experience are improved.
In one embodiment, the processing parameters include grouping parameters set for table body data corresponding to the specified data key; classifying the table body data corresponding to the data keywords into different expansion areas according to the processing parameters set in the printing template comprises: grouping the table body data based on the grouping parameters; each set of table body data has a corresponding extension area.
Wherein the grouping parameter is input in a preset format and contains information for indicating how to classify the data to be rendered.
In one embodiment, the user may set a portion of the content of the grouping parameter for the specified region key; the user may set another portion of the content of the grouping parameter for the specified data key.
In one embodiment, the set of grouping parameters is located adjacent to the corresponding data key and the corresponding region key and is identified as a grouping parameter by "||group". For example, in 302, for the region key words shown in 302, the adjacent "||group" indicates that the region needs to be grouped; in 305, for the data key indicated in 305, the adjacent "||group" indicates that the grouping is performed based on the table body data corresponding to the data key. As shown in fig. 4, 401, 402, and 403 respectively show the grouped table body data, it can be seen that the table body data values corresponding to the data key in 401, 402, and 403 are identical, respectively, to 4, 1, and 2.
In another embodiment, the beginning and end of the processing parameters may be represented by "$ (" sum ")". For example, information of "$ (region=1|group=count)" set in the print template may indicate that the table body data corresponding to the data key containing "count" in the 1 st expansion area is grouped.
In one embodiment, after the terminal obtains the printing template and reads the region key, when identifying the information of the processing parameter "||group", confirming that the expansion region corresponding to the region key needs grouping, further confirming the digital key adjacent to the "|group" information in the expansion region, thereby confirming that the table body data corresponding to the data key needs grouping.
Specifically, a row of table body data is a combination of related table body data, and a row of table body data corresponds to a plurality of data keywords. For example, a row of table body data shown at 402 corresponds to a plurality of data keywords included in the first extension area in fig. 3. The data to be rendered contains a plurality of rows of table body data, when the processing parameters comprise grouping parameters of the table body data corresponding to the designated data keywords, the terminal groups the table body data, and other table body data belonging to the same row also belong to the same group.
For example, the table body data shown in fig. 2 are grouped based on the grouping parameters set in the print template of fig. 3, and the terminal confirms that the table body data corresponding to the data keywords included in 305 need to be grouped based on the keywords set in 302 and 305 in fig. 3, and the table body data belonging to the same row are also grouped into the same group, and each group of table body data has a corresponding expansion area. As shown in fig. 4, the three extension areas 401, 402, and 403 contain different sets of table body data, and the table body data of the same row belongs to the same set and the same area.
In the present embodiment, the table body data is grouped based on the grouping parameter; each group of table body data has a corresponding expansion area, so that the printing templates are not required to be grouped by setting complex control combinations, and only parameters are required to be set, thereby reducing the setting difficulty of the printing templates, improving the flexibility and enabling users to obtain flexible and various rendering patterns through simple printing templates.
In one embodiment, the processing parameters include paging parameters set for table body data corresponding to the data key; classifying the table body data corresponding to the data keywords into different expansion areas according to the processing parameters set in the printing template comprises: paging the table body data based on the paging parameters; each page table has a corresponding extended region.
In one embodiment, a paging parameter may be adjacent to the region key to indicate which region to page.
In one embodiment, the paging parameter is denoted by "||paging". For example, as shown in fig. 5, 501 and 502 divide a first extension area, and the adjacent "||paging" in 501 indicates that the area needs to be paged.
Specifically, when the processing parameters include paging parameters, the terminal pages the table body data according to a preset maximum line number, and classifies the table body data of different pages into different expansion areas. For example, paging is performed on the 5-row table body data in fig. 2, and if the preset maximum row number is 2, the terminal performs table body data division according to the maximum row number of 2 to obtain 3 pages, each page has a respective table, and the table body data of different pages are categorized into different expansion areas. As shown in fig. 6, 601, 602, and 603 are rendered extension areas, and it can be seen that the extension areas in 601, 602, and 603 contain table body data of different pages.
In one embodiment, when the number of rows of the table body data of the last page after paging is not equal to the maximum number of rows, the space is filled to be equal to the maximum number of rows, and the rows filled with spaces are included as shown in 603.
In another embodiment, when the number of lines of the table body data of the last page after paging is not equal to the maximum number of lines, the space is not filled, and only the accurate number of lines is displayed in the second extension area after rendering.
In one embodiment, the default maximum line number is 2, and the user does not need to set the maximum line number, but only needs to set the information to be paged, as shown in 501, and does not include the maximum line number information.
In another implementation, the print template may set a maximum number of lines, and after the user sets the maximum number of lines, the terminal reads the set maximum number of lines and pages the volume data according to the set maximum number of lines. For example, the content indicated by 501 may be modified to "$ { region_begin|page=5 }" |page=5 "indicating that the maximum number of lines is 5, and when the terminal reads the information, the terminal pages the volume data according to the maximum number of lines of 5.
In this embodiment, the table body data is paged based on the paging parameter; the page table body data has corresponding expansion areas, so that the printing template does not need to be provided with complex control combinations to carry out paging, and only parameters are required to be set, thereby reducing the setting difficulty of the printing template, improving the flexibility and enabling a user to obtain flexible and various rendering patterns through the simple printing template.
In one embodiment, the processing parameters include summary parameters; after rendering the table body data corresponding to the second extension area into the second extension area, the method further comprises: after summarizing the target table body data based on the summarizing parameters, rendering the summarizing results into a second expansion area; the target table body data is table body data corresponding to the data key words appointed in the second expansion area.
Specifically, the terminal reads the summarizing parameters from the printing template, based on the summarizing parameters, the terminal confirms the data keywords to be summarized and the position for showing the summarizing result, and based on the data keywords, the terminal obtains the table body data to be summarized from the table body data corresponding to the second expansion area, performs summation, and shows the summation result to the position for showing the summarizing result.
In one embodiment, the summary parameters may be represented by a summation formula. Specifically, a summation formula is contained in a cell, and the terminal acquires the formula information to obtain the data keywords to be summarized and the positions for showing the summarized results. For example, 306 represents the data name of the summary result, 307 includes a summation formula, the terminal obtains the position where the summary result is displayed based on the summation formula, and confirms that the table body data in the second expansion area corresponding to the data keyword shown in 305 needs to be summarized based on the formula information. The final display result is shown as 404, showing a summation result of "8"; as shown in fig. 4, each second extension region may be aggregated.
In one embodiment, the print template may contain at least one summary parameter.
In one embodiment, a print template for document data processing may contain at least one summary parameter.
In this embodiment, after the target table body data is summarized based on the summary parameter, the summary result is rendered into the second extension area. Therefore, the printing template does not need to set complex control combinations to sum the table body data of the second expansion area, and only parameters are required to be set, so that the setting difficulty of the printing template is reduced, the flexibility is improved, and a user can obtain flexible and various rendering patterns through a simple printing template.
In one embodiment, the data key is disposed in a cell in the first expansion region; rendering the table body data corresponding to the first extension area into the first extension area based on the data key comprises: based on the data keywords arranged in the cells, table body data corresponding to the cells are searched from the table body data corresponding to the first expansion area; and rendering the table body data corresponding to the cells into the corresponding cells based on the printing format information corresponding to the cells.
Wherein the print format information may include at least one of a digital format, a border, a font, a fill, and the like. Wherein the digital format includes at least one of date, value, currency, percentage, score, and the like.
Specifically, the terminal reads the table body data corresponding to the cells, and renders the corresponding table body data into the cells based on setting the printing format information of the cells. For example, when the number format in the print format information set by the cell 301 is "numerical value", and the terminal reads the table body data corresponding to the cell for the cell shown in 301 in the process of rendering the data of fig. 2 based on the print template of fig. 3, and determines that the cell is set to the number format as "numerical value", the table body data is rendered into the corresponding cell according to the format of "numerical value". As shown in 401, the digital format of the content "1" corresponding to the "amount" data name is "numerical value".
In one embodiment, in the process of copying the first extension area to obtain the second extension area, the terminal will copy the printing format information and the data keywords included in the first extension area into the second extension area, and render the table body data of the cells in the second extension area according to the method of the embodiment.
In this embodiment, based on the data key word set in the cell, the table body data corresponding to the cell is searched from the table body data corresponding to the first expansion area; and rendering the table body data corresponding to the cells into the corresponding cells based on the printing format information corresponding to the cells. The terminal can set corresponding printing format information in the first expansion area, so that the table body data in the first expansion area can be rendered, and the table body data in the second expansion area can be rendered, so that the requirements of a user on the format of the rendered table body data are met, and the user can obtain flexible and various rendering patterns through a simple printing template.
In one embodiment, the data key is a first data key; the first extension region further includes a second data key; the method further comprises the steps of: acquiring non-table body data corresponding to the second data key words; rendering the non-surface data into the first extension region based on the second data key; copying the first extension area of the unrendered table body data to obtain a second extension area comprises: and copying the first expansion area which is not rendered with the non-table body data and is not rendered with the table body data to obtain a second expansion area.
Wherein the second data key is not located within the table. The print template as shown in fig. 7, wherein 701 includes a plurality of second data keywords.
Specifically, the terminal searches for corresponding non-table body data from the data to be rendered according to the second data keyword, and then renders the non-table body data into the corresponding position of the first expansion area according to the position of the second data keyword. For example, the second data keyword is included in 701, and the result after rendering by the terminal is shown as 804 in the first extension area.
Specifically, after rendering the non-surface data to the first expansion area by the terminal, copying the first expansion area to the printing template to obtain a second expansion area. It will be appreciated that the second extension region also includes rendered non-surface data, and that repeated rendering is not required. For example, fig. 8 includes a first extension area 801 and second extension areas 802 and 803, where 804 includes rendered non-table body data, 801 includes 804, and after the terminal copies the rendered non-table body data and the first extension area that does not render the table body data obtains the second extension area, the terminal copies 804 to the second extension areas 802 and 803, and the copying results are shown as 805 and 806, and it can be understood that the process of generating 805 and 806 does not need to repeatedly render data.
In this embodiment, the non-table body data corresponding to the second data keyword is obtained; rendering the non-surface data into the first extension region based on the second data key; and copying the first expansion area which is not rendered with the non-table body data and is not rendered with the table body data to obtain a second expansion area. Therefore, the non-table body data of the second extension area does not need to be searched again and rendered again, and only needs to be copied. Therefore, the problem that the non-table data cannot be reused is solved, repeated inquiry of the non-table data is not needed, the processing flow is simplified, and the rendering speed is improved.
In one embodiment, the print template further comprises a fixed region distinct from the first expansion region; the fixed area contains a third data key; the method further comprises the steps of: acquiring target data corresponding to the third data keyword; the target data is rendered into the fixed region based on the third data key.
Wherein the fixed area is different from the first extension area, steps S104 and S106 do not need to be performed on the fixed area. The print template may contain a plurality of third data keywords.
Specifically, the terminal searches corresponding target data from the data to be rendered based on the third data keyword, and renders the target data to the position corresponding to the printing template according to the position of the third data keyword.
In one embodiment, the target data may include at least one of table body data and non-table body data.
As shown at 304, the plurality of third data keywords are included at 304, and the rendered result of the terminal is shown at 405, where the corresponding rendered data is displayed at the location of the third data keywords.
In one embodiment, the fixed area may further include a table, and the terminal acquires corresponding table body data and renders the corresponding table body data into the corresponding table.
In one embodiment, the fixed area may further include a processing parameter for summarizing the table body data corresponding to the specified data key words of the plurality of extension areas, which is also called a summary parameter. The terminal reads the total summarizing parameters, acquires the table body data corresponding to the plurality of expansion areas needing total summarizing, and finally displays the table body data to the corresponding positions after summing. As shown in 308, the cell corresponding to "0" contains a summation formula, the terminal obtains the formula information, obtains the position of the summary result display, confirms that the total summary of the table body data corresponding to the data keyword shown in 305 is required based on the formula information, and finally, the result after summation and rendering is shown in 406.
In one embodiment, the print template may contain at least one total summary parameter.
In one embodiment, the print template for document data processing may contain at least one summary parameter.
In this embodiment, the terminal acquires target data corresponding to the third data keyword; the target data is rendered into the fixed region based on the third data key. The rendering requirement of the data to be rendered increases a fixed area, so that a user obtains flexible and various rendering patterns through a simple printing template.
It should be understood that, although the steps in the flowcharts in some embodiments of the present application are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least a portion of the steps in the flowcharts may include a plurality of steps or stages that are not necessarily performed at the same time, but may be performed at different times, and the order in which the steps or stages are performed is not necessarily sequential, but may be performed in rotation or alternately with at least a portion of the steps or stages in other steps or other steps.
In one embodiment, as shown in fig. 9, there is provided a data rendering apparatus 900 including: an acquisition template module 902, a classification module 904, and a rendering module 906, wherein:
an acquisition template module 902 is configured to acquire a print template, where the print template includes an area key for dividing the first extension area and a data key located in the first extension area.
The classification module 904 is configured to classify the table body data corresponding to the data key words into different extension areas according to the processing parameters set in the printing template; the extension region includes a first extension region and a second extension region.
A rendering module 906 for rendering the table body data corresponding to the first extension area into the first extension area based on the data key; and when the table body data corresponding to the second expansion area is rendered, copying the first expansion area of the unrendered table body data to obtain the second expansion area, and rendering the table body data corresponding to the second expansion area into the second expansion area based on the data keywords in the second expansion area.
In one embodiment, the processing parameters include grouping parameters set for table body data corresponding to the specified data key; the classification module 904 is further configured to group the table body data based on the grouping parameter; each set of table body data has a corresponding extension area.
In one embodiment, the processing parameters include paging parameters set for table body data corresponding to the data key; the classification module 904 is further configured to page the table body data based on the paging parameter; each page table has a corresponding extended region.
In one embodiment, the processing parameters include summary parameters; the rendering module 906 is further configured to render the summarized result into the second extension area after the target table body data is summarized based on the summarized parameter; the target table body data is table body data corresponding to the data key words appointed in the second expansion area.
In one embodiment, the data key is disposed in a cell in the first expansion region; the rendering module 906 is further configured to search, based on the data keyword set in the cell, table body data corresponding to the cell from table body data corresponding to the first extension area; and rendering the table body data corresponding to the unit cells into the corresponding unit cells based on the printing format information corresponding to the unit cells.
In one embodiment, the data key is a first data key; the first extension region further includes a second data key; the data rendering device 900 is further configured to obtain non-table body data corresponding to the second data keyword; rendering the non-surface data into the first extension region based on the second data key; the rendering template 906 is further used for copying the first extension area which is not rendered for the table body data after the non-table body data is rendered, so as to obtain a second extension area.
In one embodiment, the print template further comprises a fixed region distinct from the first expansion region; the fixed area contains a third data key; the data rendering device 900 is further configured to obtain target data corresponding to the third data keyword; the target data is rendered into the fixed region based on the third data key.
The data rendering device obtains the printing template, wherein the printing template comprises the region keywords for dividing the first region and the data keywords located in the first region. Classifying the table body data corresponding to the data keywords into different areas according to the processing parameters set in the printing template; the region includes a first region and a second region. And rendering the table body data corresponding to the first area based on the data key. And when the table body data corresponding to the second area is rendered, copying the first area of the unrendered table body data to obtain the second area, and rendering the table body data corresponding to the second area into the second area based on the data keywords in the second area. Therefore, by setting the simple printing templates comprising the region keywords, the data keywords and the processing parameters, the surface data can be classified and rendered in different expansion regions based on the processing parameters, and the complex printing templates are not required to be set, so that the setting difficulty of the printing templates is reduced, and the flexibility is improved.
For specific limitation of the data rendering device, reference may be made to the limitation of the data rendering method described above, and the description thereof will not be repeated here. The respective modules in the above-described data rendering apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and an internal structure diagram thereof may be as shown in fig. 10. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a data rendering method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 10 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples represent only a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that variations and modifications can be made by those skilled in the art without departing from the spirit of the present application, which falls within the scope of the present application. Accordingly, the scope of protection of the present application is subject to the appended claims.

Claims (12)

1. A method of rendering data, the method comprising:
acquiring a printing template, wherein the printing template comprises an area keyword used for dividing a first expansion area and a data keyword positioned in the first expansion area;
grouping the table body data according to grouping parameters set for the table body data corresponding to the designated data keywords in the printing template, wherein each group of table body data has a corresponding expansion area; and/or paging the table body data based on paging parameters set for the table body data corresponding to the specified data keywords in the printing template, wherein each page table body data has a corresponding expansion area; the extension area comprises the first extension area and a second extension area; rendering table body data corresponding to a first expansion area into the first expansion area based on the data key words;
And when rendering the table body data corresponding to the second expansion area, copying the first expansion area of the unrendered table body data to obtain the second expansion area, and rendering the table body data corresponding to the second expansion area into the second expansion area based on the data keywords in the second expansion area.
2. The method of claim 1, wherein after the rendering of the table body data corresponding to the second extension area into the second extension area, the method further comprises:
after summarizing the target table body data based on the summarizing parameters set in the printing template, rendering the summarizing result into the second expansion area; and the target table body data is the table body data corresponding to the data key words appointed in the second expansion area.
3. The method of claim 1, wherein the data key is disposed in a cell in the first extension region;
the rendering of the table body data corresponding to the first expansion area into the first expansion area based on the data key comprises:
searching table body data corresponding to the cell from the table body data corresponding to the first expansion area based on the data keyword arranged in the cell;
And rendering the table body data corresponding to the cells into the corresponding cells based on the printing format information corresponding to the cells.
4. The method of claim 1, wherein the data key is a first data key; the first extension area further includes a second data key; the method further comprises the steps of:
acquiring non-table body data corresponding to the second data key words;
rendering the non-surface data into the first extension region based on a second data key;
the copying the first expansion area of the unrendered table body data to obtain a second expansion area comprises the following steps:
copying the first expansion area which is rendered with the non-table body data and is not rendered with the table body data to obtain the second expansion area.
5. The method of any one of claims 1 to 4, wherein the print template further comprises a fixed region distinct from the first expansion region; the fixed area contains a third data key;
the method further comprises the steps of:
acquiring target data corresponding to the third data keyword;
rendering the target data into the fixed region based on a third data key.
6. A data rendering apparatus, the apparatus comprising:
the system comprises an acquisition template module, a printing template module and a printing module, wherein the acquisition template module is used for acquiring a printing template, and the printing template comprises an area keyword used for dividing a first expansion area and a data keyword positioned in the first expansion area;
the classification module is used for grouping the table body data according to grouping parameters which are set for the table body data corresponding to the designated data keywords in the printing template, and each group of table body data has a corresponding expansion area; and/or paging the table body data based on paging parameters set for the table body data corresponding to the specified data keywords in the printing template, wherein each page table body data has a corresponding expansion area; the extension area comprises the first extension area and a second extension area;
a rendering module, configured to render, based on the data key, table body data corresponding to a first extension area into the first extension area; and when rendering the table body data corresponding to the second expansion area, copying the first expansion area of the unrendered table body data to obtain the second expansion area, and rendering the table body data corresponding to the second expansion area into the second expansion area based on the data keywords in the second expansion area.
7. The apparatus of claim 6, wherein the rendering module is further configured to render the summary result into the second extension area after the target table body data is summarized based on the summary parameters set in the print template; and the target table body data is the table body data corresponding to the data key words appointed in the second expansion area.
8. The apparatus of claim 6, wherein the data key is disposed in a cell in the first expansion region; the rendering module is further configured to search table body data corresponding to the cell from table body data corresponding to the first extension area based on a data keyword set in the cell; and rendering the table body data corresponding to the cells into the corresponding cells based on the printing format information corresponding to the cells.
9. The apparatus of claim 6, wherein the data key is a first data key; the first extension area further includes a second data key; the data rendering device is also used for acquiring non-table body data corresponding to the second data key words; rendering the non-surface data into the first extension region based on a second data key;
The rendering module is further configured to copy the first extension area that is not rendered for the table body data after the non-table body data is rendered, so as to obtain the second extension area.
10. The apparatus of any one of claims 6 to 9, wherein the print template further comprises a fixed region distinct from the first expansion region; the fixed area contains a third data key;
the data rendering device is also used for acquiring target data corresponding to the third data keyword; rendering the target data into the fixed region based on a third data key.
11. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 5 when the computer program is executed.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 5.
CN202111127017.XA 2021-09-26 2021-09-26 Data rendering method, device, computer equipment and storage medium Active CN113934384B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111127017.XA CN113934384B (en) 2021-09-26 2021-09-26 Data rendering method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111127017.XA CN113934384B (en) 2021-09-26 2021-09-26 Data rendering method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113934384A CN113934384A (en) 2022-01-14
CN113934384B true CN113934384B (en) 2024-02-09

Family

ID=79276918

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111127017.XA Active CN113934384B (en) 2021-09-26 2021-09-26 Data rendering method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113934384B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007229927A (en) * 2006-02-27 2007-09-13 Oki Data Corp Image forming apparatus and image forming system
CN102196129A (en) * 2010-03-11 2011-09-21 柯尼卡美能达商用科技株式会社 Image processing apparatus, image processing method, and recording medium
US9525600B1 (en) * 2013-02-27 2016-12-20 Ca, Inc. Formatting values in custom component on cloud platform
US9703766B1 (en) * 2016-01-12 2017-07-11 Datawatch Corporation Systems and methods for generating tables from print-ready digital source documents
CN107402729A (en) * 2016-05-20 2017-11-28 航天信息软件技术有限公司 Printing template construction method and stencil marking method
CN111209909A (en) * 2020-01-13 2020-05-29 百度在线网络技术(北京)有限公司 Qualification identification template construction method, device, equipment and storage medium
CN112464625A (en) * 2020-11-30 2021-03-09 金蝶云科技有限公司 Receipt generation method and device, computer equipment and storage medium
CN112732207A (en) * 2021-01-13 2021-04-30 苏州浪潮智能科技有限公司 Automatic label printing method, system and medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4095558B2 (en) * 2004-01-30 2008-06-04 キヤノン株式会社 Document processing apparatus, document processing method, and computer program
US20110283210A1 (en) * 2010-05-13 2011-11-17 Kelly Berger Graphical user interface and method for creating and managing photo stories
JP6031851B2 (en) * 2012-07-01 2016-11-24 ブラザー工業株式会社 Image processing apparatus and program
US11783223B2 (en) * 2019-06-01 2023-10-10 Apple Inc. Techniques for machine language model creation

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007229927A (en) * 2006-02-27 2007-09-13 Oki Data Corp Image forming apparatus and image forming system
CN102196129A (en) * 2010-03-11 2011-09-21 柯尼卡美能达商用科技株式会社 Image processing apparatus, image processing method, and recording medium
US9525600B1 (en) * 2013-02-27 2016-12-20 Ca, Inc. Formatting values in custom component on cloud platform
US9703766B1 (en) * 2016-01-12 2017-07-11 Datawatch Corporation Systems and methods for generating tables from print-ready digital source documents
CN107402729A (en) * 2016-05-20 2017-11-28 航天信息软件技术有限公司 Printing template construction method and stencil marking method
CN111209909A (en) * 2020-01-13 2020-05-29 百度在线网络技术(北京)有限公司 Qualification identification template construction method, device, equipment and storage medium
CN112464625A (en) * 2020-11-30 2021-03-09 金蝶云科技有限公司 Receipt generation method and device, computer equipment and storage medium
CN112732207A (en) * 2021-01-13 2021-04-30 苏州浪潮智能科技有限公司 Automatic label printing method, system and medium

Also Published As

Publication number Publication date
CN113934384A (en) 2022-01-14

Similar Documents

Publication Publication Date Title
CN109074383B (en) Document search with visualization within the context of a document
JP4079087B2 (en) Layout system
JP6093873B2 (en) Typesetting method, apparatus, program and recording medium
CN111062186A (en) Text processing method and device, computer equipment and storage medium
US8136120B2 (en) Methods and systems of reconciling sources of print job processing information in a print processing environment
CN113934384B (en) Data rendering method, device, computer equipment and storage medium
US20020184261A1 (en) Process of inputting and outputting a display table derived from a worksheet and data storage media programmed to perform the same
JP5012605B2 (en) Media production system
US8578268B2 (en) Rendering electronic documents having linked textboxes
CN115617338A (en) Method and device for quickly generating service page and readable storage medium
US11074392B2 (en) Information processing apparatus and non-transitory computer readable medium for switching between an attribute information mode and an image information mode
CN114154095A (en) Page picture generation method, device, equipment and storage medium
CN114489895B (en) Batch poster generation method, device, equipment and medium
JP7430219B2 (en) Document information structuring device, document information structuring method and program
CN111768819B (en) Method, apparatus, device and medium for dynamically displaying or hiding header and footer
CN117806709B (en) Performance optimization method, device, equipment and storage medium of system-level chip
CN113268193B (en) Notebook page moving method, electronic equipment and computer storage medium
CN110457659B (en) Clause document generation method and terminal equipment
CN115408989A (en) Variable graph description method and device and electronic equipment
JP7135336B2 (en) Control device
JP2005250690A (en) Information display system, information display device and identification information allocation device
JP3910681B2 (en) Material allocation device prepared as digital data
CN115525611A (en) Method, device and equipment for inquiring key words in portable document format file
CN114861099A (en) Page font processing method and device, electronic equipment and storage medium
CN116860244A (en) Component arrangement method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant