Two-dimensional table display method and device

By generating and processing the original database data feedback from the server backend on the web page front end, forming a suitable two-dimensional table display, the problem of data display failure is solved and the function of correctly displaying no matter what the data is.

CN119226364APending Publication Date: 2024-12-31BEIJING MOMENT EVERLASTING TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310796755.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-30
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

When the original database data fed back by the server backend does not meet the requirements of a third-party plug-in, the web front end cannot display the data in a two-dimensional table, resulting in the user failing to find the data.

Method used

After receiving the original database data from the server backend on the web page, a first array object is generated, and multiple second array objects are generated based on the horizontal coordinate value, vertical coordinate value and cell content in the array object, and finally through these array objects The output displays a two-dimensional table.

Benefits of technology

Regardless of the data feedback from the server backend, the web front end can correctly display it in a two-dimensional table, solving the problem of data display failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226364A_ABST
    Figure CN119226364A_ABST
Patent Text Reader

Abstract

The invention discloses a two-dimensional table display method and device, and relates to the technical field of data tables. The method comprises the steps that a data query request is sent to a server rear end, the data query request comprises query conditions used for querying a target two-dimensional table, and the target two-dimensional table comprises a plurality of cells; receiving original database data corresponding to the target two-dimensional table sent by the back end of the server; a first array object is generated according to original database data corresponding to the target two-dimensional table, the first array object comprises a plurality of elements, the cells are in one-to-one correspondence with the elements, and the elements comprise abscissa values, ordinate values and cell content of the corresponding cells; generating a plurality of second array objects corresponding to the target two-dimensional table according to the abscissa value, the ordinate value and the cell content contained in each element; and outputting and displaying the target two-dimensional table according to the plurality of second array objects corresponding to the target two-dimensional table.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data tables, and in particular to a two-dimensional table display method and device. Background Art

[0002] When a user needs to display data in the form of a two-dimensional table on the front end of a web page, the user needs to input query conditions into the front end of the web page. After receiving the query conditions input by the user, the front end of the web page sends a data query request carrying the query conditions to the back end of the server. The back end of the server queries the database according to the received data query request to obtain the original database data, and feeds back the found original database data to the front end of the web page. The front end of the web page displays the original database data in the form of a two-dimensional table through a third-party plug-in.

[0003] However, when the original database data fed back by the server backend to the web frontend does not meet the requirements of the third-party plug-in, the third-party plug-in cannot display the original database data in the form of a two-dimensional table in the web frontend, resulting in the user failing to find data. Summary of the invention

[0004] The embodiment of the present application provides a two-dimensional table display method and device, the main purpose of which is to display the original database data fed back by the server back end in the form of a two-dimensional table on the web page front end.

[0005] In order to solve the above technical problems, the embodiments of the present application provide the following technical solutions:

[0006] In a first aspect, the present application provides a two-dimensional table display method, the method comprising:

[0007] Sending a data query request to a server backend, wherein the data query request includes a query condition for querying a target two-dimensional table, and the target two-dimensional table includes a plurality of cells;

[0008] Receiving original database data corresponding to the target two-dimensional table sent by the server backend;

[0009] Generate a first array object according to the original database data corresponding to the target two-dimensional table, wherein the first array object includes a plurality of elements, a plurality of cells correspond to a plurality of elements one by one, and the elements include the horizontal coordinate value, the vertical coordinate value and the cell content of the corresponding cell;

[0010] Generate a plurality of second array objects corresponding to the target two-dimensional table according to the abscissa value, ordinate value and cell content contained in each of the elements;

[0011] The target two-dimensional table is displayed according to a plurality of second array objects corresponding to the target two-dimensional table.

[0012] Optionally, the target two-dimensional table includes a plurality of rows; and generating a plurality of second array objects corresponding to the target two-dimensional table according to the abscissa value, ordinate value and cell content included in each of the elements includes:

[0013] For any row, determine multiple target elements corresponding to the row according to the abscissa value corresponding to the row and the abscissa value corresponding to each element;

[0014] Sort the cell contents corresponding to each target element in ascending order according to the ordinate value corresponding to each target element;

[0015] A second array object corresponding to the row is generated according to the sorted contents of the plurality of cells.

[0016] Optionally, the target two-dimensional table includes a plurality of columns; generating a plurality of second array objects corresponding to the target two-dimensional table according to the abscissa value, ordinate value and cell content included in each of the elements includes:

