CN115455320A - Cross table rendering method and device and storage medium - Google Patents

Cross table rendering method and device and storage medium Download PDF

Info

Publication number
CN115455320A
CN115455320A CN202110641990.7A CN202110641990A CN115455320A CN 115455320 A CN115455320 A CN 115455320A CN 202110641990 A CN202110641990 A CN 202110641990A CN 115455320 A CN115455320 A CN 115455320A
Authority
CN
China
Prior art keywords
information
cross
layout
cross table
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.)
Pending
Application number
CN202110641990.7A
Other languages
Chinese (zh)
Inventor
郭龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Suzhou Software Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202110641990.7A priority Critical patent/CN115455320A/en
Publication of CN115455320A publication Critical patent/CN115455320A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Generation (AREA)

Abstract

The embodiment of the application provides a method and a device for rendering a cross table and a storage medium, wherein the method comprises the following steps: determining a first coordinate position corresponding to a first cross table layout on a screen by using Scalable Vector Graphics (SVG); generating a first cross table layout according to multilayer table header information of a first cross table to be rendered and numerical value information corresponding to the multilayer table header information; a first cross-table layout is rendered at a first coordinate location.

Description

Cross table rendering method and device and storage medium
Technical Field
The present application relates to the field of data visualization, and in particular, to a method and an apparatus for cross table rendering, and a storage medium.
Background
The conventional webpage-side cross table is rendered by mostly adopting table tags (tables), and is rendered by combining the tables and drawing plugins (cans) or independently during rendering of a multilayer cross table.
Disclosure of Invention
The embodiment of the application provides a method and a device for rendering a cross list and a storage medium, which can solve the problem of compatibility of the cross list displayed in different browsers and ensure the accuracy of cross list display.
The technical scheme of the application is realized as follows:
in a first aspect, an embodiment of the present application provides a method for cross table rendering, where the method includes:
determining a first coordinate position corresponding to a first cross table layout on a screen by using Scalable Vector Graphics (SVG); the first cross table layout is generated according to multilayer table header information of a first cross table to be rendered and numerical value information corresponding to the multilayer table header information;
rendering the first cross-table layout at the first coordinate location.
In the above-mentioned method for rendering a crosslist, said determining a first coordinate position corresponding to a first crosslist layout on a screen using scalable vector graphics, SVG, comprises:
determining a line table head coordinate position and a list head coordinate position of the first cross table layout by using the SVG;
determining the coordinate position of the numerical cell of the first cross table layout according to the coordinate position of the head of the row table and the coordinate position of the head of the list table; the numerical cells are the intersections of rows and columns in the first cross table layout;
determining the intersection position between the head coordinate position of the row table and the head coordinate position of the column table as the attribute coordinate position of the row table;
and determining the head coordinate position of the row table, the head coordinate position of the column table, the coordinate position of the numerical value cell and the coordinate position of the column attribute as the first coordinate position.
In the above method for rendering a crosslist, said rendering the first crosslist layout at the first coordinate position comprises:
rendering row header information in the first cross table layout at the row header coordinate position;
rendering list header information in the first crosslist layout at the list header coordinate position;
rendering numerical information in the first crosslist layout at the numerical cell coordinate location; the numerical value information is information written in the numerical value unit cell;
rendering the row attribute information and column attribute information in the first cross table layout at the row-column attribute coordinate position.
In the above method for rendering a cross table, the determining a first coordinate position corresponding to a first cross table layout on a screen by using scalable vector graphics SVG includes:
determining a screen display and a preset area connected with the screen display as a rendering area under the condition that the quantity of numerical value information in the first cross table layout is larger than a first preset numerical value;
determining a to-be-rendered cross table layout from the first cross table layout according to the rendering area;
determining a first coordinate position of the cross table layout to be rendered in the rendering area by using the SVG;
and under the condition that the quantity of numerical value information in the first cross table layout is less than or equal to the first preset numerical value, determining the first coordinate position of the first cross table layout from the screen by using the SVG.
In the above-mentioned crosstable rendering method, after determining, by using the SVG, the first coordinate position of the crosstable layout to be rendered in the rendering area, the method further includes:
rendering the to-be-rendered cross-table layout at the first coordinate position;
displaying a part of a first cross table corresponding to the part of the cross table layout on the screen; the partial cross table layout is a cross table layout corresponding to the screen in the cross table layout to be rendered;
under the condition of receiving a page sliding display instruction, determining a region to be displayed according to the page sliding display instruction;
under the condition that the area to be displayed belongs to the rendering area, displaying a part of first cross table corresponding to the area to be displayed on the screen;
and under the condition that the area to be displayed does not belong to the rendering area, continuing to render the first cross table layout until the first cross table layout is completely rendered.
In the above-mentioned method for rendering a crosslist, before determining a first coordinate position corresponding to a first crosslist layout on a screen using scalable vector graphics, SVG, the method further comprises:
acquiring multilayer header information and a numerical value corresponding to the multilayer header information;
determining row layering information, row attribute information corresponding to the row layering information, column layering information and column attribute information corresponding to the column layering information according to the multilayer header information;
generating an initial cross table layout according to the row layering information, the row attribute information, the column layering information and the column attribute information;
generating the first crosstable layout based on the initial crosstable layout and the numerical information.
In the above method for rendering a crossbar table, the generating an initial crossbar table layout according to the row hierarchical information, the row attribute information, the column hierarchical information, and the column attribute information includes:
generating row header information according to the row attribute information and row layering information corresponding to each row attribute information;
generating list header information according to the column attribute information and column hierarchical information corresponding to each column attribute information;
determining the number of rows and columns according to the row layering information and the column layering information;
and generating the initial cross table layout according to the row number, the column number, the row header information and the list header information.
In the above method for rendering a cross table, after generating the first cross table layout, the method further includes:
and configuring at least one thread based on the number of the numerical information and a second preset numerical value, simultaneously carrying out data analysis on the numerical information in the first cross table layout to obtain a data analysis result, and rendering the data analysis result.
In the above method for rendering a crosslist, the rendering the crosslist layout to be rendered at the first coordinate position includes:
configuring a plurality of threads to simultaneously render the to-be-rendered cross-table layout at the first coordinate location.
In a second aspect, an embodiment of the present application provides a cross table rendering apparatus, including:
the determining module is used for determining a first coordinate position corresponding to the first cross table layout on a screen by using the Scalable Vector Graphics (SVG); the first cross table layout is generated according to multilayer table head information of a first cross table to be rendered and numerical value information corresponding to the multilayer table head information;
a rendering module to render the first cross table layout at the first coordinate location.
In a third aspect, an embodiment of the present application provides a cross table rendering apparatus, where the apparatus includes: a processor, a memory, and a communication bus; the processor, when executing a running program stored in the memory, implements the cross-table rendering method as described in any one of the above.
In a fourth aspect, the present application provides a storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement the cross table rendering method according to any one of the above.
The embodiment of the application provides a method and a device for rendering a cross table and a storage medium, wherein the method for rendering the cross table comprises the following steps: determining a first coordinate position corresponding to a first cross table layout on a screen by using Scalable Vector Graphics (SVG); generating a first cross table layout according to multilayer table header information of a first cross table to be rendered and numerical value information corresponding to the multilayer table header information; a first cross-table layout is rendered at a first coordinate location. By adopting the implementation scheme, the crosslist is rendered through the scalable vector graphics SVG, and the first coordinate position determined by the scalable vector graphics SVG is an absolute position, so that the layout position of the crosslist can not be changed along with the switching of the browser, and the accuracy of the crosslist display is ensured.
Drawings
Fig. 1 is a flowchart of a cross table rendering method according to an embodiment of the present application;
FIG. 2 is a block flow diagram of a method for cross table rendering according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of an exemplary multi-level cross-bar table provided by an embodiment of the present application;
fig. 4 is a schematic diagram of an exemplary rendering area provided in an embodiment of the present application;
FIG. 5 is a flow chart of a method for generating a first cross table layout according to an embodiment of the present application;
fig. 6 is a flowchart of a dynamic rendering method according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a composition of a cross table rendering apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a composition of a cross table rendering apparatus according to an embodiment of the present application.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the application. And are not intended to limit the present application.
Example one
An embodiment of the present application provides a method for rendering a cross table, which is applied to a cross table rendering device, and fig. 1 is a flowchart of the method for rendering the cross table provided in the embodiment of the present application, and as shown in fig. 1, the method for rendering the cross table may include:
s101, determining a first coordinate position corresponding to a first cross table layout on a screen by using Scalable Vector Graphics (SVG); the first cross table layout is generated according to the multilayer table head information of the first cross table to be rendered and the numerical value information corresponding to the multilayer table head information.
The method for rendering the cross table provided by the embodiment of the application can be suitable for a scene that the cross table is displayed on a screen.
In this embodiment of the present application, a cross table rendering process is specifically implemented by four modules, and fig. 2 is a block flow diagram of a cross table rendering method provided in this embodiment of the present application, and as shown in fig. 2, the four modules are respectively: the device comprises a user input module, a layout preprocessing module, a statistical analysis module and a rendering module.
Specifically, first data is obtained by acquiring data input in a user input module, then the first data is input into a layout preprocessing module, the first data is analyzed, a first cross table layout is generated according to the analyzed content, data analysis is performed on the first cross table layout through a statistical analysis module, and finally the first cross table layout is rendered through a rendering module.
In an embodiment of the present application, a crosstable rendering device determines a first coordinate position on a screen corresponding to a first crosstable layout using Scalable Vector Graphics (SVG).
It should be noted that, determining the first coordinate position corresponding to the first cross table layout on the screen is implemented by the rendering module in fig. 2.
In the embodiment of the present application, because the SVG has a characteristic of rendering text according to a specified path, a first coordinate position corresponding to a first cross table layout can be determined on a screen by using the SVG, specifically: determining a line table head coordinate position and a list head coordinate position of the first cross table layout by using the SVG; determining the coordinate position of the numerical cell of the first cross table layout according to the coordinate position of the line table head and the coordinate position of the list head; the numerical value unit cell is the intersection part of the row and the column in the first cross table layout; determining the cross position between the line head coordinate position and the list head coordinate position as a line attribute coordinate position; and determining the line table head coordinate position, the list head coordinate position, the numerical value cell coordinate position and the line attribute coordinate position as a first coordinate position.
It should be noted that a cross table can be divided into four parts, including a row table header, a list table header, row and column attributes and numerical values; and the row header and the list header of the cross table may be a single layer or a multi-layer row header and a multi-layer list header.
Illustratively, fig. 3 is a schematic diagram of an exemplary multi-layer cross table provided in the present application, and as shown in fig. 3, the multi-layer cross table in fig. 3 is composed of two layers of list headers and two layers of row headers, where the position of the row-column attribute is the position where the row header and the list header meet in the diagram, i.e., a rectangular area composed of "operator", "gender" and "city" in fig. 3.
In the embodiment of the application, the first coordinate position is determined by dividing into two modes of dynamic rendering and full rendering according to the quantity of numerical value information in the first cross table layout.
Specifically, the process of determining the first coordinate position by a dynamic rendering mode includes: under the condition that the quantity of numerical value information in the first cross table layout is larger than a first preset numerical value, determining a screen and a preset area connected with the screen as rendering areas; determining a to-be-rendered cross table layout from the first cross table layout according to the rendering area; and determining a first coordinate position of the cross table layout to be rendered in the rendering area by using the SVG.
It should be noted that, the first preset numerical value at this time may be determined according to the quantity of the maximum numerical information that can be borne and displayed by the screen.
It should be noted that the quantity of the numerical information in the first cross table layout is the total quantity of the numerical values in the first cross table layout, as shown in fig. 3, where the quantity of the accumulated payment sum in each cell is the quantity of the numerical information, and when the total data amount is greater than a preset numerical value, the rendering area may be determined; the method includes the steps of determining a number of columns of a first cross table layout according to the number of the numerical information, determining a rendering area when the number of columns of the first cross table layout is larger than the number of preset columns, or determining a number of rows of the first cross table layout according to the number of the numerical information, determining the rendering area when the number of rows of the first cross table layout is larger than the number of preset rows, where a specific determination scheme is determined according to an actual situation, and the embodiment of the present application is not limited herein.
It should be noted that the preset area may be a window size of a next screen connected to the lower side of the current screen and a window size of a next screen connected to the right side of the current screen, or may also be a window size of two next screens connected to the lower side of the current screen and a window size of two next screens connected to the right side of the current screen, and the specific preset area size may be determined according to an actual situation, which is not limited herein in the embodiment of the present application.
For example, fig. 4 is a schematic diagram of an exemplary rendering area provided by the present application, as shown in fig. 4, a screen a is a visible area, a portion connected to the screen a is a preset area b, and the rest is an invisible area c.
It should be noted that, because the screen and the preset area connected to the screen are determined as the rendering area, and then the corresponding cross table is rendered according to the rendering area, when the user slides the screen to view the cross table, and when the size of the sliding screen of the user is in the rendering area, the cross table can be directly viewed, that is, the re-rendering is not needed, so that the response speed is increased.
It should be noted that, because the rendering area is determined when the total data amount is greater than the preset value, at this time, it is determined that the size of the screen cannot be completely rendered to obtain the first cross table layout, that is, the first cross table layout cannot be completely displayed on the screen, a cross table layout, a part of which can match the size of the rendering area, needs to be determined from the first cross table layout, and is determined as the cross table layout to be rendered.
It should be noted that, since the to-be-rendered layout is determined from the first cross table layout and is a part of the first cross table layout, the steps of determining the first coordinate position of the to-be-rendered cross table layout in the rendering area and determining the first coordinate position corresponding to the first cross table layout are the same, and details of the to-be-rendered cross table layout are omitted herein.
Specifically, the process of determining the first coordinate position by means of full-volume rendering includes: and under the condition that the quantity of the numerical value information in the first cross table layout is less than or equal to a first preset numerical value, determining a first coordinate position where the first cross table layout is located from a screen by using the SVG.
It should be noted that, because the determination of the rendering area is determined when the total data amount is less than or equal to the preset value, at this time, the size of the description screen may be capable of rendering all the first cross table layouts, that is, the first cross table layouts may be completely displayed on the screen, the first coordinate position where the first cross table layouts are located may be directly determined from the screen by using SVG, and the specific steps are the same as the step of determining the first coordinate position corresponding to the first cross table layouts, which is not described herein again.
In the embodiment of the present application, before determining the first coordinate position corresponding to the first cross table layout on the screen by using scalable vector graphics SVG, a process of generating the first cross table layout is further included, and the process is implemented by two modules, i.e. the user input module and the layout preprocessing module in fig. 2, and fig. 5 is a flow chart for generating the first cross table layout provided by the present application, as shown in fig. 5, the method includes:
s201, obtaining multilayer header information and numerical value information corresponding to the multilayer header information.
Specifically, the input module receives first data input by a user, and transmits the first data to the layout preprocessing module, and the layout preprocessing module analyzes the first data input by the user to obtain the multilayer header information and numerical value information corresponding to the multilayer header information.
S202, determining row layering information, row attribute information corresponding to the row layering information, column layering information and column attribute information corresponding to the column layering information according to the multilayer header information.
The row hierarchy information and the column hierarchy information are the number of hierarchies of rows, hierarchy information corresponding to each row hierarchy, the number of hierarchies of columns, and hierarchy information corresponding to each column hierarchy.
Specifically, as shown in fig. 3, the number of layers of the row header is two, the attribute information of the first layer row header is "province", the layer information of the first layer row header is "shanghai", "yunan", the attribute information of the second layer row header is "city", and the layer information of the second layer row header is "shanghai", "lincang 3", "lijiang", "baoshan", and the like.
Specifically, as shown in fig. 3, the number of layers of the header is two, the attribute information of the header in the first layer is "operator", the hierarchical information of the header in the first layer is "mobile", "unicom", "telecom", and "other", the attribute information of the header in the second layer is "gender", and the hierarchical information of the header in the second layer is "male" and "female".
S203, generating an initial cross table layout according to the row hierarchical information, the row attribute information, the column hierarchical information and the column attribute information.
Specifically, row header information is generated according to the row attribute information and row hierarchical information corresponding to each row attribute information; generating list header information according to the column attribute information and column layering information corresponding to each column attribute information; determining the number of rows and columns according to the row layering information and the column layering information; and generating an initial cross table layout according to the row number, the column number, the row table header information and the list header information.
It should be noted that, after the number of rows, the number of columns, the row header information, and the list header information are determined, the process of generating the initial cross table layout may be implemented by a preset loop algorithm, specifically, the row header information and the list header information are sequentially scanned from top to bottom and from left to right, each initial value is set to 1, the horizontal scanning is denoted by i, the vertical scanning is denoted by j, when d [ i ] [ j ] = d [ i ] [ j +1] in each scanning, the value of the cell is incremented by 1, and the process is repeated until the last column of the last row is scanned by data, and at this time, the initial layout matrix is generated.
S204, generating a first cross table layout based on the initial cross table layout and the numerical information.
Specifically, the numerical information is sequentially added to the cells corresponding to the initial cross table layout, and a first cross table layout is generated.
When the first cross table layout is generated, it is also necessary to merge the row headers or the list headers of the same attribute information into the header of the initial cross table layout layer by layer, and as shown in fig. 3, in the header of fig. 3, "move" is the attribute of the merged header, and because "move, woman" and "move", the upper header of man "is" move ", i.e., is merged.
In the embodiment of the application, after the first cross table layout is generated, based on the number of the numerical information and a second preset numerical value, at least one thread is configured to perform data analysis on the numerical information in the first cross table layout at the same time, so as to obtain a data analysis result, and the data analysis result is rendered.
It should be noted that, the data analysis of the numerical information in the first cross table layout is implemented by the data analysis module in fig. 2.
Specifically, when the number of the numerical information is less than or equal to a preset numerical value, a thread is configured to perform data analysis on the numerical information in the first cross table layout; and when the number of the numerical information is larger than a preset numerical value, configuring a plurality of threads and simultaneously performing data analysis on the numerical information in the first cross table layout, obtaining a data analysis result after the data analysis is performed, and rendering the data analysis result.
It should be noted that the thread may also be a worker thread (worker).
It can be appreciated that the data analysis efficiency can be improved by configuring a plurality of threads and performing data analysis operation on the first cross table layout.
It should be noted that the data analysis operation may be a summation of numerical information of the same attribute, or a sorting of numerical information of the same row or the same column from small to large or from large to small, or a data analysis operation of finding the most value of all the numerical information in the first cross table layout, and the specific data analysis operation is determined according to the actual situation, and the embodiment of the present application is not limited herein.
In an embodiment of the present application, a first crosstable layout is generated for the crosstable rendering device to determine a first coordinate position on the screen corresponding to the first crosstable layout using the scalable vector image SVG.
In the embodiment of the present application, after the first coordinate position corresponding to the first cross table layout is determined, the first cross table layout may be rendered at the determined first coordinate position.
S102, rendering a first cross table layout at a first coordinate position.
In an embodiment of the present application, the crosstable rendering device renders the first crosstable layout at the first coordinate position after determining the first coordinate position corresponding to the first crosstable layout.
It is noted that rendering the first cross-table layout at the first coordinate position is implemented by the rendering module in fig. 2.
Specifically, row header information in a first cross table layout is rendered at a row header coordinate position; rendering list header information in the first cross-table layout at the list header coordinate position; rendering numerical information in the first cross table layout at the numerical cell coordinate locations; the numerical value information is information written in the numerical value cell; the row attribute information and column attribute information in the first cross table layout are rendered at row and column attribute coordinate positions.
It should be noted that, when rendering the row attribute information and the column attribute information in the first cross table layout at the row and column attribute coordinate position, as shown in fig. 3, a rectangular area at the row and column attribute coordinate position needs to be segmented, and during segmentation, the rectangular area is segmented into triangles with the required number according to the row header and the list header information.
It should be noted that, when the numerical information in the first cross table layout is rendered at the numerical cell coordinate position, a plurality of cells are generated according to the first cross table layout, wherein each cell correspondingly renders a corresponding numerical value in the first cross table layout.
In the embodiment of the application, after the first coordinate position of the to-be-rendered cross table layout in the rendering area is determined by using the SVG, the to-be-rendered cross table layout is rendered at the first coordinate position.
It should be noted that, at this time, the SVG is used to determine the first coordinate position of the to-be-rendered cross table layout in the rendering area, and when the number of the numerical value information in the first cross table layout is greater than the first preset numerical value, the first coordinate position is determined in a dynamic rendering manner, so that rendering the to-be-rendered cross table layout at the first coordinate position is dynamic rendering.
Specifically, fig. 6 is a flowchart of dynamic rendering provided by the present application, and as shown in fig. 6, the method includes:
s301, rendering the layout of the to-be-rendered cross table at the first coordinate position.
In the embodiment of the application, when the to-be-rendered cross table layout is rendered at the first coordinate position, the plurality of threads are configured to simultaneously render the to-be-rendered cross table layout at the first coordinate position.
It should be noted that, multiple worker may also be configured to render the cross table layout to be rendered at the first coordinate position at the same time.
It can be understood that the purpose of improving the rendering efficiency can be achieved by configuring a plurality of threads for dynamic rendering.
S302, displaying a part of first cross table corresponding to the part of cross table layout on a screen; and the partial cross table layout is the cross table layout corresponding to the screen in the cross table layout to be rendered.
It should be noted that, since the to-be-rendered cross table layout is a partial cross table layout corresponding to the rendering area, after the to-be-rendered cross table layout is rendered, a partial first cross table corresponding to the partial cross table layout is displayed in the rendering area.
And S303, under the condition of receiving the page sliding display instruction, determining the area to be displayed according to the page sliding display instruction.
Specifically, the page sliding display instruction may be an upward sliding instruction, a downward sliding instruction, a leftward sliding instruction, and a rightward sliding instruction input by the user, and after the page sliding display instruction of the user is received, the area to be displayed is determined according to the instruction, specifically, assuming that the user slides down a page with the size of three screens, at this time, the area to be displayed is a fourth screen page; or, it is assumed that the user has slid down only one screen page, at this time, the area to be displayed is a second screen page, and the specific sliding size is determined according to an actual situation, which is not limited herein in the embodiment of the present application.
S304, under the condition that the area to be displayed belongs to the rendering area, displaying a part of the first cross table corresponding to the area to be displayed on the screen.
Specifically, when the number of numerical information in the first cross table layout is greater than a first preset numerical value, the cross table rendering device determines the screen display and a preset area connected with the screen display as a rendering area, if the preset area set at this time is the window size of a next screen connected with the lower side of the current screen and the window size of a next screen connected with the right side of the current screen, and it is assumed that a user slides down a page of one screen size, the area to be displayed at this time is a second screen page, and since the area to be displayed at this time belongs to the rendering area and the cross table layout to be rendered has been rendered at the first coordinate position before, a part of the first cross table corresponding to the area to be displayed can be directly displayed.
S305, under the condition that the area to be displayed does not belong to the rendering area, continuing to render the first cross table layout until the first cross table layout is completely rendered.
Specifically, if the preset area set at this time is the window size of the next screen connected to the lower side of the current screen and the window size of the next screen connected to the right side of the current screen, and it is assumed that the user slides down the three pages of the screen sizes, the area to be displayed at this time is the fourth screen page, and since the area to be displayed at this time does not belong to the rendering area, it is necessary to continue to render the first cross table layout in the area to be displayed at this time, and then display a part of the first cross table corresponding to the area to be displayed on the screen.
Further, the crosstable layout to be rendered can be rendered in a full rendering mode, and specifically, after a first coordinate position where a first crosstable layout is located is determined from a screen by using SVG, the crosstable layout to be rendered is rendered at the first coordinate position.
It should be noted that, at this time, the SVG is used to determine the first coordinate position where the first cross table layout is located from the screen, and the first coordinate position is determined in a full-volume rendering manner when the number of the numerical value information in the first cross table layout is less than or equal to a first preset numerical value, so that rendering the cross table layout to be rendered at the first coordinate position is full-volume rendering.
In the embodiment of the application, all the cross tables corresponding to the first cross table are displayed on the screen during full-volume rendering.
It should be noted that the full rendering is understood to be capable of displaying on the screen completely, i.e., rendering the first cross table all at once.
The embodiment of the application provides a cross table rendering method, which comprises the following steps: determining a first coordinate position corresponding to a first cross table layout on a screen by using Scalable Vector Graphics (SVG); generating a first cross table layout according to multilayer table header information of a first cross table to be rendered and numerical value information corresponding to the multilayer table header information; a first cross-table layout is rendered at a first coordinate location. By adopting the implementation scheme, the crosslist is rendered by using the scalable vector graphics SVG, and the first coordinate position determined by the scalable vector graphics SVG is an absolute position, so that the layout position of the crosslist can be ensured not to change along with the switching of the browser, and the accuracy of the crosslist display is ensured.
Example two
In another embodiment of the present application, a cross table rendering apparatus is provided, and fig. 7 is a schematic structural diagram of a composition of the cross table rendering apparatus provided in the present application, as shown in fig. 7, the cross table rendering apparatus includes:
a determining module 10, configured to determine, on a screen, a first coordinate position corresponding to a first cross table layout using scalable vector graphics, SVG; the first cross table layout is generated according to multilayer table head information of a first cross table to be rendered and numerical value information corresponding to the multilayer table head information;
a rendering module 11 for rendering the first cross table layout at the first coordinate position.
The determining module 10 is further configured to determine a head coordinate position of a line table and a head coordinate position of a list of the first cross table layout by using the SVG; determining numerical cell coordinates of the first cross table layout according to the row table head coordinate position and the list table head coordinate position; the numerical cells are the intersection of rows and columns in the first cross table layout; determining the intersection position between the row table head coordinate position and the list table head coordinate position as a row and column attribute coordinate position; and determining the head coordinate position of the row table, the head coordinate position of the list table, the coordinate position of the numerical value cell and the coordinate position of the row and column attribute as the first coordinate position.
Wherein, the rendering module 11 is further configured to render the row header information in the first cross table layout at the row header coordinate position; rendering list header information in the first cross-table layout at the list header coordinate position; rendering numerical information in the first cross-table layout at the numerical cell coordinate location; the numerical value information is information written in the numerical value unit cell; rendering the row attribute information and column attribute information in the first cross table layout at the row column attribute coordinate location.
The determining module 10 is further configured to determine, as a rendering area, a screen display and a preset area connected to the screen display when the number of numerical value information in the first cross table layout is greater than a first preset numerical value; determining a to-be-rendered cross table layout from the first cross table layout according to the rendering area; determining a first coordinate position of the cross table layout to be rendered in the rendering area by using the SVG;
wherein, the determining module 10 is further configured to determine, by using the SVG, the first coordinate position where the first cross table layout is located from the screen, when the number of numerical value information in the first cross table layout is less than or equal to the first preset numerical value.
Wherein, the rendering module 11 is further configured to render the to-be-rendered cross table layout at the first coordinate position;
optionally, the cross table rendering apparatus 1 further includes: a display module;
the display module is used for displaying a part of first cross tables corresponding to the part of cross table layout on the screen; the partial cross table layout is a cross table layout corresponding to the screen in the cross table layout to be rendered;
the determining module 10 is further configured to determine, when a page sliding display instruction is received, a region to be displayed according to the page sliding display instruction;
the display module is further configured to display a part of the first cross table corresponding to the area to be displayed on the screen under the condition that the area to be displayed belongs to the rendering area;
the rendering module 11 is further configured to continue rendering the first cross table layout until all the first cross table layouts are rendered when the to-be-displayed area does not belong to the rendering area.
Optionally, the cross table rendering apparatus 1 further includes: the acquisition module generates a module;
the acquisition module is used for acquiring multilayer header information and numerical values corresponding to the multilayer header information;
the determining module 10 is further configured to determine, according to the multilayer header information, row hierarchical information, row attribute information corresponding to the row hierarchical information, column hierarchical information, and column attribute information corresponding to the column hierarchical information;
the generating module is used for generating an initial cross table layout according to the row layering information, the row attribute information, the column layering information and the column attribute information;
the generating module is further configured to generate the first crosslist layout based on the initial crosslist layout and the values.
The generating module is further used for generating row header information according to the row attribute information and the row layering information corresponding to each row attribute information;
the generating module is further configured to generate list header information according to the column attribute information and column hierarchical information corresponding to each piece of column attribute information;
the determining module 10 is further configured to determine a number of rows and a number of columns according to the row layering information and the column layering information;
the generating module is further configured to generate the initial cross table layout according to the row number, the column number, the row header information, and the list header information.
Optionally, the cross table rendering apparatus 1 further includes: a data analysis module;
the data analysis module is used for configuring at least one thread and simultaneously performing data analysis on the numerical information in the first cross table layout based on the number of the numerical information and a second preset numerical value to obtain a data analysis result, and rendering the data analysis result.
The rendering module 11 is further configured to configure a plurality of threads to simultaneously render the to-be-rendered cross table layout at the first coordinate position.
The embodiment of the application provides a method and a device for rendering a cross table, wherein the device for rendering the cross table comprises the following steps: determining a first coordinate position corresponding to a first cross table layout on a screen by using Scalable Vector Graphics (SVG); generating a first cross table layout according to multilayer table header information of a first cross table to be rendered and numerical value information corresponding to the multilayer table header information; a first cross-table layout is rendered at a first coordinate location. By adopting the implementation scheme, the crosslist is rendered by using the scalable vector graphics SVG, and the first coordinate position determined by the scalable vector graphics SVG is an absolute position, so that the layout position of the crosslist can be ensured not to change along with the switching of the browser, and the accuracy of the crosslist display is ensured.
Fig. 8 is a schematic diagram of a composition structure of a cross table rendering device according to an embodiment of the present application, and in practical applications, based on the same disclosure concept of the foregoing embodiment, as shown in fig. 8, the cross table rendering device according to the present embodiment includes: a display 12, a processor 13, a memory 14, and a communication bus 15.
In a Specific embodiment, the determining module 10, the rendering module 11, the obtaining module, the generating module, and the data analyzing module may be implemented by a Processor 13 located on the cross table rendering Device, the displaying module may be implemented by a display 12 located on the cross table rendering Device, and the Processor 13 may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic image Processing Device (PLD), a Field Programmable Gate Array (FPGA), a CPU, a controller, a microcontroller, and a microprocessor. It is understood that the electronic device for implementing the above-mentioned processor function may be other devices, and the embodiment is not limited in particular.
In the embodiment of the present application, the communication bus 15 is used for realizing connection communication among the display 12, the processor 13 and the memory 14; the processor 13 implements the following cross table rendering method when executing the execution program stored in the memory 14:
determining a first coordinate position corresponding to a first cross table layout on a screen by using Scalable Vector Graphics (SVG); the first cross table layout is generated according to multilayer table header information of a first cross table to be rendered and numerical value information corresponding to the multilayer table header information;
rendering the first cross-table layout at the first coordinate location.
Optionally, the processor 13 is further configured to determine a line table head coordinate position and a list head coordinate position of the first cross table layout by using the SVG; determining the numerical value cell coordinate position of the first cross table layout according to the row table head coordinate position and the list head coordinate position; the numerical cells are the intersection of rows and columns in the first cross table layout; determining the intersection position between the head coordinate position of the row table and the head coordinate position of the column table as the attribute coordinate position of the row table; and determining the head coordinate position of the row table, the head coordinate position of the list table, the coordinate position of the numerical value cell and the coordinate position of the row and column attribute as the first coordinate position.
Optionally, the processor 13 is further configured to render row header information in the first cross table layout at the row header coordinate position; rendering list header information in the first cross-table layout at the list header coordinate position; rendering numerical information in the first crosslist layout at the numerical cell coordinate location; the numerical value information is information written in the numerical value unit cell; rendering the row attribute information and column attribute information in the first cross table layout at the row column attribute coordinate location.
Optionally, the processor 13 is further configured to determine, as a rendering area, a screen display and a preset area connected to the screen display when the number of numerical value information in the first cross table layout is greater than a first preset numerical value; determining a to-be-rendered cross table layout from the first cross table layout according to the rendering area; determining a first coordinate position of the cross table layout to be rendered in the rendering area by using the SVG; and under the condition that the quantity of numerical value information in the first cross table layout is less than or equal to the first preset numerical value, determining the first coordinate position of the first cross table layout from the screen by using the SVG.
Optionally, the processor 13 is further configured to render the to-be-rendered cross table layout at the first coordinate position; displaying a part of a first cross table corresponding to the part of the cross table layout on the screen; the partial cross table layout is a cross table layout corresponding to the screen in the cross table layout to be rendered; under the condition that a page sliding display instruction is received, determining a region to be displayed according to the page sliding display instruction; under the condition that the area to be displayed belongs to the rendering area, displaying a part of first cross table corresponding to the area to be displayed on the screen; and under the condition that the area to be displayed does not belong to the rendering area, continuing to render the first cross table layout until the first cross table layout is completely rendered.
Optionally, the processor 13 is further configured to obtain multilayer header information and a numerical value corresponding to the multilayer header information; determining row layering information, row attribute information corresponding to the row layering information, column layering information and column attribute information corresponding to the column layering information according to the multilayer header information; generating an initial cross table layout according to the row layering information, the row attribute information, the column layering information and the column attribute information; generating the first crosslist layout based on the initial crosslist layout and the values.
Optionally, the processor 13 is further configured to generate line header information according to the line attribute information and line hierarchical information corresponding to each piece of line attribute information; generating list header information according to the column attribute information and column layering information corresponding to each column attribute information; determining the number of rows and columns according to the row layering information and the column layering information; and generating the initial cross table layout according to the row number, the column number, the row header information and the list header information.
Optionally, the processor 13 is further configured to configure at least one thread based on the number of the numerical information and a second preset numerical value, perform data analysis on the numerical information in the first cross table layout at the same time, obtain a data analysis result, and render the data analysis result.
Optionally, the processor 13 is further configured to configure a plurality of threads to render the to-be-rendered cross table layout at the first coordinate position at the same time.
The embodiment of the application provides a storage medium, wherein a computer program is stored on the storage medium, one or more programs are stored on the computer readable storage medium, the one or more programs can be executed by one or more processors and are applied to a cross table rendering device, and the computer program realizes the cross table rendering method.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling an image display device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the cross table rendering method according to the embodiments of the present disclosure.
The above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application.

