Column data multi-row display method and device, equipment and medium
By a dynamic merger form data in a predetermined merger method and style in the Table component, the traditional Table component cannot display the data of the data in multiple lines of data, and the efficient and readable form display is realized.
Patent Information
- Application Number
- CN202411415390.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-01-28
AI Technical Summary
Traditional Table components cannot dynamically implement multi-row display of column data, which cannot meet the changing table display needs.
By responding to the user data query request, obtain the target table data, and preset the data table style in the Table component, the name and merger method that needs to be merged, and the dynamic call merger method is used for data merger processing to display the merged table.
The dynamic merger of repeated data is realized, the readability of the table is enhanced, the data complexity is simplified, and the rendering content of different display requirements is adaptable.
Smart Images

Figure CN119378509A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of table configuration, and in particular to a method, device, equipment and medium for displaying multiple rows of column data. Background Art
[0002] As front-end technology matures and develops in a variety of ways, excellent UI frameworks such as Element UI, Bootstrap, and View UI have emerged on the market, providing convenience for actual development. Among them, Table, as one of the most frequently used components, provides developers with a variety of usages such as selectable, fixed headers and columns, and tree-shaped data.
[0003] However, in actual applications, for some tables with huge amounts of information, there are often situations where most of the column data content is consistent and only a small number of cell contents are different. In order to enhance the readability of the table and simplify the data complexity of the table, how to dynamically configure the data table to achieve multi-row display of column data to meet the display requirements under different needs has become an urgent problem to be solved. Summary of the invention
[0004] Based on this, the present invention provides a method, device, equipment and medium for displaying multiple rows of column data to solve the problem that traditional Table components cannot dynamically display multiple rows of column data to meet the changing table display requirements.
[0005] In a first aspect, an embodiment of the present invention provides a method for displaying multiple rows of column data, the method comprising:
[0006] In response to a data query request input by a user in a target display page, query and obtain target table data for data table display that matches the data query request;
[0007] The target table data is provided to a Table component built into the target display page and adapted to the data structure of the target table data, wherein the Table component pre-defines a data table style, a target column name to be merged, and a target merging method for realizing the column data merging process;
[0008] In the process of triggering the Table component to render and display the target table data, by calling the target merge method, the target table data after merging according to the target column name will be displayed in the target table that matches the data table style.
[0009] In a second aspect, an embodiment of the present invention provides a column data multi-row display device, the device comprising:
[0010] A table data acquisition module, used to respond to a data query request inputted in a target display page, query and acquire target table data for data table display matching the data query request;
[0011] Table component matching module, used to provide a Table component built into the target display page for the target table data, which is adapted to the data structure of the target table data. The Table component predefines the data table style, the target column name to be merged, and the target merging method for realizing the column data merging process;
[0012] The merge method calling module is used to display the target table data after merging according to the target column name in the target table matching the data table style by calling the target merge method during the process of triggering the Table component to render and display the target table data.
[0013] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a method for displaying multiple rows of column data as described in any embodiment of the present invention.
[0017] In a fourth aspect, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a method for displaying multiple rows of column data as described in any embodiment of the present invention when executed.
[0018] The technical solution of the embodiment of the present invention dynamically configures the target table data to merge the specified repeated column data, thereby enhancing the readability of the table while simplifying the data complexity of the table, and dynamically and adaptively displays the rendering content under different display requirements.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 is a flowchart of a method for displaying multiple rows of column data according to Embodiment 1 of the present invention;
[0022] Figure 2 It is a first table style reference diagram corresponding to the first type of table data structure applicable to the embodiment of the present invention;
[0023] Figure 3 is a second table style reference diagram corresponding to the second type of table data structure applicable to the embodiment of the present invention;
[0024] Figure 4 is a flowchart of another method for displaying multiple rows of column data provided according to the second embodiment of the present invention;
[0025] Figure 5 It is a reference diagram of a merged table style applicable to the embodiment of the present invention;
[0026] Figure 6 is a structural schematic diagram of a column data multi-row display device provided according to Embodiment 3 of the present invention;
[0027] Figure 7 The present invention is a schematic diagram of the structure of an electronic device for implementing a method for displaying multiple rows of column data according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] Embodiment 1
[0031] Figure 1 This is a flowchart of a method for displaying multiple rows of column data provided in the first embodiment of the present invention. This embodiment can be applied to dynamically display multiple rows of column data to meet the changing needs of table display. The method can be executed by a device for displaying multiple rows of column data. The device can be implemented in the form of hardware and / or software. The device can be configured in various UI frameworks for front-end development. Figure 1 As shown, the method includes:
[0032] S110 . In response to a data query request inputted in a target display page, query and obtain target table data for data table display that matches the data query request.
[0033] In the embodiment of the present invention, the data query request is also known as a configurable request, which refers to a configurable request initiated by a user on the front-end page. After being processed by the back-end, the front-end page dynamically renders a table data format that meets the user's display requirements. The data query request includes a query and generation requirement for the selected content under a module in the target display page. After receiving the data query request, the back-end can match the table data for front-end display that meets the data query request based on the content information in the data query request. The table data is in the form of a JSON array.
[0034] S120. Provide a Table component built into a target display page for the target table data and adapted to the data structure of the target table data, wherein the Table component predefines a data table style, target column names that need to be merged, and a target merging method for implementing column data merging.
[0035] In the embodiment of the present invention, the Table component is a component that is required to be built-in in most developments. It is used to display multiple data with similar structures, that is, information presented in a two-dimensional table consisting of rows and columns containing data, and can perform other operations such as sorting, filtering or comparison on the data. Among them, the table style refers to an expression form of table data for front-end display facing users, which can be referred to Figure 2 ; The target column names that need to be merged refer to the list field names of the lists to be merged with the same data content in several columns in the target table data.
[0036] Optionally, the data structure of the target table data includes: a plurality of data rows, each data row includes a plurality of groups of column data, each group of column data includes a column name and a column value; and the plurality of adjacent data rows have at least one group of identical column data;
[0037] The Table component adapted to the data structure of the target table data is used to merge multiple identical column values in multiple data rows that match the same target column name.
[0038] For ease of understanding, in a specific example, Figure 2 The corresponding first type of table data structure under the table style can be:
[0039] arr:[
[0040] {name:'Li Hua',sex:'Male',class:'Senior 1 (1)',subject:'Chinese',grade:111},
[0041] {name:'Li Hua',sex:'Male',class:'Senior 1 (1)',subject:'Mathematics',grade:136},
[0042] {name:'Li Hua',sex:'Male',class:'Senior 1 (1)',subject:'English',grade:116},
[0043] {name:'Wang Ping',sex:'Female',class:'Senior 1 (1)',subject:'Chinese',grade:126},
[0044] {name:'Wang Ping',sex:'Female',class:'Senior 1 (1)',subject:'Mathematics',grade:130} ]
[0046] In the above example, each {} constitutes a data row, each data row contains five groups of column data, each group of column data can have a column name of name, and the column name can be Li Hua. At the same time, in the above example, there are three groups of column data with the same column values in the first three data rows. The Table component can be used to merge the column data with column values of "Li Hua", "Male" and "Senior 1 (1) Class" in the first three data rows.
[0047] Furthermore, the data structure of the target table data may further include: a plurality of data rows, each data row including a plurality of groups of column data, each data row including at least one group of column data in array form, the column data in array form including a plurality of array elements, each array element including at least one group of local column data, each group of local column data including a column name and a column value; the column names in each group of local column data in different array elements are the same;
[0048] The Table component adapted to the data structure of the target table data is used to merge multiple different column values matching the same target column name in multiple array elements of the same data row into the same column.
[0049] In addition, in an embodiment of the present invention, in a specific example, the table style can also be as follows Figure 3 As shown, Figure 3 The corresponding second type of table data structure under the table style can be: arr:[
[0050] {name:'Li Hua',sex:'Male',class:'Senior 1 (1)',grades: [
[0052] {subject:'Chinese',grade:111},
[0053] {subject:'Mathematics',grade:136},
[0054] {subject:'English',grade:116} ]
[0056] },
[0057] {name:'Wang Ping',sex:'Female',class:'Senior 1 (1)',grades: [
[0059] {subject:'Chinese',grade:126},
[0060] {subject:'Mathematics',grade:130} ]
[0062] } ]
[0064] In the above example, the column data of grades contains three groups of array elements, namely {subject:'Chinese',grade:111},{subject:'Mathematics',grade:136} and {subject:'English',grade:116}'subject' and 'grade'. Each array element contains two groups of local column data. The column name in each group of local column data can be: subject, the column value can be 'Chinese'; the column name can be: grade, and the column value can be '111'. The Table component can be used to merge different column values under the same column name into the same column. For example, the column values under the 'subject' column name can include: 'Chinese', 'Mathematics' and 'English' at the same time, and the column values under the 'grade' column name corresponding to the 'subject' column name can include: '111', '136' and '116' at the same time.
[0065] Optionally, in the data table style, the target column names that need to be merged are identified by setting column name attribute values differently.
[0066] In order to identify the target columns to be merged and realize automatic query and merging of the target columns, the attribute values under different column names can be distinctively marked in the data table style, so as to identify several data rows that need to be merged under the column name to which the attribute value belongs.
[0067] S130. In the process of triggering the Table component to render and display the target table data, by calling the target merging method, the target table data after merging according to the target column name is displayed in a target table that matches the data table style.
[0068] Although the traditional Table component provides multiple uses such as selecting table headers and fixing table headers when processing data tables, it only supports merging a certain specified row or column for data splitting and displaying. However, in actual applications, for target table data, it is often necessary to merge columns of multiple rows of data to achieve column splitting. This process involves dynamic configuration of row and column information, which is impossible for traditional Table components. Based on this, the embodiment of the present invention creatively proposes to construct a target merging method to automatically merge target table data into a target table that meets display requirements. By replacing the original merging method of the Table component with the target merging method designed by the embodiment of the present invention and calling it, a target table that meets the requirements can be rendered.
[0069] Optionally, by calling the target merge method, the target table data after the merge processing according to the target column name is displayed in a target table that matches the data table style, including:
[0070] By calling the target merge method, all column values matching each target column name are traversed in the target table data in turn, all column values are merged into the same column, and the merged results are displayed in the target table.
[0071] In the actual application process of front-end development, the embodiment of the present invention directly reads the target table data structure by introducing the Table component in the front-end page based on the existing UI framework, sets different column merging methods under different table data structures, that is, the target merging method, and dynamically configures the target data structure by calling the target merging method, thereby rendering a target table that matches the data query request. The entire solution dynamically configures the target table data to merge the specified repeated column data, thereby enhancing the readability of the table while simplifying the data complexity of the table, and dynamically and adaptively displays the rendering content under different display requirements.
[0072] Embodiment 2
[0073] Figure 4 This is a flow chart of another method for displaying multiple rows of column data provided in the second embodiment of the present invention. This embodiment is refined based on the above embodiment. Figure 4 As shown, the method specifically includes:
[0074] S410 : In response to a data query request inputted in a target display page, query and obtain target table data for data table display that matches the data query request.
[0075] S420, providing a Table component built into a target display page for the target table data and adapted to the data structure of the target table data, wherein the Table component pre-defines a data table style, a target column name to be merged, and a target merging method for implementing column data merging.
[0076] S430. In the process of triggering the Table component to render and display the target table data, each data row in the target table data is sequentially read, and each data row is divided into at least one data group. The column values of each data row in each data group under each target column name are the same.
[0077] According to the above embodiment Figure 2 and Figure 3 It can be seen that by identifying the column values under each column name in each data row in the target table data, the same column values under the same column name can be divided into one data group, such as Figure 2 The data rows 1, 2, and 3 in the data group are divided into the first data group, and the data rows 4, 5, and 6 are divided into the second data group. Then, in the first data group, under the target column names of name, gender, and class, the column values of each data row are Li Hua, male, and Class 1 (1); in the second data group, under the target column names of name, gender, and class, the column values of each data row are Wang Ping, female, and Class 1 (1).
[0078] S440: Count the total number of data rows included in each data group, and use the total number of data rows as a new attribute value, and append it to each data row in each data group.
[0079] The total number of data rows refers to the number of data rows contained in a data group. Continuing with the above example, the total number of data rows in each data group obtained by counting the current target table data is 3. That is, the total number of data rows in each data row in the first data group is 3, and the total number of data rows in each data row in the second data group is 3.
[0080] S450, by calling the target merging method, combining the new attribute value, sequentially merge the column values matching the target column name in each data group, and display the merged result in the target table.
[0081] The new attribute value is the total number of data rows. By reading the total number of data rows, the specified number of rows can be automatically merged for the data rows under each data group. The first type of target merging method corresponding to the first data group can be called to merge the three column data rows in the data group with the name Li Hua, the gender male and the class Grade One (1) into three column data under one data row. Similarly, the second type of target merging method corresponding to the second data group can be called to merge the three column data rows in the data group with the name Wang Ping, the gender female and the class Grade One (1) into three column data under one data row. The merged table style is shown in FIG. Figure 5 .
[0082] Optionally, by calling the target merging method, the column values matching the target column name in each data group are merged in turn in combination with the new attribute value, including:
[0083] By calling the target merge method, the currently processed target data group is obtained in sequence, and a target data row is obtained in sequence in the target data group;
[0084] If the parameter value of the currently maintained auxiliary merge parameter is 0, the target data row and the column values in the next data row of the target data group that match the target column name are merged;
[0085] If the parameter value of the currently maintained auxiliary merge parameter is not 0, determining whether a new auxiliary merge parameter obtained by adding one to the auxiliary merge parameter is the same as the new attribute value in the target data row;
[0086] If they are different, then after merging the target data row with the column values in the next data row of the target data group that match the target column name, return to execute and sequentially obtain a target data row in the target data group until the new auxiliary merge parameter is the same as the new attribute value in the target data row;
[0087] If they are the same, the auxiliary merging parameter is reset to 0, and the operation of sequentially acquiring the currently processed target data groups is returned to execution until all data groups are completely processed.
[0088] Specifically, the auxiliary merge parameter can be recorded as count. Under the premise that the total number of data rows is fixed, the count value increases with the increase of the number of merged rows. Specifically, when the parameter value of the auxiliary merge parameter currently maintained is 0, it means that the current number of merged rows is 0, that is, count = 0. At this time, starting from the first data row under the column name of the table data, merge with the cells with the same column value in the next adjacent data row. When the first merge is completed, the count value is added by 1 based on the original data value, which is the new auxiliary merge parameter. The count value actually represents the number of data row merges performed under the current data grouping. When the count value increases to be equal to the total number of data rows, it means that the merge processing under the current data grouping is completed, and the above operation is repeated for the first data group until each data group is merged, and the merge processing of the target table data request is completed.
[0089] The technical solution of the embodiment of the present invention, by refining the overall solution, further specifically explains how to perform the merging processing of the target merging method under the two table data structures. By dividing the data into groups, the data rows can be merged in a targeted manner, thereby ensuring the accuracy of the merging. By setting the total number of statistical data rows and auxiliary merging parameters for each data group, the number of merged rows and the number of rows to be merged can be calculated in real time, and the merging process of the current data group can be automatically exited when the auxiliary merging parameter value is equal to the total number of data rows.
[0090] Embodiment 3
[0091] Figure 6 This is a schematic structural diagram of a column data multi-row display device provided in Embodiment 3 of the present invention.
[0092] like Figure 6 As shown, the device comprises:
[0093] The table data acquisition module 610 is used to query and acquire target table data for data table display matching the data query request in response to the data query request input in the target display page;
[0094] Table component matching module 620, used to provide a Table component built into a target display page for the target table data and adapted to the data structure of the target table data, wherein the Table component pre-defines a data table style, a target column name to be merged, and a target merging method for implementing the column data merging process;
[0095] The merge method calling module 630 is used to display the target table data after merging according to the target column name in a target table matching the data table style by calling the target merge method during the process of triggering the Table component to render and display the target table data.
[0096] In the embodiment of the present invention, in the actual application process of front-end development, based on the existing UI technology, the target table data structure is directly read by introducing the Table component in the front-end page, and different column merging methods are set under different table data structures, that is, the target merging method. The target data structure is dynamically configured by calling the target merging method, so as to render a target table that matches the data query request. The entire solution dynamically configures the target table data to merge the specified repeated column data, thereby enhancing the readability of the table while simplifying the data complexity of the table, and dynamically and adaptively displays the rendering content under different display requirements.
[0097] Optionally, based on the above embodiments, in the table data acquisition module 610, the data structure of the target table data further includes: a plurality of data rows, each data row includes a plurality of groups of column data, each group of column data includes a column name and a column value; and the plurality of adjacent data rows have at least one group of identical column data;
[0098] The Table component adapted to the data structure of the target table data is used to merge multiple identical column values in multiple data rows that match the same target column name.
[0099] Based on the above embodiments, the merge method calling module 630 includes:
[0100] A data grouping division unit, used for sequentially reading each data row in the target table data, and dividing each data row into at least one data group, wherein each data row in each data group has the same column value under each target column name;
[0101] A data row updating unit, used for counting the total number of data rows contained in each data group, and adding the total number of data rows as a new attribute value to each data row in each data group;
[0102] The column value merging unit is used to merge the column values matching the target column name in each data group in turn by calling the target merging method in combination with the new attribute value, and display the merged result in the target table.
[0103] On the basis of the above embodiments, the column value merging unit is further used to sequentially obtain the currently processed target data group by calling the target merging method, and sequentially obtain a target data row in the target data group;
[0104] If the parameter value of the currently maintained auxiliary merge parameter is 0, the target data row and the column values in the next data row of the target data group that match the target column name are merged;
[0105] If the parameter value of the currently maintained auxiliary merge parameter is not 0, determining whether a new auxiliary merge parameter obtained by adding one to the auxiliary merge parameter is the same as the new attribute value in the target data row;
[0106] If they are different, then after merging the target data row with the column values in the next data row of the target data group that match the target column name, return to execute and sequentially obtain a target data row in the target data group until the new auxiliary merge parameter is the same as the new attribute value in the target data row;
[0107] If they are the same, the auxiliary merging parameter is reset to 0, and the operation of sequentially acquiring the currently processed target data groups is returned to execution until all data groups are completely processed.
[0108] On the basis of the above embodiments, in the table data acquisition module 610, the data structure of the target table data may further include: multiple data rows, each data row includes multiple groups of column data, each data row includes at least one group of column data in array form, the column data in array form includes multiple array elements, each array element includes at least one group of local column data, each group of local column data includes a column name and a column value; the column names in each group of local column data in different array elements are the same;
[0109] The Table component adapted to the data structure of the target table data is used to merge multiple different column values matching the same target column name in multiple array elements of the same data row into the same column.
[0110] Based on the above embodiments, the merge method calling module 630 may further include:
[0111] The column value traversal unit is used to call the target merge method to traverse the target table data in turn to obtain all column values that match each target column name, merge all column values into the same column, and display the merged results in the target table.
[0112] Based on the above embodiments, it further includes a target column name identification unit, which is used to identify the target column name that needs to be merged in the data table style by setting the column name attribute value differently.
[0113] A column data multi-row display device provided by an embodiment of the present invention can execute a column data multi-row display method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects of the execution method.
[0114] Embodiment 4
[0115] Figure 7 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0116] like Figure 7 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0117] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0118] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for displaying multiple rows of column data.
[0119] That is: in response to a data query request inputted in the target display page, query and obtain target table data for data table display matching the data query request;
[0120] Provide a Table component built into the target display page for the target table data, which is adapted to the data structure of the target table data. The Table component predefines the data table style, the target column name to be merged, and the target merging method for realizing the column data merging process;
[0121] In the process of triggering the Table component to render and display the target table data, by calling the target merge method, the target table data after merging according to the target column name will be displayed in the target table that matches the data table style.
[0122] In some embodiments, a method for displaying multiple rows of column data may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for displaying multiple rows of column data described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform a method for displaying multiple rows of column data in any other appropriate manner (e.g., by means of firmware).
[0123] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0124] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0125] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0126] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0127] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0128] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0129] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0130] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for displaying multiple rows of column data, characterized in that: include: In response to a data query request inputted in the target display page, query and obtain target table data for data table display matching the data query request; Provide a Table component built into the target display page for the target table data, which is adapted to the data structure of the target table data. The Table component predefines the data table style, the target column name to be merged, and the target merging method for realizing the column data merging process; In the process of triggering the Table component to render and display the target table data, by calling the target merge method, the target table data after merging according to the target column name will be displayed in the target table that matches the data table style.
2. The method according to claim 1, characterized in that The data structure of the target table data includes: a plurality of data rows, each data row includes a plurality of groups of column data, each group of column data includes a column name and a column value; the plurality of adjacent data rows have at least one group of identical column data; The Table component adapted to the data structure of the target table data is used to merge multiple identical column values in multiple data rows that match the same target column name.
3. The method according to claim 2, characterized in that By calling the target merge method, the target table data after merging according to the target column name will be displayed in the target table that matches the data table style, including: Sequentially read each data row in the target table data, divide each data row into at least one data group, and each data row in each data group has the same column value under each target column name; Counting the total number of data rows contained in each data group, and using the total number of data rows as a new attribute value, appended to each data row in each data group; By calling the target merge method, the column values matching the target column name in each data group are merged in turn in combination with the new attribute value, and the merged result is displayed in the target table.
4. The method according to claim 3, characterized in that By calling the target merge method, the column values matching the target column name in each data group are merged in turn in combination with the new attribute value, including: By calling the target merge method, the currently processed target data group is obtained in sequence, and a target data row is obtained in the target data group in sequence; If the parameter value of the currently maintained auxiliary merge parameter is 0, the target data row and the column values in the next data row of the target data group that match the target column name are merged; If the parameter value of the currently maintained auxiliary merge parameter is not 0, determining whether a new auxiliary merge parameter obtained by adding one to the auxiliary merge parameter is the same as the new attribute value in the target data row; If they are different, then after merging the target data row with the column values in the next data row of the target data group that match the target column name, return to execute and sequentially obtain a target data row in the target data group until the new auxiliary merge parameter is the same as the new attribute value in the target data row; If they are the same, the auxiliary merging parameter is reset to 0, and the operation of sequentially acquiring the currently processed target data groups is returned to execution until all data groups are completely processed.
5. The method according to claim 1, characterized in that The data structure of the target table data includes: a plurality of data rows, each data row includes a plurality of groups of column data, each data row includes at least one group of column data in array form, the column data in array form includes a plurality of array elements, each array element includes at least one group of local column data, each group of local column data includes a column name and a column value; the column names in each group of local column data in different array elements are the same; The Table component adapted to the data structure of the target table data is used to merge multiple different column values matching the same target column name in multiple array elements of the same data row into the same column.
6. The method according to claim 5, characterized in that By calling the target merge method, the target table data after merging according to the target column name will be displayed in the target table that matches the data table style, including: By calling the target merge method, all column values matching each target column name are traversed in the target table data in turn, all column values are merged into the same column, and the merged results are displayed in the target table.
7. The method according to any one of claims 1 to 6, characterized in that: In the data table style, the target column names that need to be merged are identified by setting column name attribute values differently.
8. A column data multi-row display device, characterized in that: include: A table data acquisition module, used to respond to a data query request inputted in a target display page, query and acquire target table data for data table display matching the data query request; Table component matching module, used to provide a Table component built into the target display page for the target table data, which is adapted to the data structure of the target table data. The Table component predefines the data table style, the target column name to be merged, and the target merging method for realizing the column data merging process; The merge method calling module is used to display the target table data after merging according to the target column name in the target table matching the data table style by calling the target merge method during the process of triggering the Table component to render and display the target table data.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a method for displaying multiple rows of column data according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a method for displaying multiple rows of column data according to any one of claims 1 to 7 when executed.