[0017] For any column, determine a plurality of target elements corresponding to the column according to the abscissa value corresponding to the column and the abscissa value corresponding to each of the elements;

[0018] Sort the cell contents corresponding to each target element in ascending order according to the ordinate value corresponding to each target element;

[0019] A second array object corresponding to the column is generated according to the sorted contents of the plurality of cells.

[0020] Optionally, the target two-dimensional table includes a plurality of rows, each of which includes a plurality of cells, and the original database data corresponding to the target two-dimensional table includes an array corresponding to each of the rows, and the array corresponding to the row is composed of cell contents corresponding to each of the cells included in the row; generating a first array object according to the original database data corresponding to the target two-dimensional table includes:

[0021] The first array object is generated according to the array and the ordinate value corresponding to each of the rows.

[0022] Optionally, the target two-dimensional table includes a plurality of columns, each of the columns includes a plurality of cells, and the original database data corresponding to the target two-dimensional table includes an array corresponding to each of the columns, and the array corresponding to the column is composed of cell contents corresponding to each of the cells included in the column; generating a first array object according to the original database data corresponding to the target two-dimensional table includes:

[0023] The first array object is generated according to the array and the ordinate value corresponding to each of the columns.

[0024] Optionally, outputting and displaying the target two-dimensional table according to the plurality of second array objects corresponding to the target two-dimensional table includes:

[0025] Create a blank 2D table;

[0026] Render the blank two-dimensional table according to the second array object corresponding to each row to obtain the target two-dimensional table;

[0027] The output displays the target two-dimensional table.

[0028] Optionally, outputting and displaying the target two-dimensional table according to the plurality of second array objects corresponding to the target two-dimensional table includes:

[0029] Create a blank 2D table;

[0030] Render the blank two-dimensional table according to the second array object corresponding to each column to obtain the target two-dimensional table;

[0031] The output displays the target two-dimensional table.

[0032] In a second aspect, the present application also provides a two-dimensional table display device, comprising:

[0033] A sending unit, used to send a data query request to a server backend, wherein the data query request includes a query condition for querying a target two-dimensional table, and the target two-dimensional table includes a plurality of cells;

[0034] A receiving unit, configured to receive original database data corresponding to the target two-dimensional table sent by the server backend;

[0035] A first generating unit, configured to generate a first array object according to the original database data corresponding to the target two-dimensional table, wherein the first array object includes a plurality of elements, a plurality of cells correspond to the plurality of elements one-to-one, and the elements include a horizontal coordinate value, a vertical coordinate value and a cell content of the corresponding cell;

[0036] A second generating unit, used for generating a plurality of second array objects corresponding to the target two-dimensional table according to the abscissa value, ordinate value and cell content contained in each of the elements;

[0037] An output display unit is used to output and display the target two-dimensional table according to a plurality of second array objects corresponding to the target two-dimensional table.

[0038] Optionally, the target two-dimensional table contains multiple rows;

[0039] The second generating unit is specifically used to determine, for any row, multiple target elements corresponding to the row according to the horizontal coordinate value corresponding to the row and the horizontal coordinate value corresponding to each element; sort the cell content corresponding to each target element in ascending order according to the vertical coordinate value corresponding to each target element; and generate a second array object corresponding to the row according to the sorted multiple cell contents.

[0040] Optionally, the target two-dimensional table includes multiple columns;

[0041] The second generating unit is specifically used to determine, for any column, multiple target elements corresponding to the column according to the horizontal coordinate value corresponding to the column and the horizontal coordinate value corresponding to each element; sort the cell contents corresponding to each target element in order from small to large according to the vertical coordinate value corresponding to each target element; and generate a second array object corresponding to the column according to the sorted multiple cell contents.

[0042] Optionally, the target two-dimensional table includes a plurality of rows, each of the rows includes a plurality of cells, and the original database data corresponding to the target two-dimensional table includes an array corresponding to each of the rows, and the array corresponding to the row is composed of cell contents corresponding to each of the cells included in the row;

[0043] The first generating unit is specifically configured to generate the first array object according to the array and the ordinate value corresponding to each of the rows.

[0044] Optionally, the target two-dimensional table includes a plurality of columns, each of the columns includes a plurality of cells, and the original database data corresponding to the target two-dimensional table includes an array corresponding to each of the columns, and the array corresponding to the column is composed of cell contents corresponding to each of the cells included in the column;