Claims (12)

1. A method of cross-table rendering, the method comprising:
determining a first coordinate position corresponding to a first cross table layout on a screen by using Scalable Vector Graphics (SVG); the first cross table layout is generated according to multilayer table header information of a first cross table to be rendered and numerical value information corresponding to the multilayer table header information;
rendering the first cross-table layout at the first coordinate location.
2. The method of claim 1, wherein said determining a first coordinate position on the screen corresponding to the first cross table layout using scalable vector graphics, SVG, comprises:
determining a line table head coordinate position and a list head coordinate position of the first cross table layout by using the SVG;
determining the coordinate position of the numerical cell of the first cross table layout according to the coordinate position of the head of the row table and the coordinate position of the head of the list table; the numerical cells are the intersection of rows and columns in the first cross table layout;
determining the intersection position between the head coordinate position of the row table and the head coordinate position of the column table as the attribute coordinate position of the row table;
and determining the head coordinate position of the row table, the head coordinate position of the list table, the coordinate position of the numerical value cell and the coordinate position of the row and column attribute as the first coordinate position.
3. The method of claim 2, wherein the rendering the first cross table layout at the first coordinate location comprises:
rendering row header information in the first cross table layout at the row header coordinate position;
rendering list header information in the first cross-table layout at the list header coordinate position;
rendering numerical information in the first crosslist layout at the numerical cell coordinate location; the numerical value information is information written in the numerical value unit cell;
rendering the row attribute information and column attribute information in the first cross table layout at the row-column attribute coordinate position.
4. The method of claim 1, wherein said determining a first coordinate position on the screen corresponding to the first cross table layout using scalable vector graphics, SVG, comprises:
under the condition that the quantity of numerical value information in the first cross table layout is larger than a first preset numerical value, determining screen display and a preset area connected with the screen display as rendering areas;
determining a to-be-rendered cross table layout from the first cross table layout according to the rendering area;
determining a first coordinate position of the cross table layout to be rendered in the rendering area by using the SVG;
and under the condition that the quantity of numerical value information in the first cross table layout is less than or equal to the first preset numerical value, determining the first coordinate position of the first cross table layout from the screen by using the SVG.
5. The method of claim 4, wherein said determining, using said SVG, that said crosslist layout to be rendered is after a first coordinate location of said rendering area, further comprises:
rendering the to-be-rendered cross-table layout at the first coordinate position;
displaying a part of a first cross table corresponding to the part of the cross table layout on the screen; the partial cross table layout is a cross table layout corresponding to the screen in the cross table layout to be rendered;
under the condition of receiving a page sliding display instruction, determining a region to be displayed according to the page sliding display instruction;
under the condition that the area to be displayed belongs to the rendering area, displaying a part of first cross table corresponding to the area to be displayed on the screen;
and under the condition that the area to be displayed does not belong to the rendering area, continuing to render the first cross table layout until the first cross table layout is completely rendered.
6. The method of claim 1, wherein prior to determining the first coordinate position on the screen corresponding to the first cross table layout using scalable vector graphics, SVG, the method further comprises:
acquiring multilayer header information and numerical value information corresponding to the multilayer header information;
determining row layering information, row attribute information corresponding to the row layering information, column layering information and column attribute information corresponding to the column layering information according to the multilayer header information;
generating an initial cross table layout according to the row layering information, the row attribute information, the column layering information and the column attribute information;
generating the first crosstable layout based on the initial crosstable layout and the numerical information.
7. The method of claim 6, wherein generating an initial cross-table layout from the row hierarchy information, the row attribute information, the column hierarchy information, and the column attribute information comprises:
generating row header information according to the row attribute information and row layering information corresponding to each row attribute information;
generating list header information according to the column attribute information and column layering information corresponding to each column attribute information;
determining the number of rows and columns according to the row layering information and the column layering information;
and generating the initial cross table layout according to the row number, the column number, the row header information and the list header information.
8. The method of claim 7, wherein after the generating the first cross table layout, the method further comprises:
and configuring at least one thread based on the number of the numerical information and a second preset numerical value, simultaneously carrying out data analysis on the numerical information in the first cross table layout to obtain a data analysis result, and rendering the data analysis result.
9. The method of claim 5, wherein the rendering the to-be-rendered cross-table layout at the first coordinate location comprises:
configuring a plurality of threads to simultaneously render the to-be-rendered cross list layout at the first coordinate position.
10. A crosslist rendering apparatus, the apparatus comprising:
the determining module is used for determining a first coordinate position corresponding to the first cross table layout on a screen by using the Scalable Vector Graphics (SVG); the first cross table layout is generated according to multilayer table header information of a first cross table to be rendered and numerical value information corresponding to the multilayer table header information;
a rendering module to render the first cross table layout at the first coordinate location.
11. A cross-table rendering apparatus, characterized in that the apparatus comprises: a processor, a memory, and a communication bus; the processor, when executing a run program stored in the memory, implements the cross-table rendering method of any of claims 1-9.
12. A storage medium having stored thereon a computer program which, when executed by a processor, implements the cross-table rendering method of any of claims 1-9.
CN202110641990.7A 2021-06-09 2021-06-09 Cross table rendering method and device and storage medium Pending CN115455320A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110641990.7A CN115455320A (en) 2021-06-09 2021-06-09 Cross table rendering method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110641990.7A CN115455320A (en) 2021-06-09 2021-06-09 Cross table rendering method and device and storage medium