[0045] The first generating unit is specifically configured to generate the first array object according to the array and the ordinate value corresponding to each of the columns.

[0046] Optionally, the output display unit is specifically used to create a blank two-dimensional table; render the blank two-dimensional table according to the second array object corresponding to each row to obtain the target two-dimensional table; and output and display the target two-dimensional table.

[0047] Optionally, the output display unit is specifically used to create a blank two-dimensional table; render the blank two-dimensional table according to the second array object corresponding to each column to obtain the target two-dimensional table; and output and display the target two-dimensional table.

[0048] In a third aspect, an embodiment of the present application provides a storage medium, which includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the two-dimensional table display method of the terminal device described in the first aspect.

[0049] In a fourth aspect, an embodiment of the present application provides a two-dimensional table display device, which includes a storage medium; and one or more processors, wherein the storage medium is coupled to the processor, and the processor is configured to execute program instructions stored in the storage medium; when the program instructions are executed, the two-dimensional table display method of the terminal device described in the first aspect is executed.

[0050] By means of the above technical solution, the technical solution provided by this application has at least the following advantages:

[0051] The present application provides a two-dimensional table display method and device. The present application can send a data query request carrying query conditions for querying a target two-dimensional table to a server backend at a web page frontend, and after receiving the original database data corresponding to the target two-dimensional table sent by the server backend, the web page frontend first generates a first array object according to the original database data corresponding to the target two-dimensional table, and then generates multiple second array objects corresponding to the target two-dimensional table according to the horizontal coordinate value, vertical coordinate value and cell content contained in each element contained in the first array object, and finally outputs and displays the target two-dimensional table according to the multiple second array objects corresponding to the target two-dimensional table, so that no matter what kind of original database data is fed back by the server backend, the web page frontend can display the original database data fed back by the server backend in the form of a two-dimensional table.

[0052] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0054] Figure 1 A flow chart of a two-dimensional table display method provided in an embodiment of the present application is shown;

[0055] Figure 2 A block diagram showing a two-dimensional table display device provided in an embodiment of the present application is shown;

[0056] Figure 3 A schematic diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0057] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0058] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by technicians in the field to which this application belongs.

[0059] The present application embodiment provides a two-dimensional table display method, specifically as follows Figure 1 As shown, the method includes:

[0060] 101. Send a data query request to the server backend.

[0061] It should be noted that in the embodiment of the present application, the executor in each step is a web front-end running in a target terminal device, and the target terminal device may be, but is not limited to, a computer, a smart phone, a tablet computer, etc.

[0062] The data query request includes query conditions for querying a target two-dimensional table, and the target two-dimensional table includes multiple cells.

[0063] In an embodiment of the present application, when a customer expects a web front end to output and display a target two-dimensional table, the customer can input query conditions for querying the target two-dimensional table into the web front end. At this time, the web front end will send a data query request carrying the query conditions for querying the target two-dimensional table to the server back end.

[0064] 102. Receive original database data corresponding to the target two-dimensional table sent by the server backend.

[0065] In an embodiment of the present application, after receiving the data query request sent by the web page front end, the server back end will search for the original database data corresponding to the target two-dimensional table in the data according to the query conditions carried in the data query request, and after finding the original database data corresponding to the target two-dimensional table, it will send the original database data corresponding to the target two-dimensional table to the web page front end. At this time, the web page front end can receive the original database data corresponding to the target two-dimensional table sent by the server back end.

[0066] 103. Generate a first array object according to the original database data corresponding to the target two-dimensional table.

[0067] The first array object contains multiple elements, multiple cells correspond to multiple elements one by one, and the elements contain the horizontal coordinate value, vertical coordinate value and cell content of the corresponding cell.

[0068] In the embodiment of the present application, after receiving the original database data corresponding to the target two-dimensional table, the web page front end can generate a first array object according to the original database data corresponding to the target two-dimensional table.

[0069] 104. Generate multiple second array objects corresponding to the target two-dimensional table according to the horizontal coordinate value, the vertical coordinate value and the cell content contained in each element.

[0070] In an embodiment of the present application, after the web page front end generates a first array object based on the original database data corresponding to the target two-dimensional table, it can generate multiple second array objects corresponding to the target two-dimensional table based on the horizontal coordinate value, vertical coordinate value and cell content contained in each element contained in the first array object.

[0071] 105. Output and display the target two-dimensional table according to the multiple second array objects corresponding to the target two-dimensional table.

[0072] In the embodiment of the present application, after the webpage front end generates a plurality of second array objects corresponding to the target two-dimensional table, it can output and display the target two-dimensional table according to the plurality of second array objects corresponding to the target two-dimensional table.

[0073] An embodiment of the present application provides a two-dimensional table display method. The embodiment of the present application can send a data query request carrying query conditions for querying a target two-dimensional table to a server backend from a web page frontend, and after receiving the original database data corresponding to the target two-dimensional table sent by the server backend, the web page frontend first generates a first array object according to the original database data corresponding to the target two-dimensional table, and then generates multiple second array objects corresponding to the target two-dimensional table according to the horizontal coordinate value, vertical coordinate value and cell content contained in each element contained in the first array object, and finally outputs and displays the target two-dimensional table according to the multiple second array objects corresponding to the target two-dimensional table, so that no matter what kind of original database data is fed back by the server backend, the web page frontend can display the original database data fed back by the server backend in the form of a two-dimensional table.

[0074] Further, in the embodiment of the present application, the specific process of the web page front end generating the first array object according to the original database data corresponding to the target two-dimensional table is:

[0075] The target two-dimensional table includes multiple rows and multiple columns, each row includes multiple cells, and each column includes multiple cells.

[0076] When the original database data corresponding to the target two-dimensional table contains an array corresponding to each row, and the array corresponding to the row is composed of the cell content corresponding to each cell contained in the row, a first array object is generated according to the array corresponding to each row and the vertical coordinate value; when the original database data corresponding to the target two-dimensional table contains an array corresponding to each column, and the array corresponding to the column is composed of the cell content corresponding to each cell contained in the column, a first array object is generated according to the array corresponding to each column and the vertical coordinate value.

[0077] Further, in the embodiment of the present application, the webpage front end may generate a plurality of second array objects corresponding to the target two-dimensional table according to the horizontal coordinate value, the vertical coordinate value and the cell content contained in each element in any one of the following two ways:

[0078] (1) For any row contained in the target two-dimensional table, multiple target elements corresponding to the row are determined according to the horizontal coordinate value corresponding to the row and the horizontal coordinate value corresponding to each element; the cell contents corresponding to each target element are sorted in the order of the vertical coordinate value corresponding to each target element from small to large; and a second array object corresponding to the row is generated according to the sorted multiple cell contents.

[0079] (2) For any column contained in the target two-dimensional table, determine the multiple target elements corresponding to the column according to the horizontal coordinate value corresponding to the column and the horizontal coordinate value corresponding to each element; sort the cell content corresponding to each target element in the column in ascending order according to the vertical coordinate value corresponding to each target element; and generate a second array object corresponding to the column according to the sorted multiple cell contents.

[0080] Further, in the embodiment of the present application, the specific process of the webpage front end outputting and displaying the target two-dimensional table according to the multiple second array objects corresponding to the target two-dimensional table is:

[0081] (1) When the generated multiple second array objects are specifically the second array objects corresponding to each row in the target two-dimensional table, first, a blank two-dimensional table is created; second, the blank two-dimensional table is rendered according to the second array objects corresponding to each row to obtain the target two-dimensional table; finally, the target two-dimensional table is output and displayed.

[0082] (2) When the generated multiple second array objects are specifically the second array objects corresponding to each column in the target two-dimensional table, first, a blank two-dimensional table is created; second, the blank two-dimensional table is rendered according to the second array objects corresponding to each column to obtain the target two-dimensional table; finally, the target two-dimensional table is output and displayed.

[0083] Furthermore, as a response to the above Figure 1 In order to realize the method shown in the figure, another embodiment of the present application also provides a two-dimensional table display device. This device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. This device is applied to the web front end to accurately display the original database data fed back by the server back end in the form of a two-dimensional table, as shown in FIG. Figure 2 As shown, the device comprises:

[0084] A sending unit 21 is used to send a data query request to a server backend, wherein the data query request includes a query condition for querying a target two-dimensional table, and the target two-dimensional table includes a plurality of cells;

[0085] A receiving unit 22, configured to receive original database data corresponding to the target two-dimensional table sent by the server backend;