Publications (1)

Publication Number Publication Date
CN115455320A true CN115455320A (en) 2022-12-09

Family

ID=84295085

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110641990.7A Pending CN115455320A (en) 2021-06-09 2021-06-09 Cross table rendering method and device and storage medium

Country Status (1)

Country Link
CN (1) CN115455320A (en)

Similar Documents

Publication Publication Date Title
US11344806B2 (en) Method for rendering game, and method, apparatus and device for generating game resource file
US8302029B2 (en) Presentation of large objects on small displays
US8745515B2 (en) Presentation of large pages on small displays
CN110377285B (en) Method and device for generating page skeleton screen and computer equipment
US7751627B2 (en) Image dominant line determination and use
US9053529B2 (en) System and method for capturing digital images
CN112348954A (en) Building model processing method and device, computer equipment and storage medium
CN112668289A (en) Extraction method and device of nested table and storage medium
CN107861711B (en) Page adaptation method and device
WO2019018062A1 (en) Organizing images automatically into image grid layout
CN110264543B (en) Frame drawing method and device of spliced picture and storage medium
CN116302282A (en) Matrix data visual graph generation and data processing method based on D3
CN112416340A (en) Webpage generation method and system based on sketch
US20060080597A1 (en) Object editing system
CN115455320A (en) Cross table rendering method and device and storage medium
CN116661919A (en) View control method, view control device, electronic equipment and computer readable storage medium
CN108133094B (en) Layout and wiring display method for field programmable gate array of anti-fuse
CN113096217B (en) Picture generation method and device, electronic equipment and storage medium
WO2023005104A1 (en) Multi-view display method and apparatus, and device and medium
JP3715336B2 (en) System operation method
EP3929871A1 (en) Picture processing method, picture set processing method, computer device, and storage medium
CN113360148A (en) Graph processing method and device and electronic equipment
CN112767419A (en) Method and system for cutting nine-grid of atlas
CN112084364A (en) Object analysis method, local image search method, device, and storage medium
CN112416503A (en) Applet icon display method, device and equipment and computer readable storage medium

Legal Events

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