[0086] A first generating unit 23 is used to generate a first array object according to the original database data corresponding to the target two-dimensional table, wherein the first array object includes a plurality of elements, a plurality of cells correspond to a plurality of elements one by one, and the elements include the horizontal coordinate value, the vertical coordinate value and the cell content of the corresponding cell;

[0087] A second generating unit 24, configured to generate a plurality of second array objects corresponding to the target two-dimensional table according to the abscissa value, ordinate value and cell content contained in each of the elements;

[0088] The output display unit 25 is used to output and display the target two-dimensional table according to the multiple second array objects corresponding to the target two-dimensional table.

[0089] Further, such as Figure 2 As shown, the target two-dimensional table includes multiple rows;

[0090] The second generating unit 24 is specifically used to determine, for any row, multiple target elements corresponding to the row according to the horizontal coordinate value corresponding to the row and the horizontal coordinate value corresponding to each element; sort the cell content corresponding to each target element in ascending order according to the vertical coordinate value corresponding to each target element; and generate a second array object corresponding to the row according to the sorted multiple cell contents.

[0091] Further, such as Figure 2 As shown, the target two-dimensional table includes multiple columns;

[0092] The second generating unit 24 is specifically used to determine, for any column, multiple target elements corresponding to the column according to the horizontal coordinate value corresponding to the column and the horizontal coordinate value corresponding to each element; sort the cell contents corresponding to each target element in order from small to large according to the vertical coordinate value corresponding to each target element; and generate a second array object corresponding to the column according to the sorted multiple cell contents.

[0093] Further, such as Figure 2 As shown, the target two-dimensional table includes a plurality of rows, each of the rows includes a plurality of cells, and the original database data corresponding to the target two-dimensional table includes an array corresponding to each of the rows, and the array corresponding to the row is composed of cell contents corresponding to each of the cells included in the row;

[0094] The first generating unit 23 is specifically configured to generate the first array object according to the array and the ordinate value corresponding to each of the rows.

[0095] Further, such as Figure 2 As shown, the target two-dimensional table includes a plurality of columns, each of the columns includes a plurality of cells, and the original database data corresponding to the target two-dimensional table includes an array corresponding to each of the columns, and the array corresponding to the column is composed of cell contents corresponding to each of the cells included in the column;

[0096] The first generating unit 23 is specifically configured to generate the first array object according to the array and the ordinate value corresponding to each of the columns.

[0097] Further, such as Figure 2 As shown, the output display unit 25 is specifically used to create a blank two-dimensional table; render the blank two-dimensional table according to the second array object corresponding to each row to obtain the target two-dimensional table; and output and display the target two-dimensional table.

[0098] Further, such as Figure 2 As shown, the output display unit 25 is specifically used to create a blank two-dimensional table; render the blank two-dimensional table according to the second array object corresponding to each column to obtain the target two-dimensional table; and output and display the target two-dimensional table.

[0099] An embodiment of the present application provides a two-dimensional table display method and device. The embodiment of the present application can send a data query request carrying query conditions for querying a target two-dimensional table from a web page front end to a server back end, and after receiving the original database data corresponding to the target two-dimensional table sent by the server back end, the web page front end first generates a first array object according to the original database data corresponding to the target two-dimensional table, and then generates multiple second array objects corresponding to the target two-dimensional table according to the horizontal coordinate value, vertical coordinate value and cell content contained in each element contained in the first array object, and finally outputs and displays the target two-dimensional table according to the multiple second array objects corresponding to the target two-dimensional table, so that no matter what kind of original database data is fed back by the server back end, the web page front end can display the original database data fed back by the server back end in the form of a two-dimensional table.

[0100] An embodiment of the present application provides a storage medium, which includes a stored program, wherein when the program is executed, a device where the storage medium is located is controlled to execute the two-dimensional table display method described above.

[0101] The storage medium may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.

[0102] An embodiment of the present application also provides a two-dimensional table display device, which includes a storage medium; and one or more processors, wherein the storage medium is coupled to the processor, and the processor is configured to execute program instructions stored in the storage medium; when the program instructions are executed, the two-dimensional table display method described above is executed.

[0103] Furthermore, an embodiment of the present application also provides an electronic device, the electronic device includes a processor and a memory, the sending unit, the receiving unit, the first generating unit, the second generating unit and the output display unit are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The processor includes a kernel, and the kernel retrieves the corresponding program unit from the memory.

[0104] The present application embodiment provides a device 30, such as Figure 3 As shown, the device 30 includes at least one processor 301, at least one memory 302 and a bus 303 connected to the processor 301; the processor 301 and the memory 302 communicate with each other through the bus 303; the processor 301 is used to call the program instructions in the memory 302 to execute the above-mentioned two-dimensional table display method. The device in this article can be a server, a PC, a PAD, a mobile phone, etc.

[0105] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that is initialized with the following method steps: sending a data query request to a server backend, wherein the data query request includes query conditions for querying a target two-dimensional table, and the target two-dimensional table includes multiple cells; receiving original database data corresponding to the target two-dimensional table sent by the server backend; generating a first array object according to the original database data corresponding to the target two-dimensional table, wherein the first array object includes multiple elements, multiple cells correspond one-to-one to multiple elements, and the elements include the horizontal coordinate value, vertical coordinate value and cell content of the corresponding cells; generating multiple second array objects corresponding to the target two-dimensional table according to the horizontal coordinate value, vertical coordinate value and cell content included in each of the elements; and outputting and displaying the target two-dimensional table according to the multiple second array objects corresponding to the target two-dimensional table.

[0106] Furthermore, the target two-dimensional table includes a plurality of rows; and generating a plurality of second array objects corresponding to the target two-dimensional table according to the abscissa value, ordinate value and cell content included in each of the elements includes:

[0107] For any row, determine multiple target elements corresponding to the row according to the abscissa value corresponding to the row and the abscissa value corresponding to each element;

[0108] Sort the cell contents corresponding to each target element in ascending order according to the ordinate value corresponding to each target element;

[0109] A second array object corresponding to the row is generated according to the sorted contents of the plurality of cells.

[0110] Furthermore, the target two-dimensional table includes a plurality of columns; generating a plurality of second array objects corresponding to the target two-dimensional table according to the abscissa value, ordinate value and cell content included in each of the elements includes:

[0111] For any column, determine a plurality of target elements corresponding to the column according to the abscissa value corresponding to the column and the abscissa value corresponding to each of the elements;

[0112] Sort the cell contents corresponding to each target element in ascending order according to the ordinate value corresponding to each target element;

[0113] A second array object corresponding to the column is generated according to the sorted contents of the plurality of cells.

[0114] Furthermore, the target two-dimensional table includes a plurality of rows, each of which includes a plurality of cells, and the original database data corresponding to the target two-dimensional table includes an array corresponding to each of the rows, and the array corresponding to the row is composed of cell contents corresponding to each of the cells included in the row; generating a first array object according to the original database data corresponding to the target two-dimensional table includes:

[0115] The first array object is generated according to the array and the ordinate value corresponding to each of the rows.

[0116] Furthermore, the target two-dimensional table includes a plurality of columns, each of the columns includes a plurality of cells, and the original database data corresponding to the target two-dimensional table includes an array corresponding to each of the columns, and the array corresponding to the column is composed of cell contents corresponding to each of the cells included in the column; generating a first array object according to the original database data corresponding to the target two-dimensional table includes:

[0117] The first array object is generated according to the array and the ordinate value corresponding to each of the columns.

[0118] Furthermore, the outputting and displaying the target two-dimensional table according to the plurality of second array objects corresponding to the target two-dimensional table includes:

[0119] Create a blank 2D table;

[0120] Render the blank two-dimensional table according to the second array object corresponding to each row to obtain the target two-dimensional table;

[0121] The output displays the target two-dimensional table.

[0122] Furthermore, the outputting and displaying the target two-dimensional table according to the plurality of second array objects corresponding to the target two-dimensional table includes:

[0123] Create a blank 2D table;

[0124] Render the blank two-dimensional table according to the second array object corresponding to each column to obtain the target two-dimensional table;

[0125] The output displays the target two-dimensional table.

[0126] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0127] In a typical configuration, the device includes one or more processors (CPU), memory and bus. The device may also include input / output interface, network interface and the like.

[0128] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.

[0129] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0130] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0131] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0132] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A two-dimensional table display method, characterized in that: include: Sending a data query request to a server backend, wherein the data query request includes a query condition for querying a target two-dimensional table, and the target two-dimensional table includes a plurality of cells; Receiving original database data corresponding to the target two-dimensional table sent by the server backend; Generate a first array object according to the original database data corresponding to the target two-dimensional table, wherein the first array object includes a plurality of elements, a plurality of cells correspond to a plurality of elements one by one, and the elements include the horizontal coordinate value, the vertical coordinate value and the cell content of the corresponding cell; Generate a plurality of second array objects corresponding to the target two-dimensional table according to the abscissa value, ordinate value and cell content contained in each of the elements; The target two-dimensional table is displayed according to a plurality of second array objects corresponding to the target two-dimensional table.

2. The method according to claim 1, characterized in that The target two-dimensional table includes a plurality of rows; and generating a plurality of second array objects corresponding to the target two-dimensional table according to the abscissa value, ordinate value and cell content included in each of the elements includes: For any row, determine multiple target elements corresponding to the row according to the abscissa value corresponding to the row and the abscissa value corresponding to each element; Sort the cell contents corresponding to each target element in ascending order according to the ordinate value corresponding to each target element; A second array object corresponding to the row is generated according to the sorted contents of the plurality of cells.

3. The method according to claim 1, characterized in that The target two-dimensional table includes a plurality of columns; and generating a plurality of second array objects corresponding to the target two-dimensional table according to the abscissa value, ordinate value and cell content included in each of the elements includes: For any column, determine a plurality of target elements corresponding to the column according to the abscissa value corresponding to the column and the abscissa value corresponding to each of the elements; Sort the cell contents corresponding to each target element in ascending order according to the ordinate value corresponding to each target element; A second array object corresponding to the column is generated according to the sorted contents of the plurality of cells.

4. The method according to claim 1, characterized in that: The target two-dimensional table includes a plurality of rows, each of which includes a plurality of cells, and the original database data corresponding to the target two-dimensional table includes an array corresponding to each of the rows, and the array corresponding to the row is composed of cell contents corresponding to each of the cells included in the row; generating a first array object according to the original database data corresponding to the target two-dimensional table includes: The first array object is generated according to the array and the ordinate value corresponding to each of the rows.

5. The method according to claim 1, characterized in that The target two-dimensional table includes a plurality of columns, each of which includes a plurality of cells, and the original database data corresponding to the target two-dimensional table includes an array corresponding to each of the columns, and the array corresponding to the column is composed of cell contents corresponding to each of the cells included in the column; generating a first array object according to the original database data corresponding to the target two-dimensional table includes: The first array object is generated according to the array and the ordinate value corresponding to each of the columns.

6. The method according to claim 2, characterized in that Outputting and displaying the target two-dimensional table according to a plurality of second array objects corresponding to the target two-dimensional table comprises: Create a blank 2D table; Render the blank two-dimensional table according to the second array object corresponding to each row to obtain the target two-dimensional table; The output displays the target two-dimensional table.

7. The method according to claim 3, characterized in that The step of outputting and displaying the target two-dimensional table according to the plurality of second array objects corresponding to the target two-dimensional table comprises: Create a blank 2D table; Render the blank two-dimensional table according to the second array object corresponding to each column to obtain the target two-dimensional table; The output displays the target two-dimensional table.

8. A two-dimensional table display device, characterized in that: include: A sending unit, used to send a data query request to a server backend, wherein the data query request includes a query condition for querying a target two-dimensional table, and the target two-dimensional table includes a plurality of cells; A receiving unit, configured to receive original database data corresponding to the target two-dimensional table sent by the server backend; A first generating unit, configured to generate a first array object according to the original database data corresponding to the target two-dimensional table, wherein the first array object includes a plurality of elements, a plurality of cells correspond to the plurality of elements one-to-one, and the elements include a horizontal coordinate value, a vertical coordinate value and a cell content of the corresponding cell; A second generating unit, used for generating a plurality of second array objects corresponding to the target two-dimensional table according to the abscissa value, ordinate value and cell content contained in each of the elements; An output display unit is used to output and display the target two-dimensional table according to a plurality of second array objects corresponding to the target two-dimensional table.

9. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the two-dimensional table display method described in any one of claims 1 to 7.

10. A two-dimensional table display device, characterized in that: The device includes a storage medium; and one or more processors, the storage medium is coupled to the processor, and the processor is configured to execute program instructions stored in the storage medium; when the program instructions are executed, the two-dimensional table display method described in any one of claims 1 to 7 is executed.

Citation Information

Cited By

  • Proportion map display method, electronic equipment, storage medium and program product

    CN120047575A